diff --git a/main.js b/main.js index 6ce8691..7df50d0 100644 --- a/main.js +++ b/main.js @@ -1,2 +1,2 @@ /*! For license information please see main.js.LICENSE.txt */ -(()=>{var e,t,i={546:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-action-bar{height:100%;white-space:nowrap}.monaco-action-bar .actions-container{align-items:center;display:flex;height:100%;margin:0 auto;padding:0;width:100%}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{align-items:center;cursor:pointer;display:block;justify-content:center;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .codicon,.monaco-action-bar .action-item .icon{display:block}.monaco-action-bar .action-item .codicon{align-items:center;display:flex;height:16px;width:16px}.monaco-action-bar .action-label{border-radius:5px;font-size:11px;padding:3px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{border-bottom:1px solid #bbb;display:block;margin-left:.8em;margin-right:.8em;padding-top:1px}.monaco-action-bar .action-item .action-label.separator{background-color:#bbb;cursor:default;height:16px;margin:5px 4px!important;min-width:1px;padding:0;width:1px}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{align-items:center;display:flex;flex:1;justify-content:center;margin-right:10px;max-width:170px;min-width:60px;overflow:hidden}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}",""]);const a=s},6513:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-aria-container{left:-999em;position:absolute}",""]);const a=s},1470:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-text-button{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:4px;text-align:center;width:100%}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled,.monaco-button.disabled:focus{cursor:default;opacity:.4!important}.monaco-text-button>.codicon{color:inherit!important;margin:0 .2em}.monaco-button-dropdown{cursor:pointer;display:flex}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic}.monaco-description-button .monaco-button-description,.monaco-description-button .monaco-button-label{align-items:center;display:flex;justify-content:center}.monaco-description-button .monaco-button-description>.codicon,.monaco-description-button .monaco-button-label>.codicon{color:inherit!important;margin:0 .2em}",""]);const a=s},8093:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-custom-checkbox{border:1px solid transparent;border-radius:3px;box-sizing:border-box;cursor:pointer;float:left;height:20px;margin-left:2px;overflow:hidden;padding:1px;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;width:20px}.monaco-custom-checkbox:hover{background-color:var(--vscode-inputOption-hoverBackground)}.hc-black .monaco-custom-checkbox:hover{border:1px dashed var(--vscode-focusBorder)}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{background-size:16px!important;border:1px solid transparent;border-radius:3px;height:18px;margin-left:0;margin-right:9px;opacity:1;padding:0;width:18px}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}",""]);const a=s},7543:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".codicon-wrench-subaction{opacity:.5}@-webkit-keyframes codicon-spin{to{transform:rotate(1turn)}}@keyframes codicon-spin{to{transform:rotate(1turn)}}.codicon-gear.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin,.codicon-sync.codicon-modifier-spin{-webkit-animation:codicon-spin 1.5s steps(30) infinite;animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{-webkit-animation-duration:1s!important;animation-duration:1s!important;-webkit-animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}",""]);const a=s},6921:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o),a=i(1667),l=i.n(a),c=new URL(i(6610),i.b),h=s()(r()),d=l()(c);h.push([e.id,"@font-face{font-display:block;font-family:codicon;src:url("+d+') format("truetype")}.codicon[class*=codicon-]{text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;font:normal normal normal 16px/1 codicon;text-align:center;text-decoration:none;text-transform:none;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}',""]);const u=h},5730:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;color:inherit;font-family:inherit;font-size:13px;position:fixed;z-index:2500}",""]);const a=s},5448:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-count-badge{border-radius:11px;box-sizing:border-box;display:inline-block;font-size:11px;font-weight:400;line-height:11px;min-height:18px;min-width:18px;padding:3px 6px;text-align:center}.monaco-count-badge.long{border-radius:2px;line-height:normal;min-height:auto;padding:2px 3px}",""]);const a=s},5159:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{align-items:center;cursor:pointer;display:flex;height:100%;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{border-radius:5px;display:flex!important;flex-direction:row}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;line-height:16px;margin-left:-3px;padding-left:0;padding-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;display:block}",""]);const a=s},71:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{-webkit-animation:monaco-findInput-highlight-0 .1s linear 0s;animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{-webkit-animation:monaco-findInput-highlight-1 .1s linear 0s;animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{-webkit-animation:monaco-findInput-highlight-dark-0 .1s linear 0s;animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{-webkit-animation:monaco-findInput-highlight-dark-1 .1s linear 0s;animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@-webkit-keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:hsla(0,0%,100%,.44)}to{background:transparent}}@-webkit-keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:hsla(0,0%,100%,.44)}99%{background:transparent}}",""]);const a=s},223:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-hover{-webkit-animation:fadein .1s linear;animation:fadein .1s linear;box-sizing:initial;cursor:default;line-height:1.5em;overflow:hidden;position:absolute;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;z-index:50}.monaco-hover.hidden{display:none}.monaco-hover a:hover{cursor:pointer}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){word-wrap:break-word;max-width:500px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover .code,.monaco-hover p,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{border-left:0;border-right:0;box-sizing:border-box;height:1px;margin:4px -8px -4px}.monaco-hover .code:first-child,.monaco-hover p:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover .code:last-child,.monaco-hover p:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ol,.monaco-hover ul{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{cursor:pointer;margin-right:16px}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link,.monaco-hover .hover-contents a.code-link:hover{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{border-bottom:1px solid transparent;text-decoration:underline;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{display:inline-block;margin-bottom:4px}.monaco-hover-content .action-container a{-webkit-user-select:none;-moz-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{cursor:default;opacity:.4;pointer-events:none}',""]);const a=s},6388:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background-position:0;background-repeat:no-repeat;background-size:16px;display:inline-block;flex-shrink:0;height:22px;line-height:inherit!important;padding-right:6px;vertical-align:top;width:16px}.monaco-icon-label>.monaco-icon-label-container{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-size:.9em;margin-left:.5em;opacity:.7;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{font-style:italic}.monaco-icon-label.deprecated{opacity:.66;text-decoration:line-through}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{text-decoration:line-through}.monaco-icon-label:after{font-size:90%;font-weight:600;margin:auto 16px 0 5px;opacity:.75;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}",""]);const a=s},6153:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-inputbox{box-sizing:border-box;display:block;font-size:inherit;padding:0;position:relative}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{height:100%;position:relative;width:100%}.monaco-inputbox>.ibwrapper>.input{border:none;box-sizing:border-box;color:inherit;display:inline-block;font-family:inherit;font-size:inherit;height:100%;line-height:inherit;resize:none;width:100%}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{-ms-overflow-style:none;display:block;outline:none;scrollbar-width:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{word-wrap:break-word;box-sizing:border-box;display:inline-block;left:0;position:absolute;top:0;visibility:hidden;white-space:pre-wrap;width:100%}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{word-wrap:break-word;box-sizing:border-box;display:inline-block;font-size:12px;line-height:17px;margin-top:-1px;overflow:hidden;padding:.4em;text-align:left;width:100%}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;height:16px;width:16px}",""]);const a=s},407:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-keybinding{align-items:center;display:flex;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{border-radius:3px;border-style:solid;border-width:1px;display:inline-block;font-size:11px;margin:0 2px;padding:3px 5px;vertical-align:middle}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}",""]);const a=s},3967:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-list{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-list.mouse-support{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{height:100%;position:relative;width:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{min-width:100%;width:auto}.monaco-list-row{box-sizing:border-box;overflow:hidden;position:absolute;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-multiple,.monaco-list.selection-single{outline:0!important}.monaco-drag-image{border-radius:10px;display:inline-block;font-size:12px;padding:1px 7px;position:absolute;z-index:1000}.monaco-list-type-filter{align-items:center;border-radius:2px;box-sizing:border-box;cursor:all-scroll;display:flex;font-size:13px;height:20px;line-height:18px;max-width:calc(100% - 10px);overflow:hidden;padding:0 3px;position:absolute;text-align:right;text-overflow:ellipsis;top:4px;z-index:1}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{align-items:center;box-sizing:border-box;display:flex;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{align-items:center;-webkit-appearance:none;-moz-appearance:none;background:none;border:none;box-sizing:border-box;cursor:pointer;display:flex;flex-shrink:0;height:16px;justify-content:center;margin:0;padding:0;width:16px}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{box-sizing:border-box;height:100%;left:0;opacity:.7;padding:40px 1em 1em;pointer-events:none;position:absolute;text-align:center;top:0;white-space:normal;width:100%}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:-webkit-grab;cursor:grab}.monaco-list-type-filter.dragging{cursor:-webkit-grabbing;cursor:grabbing}",""]);const a=s},4147:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-mouse-cursor-text{cursor:text}",""]);const a=s},6127:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-progress-container{height:5px;overflow:hidden;width:100%}.monaco-progress-container .progress-bit{display:none;height:5px;left:0;position:absolute;width:2%}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{-webkit-animation-duration:4s;animation-duration:4s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite;-webkit-animation-name:progress;animation-name:progress;-webkit-animation-timing-function:linear;animation-timing-function:linear;transform:translateZ(0)}.monaco-progress-container.infinite.infinite-long-running .progress-bit{-webkit-animation-timing-function:steps(100);animation-timing-function:steps(100)}@-webkit-keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}@keyframes progress{0%{transform:translateX(0) scaleX(1)}50%{transform:translateX(2500%) scaleX(3)}to{transform:translateX(4900%) scaleX(1)}}",""]);const a=s},9667:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,':root{--sash-size:4px}.monaco-sash{position:absolute;touch-action:none;z-index:35}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;height:100%;top:0;width:var(--sash-size)}.monaco-sash.horizontal{cursor:ns-resize;height:var(--sash-size);left:0;width:100%}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";cursor:all-scroll;display:block;height:calc(var(--sash-size)*2);position:absolute;width:calc(var(--sash-size)*2);z-index:100}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-.5);top:calc(var(--sash-size)*-1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{bottom:calc(var(--sash-size)*-1);left:calc(var(--sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{left:calc(var(--sash-size)*-1);top:calc(var(--sash-size)*-.5)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{right:calc(var(--sash-size)*-1);top:calc(var(--sash-size)*-.5)}.monaco-sash:before{background:transparent;content:"";height:100%;pointer-events:none;position:absolute;transition:background-color .1s ease-out;width:100%}.monaco-sash.vertical:before{left:calc(50% - var(--sash-hover-size)/2);width:var(--sash-hover-size)}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - var(--sash-hover-size)/2)}.pointer-events-disabled{pointer-events:none!important}.monaco-sash.debug{background:cyan}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}',""]);const a=s},1022:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{background:transparent;opacity:1;transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{display:none;position:absolute}.monaco-scrollable-element>.shadow.top{display:block;height:3px;left:3px;top:0;width:100%}.monaco-scrollable-element>.shadow.left{display:block;height:100%;left:0;top:3px;width:3px}.monaco-scrollable-element>.shadow.top-left-corner{display:block;height:3px;left:0;top:0;width:3px}",""]);const a=s},5785:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-split-view2{height:100%;position:relative;width:100%}.monaco-split-view2>.sash-container{height:100%;pointer-events:none;position:absolute;width:100%}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:auto}.monaco-split-view2>.monaco-scrollable-element{height:100%;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{height:100%;position:relative;white-space:nowrap;width:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{position:absolute;white-space:normal}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{background-color:var(--separator-border);content:" ";left:0;pointer-events:none;position:absolute;top:0;z-index:5}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}',""]);const a=s},9771:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-table{display:flex;flex-direction:column;height:100%;position:relative;white-space:nowrap;width:100%}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{font-weight:700;height:100%;overflow:hidden;text-overflow:ellipsis;width:100%}.monaco-table-td,.monaco-table-th{box-sizing:border-box;flex-shrink:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{border-left:1px solid transparent;content:"";left:calc(var(--sash-size)/2);position:absolute;width:0}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}',""]);const a=s},78:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-tl-row{align-items:center;display:flex;height:100%;position:relative}.monaco-tl-indent{height:100%;left:16px;pointer-events:none;position:absolute;top:0}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{border-left:1px solid transparent;box-sizing:border-box;display:inline-block;height:100%;transition:border-color .1s linear}.monaco-tl-contents,.monaco-tl-twistie{height:100%}.monaco-tl-twistie{align-items:center;display:flex!important;flex-shrink:0;font-size:10px;justify-content:center;padding-right:6px;text-align:right;transform:translateX(3px);width:16px}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{-webkit-animation:codicon-spin 1.25s steps(30) infinite;animation:codicon-spin 1.25s steps(30) infinite}",""]);const a=s},2749:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.quick-input-widget{left:50%;margin-left:-300px;padding:0 1px 1px;position:absolute;width:600px;z-index:2000}.quick-input-titlebar{align-items:center;display:flex}.quick-input-left-action-bar{display:flex;flex:1;margin-left:4px}.quick-input-title{overflow:hidden;padding:3px 0;text-align:center;text-overflow:ellipsis}.quick-input-right-action-bar{display:flex;flex:1;margin-right:4px}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:50%;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;margin-bottom:-2px;padding:6px 6px 0}.quick-input-widget.hidden-input .quick-input-header{margin-bottom:0;padding:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{display:flex;flex-grow:1;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{left:-10000px;position:absolute}.quick-input-count{align-items:center;align-self:center;display:flex;position:absolute;right:4px}.quick-input-count .monaco-count-badge{border-radius:2px;line-height:normal;min-height:auto;padding:2px 4px;vertical-align:middle}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{align-items:center;display:flex;font-size:11px;height:27.5px;padding:0 6px}.quick-input-message{margin-top:-1px;overflow-wrap:break-word;padding:5px}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{max-height:440px;overflow:hidden}.quick-input-list .quick-input-list-entry{box-sizing:border-box;display:flex;height:100%;overflow:hidden;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-style:solid;border-top-width:1px}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{display:flex;flex:1;height:100%;overflow:hidden}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{display:flex;flex:1;flex-direction:column;height:100%;margin-left:5px;overflow:hidden;text-overflow:ellipsis}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{align-items:center;display:flex}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{line-height:normal;opacity:.7;overflow:hidden;text-overflow:ellipsis}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px;margin-top:1px}.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label,.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}',""]);const a=s},2729:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .inputarea{background-color:transparent;border:none;color:transparent;margin:0;min-height:0;min-width:0;outline:none!important;overflow:hidden;padding:0;position:absolute;resize:none}.monaco-editor .inputarea.ime-input{z-index:10}",""]);const a=s},5875:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .margin-view-overlays .current-line,.monaco-editor .view-overlays .current-line{box-sizing:border-box;display:block;left:0;position:absolute;top:0}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}",""]);const a=s},2429:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .lines-content .cdr{position:absolute}",""]);const a=s},4891:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{align-items:center;display:flex;justify-content:center;position:absolute}",""]);const a=s},2073:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .lines-content .core-guide{box-sizing:border-box;position:absolute}",""]);const a=s},1715:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .margin-view-overlays .line-numbers{box-sizing:border-box;cursor:default;display:inline-block;font-variant-numeric:tabular-nums;height:100%;position:absolute;text-align:right;vertical-align:middle}.monaco-editor .relative-current-line-number{display:inline-block;text-align:left;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}",""]);const a=s},9523:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".mtkcontrol{background:#960000!important;color:#fff!important}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}",""]);const a=s},5228:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .lines-decorations{background:#fff;position:absolute;top:0}.monaco-editor .margin-view-overlays .cldr{height:100%;position:absolute}",""]);const a=s},3490:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .margin-view-overlays .cmdr{height:100%;left:0;position:absolute;width:100%}",""]);const a=s},7751:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover .minimap-slider.active,.monaco-editor .minimap.slider-mouseover:hover .minimap-slider{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{left:-6px;position:absolute;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{left:-1px;position:absolute;width:1px}",""]);const a=s},7789:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .overlayWidgets{left:0;position:absolute;top:0}",""]);const a=s},7073:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .view-ruler{position:absolute;top:0}",""]);const a=s},458:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .scroll-decoration{height:6px;left:0;position:absolute;top:0}",""]);const a=s},3147:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .lines-content .cslr{position:absolute}.monaco-editor\t\t\t.top-left-radius{border-top-left-radius:3px}.monaco-editor\t\t\t.bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor\t\t\t.top-right-radius{border-top-right-radius:3px}.monaco-editor\t\t\t.bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}",""]);const a=s},6649:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{overflow:hidden;position:absolute}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{background:transparent!important;border-style:solid;border-width:1px;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:2px;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{background:transparent!important;border-bottom-style:solid;border-bottom-width:1px;box-sizing:border-box}@-webkit-keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@-webkit-keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@-webkit-keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{-webkit-animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{-webkit-animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{-webkit-animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate;animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}",""]);const a=s},1927:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs\t\t\t.diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark\t\t.diffOverview{background:hsla(0,0%,100%,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs\t\t.scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark\t.scrollbar{background:transparent}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black\t.scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor\t\t\t\t.slider.active{background:hsla(0,0%,67%,.4)}.modified-in-monaco-diff-editor.hc-black\t.slider.active{background:none}.monaco-diff-editor .delete-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-editor .insert-sign{align-items:center;display:flex!important;font-size:11px!important;opacity:.7!important}.monaco-diff-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-editor.hc-black .insert-sign{opacity:1}.monaco-editor .inline-added-margin-view-zone,.monaco-editor .inline-deleted-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}",""]);const a=s},4914:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-diff-editor .diff-review-line-number{display:inline-block;text-align:right}.monaco-diff-editor .diff-review{position:absolute;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;vertical-align:middle;width:10px}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{height:16px;margin:2px 0;width:16px}",""]);const a=s},9783:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,"::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{-webkit-text-size-adjust:100%;overflow:visible;position:relative}.monaco-editor .overflow-guard{overflow:hidden;position:relative}.monaco-editor .view-overlays{position:absolute;top:0}",""]);const a=s},1125:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}",""]);const a=s},5610:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .bracket-match{box-sizing:border-box}",""]);const a=s},6941:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{align-items:center;display:flex;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}",""]);const a=s},36:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .codelens-decoration{color:var(--vscode-editorCodeLens-foreground);display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>a,.monaco-editor .codelens-decoration>span{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none;vertical-align:sub;white-space:nowrap}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration>a:hover,.monaco-editor .codelens-decoration>a:hover .codicon{color:var(--vscode-editorLink-activeForeground)!important}.monaco-editor .codelens-decoration .codicon{color:currentColor!important;color:var(--vscode-editorCodeLens-foreground);vertical-align:middle}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@-webkit-keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{-webkit-animation:fadein .1s linear;animation:fadein .1s linear}",""]);const a=s},261:(e,t,i)=>{"use strict";i.d(t,{Z:()=>u});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o),a=i(1667),l=i.n(a),c=new URL(i(4748),i.b),h=s()(r()),d=l()(c);h.push([e.id,".colorpicker-widget{height:190px;-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.colorpicker-color-decoration{border:.1em solid #000;box-sizing:border-box;cursor:pointer;display:inline-block;height:.8em;line-height:.8em;margin:.1em .2em 0;width:.8em}.hc-black .colorpicker-color-decoration,.vs-dark .colorpicker-color-decoration{border:.1em solid #eee}.colorpicker-header{background:url("+d+");background-size:9px 9px;display:flex;height:24px;image-rendering:-moz-crisp-edges;image-rendering:pixelated;position:relative}.colorpicker-header .picked-color{align-items:center;color:#fff;cursor:pointer;display:flex;flex:1;justify-content:center;line-height:24px;width:216px}.colorpicker-header .picked-color .codicon{color:inherit;font-size:14px;left:8px;position:absolute}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{cursor:pointer;width:74px;z-index:inherit}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{flex:1;height:150px;min-width:220px;overflow:hidden;position:relative}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{border:1px solid #fff;border-radius:100%;box-shadow:0 0 2px rgba(0,0,0,.8);height:9px;margin:-5px 0 0 -5px;position:absolute;width:9px}.colorpicker-body .strip{height:150px;width:25px}.colorpicker-body .hue-strip{background:linear-gradient(180deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.colorpicker-body .hue-strip,.colorpicker-body .opacity-strip{cursor:-webkit-grab;cursor:grab;margin-left:8px;position:relative}.colorpicker-body .opacity-strip{background:url("+d+");background-size:9px 9px;image-rendering:-moz-crisp-edges;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:-webkit-grabbing;cursor:grabbing}.colorpicker-body .slider{border:1px solid hsla(0,0%,100%,.71);box-shadow:0 0 1px rgba(0,0,0,.85);box-sizing:border-box;height:4px;left:-2px;position:absolute;top:0;width:calc(100% + 4px)}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}",""]);const u=h},9344:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor.vs .dnd-target{border-right:2px dotted #000;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #aeafad;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.hc-black.mac.mouse-default .view-lines,.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines{cursor:default}.monaco-editor.hc-black.mac.mouse-copy .view-lines,.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines{cursor:copy}",""]);const a=s},1486:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .find-widget{box-sizing:border-box;height:33px;line-height:19px;overflow:hidden;padding:0 4px;position:absolute;transform:translateY(calc(-100% - 10px));transition:transform .2s linear;z-index:35}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{display:flex;font-size:12px;margin:4px 0 0 17px}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-bottom:2px;padding-top:2px}.monaco-editor .find-widget>.find-part .find-actions,.monaco-editor .find-widget>.replace-part .replace-actions{align-items:center;display:flex;height:25px}.monaco-editor .find-widget .monaco-findInput{display:flex;flex:1;vertical-align:middle}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{box-sizing:border-box;display:flex;flex:initial;height:25px;line-height:23px;margin:0 0 0 3px;padding:2px 0 0 2px;text-align:center;vertical-align:middle}.monaco-editor .find-widget .button{align-items:center;background-position:50%;background-repeat:no-repeat;border-radius:5px;cursor:pointer;display:flex;flex:initial;height:16px;justify-content:center;margin-left:3px;padding:3px;width:16px}.monaco-editor .find-widget .codicon-find-selection{border-radius:5px;height:22px;padding:3px;width:22px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{padding:1px 6px;top:-1px;width:auto}.monaco-editor .find-widget .button.toggle{border-radius:0;box-sizing:border-box;height:100%;left:3px;position:absolute;top:0;width:18px}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{cursor:default;opacity:.3}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{display:flex;flex:auto;flex-grow:0;flex-shrink:0;position:relative;vertical-align:middle}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;right:2px;top:3px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{-webkit-animation-duration:0;animation-duration:0;-webkit-animation-name:inherit!important;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{left:2px;position:relative;top:1px}",""]);const a=s},2873:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-editor .margin-view-overlays .codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon-folding-expanded{align-items:center;cursor:pointer;display:flex;font-size:140%;justify-content:center;margin-left:2px;opacity:0;transition:opacity .5s}.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays:hover .codicon{opacity:1}.monaco-editor .inline-folded:after{color:grey;content:"⋯";cursor:pointer;display:inline;line-height:1em;margin:.1em .2em 0}',""]);const a=s},2287:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;margin-right:4px;vertical-align:text-top}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{font-style:italic;opacity:.6}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{padding:8px 12px 0 20px;position:absolute;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;white-space:pre}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{color:inherit;opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{border-bottom:1px solid transparent;color:var(--vscode-textLink-foreground);color:var(--vscode-textLink-activeForeground);text-decoration:underline;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}',""]);const a=s},7723:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .goto-definition-link{cursor:pointer;text-decoration:underline}",""]);const a=s},9603:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-bottom-width:1px;border-top-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;padding:3em 0;text-align:center;width:100%}.monaco-editor .reference-zone-widget .ref-tree{background-color:var(--vscode-peekViewResult-background);color:var(--vscode-peekViewResult-lineForeground);line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{overflow:hidden;text-overflow:ellipsis}.monaco-editor .reference-zone-widget .ref-tree .reference-file{color:var(--vscode-peekViewResult-fileForeground);display:inline-flex;height:100%;width:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows>.monaco-list-row.selected:not(.highlighted){background-color:var(--vscode-peekViewResult-selectionBackground);color:var(--vscode-peekViewResult-selectionForeground)!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-left:auto;margin-right:12px}.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight{background-color:var(--vscode-peekViewResult-matchHighlightBackground)}.monaco-editor .reference-zone-widget .preview .reference-decoration{background-color:var(--vscode-peekViewEditor-matchHighlightBackground);border:2px solid var(--vscode-peekViewEditor-matchHighlightBorder);box-sizing:border-box}.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input,.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background{background-color:var(--vscode-peekViewEditor-background)}.monaco-editor .reference-zone-widget .preview .monaco-editor .margin{background-color:var(--vscode-peekViewEditorGutter-background)}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-editor.hc-black .reference-zone-widget .ref-tree .referenceMatch .highlight{border:1px dotted var(--vscode-contrastActiveBorder,transparent);box-sizing:border-box}",""]);const a=s},3305:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{cursor:pointer;display:inline-block;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{font-size:0;opacity:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text{font-style:italic}",""]);const a=s},5706:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}",""]);const a=s},5390:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{-webkit-animation:fadeIn .15s ease-out;animation:fadeIn .15s ease-out}@-webkit-keyframes fadeOut{0%{opacity:1}to{opacity:0}}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{-webkit-animation:fadeOut .1s ease-out;animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{background-color:var(--vscode-inputValidation-infoBackground);border:1px solid var(--vscode-inputValidation-infoBorder);color:var(--vscode-inputValidation-infoForeground);padding:1px 4px}.monaco-editor.hc-black .monaco-editor-overlaymessage .message{border-width:2px}.monaco-editor .monaco-editor-overlaymessage .anchor{border:8px solid transparent;height:0!important;position:absolute;width:0!important;z-index:1000}.monaco-editor .monaco-editor-overlaymessage .anchor.top{border-bottom-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage .anchor.below{border-top-color:var(--vscode-inputValidation-infoBorder)}.monaco-editor .monaco-editor-overlaymessage.below .anchor.below,.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}",""]);const a=s},6772:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .parameter-hints-widget{display:flex;flex-direction:column;line-height:1.5em;z-index:39}.monaco-editor .parameter-hints-widget>.phwrapper{display:flex;flex-direction:row;max-width:440px}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .body,.monaco-editor .parameter-hints-widget .monaco-scrollable-element{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:normal}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code,.monaco-editor .parameter-hints-widget .docs .monaco-tokenized-source{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{align-items:center;display:none;flex-direction:column;justify-content:flex-end;min-width:22px}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{background-repeat:no-repeat;cursor:pointer;height:16px;width:16px}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{font-family:var(--monaco-monospace-font);height:12px;line-height:12px;text-align:center}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}",""]);const a=s},1514:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex;flex-wrap:nowrap;justify-content:space-between}.monaco-editor .peekview-widget .head .peekview-title{align-items:center;display:flex;font-size:13px;margin-left:20px;min-width:0;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em;overflow:hidden;text-overflow:ellipsis}.monaco-editor .peekview-widget .head .peekview-title .meta{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .dirname{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;padding-right:2px;text-align:right}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}',""]);const a=s},2667:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .rename-box{color:inherit;z-index:100}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}",""]);const a=s},6233:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .snippet-placeholder{background-color:var(--vscode-editor-snippetTabstopHighlightBackground,transparent);min-width:2px;outline-color:var(--vscode-editor-snippetTabstopHighlightBorder,transparent);outline-style:solid;outline-width:1px}.monaco-editor .finish-snippet-placeholder{background-color:var(--vscode-editor-snippetFinalTabstopHighlightBackground,transparent);outline-color:var(--vscode-editor-snippetFinalTabstopHighlightBorder,transparent);outline-style:solid;outline-width:1px}",""]);const a=s},3997:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-editor .suggest-widget{display:flex;flex-direction:column;width:430px;z-index:40}.monaco-editor .suggest-widget.message{align-items:center;flex-direction:row}.monaco-editor .suggest-details,.monaco-editor .suggest-widget{background-color:var(--vscode-editorSuggestWidget-background);border-color:var(--vscode-editorSuggestWidget-border);border-style:solid;border-width:1px;flex:0 1 auto;width:100%}.monaco-editor.hc-black .suggest-details,.monaco-editor.hc-black .suggest-widget{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{border-top:1px solid var(--vscode-editorSuggestWidget-border);box-sizing:border-box;display:none;flex-flow:row nowrap;font-size:80%;justify-content:space-between;overflow:hidden;padding:0 4px;width:100%}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{color:var(--vscode-editorSuggestWidgetStatus-foreground)}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{-moz-user-select:none;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{background-position:2px 2px;background-repeat:no-repeat;-mox-box-sizing:border-box;box-sizing:border-box;cursor:pointer;display:flex;padding-right:10px;touch-action:none;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused{color:var(--vscode-editorSuggestWidget-selectedForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon{color:var(--vscode-editorSuggestWidget-selectedIconForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;justify-content:space-between;overflow:hidden;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.focused)>.contents>.main .monaco-icon-label{color:var(--vscode-editorSuggestWidget-foreground)}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-highlightForeground)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused>.contents>.main .monaco-highlighted-label .highlight{color:var(--vscode-editorSuggestWidget-focusHighlightForeground)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;cursor:pointer;font-size:14px;opacity:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;right:2px;top:6px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{opacity:.6;overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{align-self:center;font-size:85%;line-height:normal;margin-left:12px;opacity:.4;overflow:hidden;text-overflow:ellipsis}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-grow:1;flex-shrink:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{flex-shrink:4;max-width:70%;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;height:18px;position:absolute;right:10px;visibility:hidden;width:18px}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{background-position:50%;background-repeat:no-repeat;background-size:80%;display:block;height:16px;margin-left:2px;width:16px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{align-items:center;display:flex;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{border:.1em solid #000;display:inline-block;height:.7em;margin:0 0 0 .3em;width:.7em}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{color:var(--vscode-editorSuggestWidget-foreground);cursor:default;display:flex;flex-direction:column}.monaco-editor .suggest-details.focused{border-color:var(--vscode-focusBorder)}.monaco-editor .suggest-details a{color:var(--vscode-textLink-foreground)}.monaco-editor .suggest-details a:hover{color:var(--vscode-textLink-activeForeground)}.monaco-editor .suggest-details code{background-color:var(--vscode-textCodeBlock-background)}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;margin:0 24px 0 0;opacity:.7;overflow:hidden;padding:4px 0 12px 5px;text-overflow:ellipsis;white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px;overflow:hidden}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{min-height:calc(1rem + 8px);padding:0;white-space:normal}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .monaco-tokenized-source{white-space:pre}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{word-wrap:break-word;white-space:pre-wrap}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ol,.monaco-editor .suggest-details ul{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}',""]);const a=s},6776:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".editor-banner{background:var(--vscode-banner-background);box-sizing:border-box;cursor:default;display:flex;font-size:12px;height:26px;overflow:visible;width:100%}.editor-banner .icon-container{align-items:center;display:flex;flex-shrink:0;padding:0 6px 0 10px}.editor-banner .icon-container.custom-icon{background-position:50%;background-repeat:no-repeat;background-size:16px;margin:0 6px 0 10px;padding:0;width:16px}.editor-banner .message-container{align-items:center;display:flex;line-height:26px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.editor-banner .message-container p{-webkit-margin-before:0;-webkit-margin-after:0;margin-block-end:0;margin-block-start:0}.editor-banner .message-actions-container{flex-grow:1;flex-shrink:0;line-height:26px;margin:0 4px}.editor-banner .message-actions-container a.monaco-button{margin:2px 8px;padding:0 12px;width:inherit}.editor-banner .message-actions-container a{margin-left:12px;padding:3px;text-decoration:underline}.editor-banner .action-container{padding:0 10px 0 6px}.editor-banner{background-color:var(--vscode-banner-background)}.editor-banner,.editor-banner .action-container .codicon,.editor-banner .message-actions-container .monaco-link{color:var(--vscode-banner-foreground)}.editor-banner .icon-container .codicon{color:var(--vscode-banner-iconForeground)}",""]);const a=s},4442:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .unicode-highlight{border:1px solid var(--vscode-editorUnicodeHighlight-border);box-sizing:border-box}",""]);const a=s},2910:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-bottom-style:solid;border-bottom-width:0;border-top-style:solid;border-top-width:0;position:relative}",""]);const a=s},6916:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .accessibilityHelpWidget{overflow:scroll;padding:10px;vertical-align:middle}",""]);const a=s},4825:(e,t,i)=>{"use strict";i.d(t,{Z:()=>f});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o),a=i(1667),l=i.n(a),c=new URL(i(3678),i.b),h=new URL(i(5237),i.b),d=s()(r()),u=l()(c),g=l()(h);d.push([e.id,".monaco-editor .iPadShowKeyboard{background:url("+u+") 50% no-repeat;border:4px solid #f6f6f6;border-radius:4px;height:36px;margin:0;min-height:0;min-width:0;overflow:hidden;padding:0;position:absolute;resize:none;width:58px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url("+g+") 50% no-repeat;border:4px solid #252526}",""]);const f=d},3523:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-editor .tokens-inspect-widget{padding:10px;-moz-user-select:text;user-select:text;-webkit-user-select:text;-ms-user-select:text;z-index:50}.tokens-inspect-separator{border:0;height:1px}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{float:right;font-size:60%;font-weight:400}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}",""]);const a=s},2674:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,87%,.4);border:1px solid hsla(0,0%,80%,.4);border-bottom-color:hsla(0,0%,73%,.4);box-shadow:inset 0 -1px 0 hsla(0,0%,73%,.4);color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:1px solid #6fc3df;box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:hsla(0,0%,50%,.17);border:1px solid rgba(51,51,51,.6);border-bottom-color:rgba(68,68,68,.6);box-shadow:inset 0 -1px 0 rgba(68,68,68,.6);color:#ccc}",""]);const a=s},2450:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,'.monaco-editor{--monaco-monospace-font:"SF Mono",Monaco,Menlo,Consolas,"Ubuntu Mono","Liberation Mono","DejaVu Sans Mono","Courier New",monospace;font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif}.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;top:0;width:1px}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs .view-overlays .current-line,.monaco-editor.vs-dark .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs .cursor,.monaco-editor.vs-dark .cursor{background-color:windowtext!important}.monaco-editor.vs .dnd-target,.monaco-editor.vs-dark .dnd-target{border-color:windowtext!important}.monaco-editor.vs .selected-text,.monaco-editor.vs-dark .selected-text{background-color:highlight!important}.monaco-editor.vs .view-line,.monaco-editor.vs-dark .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs .view-line span,.monaco-editor.vs-dark .view-line span{color:windowtext!important}.monaco-editor.vs .view-line span.inline-selected-text,.monaco-editor.vs-dark .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs .view-overlays,.monaco-editor.vs-dark .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs .reference-decoration,.monaco-editor.vs .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs .wordHighlightStrong,.monaco-editor.vs-dark .reference-decoration,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs-dark .wordHighlightStrong{background:transparent!important;border:2px dotted highlight!important;box-sizing:border-box}.monaco-editor.vs .rangeHighlight,.monaco-editor.vs-dark .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs .bracket-match,.monaco-editor.vs-dark .bracket-match{background:transparent!important;border-color:windowtext!important}.monaco-editor.vs .currentFindMatch,.monaco-editor.vs .findMatch,.monaco-editor.vs-dark .currentFindMatch,.monaco-editor.vs-dark .findMatch{background:transparent!important;border:2px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs .find-widget,.monaco-editor.vs-dark .find-widget{border:1px solid windowtext}.monaco-editor.vs .monaco-list .monaco-list-row,.monaco-editor.vs-dark .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs .monaco-list .monaco-list-row.focused,.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused{background-color:highlight!important;color:highlighttext!important}.monaco-editor.vs .monaco-list .monaco-list-row:hover,.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs .decorationsOverviewRuler,.monaco-editor.vs-dark .decorationsOverviewRuler{opacity:0}.monaco-editor.vs .minimap,.monaco-editor.vs-dark .minimap{display:none}.monaco-editor.vs .squiggly-d-error,.monaco-editor.vs-dark .squiggly-d-error{background:transparent!important;border-bottom:4px double #e47777}.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs .squiggly-c-warning,.monaco-editor.vs-dark .squiggly-b-info,.monaco-editor.vs-dark .squiggly-c-warning{border-bottom:4px double #71b771}.monaco-editor.vs .squiggly-a-hint,.monaco-editor.vs-dark .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;background-color:highlight!important;color:highlighttext!important}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs .diffOverviewRuler,.monaco-diff-editor.vs-dark .diffOverviewRuler{display:none}.monaco-editor.vs .line-delete,.monaco-editor.vs .line-insert,.monaco-editor.vs-dark .line-delete,.monaco-editor.vs-dark .line-insert{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs .char-delete,.monaco-editor.vs .char-insert,.monaco-editor.vs-dark .char-delete,.monaco-editor.vs-dark .char-insert{background:transparent!important}}',""]);const a=s},9593:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".monaco-action-bar .action-item.menu-entry .action-label.icon{background-position:50%;background-repeat:no-repeat;background-size:16px;height:16px;width:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.hc-black .monaco-action-bar .action-item.menu-entry .action-label,.vs-dark .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default{border-radius:5px;display:flex!important;flex-direction:row}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{background-position:50%;background-repeat:no-repeat;background-size:16px;height:16px;width:16px}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-light)}.hc-black .monaco-dropdown-with-default>.action-container.menu-entry>.action-label,.vs-dark .monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;line-height:16px;margin-left:-3px;padding-left:0;padding-right:0}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{background-position:50%;background-repeat:no-repeat;background-size:16px;display:block}",""]);const a=s},2021:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var n=i(8081),r=i.n(n),o=i(3645),s=i.n(o)()(r());s.push([e.id,".context-view .monaco-menu{min-width:130px}",""]);const a=s},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",n=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),n&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),n&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,n,r,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(n)for(var a=0;a0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=o),i&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=i):h[2]=i),r&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=r):h[4]="".concat(r)),t.push(h))}},t}},1667:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},3444:function(){!function(e){"use strict";function t(e,t,i){return i.a=e,i.f=t,i}function i(e){return t(2,e,(function(t){return function(i){return e(t,i)}}))}function n(e){return t(3,e,(function(t){return function(i){return function(n){return e(t,i,n)}}}))}function r(e){return t(4,e,(function(t){return function(i){return function(n){return function(r){return e(t,i,n,r)}}}}))}function o(e){return t(5,e,(function(t){return function(i){return function(n){return function(r){return function(o){return e(t,i,n,r,o)}}}}}))}function s(e){return t(6,e,(function(t){return function(i){return function(n){return function(r){return function(o){return function(s){return e(t,i,n,r,o,s)}}}}}}))}function a(e){return t(7,e,(function(t){return function(i){return function(n){return function(r){return function(o){return function(s){return function(a){return e(t,i,n,r,o,s,a)}}}}}}}))}function l(e){return t(8,e,(function(t){return function(i){return function(n){return function(r){return function(o){return function(s){return function(a){return function(l){return e(t,i,n,r,o,s,a,l)}}}}}}}}))}function c(e){return t(9,e,(function(t){return function(i){return function(n){return function(r){return function(o){return function(s){return function(a){return function(l){return function(c){return e(t,i,n,r,o,s,a,l,c)}}}}}}}}}))}function h(e,t,i){return 2===e.a?e.f(t,i):e(t)(i)}function d(e,t,i,n){return 3===e.a?e.f(t,i,n):e(t)(i)(n)}function u(e,t,i,n,r){return 4===e.a?e.f(t,i,n,r):e(t)(i)(n)(r)}function g(e,t,i,n,r,o){return 5===e.a?e.f(t,i,n,r,o):e(t)(i)(n)(r)(o)}function f(e,t,i,n,r,o,s){return 6===e.a?e.f(t,i,n,r,o,s):e(t)(i)(n)(r)(o)(s)}var p=n((function(e,t,i){for(var n=new Array(e),r=0;r=0;n--)t=h(e,i[n],t);return t})));function v(e){throw new Error("https://github.com/elm/core/blob/1.0.0/hints/"+e+".md")}function b(e,t){for(var i,n=[],r=y(e,t,0,n);r&&(i=n.pop());r=y(i.a,i.b,0,n));return r}function y(e,t,i,n){if(e===t)return!0;if("object"!=typeof e||null===e||null===t)return"function"==typeof e&&v(5),!1;if(i>100)return n.push(x(e,t)),!0;for(var r in e.$<0&&(e=Vt(e),t=Vt(t)),e)if(!y(e[r],t[r],i+1,n))return!1;return!0}function w(e,t,i){if("object"!=typeof e)return e===t?0:ei.length&&(r=i.length);for(var o=new Array(n+r),s=0;s"),t})),i(b),i((function(e,t){return!b(e,t)})),i((function(e,t){return w(e,t)<0})),i((function(e,t){return w(e,t)<1})),i((function(e,t){return w(e,t)>0})),i((function(e,t){return w(e,t)>=0}));var C=i((function(e,t){var i=w(e,t);return i<0?jt:i?Ht:zt}));function x(e,t){return{a:e,b:t}}function S(e,t){var i={};for(var n in e)i[n]=e[n];for(var n in t)i[n]=t[n];return i}var k=i(L);function L(e,t){if("string"==typeof e)return e+t;if(!e.b)return t;var i=E(e.a,t);e=e.b;for(var n=i;e.b;e=e.b)n=n.b=E(e.a,t);return i}var N={$:0};function E(e,t){return{$:1,a:e,b:t}}var D=i(E);function A(e){for(var t=N,i=e.length;i--;)t=E(e[i],t);return t}function T(e){for(var t=[];e.b;e=e.b)t.push(e.a);return t}var I=n((function(e,t,i){for(var n=[];t.b&&i.b;t=t.b,i=i.b)n.push(h(e,t.a,i.a));return A(n)})),M=(r((function(e,t,i,n){for(var r=[];t.b&&i.b&&n.b;t=t.b,i=i.b,n=n.b)r.push(d(e,t.a,i.a,n.a));return A(r)})),o((function(e,t,i,n,r){for(var o=[];t.b&&i.b&&n.b&&r.b;t=t.b,i=i.b,n=n.b,r=r.b)o.push(u(e,t.a,i.a,n.a,r.a));return A(o)})),s((function(e,t,i,n,r,o){for(var s=[];t.b&&i.b&&n.b&&r.b&&o.b;t=t.b,i=i.b,n=n.b,r=r.b,o=o.b)s.push(g(e,t.a,i.a,n.a,r.a,o.a));return A(s)})),i((function(e,t){return A(T(t).sort((function(t,i){return w(e(t),e(i))})))})),i((function(e,t){return A(T(t).sort((function(t,i){var n=h(e,t,i);return n===zt?0:n===jt?-1:1})))})),i((function(e,t){return e+t})),i((function(e,t){return e-t})),i((function(e,t){return e*t})),i((function(e,t){return e/t})),i((function(e,t){return e/t|0})),i(Math.pow),i((function(e,t){return t%e})),i((function(e,t){var i=t%e;return 0===e?v(11):i>0&&e<0||i<0&&e>0?i+e:i})));Math.PI,Math.E,Math.cos,Math.sin,Math.tan,Math.acos,Math.asin,Math.atan,i(Math.atan2);var O=Math.ceil,R=Math.floor,P=(Math.round,Math.sqrt,Math.log);isNaN,i((function(e,t){return e&&t})),i((function(e,t){return e||t})),i((function(e,t){return e!==t}));var F=i((function(e,t){return e+t})),B=i((function(e,t){return e+t}));i((function(e,t){for(var i=t.length,n=new Array(i),r=0;r-1})),$=(i((function(e,t){return 0===t.indexOf(e)})),i((function(e,t){return t.length>=e.length&&t.lastIndexOf(e)===t.length-e.length})),i((function(e,t){var i=e.length;if(i<1)return N;for(var n=0,r=[];(n=t.indexOf(e,n))>-1;)r.push(n),n+=i;return A(r)})));function K(e){return{$:2,b:e}}K((function(e){return"number"!=typeof e?re("an INT",e):-2147483647=t.length?re("a LONGER array. Need index "+r+" but only see "+t.length+" entries",t):(n=ee(e.b,t[r]),Fi(n)?n:Ut(h(qt,r,n.a))):re("an ARRAY",t);case 8:if("object"!=typeof t||null===t||ie(t))return re("an OBJECT",t);var o=N;for(var s in t)if(t.hasOwnProperty(s)){if(n=ee(e.b,t[s]),!Fi(n))return Ut(h(Kt,s,n.a));o=E(x(s,n.a),o)}return Gt(mi(o));case 9:for(var a=e.f,l=e.g,c=0;c=0&&t.splice(i,1)}}}function Fe(e,t){return Me(e),xe[e]={f:We,u:t,a:Ve},Le(e)}var Be,We=i((function(e,t){return function(i){return e(t(i))}}));function Ve(e,t){var i=N,r=xe[e].u,o=he(null);return xe[e].b=o,xe[e].c=n((function(e,t,n){return i=t,o})),{send:function(e){var n=h(J,r,e);Fi(n)||v(4,n.a);for(var o=n.a,s=i;s.b;s=s.b)t(s.a(o))}}}function ze(e,t){for(var i in t)i in e?"init"==i?v(6):ze(e[i],t[i]):e[i]=t[i]}var He="undefined"!=typeof document?document:{};function je(e,t){e.appendChild(t)}function Ue(e){return{$:0,a:e}}r((function(e,t,i,n){var r=n.node;return r.parentNode.replaceChild(lt(e,(function(){})),r),{}}));var $e=i((function(e,t){return i((function(i,n){for(var r=[],o=0;n.b;n=n.b){var s=n.a;o+=s.b||0,r.push(s)}return o+=r.length,{$:1,c:t,d:st(i),e:r,f:e,b:o}}))})),Ke=$e(void 0),qe=i((function(e,t){return i((function(i,n){for(var r=[],o=0;n.b;n=n.b){var s=n.a;o+=s.b.b||0,r.push(s)}return o+=r.length,{$:2,c:t,d:st(i),e:r,f:e,b:o}}))})),Ge=qe(void 0);function Ye(e,t){return{$:5,l:e,m:t,k:void 0}}i((function(e,t){return{$:4,j:e,k:t,b:1+(t.b||0)}})),i((function(e,t){return Ye([e,t],(function(){return e(t)}))})),n((function(e,t,i){return Ye([e,t,i],(function(){return h(e,t,i)}))})),r((function(e,t,i,n){return Ye([e,t,i,n],(function(){return d(e,t,i,n)}))})),o((function(e,t,i,n,r){return Ye([e,t,i,n,r],(function(){return u(e,t,i,n,r)}))})),s((function(e,t,i,n,r,o){return Ye([e,t,i,n,r,o],(function(){return g(e,t,i,n,r,o)}))})),a((function(e,t,i,n,r,o,s){return Ye([e,t,i,n,r,o,s],(function(){return f(e,t,i,n,r,o,s)}))})),l((function(e,t,i,n,r,o,s,a){return Ye([e,t,i,n,r,o,s,a],(function(){return function(e,t,i,n,r,o,s,a){return 7===e.a?e.f(t,i,n,r,o,s,a):e(t)(i)(n)(r)(o)(s)(a)}(e,t,i,n,r,o,s,a)}))})),c((function(e,t,i,n,r,o,s,a,l){return Ye([e,t,i,n,r,o,s,a,l],(function(){return function(e,t,i,n,r,o,s,a,l){return 8===e.a?e.f(t,i,n,r,o,s,a,l):e(t)(i)(n)(r)(o)(s)(a)(l)}(e,t,i,n,r,o,s,a,l)}))}));var Ze=i((function(e,t){return{$:"a0",n:e,o:t}})),Qe=(i((function(e,t){return{$:"a1",n:e,o:t}})),i((function(e,t){return{$:"a2",n:e,o:t}}))),Xe=i((function(e,t){return{$:"a3",n:e,o:t}})),Je=(n((function(e,t,i){return{$:"a4",n:t,o:{f:e,o:i}}})),/^script$/i),et=/^(on|formAction$)/i,tt=/^\s*(j\s*a\s*v\s*a\s*s\s*c\s*r\s*i\s*p\s*t\s*:|d\s*a\s*t\s*a\s*:\s*t\s*e\s*x\s*t\s*\/\s*h\s*t\s*m\s*l\s*(,|;))/i;function it(e){return Je.test(e)?"p":e}i((function(e,t){return"a0"===t.$?h(Ze,t.n,function(e,t){var i=zi(t);return{$:t.$,a:i?d(Wi,i<3?rt:ot,Vi(e),t.a):h(Bi,e,t.a)}}(e,t.o)):t}));var nt,rt=i((function(e,t){return x(e(t.a),t.b)})),ot=i((function(e,t){return{cp:e(t.cp),cF:t.cF,cx:t.cx}}));function st(e){for(var t={};e.b;e=e.b){var i=e.a,n=i.$,r=i.n,o=i.o;if("a2"!==n){var s=t[n]||(t[n]={});"a3"===n&&"class"===r?at(s,r,o):s[r]=o}else"className"===r?at(t,r,o):t[r]=o}return t}function at(e,t,i){var n=e[t];e[t]=n?n+" "+i:i}function lt(e,t){var i=e.$;if(5===i)return lt(e.k||(e.k=e.m()),t);if(0===i)return He.createTextNode(e.a);if(4===i){for(var n=e.k,r=e.j;4===n.$;)"object"!=typeof r?r=[r,n.j]:r.push(n.j),n=n.k;var o={j:r,p:t};return(s=lt(n,o)).elm_event_node_ref=o,s}if(3===i)return ct(s=e.h(e.g),t,e.d),s;var s=e.f?He.createElementNS(e.f,e.c):He.createElement(e.c);Be&&"a"==e.c&&s.addEventListener("click",Be(s)),ct(s,t,e.d);for(var a=e.e,l=0;l0&&_t(i,1,n,h));case 4:for(var d=e.j,u=t.j,g=!1,f=e.k;4===f.$;)g=!0,"object"!=typeof d?d=[d,f.j]:d.push(f.j),f=f.k;for(var p=t.k;4===p.$;)g=!0,"object"!=typeof u?u=[u,p.j]:u.push(p.j),p=p.k;return g&&d.length!==u.length?void _t(i,0,n,t):((g?function(e,t){for(var i=0;ia?_t(i,6,n,{v:a,i:s-a}):s0||s.length>0||E)&&_t(i,8,n,{w:r,x:s,y:E})}var xt="_elmW6BL";function St(e,t,i,n,r,o){var s=e[i];if(!s)return s={c:0,z:n,r,s:void 0},o.push({r,A:s}),void(e[i]=s);if(1===s.c){o.push({r,A:s}),s.c=2;var a=[];return vt(s.z,n,a,s.r),s.r=r,void(s.s.s={w:a,A:s})}St(e,t,i+xt,n,r,o)}function kt(e,t,i,n,r){var o=e[i];if(o){if(0===o.c){o.c=2;var s=[];return vt(n,o.z,s,r),void _t(t,9,r,{w:s,A:o})}kt(e,t,i+xt,n,r)}else{var a=_t(t,9,r,void 0);e[i]={c:1,z:n,r,s:a}}}function Lt(e,t,i,n){Nt(e,t,i,0,0,t.b,n)}function Nt(e,t,i,n,r,o,s){for(var a=i[n],l=a.r;l===r;){var c=a.$;if(1===c)Lt(e,t.k,a.s,s);else if(8===c)a.t=e,a.u=s,(h=a.s.w).length>0&&Nt(e,t,h,0,r,o,s);else if(9===c){a.t=e,a.u=s;var h,d=a.s;d&&(d.A.s=e,(h=d.w).length>0&&Nt(e,t,h,0,r,o,s))}else a.t=e,a.u=s;if(!(a=i[++n])||(l=a.r)>o)return n}var u=t.$;if(4===u){for(var g=t.k;4===g.$;)g=g.k;return Nt(e,g,i,n,r+1,o,e.elm_event_node_ref)}for(var f=t.e,p=e.childNodes,m=0;mo))return n;r=v}return n}function Et(e,t,i,n){return 0===i.length?e:(Lt(e,t,i,n),Dt(e,i))}function Dt(e,t){for(var i=0;i>e})),i((function(e,t){return t>>>e}));var Ft=D,Bt=_,Wt=(n((function(e,t,n){var r=n.c,o=n.d,s=i((function(t,i){if(t.$){var n=t.a;return d(Bt,e,i,n)}var r=t.a;return d(Bt,s,i,r)}));return d(Bt,s,d(Bt,e,t,o),r)})),n((function(e,t,i){for(;;){if(-2===i.$)return t;var n=i.b,r=i.c,o=i.d,s=i.e,a=e,l=d(e,n,r,d(Wt,e,t,s));e=a,t=l,i=o}}))),Vt=function(e){return d(Wt,n((function(e,t,i){return h(Ft,x(e,t),i)})),N,e)},zt=1,Ht=2,jt=0,Ut=function(e){return{$:1,a:e}},$t=i((function(e,t){return{$:3,a:e,b:t}})),Kt=i((function(e,t){return{$:0,a:e,b:t}})),qt=i((function(e,t){return{$:1,a:e,b:t}})),Gt=function(e){return{$:0,a:e}},Yt=function(e){return{$:2,a:e}},Zt=function(e){return{$:0,a:e}},Qt={$:1},Xt=j,Jt=k,ei=ae,ti=function(e){return e+""},ii=i((function(e,t){return h(z,e,T(t))})),ni=i((function(e,t){return A(h(V,e,t))})),ri=function(e){return h(ii,"\n ",h(ni,"\n",e))},oi=n((function(e,t,i){for(;;){if(!i.b)return t;var n=i.a,r=i.b,o=e,s=h(e,n,t);e=o,t=s,i=r}})),si=function(e){return d(oi,i((function(e,t){return t+1})),0,e)},ai=I,li=n((function(e,t,i){for(;;){if(!(w(e,t)<1))return i;var n=e,r=t-1,o=h(Ft,t,i);e=n,t=r,i=o}})),ci=i((function(e,t){return d(li,e,t,N)})),hi=i((function(e,t){return d(ai,e,h(ci,0,si(t)-1),t)})),di=function(e){var t=e.charCodeAt(0);return 55296<=t&&t<=56319?1024*(t-55296)+e.charCodeAt(1)-56320+65536:t},ui=function(e){var t=di(e);return 97<=t&&t<=122},gi=function(e){var t=di(e);return t<=90&&65<=t},fi=function(e){return ui(e)||gi(e)},pi=function(e){return ui(e)||gi(e)||function(e){var t=di(e);return t<=57&&48<=t}(e)},mi=function(e){return d(oi,Ft,N,e)},_i=i((function(e,t){return"\n\n("+ti(e+1)+") "+ri(vi(t))})),vi=function(e){return h(bi,e,N)},bi=i((function(e,t){e:for(;;)switch(e.$){case 0:var i=e.a,n=e.b,r=function(){var e,t,n=(t=(e=i).charCodeAt(0),isNaN(t)?Qt:Zt(55296<=t&&t<=56319?x(e[0]+e[1],e.slice(2)):x(e[0],e.slice(1))));if(1===n.$)return!1;var r=n.a,o=r.a,s=r.b;return fi(o)&&h(Xt,pi,s)}(),o=n,s=h(Ft,r?"."+i:"['"+i+"']",t);e=o,t=s;continue e;case 1:var a=e.a,l=(n=e.b,"["+ti(a)+"]");e=o=n,t=s=h(Ft,l,t);continue e;case 2:var c=e.a;if(c.b){if(c.b.b){var d=(t.b?"The Json.Decode.oneOf at json"+h(ii,"",mi(t)):"Json.Decode.oneOf")+" failed in the following "+ti(si(c))+" ways:";return h(ii,"\n\n",h(Ft,d,h(hi,_i,c)))}e=o=n=c.a,t=s=t;continue e}return"Ran into a Json.Decode.oneOf with no possibilities"+(t.b?" at json"+h(ii,"",mi(t)):"!");default:var u=e.a,g=e.b;return(d=t.b?"Problem with the value at json"+h(ii,"",mi(t))+":\n\n ":"Problem with the given value:\n\n")+ri(h(ei,4,g))+"\n\n"+u}})),yi=32,wi=r((function(e,t,i,n){return{$:0,a:e,b:t,c:i,d:n}})),Ci=[],xi=O,Si=i((function(e,t){return P(t)/P(e)})),ki=xi(h(Si,2,yi)),Li=u(wi,0,ki,Ci,Ci),Ni=p,Ei=(i((function(e,t){return e(t)})),i((function(e,t){return t(e)})),R),Di=function(e){return e.length},Ai=i((function(e,t){return w(e,t)>0?e:t})),Ti=m,Ii=i((function(e,t){for(;;){var i=h(Ti,yi,e),n=i.a,r=i.b,o=h(Ft,{$:0,a:n},t);if(!r.b)return mi(o);e=r,t=o}})),Mi=i((function(e,t){for(;;){var i=xi(t/yi);if(1===i)return h(Ti,yi,e).a;e=h(Ii,e,N),t=i}})),Oi=i((function(e,t){if(t.g){var i=t.g*yi,n=Ei(h(Si,yi,i-1)),r=e?mi(t.j):t.j,o=h(Mi,r,t.g);return u(wi,Di(t.i)+i,h(Ai,5,n*ki),o,t.i)}return u(wi,Di(t.i),ki,Ci,t.i)})),Ri=o((function(e,t,i,n,r){for(;;){if(t<0)return h(Oi,!1,{j:n,g:i/yi|0,i:r});var o={$:1,a:d(Ni,yi,t,e)};t-=yi,n=h(Ft,o,n)}})),Pi=i((function(e,t){if(e<=0)return Li;var i=e%yi,n=d(Ni,i,e-i,t);return g(Ri,t,e-i-yi,e,N,n)})),Fi=function(e){return!e.$},Bi=Q,Wi=X,Vi=function(e){return{$:0,a:e}},zi=function(e){switch(e.$){case 0:return 0;case 1:return 1;case 2:return 2;default:return 3}},Hi=function(e){return e},ji=s((function(e,t,i,n,r,o){return{bv:o,by:t,bJ:n,bL:i,bO:e,bP:r}})),Ui=U,$i=H,Ki=i((function(e,t){return e<1?t:d($i,e,t.length,t)})),qi=$,Gi=function(e){return""===e},Yi=i((function(e,t){return e<1?"":d($i,0,e,t)})),Zi=o((function(e,t,i,n,r){if(Gi(r)||h(Ui,"@",r))return Qt;var o=h(qi,":",r);if(o.b){if(o.b.b)return Qt;var s=o.a,a=function(e){for(var t=0,i=e.charCodeAt(0),n=43==i||45==i?1:0,r=n;r500?d(oi,e,t,mi(f)):u(nn,e,t,i+1,f)))))}return h(e,r,h(e,s,h(e,l,t)))}return h(e,r,h(e,s,t))}return h(e,r,t)}return t})),rn=n((function(e,t,i){return u(nn,e,t,0,i)})),on=i((function(e,t){return d(rn,i((function(t,i){return h(Ft,e(t),i)})),N,t)})),sn=ue,an=i((function(e,t){return h(sn,(function(t){return en(e(t))}),t)})),ln=n((function(e,t,i){return h(sn,(function(t){return h(sn,(function(i){return en(h(e,t,i))}),i)}),t)})),cn=ke,hn=i((function(e,t){var i=t;return pe(h(sn,cn(e),i))})),dn=n((function(e,t,i){return h(an,(function(e){return 0}),(n=h(on,hn(e),t),d(rn,ln(Ft),en(N),n)));var n})),un=n((function(e,t,i){return en(0)})),gn=i((function(e,t){return h(an,e,t)}));xe.Task={b:tn,c:dn,d:un,e:gn,f:undefined};var fn,pn,mn,_n=Le("Task"),vn=i((function(e,t){return _n(h(an,e,t))})),bn=It,yn={bB:'{\n "name": "Bill"\n}',bE:'version: "1"\nmasking:\n - selector:\n jsonpath: "name"\n mask:\n randomChoiceInUri: "pimo://nameFR"\n '},wn=Ne,Cn=wn(N),xn=G,Sn=function(e){return{$:3,a:e}},kn=function(e){return{$:2,a:e}},Ln=Ne,Nn=q,En=Fe("errorUpdater",Nn),Dn=Fe("flowUpdater",Nn),An=Fe("inputUpdater",xn),Tn=function(e){return{$:6,a:e}},In=J,Mn=function(e){var t=h(In,xn,e);if(t.$){var i=t.a;return Tn(vi(i))}var n=t.a;return Tn(n)},On=function(e){var t=h(In,xn,e);if(t.$){var i=t.a;return Tn(vi(i))}return{$:1,a:t.a}},Rn=function(e){return{$:4,a:e}},Pn=i((function(e,t){return{bB:t,bE:e}})),Fn=Y,Bn=d(Wi,Pn,h(Fn,"masking",xn),h(Fn,"input",xn)),Wn=function(e){var t=h(In,Bn,e);if(t.$){var i=t.a;return Tn(vi(i))}var n=t.a;return Rn(n)},Vn=function(e){var t=h(In,xn,e);if(t.$){var i=t.a;return Tn(vi(i))}return{$:0,a:t.a}},zn=Fe("maskingAndinputUpdater",Nn),Hn=Fe("maskingUpdater",xn),jn=Fe("outputUpdater",Nn),Un=i((function(e,t){return S(e,{bB:t})})),$n=i((function(e,t){return S(e,{bE:t})})),Kn=i((function(e,t){return S(e,{I:t})})),qn=le,Gn=Oe("pimoMask",(function(e){return t=A([x("input",qn(e.bB)),x("masking",qn(e.bE))]),d(oi,i((function(e,t){var i=e.a,n=e.b;return d(ce,i,n,t)})),{},t);var t})),Yn=function(e){return wn(A([Gn(e)]))},Zn=Oe("updateFlow",qn),Qn=Oe("updateInputEditor",qn),Xn=Oe("updateMaskingEditor",qn),Jn=Oe("updateOutputEditor",qn),er=i((function(e,t){switch(e.$){case 3:var i=e.a;return x(a=S(t,{ah:"",v:h(Un,t.v,i),I:1}),Yn(a.v));case 2:var n=e.a;return x(a=S(t,{ah:"",v:h($n,t.v,n),I:1}),Yn(a.v));case 5:return x(a=h(Kn,t,1),Yn(a.v));case 0:var r=e.a;return x(S(t,{au:"",ah:r,I:0}),Jn(r));case 1:var o=e.a,s=1===t.aP?Zn(o):Cn;return x(S(t,{au:"",a3:o,I:0}),s);case 4:var a,l=e.a;return x(a=S(t,{ah:"",v:l,I:1}),wn(A([Jn(a.ah),Xn(l.bE),Qn(l.bB),Yn(a.v)])));case 7:var c=e.a;return s=1===c?Zn(t.a3):Cn,x(S(t,{aP:c}),s);default:return x(S(t,{au:e.a,I:0}),Cn)}})),tr=n((function(e,t,i){return{$:0,a:e,b:t,c:i}})),ir=i((function(e,t){return h(Xe,function(e){return et.test(e)?"data-"+e:e}(e),function(e){return tt.test(e)?"":e}(t))})),nr=i((function(e,t){for(;;){if(!t.b)return!1;var i=t.a,n=t.b;if(e(i))return!0;t=n}})),rr=n((function(e,t,i){return e(t(i))})),or=function(e){return!e},sr=i((function(e,t){return!h(nr,h(rr,or,e),t)})),ar=o((function(e,t,i,n,r){return{$:-1,a:e,b:t,c:i,d:n,e:r}})),lr={$:-2},cr=o((function(e,t,i,n,r){if(-1!==r.$||r.a){if(-1!==n.$||n.a||-1!==n.d.$||n.d.a)return g(ar,e,t,i,n,r);n.a,p=n.b,m=n.c;var o=n.d,s=(o.a,o.b),a=o.c,l=o.d,c=o.e;return v=n.e,g(ar,0,p,m,g(ar,1,s,a,l,c),g(ar,1,t,i,v,r))}r.a;var h=r.b,d=r.c,u=r.d,f=r.e;if(-1!==n.$||n.a)return g(ar,e,h,d,g(ar,0,t,i,n,u),f);n.a;var p=n.b,m=n.c,_=n.d,v=n.e;return g(ar,0,t,i,g(ar,1,p,m,_,v),g(ar,1,h,d,u,f))})),hr=C,dr=n((function(e,t,i){if(-2===i.$)return g(ar,0,e,t,lr,lr);var n=i.a,r=i.b,o=i.c,s=i.d,a=i.e;switch(h(hr,e,r)){case 0:return g(cr,n,r,o,d(dr,e,t,s),a);case 1:return g(ar,n,r,t,s,a);default:return g(cr,n,r,o,s,d(dr,e,t,a))}})),ur=n((function(e,t,i){var n=d(dr,e,t,i);if(-1!==n.$||n.a)return n;n.a;var r=n.b,o=n.c,s=n.d,a=n.e;return g(ar,1,r,o,s,a)})),gr=function(e){return!e.b},fr=i((function(e,t){var i=t.a,n=t.b;switch(e.$){case 0:var r=e.a.c;return gr(r)?x(i,n):x(i,h(Ft,e,n));case 1:var o=e.b;return h(sr,(function(e){var t=e.c;return gr(t)}),o)?x(i,n):x(i,h(Ft,e,n));case 2:var s=e.b;return gr(s)?x(i,n):x(i,h(Ft,e,n));case 3:return x(i,h(Ft,e,n));case 4:case 5:case 7:case 8:return r=e.a,gr(r)?x(i,n):x(i,h(Ft,e,n));case 6:var a=e.a;return Gi(a.cf)?x(i,n):x(d(ur,a.cs,a.cf,i),n);default:var l=e.a;return h(sr,(function(e){var t=e.b;return gr(t)}),l)?x(i,n):x(i,h(Ft,e,n))}})),pr=lr,mr=function(e){return{$:6,a:e}},_r=i((function(e,t){return t.b?d(rn,Ft,t,e):e})),vr=i((function(e,t){return h(_r,h(on,(function(e){var t=e.a,i=e.b;return mr({cf:i,cs:t})}),Vt(e)),t)})),br=function(e){var t=d(rn,fr,x(pr,N),e),i=t.a,n=t.b;return h(vr,i,n)},yr=i((function(e,t){if(t.$)return Qt;var i=t.a;return Zt(e(i))})),wr=i((function(e,t){return t.$?e:t.a})),Cr=r((function(e,t,i,n){e:for(;;){if(i.b){if(i.b.b){l=i.a;var r=e,o=t,s=i.b,a=n+(e(l)+(t+""));e=r,t=o,i=s,n=a;continue e}var l;return n+(e(l=i.a)+"")}return n}})),xr=n((function(e,t,i){return u(Cr,e,t,i,"")})),Sr=function(e){return"("+e.bt+h(wr,"",h(yr,Jt(": "),e.A))+")"},kr=function(e){var t=n((function(e,t,i){return e+" "+h(ii," and ",h(Ft,function(e){switch(e){case 0:return"print";case 1:return"screen";default:return"speech"}}(t),h(on,Sr,i)))}));switch(e.$){case 0:var i=e.a;return d(xr,Sr," and ",i);case 1:return d(t,"only",e.a,i=e.b);case 2:return d(t,"not",e.a,i=e.b);default:return e.a}},Lr=i((function(e,t){return'@import "'+e+kr(t)+'"'})),Nr=function(e){var t=e.a,i=e.b;return d(xr,Lr(t),"\n",i)},Er=function(e){return"@namespace "+e.a+'"'+e.b+'"'},Dr=B,Ar=function(e){return"::"+e},Tr=function(e){switch(e.$){case 0:return"."+e.a;case 1:return"#"+e.a;case 2:return":"+e.a;default:return"["+e.a+"]"}},Ir=function(e){switch(e.$){case 0:var t=e.a,i=e.b;return L(t,d(xr,Tr,"",i));case 1:return i=e.a,gr(i)?"*":d(xr,Tr,"",i);default:return t=e.a,i=e.b,L(t,d(xr,Tr,"",i))}},Mr=function(e){var t=e.a,i=e.b;return function(e){switch(e){case 0:return"+";case 1:return"~";case 2:return">";default:return""}}(t)+" "+Ir(i)},Or=function(e){var t=e.a,i=e.b,n=e.c,r=h(Ft,Ir(t),h(on,Mr,i)),o=h(wr,"",h(yr,Ar,n));return h(Dr,h(ii," ",r),o)},Rr=function(e){var t=e.a,i=e.b,n=e.c;return d(xr,Or,",",h(Ft,t,i))+"{"+function(e){return d(xr,(function(e){return e+";"}),"",e)}(n)+"}"},Pr=function(e){switch(e.$){case 0:var t=e.a;return Rr(t);case 1:var i=e.a,n=e.b;return"@media "+d(xr,kr,", ",i)+"{"+d(xr,Rr,"\n",n)+"}";case 2:case 3:case 4:case 5:case 7:case 8:default:return"TODO";case 6:return"@keyframes "+e.a.cs+"{"+e.a.cf+"}"}},Fr=function(e){return d(rn,_r,N,e)},Br=i((function(e,t){return Fr(h(on,e,t))})),Wr=function(e){return{$:8,a:e}},Vr=function(e){return{$:5,a:e}},zr=function(e){return{$:4,a:e}},Hr=n((function(e,t,i){return{$:0,a:e,b:t,c:i}})),jr=n((function(e,t,i){return{$:0,a:e,b:t,c:i}})),Ur=function(e){return{$:0,a:e}},$r=i((function(e,t){return{$:2,a:e,b:t}})),Kr=function(e){return{$:7,a:e}},qr=i((function(e,t){return{$:1,a:e,b:t}})),Gr=i((function(e,t){if(t.b){if(t.b.b){var i=t.a,n=t.b;return h(Ft,i,h(Gr,e,n))}return A([e(t.a)])}return t})),Yr=i((function(e,t){var i=t.a,n=t.b,r=t.c;return d(jr,i,n,L(r,A([e])))})),Zr=i((function(e,t){if(!t.b)return t;if(t.b.b){var i=t.a,n=t.b;return h(Ft,i,h(Zr,e,n))}switch(t.a.$){case 0:var r=t.a.a;return A([Ur(h(Yr,e,r))]);case 1:var o=t.a,s=o.a,a=o.b;return A([h(qr,s,h(Gr,Yr(e),a))]);default:return t}})),Qr=i((function(e,t){if(t.b.b){var i=t.a,n=t.b,r=(a=t.c,h(on,e,n)),o=e(i);return A([d(jr,i,n,a),d(jr,o,r,N)])}var s=t.a,a=t.c;return A([d(jr,s,N,a),d(jr,e(s),N,N)])})),Xr=i((function(e,t){var i=t.a,n=t.b;return d(Hr,i,n,Zt(e))})),Jr=i((function(e,t){return h(Qr,Xr(e),t)})),eo=i((function(e,t){return{$:2,a:e,b:t}})),to=i((function(e,t){return{$:0,a:e,b:t}})),io=function(e){return{$:1,a:e}},no=i((function(e,t){switch(t.$){case 0:var i=t.a,n=t.b;return h(to,i,L(n,A([e])));case 1:return n=t.a,io(L(n,A([e])));default:var r=t.a;return n=t.b,h(eo,r,L(n,A([e])))}})),ro=i((function(e,t){if(t.b){if(t.b.b){var i=t.a,n=t.b;return h(Ft,i,h(ro,e,n))}var r=t.a,o=r.a,s=r.b;return A([x(o,h(no,e,s))])}return N})),oo=i((function(e,t){if(t.b.b){var i=t.a,n=t.b;return o=t.c,d(Hr,i,h(ro,e,n),o)}var r=t.a,o=t.c;return d(Hr,h(no,e,r),N,o)})),so=i((function(e,t){return h(Qr,oo(e),t)})),ao=function(e){e:for(;;){if(e.b){if(e.a.$){e=r=e.b;continue e}var t=e.a.a,i=t.a,n=t.b,r=e.b;return L(h(Ft,i,n),ao(r))}return N}},lo=o((function(e,t,i,n,r){return{$:3,a:e,b:t,c:i,d:n,e:r}})),co=i((function(e,t){e:for(;;){if(!t.b)return t;if(t.b.b)break e;switch(t.a.$){case 0:var i=t.a.a;return h(on,Ur,e(i));case 1:if(t.a.b.b){if(t.a.b.b.b){var n=t.a,r=(f=n.a,n.b),o=r.a,s=r.b,a=h(co,e,A([h(qr,f,s)]));if(a.b&&1===a.a.$&&!a.b.b){var l=a.a,c=l.a,d=l.b;return A([h(qr,c,h(Ft,o,d))])}return a}var g=t.a,f=g.a;return i=g.b.a,A([h(qr,f,e(i))])}break e;case 2:var p=t.a,m=p.a,_=p.b;return A([h($r,m,h(co,e,_))]);case 3:var v=t.a,b=v.a,y=v.b,w=v.c,C=v.d;return i=v.e,h(on,u(lo,b,y,w,C),e(i));default:return t}}return o=t.a,s=t.b,h(Ft,o,h(co,e,s))})),ho=F,uo=r((function(e,t,i,n){return{Y:n,ac:i,R:t,aj:e}})),go=3432918353,fo=461845907,po=i((function(e,t){return(65535&t)*e+(((t>>>16)*e&65535)<<16)})),mo=i((function(e,t){return t<>>32-e})),_o=W,vo=i((function(e,t){return h(po,5,h(mo,13,e^h(po,fo,h(mo,15,h(po,go,t)))))+3864292196})),bo=i((function(e,t){var i=t.ac|(255&di(e))<>>16),((o=h(po,3266489909,r^r>>>13))^o>>>16)>>>0;var i,n,r,o})),wo=M,Co=function(e){e:for(;;)switch(e){case 0:return"0";case 1:return"1";case 2:return"2";case 3:return"3";case 4:return"4";case 5:return"5";case 6:return"6";case 7:return"7";case 8:return"8";case 9:return"9";case 10:return"a";case 11:return"b";case 12:return"c";case 13:return"d";case 14:return"e";case 15:return"f";default:continue e}},xo=i((function(e,t){for(;;){if(t<16)return h(Ft,Co(t),e);e=h(Ft,Co(h(wo,16,t)),e),t=t/16|0}})),So=function(e){return h(ho,"_",(t=h(yo,15739,e),T(t<0?h(Ft,"-",h(xo,N,-t)):h(xo,N,t)).join("")));var t},ko=function(e){e:for(;;){if(e.b){if(e.b.b){e=e.b;continue e}var t=e.a;return Zt(A([t]))}return Qt}},Lo=function(e){var t,i=function(e){if(e.b){var t=e.a,n=e.b;return h(Ft,t,i(n))}return N};return A([(t=i(e),{$:9,a:t})])},No=function(e){return A([e])},Eo=i((function(e,t){if(t.$)return t;var i=t.a;return h(qr,e,A([i]))})),Do=n((function(e,t,i){for(;;){if(e<=0)return i;if(!t.b)return i;var n=t.a;e-=1,t=t.b,i=h(Ft,n,i)}})),Ao=i((function(e,t){return mi(d(Do,e,t,N))})),To=n((function(e,t,i){if(t<=0)return N;var n=x(t,i);e:for(;;){t:for(;;){if(!n.b.b)return i;if(!n.b.b.b){if(1===n.a)break e;break t}switch(n.a){case 1:break e;case 2:var r=n.b;return A([s=r.a,u=r.b.a]);case 3:if(n.b.b.b.b){var o=n.b,s=o.a,a=o.b;return A([s,u=a.a,f=a.b.a])}break t;default:if(n.b.b.b.b&&n.b.b.b.b.b){var l=n.b,c=(s=l.a,l.b),u=c.a,g=c.b,f=g.a,p=g.b,m=p.a,_=p.b;return h(Ft,s,h(Ft,u,h(Ft,f,h(Ft,m,e>1e3?h(Ao,t-4,_):d(To,e+1,t-4,_)))))}break t}}return i}return A([s=n.b.a])})),Io=i((function(e,t){return d(To,0,e,t)})),Mo=o((function(e,t,i,n,r){if(r.$)return r;var o=r.a;return g(lo,e,t,i,n,o)})),Oo=i((function(e,t){switch(t.$){case 0:var i=t.a;return h(qr,e,A([i]));case 1:var n=t.a,r=t.b;return h(qr,L(e,n),r);case 2:var o=t.a,s=t.b;return h($r,o,h(on,Oo(e),s));case 3:var a=t.a,l=t.b,c=t.c,d=t.d;return i=t.e,g(lo,a,l,c,d,i);default:return t}})),Ro=function(e){return e},Po=r((function(e,t,i,n){var r=function(e){return h(wr,N,function(e){if(e.b){e.a;var t=e.b;return Zt(t)}return Qt}(e))},o=h(Fo,t,h(wr,N,ko(n))),s=function(){var e=x(function(e){if(e.b){var t=e.a;return e.b,Zt(t)}return Qt}(o),function(e){e:for(;;){if(e.b){if(e.b.b){e=e.b;continue e}var t=e.a;return Zt(t)}return Qt}}(n));if(e.a.$||e.b.$)return n;var t=e.a.a,i=e.b.a;return L(h(Io,si(n)-1,n),A([b(i,t)?i:t]))}();return L(s,L(r(h(wr,N,h(yr,(function(t){return Fr(h(Gr,Fo(e),h(on,No,h(co,i,t))))}),ko(n)))),r(o)))})),Fo=i((function(e,t){if(!e.b)return t;switch(e.a.$){case 0:var n=e.a.a,r=e.b;return h(Fo,r,h(Zr,n,t));case 1:var o=e.a,s=o.a,a=o.b;return r=e.b,u(Po,a,r,so(s),t);case 2:var l=e.a,c=l.a,g=l.b,f=(r=e.b,i((function(e,t){var i=e.a,n=e.b,r=e.c,o=t.a,s=t.b,a=t.c;return d(Hr,i,L(n,h(Ft,x(c,o),s)),function(e){e:for(;;){if(e.b){var t=e.a,i=e.b;if(1===t.$){e=i;continue e}return t}return Qt}}(A([a,r])))})));return Fr(L(A([h(Fo,r,t)]),h(on,(function(e){switch(e.$){case 0:var i=e.a,n=i.a,r=i.b,o=i.c,s=h(Br,(function(e){return h(on,f(e),h(Ft,n,r))}),ao(t)),a=function(){if(s.b){var e=s.a,t=s.b;return A([Ur(d(jr,e,t,N))])}return N}();return h(Fo,o,a);case 1:var l=e.a,c=e.b;return h(Vo,l,c);case 2:var g=e.a,p=e.b;return h(zo,g,p);case 3:var m=e.a,_=e.b,v=e.c,b=e.d,y=e.e;return h(on,u(Mo,m,_,v,b),Bo(y));case 4:var w=e.a;return A([zr(w)]);case 5:return w=e.a,A([Vr(w)]);case 6:return w=e.a,A([Kr(w)]);case 7:return w=e.a,A([Wr(w)]);default:var C=e.a;return Lo(C)}}),h(Br,Ro,g))));case 3:var p=e.a,m=p.a;return a=p.b,r=e.b,u(Po,a,r,Jr(m),t);case 5:var _=e.a.a,v=(r=e.b,So(_)),b=h(Fo,r,h(Zr,"animation-name:"+v,t));return h(_r,b,A([mr({cf:_,cs:v})]));case 4:var y=e.a,w=y.a,C=(a=y.b,r=e.b,function(){var e=ao(t);if(e.b){var i=e.a,n=e.b;return h(on,Eo(w),h(Fo,a,No(Ur(d(jr,i,n,N)))))}return N}());return L(h(Fo,r,t),C);default:var S=e.a.a;return r=e.b,h(Fo,L(S,r),t)}})),Bo=function(e){var t=e.a,i=e.b,n=e.c;return h(Fo,n,A([Ur(d(jr,t,i,N))]))},Wo=function(e){if(e.b){var t=e.a,i=e.b;return L(Ho(t),Wo(i))}return N},Vo=i((function(e,t){return h(Br,(function(t){return h(on,Oo(e),Bo(t))}),t)})),zo=i((function(e,t){var i=Wo(h(Br,Ro,t));return A([h($r,e,i)])})),Ho=function(e){switch(e.$){case 0:var t=e.a;return Bo(t);case 1:var i=e.a,n=e.b;return h(Vo,i,n);case 2:var r=e.a,o=e.b;return h(zo,r,o);case 3:var s=e.a,a=e.b,l=e.c,c=e.d;return t=e.e,h(on,u(Mo,s,a,l,c),Bo(t));case 4:var d=e.a;return A([zr(d)]);case 5:return d=e.a,A([Vr(d)]);case 6:return d=e.a,A([Kr(d)]);case 7:return d=e.a,A([Wr(d)]);default:var g=e.a;return Lo(g)}},jo=function(e){return function(e){var t=e.bo,i=e.bz,n=e.bG,r=e.cg;return function(e){return h(wr,"",h(yr,(function(e){return'@charset "'+e+'"'}),e))}(t)+(d(xr,Nr,"\n",i)+(d(xr,Er,"\n",n)+(d(xr,Pr,"\n",r)+"")))}(function(e){var t=e.bz,i=e.bG;return{bo:e.bo,cg:br(e.cg),bz:t,bG:i}}((i=(t=e).bo,n=t.bz,r=t.bG,o=t.bX,{bo:i,cg:Wo(h(Br,Ro,o)),bz:n,bG:r})));var t,i,n,r,o},Uo=n((function(e,t,i){return{$:0,a:e,b:t,c:i}})),$o=i((function(e,t){var i,n=d(Hr,t,N,Qt);return A([(i=d(Uo,n,N,e),{$:0,a:i})])})),Ko=function(e){return{bo:Qt,bz:N,bG:N,bX:e}},qo=io(A([("",{$:0,a:""})])),Go=function(e){return e.b?jo(Ko(A([h($o,e,qo)]))):""},Yo=function(e){var t=Go(e),i=h(ir,"","");return d(tr,i,!0,t)},Zo=n((function(e,t,i){return{$:0,a:e,b:t,c:i}})),Qo=Zo,Xo=Qo("div"),Jo=i((function(e,t){return function(e){return{$:0,a:e}}(e+":"+t)})),es=h(Jo,"display","flex"),ts=h(Jo,"flex-direction","column"),is=h(Jo,"flex","none"),ns=h(Jo,"font-family",'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"'),rs=h(Jo,"gap","1rem"),os=h(Jo,"gap","2rem"),ss=function(e){return Ke(it(e))},as=Ue,ls=function(e){return{$:4,a:e}},cs=ls,hs=i((function(e,t){return h($o,t,h(eo,e,N))})),ds=A([h(hs,"*,\n::before,\n::after",A([h(Jo,"box-sizing","border-box"),h(Jo,"border-width","0"),h(Jo,"border-style","solid"),h(Jo,"border-color","#e5e7eb")])),h(hs,"::before,\n::after",A([h(Jo,"--tw-content","''")])),h(hs,"html",A([h(Jo,"line-height","1.5"),h(Jo,"-webkit-text-size-adjust","100%"),h(Jo,"-moz-tab-size","4"),h(Jo,"tab-size","4"),h(Jo,"font-family",'ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"')])),h(hs,"body",A([h(Jo,"margin","0"),h(Jo,"line-height","inherit")])),h(hs,"hr",A([h(Jo,"height","0"),h(Jo,"color","inherit"),h(Jo,"border-top-width","1px")])),h(hs,"abbr:where([title])",A([h(Jo,"text-decoration","underline dotted")])),h(hs,"h1,\nh2,\nh3,\nh4,\nh5,\nh6",A([h(Jo,"font-size","inherit"),h(Jo,"font-weight","inherit")])),h(hs,"a",A([h(Jo,"color","inherit"),h(Jo,"text-decoration","inherit")])),h(hs,"b,\nstrong",A([h(Jo,"font-weight","bolder")])),h(hs,"code,\nkbd,\nsamp,\npre",A([h(Jo,"font-family",'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace'),h(Jo,"font-size","1em")])),h(hs,"small",A([h(Jo,"font-size","80%")])),h(hs,"sub,\nsup",A([h(Jo,"font-size","75%"),h(Jo,"line-height","0"),h(Jo,"position","relative"),h(Jo,"vertical-align","baseline")])),h(hs,"sub",A([h(Jo,"bottom","-0.25em")])),h(hs,"sup",A([h(Jo,"top","-0.5em")])),h(hs,"table",A([h(Jo,"text-indent","0"),h(Jo,"border-color","inherit"),h(Jo,"border-collapse","collapse")])),h(hs,"button,\ninput,\noptgroup,\nselect,\ntextarea",A([h(Jo,"font-family","inherit"),h(Jo,"font-size","100%"),h(Jo,"font-weight","inherit"),h(Jo,"line-height","inherit"),h(Jo,"color","inherit"),h(Jo,"margin","0"),h(Jo,"padding","0")])),h(hs,"button,\nselect",A([h(Jo,"text-transform","none")])),h(hs,"button,\n[type='button'],\n[type='reset'],\n[type='submit']",A([h(Jo,"-webkit-appearance","button"),h(Jo,"background-color","transparent"),h(Jo,"background-image","none")])),h(hs,":-moz-focusring",A([h(Jo,"outline","auto")])),h(hs,":-moz-ui-invalid",A([h(Jo,"box-shadow","none")])),h(hs,"progress",A([h(Jo,"vertical-align","baseline")])),h(hs,"::-webkit-inner-spin-button,\n::-webkit-outer-spin-button",A([h(Jo,"height","auto")])),h(hs,"[type='search']",A([h(Jo,"-webkit-appearance","textfield"),h(Jo,"outline-offset","-2px")])),h(hs,"::-webkit-search-decoration",A([h(Jo,"-webkit-appearance","none")])),h(hs,"::-webkit-file-upload-button",A([h(Jo,"-webkit-appearance","button"),h(Jo,"font","inherit")])),h(hs,"summary",A([h(Jo,"display","list-item")])),h(hs,"blockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre",A([h(Jo,"margin","0")])),h(hs,"fieldset",A([h(Jo,"margin","0"),h(Jo,"padding","0")])),h(hs,"legend",A([h(Jo,"padding","0")])),h(hs,"ol,\nul,\nmenu",A([h(Jo,"list-style","none"),h(Jo,"margin","0"),h(Jo,"padding","0")])),h(hs,"textarea",A([h(Jo,"resize","vertical")])),h(hs,"input::placeholder,\ntextarea::placeholder",A([h(Jo,"opacity","1"),h(Jo,"color","#9ca3af")])),h(hs,'button,\n[role="button"]',A([h(Jo,"cursor","pointer")])),h(hs,":disabled",A([h(Jo,"cursor","default")])),h(hs,"img,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject",A([h(Jo,"display","block"),h(Jo,"vertical-align","middle")])),h(hs,"img,\nvideo",A([h(Jo,"max-width","100%"),h(Jo,"height","auto")])),h(hs,"[type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select",A([h(Jo,"appearance","none"),h(Jo,"background-color","#fff"),h(Jo,"border-color","#6b7280"),h(Jo,"border-width","1px"),h(Jo,"border-radius","0px"),h(Jo,"padding-top","0.5rem"),h(Jo,"padding-right","0.75rem"),h(Jo,"padding-bottom","0.5rem"),h(Jo,"padding-left","0.75rem"),h(Jo,"font-size","1rem"),h(Jo,"line-height","1.5rem"),h(Jo,"--tw-shadow","0 0 #0000")])),h(hs,"[type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus",A([h(Jo,"outline","2px solid transparent"),h(Jo,"outline-offset","2px"),h(Jo,"--tw-ring-inset","var(--tw-empty,/*!*/ /*!*/)"),h(Jo,"--tw-ring-offset-width","0px"),h(Jo,"--tw-ring-offset-color","#fff"),h(Jo,"--tw-ring-color","#2563eb"),h(Jo,"--tw-ring-offset-shadow","var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)"),h(Jo,"--tw-ring-shadow","var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color)"),h(Jo,"box-shadow","var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)"),h(Jo,"border-color","#2563eb")])),h(hs,"input::placeholder,textarea::placeholder",A([h(Jo,"color","#6b7280"),h(Jo,"opacity","1")])),h(hs,"::-webkit-datetime-edit-fields-wrapper",A([h(Jo,"padding","0")])),h(hs,"::-webkit-date-and-time-value",A([h(Jo,"min-height","1.5em")])),h(hs,"::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field",A([h(Jo,"padding-top","0"),h(Jo,"padding-bottom","0")])),h(hs,"select",A([h(Jo,"background-image","url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e\")"),h(Jo,"background-position","right 0.5rem center"),h(Jo,"background-repeat","no-repeat"),h(Jo,"background-size","1.5em 1.5em"),h(Jo,"padding-right","2.5rem"),h(Jo,"print-color-adjust","exact")])),h(hs,"[multiple]",A([h(Jo,"background-image","initial"),h(Jo,"background-position","initial"),h(Jo,"background-repeat","unset"),h(Jo,"background-size","initial"),h(Jo,"padding-right","0.75rem"),h(Jo,"print-color-adjust","unset")])),h(hs,"[type='checkbox'],[type='radio']",A([h(Jo,"appearance","none"),h(Jo,"padding","0"),h(Jo,"print-color-adjust","exact"),h(Jo,"display","inline-block"),h(Jo,"vertical-align","middle"),h(Jo,"background-origin","border-box"),h(Jo,"user-select","none"),h(Jo,"flex-shrink","0"),h(Jo,"height","1rem"),h(Jo,"width","1rem"),h(Jo,"color","#2563eb"),h(Jo,"background-color","#fff"),h(Jo,"border-color","#6b7280"),h(Jo,"border-width","1px"),h(Jo,"--tw-shadow","0 0 #0000")])),h(hs,"[type='checkbox']",A([h(Jo,"border-radius","0px")])),h(hs,"[type='radio']",A([h(Jo,"border-radius","100%")])),h(hs,"[type='checkbox']:focus,[type='radio']:focus",A([h(Jo,"outline","2px solid transparent"),h(Jo,"outline-offset","2px"),h(Jo,"--tw-ring-inset","var(--tw-empty,/*!*/ /*!*/)"),h(Jo,"--tw-ring-offset-width","2px"),h(Jo,"--tw-ring-offset-color","#fff"),h(Jo,"--tw-ring-color","#2563eb"),h(Jo,"--tw-ring-offset-shadow","var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)"),h(Jo,"--tw-ring-shadow","var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color)"),h(Jo,"box-shadow","var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)")])),h(hs,"[type='checkbox']:checked,[type='radio']:checked",A([h(Jo,"border-color","transparent"),h(Jo,"background-color","currentColor"),h(Jo,"background-size","100% 100%"),h(Jo,"background-position","center"),h(Jo,"background-repeat","no-repeat")])),h(hs,"[type='checkbox']:checked",A([h(Jo,"background-image","url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e\")")])),h(hs,"[type='radio']:checked",A([h(Jo,"background-image","url(\"data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e\")")])),h(hs,"[type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus",A([h(Jo,"border-color","transparent"),h(Jo,"background-color","currentColor")])),h(hs,"[type='checkbox']:indeterminate",A([h(Jo,"background-image","url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e\")"),h(Jo,"border-color","transparent"),h(Jo,"background-color","currentColor"),h(Jo,"background-size","100% 100%"),h(Jo,"background-position","center"),h(Jo,"background-repeat","no-repeat")])),h(hs,"[type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus",A([h(Jo,"border-color","transparent"),h(Jo,"background-color","currentColor")])),h(hs,"[type='file']",A([h(Jo,"background","unset"),h(Jo,"border-color","inherit"),h(Jo,"border-width","0"),h(Jo,"border-radius","0"),h(Jo,"padding","0"),h(Jo,"font-size","unset"),h(Jo,"line-height","inherit")])),h(hs,"[type='file']:focus",A([h(Jo,"outline","1px solid ButtonText"),h(Jo,"outline","1px auto -webkit-focus-ring-color")])),h(hs,"*, ::before, ::after",A([h(Jo,"--tw-border-spacing-x","0"),h(Jo,"--tw-border-spacing-y","0"),h(Jo,"--tw-translate-x","0"),h(Jo,"--tw-translate-y","0"),h(Jo,"--tw-rotate","0"),h(Jo,"--tw-skew-x","0"),h(Jo,"--tw-skew-y","0"),h(Jo,"--tw-scale-x","1"),h(Jo,"--tw-scale-y","1"),h(Jo,"--tw-pan-x"," "),h(Jo,"--tw-pan-y"," "),h(Jo,"--tw-pinch-zoom"," "),h(Jo,"--tw-scroll-snap-strictness","proximity"),h(Jo,"--tw-ordinal"," "),h(Jo,"--tw-slashed-zero"," "),h(Jo,"--tw-numeric-figure"," "),h(Jo,"--tw-numeric-spacing"," "),h(Jo,"--tw-numeric-fraction"," "),h(Jo,"--tw-ring-inset"," "),h(Jo,"--tw-ring-offset-width","0px"),h(Jo,"--tw-ring-offset-color","#fff"),h(Jo,"--tw-ring-color","rgb(59 130 246 / 0.5)"),h(Jo,"--tw-ring-offset-shadow","0 0 #0000"),h(Jo,"--tw-ring-shadow","0 0 #0000"),h(Jo,"--tw-shadow","0 0 #0000"),h(Jo,"--tw-shadow-colored","0 0 #0000"),h(Jo,"--tw-blur"," "),h(Jo,"--tw-brightness"," "),h(Jo,"--tw-contrast"," "),h(Jo,"--tw-grayscale"," "),h(Jo,"--tw-hue-rotate"," "),h(Jo,"--tw-invert"," "),h(Jo,"--tw-saturate"," "),h(Jo,"--tw-sepia"," "),h(Jo,"--tw-drop-shadow"," "),h(Jo,"--tw-backdrop-blur"," "),h(Jo,"--tw-backdrop-brightness"," "),h(Jo,"--tw-backdrop-contrast"," "),h(Jo,"--tw-backdrop-grayscale"," "),h(Jo,"--tw-backdrop-hue-rotate"," "),h(Jo,"--tw-backdrop-invert"," "),h(Jo,"--tw-backdrop-opacity"," "),h(Jo,"--tw-backdrop-saturate"," "),h(Jo,"--tw-backdrop-sepia"," ")])),h(hs,"::backdrop",A([h(Jo,"--tw-border-spacing-x","0"),h(Jo,"--tw-border-spacing-y","0"),h(Jo,"--tw-translate-x","0"),h(Jo,"--tw-translate-y","0"),h(Jo,"--tw-rotate","0"),h(Jo,"--tw-skew-x","0"),h(Jo,"--tw-skew-y","0"),h(Jo,"--tw-scale-x","1"),h(Jo,"--tw-scale-y","1"),h(Jo,"--tw-pan-x"," "),h(Jo,"--tw-pan-y"," "),h(Jo,"--tw-pinch-zoom"," "),h(Jo,"--tw-scroll-snap-strictness","proximity"),h(Jo,"--tw-ordinal"," "),h(Jo,"--tw-slashed-zero"," "),h(Jo,"--tw-numeric-figure"," "),h(Jo,"--tw-numeric-spacing"," "),h(Jo,"--tw-numeric-fraction"," "),h(Jo,"--tw-ring-inset"," "),h(Jo,"--tw-ring-offset-width","0px"),h(Jo,"--tw-ring-offset-color","#fff"),h(Jo,"--tw-ring-color","rgb(59 130 246 / 0.5)"),h(Jo,"--tw-ring-offset-shadow","0 0 #0000"),h(Jo,"--tw-ring-shadow","0 0 #0000"),h(Jo,"--tw-shadow","0 0 #0000"),h(Jo,"--tw-shadow-colored","0 0 #0000"),h(Jo,"--tw-blur"," "),h(Jo,"--tw-brightness"," "),h(Jo,"--tw-contrast"," "),h(Jo,"--tw-grayscale"," "),h(Jo,"--tw-hue-rotate"," "),h(Jo,"--tw-invert"," "),h(Jo,"--tw-saturate"," "),h(Jo,"--tw-sepia"," "),h(Jo,"--tw-drop-shadow"," "),h(Jo,"--tw-backdrop-blur"," "),h(Jo,"--tw-backdrop-brightness"," "),h(Jo,"--tw-backdrop-contrast"," "),h(Jo,"--tw-backdrop-grayscale"," "),h(Jo,"--tw-backdrop-hue-rotate"," "),h(Jo,"--tw-backdrop-invert"," "),h(Jo,"--tw-backdrop-opacity"," "),h(Jo,"--tw-backdrop-saturate"," "),h(Jo,"--tw-backdrop-sepia"," ")]))]),us=h(Jo,"display","grid"),gs=h(Jo,"grid-template-columns","repeat(2, minmax(0, 1fr))"),fs=h(Jo,"flex-grow","1"),ps=h(Jo,"height","100%"),ms=function(e){return h(Jo,"height",ti(e)+"px")},_s=i((function(e,t){return h(Qe,function(e){return"innerHTML"==e||"formAction"==e?"data-"+e:e}(e),function(e){return"string"==typeof e&&tt.test(e)?"":e}(t))})),vs=i((function(e,t){return d(tr,h(_s,e,t),!1,"")})),bs=i((function(e,t){return h(vs,e,qn(t))})),ys=bs("id"),ws=function(e){return{$:3,a:e}},Cs=i((function(e,t){return{$:4,a:e,b:t}})),xs=function(e){return Cs(h(on,ws,e))},Ss=xs(A(["(min-width: 1024px)"])),ks=xs(A(["(min-width: 768px)"])),Ls=h(Jo,"padding-bottom","0.5rem"),Ns=function(e){return{$:6,a:e}},Es=Ns(A([h(Jo,"padding-left","4rem"),h(Jo,"padding-right","4rem")])),Ds=Ns(A([h(Jo,"padding-left","1rem"),h(Jo,"padding-right","1rem")])),As=Ns(A([h(Jo,"padding-left","2rem"),h(Jo,"padding-right","2rem")])),Ts=Ns(A([h(Jo,"--tw-shadow","0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"),h(Jo,"--tw-shadow-colored","0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color)"),h(Jo,"box-shadow","var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)")])),Is=xs(A(["(min-width: 640px)"])),Ms=function(e){return ls(as(e))},Os=Ns(A([h(Jo,"font-size","1.25rem"),h(Jo,"line-height","1.75rem")])),Rs=function(e){return{$:0,a:e}},Ps=i((function(e,t){e:for(;;){if(-2===t.$)return Qt;var i=t.b,n=t.c,r=t.d,o=t.e;switch(h(hr,e,i)){case 0:t=r;continue e;case 1:return Zt(n);default:t=o;continue e}}})),Fs=i((function(e,t){var i=e.b,n=e.c;return i&&h(Ps,n,t).$?d(ur,n,So(n),t):t})),Bs=i((function(e,t){var i=t.a,n=t.b,r=t.c;if(n){var o=h(Ps,r,e);if(o.$)return h(_s,"className",qn("_unstyled"));var s=o.a;return h(_s,"className",qn(s))}return i})),Ws=i((function(e,t){var i=t.a,n=t.b,r=t.c;if(n){var o=h(Ps,r,e);if(o.$)return h(ir,"class","_unstyled");var s=o.a;return h(ir,"class",s)}return i})),Vs=function(e){return Ge(it(e))},zs=i((function(e,t){return h(qe,e,it(t))})),Hs=i((function(e,t){return h($e,e,it(t))})),js=i((function(e,t){var i=e.a,n=e.b,r=t.a,o=t.b;switch(n.$){case 4:var s=n.a;return x(h(Ft,x(i,s),r),o);case 0:var a=n.a,l=n.b,c=n.c,g=d(oi,Fs,o,l),f=d(oi,Us,x(N,g),c),p=f.a,m=f.b;return s=d(ss,a,h(on,Bs(m),l),mi(p)),x(h(Ft,x(i,s),r),m);case 1:var _=n.a,v=(a=n.b,l=n.c,c=n.d,g=d(oi,Fs,o,l),d(oi,Us,x(N,g),c));return p=v.a,m=v.b,s=u(Hs,_,a,h(on,Bs(m),l),mi(p)),x(h(Ft,x(i,s),r),m);case 2:a=n.a,l=n.b,c=n.c,g=d(oi,Fs,o,l);var b=d(oi,js,x(N,g),c);return p=b.a,m=b.b,s=d(Vs,a,h(on,Bs(m),l),mi(p)),x(h(Ft,x(i,s),r),m);default:_=n.a,a=n.b,l=n.c,c=n.d,g=d(oi,Fs,o,l);var y=d(oi,js,x(N,g),c);return p=y.a,m=y.b,s=u(zs,_,a,h(on,Bs(m),l),mi(p)),x(h(Ft,x(i,s),r),m)}})),Us=i((function(e,t){var i=t.a,n=t.b;switch(e.$){case 4:var r=e.a;return x(h(Ft,r,i),n);case 0:var o=e.a,s=e.b,a=e.c,l=d(oi,Fs,n,s),c=d(oi,Us,x(N,l),a),g=c.a,f=c.b;return r=d(ss,o,h(on,Bs(f),s),mi(g)),x(h(Ft,r,i),f);case 1:var p=e.a,m=(o=e.b,s=e.c,a=e.d,l=d(oi,Fs,n,s),d(oi,Us,x(N,l),a));return g=m.a,f=m.b,r=u(Hs,p,o,h(on,Ws(f),s),mi(g)),x(h(Ft,r,i),f);case 2:o=e.a,s=e.b,a=e.c,l=d(oi,Fs,n,s);var _=d(oi,js,x(N,l),a);return g=_.a,f=_.b,r=d(Vs,o,h(on,Bs(f),s),mi(g)),x(h(Ft,r,i),f);default:p=e.a,o=e.b,s=e.c,a=e.d,l=d(oi,Fs,n,s);var v=d(oi,js,x(N,l),a);return g=v.a,f=v.b,r=u(zs,p,o,h(on,Ws(f),s),mi(g)),x(h(Ft,r,i),f)}})),$s=n((function(e,t,i){for(;;){if(-2===i.$)return t;var n=i.b,r=i.c,o=i.d,s=i.e,a=e,l=d(e,n,r,d($s,e,t,o));e=a,t=l,i=s}})),Ks=n((function(e,t,i){return h(ii,t,h(ni,e,i))})),qs=n((function(e,t,i){return i+"\n"+d(Ks,"",t,e)})),Gs=i((function(e,t){return d($s,n((function(t,i,n){return n+"\n"+d(Ks,".","#"+e+"."+i,t)})),"",t)})),Ys=i((function(e,t){var i=function(){if(t.$){var e=t.a,i=t.b,n=t.c;return h(Gs,e,i)+"\n"+h(Gs,e+" ",n)}var r=t.a;return d($s,qs,"",r)}();return d(ss,"span",A([h(ir,"style","display: none;"),h(ir,"class","elm-css-style-wrapper")]),A([d(ss,"style",function(){if(e.$)return N;var t=e.a;return A([h(ir,"nonce",t)])}(),No(as(i)))]))})),Zs=r((function(e,t,i,n){var r=d(oi,Fs,pr,i),o=d(oi,Us,x(N,r),n),s=o.a,a=o.b,l=h(Ys,e,Rs(a)),c=h(on,Bs(a),i);return d(ss,t,c,h(Ft,l,mi(s)))})),Qs=i((function(e,t){for(;;){if(!t.b)return!1;var i=t.a.a,n=t.b;if(b(e,i))return!0;t=n}})),Xs=i((function(e,t){e:for(;;){if(t.b){var i=t.a.a,n=t.b,r="_"+i;if(h(Qs,r,n)){e=r,t=n;continue e}return r}return e}})),Js=n((function(e,t,i){return x(h(Xs,"_",i),h(Ys,e,t))})),ea=r((function(e,t,i,n){var r=d(oi,Fs,pr,i),o=d(oi,js,x(N,r),n),s=o.a,a=o.b,l=d(Js,e,Rs(a),s),c=h(on,Bs(a),i);return d(Vs,t,c,h(Ft,l,mi(s)))})),ta=o((function(e,t,i,n,r){var o=d(oi,Fs,pr,n),s=d(oi,js,x(N,o),r),a=s.a,l=s.b,c=d(Js,e,Rs(l),a),g=h(on,Ws(l),n);return u(zs,t,i,g,h(Ft,c,mi(a)))})),ia=o((function(e,t,i,n,r){var o=d(oi,Fs,pr,n),s=d(oi,Us,x(N,o),r),a=s.a,l=s.b,c=h(Ys,e,Rs(l)),g=h(on,Ws(l),n);return u(Hs,t,i,g,h(Ft,c,mi(a)))})),na=function(e){switch(e.$){case 4:return e.a;case 0:var t=e.a,i=e.b,n=e.c;return u(Zs,Qt,t,i,n);case 1:var r=e.a;return t=e.b,i=e.c,n=e.d,g(ia,Qt,r,t,i,n);case 2:return t=e.a,i=e.b,n=e.c,u(ea,Qt,t,i,n);default:return r=e.a,t=e.b,i=e.c,n=e.d,g(ta,Qt,r,t,i,n)}},ra=Ns(A([h(Jo,"font-size","1.125rem"),h(Jo,"line-height","1.75rem")])),oa=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(239 68 68 / var(--tw-text-opacity))")])),sa=Qo("a"),aa=h(Jo,"display","block"),la=h(Jo,"cursor","pointer"),ca=h(Jo,"flex-direction","row"),ha=h(Jo,"gap","0.5rem"),da=Qo("h3"),ua=h(Jo,"justify-content","space-evenly"),ga=h(Jo,"margin-top","1.25rem"),fa=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(96 165 250 / var(--tw-text-opacity))")])),pa=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(192 132 252 / var(--tw-text-opacity))")])),ma=Ns(A([h(Jo,"font-size","0.875rem"),h(Jo,"line-height","1.25rem")])),_a=h(Jo,"text-decoration-line","underline"),va=i((function(e,t){return{$:1,a:e,b:t}})),ba=function(e){return va(function(e){return{$:2,a:e}}(e))},ya=ba("visited"),wa=h(Xo,A([Yo(A([es,ts,ks(A([ca])),ga,ha,ua]))]),A([h(Xo,N,A([h(da,A([Yo(A([ra]))]),A([Ms("Data Generation")])),h(sa,A([ys("example-generation"),Yo(A([fa,ya(A([pa])),ma,_a,aa,la]))]),N)])),h(Xo,N,A([h(da,A([Yo(A([ra]))]),A([Ms("Data Anonymization")])),h(sa,A([ys("example-anonymization"),Yo(A([fa,ya(A([pa])),ma,_a,aa,la]))]),N)])),h(Xo,N,A([h(da,A([Yo(A([ra]))]),A([Ms("Data Pseudonymization")])),h(sa,A([ys("example-pseudonymization"),Yo(A([fa,ya(A([pa])),ma,_a,aa,la]))]),N)])),h(Xo,N,A([h(da,A([Yo(A([ra]))]),A([Ms("Other")])),h(sa,A([ys("example-other"),Yo(A([fa,ya(A([pa])),ma,_a,aa,la]))]),N)]))])),Ca=Ns(A([h(Jo,"--tw-bg-opacity","1"),h(Jo,"background-color","rgb(0 0 0 / var(--tw-bg-opacity))")])),xa=h(Jo,"font-weight","700"),Sa=function(e){return h(bs,"href",e)},ka=h(Jo,"align-items","baseline"),La=h(Jo,"margin","1.25rem"),Na=h(Jo,"margin-bottom","1.25rem"),Ea=h(Jo,"text-decoration-line","none"),Da=Ze,Aa=i((function(e,t){return d(tr,h(Da,e,t),!1,"")})),Ta=i((function(e,t){return h(Aa,e,function(e){return{$:3,a:e}}(t))})),Ia=function(e){return h(Ta,"click",Vi({cp:e,cx:!0,cF:!0}))},Ma=i((function(e,t){return d(tr,h(ir,e,t),!1,"")})),Oa=Ma("rel"),Ra=i((function(e,t){return{$:2,a:e,b:t}})),Pa=Ns(A([Ra(2)(A([h(hs,":not([hidden]) ~ :not([hidden])",A([h(Jo,"--tw-space-x-reverse","0"),h(Jo,"margin-right","calc(1rem * var(--tw-space-x-reverse))"),h(Jo,"margin-left","calc(1rem * calc(1 - var(--tw-space-x-reverse)))")]))]))])),Fa=bs("target"),Ba=Ns(A([h(Jo,"font-size","2.25rem"),h(Jo,"line-height","2.5rem")])),Wa=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(226 232 240 / var(--tw-text-opacity))")])),Va=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(255 255 255 / var(--tw-text-opacity))")])),za=le,Ha=i((function(e,t){return h(vs,e,za(t))}))("hidden"),ja=function(e){return{$:7,a:e}},Ua=h(Jo,"border-bottom-width","1px"),$a=Ns(A([h(Jo,"--tw-border-opacity","1"),h(Jo,"border-color","rgb(229 231 235 / var(--tw-border-opacity))")])),Ka=h(Jo,"flex-wrap","wrap"),qa=h(Jo,"font-weight","500"),Ga=Qo("li"),Ya=h(Jo,"margin-right","0.5rem"),Za=Ns(A([h(Jo,"--tw-bg-opacity","1"),h(Jo,"background-color","rgb(249 250 251 / var(--tw-bg-opacity))")])),Qa=ba("hover"),Xa=h(Jo,"display","inline-block"),Ja=h(Jo,"padding","0.25rem"),el=Ns(A([h(Jo,"border-top-left-radius","0.5rem"),h(Jo,"border-top-right-radius","0.5rem")])),tl=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(75 85 99 / var(--tw-text-opacity))")])),il=Yo(A([Xa,Ja,el,Qa(A([tl,Za]))])),nl=Ns(A([h(Jo,"--tw-bg-opacity","1"),h(Jo,"background-color","rgb(243 244 246 / var(--tw-bg-opacity))")])),rl=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(37 99 235 / var(--tw-text-opacity))")])),ol=Yo(A([Xa,Ja,rl,nl,el])),sl=h(Jo,"text-align","center"),al=Ns(A([h(Jo,"--tw-text-opacity","1"),h(Jo,"color","rgb(107 114 128 / var(--tw-text-opacity))")])),ll=Qo("ul"),cl=Ns(A([h(Jo,"padding-top","0.5rem"),h(Jo,"padding-bottom","0.5rem")])),hl=h(sa,A([Sa("#"),ys("refresh-button"),Yo(A([Os,qa])),Ia({$:5})]),A([Ms("↻")])),dl=Qo("span"),ul=r((function(e,t,i,n){return{$:1,a:e,b:t,c:i,d:n}})),gl=ul("http://www.w3.org/2000/svg"),fl=gl("circle"),pl=Ma("cx"),ml=Ma("cy"),_l=Ma("d"),vl=Ma("fill"),bl=Ma("fill-opacity"),yl=Ma("fill-rule"),wl=gl("g"),Cl=h(Jo,"height","1.25rem"),xl=Ma("id"),Sl=h(Jo,"display","inline"),kl=gl("path"),Ll=Ma("r"),Nl=Ma("stroke"),El=Ma("stroke-opacity"),Dl=Ma("stroke-width"),Al=gl("svg"),Tl=Ma("viewBox"),Il=h(Jo,"width","1.25rem"),Ml=h(Al,A([xl("refresh-spinner"),(fn=A([Cl,Il,Sl]),pn=Go(fn),mn=h(ir,"",""),d(tr,mn,!0,pn)),Tl("0 0 14 14")]),A([h(wl,A([vl("none"),yl("evenodd")]),A([h(fl,A([pl("7"),ml("7"),Ll("6"),Nl("#000"),El(".1"),Dl("2")]),N),h(kl,A([vl("#000"),bl(".1"),yl("nonzero"),_l("M7 0a7 7 0 0 1 7 7h-2a5 5 0 0 0-5-5V0z")]),N)]))]));!function(t){e.Elm?ze(e.Elm,t):e.Elm=t}({Main:{init:bn({cn:function(e){return x({au:"",a3:"",aP:0,ah:"{}",v:yn,I:1,b2:e},Cn)},cG:function(e){return Ln(A([Hn(kn),An(Sn),zn(Wn),jn(Vn),Dn(On),En(Mn)]))},cJ:er,cL:function(e){return{cd:A([(i=e,na(d(Qo,"body",N,A([(s=ds,cs(d(ss,"span",A([h(ir,"style","display: none;"),h(ir,"class","elm-css-style-wrapper")]),No(d(ss,"style",N,No(as(jo(Ko(s))))))))),(o=i.b2,h(Xo,A([Yo(A([Na,es,Pa,ka,Ca,Va]))]),A([h(Xo,A([Yo(A([La,ns,Ba,xa]))]),A([h(sa,A([ys("reset-link"),Yo(A([la])),Ia(Rn(yn))]),A([Ms("PIMO Play")]))])),h(Xo,A([Yo(A([Wa,ma]))]),A([Ms("A playground for "),h(sa,A([Sa("https://github.com/CGI-FR/PIMO/tree/"+o),Fa("_blank"),Oa("noopener noreferrer"),Yo(A([Ea]))]),A([Ms("pimo "+o)]))])),h(Xo,A([Yo(A([fs]))]),N)]))),h(Xo,A([Yo(A([Ds,Ss(A([Es])),ks(A([As]))]))]),A([h(Xo,A([Yo(A([us,Is(A([gs])),rs,ks(A([os]))]))]),A([(t=i.aP,h(Xo,A([Yo(A([es,ts]))]),h(Ft,h(Xo,A([Yo(A([is,ns,Os,Ls]))]),A([Ms("Masking Configuration")])),L(function(e){return A([h(ll,A([Yo(A([es,Ka,ma,qa,sl,al,Ua,$a]))]),A([h(Ga,A([Yo(A([Ya]))]),A([h(sa,A([Sa("#"),e?il:ol,Ia(ja(0))]),A([Ms("YAML")]))])),h(Ga,A([Yo(A([Ya]))]),A([h(sa,A([Sa("#"),1===e?ol:il,Ia(ja(1))]),A([Ms("Graph")]))]))]))])}(t),A([h(Xo,A([Yo(A([fs,Ts,ms(300),ks(A([ms(600)]))])),ys("editor-yaml"),Ha(!!t)]),N),h(Xo,A([Yo(A([fs,Ts,ms(300),ks(A([ms(600)]))])),ys("flowchart"),Ha(1!==t)]),N)]))))),h(Xo,A([Yo(A([es,ts]))]),L(A([h(Xo,A([Yo(A([is,ns,Os,Ls]))]),A([Ms("Input")])),h(Xo,A([Yo(A([fs,Ts,ms(300),ks(A([ps]))])),ys("editor-json")]),N)]),(r=i.I,A([h(Xo,A([Yo(A([is,ns,Os,cl])),ys("label-output")]),A([h(dl,A([Yo(A([is,ns,Os,cl]))]),A([Ms("Output ")])),1===r?Ml:hl])),h(Xo,A([Yo(A([fs,Ts,ms(300),ks(A([ps]))])),ys("result-json")]),N)]))))])),(n=i.au,h(Xo,A([Yo(A([is,ns,ra,oa])),ys("result-error")]),A([Ms(n)]))),wa]))]))))]),cI:"PIMO Play !"};var t,i,n,r,o,s}})(xn)(0)}})}(this)},6961:(e,t,i)=>{var n,r=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function r(e,t){if(!n[e]){n[e]={};for(var i=0;i>>8,i[2*n+1]=s%256}return i},decompressFromUint8Array:function(t){if(null==t)return o.decompress(t);for(var i=new Array(t.length/2),n=0,r=i.length;n>=1}else{for(r=1,n=0;n>=1}0==--d&&(d=Math.pow(2,g),g++),delete a[h]}else for(r=s[h],n=0;n>=1;0==--d&&(d=Math.pow(2,g),g++),s[c]=u++,h=String(l)}if(""!==h){if(Object.prototype.hasOwnProperty.call(a,h)){if(h.charCodeAt(0)<256){for(n=0;n>=1}else{for(r=1,n=0;n>=1}0==--d&&(d=Math.pow(2,g),g++),delete a[h]}else for(r=s[h],n=0;n>=1;0==--d&&(d=Math.pow(2,g),g++)}for(r=2,n=0;n>=1;for(;;){if(p<<=1,m==t-1){f.push(i(p));break}m++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:o._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,i,n){var r,o,s,a,l,c,h,d=[],u=4,g=4,f=3,p="",m=[],_={val:n(0),position:i,index:1};for(r=0;r<3;r+=1)d[r]=r;for(s=0,l=Math.pow(2,2),c=1;c!=l;)a=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),s|=(a>0?1:0)*c,c<<=1;switch(s){case 0:for(s=0,l=Math.pow(2,8),c=1;c!=l;)a=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),s|=(a>0?1:0)*c,c<<=1;h=e(s);break;case 1:for(s=0,l=Math.pow(2,16),c=1;c!=l;)a=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),s|=(a>0?1:0)*c,c<<=1;h=e(s);break;case 2:return""}for(d[3]=h,o=h,m.push(h);;){if(_.index>t)return"";for(s=0,l=Math.pow(2,f),c=1;c!=l;)a=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),s|=(a>0?1:0)*c,c<<=1;switch(h=s){case 0:for(s=0,l=Math.pow(2,8),c=1;c!=l;)a=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),s|=(a>0?1:0)*c,c<<=1;d[g++]=e(s),h=g-1,u--;break;case 1:for(s=0,l=Math.pow(2,16),c=1;c!=l;)a=_.val&_.position,_.position>>=1,0==_.position&&(_.position=i,_.val=n(_.index++)),s|=(a>0?1:0)*c,c<<=1;d[g++]=e(s),h=g-1,u--;break;case 2:return m.join("")}if(0==u&&(u=Math.pow(2,f),f++),d[h])p=d[h];else{if(h!==g)return null;p=o+o.charAt(0)}m.push(p),d[g++]=o+p.charAt(0),o=p,0==--u&&(u=Math.pow(2,f),f++)}}};return o}();void 0===(n=function(){return r}.call(t,i,t,e))||(e.exports=n)},158:(e,t,i)=>{var n;self.MonacoEnvironment=(n={editorWorkerService:"editor.worker.js",json:"json.worker.js",yaml:"yaml.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var r=i.p,o=(r?r.replace(/\/$/,"")+"/":"")+n[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,a.length)!==a){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var l=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return o}}),i(6689),i(8945),i(293),i(9317),i(4367),i(2102),i(5833),i(9575),i(2980),i(1085),i(3365),i(3740),i(1895),i(756),i(6917),i(3450),i(8423),i(4125),i(1097),i(9683),i(3588),i(628),i(1250),i(7804),i(3329),i(6353),i(4602),i(8782),i(1580),i(1104),i(1660),i(5766),i(76),i(6471),i(7061),i(8863),i(8956),i(8944),i(8766),i(5048),i(8165),i(102),i(8762),i(7016),i(5662),i(4662),i(2614),i(7319),i(9607),i(1271),i(943),i(7181),i(6709),e.exports=i(9742),i(4199),i(2323),i(5217)},6640:(e,t,i)=>{var n;self.MonacoEnvironment=(n={editorWorkerService:"editor.worker.js",json:"json.worker.js",yaml:"yaml.worker.js"},{globalAPI:!1,getWorkerUrl:function(e,t){var r=i.p,o=(r?r.replace(/\/$/,"")+"/":"")+n[t];if(/^((http:)|(https:)|(file:)|(\/\/))/.test(o)){var s=String(window.location),a=s.substr(0,s.length-window.location.hash.length-window.location.search.length-window.location.pathname.length);if(o.substring(0,a.length)!==a){/^(\/\/)/.test(o)&&(o=window.location.protocol+o);var l=new Blob(["/*"+t+'*/importScripts("'+o+'");'],{type:"application/javascript"});return URL.createObjectURL(l)}}return o}}),i(6689),i(8945),i(293),i(9317),i(4367),i(2102),i(5833),i(9575),i(2980),i(1085),i(3365),i(3740),i(1895),i(756),i(6917),i(3450),i(8423),i(4125),i(1097),i(9683),i(3588),i(628),i(1250),i(7804),i(3329),i(6353),i(4602),i(8782),i(1580),i(1104),i(1660),i(5766),i(76),i(6471),i(7061),i(8863),i(8956),i(8944),i(8766),i(5048),i(8165),i(102),i(8762),i(7016),i(5662),i(4662),i(2614),i(7319),i(9607),i(1271),i(943),i(7181),i(6709),e.exports=i(5915),i(4199),i(2323),i(5217)},6268:(e,t,i)=>{"use strict";i.r(t),i.d(t,{PixelRatio:()=>l,getZoomFactor:()=>c,isAndroid:()=>_,isChrome:()=>g,isElectron:()=>m,isFirefox:()=>d,isSafari:()=>f,isStandalone:()=>v,isWebKit:()=>u,isWebkitWebView:()=>p});var n=i(4669),r=i(5976);class o{constructor(){this._zoomFactor=1}getZoomFactor(){return this._zoomFactor}}o.INSTANCE=new o;class s extends r.JT{constructor(){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._listener=()=>this._handleChange(!0),this._mediaQueryList=null,this._handleChange(!1)}_handleChange(e){this._mediaQueryList&&this._mediaQueryList.removeEventListener("change",this._listener),this._mediaQueryList=matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),this._mediaQueryList.addEventListener("change",this._listener),e&&this._onDidChange.fire()}}class a extends r.JT{constructor(){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._value=this._getPixelRatio();const e=this._register(new s);this._register(e.onDidChange((()=>{this._value=this._getPixelRatio(),this._onDidChange.fire(this._value)})))}get value(){return this._value}_getPixelRatio(){const e=document.createElement("canvas").getContext("2d");return(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)}}const l=new class{constructor(){this._pixelRatioMonitor=null}_getOrCreatePixelRatioMonitor(){return this._pixelRatioMonitor||(this._pixelRatioMonitor=new a),this._pixelRatioMonitor}get value(){return this._getOrCreatePixelRatioMonitor().value}get onDidChange(){return this._getOrCreatePixelRatioMonitor().onDidChange}};function c(){return o.INSTANCE.getZoomFactor()}const h=navigator.userAgent,d=h.indexOf("Firefox")>=0,u=h.indexOf("AppleWebKit")>=0,g=h.indexOf("Chrome")>=0,f=!g&&h.indexOf("Safari")>=0,p=!g&&!f&&u,m=h.indexOf("Electron/")>=0,_=h.indexOf("Android")>=0,v=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches},161:(e,t,i)=>{"use strict";i.d(t,{D:()=>o});var n=i(6268),r=i(1432);const o={clipboard:{writeText:r.tY||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:r.tY||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:r.tY||n.isStandalone?0:navigator.keyboard||n.isSafari?1:2,touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)}},3547:(e,t,i)=>{"use strict";i.d(t,{P$:()=>o,TN:()=>r,go:()=>n});const n={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:i(1170).v.text,TERMINALS:"Terminals"};class r{constructor(e){this.data=e}update(){}getData(){return this.data}}const o={CurrentDragAndDropData:void 0}},5321:(e,t,i)=>{"use strict";i.d(t,{$:()=>pe,$Z:()=>me,Ay:()=>Y,Ce:()=>he,Cp:()=>_e,D6:()=>M,DI:()=>W,Dx:()=>I,FK:()=>z,Fx:()=>$,GQ:()=>b,H$:()=>ve,IC:()=>S,If:()=>H,OO:()=>G,PO:()=>g,R3:()=>ce,RE:()=>x,Re:()=>ie,Ro:()=>R,Uh:()=>be,Uw:()=>f,V3:()=>ye,Y_:()=>T,_0:()=>se,_h:()=>xe,_q:()=>Se,dS:()=>Q,dp:()=>F,fk:()=>ee,go:()=>le,i:()=>B,jL:()=>L,j_:()=>C,jg:()=>U,jt:()=>we,lI:()=>k,mc:()=>de,mu:()=>v,nm:()=>m,q6:()=>w,tw:()=>ne,u0:()=>y,uB:()=>ke,uN:()=>te,uU:()=>K,vL:()=>oe,vY:()=>Z,w:()=>V,wY:()=>Ce,wn:()=>j,xQ:()=>P,zB:()=>re});var n=i(6268),r=i(161),o=i(9069),s=i(3938),a=i(5393),l=i(7301),c=i(4669),h=i(5976),d=i(6663),u=i(1432);function g(e){for(;e.firstChild;)e.firstChild.remove()}function f(e){var t;return null!==(t=null==e?void 0:e.isConnected)&&void 0!==t&&t}class p{constructor(e,t,i,n){this._node=e,this._type=t,this._handler=i,this._options=n||!1,this._node.addEventListener(this._type,this._handler,this._options)}dispose(){this._handler&&(this._node.removeEventListener(this._type,this._handler,this._options),this._node=null,this._handler=null)}}function m(e,t,i,n){return new p(e,t,i,n)}function _(e){return function(t){return e(new s.n(t))}}let v=function(e,t,i,n){let r=i;return"click"===t||"mousedown"===t?r=_(i):"keydown"!==t&&"keypress"!==t&&"keyup"!==t||(r=function(e){return function(t){return e(new o.y(t))}}(i)),m(e,t,r,n)},b=function(e,t,i){return y(e,_(t),i)};function y(e,t,i){return m(e,u.gn&&r.D.pointerEvents?ne.POINTER_DOWN:ne.MOUSE_DOWN,t,i)}function w(e,t,i){return m(e,u.gn&&r.D.pointerEvents?ne.POINTER_UP:ne.MOUSE_UP,t,i)}function C(e,t){return m(e,"mouseout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function x(e,t){return m(e,"pointerout",(i=>{let n=i.relatedTarget;for(;n&&n!==e;)n=n.parentNode;n!==e&&t(i)}))}function S(e,t,i){let n=null;const r=e=>o.fire(e),o=new c.Q5({onFirstListenerAdd:()=>{n||(n=new p(e,t,r,i))},onLastListenerRemove:()=>{n&&(n.dispose(),n=null)}});return o}let k,L,N=null;class E{constructor(e,t=0){this._runner=e,this.priority=t,this._canceled=!1}dispose(){this._canceled=!0}execute(){if(!this._canceled)try{this._runner()}catch(e){(0,l.dL)(e)}}static sort(e,t){return t.priority-e.priority}}!function(){let e=[],t=null,i=!1,n=!1,r=()=>{for(i=!1,t=e,e=[],n=!0;t.length>0;)t.sort(E.sort),t.shift().execute();n=!1};L=(t,n=0)=>{let o=new E(t,n);return e.push(o),i||(i=!0,function(e){if(!N){const e=e=>setTimeout((()=>e((new Date).getTime())),0);N=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}N.call(self,e)}(r)),o},k=(e,i)=>{if(n){let n=new E(e,i);return t.push(n),n}return L(e,i)}}();const D=function(e,t){return t};class A extends h.JT{constructor(e,t,i,n=D,r=8){super();let o=null,s=0,l=this._register(new a._F),c=()=>{s=(new Date).getTime(),i(o),o=null};this._register(m(e,t,(e=>{o=n(o,e);let t=(new Date).getTime()-s;t>=r?(l.cancel(),c()):l.setIfNotSet(c,r-t)})))}}function T(e,t,i,n,r){return new A(e,t,i,n,r)}function I(e){return document.defaultView.getComputedStyle(e,null)}function M(e){if(e!==document.body)return new R(e.clientWidth,e.clientHeight);if(u.gn&&window.visualViewport)return new R(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new R(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new R(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new R(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class O{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=I(e),r="0";return n&&(r=n.getPropertyValue?n.getPropertyValue(t):n.getAttribute(i)),O.convertToPixels(e,r)}static getBorderLeftWidth(e){return O.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return O.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return O.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return O.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return O.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return O.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return O.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return O.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return O.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return O.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return O.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return O.getDimension(e,"margin-bottom","marginBottom")}}class R{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new R(e,t):this}static is(e){return"object"==typeof e&&"number"==typeof e.height&&"number"==typeof e.width}static lift(e){return e instanceof R?e:new R(e.width,e.height)}static equals(e,t){return e===t||!(!e||!t)&&e.width===t.width&&e.height===t.height}}function P(e){let t=e.offsetParent,i=e.offsetTop,n=e.offsetLeft;for(;null!==(e=e.parentNode)&&e!==document.body&&e!==document.documentElement;){i-=e.scrollTop;const r=q(e)?null:I(e);r&&(n-="rtl"!==r.direction?e.scrollLeft:-e.scrollLeft),e===t&&(n+=O.getBorderLeftWidth(e),i+=O.getBorderTopWidth(e),i+=e.offsetTop,n+=e.offsetLeft,t=e.offsetParent)}return{left:n,top:i}}function F(e,t,i){"number"==typeof t&&(e.style.width=`${t}px`),"number"==typeof i&&(e.style.height=`${i}px`)}function B(e){let t=e.getBoundingClientRect();return{left:t.left+W.scrollX,top:t.top+W.scrollY,width:t.width,height:t.height}}R.None=new R(0,0);const W=new class{get scrollX(){return"number"==typeof window.scrollX?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return"number"==typeof window.scrollY?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function V(e){let t=O.getMarginLeft(e)+O.getMarginRight(e);return e.offsetWidth+t}function z(e){let t=O.getBorderLeftWidth(e)+O.getBorderRightWidth(e),i=O.getPaddingLeft(e)+O.getPaddingRight(e);return e.offsetWidth-t-i}function H(e){let t=O.getBorderTopWidth(e)+O.getBorderBottomWidth(e),i=O.getPaddingTop(e)+O.getPaddingBottom(e);return e.offsetHeight-t-i}function j(e){let t=O.getMarginTop(e)+O.getMarginBottom(e);return e.offsetHeight+t}function U(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function $(e,t,i){for(;e&&e.nodeType===e.ELEMENT_NODE;){if(e.classList.contains(t))return e;if(i)if("string"==typeof i){if(e.classList.contains(i))return null}else if(e===i)return null;e=e.parentNode}return null}function K(e,t,i){return!!$(e,t,i)}function q(e){return e&&!!e.host&&!!e.mode}function G(e){return!!Y(e)}function Y(e){for(;e.parentNode;){if(e===document.body)return null;e=e.parentNode}return q(e)?e:null}function Z(){let e=document.activeElement;for(;null==e?void 0:e.shadowRoot;)e=e.shadowRoot.activeElement;return e}function Q(e=document.getElementsByTagName("head")[0]){let t=document.createElement("style");return t.type="text/css",t.media="screen",e.appendChild(t),t}let X=null;function J(){return X||(X=Q()),X}function ee(e,t,i=J()){i&&t&&i.sheet.insertRule(e+"{"+t+"}",0)}function te(e,t=J()){if(!t)return;let i=function(e){var t,i;return(null===(t=null==e?void 0:e.sheet)||void 0===t?void 0:t.rules)?e.sheet.rules:(null===(i=null==e?void 0:e.sheet)||void 0===i?void 0:i.cssRules)?e.sheet.cssRules:[]}(t),n=[];for(let t=0;t=0;e--)t.sheet.deleteRule(n[e])}function ie(e){return"object"==typeof HTMLElement?e instanceof HTMLElement:e&&"object"==typeof e&&1===e.nodeType&&"string"==typeof e.nodeName}const ne={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",MOUSE_WHEEL:"wheel",POINTER_UP:"pointerup",POINTER_DOWN:"pointerdown",POINTER_MOVE:"pointermove",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",PAGE_SHOW:"pageshow",PAGE_HIDE:"pagehide",ABORT:"abort",ERROR:"error",RESIZE:"resize",SCROLL:"scroll",FULLSCREEN_CHANGE:"fullscreenchange",WK_FULLSCREEN_CHANGE:"webkitfullscreenchange",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:n.isWebKit?"webkitAnimationStart":"animationstart",ANIMATION_END:n.isWebKit?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:n.isWebKit?"webkitAnimationIteration":"animationiteration"},re={stop:function(e,t){e.preventDefault?e.preventDefault():e.returnValue=!1,t&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)}};function oe(e){let t=[];for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)t[i]=e.scrollTop,e=e.parentNode;return t}function se(e,t){for(let i=0;e&&e.nodeType===e.ELEMENT_NODE;i++)e.scrollTop!==t[i]&&(e.scrollTop=t[i]),e=e.parentNode}class ae extends h.JT{constructor(e){super(),this._onDidFocus=this._register(new c.Q5),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new c.Q5),this.onDidBlur=this._onDidBlur.event;let t=ae.hasFocusWithin(e),i=!1;const n=()=>{i=!1,t||(t=!0,this._onDidFocus.fire())},r=()=>{t&&(i=!0,window.setTimeout((()=>{i&&(i=!1,t=!1,this._onDidBlur.fire())}),0))};this._refreshStateHandler=()=>{ae.hasFocusWithin(e)!==t&&(t?r():n())},this._register(m(e,ne.FOCUS,n,!0)),this._register(m(e,ne.BLUR,r,!0)),this._register(m(e,ne.FOCUS_IN,(()=>this._refreshStateHandler()))),this._register(m(e,ne.FOCUS_OUT,(()=>this._refreshStateHandler())))}static hasFocusWithin(e){const t=Y(e);return U(t?t.activeElement:document.activeElement,e)}}function le(e){return new ae(e)}function ce(e,...t){if(e.append(...t),1===t.length&&"string"!=typeof t[0])return t[0]}function he(e,t){return e.insertBefore(t,e.firstChild),t}function de(e,...t){e.innerText="",ce(e,...t)}const ue=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var ge;function fe(e,t,i,...n){let r=ue.exec(t);if(!r)throw new Error("Bad use of emmet");i=Object.assign({},i||{});let o,s=r[1]||"div";return o=e!==ge.HTML?document.createElementNS(e,s):document.createElement(s),r[3]&&(o.id=r[3]),r[4]&&(o.className=r[4].replace(/\./g," ").trim()),Object.keys(i).forEach((e=>{const t=i[e];void 0!==t&&(/^on\w+$/.test(e)?o[e]=t:"selected"===e?t&&o.setAttribute(e,"true"):o.setAttribute(e,t))})),o.append(...n),o}function pe(e,t,...i){return fe(ge.HTML,e,t,...i)}function me(...e){for(let t of e)t.style.display="",t.removeAttribute("aria-hidden")}function _e(...e){for(let t of e)t.style.display="none",t.setAttribute("aria-hidden","true")}function ve(e){return Array.prototype.slice.call(document.getElementsByTagName(e),0)}function be(e){const t=window.devicePixelRatio*e;return Math.max(1,Math.floor(t))/window.devicePixelRatio}function ye(e){window.open(e,"_blank","noopener")}function we(e){const t=()=>{e(),i=L(t)};let i=L(t);return(0,h.OF)((()=>i.dispose()))}function Ce(e){return e?`url('${d.Gi.asBrowserUri(e).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function xe(e){return`'${e.replace(/'/g,"%27")}'`}!function(e){e.HTML="http://www.w3.org/1999/xhtml",e.SVG="http://www.w3.org/2000/svg"}(ge||(ge={})),pe.SVG=function(e,t,...i){return fe(ge.SVG,e,t,...i)},d.WX.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");class Se extends c.Q5{constructor(){super(),this._subscriptions=new h.SL,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(m(window,"keydown",(e=>{if(e.defaultPrevented)return;const t=new o.y(e);if(6!==t.keyCode||!e.repeat){if(e.altKey&&!this._keyStatus.altKey)this._keyStatus.lastKeyPressed="alt";else if(e.ctrlKey&&!this._keyStatus.ctrlKey)this._keyStatus.lastKeyPressed="ctrl";else if(e.metaKey&&!this._keyStatus.metaKey)this._keyStatus.lastKeyPressed="meta";else if(e.shiftKey&&!this._keyStatus.shiftKey)this._keyStatus.lastKeyPressed="shift";else{if(6===t.keyCode)return;this._keyStatus.lastKeyPressed=void 0}this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyPressed&&(this._keyStatus.event=e,this.fire(this._keyStatus))}}),!0)),this._subscriptions.add(m(window,"keyup",(e=>{e.defaultPrevented||(!e.altKey&&this._keyStatus.altKey?this._keyStatus.lastKeyReleased="alt":!e.ctrlKey&&this._keyStatus.ctrlKey?this._keyStatus.lastKeyReleased="ctrl":!e.metaKey&&this._keyStatus.metaKey?this._keyStatus.lastKeyReleased="meta":!e.shiftKey&&this._keyStatus.shiftKey?this._keyStatus.lastKeyReleased="shift":this._keyStatus.lastKeyReleased=void 0,this._keyStatus.lastKeyPressed!==this._keyStatus.lastKeyReleased&&(this._keyStatus.lastKeyPressed=void 0),this._keyStatus.altKey=e.altKey,this._keyStatus.ctrlKey=e.ctrlKey,this._keyStatus.metaKey=e.metaKey,this._keyStatus.shiftKey=e.shiftKey,this._keyStatus.lastKeyReleased&&(this._keyStatus.event=e,this.fire(this._keyStatus)))}),!0)),this._subscriptions.add(m(document.body,"mousedown",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(m(document.body,"mouseup",(()=>{this._keyStatus.lastKeyPressed=void 0}),!0)),this._subscriptions.add(m(document.body,"mousemove",(e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)}),!0)),this._subscriptions.add(m(window,"blur",(()=>{this.resetKeyStatus()})))}get keyStatus(){return this._keyStatus}resetKeyStatus(){this.doResetKeyStatus(),this.fire(this._keyStatus)}doResetKeyStatus(){this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1}}static getInstance(){return Se.instance||(Se.instance=new Se),Se.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function ke(e,t){window.matchMedia(e).addEventListener("change",t)}},4850:(e,t,i)=>{"use strict";i.d(t,{Y:()=>r,p:()=>o});var n=i(4669);class r{constructor(e,t,i){const r=e=>this.emitter.fire(e);this.emitter=new n.Q5({onFirstListenerAdd:()=>e.addEventListener(t,r,i),onLastListenerRemove:()=>e.removeEventListener(t,r,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function o(e){return e.preventDefault(),e.stopPropagation(),e}},8626:(e,t,i)=>{"use strict";i.d(t,{X:()=>r,Z:()=>n});class n{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontStyle="",this._fontFeatureSettings="",this._textDecoration="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._color="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){-1!==this._top&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}setFontFamily(e){this._fontFamily!==e&&(this._fontFamily=e,this.domNode.style.fontFamily=this._fontFamily)}setFontWeight(e){this._fontWeight!==e&&(this._fontWeight=e,this.domNode.style.fontWeight=this._fontWeight)}setFontSize(e){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontStyle(e){this._fontStyle!==e&&(this._fontStyle=e,this.domNode.style.fontStyle=this._fontStyle)}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setTextDecoration(e){this._textDecoration!==e&&(this._textDecoration=e,this.domNode.style.textDecoration=this._textDecoration)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}setClassName(e){this._className!==e&&(this._className=e,this.domNode.className=this._className)}toggleClassName(e,t){this.domNode.classList.toggle(e,t),this._className=this.domNode.className}setDisplay(e){this._display!==e&&(this._display=e,this.domNode.style.display=this._display)}setPosition(e){this._position!==e&&(this._position=e,this.domNode.style.position=this._position)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this.domNode.style.visibility=this._visibility)}setColor(e){this._color!==e&&(this._color=e,this.domNode.style.color=this._color)}setBackgroundColor(e){this._backgroundColor!==e&&(this._backgroundColor=e,this.domNode.style.backgroundColor=this._backgroundColor)}setLayerHinting(e){this._layerHint!==e&&(this._layerHint=e,this.domNode.style.transform=this._layerHint?"translate3d(0px, 0px, 0px)":"")}setBoxShadow(e){this._boxShadow!==e&&(this._boxShadow=e,this.domNode.style.boxShadow=e)}setContain(e){this._contain!==e&&(this._contain=e,this.domNode.style.contain=this._contain)}setAttribute(e,t){this.domNode.setAttribute(e,t)}removeAttribute(e){this.domNode.removeAttribute(e)}appendChild(e){this.domNode.appendChild(e.domNode)}removeChild(e){this.domNode.removeChild(e.domNode)}}function r(e){return new n(e)}},8764:(e,t,i)=>{"use strict";i.d(t,{BO:()=>o,IY:()=>r,az:()=>s});var n=i(5321);function r(e,t={}){const i=s(t);return i.textContent=e,i}function o(e,t={}){const i=s(t);return l(i,function(e,t){const i={type:1,children:[]};let n=0,r=i;const o=[],s=new a(e);for(;!s.eos();){let e=s.next();const i="\\"===e&&0!==c(s.peek(),t);if(i&&(e=s.next()),i||0===c(e,t)||e!==s.peek())if("\n"===e)2===r.type&&(r=o.pop()),r.children.push({type:8});else if(2!==r.type){const t={type:2,content:e};r.children.push(t),o.push(r),r=t}else r.content+=e;else{s.advance(),2===r.type&&(r=o.pop());const i=c(e,t);if(r.type===i||5===r.type&&6===i)r=o.pop();else{const e={type:i,children:[]};5===i&&(e.index=n,n++),r.children.push(e),o.push(r),r=e}}}return 2===r.type&&(r=o.pop()),o.length,i}(e,!!t.renderCodeSegments),t.actionHandler,t.renderCodeSegments),i}function s(e){const t=e.inline?"span":"div",i=document.createElement(t);return e.className&&(i.className=e.className),i}class a{constructor(e){this.source=e,this.index=0}eos(){return this.index>=this.source.length}next(){const e=this.peek();return this.advance(),e}peek(){return this.source[this.index]}advance(){this.index++}}function l(e,t,i,r){let o;if(2===t.type)o=document.createTextNode(t.content||"");else if(3===t.type)o=document.createElement("b");else if(4===t.type)o=document.createElement("i");else if(7===t.type&&r)o=document.createElement("code");else if(5===t.type&&i){const e=document.createElement("a");i.disposables.add(n.mu(e,"click",(e=>{i.callback(String(t.index),e)}))),o=e}else 8===t.type?o=document.createElement("br"):1===t.type&&(o=e);o&&e!==o&&e.appendChild(o),o&&Array.isArray(t.children)&&t.children.forEach((e=>{l(o,e,i,r)}))}function c(e,t){switch(e){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return t?7:0;default:return 0}}},7974:(e,t,i)=>{"use strict";i.d(t,{Z:()=>c,e:()=>l});var n=i(5321),r=i(262),o=i(3938),s=i(5976),a=i(1432);function l(e,t){let i=new o.n(t);return i.preventDefault(),{leftButton:i.leftButton,buttons:i.buttons,posx:i.posx,posy:i.posy}}class c{constructor(){this._hooks=new s.SL,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,s,l){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=s,this._onStopCallback=l;const c=r.E.getSameOriginWindowChain(),h=a.gn?"pointermove":"mousemove",d=c.map((e=>e.window.document)),u=n.Ay(e);u&&d.unshift(u);for(const e of d)this._hooks.add(n.Y_(e,h,(e=>{e.buttons===t?this._mouseMoveCallback(e):this.stopMonitoring(!0)}),((e,t)=>this._mouseMoveEventMerger(e,t)))),this._hooks.add(n.nm(e,"mouseup",(e=>this.stopMonitoring(!0))));if(r.E.hasDifferentOriginAncestor()){let e=c[c.length-1];this._hooks.add(n.nm(e.window.document,"mouseout",(e=>{"html"===new o.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document,"mouseover",(e=>{"html"===new o.n(e).target.tagName.toLowerCase()&&this.stopMonitoring(!0)}))),this._hooks.add(n.nm(e.window.document.body,"mouseleave",(e=>{this.stopMonitoring(!0)})))}}}},262:(e,t,i)=>{"use strict";i.d(t,{E:()=>s});let n=!1,r=null;function o(e){if(!e.parent||e.parent===e)return null;try{let t=e.location,i=e.parent.location;if("null"!==t.origin&&"null"!==i.origin&&t.origin!==i.origin)return n=!0,null}catch(e){return n=!0,null}return e.parent}class s{static getSameOriginWindowChain(){if(!r){r=[];let e,t=window;do{e=o(t),e?r.push({window:t,iframeElement:t.frameElement||null}):r.push({window:t,iframeElement:null}),t=e}while(t)}return r.slice(0)}static hasDifferentOriginAncestor(){return r||this.getSameOriginWindowChain(),n}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,r=this.getSameOriginWindowChain();for(const e of r){if(i+=e.window.scrollY,n+=e.window.scrollX,e.window===t)break;if(!e.iframeElement)break;let r=e.iframeElement.getBoundingClientRect();i+=r.top,n+=r.left}return{top:i,left:n}}}},9069:(e,t,i)=>{"use strict";i.d(t,{y:()=>c});var n=i(6268),r=i(2258),o=i(8313),s=i(1432);const a=s.dz?256:2048,l=s.dz?2048:256;class c{constructor(e){this._standardKeyboardEventBrand=!0;let t=e;this.browserEvent=t,this.target=t.target,this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey,this.keyCode=function(e){if(e.charCode){let t=String.fromCharCode(e.charCode).toUpperCase();return r.kL.fromString(t)}const t=e.keyCode;if(3===t)return 7;if(n.isFirefox){if(59===t)return 80;if(107===t)return 81;if(109===t)return 83;if(s.dz&&224===t)return 57}else if(n.isWebKit){if(91===t)return 57;if(s.dz&&93===t)return 57;if(!s.dz&&92===t)return 57}return r.H_[t]||0}(t),this.code=t.code,this.ctrlKey=this.ctrlKey||5===this.keyCode,this.altKey=this.altKey||6===this.keyCode,this.shiftKey=this.shiftKey||4===this.keyCode,this.metaKey=this.metaKey||57===this.keyCode,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=a),this.altKey&&(t|=512),this.shiftKey&&(t|=1024),this.metaKey&&(t|=l),t|=e,t}_computeRuntimeKeybinding(){let e=0;return 5!==this.keyCode&&4!==this.keyCode&&6!==this.keyCode&&57!==this.keyCode&&(e=this.keyCode),new o.QC(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}},3938:(e,t,i)=>{"use strict";i.d(t,{n:()=>s,q:()=>a});var n=i(6268),r=i(262),o=i(1432);class s{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=0===e.button,this.middleButton=1===e.button,this.rightButton=2===e.button,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,"dblclick"===e.type&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,"number"==typeof e.pageX?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=r.E.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class a{constructor(e,t=0,i=0){if(this.browserEvent=e||null,this.target=e?e.target||e.targetNode||e.srcElement:null,this.deltaY=i,this.deltaX=t,e){let t=e,i=e;if(void 0!==t.wheelDeltaY)this.deltaY=t.wheelDeltaY/120;else if(void 0!==i.VERTICAL_AXIS&&i.axis===i.VERTICAL_AXIS)this.deltaY=-i.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.isFirefox&&!o.dz?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(void 0!==t.wheelDeltaX)n.isSafari&&o.ED?this.deltaX=-t.wheelDeltaX/120:this.deltaX=t.wheelDeltaX/120;else if(void 0!==i.HORIZONTAL_AXIS&&i.axis===i.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if("wheel"===e.type){const t=e;t.deltaMode===t.DOM_DELTA_LINE?n.isFirefox&&!o.dz?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}0===this.deltaY&&0===this.deltaX&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}},553:(e,t,i)=>{"use strict";i.d(t,{o:()=>l,t:()=>n});var n,r=i(5321),o=i(9488),s=i(9898),a=i(5976);!function(e){e.Tap="-monaco-gesturetap",e.Change="-monaco-gesturechange",e.Start="-monaco-gesturestart",e.End="-monaco-gesturesend",e.Contextmenu="-monaco-gesturecontextmenu"}(n||(n={}));class l extends a.JT{constructor(){super(),this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(r.nm(document,"touchstart",(e=>this.onTouchStart(e)),{passive:!1})),this._register(r.nm(document,"touchend",(e=>this.onTouchEnd(e)))),this._register(r.nm(document,"touchmove",(e=>this.onTouchMove(e)),{passive:!1}))}static addTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.targets.push(e),{dispose:()=>{l.INSTANCE.targets=l.INSTANCE.targets.filter((t=>t!==e))}}):a.JT.None}static ignoreTarget(e){return l.isTouchDevice()?(l.INSTANCE||(l.INSTANCE=new l),l.INSTANCE.ignoreTargets.push(e),{dispose:()=>{l.INSTANCE.ignoreTargets=l.INSTANCE.ignoreTargets.filter((t=>t!==e))}}):a.JT.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,r=e.targetTouches.length;i=l.HOLD_DELAY&&Math.abs(a.initialPageX-o.Gb(a.rollingPageX))<30&&Math.abs(a.initialPageY-o.Gb(a.rollingPageY))<30){let e=this.newGestureEvent(n.Contextmenu,a.initialTarget);e.pageX=o.Gb(a.rollingPageX),e.pageY=o.Gb(a.rollingPageY),this.dispatchEvent(e)}else if(1===i){let e=o.Gb(a.rollingPageX),i=o.Gb(a.rollingPageY),n=o.Gb(a.rollingTimestamps)-a.rollingTimestamps[0],r=e-a.rollingPageX[0],s=i-a.rollingPageY[0];const l=this.targets.filter((e=>a.initialTarget instanceof Node&&e.contains(a.initialTarget)));this.inertia(l,t,Math.abs(r)/n,r>0?1:-1,e,Math.abs(s)/n,s>0?1:-1,i)}this.dispatchEvent(this.newGestureEvent(n.End,a.initialTarget)),delete this.activeTouches[s.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===n.Tap){const t=(new Date).getTime();let i=0;i=t-this._lastSetTapCountTime>l.CLEAR_TAP_COUNT_TIME?1:2,this._lastSetTapCountTime=t,e.tapCount=i}else e.type!==n.Change&&e.type!==n.Contextmenu||(this._lastSetTapCountTime=0);for(let t=0;t{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)}))}inertia(e,t,i,o,s,a,c,h){this.handle=r.jL((()=>{let r=Date.now(),d=r-t,u=0,g=0,f=!0;i+=l.SCROLL_FRICTION*d,a+=l.SCROLL_FRICTION*d,i>0&&(f=!1,u=o*i*d),a>0&&(f=!1,g=c*a*d);let p=this.newGestureEvent(n.Change);p.translationX=u,p.translationY=g,e.forEach((e=>e.dispatchEvent(p))),f||this.inertia(e,r,i,o,s+u,a,c,h+g)}))}onTouchMove(e){let t=Date.now();for(let i=0,r=e.changedTouches.length;i3&&(s.rollingPageX.shift(),s.rollingPageY.shift(),s.rollingTimestamps.shift()),s.rollingPageX.push(r.pageX),s.rollingPageY.push(r.pageY),s.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}l.SCROLL_FRICTION=-.005,l.HOLD_DELAY=700,l.CLEAR_TAP_COUNT_TIME=400,function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);o>3&&s&&Object.defineProperty(t,i,s)}([s.H],l,"isTouchDevice",null)},6033:(e,t,i)=>{"use strict";i.d(t,{Y:()=>u,g:()=>g});var n=i(6268),r=i(3547),o=i(5321),s=i(553),a=i(4741),l=i(5976),c=i(1432),h=i(8401),d=(i(958),i(3580));class u extends l.JT{constructor(e,t,i={}){super(),this.options=i,this._context=e||this,this._action=t,t instanceof a.aU&&this._register(t.onDidChange((e=>{this.element&&this.handleActionChangeEvent(e)})))}handleActionChangeEvent(e){void 0!==e.enabled&&this.updateEnabled(),void 0!==e.checked&&this.updateChecked(),void 0!==e.class&&this.updateClass(),void 0!==e.label&&(this.updateLabel(),this.updateTooltip()),void 0!==e.tooltip&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new a.Wi)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(s.o.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,n.isFirefox&&this._register((0,o.nm)(e,o.tw.DRAG_START,(e=>{var t;return null===(t=e.dataTransfer)||void 0===t?void 0:t.setData(r.go.TEXT,this._action.label)})))),this._register((0,o.nm)(t,s.t.Tap,(e=>this.onClick(e,!0)))),this._register((0,o.nm)(t,o.tw.MOUSE_DOWN,(e=>{i||o.zB.stop(e,!0),this._action.enabled&&0===e.button&&t.classList.add("active")}))),c.dz&&this._register((0,o.nm)(t,o.tw.CONTEXT_MENU,(e=>{0===e.button&&!0===e.ctrlKey&&this.onClick(e)}))),this._register((0,o.nm)(t,o.tw.CLICK,(e=>{o.zB.stop(e,!0),this.options&&this.options.isMenu||this.onClick(e)}))),this._register((0,o.nm)(t,o.tw.DBLCLICK,(e=>{o.zB.stop(e,!0)}))),[o.tw.MOUSE_UP,o.tw.MOUSE_OUT].forEach((e=>{this._register((0,o.nm)(t,e,(e=>{o.zB.stop(e),t.classList.remove("active")})))}))}onClick(e,t=!1){var i;o.zB.stop(e,!0);const n=h.Jp(this._context)?(null===(i=this.options)||void 0===i?void 0:i.useEventAsContext)?e:{preserveFocus:t}:this._context;this.actionRunner.run(this._action,n)}focus(){this.element&&(this.element.tabIndex=0,this.element.focus(),this.element.classList.add("focused"))}blur(){this.element&&(this.element.blur(),this.element.tabIndex=-1,this.element.classList.remove("focused"))}setFocusable(e){this.element&&(this.element.tabIndex=e?0:-1)}get trapsArrowNavigation(){return!1}updateEnabled(){}updateLabel(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class g extends u{constructor(e,t,i={}){super(e,t,i),this.options=i,this.options.icon=void 0!==i.icon&&i.icon,this.options.label=void 0===i.label||i.label,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=(0,o.R3)(this.element,(0,o.$)("a.action-label"))),this.label&&(this._action.id===a.Z0.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&((0,o.R3)(this.element,(0,o.$)("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}focus(){this.label&&(this.label.tabIndex=0,this.label.focus())}blur(){this.label&&(this.label.tabIndex=-1)}setFocusable(e){this.label&&(this.label.tabIndex=e?0:-1)}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this.getAction().label)}updateTooltip(){let 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=d.N({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}},317:(e,t,i)=>{"use strict";i.d(t,{o:()=>d});var n=i(5321),r=i(9069),o=i(6033),s=i(4741),a=i(4669),l=i(5976),c=i(8401),h=(i(958),function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))});class d extends l.JT{constructor(e,t={}){var i,l,c,h,d,u;let g,f;switch(super(),this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new a.Q5),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new a.Q5({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new a.Q5),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new a.Q5),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=null!==(i=t.context)&&void 0!==i?i:null,this._orientation=null!==(l=this.options.orientation)&&void 0!==l?l:0,this._triggerKeys={keyDown:null!==(h=null===(c=this.options.triggerKeys)||void 0===c?void 0:c.keyDown)&&void 0!==h&&h,keys:null!==(u=null===(d=this.options.triggerKeys)||void 0===d?void 0:d.keys)&&void 0!==u?u:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new s.Wi,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun((e=>this._onDidRun.fire(e)))),this._register(this._actionRunner.onBeforeRun((e=>this._onBeforeRun.fire(e)))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",!1!==t.animated&&this.domNode.classList.add("animated"),this._orientation){case 0:g=[15],f=[17];break;case 1:g=[16],f=[18],this.domNode.className+=" vertical"}this._register(n.nm(this.domNode,n.tw.KEY_DOWN,(e=>{const t=new r.y(e);let i=!0;const n="number"==typeof this.focusedItem?this.viewItems[this.focusedItem]:void 0;g&&(t.equals(g[0])||t.equals(g[1]))?i=this.focusPrevious():f&&(t.equals(f[0])||t.equals(f[1]))?i=this.focusNext():t.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():t.equals(14)?i=this.focusFirst():t.equals(13)?i=this.focusLast():t.equals(2)&&n instanceof o.Y&&n.trapsArrowNavigation?i=this.focusNext():this.isTriggerKeyEvent(t)?this._triggerKeys.keyDown?this.doTrigger(t):this.triggerKeyDown=!0:i=!1,i&&(t.preventDefault(),t.stopPropagation())}))),this._register(n.nm(this.domNode,n.tw.KEY_UP,(e=>{const t=new r.y(e);this.isTriggerKeyEvent(t)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(t)),t.preventDefault(),t.stopPropagation()):(t.equals(2)||t.equals(1026))&&this.updateFocusedItem()}))),this.focusTracker=this._register(n.go(this.domNode)),this._register(this.focusTracker.onDidBlur((()=>{n.vY()!==this.domNode&&n.jg(n.vY(),this.domNode)||(this._onDidBlur.fire(),this.focusedItem=void 0,this.previouslyFocusedItem=void 0,this.triggerKeyDown=!1)}))),this._register(this.focusTracker.onDidFocus((()=>this.updateFocusedItem()))),this.actionsList=document.createElement("ul"),this.actionsList.className="actions-container",this.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}refreshRole(){this.length()>=2?this.actionsList.setAttribute("role","toolbar"):this.actionsList.setAttribute("role","presentation")}setFocusable(e){if(this.focusable=e,this.focusable){const e=this.viewItems.find((e=>e instanceof o.Y&&e.isEnabled()));e instanceof o.Y&&e.setFocusable(!0)}else this.viewItems.forEach((e=>{e instanceof o.Y&&e.setFocusable(!1)}))}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach((i=>{t=t||e.equals(i)})),t}updateFocusedItem(){for(let e=0;et.setActionContext(e)))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach((t=>t.actionRunner=e)))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let r=c.hj(t.index)?t.index:null;i.forEach((e=>{const i=document.createElement("li");let s;i.className="action-item",i.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(n.nm(i,n.tw.CONTEXT_MENU,(e=>{n.zB.stop(e,!0)}))),this.options.actionViewItemProvider&&(s=this.options.actionViewItemProvider(e)),s||(s=new o.g(this.context,e,t)),s.actionRunner=this._actionRunner,s.setActionContext(this.context),s.render(i),this.focusable&&s instanceof o.Y&&0===this.viewItems.length&&s.setFocusable(!0),null===r||r<0||r>=this.actionsList.children.length?(this.actionsList.appendChild(i),this.viewItems.push(s),this._actionIds.push(e.id)):(this.actionsList.insertBefore(i,this.actionsList.children[r]),this.viewItems.splice(r,0,s),this._actionIds.splice(r,0,e.id),r++)})),"number"==typeof this.focusedItem&&this.focus(this.focusedItem),this.refreshRole()}clear(){(0,l.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],n.PO(this.actionsList),this.refreshRole()}length(){return this.viewItems.length}focus(e){let t,i=!1;if(void 0===e?i=!0:"number"==typeof e?t=e:"boolean"==typeof e&&(i=e),i&&void 0===this.focusedItem){const e=this.viewItems.findIndex((e=>e.isEnabled()));this.focusedItem=-1===e?void 0:e,this.updateFocus(void 0,void 0,!0)}else void 0!==t&&(this.focusedItem=t),this.updateFocus(void 0,void 0,!0)}focusFirst(){return this.focusedItem=this.length()-1,this.focusNext(!0)}focusLast(){return this.focusedItem=0,this.focusPrevious(!0)}focusNext(e){if(void 0===this.focusedItem)this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(!e&&this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=t,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(),!0}focusPrevious(e){if(void 0===this.focusedItem)this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const t=this.focusedItem;let i;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(!e&&this.options.preventLoopNavigation)return this.focusedItem=t,!1;this.focusedItem=this.viewItems.length-1}i=this.viewItems[this.focusedItem]}while(this.focusedItem!==t&&this.options.focusOnlyEnabledItems&&!i.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t,i=!1){var n;void 0===this.focusedItem&&this.actionsList.focus({preventScroll:t}),void 0!==this.previouslyFocusedItem&&this.previouslyFocusedItem!==this.focusedItem&&(null===(n=this.viewItems[this.previouslyFocusedItem])||void 0===n||n.blur());const r=void 0!==this.focusedItem&&this.viewItems[this.focusedItem];if(r){let n=!0;c.mf(r.focus)||(n=!1),this.options.focusOnlyEnabledItems&&c.mf(r.isEnabled)&&!r.isEnabled()&&(n=!1),n?(i||this.previouslyFocusedItem!==this.focusedItem)&&(r.focus(e),this.previouslyFocusedItem=this.focusedItem):(this.actionsList.focus({preventScroll:t}),this.previouslyFocusedItem=void 0)}}doTrigger(e){if(void 0===this.focusedItem)return;const t=this.viewItems[this.focusedItem];if(t instanceof o.Y){const i=null===t._context||void 0===t._context?e:t._context;this.run(t._action,i)}}run(e,t){return h(this,void 0,void 0,(function*(){yield this._actionRunner.run(e,t)}))}dispose(){(0,l.B9)(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}},1588:(e,t,i)=>{"use strict";i.d(t,{Z9:()=>k,wW:()=>S,i7:()=>L});var n=i(5321),r=i(1432),o=i(3379),s=i.n(o),a=i(7795),l=i.n(a),c=i(569),h=i.n(c),d=i(3565),u=i.n(d),g=i(9216),f=i.n(g),p=i(4589),m=i.n(p),_=i(6513),v={};let b,y,w,C,x;function S(e){b=document.createElement("div"),b.className="monaco-aria-container";const t=()=>{const e=document.createElement("div");return e.className="monaco-alert",e.setAttribute("role","alert"),e.setAttribute("aria-atomic","true"),b.appendChild(e),e};y=t(),w=t();const i=()=>{const e=document.createElement("div");return e.className="monaco-status",e.setAttribute("role","complementary"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),b.appendChild(e),e};C=i(),x=i(),e.appendChild(b)}function k(e){b&&(y.textContent!==e?(n.PO(w),N(y,e)):(n.PO(y),N(w,e)))}function L(e){b&&(r.dz?k(e):C.textContent!==e?(n.PO(x),N(C,e)):(n.PO(C),N(x,e)))}function N(e,t){n.PO(e),t.length>2e4&&(t=t.substr(0,2e4)),e.textContent=t,e.style.visibility="hidden",e.style.visibility="visible"}v.styleTagTransform=m(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=f(),s()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals},5087:(e,t,i)=>{"use strict";i.d(t,{X:()=>C});var n=i(3794),r=i(3046),o=i(1264),s=i(4669),a=i(3379),l=i.n(a),c=i(7795),h=i.n(c),d=i(569),u=i.n(d),g=i(3565),f=i.n(g),p=i(9216),m=i.n(p),_=i(4589),v=i.n(_),b=i(8093),y={};y.styleTagTransform=v(),y.setAttributes=f(),y.insert=u().bind(null,"head"),y.domAPI=h(),y.insertStyleElement=m(),l()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals;const w={inputActiveOptionBorder:o.Il.fromHex("#007ACC00"),inputActiveOptionForeground:o.Il.fromHex("#FFFFFF"),inputActiveOptionBackground:o.Il.fromHex("#0E639C50")};class C extends n.${constructor(e){super(),this._onChange=this._register(new s.Q5),this.onChange=this._onChange.event,this._onKeyDown=this._register(new s.Q5),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},w),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...r.dT.asClassNameArray(this._opts.icon)),this._opts.actionClassName&&t.push(...this._opts.actionClassName.split(" ")),this._checked&&t.push("checked"),this.domNode=document.createElement("div"),this.domNode.title=this._opts.title,this.domNode.classList.add(...t),this._opts.notFocusable||(this.domNode.tabIndex=0),this.domNode.setAttribute("role","checkbox"),this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.setAttribute("aria-label",this._opts.title),this.applyStyles(),this.onclick(this.domNode,(e=>{this.enabled&&(this.checked=!this._checked,this._onChange.fire(!1),e.preventDefault())})),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,(e=>{if(10===e.keyCode||3===e.keyCode)return this.checked=!this._checked,this._onChange.fire(!0),void e.preventDefault();this._onKeyDown.fire(e)}))}get enabled(){return"true"!==this.domNode.getAttribute("aria-disabled")}focus(){this.domNode.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this.domNode.setAttribute("aria-checked",String(this._checked)),this.domNode.classList.toggle("checked",this._checked),this.applyStyles()}width(){return 22}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}},786:(e,t,i)=>{"use strict";i.d(t,{a:()=>y});var n=i(3046),r=i(3379),o=i.n(r),s=i(7795),a=i.n(s),l=i(569),c=i.n(l),h=i(3565),d=i.n(h),u=i(9216),g=i.n(u),f=i(4589),p=i.n(f),m=i(6921),_={};_.styleTagTransform=p(),_.setAttributes=d(),_.insert=c().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=g(),o()(m.Z,_),m.Z&&m.Z.locals&&m.Z.locals;var v=i(7543),b={};function y(e){let t=e.definition;for(;t instanceof n.lA;)t=t.definition;return`.codicon-${e.id}:before { content: '${t.fontCharacter}'; }`}b.styleTagTransform=p(),b.setAttributes=d(),b.insert=c().bind(null,"head"),b.domAPI=a(),b.insertStyleElement=g(),o()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals},596:(e,t,i)=>{"use strict";i.d(t,{Z:()=>C});var n=i(5321),r=i(1264),o=i(6248),s=i(5924),a=i(3379),l=i.n(a),c=i(7795),h=i.n(c),d=i(569),u=i.n(d),g=i(3565),f=i.n(g),p=i(9216),m=i.n(p),_=i(4589),v=i.n(_),b=i(5448),y={};y.styleTagTransform=v(),y.setAttributes=f(),y.insert=u().bind(null,"head"),y.domAPI=h(),y.insertStyleElement=m(),l()(b.Z,y),b.Z&&b.Z.locals&&b.Z.locals;const w={badgeBackground:r.Il.fromHex("#4D4D4D"),badgeForeground:r.Il.fromHex("#FFFFFF")};class C{constructor(e,t){this.count=0,this.options=t||Object.create(null),(0,o.jB)(this.options,w,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=(0,n.R3)(e,(0,n.$)(".monaco-count-badge")),this.countFormat=this.options.countFormat||"{0}",this.titleFormat=this.options.titleFormat||"",this.setCount(this.options.count||0)}setCount(e){this.count=e,this.render()}setTitleFormat(e){this.titleFormat=e,this.render()}render(){this.element.textContent=(0,s.WU)(this.countFormat,this.count),this.element.title=(0,s.WU)(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}},3331:(e,t,i)=>{"use strict";i.d(t,{am:()=>d,n3:()=>h,vk:()=>c});var n=i(5087),r=i(3046),o=i(3580);const s=o.N("caseDescription","Match Case"),a=o.N("wordsDescription","Match Whole Word"),l=o.N("regexDescription","Use Regular Expression");class c extends n.X{constructor(e){super({icon:r.lA.caseSensitive,title:s+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class h extends n.X{constructor(e){super({icon:r.lA.wholeWord,title:a+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class d extends n.X{constructor(e){super({icon:r.lA.regex,title:l+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}},4650:(e,t,i)=>{"use strict";i.d(t,{q:()=>s});var n=i(5321),r=i(6811),o=i(6248);class s{constructor(e,t){var i;this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.supportIcons=null!==(i=null==t?void 0:t.supportIcons)&&void 0!==i&&i,this.domNode=n.R3(e,n.$("span.monaco-highlighted-label"))}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=s.escapeNewLines(e,t)),this.didEverRender&&this.text===e&&this.title===i&&o.fS(this.highlights,t)||(this.text=e,this.title=i,this.highlights=t,this.render())}render(){const e=[];let t=0;for(const i of this.highlights){if(i.end===i.start)continue;if(t{n="\r\n"===e?-1:0,r+=i;for(const e of t)e.end<=r||(e.start>=r&&(e.start+=n),e.end>=r&&(e.end+=n));return i+=n,"⏎"}))}}},2750:(e,t,i)=>{"use strict";i.d(t,{g:()=>T});var n=i(5321),r=i(4650),o=i(5393),s=i(1050),a=i(9365),l=i(1212),c=i(5976),h=i(8401),d=i(3580),u=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class g{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return u(this,void 0,void 0,(function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(void 0===e||(0,h.HD)(e)||e instanceof HTMLElement)n=e;else if((0,h.mf)(e.markdown)){this._hoverWidget||this.show((0,d.N)("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new s.A;const i=this._cancellationTokenSource.token;if(n=yield e.markdown(i),void 0===n&&(n=e.markdownNotSupportedFallback),this.isDisposed||i.isCancellationRequested)return}else n=null!==(i=e.markdown)&&void 0!==i?i:e.markdownNotSupportedFallback;this.show(n,t)}))}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:"element"===this.hoverDelegate.placement,hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}null==i||i.dispose()}hasContent(e){return!(!e||(0,a.Fr)(e)&&!e.value)}get isDisposed(){var e;return null===(e=this._hoverWidget)||void 0===e?void 0:e.isDisposed}dispose(){var e,t;null===(e=this._hoverWidget)||void 0===e||e.dispose(),null===(t=this._cancellationTokenSource)||void 0===t||t.dispose(!0),this._cancellationTokenSource=void 0}}var f=i(6248),p=i(1134),m=i(3379),_=i.n(m),v=i(7795),b=i.n(v),y=i(569),w=i.n(y),C=i(3565),x=i.n(C),S=i(9216),k=i.n(S),L=i(4589),N=i.n(L),E=i(6388),D={};D.styleTagTransform=N(),D.setAttributes=x(),D.insert=w().bind(null,"head"),D.domAPI=b(),D.insertStyleElement=k(),_()(E.Z,D),E.Z&&E.Z.locals&&E.Z.locals;class A{constructor(e){this._element=e}get element(){return this._element}set textContent(e){this.disposed||e===this._textContent||(this._textContent=e,this._element.textContent=e)}set className(e){this.disposed||e===this._className||(this._className=e,this._element.className=e)}set empty(e){this.disposed||e===this._empty||(this._empty=e,this._element.style.marginLeft=e?"0":"")}dispose(){this.disposed=!0}}class T extends c.JT{constructor(e,t){super(),this.customHovers=new Map,this.domNode=this._register(new A(n.R3(e,n.$(".monaco-icon-label")))),this.labelContainer=n.R3(this.domNode.element,n.$(".monaco-icon-label-container"));const i=n.R3(this.labelContainer,n.$("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new A(n.R3(this.labelContainer,n.$("span.monaco-icon-description-container")))),(null==t?void 0:t.supportHighlights)||(null==t?void 0:t.supportIcons)?this.nameNode=new M(i,!!t.supportIcons):this.nameNode=new I(i),(null==t?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new r.q(n.R3(this.descriptionContainer.element,n.$("span.label-description")),{supportIcons:!!t.supportIcons}):this.descriptionNodeFactory=()=>this._register(new A(n.R3(this.descriptionContainer.element,n.$("span.label-description")))),this.hoverDelegate=null==t?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover((null==i?void 0:i.descriptionTitle)?this.labelContainer:this.element,null==i?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof r.q?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,null==i?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(null==i?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),t)if(this.hoverDelegate){const i=function(e,t,i){let r,s;const a=(t,i)=>{var n;t&&(null==s||s.dispose(),s=void 0),i&&(null==r||r.dispose(),r=void 0),null===(n=e.onDidHideHover)||void 0===n||n.call(e)},l=(n,r,a)=>new o._F((()=>u(this,void 0,void 0,(function*(){s&&!s.isDisposed||(s=new g(e,a||t,n>0),yield s.update(i,r))}))),n),h=n.nm(t,n.tw.MOUSE_OVER,(()=>{if(r)return;const i=new c.SL;i.add(n.nm(t,n.tw.MOUSE_LEAVE,(e=>a(!1,e.fromElement===t)),!0)),i.add(n.nm(t,n.tw.MOUSE_DOWN,(()=>a(!0,!0)),!0));const o={targetElements:[t],dispose:()=>{}};if(void 0===e.placement||"mouse"===e.placement){const e=e=>o.x=e.x+10;i.add(n.nm(t,n.tw.MOUSE_MOVE,e,!0))}i.add(l(e.delay,!1,o)),r=i}),!0);return{show:e=>{a(!1,!0),l(0,e)},hide:()=>{a(!0,!0)},update:e=>u(this,void 0,void 0,(function*(){i=e,yield null==s?void 0:s.update(i)})),dispose:()=>{h.dispose(),a(!0,!0)}}}(this.hoverDelegate,e,t);i&&this.customHovers.set(e,i)}else!function(e,t){(0,h.HD)(t)?e.title=(0,l.x$)(t):(null==t?void 0:t.markdownNotSupportedFallback)?e.title=t.markdownNotSupportedFallback:e.removeAttribute("title")}(e,t);else e.removeAttribute("title")}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class I{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(this.label!==e||!(0,f.fS)(this.options,t))if(this.label=e,this.options=t,"string"==typeof e)this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=n.R3(this.container,n.$("a.label-name",{id:null==t?void 0:t.domId}))),this.singleLabel.textContent=e;else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;for(let i=0;i{const r={start:n,end:n+e.length},o=i.map((e=>p.e.intersect(r,e))).filter((e=>!p.e.isEmpty(e))).map((({start:e,end:t})=>({start:e-n,end:t-n})));return n=r.end+t.length,o}))}(e,i,null==t?void 0:t.matches);for(let s=0;s{"use strict";i.d(t,{T:()=>s});var n=i(5321),r=i(3046);const o=new RegExp(`(\\\\)?\\$\\((${r.dT.iconNameExpression}(?:${r.dT.iconModifierExpression})?)\\)`,"g");function s(e){const t=new Array;let i,n=0,r=0;for(;null!==(i=o.exec(e));){r=i.index||0,t.push(e.substring(n,r)),n=(i.index||0)+i[0].length;const[,o,s]=i;t.push(o?`$(${s})`:a({id:s}))}return n{"use strict";i.d(t,{p:()=>M,W:()=>I});var n=i(5321),r=i(4850),o=i(8764),s=i(317),a=i(1588),l=i(433),c=i(3794),h=i(1264),d=i(4669);class u{constructor(e,t=0,i=e.length,n=t-1){this.items=e,this.start=t,this.end=i,this.index=n}current(){return this.index===this.start-1||this.index===this.end?null:this.items[this.index]}next(){return this.index=Math.min(this.index+1,this.end),this.current()}previous(){return this.index=Math.max(this.index-1,this.start-1),this.current()}first(){return this.index=this.start,this.current()}last(){return this.index=this.end-1,this.current()}}class g{constructor(e=[],t=10){this._initialize(e),this._limit=t,this._onChange()}getHistory(){return this._elements}add(e){this._history.delete(e),this._history.add(e),this._onChange()}next(){return this._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return 0!==this._currentPosition()?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new u(e,0,e.length,e.length)}_reduceToLimit(){const e=this._elements;e.length>this._limit&&this._initialize(e.slice(e.length-this._limit))}_currentPosition(){const e=this._navigator.current();return e?this._elements.indexOf(e):-1}_initialize(e){this._history=new Set;for(const t of e)this._history.add(t)}get _elements(){const e=[];return this._history.forEach((t=>e.push(t))),e}}var f=i(6248),p=i(3379),m=i.n(p),_=i(7795),v=i.n(_),b=i(569),y=i.n(b),w=i(3565),C=i.n(w),x=i(9216),S=i.n(x),k=i(4589),L=i.n(k),N=i(6153),E={};E.styleTagTransform=L(),E.setAttributes=C(),E.insert=y().bind(null,"head"),E.domAPI=v(),E.insertStyleElement=S(),m()(N.Z,E),N.Z&&N.Z.locals&&N.Z.locals;var D=i(3580);const A=n.$,T={inputBackground:h.Il.fromHex("#3C3C3C"),inputForeground:h.Il.fromHex("#CCCCCC"),inputValidationInfoBorder:h.Il.fromHex("#55AAFF"),inputValidationInfoBackground:h.Il.fromHex("#063B49"),inputValidationWarningBorder:h.Il.fromHex("#B89500"),inputValidationWarningBackground:h.Il.fromHex("#352A05"),inputValidationErrorBorder:h.Il.fromHex("#BE1100"),inputValidationErrorBackground:h.Il.fromHex("#5A1D1D")};class I extends c.${constructor(e,t,i){var o;super(),this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new d.Q5),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new d.Q5),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),(0,f.jB)(this.options,T,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=null!==(o=this.options.tooltip)&&void 0!==o?o:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=n.R3(e,A(".monaco-inputbox.idle"));let a=this.options.flexibleHeight?"textarea":"input",c=n.R3(this.element,A(".ibwrapper"));if(this.input=n.R3(c,A(a+".input.empty")),this.input.setAttribute("autocorrect","off"),this.input.setAttribute("autocapitalize","off"),this.input.setAttribute("spellcheck","false"),this.onfocus(this.input,(()=>this.element.classList.add("synthetic-focus"))),this.onblur(this.input,(()=>this.element.classList.remove("synthetic-focus"))),this.options.flexibleHeight){this.maxHeight="number"==typeof this.options.flexibleMaxHeight?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=n.R3(c,A("div.mirror")),this.mirror.innerText=" ",this.scrollableElement=new l.NB(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),n.R3(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll((e=>this.input.scrollTop=e.scrollTop)));const t=this._register(new r.Y(document,"selectionchange")),i=d.ju.filter(t.event,(()=>{const e=document.getSelection();return(null==e?void 0:e.anchorNode)===c}));this._register(i(this.updateScrollDimensions,this)),this._register(this.onDidHeightChange(this.updateScrollDimensions,this))}else this.input.type=this.options.type||"text",this.input.setAttribute("wrap","off");this.ariaLabel&&this.input.setAttribute("aria-label",this.ariaLabel),this.placeholder&&!this.options.showPlaceholderOnFocus&&this.setPlaceHolder(this.placeholder),this.tooltip&&this.setTooltip(this.tooltip),this.oninput(this.input,(()=>this.onValueChange())),this.onblur(this.input,(()=>this.onBlur())),this.onfocus(this.input,(()=>this.onFocus())),this.ignoreGesture(this.input),setTimeout((()=>this.updateMirror()),0),this.options.actions&&(this.actionbar=this._register(new s.o(this.element)),this.actionbar.push(this.options.actions,{icon:!0,label:!1})),this.applyStyles()}onBlur(){this._hideMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder","")}onFocus(){this._showMessage(),this.options.showPlaceholderOnFocus&&this.input.setAttribute("placeholder",this.placeholder||"")}setPlaceHolder(e){this.placeholder=e,this.input.setAttribute("placeholder",e)}setTooltip(e){this.tooltip=e,this.input.title=e}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}get inputElement(){return this.input}get value(){return this.input.value}set value(e){this.input.value!==e&&(this.input.value=e,this.onValueChange())}get height(){return"number"==typeof this.cachedHeight?this.cachedHeight:n.wn(this.element)}focus(){this.input.focus()}blur(){this.input.blur()}hasFocus(){return document.activeElement===this.input}select(e=null){this.input.select(),e&&(this.input.setSelectionRange(e.start,e.end),e.end===this.input.value.length&&(this.input.scrollLeft=this.input.scrollWidth))}isSelectionAtEnd(){return this.input.selectionEnd===this.input.value.length&&this.input.selectionStart===this.input.selectionEnd}enable(){this.input.removeAttribute("disabled")}disable(){this.blur(),this.input.disabled=!0,this._hideMessage()}get width(){return n.w(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;this.mirror&&(t=(parseFloat(this.mirror.style.paddingLeft||"")||0)+(parseFloat(this.mirror.style.paddingRight||"")||0)),this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.input.style.width=`calc(100% - ${e}px)`,this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if("number"!=typeof this.cachedContentHeight||"number"!=typeof this.cachedHeight||!this.scrollableElement)return;const e=this.cachedContentHeight,t=this.cachedHeight,i=this.input.scrollTop;this.scrollableElement.setScrollDimensions({scrollHeight:e,height:t}),this.scrollableElement.setScrollPosition({scrollTop:i})}showMessage(e,t){this.message=e,this.element.classList.remove("idle"),this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add(this.classForType(e.type));const i=this.stylesForType(this.message.type);this.element.style.border=i.border?`1px solid ${i.border}`:"",(this.hasFocus()||t)&&this._showMessage()}hideMessage(){this.message=null,this.element.classList.remove("info"),this.element.classList.remove("warning"),this.element.classList.remove("error"),this.element.classList.add("idle"),this._hideMessage(),this.applyStyles()}validate(){let e=null;return this.validation&&(e=this.validation(this.value),e?(this.inputElement.setAttribute("aria-invalid","true"),this.showMessage(e)):this.inputElement.hasAttribute("aria-invalid")&&(this.inputElement.removeAttribute("aria-invalid"),this.hideMessage())),null==e?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.inputValidationErrorForeground}}}classForType(e){switch(e){case 1:return"info";case 2:return"warning";default:return"error"}}_showMessage(){if(!this.contextViewProvider||!this.message)return;let e,t,i=()=>e.style.width=n.w(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:t=>{if(!this.message)return null;e=n.R3(t,A(".monaco-inputbox-container")),i();const r={inline:!0,className:"monaco-inputbox-message"},s=this.message.formatContent?(0,o.BO)(this.message.content,r):(0,o.IY)(this.message.content,r);s.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return s.style.backgroundColor=a.background?a.background.toString():"",s.style.color=a.foreground?a.foreground.toString():"",s.style.border=a.border?`1px solid ${a.border}`:"",n.R3(e,s),null},onHide:()=>{this.state="closed"},layout:i}),t=3===this.message.type?D.N("alertErrorMessage","Error: {0}",this.message.content):2===this.message.type?D.N("alertWarningMessage","Warning: {0}",this.message.content):D.N("alertInfoMessage","Info: {0}",this.message.content),a.Z9(t),this.state="open"}_hideMessage(){this.contextViewProvider&&("open"===this.state&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),"open"===this.state&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,t=10===e.charCodeAt(e.length-1)?" ":"";(e+t).replace(/\u000c/g,"")?this.mirror.textContent=e+t:this.mirror.innerText=" ",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=n.wn(this.mirror),e!==this.cachedContentHeight&&(this.cachedHeight=Math.min(this.cachedContentHeight,this.maxHeight),this.input.style.height=this.cachedHeight+"px",this._onDidHeightChange.fire(this.cachedContentHeight))}insertAtCursor(e){const t=this.inputElement,i=t.selectionStart,n=t.selectionEnd,r=t.value;null!==i&&null!==n&&(this.value=r.substr(0,i)+e+r.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class M extends I{constructor(e,t,i){const n=D.N({key:"history.inputbox.hint",comment:["Text will be prefixed with ⇅ plus a single space, then used as a hint where input field keeps history"]},"for history"),r=` or ⇅ ${n}`,o=` (⇅ ${n})`;super(e,t,i),this.history=new g(i.history,100);const s=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(r)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const e=this.placeholder.endsWith(")")?r:o,t=this.placeholder+e;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=t:this.setPlaceHolder(t)}};this.observer=new MutationObserver(((e,t)=>{e.forEach((e=>{e.target.textContent||s()}))})),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,(()=>s())),this.onblur(this.input,(()=>{const e=e=>{if(this.placeholder.endsWith(e)){const t=this.placeholder.slice(0,this.placeholder.length-e.length);return i.showPlaceholderOnFocus?this.placeholder=t:this.setPlaceHolder(t),!0}return!1};e(o)||e(r)}))}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,a.i7(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,a.i7(this.value))}getCurrentValue(){let e=this.history.current();return e||(e=this.history.last(),this.history.next()),e}getPreviousValue(){return this.history.previous()||this.history.first()}getNextValue(){return this.history.next()||this.history.last()}}},5707:(e,t,i)=>{"use strict";i.d(t,{kX:()=>x,Bv:()=>N});var n=i(6268),r=i(3547),o=i(5321),s=i(4850),a=i(553),l=i(433),c=i(9488),h=i(5393),d=i(9898),u=i(4669),g=i(5976),f=i(6248),p=i(1134),m=i(6633);function _(e,t){const i=[];for(let n of t){if(e.start>=n.range.end)continue;if(e.end({range:v(e.range,n),size:e.size}))),s=i.map(((t,i)=>({range:{start:e+i,end:e+i+1},size:t.size})));this.groups=function(...e){return function(e){const t=[];let i=null;for(let n of e){const e=n.range.start,r=n.range.end,o=n.size;i&&o===i.size?i.range.end=r:(i={range:{start:e,end:r},size:o},t.push(i))}return t}(e.reduce(((e,t)=>e.concat(t)),[]))}(r,s,o),this._size=this.groups.reduce(((e,t)=>e+t.size*(t.range.end-t.range.start)),0)}get count(){const e=this.groups.length;return e?this.groups[e-1].range.end:0}get size(){return this._size}indexAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const r=n.range.end-n.range.start,o=i+r*n.size;if(e{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null})),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var w=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};const C={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements:e=>[e],getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class x{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class S{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class k{constructor(){this.types=[],this.files=[]}update(e){if(e.types&&this.types.splice(0,this.types.length,...e.types),e.files){this.files.splice(0,this.files.length);for(let t=0;ti,(null==e?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(e,t)=>t+1,(null==e?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=e=>"listitem",(null==e?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=e=>{}}}class N{constructor(e,t,i,n=C){if(this.virtualDelegate=t,this.domId="list_id_"+ ++N.InstanceCount,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new h.vp(50),this.splicing=!1,this.dragOverAnimationStopDisposable=g.JT.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=g.JT.None,this.onDragLeaveTimeout=g.JT.None,this.disposables=new g.SL,this._onDidChangeContentHeight=new u.Q5,this._horizontalScrolling=!1,n.horizontalScrolling&&n.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");this.items=[],this.itemId=0,this.rangeMap=new b;for(const e of i)this.renderers.set(e.templateId,e);this.cache=this.disposables.add(new y(this.renderers)),this.lastRenderTop=0,this.lastRenderHeight=0,this.domNode=document.createElement("div"),this.domNode.className="monaco-list",this.domNode.classList.add(this.domId),this.domNode.tabIndex=0,this.domNode.classList.toggle("mouse-support","boolean"!=typeof n.mouseSupport||n.mouseSupport),this._horizontalScrolling=(0,f.CJ)(n,(e=>e.horizontalScrolling),C.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=void 0===n.additionalScrollHeight?0:n.additionalScrollHeight,this.accessibilityProvider=new L(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",(0,f.CJ)(n,(e=>e.transformOptimization),C.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(a.o.addTarget(this.rowsContainer)),this.scrollable=new m.Rm({forceIntegerValues:!0,smoothScrollDuration:(0,f.CJ)(n,(e=>e.smoothScrolling),!1)?125:0,scheduleAtNextAnimationFrame:e=>(0,o.jL)(e)}),this.scrollableElement=this.disposables.add(new l.$Z(this.rowsContainer,{alwaysConsumeMouseWheel:(0,f.CJ)(n,(e=>e.alwaysConsumeMouseWheel),C.alwaysConsumeMouseWheel),horizontal:1,vertical:(0,f.CJ)(n,(e=>e.verticalScrollMode),C.verticalScrollMode),useShadows:(0,f.CJ)(n,(e=>e.useShadows),C.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add((0,o.nm)(this.rowsContainer,a.t.Change,(e=>this.onTouchChange(e)))),this.disposables.add((0,o.nm)(this.scrollableElement.getDomNode(),"scroll",(e=>e.target.scrollTop=0))),this.disposables.add((0,o.nm)(this.domNode,"dragover",(e=>this.onDragOver(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"drop",(e=>this.onDrop(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragleave",(e=>this.onDragLeave(this.toDragEvent(e))))),this.disposables.add((0,o.nm)(this.domNode,"dragend",(e=>this.onDragEnd(e)))),this.setRowLineHeight=(0,f.CJ)(n,(e=>e.setRowLineHeight),C.setRowLineHeight),this.setRowHeight=(0,f.CJ)(n,(e=>e.setRowHeight),C.setRowHeight),this.supportDynamicHeights=(0,f.CJ)(n,(e=>e.supportDynamicHeights),C.supportDynamicHeights),this.dnd=(0,f.CJ)(n,(e=>e.dnd),C.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}get horizontalScrolling(){return this._horizontalScrolling}set horizontalScrolling(e){if(e!==this._horizontalScrolling){if(e&&this.supportDynamicHeights)throw new Error("Horizontal scrolling and dynamic heights not supported simultaneously");if(this._horizontalScrolling=e,this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this._horizontalScrolling){for(const e of this.items)this.measureItemWidth(e);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:(0,o.FK)(this.domNode)}),this.rowsContainer.style.width=`${Math.max(this.scrollWidth||0,this.renderWidth)}px`}else this.scrollableElementWidthDelayer.cancel(),this.scrollableElement.setScrollDimensions({width:this.renderWidth,scrollWidth:this.renderWidth}),this.rowsContainer.style.width=""}}updateOptions(e){void 0!==e.additionalScrollHeight&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),void 0!==e.smoothScrolling&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),void 0!==e.horizontalScrolling&&(this.horizontalScrolling=e.horizontalScrolling),void 0!==e.mouseWheelScrollSensitivity&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),void 0!==e.fastScrollSensitivity&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}splice(e,t,i=[]){if(this.splicing)throw new Error("Can't run recursive splices.");this.splicing=!0;try{return this._splice(e,t,i)}finally{this.splicing=!1,this._onDidChangeContentHeight.fire(this.contentHeight)}}_splice(e,t,i=[]){const n=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),r={start:e,end:e+t},o=p.e.intersect(n,r),s=new Map;for(let e=o.end-1;e>=o.start;e--){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.row){let i=s.get(t.templateId);i||(i=[],s.set(t.templateId,i));const n=this.renderers.get(t.templateId);n&&n.disposeElement&&n.disposeElement(t.element,e,t.row.templateData,t.size),i.push(t.row)}t.row=null}const a={start:e+t,end:this.items.length},l=p.e.intersect(a,n),c=p.e.relativeComplement(a,n),h=i.map((e=>({id:String(this.itemId++),element:e,templateId:this.virtualDelegate.getTemplateId(e),size:this.virtualDelegate.getHeight(e),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(e),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:g.JT.None,checkedDisposable:g.JT.None})));let d;0===e&&t>=this.items.length?(this.rangeMap=new b,this.rangeMap.splice(0,0,h),d=this.items,this.items=h):(this.rangeMap.splice(e,t,h),d=this.items.splice(e,t,...h));const u=i.length-t,f=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),m=v(l,u),_=p.e.intersect(f,m);for(let e=_.start;e<_.end;e++)this.updateItemInDOM(this.items[e],e);const y=p.e.relativeComplement(m,f);for(const e of y)for(let t=e.start;tv(e,u))),C=[{start:e,end:e+i.length},...w].map((e=>p.e.intersect(f,e))),x=this.getNextToLastElement(C);for(const e of C)for(let t=e.start;te.element))}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=(0,o.jL)((()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null})))}eventuallyUpdateScrollWidth(){this.horizontalScrolling?this.scrollableElementWidthDelayer.trigger((()=>this.updateScrollWidth())):this.scrollableElementWidthDelayer.cancel()}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)void 0!==t.width&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:0===e?0:e+10})}rerender(){if(this.supportDynamicHeights){for(const e of this.items)e.lastDynamicHeightWidth=void 0;this._rerender(this.lastRenderTop,this.lastRenderHeight)}}get length(){return this.items.length}get renderHeight(){return this.scrollableElement.getScrollDimensions().height}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:"number"==typeof e?e:(0,o.If)(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),void 0!==t&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:"number"==typeof t?t:(0,o.FK)(this.domNode)})}render(e,t,i,n,r,o=!1){const s=this.getRenderRange(t,i),a=p.e.relativeComplement(s,e),l=p.e.relativeComplement(e,s),c=this.getNextToLastElement(a);if(o){const t=p.e.intersect(e,s);for(let e=t.start;en.row.domNode.setAttribute("aria-checked",String(!!e));e(s.value),n.checkedDisposable=s.onDidChange(e)}n.row.domNode.parentElement||(t?this.rowsContainer.insertBefore(n.row.domNode,t):this.rowsContainer.appendChild(n.row.domNode)),this.updateItemInDOM(n,e);const a=this.renderers.get(n.templateId);if(!a)throw new Error(`No renderer found for template id ${n.templateId}`);a&&a.renderElement(n.element,e,n.row.templateData,n.size);const l=this.dnd.getDragURI(n.element);n.dragStartDisposable.dispose(),n.row.domNode.draggable=!!l,l&&(n.dragStartDisposable=(0,o.nm)(n.row.domNode,"dragstart",(e=>this.onDragStart(n.element,l,e)))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=n.isFirefox?"-moz-fit-content":"fit-content",e.width=(0,o.FK)(e.row.domNode);const t=window.getComputedStyle(e.row.domNode);t.paddingLeft&&(e.width+=parseFloat(t.paddingLeft)),t.paddingRight&&(e.width+=parseFloat(t.paddingRight)),e.row.domNode.style.width=""}updateItemInDOM(e,t){e.row.domNode.style.top=`${this.elementTop(t)}px`,this.setRowHeight&&(e.row.domNode.style.height=`${e.size}px`),this.setRowLineHeight&&(e.row.domNode.style.lineHeight=`${e.size}px`),e.row.domNode.setAttribute("data-index",`${t}`),e.row.domNode.setAttribute("data-last-element",t===this.length-1?"true":"false"),e.row.domNode.setAttribute("data-parity",t%2==0?"even":"odd"),e.row.domNode.setAttribute("aria-setsize",String(this.accessibilityProvider.getSetSize(e.element,t,this.length))),e.row.domNode.setAttribute("aria-posinset",String(this.accessibilityProvider.getPosInSet(e.element,t))),e.row.domNode.setAttribute("id",this.getElementDomId(t)),e.row.domNode.classList.toggle("drop-target",e.dropTarget)}removeItemFromDOM(e){const t=this.items[e];if(t.dragStartDisposable.dispose(),t.checkedDisposable.dispose(),t.row){const i=this.renderers.get(t.templateId);i&&i.disposeElement&&i.disposeElement(t.element,e,t.row.templateData,t.size),this.cache.release(t.row),t.row=null}this.horizontalScrolling&&this.eventuallyUpdateScrollWidth()}getScrollTop(){return this.scrollableElement.getScrollPosition().scrollTop}setScrollTop(e,t){this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),this.scrollableElement.setScrollPosition({scrollTop:e,reuseAnimation:t})}get scrollTop(){return this.getScrollTop()}set scrollTop(e){this.setScrollTop(e)}get scrollHeight(){return this._scrollHeight+(this.horizontalScrolling?10:0)+this.additionalScrollHeight}get onMouseClick(){return u.ju.map(this.disposables.add(new s.Y(this.domNode,"click")).event,(e=>this.toMouseEvent(e)))}get onMouseDblClick(){return u.ju.map(this.disposables.add(new s.Y(this.domNode,"dblclick")).event,(e=>this.toMouseEvent(e)))}get onMouseMiddleClick(){return u.ju.filter(u.ju.map(this.disposables.add(new s.Y(this.domNode,"auxclick")).event,(e=>this.toMouseEvent(e))),(e=>1===e.browserEvent.button))}get onMouseDown(){return u.ju.map(this.disposables.add(new s.Y(this.domNode,"mousedown")).event,(e=>this.toMouseEvent(e)))}get onContextMenu(){return u.ju.any(u.ju.map(this.disposables.add(new s.Y(this.domNode,"contextmenu")).event,(e=>this.toMouseEvent(e))),u.ju.map(this.disposables.add(new s.Y(this.domNode,a.t.Contextmenu)).event,(e=>this.toGestureEvent(e))))}get onTouchStart(){return u.ju.map(this.disposables.add(new s.Y(this.domNode,"touchstart")).event,(e=>this.toTouchEvent(e)))}get onTap(){return u.ju.map(this.disposables.add(new s.Y(this.rowsContainer,a.t.Tap)).event,(e=>this.toGestureEvent(e)))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=void 0===t?void 0:this.items[t];return{browserEvent:e,index:t,element:i&&i.element}}onScroll(e){try{const t=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight);this.render(t,e.scrollTop,e.height,e.scrollLeft,e.scrollWidth),this.supportDynamicHeights&&this._rerender(e.scrollTop,e.height,e.inSmoothScrolling)}catch(t){throw console.error("Got bad scroll event:",e),t}}onTouchChange(e){e.preventDefault(),e.stopPropagation(),this.scrollTop-=e.translationY}onDragStart(e,t,i){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(r.go.TEXT,t),i.dataTransfer.setDragImage){let e;this.dnd.getDragLabel&&(e=this.dnd.getDragLabel(n,i)),void 0===e&&(e=String(n.length));const t=(0,o.$)(".monaco-drag-image");t.textContent=e,document.body.appendChild(t),i.dataTransfer.setDragImage(t,-10,-10),setTimeout((()=>document.body.removeChild(t)),0)}this.currentDragData=new x(n),r.P$.CurrentDragAndDropData=new S(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),r.P$.CurrentDragAndDropData&&"vscode-ui"===r.P$.CurrentDragAndDropData.getData())return!1;if(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer)return!1;if(!this.currentDragData)if(r.P$.CurrentDragAndDropData)this.currentDragData=r.P$.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new k}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop="boolean"==typeof t?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;let i;if(e.browserEvent.dataTransfer.dropEffect="boolean"!=typeof t&&0===t.effect?"copy":"move",i="boolean"!=typeof t&&t.feedback?t.feedback:void 0===e.index?[-1]:[e.index],i=(0,c.EB)(i).filter((e=>e>=-1&&ee-t)),i=-1===i[0]?[-1]:i,n=this.currentDragFeedback,o=i,Array.isArray(n)&&Array.isArray(o)?(0,c.fS)(n,o):n===o)return!0;var n,o;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),-1===i[0])this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=(0,g.OF)((()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")}));else{for(const e of i){const t=this.items[e];t.dropTarget=!0,t.row&&t.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=(0,g.OF)((()=>{for(const e of i){const t=this.items[e];t.dropTarget=!1,t.row&&t.row.domNode.classList.remove("drop-target")}}))}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=(0,h.Vg)((()=>this.clearDragOverFeedback()),100),this.currentDragData&&(null===(i=(t=this.dnd).onDragLeave)||void 0===i||i.call(t,this.currentDragData,e.element,e.index,e.browserEvent))}onDrop(e){if(!this.canDrop)return;const t=this.currentDragData;this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,r.P$.CurrentDragAndDropData=void 0,t&&e.browserEvent.dataTransfer&&(e.browserEvent.preventDefault(),t.update(e.browserEvent.dataTransfer),this.dnd.drop(t,e.element,e.index,e.browserEvent))}onDragEnd(e){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,r.P$.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=g.JT.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const e=(0,o.xQ)(this.domNode).top;this.dragOverAnimationDisposable=(0,o.jt)(this.animateDragAndDropScrollTop.bind(this,e))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=(0,h.Vg)((()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}),1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(void 0===this.dragOverMouseY)return;const t=this.dragOverMouseY-e,i=this.renderHeight-35;t<35?this.scrollTop+=Math.max(-14,Math.floor(.3*(t-35))):t>i&&(this.scrollTop+=Math.min(14,Math.floor(.3*(t-i))))}teardownDragAndDropScrollTopAnimation(){this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)}getItemIndexFromEventTarget(e){const t=this.scrollableElement.getDomNode();let i=e;for(;i instanceof HTMLElement&&i!==this.rowsContainer&&t.contains(i);){const e=i.getAttribute("data-index");if(e){const t=Number(e);if(!isNaN(t))return t}i=i.parentElement}}getRenderRange(e,t){return{start:this.rangeMap.indexAt(e),end:this.rangeMap.indexAfter(e+t-1)}}_rerender(e,t,i){const n=this.getRenderRange(e,t);let r,o;e===this.elementTop(n.start)?(r=n.start,o=0):n.end-n.start>1&&(r=n.start+1,o=this.elementTop(r)-e);let s=0;for(;;){const a=this.getRenderRange(e,t);let l=!1;for(let e=a.start;e{"use strict";i.d(t,{WK:()=>I,wD:()=>W,aV:()=>q,sx:()=>B,cK:()=>D,hD:()=>A,wn:()=>P,Zo:()=>R});var n=i(5321),r=i(4850),o=i(9069),s=i(553),a=i(1588);class l{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach((n=>n.splice(e,t,i)))}}var c=i(9488),h=i(5393),d=i(1264),u=i(9898),g=i(4669),f=i(5392),p=i(5976),m=i(9870),_=i(6248),v=i(1432),b=i(8401);i(1601);class y extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}var w,C=i(5707),x=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},S=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.name}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex((e=>e.templateData===i));if(n>=0){const e=this.renderedElements[n];this.trait.unrender(i),e.index=t}else{const e={index:t,templateData:i};this.renderedElements.push(e)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const r of this.renderedElements)r.index=e+t&&n.push({index:r.index+i-t,templateData:r.templateData});this.renderedElements=n}renderIndexes(e){for(const{index:t,templateData:i}of this.renderedElements)e.indexOf(t)>-1&&this.trait.renderIndex(t,i)}disposeTemplate(e){const t=this.renderedElements.findIndex((t=>t.templateData===e));t<0||this.renderedElements.splice(t,1)}}class L{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new g.Q5,this.onChange=this._onChange.event}get name(){return this._trait}get renderer(){return new k(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const r=i.length-t,o=e+t,s=[...this.sortedIndexes.filter((t=>tt?i+e:-1)).filter((e=>-1!==e)),...this.sortedIndexes.filter((e=>e>=o)).map((e=>e+r))],a=this.length+r;if(this.sortedIndexes.length>0&&0===s.length&&a>0){const t=null!==(n=this.sortedIndexes.find((t=>t>=e)))&&void 0!==n?n:a-1;s.push(Math.min(t,a-1))}this.renderer.splice(e,t,i.length),this._set(s,s),this.length=a}renderIndex(e,t){t.classList.toggle(this._trait,this.contains(e))}unrender(e){e.classList.remove(this._trait)}set(e,t){return this._set(e,[...e].sort(j),t)}_set(e,t,i){const n=this.indexes,r=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=H(r,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return(0,c.ry)(this.sortedIndexes,e,j)>=0}dispose(){(0,p.B9)(this._onChange)}}x([u.H],L.prototype,"renderer",null);class N extends L{constructor(e){super("selected"),this.setAriaSelected=e}renderIndex(e,t){super.renderIndex(e,t),this.setAriaSelected&&(this.contains(e)?t.setAttribute("aria-selected","true"):t.setAttribute("aria-selected","false"))}}class E{constructor(e,t,i){this.trait=e,this.view=t,this.identityProvider=i}splice(e,t,i){if(!this.identityProvider)return this.trait.splice(e,t,i.map((()=>!1)));const n=this.trait.get().map((e=>this.identityProvider.getId(this.view.element(e)).toString())),r=i.map((e=>n.indexOf(this.identityProvider.getId(e).toString())>-1));this.trait.splice(e,t,r)}}function D(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}function A(e){return!!e.classList.contains("monaco-editor")||!e.classList.contains("monaco-list")&&!!e.parentElement&&A(e.parentElement)}class T{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new p.SL,this.multipleSelectionDisposables=new p.SL,this.onKeyDown.filter((e=>3===e.keyCode)).on(this.onEnter,this,this.disposables),this.onKeyDown.filter((e=>16===e.keyCode)).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter((e=>18===e.keyCode)).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter((e=>11===e.keyCode)).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter((e=>12===e.keyCode)).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter((e=>9===e.keyCode)).on(this.onEscape,this,this.disposables),!1!==i.multipleSelectionSupport&&this.onKeyDown.filter((e=>(v.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return g.ju.chain(this.disposables.add(new r.Y(this.view.domNode,"keydown")).event).filter((e=>!D(e.target))).map((e=>new o.y(e)))}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter((e=>(v.dz?e.metaKey:e.ctrlKey)&&31===e.keyCode)).on(this.onCtrlA,this,this.multipleSelectionDisposables))}onEnter(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection(this.list.getFocus(),e.browserEvent)}onUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPrevious(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNext(1,!1,e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageUpArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusPreviousPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onPageDownArrow(e){e.preventDefault(),e.stopPropagation(),this.list.focusNextPage(e.browserEvent);const t=this.list.getFocus()[0];this.list.setAnchor(t),this.list.reveal(t),this.view.domNode.focus()}onCtrlA(e){e.preventDefault(),e.stopPropagation(),this.list.setSelection((0,c.w6)(this.list.length),e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus()}onEscape(e){this.list.getSelection().length&&(e.preventDefault(),e.stopPropagation(),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0),this.view.domNode.focus())}dispose(){this.disposables.dispose(),this.multipleSelectionDisposables.dispose()}}x([u.H],T.prototype,"onKeyDown",null),function(e){e[e.Idle=0]="Idle",e[e.Typing=1]="Typing"}(w||(w={}));const I=new class{mightProducePrintableCharacter(e){return!(e.ctrlKey||e.metaKey||e.altKey)&&(e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30||e.keyCode>=93&&e.keyCode<=102||e.keyCode>=80&&e.keyCode<=90)}};class M{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=w.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new p.SL,this.disposables=new p.SL,this.updateOptions(e.options)}updateOptions(e){void 0===e.enableKeyboardNavigation||e.enableKeyboardNavigation?this.enable():this.disable(),void 0!==e.automaticKeyboardNavigation&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=g.ju.chain(this.enabledDisposables.add(new r.Y(this.view.domNode,"keydown")).event).filter((e=>!D(e.target))).filter((()=>this.automaticKeyboardNavigation||this.triggered)).map((e=>new o.y(e))).filter((e=>this.delegate.mightProducePrintableCharacter(e))).forEach((e=>e.preventDefault())).map((e=>e.browserEvent.key)).event,t=g.ju.debounce(e,(()=>null),800);g.ju.reduce(g.ju.any(e,t),((e,t)=>null===t?null:(e||"")+t))(this.onInput,this,this.enabledDisposables),t(this.onClear,this,this.enabledDisposables),this.enabled=!0,this.triggered=!1}disable(){this.enabled&&(this.enabledDisposables.clear(),this.enabled=!1,this.triggered=!1)}onClear(){var e;const t=this.list.getFocus();if(t.length>0&&t[0]===this.previouslyFocused){const i=null===(e=this.list.options.accessibilityProvider)||void 0===e?void 0:e.getAriaLabel(this.list.element(t[0]));i&&(0,a.Z9)(i)}this.previouslyFocused=-1}onInput(e){if(!e)return this.state=w.Idle,void(this.triggered=!1);const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===w.Idle?1:0;this.state=w.Typing;for(let t=0;t!D(e.target))).map((e=>new o.y(e))).filter((e=>!(2!==e.keyCode||e.ctrlKey||e.metaKey||e.shiftKey||e.altKey))).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(0===t.length)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!(n&&n instanceof HTMLElement&&-1!==n.tabIndex))return;const r=window.getComputedStyle(n);"hidden"!==r.visibility&&"none"!==r.display&&(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function R(e){return v.dz?e.browserEvent.metaKey:e.browserEvent.ctrlKey}function P(e){return e.browserEvent.shiftKey}const F={isSelectionSingleChangeEvent:R,isSelectionRangeChangeEvent:P};class B{constructor(e){this.list=e,this.disposables=new p.SL,this._onPointer=new g.Q5,this.onPointer=this._onPointer.event,!1!==e.options.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||F),this.mouseSupport=void 0===e.options.mouseSupport||!!e.options.mouseSupport,this.mouseSupport&&(e.onMouseDown(this.onMouseDown,this,this.disposables),e.onContextMenu(this.onContextMenu,this,this.disposables),e.onMouseDblClick(this.onDoubleClick,this,this.disposables),e.onTouchStart(this.onMouseDown,this,this.disposables),this.disposables.add(s.o.addTarget(e.getHTMLElement()))),g.ju.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){void 0!==e.multipleSelectionSupport&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||F))}isSelectionSingleChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionSingleChangeEvent(e)}isSelectionRangeChangeEvent(e){return!!this.multipleSelectionController&&this.multipleSelectionController.isSelectionRangeChangeEvent(e)}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){A(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(A(e.browserEvent.target))return;const t=void 0===e.index?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport)return;if(D(e.browserEvent.target)||A(e.browserEvent.target))return;const t=e.index;return void 0===t?(this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),void this.list.setAnchor(void 0)):this.isSelectionRangeChangeEvent(e)||this.isSelectionChangeEvent(e)?this.changeSelection(e):(this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),(i=e.browserEvent)instanceof MouseEvent&&2===i.button||this.list.setSelection([t],e.browserEvent),void this._onPointer.fire(e));var i}onDoubleClick(e){if(D(e.browserEvent.target)||A(e.browserEvent.target))return;if(this.isSelectionChangeEvent(e))return;const t=this.list.getFocus();this.list.setSelection(t,e.browserEvent)}changeSelection(e){const t=e.index;let i=this.list.getAnchor();if(this.isSelectionRangeChangeEvent(e)){if(void 0===i){const e=this.list.getFocus()[0];i=null!=e?e:t,this.list.setAnchor(i)}const n=Math.min(i,t),r=Math.max(i,t),o=(0,c.w6)(n,r+1),s=this.list.getSelection(),a=function(e,t){const i=e.indexOf(t);if(-1===i)return[];const n=[];let r=i-1;for(;r>=0&&e[r]===t-(i-r);)n.push(e[r--]);for(n.reverse(),r=i;r=e.length)i.push(t[r++]);else if(r>=t.length)i.push(e[n++]);else{if(e[n]===t[r]){n++,r++;continue}e[n]e!==t));this.list.setFocus([t]),this.list.setAnchor(t),i.length===n.length?this.list.setSelection([...n,t],e.browserEvent):this.list.setSelection(n,e.browserEvent)}}dispose(){this.disposables.dispose()}}class W{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):v.dz||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; }\n\t\t\t`),e.listFocusAndSelectionForeground&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; }\n\t\t\t`),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(`\n\t\t\t\t.monaco-drag-image,\n\t\t\t\t.monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t\t.monaco-workbench.context-menu-visible .monaco-list${t}.last-focused .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; }\n\t\t\t`),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(`\n\t\t\t\t.monaco-list${t}.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-rows.drop-target,\n\t\t\t\t.monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; }\n\t\t\t`),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(`\n\t\t\t\t.monaco-table:hover > .monaco-split-view2,\n\t\t\t\t.monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before {\n\t\t\t\t\tborder-color: ${e.tableColumnsBorder};\n\t\t\t}`),e.tableOddRowsBackgroundColor&&i.push(`\n\t\t\t\t.monaco-table .monaco-list-row[data-parity=odd]:not(.focused):not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(:focus) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr,\n\t\t\t\t.monaco-table .monaco-list:not(.focused) .monaco-list-row[data-parity=odd].focused:not(.selected):not(:hover) .monaco-table-tr {\n\t\t\t\t\tbackground-color: ${e.tableOddRowsBackgroundColor};\n\t\t\t\t}\n\t\t\t`),this.styleElement.textContent=i.join("\n")}}const V={listFocusBackground:d.Il.fromHex("#7FB0D0"),listActiveSelectionBackground:d.Il.fromHex("#0E639C"),listActiveSelectionForeground:d.Il.fromHex("#FFFFFF"),listActiveSelectionIconForeground:d.Il.fromHex("#FFFFFF"),listFocusAndSelectionBackground:d.Il.fromHex("#094771"),listFocusAndSelectionForeground:d.Il.fromHex("#FFFFFF"),listInactiveSelectionBackground:d.Il.fromHex("#3F3F46"),listInactiveSelectionIconForeground:d.Il.fromHex("#FFFFFF"),listHoverBackground:d.Il.fromHex("#2A2D2E"),listDropBackground:d.Il.fromHex("#383B3D"),treeIndentGuidesStroke:d.Il.fromHex("#a9a9a9"),tableColumnsBorder:d.Il.fromHex("#cccccc").transparent(.2),tableOddRowsBackgroundColor:d.Il.fromHex("#cccccc").transparent(.04)},z={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI:()=>null,onDragStart(){},onDragOver:()=>!1,drop(){}}};function H(e,t){const i=[];let n=0,r=0;for(;n=e.length)i.push(t[r++]);else if(r>=t.length)i.push(e[n++]);else{if(e[n]===t[r]){i.push(e[n]),n++,r++;continue}e[n]e-t;class U{constructor(e,t){this._templateId=e,this.renderers=t}get templateId(){return this._templateId}renderTemplate(e){return this.renderers.map((t=>t.renderTemplate(e)))}renderElement(e,t,i,n){let r=0;for(const o of this.renderers)o.renderElement(e,t,i[r++],n)}disposeElement(e,t,i,n){let r=0;for(const o of this.renderers)o.disposeElement&&o.disposeElement(e,t,i[r],n),r+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class ${constructor(e){this.accessibilityProvider=e,this.templateId="a18n"}renderTemplate(e){return e}renderElement(e,t,i){const n=this.accessibilityProvider.getAriaLabel(e);n?i.setAttribute("aria-label",n):i.removeAttribute("aria-label");const r=this.accessibilityProvider.getAriaLevel&&this.accessibilityProvider.getAriaLevel(e);"number"==typeof r?i.setAttribute("aria-level",`${r}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class K{constructor(e,t){this.list=e,this.dnd=t}getDragElements(e){const t=this.list.getSelectedElements();return t.indexOf(e)>-1?t:[e]}getDragURI(e){return this.dnd.getDragURI(e)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e,t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var r,o;null===(o=(r=this.dnd).onDragLeave)||void 0===o||o.call(r,e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class q{constructor(e,t,i,r,o=z){var s;this.user=e,this._options=o,this.focus=new L("focused"),this.anchor=new L("anchor"),this.eventBufferer=new g.E7,this._ariaLabel="",this.disposables=new p.SL,this._onDidDispose=new g.Q5,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?null===(s=this._options.accessibilityProvider)||void 0===s?void 0:s.getWidgetRole():"list";this.selection=new N("listbox"!==a),(0,_.jB)(o,V,!1);const c=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=o.accessibilityProvider,this.accessibilityProvider&&(c.push(new $(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),r=r.map((e=>new U(e.templateId,[...c,e])));const h=Object.assign(Object.assign({},o),{dnd:o.dnd&&new K(this,o.dnd)});if(this.view=new C.Bv(t,i,r,h),this.view.domNode.setAttribute("role",a),o.styleController)this.styleController=o.styleController(this.view.domId);else{const e=(0,n.dS)(this.view.domNode);this.styleController=new W(e,this.view.domId)}if(this.spliceable=new l([new E(this.focus,this.view,o.identityProvider),new E(this.selection,this.view,o.identityProvider),new E(this.anchor,this.view,o.identityProvider),this.view]),this.disposables.add(this.focus),this.disposables.add(this.selection),this.disposables.add(this.anchor),this.disposables.add(this.view),this.disposables.add(this._onDidDispose),this.disposables.add(new O(this,this.view)),("boolean"!=typeof o.keyboardSupport||o.keyboardSupport)&&(this.keyboardController=new T(this,this.view,o),this.disposables.add(this.keyboardController)),o.keyboardNavigationLabelProvider){const e=o.keyboardNavigationDelegate||I;this.typeLabelController=new M(this,this.view,o.keyboardNavigationLabelProvider,e),this.disposables.add(this.typeLabelController)}this.mouseController=this.createMouseController(o),this.disposables.add(this.mouseController),this.onDidChangeFocus(this._onFocusChange,this,this.disposables),this.onDidChangeSelection(this._onSelectionChange,this,this.disposables),this.accessibilityProvider&&(this.ariaLabel=this.accessibilityProvider.getWidgetAriaLabel()),!1!==this._options.multipleSelectionSupport&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return g.ju.map(this.eventBufferer.wrapEvent(this.focus.onChange),(e=>this.toListEvent(e)))}get onDidChangeSelection(){return g.ju.map(this.eventBufferer.wrapEvent(this.selection.onChange),(e=>this.toListEvent(e)))}get domId(){return this.view.domId}get onMouseClick(){return this.view.onMouseClick}get onMouseDblClick(){return this.view.onMouseDblClick}get onMouseMiddleClick(){return this.view.onMouseMiddleClick}get onPointer(){return this.mouseController.onPointer}get onMouseDown(){return this.view.onMouseDown}get onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=g.ju.chain(this.disposables.add(new r.Y(this.view.domNode,"keydown")).event).map((e=>new o.y(e))).filter((t=>e=58===t.keyCode||t.shiftKey&&68===t.keyCode)).map(r.p).filter((()=>!1)).event,i=g.ju.chain(this.disposables.add(new r.Y(this.view.domNode,"keyup")).event).forEach((()=>e=!1)).map((e=>new o.y(e))).filter((e=>58===e.keyCode||e.shiftKey&&68===e.keyCode)).map(r.p).map((({browserEvent:e})=>{const t=this.getFocus(),i=t.length?t[0]:void 0;return{index:i,element:void 0!==i?this.view.element(i):void 0,anchor:void 0!==i?this.view.domElement(i):this.view.domNode,browserEvent:e}})).event,n=g.ju.chain(this.view.onContextMenu).filter((t=>!e)).map((({element:e,index:t,browserEvent:i})=>({element:e,index:t,anchor:{x:i.pageX+1,y:i.pageY},browserEvent:i}))).event;return g.ju.any(t,i,n)}get onKeyDown(){return this.disposables.add(new r.Y(this.view.domNode,"keydown")).event}get onDidFocus(){return g.ju.signal(this.disposables.add(new r.Y(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new B(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),void 0!==this._options.multipleSelectionController&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),null===(t=this.keyboardController)||void 0===t||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new y(this.user,`Invalid start index: ${e}`);if(t<0)throw new y(this.user,`Invalid delete count: ${t}`);0===t&&0===i.length||this.eventBufferer.bufferEvents((()=>this.spliceable.splice(e,t,i)))}rerender(){this.view.rerender()}element(e){return this.view.element(e)}get length(){return this.view.length}get contentHeight(){return this.view.contentHeight}get scrollTop(){return this.view.getScrollTop()}set scrollTop(e){this.view.setScrollTop(e)}get ariaLabel(){return this._ariaLabel}set ariaLabel(e){this._ariaLabel=e,this.view.domNode.setAttribute("aria-label",e)}domFocus(){this.view.domNode.focus({preventScroll:!0})}layout(e,t){this.view.layout(e,t)}setSelection(e,t){for(const t of e)if(t<0||t>=this.length)throw new y(this.user,`Invalid index ${t}`);this.selection.set(e,t)}getSelection(){return this.selection.get()}getSelectedElements(){return this.getSelection().map((e=>this.view.element(e)))}setAnchor(e){if(void 0!==e){if(e<0||e>=this.length)throw new y(this.user,`Invalid index ${e}`);this.anchor.set([e])}else this.anchor.set([])}getAnchor(){return(0,c.Xh)(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return void 0===e?void 0:this.element(e)}setFocus(e,t){for(const t of e)if(t<0||t>=this.length)throw new y(this.user,`Invalid index ${t}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(0===this.length)return;const r=this.focus.get(),o=this.findNextIndex(r.length>0?r[0]+e:0,t,n);o>-1&&this.setFocus([o],i)}focusPrevious(e=1,t=!1,i,n){if(0===this.length)return;const r=this.focus.get(),o=this.findPreviousIndex(r.length>0?r[0]-e:0,t,n);o>-1&&this.setFocus([o],i)}focusNextPage(e,t){return S(this,void 0,void 0,(function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=0===i?0:i-1;const n=this.view.element(i),r=this.getFocusedElements()[0];if(r!==n){const n=this.findPreviousIndex(i,!1,t);n>-1&&r!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const n=this.view.getScrollTop();this.view.setScrollTop(n+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==n&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusNextPage(e,t))}}))}focusPreviousPage(e,t){return S(this,void 0,void 0,(function*(){let i;const n=this.view.getScrollTop();i=0===n?this.view.indexAt(n):this.view.indexAfter(n-1);const r=this.view.element(i),o=this.getFocusedElements()[0];if(o!==r){const n=this.findNextIndex(i,!1,t);n>-1&&o!==this.view.element(n)?this.setFocus([n],e):this.setFocus([i],e)}else{const i=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==i&&(this.setFocus([]),yield(0,h.Vs)(0),yield this.focusPreviousPage(e,t))}}))}focusLast(e,t){if(0===this.length)return;const i=this.findPreviousIndex(this.length-1,!1,t);i>-1&&this.setFocus([i],e)}focusFirst(e,t){this.focusNth(0,e,t)}focusNth(e,t,i){if(0===this.length)return;const n=this.findNextIndex(e,!1,i);n>-1&&this.setFocus([n],t)}findNextIndex(e,t=!1,i){for(let n=0;n=this.length&&!t)return-1;if(e%=this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;nthis.view.element(e)))}reveal(e,t){if(e<0||e>=this.length)throw new y(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),r=this.view.elementHeight(e);if((0,b.hj)(t)){const e=r-this.view.renderHeight;this.view.setScrollTop(e*(0,m.uZ)(t,0,1)+n)}else{const e=n+r,t=i+this.view.renderHeight;n=t||(n=t&&r>=this.view.renderHeight?this.view.setScrollTop(n):e>=t&&this.view.setScrollTop(e-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new y(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(it+this.view.renderHeight)return null;const r=n-this.view.renderHeight;return Math.abs((t-i)/r)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map((e=>this.view.element(e))),browserEvent:t}}_onFocusChange(){const e=this.focus.get();this.view.domNode.classList.toggle("element-focused",e.length>0),this.onDidChangeActiveDescendant()}onDidChangeActiveDescendant(){var e;const t=this.focus.get();if(t.length>0){let i;(null===(e=this.accessibilityProvider)||void 0===e?void 0:e.getActiveDescendantId)&&(i=this.accessibilityProvider.getActiveDescendantId(this.view.element(t[0]))),this.view.domNode.setAttribute("aria-activedescendant",i||this.view.getElementDomId(t[0]))}else this.view.domNode.removeAttribute("aria-activedescendant")}_onSelectionChange(){const e=this.selection.get();this.view.domNode.classList.toggle("selection-none",0===e.length),this.view.domNode.classList.toggle("selection-single",1===e.length),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}x([u.H],q.prototype,"onDidChangeFocus",null),x([u.H],q.prototype,"onDidChangeSelection",null),x([u.H],q.prototype,"onContextMenu",null),x([u.H],q.prototype,"onKeyDown",null),x([u.H],q.prototype,"onDidFocus",null)},6237:(e,t,i)=>{"use strict";i.d(t,{S:()=>_});var n=i(3379),r=i.n(n),o=i(7795),s=i.n(o),a=i(569),l=i.n(a),c=i(3565),h=i.n(c),d=i(9216),u=i.n(d),g=i(4589),f=i.n(g),p=i(4147),m={};m.styleTagTransform=f(),m.setAttributes=h(),m.insert=l().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=u(),r()(p.Z,m),p.Z&&p.Z.locals&&p.Z.locals;const _="monaco-mouse-cursor-text"},3878:(e,t,i)=>{"use strict";i.d(t,{l:()=>k,g:()=>M});var n=i(5321),r=i(4850),o=i(553),s=i(5393),a=i(9898),l=i(4669),c=i(5976),h=i(1432),d=i(3379),u=i.n(d),g=i(7795),f=i.n(g),p=i(569),m=i.n(p),_=i(3565),v=i.n(_),b=i(9216),y=i.n(b),w=i(4589),C=i.n(w),x=i(9667),S={};S.styleTagTransform=C(),S.setAttributes=v(),S.insert=m().bind(null,"head"),S.domAPI=f(),S.insertStyleElement=y(),u()(x.Z,S),x.Z&&x.Z.locals&&x.Z.locals;var k,L=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s};!function(e){e.North="north",e.South="south",e.East="east",e.West="west"}(k||(k={}));const N=new l.Q5,E=new l.Q5;class D{constructor(){this.disposables=new c.SL}get onPointerMove(){return this.disposables.add(new r.Y(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new r.Y(window,"mouseup")).event}dispose(){this.disposables.dispose()}}L([a.H],D.prototype,"onPointerMove",null),L([a.H],D.prototype,"onPointerUp",null);class A{constructor(e){this.el=e,this.disposables=new c.SL}get onPointerMove(){return this.disposables.add(new r.Y(this.el,o.t.Change)).event}get onPointerUp(){return this.disposables.add(new r.Y(this.el,o.t.End)).event}dispose(){this.disposables.dispose()}}L([a.H],A.prototype,"onPointerMove",null),L([a.H],A.prototype,"onPointerUp",null);class T{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}L([a.H],T.prototype,"onPointerMove",null),L([a.H],T.prototype,"onPointerUp",null);const I="pointer-events-disabled";class M extends c.JT{constructor(e,t,i){super(),this.hoverDelay=300,this.hoverDelayer=this._register(new s.vp(this.hoverDelay)),this._state=3,this.onDidEnablementChange=this._register(new l.Q5),this._onDidStart=this._register(new l.Q5),this._onDidChange=this._register(new l.Q5),this._onDidReset=this._register(new l.Q5),this._onDidEnd=this._register(new l.Q5),this.orthogonalStartSashDisposables=this._register(new c.SL),this.orthogonalStartDragHandleDisposables=this._register(new c.SL),this.orthogonalEndSashDisposables=this._register(new c.SL),this.orthogonalEndDragHandleDisposables=this._register(new c.SL),this.onDidStart=this._onDidStart.event,this.onDidChange=this._onDidChange.event,this.onDidReset=this._onDidReset.event,this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.el=(0,n.R3)(e,(0,n.$)(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),h.dz&&this.el.classList.add("mac");const a=this._register(new r.Y(this.el,"mousedown")).event;this._register(a((e=>this.onPointerStart(e,new D)),this));const d=this._register(new r.Y(this.el,"dblclick")).event;this._register(d(this.onPointerDoublePress,this));const u=this._register(new r.Y(this.el,"mouseenter")).event;this._register(u((()=>M.onMouseEnter(this))));const g=this._register(new r.Y(this.el,"mouseleave")).event;this._register(g((()=>M.onMouseLeave(this)))),this._register(o.o.addTarget(this.el));const f=l.ju.map(this._register(new r.Y(this.el,o.t.Start)).event,(e=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(f((e=>this.onPointerStart(e,new A(this.el))),this));const p=this._register(new r.Y(this.el,o.t.Tap)).event,m=l.ju.map(l.ju.filter(l.ju.debounce(p,((e,t)=>{var i;return{event:t,count:(null!==(i=null==e?void 0:e.count)&&void 0!==i?i:0)+1}}),250),(({count:e})=>2===e)),(({event:e})=>{var t;return Object.assign(Object.assign({},e),{target:null!==(t=e.initialTarget)&&void 0!==t?t:null})}));this._register(m(this.onPointerDoublePress,this)),"number"==typeof i.size?(this.size=i.size,0===i.orientation?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=4,this._register(N.event((e=>{this.size=e,this.layout()})))),this._register(E.event((e=>this.hoverDelay=e))),this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,1===this.orientation?(this.el.classList.add("horizontal"),this.el.classList.remove("vertical")):(this.el.classList.remove("horizontal"),this.el.classList.add("vertical")),this.el.classList.toggle("debug",!1),this.layout()}get state(){return this._state}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",0===e),this.el.classList.toggle("minimum",1===e),this.el.classList.toggle("maximum",2===e),this._state=e,this.onDidEnablementChange.fire(e))}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=t=>{this.orthogonalStartDragHandleDisposables.clear(),0!==t&&(this._orthogonalStartDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add((0,c.OF)((()=>this._orthogonalStartDragHandle.remove()))),this.orthogonalStartDragHandleDisposables.add(new r.Y(this._orthogonalStartDragHandle,"mouseenter")).event((()=>M.onMouseEnter(e)),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new r.Y(this._orthogonalStartDragHandle,"mouseleave")).event((()=>M.onMouseLeave(e)),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalStartSash=e}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=t=>{this.orthogonalEndDragHandleDisposables.clear(),0!==t&&(this._orthogonalEndDragHandle=(0,n.R3)(this.el,(0,n.$)(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add((0,c.OF)((()=>this._orthogonalEndDragHandle.remove()))),this.orthogonalEndDragHandleDisposables.add(new r.Y(this._orthogonalEndDragHandle,"mouseenter")).event((()=>M.onMouseEnter(e)),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new r.Y(this._orthogonalEndDragHandle,"mouseleave")).event((()=>M.onMouseLeave(e)),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange.event(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){n.zB.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const n=this.getOrthogonalSash(e);n&&(i=!0,e.__orthogonalSashEvent=!0,n.onPointerStart(e,new T(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new T(t))),!this.state)return;const r=(0,n.H$)("iframe");for(const e of r)e.classList.add(I);const o=e.pageX,s=e.pageY,a=e.altKey,l={startX:o,currentX:o,startY:s,currentY:s,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const d=(0,n.dS)(this.el),u=()=>{let e="";e=i?"all-scroll":1===this.orientation?1===this.state?"s-resize":2===this.state?"n-resize":h.dz?"row-resize":"ns-resize":1===this.state?"e-resize":2===this.state?"w-resize":h.dz?"col-resize":"ew-resize",d.textContent=`* { cursor: ${e} !important; }`},g=new c.SL;u(),i||this.onDidEnablementChange.event(u,null,g),t.onPointerMove((e=>{n.zB.stop(e,!1);const t={startX:o,currentX:e.pageX,startY:s,currentY:e.pageY,altKey:a};this._onDidChange.fire(t)}),null,g),t.onPointerUp((e=>{n.zB.stop(e,!1),this.el.removeChild(d),this.el.classList.remove("active"),this._onDidEnd.fire(),g.dispose();for(const e of r)e.classList.remove(I)}),null,g),g.add(t)}onPointerDoublePress(e){const t=this.getOrthogonalSash(e);t&&t._onDidReset.fire(),this.linkedSash&&this.linkedSash._onDidReset.fire(),this._onDidReset.fire()}static onMouseEnter(e,t=!1){e.el.classList.contains("active")?(e.hoverDelayer.cancel(),e.el.classList.add("hover")):e.hoverDelayer.trigger((()=>e.el.classList.add("hover")),e.hoverDelay).then(void 0,(()=>{})),!t&&e.linkedSash&&M.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&M.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){M.onMouseLeave(this)}layout(){if(0===this.orientation){const e=this.layoutProvider;this.el.style.left=e.getVerticalSashLeft(this)-this.size/2+"px",e.getVerticalSashTop&&(this.el.style.top=e.getVerticalSashTop(this)+"px"),e.getVerticalSashHeight&&(this.el.style.height=e.getVerticalSashHeight(this)+"px")}else{const e=this.layoutProvider;this.el.style.top=e.getHorizontalSashTop(this)-this.size/2+"px",e.getHorizontalSashLeft&&(this.el.style.left=e.getHorizontalSashLeft(this)+"px"),e.getHorizontalSashWidth&&(this.el.style.width=e.getHorizontalSashWidth(this)+"px")}}getOrthogonalSash(e){if(e.target&&e.target instanceof HTMLElement)return e.target.classList.contains("orthogonal-drag-handle")?e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash:void 0}dispose(){super.dispose(),this.el.remove()}}},433:(e,t,i)=>{"use strict";i.d(t,{s$:()=>V,NB:()=>B,$Z:()=>W});var n=i(6268),r=i(5321),o=i(8626),s=i(3938),a=i(7974),l=i(3794),c=i(5393);class h extends l.${constructor(e){super(),this._onActivate=e.onActivate,this.bgDomNode=document.createElement("div"),this.bgDomNode.className="arrow-background",this.bgDomNode.style.position="absolute",this.bgDomNode.style.width=e.bgWidth+"px",this.bgDomNode.style.height=e.bgHeight+"px",void 0!==e.top&&(this.bgDomNode.style.top="0px"),void 0!==e.left&&(this.bgDomNode.style.left="0px"),void 0!==e.bottom&&(this.bgDomNode.style.bottom="0px"),void 0!==e.right&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width="11px",this.domNode.style.height="11px",void 0!==e.top&&(this.domNode.style.top=e.top+"px"),void 0!==e.left&&(this.domNode.style.left=e.left+"px"),void 0!==e.bottom&&(this.domNode.style.bottom=e.bottom+"px"),void 0!==e.right&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new a.Z),this.onmousedown(this.bgDomNode,(e=>this._arrowMouseDown(e))),this.onmousedown(this.domNode,(e=>this._arrowMouseDown(e))),this._mousedownRepeatTimer=this._register(new c.zh),this._mousedownScheduleRepeatTimer=this._register(new c._F)}_arrowMouseDown(e){this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet((()=>{this._mousedownRepeatTimer.cancelAndSet((()=>this._onActivate()),1e3/24)}),200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,a.e,(e=>{}),(()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()})),e.preventDefault()}}var d=i(5976);class u extends d.JT{constructor(e,t,i){super(),this._visibility=e,this._visibleClassName=t,this._invisibleClassName=i,this._domNode=null,this._isVisible=!1,this._isNeeded=!1,this._rawShouldBeVisible=!1,this._shouldBeVisible=!1,this._revealTimer=this._register(new c._F)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return 2!==this._visibility&&(3===this._visibility||this._rawShouldBeVisible)}_updateShouldBeVisible(){const e=this._applyVisibilitySetting();this._shouldBeVisible!==e&&(this._shouldBeVisible=e,this.ensureVisibility())}setIsNeeded(e){this._isNeeded!==e&&(this._isNeeded=e,this.ensureVisibility())}setDomNode(e){this._domNode=e,this._domNode.setClassName(this._invisibleClassName),this.setShouldBeVisible(!1)}ensureVisibility(){this._isNeeded?this._shouldBeVisible?this._reveal():this._hide(!0):this._hide(!1)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet((()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)}),0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}var g=i(1432);class f extends l.${constructor(e){super(),this._lazyRender=e.lazyRender,this._host=e.host,this._scrollable=e.scrollable,this._scrollByPage=e.scrollByPage,this._scrollbarState=e.scrollbarState,this._visibilityController=this._register(new u(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new a.Z),this._shouldRender=!0,this.domNode=(0,o.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,(e=>this._domNodeMouseDown(e)))}_createArrow(e){const t=this._register(new h(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=(0,o.X)(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),"number"==typeof i&&this.slider.setWidth(i),"number"==typeof n&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,(e=>{e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))})),this.onclick(this.slider.domNode,(e=>{e.leftButton&&e.stopPropagation()}))}_onElementSize(e){return this._scrollbarState.setVisibleSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollSize(e){return this._scrollbarState.setScrollSize(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}_onElementScrollPosition(e){return this._scrollbarState.setScrollPosition(e)&&(this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._shouldRender=!0,this._lazyRender||this.render()),this._shouldRender}beginReveal(){this._visibilityController.setShouldBeVisible(!0)}beginHide(){this._visibilityController.setShouldBeVisible(!1)}render(){this._shouldRender&&(this._shouldRender=!1,this._renderDomNode(this._scrollbarState.getRectangleLargeSize(),this._scrollbarState.getRectangleSmallSize()),this._updateSlider(this._scrollbarState.getSliderSize(),this._scrollbarState.getArrowSize()+this._scrollbarState.getSliderPosition()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),r=this._sliderMousePosition(e);i<=r&&r<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{}))):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&"number"==typeof e.browserEvent.offsetX&&"number"==typeof e.browserEvent.offsetY)t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const n=r.i(this.domNode.domNode);t=e.posx-n.left,i=e.posy-n.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,(()=>{})))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),r=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,a.e,(e=>{const t=this._sliderOrthogonalMousePosition(e),o=Math.abs(t-n);if(g.ED&&o>140)return void this._setDesiredScrollPositionNow(r.getScrollPosition());const s=this._sliderMousePosition(e)-i;this._setDesiredScrollPositionNow(r.getDesiredScrollPositionFromDelta(s))}),(()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()})),this._host.onDragStart()}_setDesiredScrollPositionNow(e){const t={};this.writeScrollPosition(t,e),this._scrollable.setScrollPositionNow(t)}updateScrollbarSize(e){this._updateScrollbarSize(e),this._scrollbarState.setScrollbarSize(e),this._shouldRender=!0,this._lazyRender||this.render()}isNeeded(){return this._scrollbarState.isNeeded()}}class p{constructor(e,t,i,n,r,o){this._scrollbarSize=Math.round(t),this._oppositeScrollbarSize=Math.round(i),this._arrowSize=Math.round(e),this._visibleSize=n,this._scrollSize=r,this._scrollPosition=o,this._computedAvailableSize=0,this._computedIsNeeded=!1,this._computedSliderSize=0,this._computedSliderRatio=0,this._computedSliderPosition=0,this._refreshComputedValues()}clone(){return new p(this._arrowSize,this._scrollbarSize,this._oppositeScrollbarSize,this._visibleSize,this._scrollSize,this._scrollPosition)}setVisibleSize(e){const t=Math.round(e);return this._visibleSize!==t&&(this._visibleSize=t,this._refreshComputedValues(),!0)}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t&&(this._scrollSize=t,this._refreshComputedValues(),!0)}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t&&(this._scrollPosition=t,this._refreshComputedValues(),!0)}setScrollbarSize(e){this._scrollbarSize=Math.round(e)}setOppositeScrollbarSize(e){this._oppositeScrollbarSize=Math.round(e)}static _computeValues(e,t,i,n,r){const o=Math.max(0,i-e),s=Math.max(0,o-2*t),a=n>0&&n>i;if(!a)return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(s),computedSliderRatio:0,computedSliderPosition:0};const l=Math.round(Math.max(20,Math.floor(i*s/n))),c=(s-l)/(n-i),h=r*c;return{computedAvailableSize:Math.round(o),computedIsNeeded:a,computedSliderSize:Math.round(l),computedSliderRatio:c,computedSliderPosition:Math.round(h)}}_refreshComputedValues(){const e=p._computeValues(this._oppositeScrollbarSize,this._arrowSize,this._visibleSize,this._scrollSize,this._scrollPosition);this._computedAvailableSize=e.computedAvailableSize,this._computedIsNeeded=e.computedIsNeeded,this._computedSliderSize=e.computedSliderSize,this._computedSliderRatio=e.computedSliderRatio,this._computedSliderPosition=e.computedSliderPosition}getArrowSize(){return this._arrowSize}getScrollPosition(){return this._scrollPosition}getRectangleLargeSize(){return this._computedAvailableSize}getRectangleSmallSize(){return this._scrollbarSize}isNeeded(){return this._computedIsNeeded}getSliderSize(){return this._computedSliderSize}getSliderPosition(){return this._computedSliderPosition}getDesiredScrollPositionFromOffset(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize-this._computedSliderSize/2;return Math.round(t/this._computedSliderRatio)}getDesiredScrollPositionFromOffsetPaged(e){if(!this._computedIsNeeded)return 0;const t=e-this._arrowSize;let i=this._scrollPosition;return tthis._host.onMouseWheel(new s.q(null,1,0))}),this._createArrow({className:"scra",icon:m.lA.scrollbarButtonRight,top:i,left:void 0,bottom:void 0,right:e,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new s.q(null,-1,0))})}this._createSlider(Math.floor((t.horizontalScrollbarSize-t.horizontalSliderSize)/2),0,void 0,t.horizontalSliderSize)}_updateSlider(e,t){this.slider.setWidth(e),this.slider.setLeft(t)}_renderDomNode(e,t){this.domNode.setWidth(e),this.domNode.setHeight(t),this.domNode.setLeft(0),this.domNode.setBottom(0)}onDidScroll(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(2===e.horizontal?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}class v extends f{constructor(e,t,i){const n=e.getScrollDimensions(),r=e.getCurrentScrollPosition();if(super({lazyRender:t.lazyRender,host:i,scrollbarState:new p(t.verticalHasArrows?t.arrowSize:0,2===t.vertical?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,r.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage}),t.verticalHasArrows){const e=(t.arrowSize-11)/2,i=(t.verticalScrollbarSize-11)/2;this._createArrow({className:"scra",icon:m.lA.scrollbarButtonUp,top:e,left:i,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new s.q(null,0,1))}),this._createArrow({className:"scra",icon:m.lA.scrollbarButtonDown,top:void 0,left:i,bottom:e,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new s.q(null,0,-1))})}this._createSlider(0,Math.floor((t.verticalScrollbarSize-t.verticalSliderSize)/2),t.verticalSliderSize,void 0)}_updateSlider(e,t){this.slider.setHeight(e),this.slider.setTop(t)}_renderDomNode(e,t){this.domNode.setWidth(t),this.domNode.setHeight(e),this.domNode.setRight(0),this.domNode.setTop(0)}onDidScroll(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(2===e.vertical?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}var b=i(4669),y=i(6633),w=i(3379),C=i.n(w),x=i(7795),S=i.n(x),k=i(569),L=i.n(k),N=i(3565),E=i.n(N),D=i(9216),A=i.n(D),T=i(4589),I=i.n(T),M=i(1022),O={};O.styleTagTransform=I(),O.setAttributes=E(),O.insert=L().bind(null,"head"),O.domAPI=S(),O.insertStyleElement=A(),C()(M.Z,O),M.Z&&M.Z.locals&&M.Z.locals;class R{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class P{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(-1===this._front&&-1===this._rear)return!1;let e=1,t=0,i=1,n=this._rear;for(;;){const r=n===this._front?e:Math.pow(2,-i);if(e-=r,t+=this._memory[n].score*r,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}return t<=.5}accept(e,t,i){const n=new R(e,t,i);n.score=this._computeScore(n),-1===this._front&&-1===this._rear?(this._memory[0]=n,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]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return-1===this._front&&-1===this._rear||this._memory[this._rear],this._isAlmostInt(e.deltaX)&&this._isAlmostInt(e.deltaY)||(t+=.25),Math.min(Math.max(t,0),1)}_isAlmostInt(e){return Math.abs(Math.round(e)-e)<.01}}P.INSTANCE=new P;class F extends l.${constructor(e,t,i){super(),this._onScroll=this._register(new b.Q5),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new b.Q5),e.style.overflow="hidden",this._options=function(e){const 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,consumeMouseWheelIfScrollbarIsNeeded:void 0!==e.consumeMouseWheelIfScrollbarIsNeeded&&e.consumeMouseWheelIfScrollbarIsNeeded,alwaysConsumeMouseWheel:void 0!==e.alwaysConsumeMouseWheel&&e.alwaysConsumeMouseWheel,scrollYToX:void 0!==e.scrollYToX&&e.scrollYToX,mouseWheelScrollSensitivity:void 0!==e.mouseWheelScrollSensitivity?e.mouseWheelScrollSensitivity:1,fastScrollSensitivity:void 0!==e.fastScrollSensitivity?e.fastScrollSensitivity:5,scrollPredominantAxis:void 0===e.scrollPredominantAxis||e.scrollPredominantAxis,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:1,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:1,verticalScrollbarSize:void 0!==e.verticalScrollbarSize?e.verticalScrollbarSize:10,verticalHasArrows:void 0!==e.verticalHasArrows&&e.verticalHasArrows,verticalSliderSize:void 0!==e.verticalSliderSize?e.verticalSliderSize:0,scrollByPage:void 0!==e.scrollByPage&&e.scrollByPage};return t.horizontalSliderSize=void 0!==e.horizontalSliderSize?e.horizontalSliderSize:t.horizontalScrollbarSize,t.verticalSliderSize=void 0!==e.verticalSliderSize?e.verticalSliderSize:t.verticalScrollbarSize,g.dz&&(t.className+=" mac"),t}(t),this._scrollable=i,this._register(this._scrollable.onScroll((e=>{this._onWillScroll.fire(e),this._onDidScroll(e),this._onScroll.fire(e)})));const n={onMouseWheel:e=>this._onMouseWheel(e),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new v(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new _(this._scrollable,this._options,n)),this._domNode=document.createElement("div"),this._domNode.className="monaco-scrollable-element "+this._options.className,this._domNode.setAttribute("role","presentation"),this._domNode.style.position="relative",this._domNode.style.overflow="hidden",this._domNode.appendChild(e),this._domNode.appendChild(this._horizontalScrollbar.domNode.domNode),this._domNode.appendChild(this._verticalScrollbar.domNode.domNode),this._options.useShadows?(this._leftShadowDomNode=(0,o.X)(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=(0,o.X)(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=(0,o.X)(document.createElement("div")),this._topLeftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topLeftShadowDomNode.domNode)):(this._leftShadowDomNode=null,this._topShadowDomNode=null,this._topLeftShadowDomNode=null),this._listenOnDomNode=this._options.listenOnDomNode||this._domNode,this._mouseWheelToDispose=[],this._setListeningToMouseWheel(this._options.handleMouseWheel),this.onmouseover(this._listenOnDomNode,(e=>this._onMouseOver(e))),this.onnonbubblingmouseout(this._listenOnDomNode,(e=>this._onMouseOut(e))),this._hideTimeout=this._register(new c._F),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}get options(){return this._options}dispose(){this._mouseWheelToDispose=(0,d.B9)(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,g.dz&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){void 0!==e.handleMouseWheel&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),void 0!==e.mouseWheelScrollSensitivity&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),void 0!==e.fastScrollSensitivity&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),void 0!==e.scrollPredominantAxis&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),void 0!==e.horizontal&&(this._options.horizontal=e.horizontal),void 0!==e.vertical&&(this._options.vertical=e.vertical),void 0!==e.horizontalScrollbarSize&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),void 0!==e.verticalScrollbarSize&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),void 0!==e.scrollByPage&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=(0,d.B9)(this._mouseWheelToDispose),e)){const e=e=>{this._onMouseWheel(new s.q(e))};this._mouseWheelToDispose.push(r.nm(this._listenOnDomNode,r.tw.MOUSE_WHEEL,e,{passive:!1}))}}_onMouseWheel(e){const t=P.INSTANCE;{const i=window.devicePixelRatio/(0,n.getZoomFactor)();g.ED||g.IJ?t.accept(Date.now(),e.deltaX/i,e.deltaY/i):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let n=e.deltaY*this._options.mouseWheelScrollSensitivity,r=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(n)>=Math.abs(r)?r=0:n=0),this._options.flipAxes&&([n,r]=[r,n]);const o=!g.dz&&e.browserEvent&&e.browserEvent.shiftKey;!this._options.scrollYToX&&!o||r||(r=n,n=0),e.browserEvent&&e.browserEvent.altKey&&(r*=this._options.fastScrollSensitivity,n*=this._options.fastScrollSensitivity);const s=this._scrollable.getFutureScrollPosition();let a={};if(n){const e=50*n,t=s.scrollTop-(e<0?Math.floor(e):Math.ceil(e));this._verticalScrollbar.writeScrollPosition(a,t)}if(r){const e=50*r,t=s.scrollLeft-(e<0?Math.floor(e):Math.ceil(e));this._horizontalScrollbar.writeScrollPosition(a,t)}a=this._scrollable.validateScrollPosition(a),(s.scrollLeft!==a.scrollLeft||s.scrollTop!==a.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(a):this._scrollable.setScrollPositionNow(a),i=!0)}let r=i;!r&&this._options.alwaysConsumeMouseWheel&&(r=!0),!r&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(r=!0),r&&(e.preventDefault(),e.stopPropagation())}_onDidScroll(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()}renderNow(){if(!this._options.lazyRender)throw new Error("Please use `lazyRender` together with `renderNow`!");this._render()}_render(){if(this._shouldRender&&(this._shouldRender=!1,this._horizontalScrollbar.render(),this._verticalScrollbar.render(),this._options.useShadows)){const e=this._scrollable.getCurrentScrollPosition(),t=e.scrollTop>0,i=e.scrollLeft>0,n=i?" left":"",r=t?" top":"",o=i||t?" top-left-corner":"";this._leftShadowDomNode.setClassName(`shadow${n}`),this._topShadowDomNode.setClassName(`shadow${r}`),this._topLeftShadowDomNode.setClassName(`shadow${o}${r}${n}`)}}_onDragStart(){this._isDragging=!0,this._reveal()}_onDragEnd(){this._isDragging=!1,this._hide()}_onMouseOut(e){this._mouseIsOver=!1,this._hide()}_onMouseOver(e){this._mouseIsOver=!0,this._reveal()}_reveal(){this._verticalScrollbar.beginReveal(),this._horizontalScrollbar.beginReveal(),this._scheduleHide()}_hide(){this._mouseIsOver||this._isDragging||(this._verticalScrollbar.beginHide(),this._horizontalScrollbar.beginHide())}_scheduleHide(){this._mouseIsOver||this._isDragging||this._hideTimeout.cancelAndSet((()=>this._hide()),500)}}class B extends F{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new y.Rm({forceIntegerValues:!0,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>r.jL(e)});super(e,t,i),this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}}class W extends F{constructor(e,t,i){super(e,t,i)}setScrollPosition(e){e.reuseAnimation?this._scrollable.setScrollPositionSmooth(e,e.reuseAnimation):this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class V extends F{constructor(e,t){(t=t||{}).mouseWheelSmoothScroll=!1;const i=new y.Rm({forceIntegerValues:!1,smoothScrollDuration:0,scheduleAtNextAnimationFrame:e=>r.jL(e)});super(e,t,i),this._register(i),this._element=e,this.onScroll((e=>{e.scrollTopChanged&&(this._element.scrollTop=e.scrollTop),e.scrollLeftChanged&&(this._element.scrollLeft=e.scrollLeft)})),this.scanDomNode()}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}scanDomNode(){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})}}},3048:(e,t,i)=>{"use strict";i.d(t,{M:()=>I,z:()=>M});var n=i(5321),r=i(3878),o=i(433),s=i(9488),a=i(1264),l=i(4669),c=i(5976),h=i(9870),d=i(6633),u=i(8401),g=i(3379),f=i.n(g),p=i(7795),m=i.n(p),_=i(569),v=i.n(_),b=i(3565),y=i.n(b),w=i(9216),C=i.n(w),x=i(4589),S=i.n(x),k=i(5785),L={};L.styleTagTransform=S(),L.setAttributes=y(),L.insert=v().bind(null,"head"),L.domAPI=m(),L.insertStyleElement=C(),f()(k.Z,L),k.Z&&k.Z.locals&&k.Z.locals;const N={separatorBorder:a.Il.transparent};class E{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,"number"==typeof i?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return void 0===this._cachedVisibleSize}setVisible(e,t){e!==this.visible&&(e?(this.size=(0,h.uZ)(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize="number"==typeof t?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(e))}get minimumSize(){return this.visible?this.view.minimumSize:0}get viewMinimumSize(){return this.view.minimumSize}get maximumSize(){return this.visible?this.view.maximumSize:0}get viewMaximumSize(){return this.view.maximumSize}get priority(){return this.view.priority}get snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class D extends E{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class A extends E{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var T,I;!function(e){e[e.Idle=0]="Idle",e[e.Busy=1]="Busy"}(T||(T={})),function(e){e.Distribute={type:"distribute"},e.Split=function(e){return{type:"split",index:e}},e.Invisible=function(e){return{type:"invisible",cachedVisibleSize:e}}}(I||(I={}));class M extends c.JT{constructor(e,t={}){var i,r,s,a,c;super(),this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=T.Idle,this._onDidSashChange=this._register(new l.Q5),this._onDidSashReset=this._register(new l.Q5),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.onDidSashChange=this._onDidSashChange.event,this.onDidSashReset=this._onDidSashReset.event,this.orientation=null!==(i=t.orientation)&&void 0!==i?i:0,this.inverseAltBehavior=null!==(r=t.inverseAltBehavior)&&void 0!==r&&r,this.proportionalLayout=null===(s=t.proportionalLayout)||void 0===s||s,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(0===this.orientation?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=(0,n.R3)(this.el,(0,n.$)(".sash-container")),this.viewContainer=(0,n.$)(".split-view-container"),this.scrollable=new d.Rm({forceIntegerValues:!0,smoothScrollDuration:125,scheduleAtNextAnimationFrame:n.jL}),this.scrollableElement=this._register(new o.$Z(this.viewContainer,{vertical:0===this.orientation?null!==(a=t.scrollbarVisibility)&&void 0!==a?a:1:2,horizontal:1===this.orientation?null!==(c=t.scrollbarVisibility)&&void 0!==c?c:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll((e=>{this.viewContainer.scrollTop=e.scrollTop,this.viewContainer.scrollLeft=e.scrollLeft}))),(0,n.R3)(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||N),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach(((e,t)=>{const i=u.o8(e.visible)||e.visible?e.size:{type:"invisible",cachedVisibleSize:e.size},n=e.view;this.doAddView(n,i,t,!0)})),this.contentSize=this.viewItems.reduce(((e,t)=>e+t.size),0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}get orthogonalEndSash(){return this._orthogonalEndSash}get startSnappingEnabled(){return this._startSnappingEnabled}get endSnappingEnabled(){return this._endSnappingEnabled}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}style(e){e.separatorBorder.isTransparent()?(this.el.classList.remove("separator-border"),this.el.style.removeProperty("--separator-border")):(this.el.classList.add("separator-border"),this.el.style.setProperty("--separator-border",e.separatorBorder.toString()))}addView(e,t,i=this.viewItems.length,n){this.doAddView(e,t,i,n)}layout(e,t){const i=Math.max(this.size,this.contentSize);if(this.size=e,this.layoutContext=t,this.proportions)for(let t=0;t1===this.viewItems[e].priority)),r=t.filter((e=>2===this.viewItems[e].priority));this.resize(this.viewItems.length-1,e-i,void 0,n,r)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map((e=>e.size/this.contentSize)))}onSashStart({sash:e,start:t,alt:i}){for(const e of this.viewItems)e.enabled=!1;const r=this.sashItems.findIndex((t=>t.sash===e)),o=(0,c.F8)((0,n.nm)(document.body,"keydown",(e=>a(this.sashDragState.current,e.altKey))),(0,n.nm)(document.body,"keyup",(()=>a(this.sashDragState.current,!1)))),a=(e,t)=>{const i=this.viewItems.map((e=>e.size));let n,a,l=Number.NEGATIVE_INFINITY,c=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(t=!t),t)if(r===this.sashItems.length-1){const e=this.viewItems[r];l=(e.minimumSize-e.size)/2,c=(e.maximumSize-e.size)/2}else{const e=this.viewItems[r+1];l=(e.size-e.maximumSize)/2,c=(e.size-e.minimumSize)/2}if(!t){const e=(0,s.w6)(r,-1),t=(0,s.w6)(r+1,this.viewItems.length),o=e.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),l=e.reduce(((e,t)=>e+(this.viewItems[t].viewMaximumSize-i[t])),0),c=0===t.length?Number.POSITIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),h=0===t.length?Number.NEGATIVE_INFINITY:t.reduce(((e,t)=>e+(i[t]-this.viewItems[t].viewMaximumSize)),0),d=Math.max(o,h),u=Math.min(c,l),g=this.findFirstSnapIndex(e),f=this.findFirstSnapIndex(t);if("number"==typeof g){const e=this.viewItems[g],t=Math.floor(e.viewMinimumSize/2);n={index:g,limitDelta:e.visible?d-t:d+t,size:e.size}}if("number"==typeof f){const e=this.viewItems[f],t=Math.floor(e.viewMinimumSize/2);a={index:f,limitDelta:e.visible?u+t:u-t,size:e.size}}}this.sashDragState={start:e,current:e,index:r,sizes:i,minDelta:l,maxDelta:c,alt:t,snapBefore:n,snapAfter:a,disposable:o}};a(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:r,minDelta:o,maxDelta:s,snapBefore:a,snapAfter:l}=this.sashDragState;this.sashDragState.current=e;const c=e-i,h=this.resize(t,c,n,void 0,void 0,o,s,a,l);if(r){const e=t===this.sashItems.length-1,i=this.viewItems.map((e=>e.size)),n=e?t:t+1,r=this.viewItems[n],o=r.size-r.maximumSize,s=r.size-r.minimumSize,a=e?t-1:t+1;this.resize(a,-h,i,void 0,void 0,o,s)}this.distributeEmptySpace(),this.layoutViews()}onSashEnd(e){this._onDidSashChange.fire(e),this.sashDragState.disposable.dispose(),this.saveProportions();for(const e of this.viewItems)e.enabled=!0}onViewChange(e,t){const i=this.viewItems.indexOf(e);i<0||i>=this.viewItems.length||(t="number"==typeof t?t:e.size,t=(0,h.uZ)(t,e.minimumSize,e.maximumSize),this.inverseAltBehavior&&i>0?(this.resize(i-1,Math.floor((e.size-t)/2)),this.distributeEmptySpace(),this.layoutViews()):(e.size=t,this.relayout([i],void 0)))}resizeView(e,t){if(this.state!==T.Idle)throw new Error("Cant modify splitview");if(this.state=T.Busy,e<0||e>=this.viewItems.length)return;const i=(0,s.w6)(this.viewItems.length).filter((t=>t!==e)),n=[...i.filter((e=>1===this.viewItems[e].priority)),e],r=i.filter((e=>2===this.viewItems[e].priority)),o=this.viewItems[e];t=Math.round(t),t=(0,h.uZ)(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,r),this.state=T.Idle}distributeViewSizes(){const e=[];let t=0;for(const i of this.viewItems)i.maximumSize-i.minimumSize>0&&(e.push(i),t+=i.size);const i=Math.floor(t/e.length);for(const t of e)t.size=(0,h.uZ)(i,t.minimumSize,t.maximumSize);const n=(0,s.w6)(this.viewItems.length),r=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));this.relayout(r,o)}getViewSize(e){return e<0||e>=this.viewItems.length?-1:this.viewItems[e].size}doAddView(e,t,i=this.viewItems.length,o){if(this.state!==T.Idle)throw new Error("Cant modify splitview");this.state=T.Busy;const a=(0,n.$)(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(a):this.viewContainer.insertBefore(a,this.viewContainer.children.item(i));const h=e.onDidChange((e=>this.onViewChange(f,e))),d=(0,c.OF)((()=>this.viewContainer.removeChild(a))),u=(0,c.F8)(h,d);let g;g="number"==typeof t?t:"split"===t.type?this.getViewSize(t.index)/2:"invisible"===t.type?{cachedVisibleSize:t.cachedVisibleSize}:e.minimumSize;const f=0===this.orientation?new D(a,e,g,u):new A(a,e,g,u);if(this.viewItems.splice(i,0,f),this.viewItems.length>1){let e={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const t=0===this.orientation?new r.g(this.sashContainer,{getHorizontalSashTop:e=>this.getSashPosition(e),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:1})):new r.g(this.sashContainer,{getVerticalSashLeft:e=>this.getSashPosition(e),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},e),{orientation:0})),n=0===this.orientation?e=>({sash:t,start:e.startY,current:e.currentY,alt:e.altKey}):e=>({sash:t,start:e.startX,current:e.currentX,alt:e.altKey}),o=l.ju.map(t.onDidStart,n)(this.onSashStart,this),a=l.ju.map(t.onDidChange,n)(this.onSashChange,this),h=l.ju.map(t.onDidEnd,(()=>this.sashItems.findIndex((e=>e.sash===t)))),d=h(this.onSashEnd,this),u=t.onDidReset((()=>{const e=this.sashItems.findIndex((e=>e.sash===t)),i=(0,s.w6)(e,-1),n=(0,s.w6)(e+1,this.viewItems.length),r=this.findFirstSnapIndex(i),o=this.findFirstSnapIndex(n);("number"!=typeof r||this.viewItems[r].visible)&&("number"!=typeof o||this.viewItems[o].visible)&&this._onDidSashReset.fire(e)})),g=(0,c.F8)(o,a,d,u,t),f={sash:t,disposable:g};this.sashItems.splice(i-1,0,f)}let p;a.appendChild(e.element),"number"!=typeof t&&"split"===t.type&&(p=[t.index]),o||this.relayout([i],p),this.state=T.Idle,o||"number"==typeof t||"distribute"!==t.type||this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce(((e,t)=>e+t.size),0);this.resize(this.viewItems.length-1,this.size-i,void 0,e,t),this.distributeEmptySpace(),this.layoutViews(),this.saveProportions()}resize(e,t,i=this.viewItems.map((e=>e.size)),n,r,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=(0,s.w6)(e,-1),u=(0,s.w6)(e+1,this.viewItems.length);if(r)for(const e of r)(0,s.zI)(d,e),(0,s.zI)(u,e);if(n)for(const e of n)(0,s.al)(d,e),(0,s.al)(u,e);const g=d.map((e=>this.viewItems[e])),f=d.map((e=>i[e])),p=u.map((e=>this.viewItems[e])),m=u.map((e=>i[e])),_=d.reduce(((e,t)=>e+(this.viewItems[t].minimumSize-i[t])),0),v=d.reduce(((e,t)=>e+(this.viewItems[t].maximumSize-i[t])),0),b=0===u.length?Number.POSITIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].minimumSize)),0),y=0===u.length?Number.NEGATIVE_INFINITY:u.reduce(((e,t)=>e+(i[t]-this.viewItems[t].maximumSize)),0),w=Math.max(_,y,o),C=Math.min(b,v,a);let x=!1;if(l){const e=this.viewItems[l.index],i=t>=l.limitDelta;x=i!==e.visible,e.setVisible(i,l.size)}if(!x&&c){const e=this.viewItems[c.index],i=te+t.size),0);let i=this.size-t;const n=(0,s.w6)(this.viewItems.length-1,-1),r=n.filter((e=>1===this.viewItems[e].priority)),o=n.filter((e=>2===this.viewItems[e].priority));for(const e of o)(0,s.zI)(n,e);for(const e of r)(0,s.al)(n,e);"number"==typeof e&&(0,s.al)(n,e);for(let e=0;0!==i&&ee+t.size),0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach((e=>e.sash.layout())),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){0===this.orientation?this.scrollableElement.setScrollDimensions({height:this.size,scrollHeight:this.contentSize}):this.scrollableElement.setScrollDimensions({width:this.size,scrollWidth:this.contentSize})}updateSashEnablement(){let e=!1;const t=this.viewItems.map((t=>e=t.size-t.minimumSize>0||e));e=!1;const i=this.viewItems.map((t=>e=t.maximumSize-t.size>0||e)),n=[...this.viewItems].reverse();e=!1;const r=n.map((t=>e=t.size-t.minimumSize>0||e)).reverse();e=!1;const o=n.map((t=>e=t.maximumSize-t.size>0||e)).reverse();let a=0;for(let e=0;e0||this.startSnappingEnabled)?n.state=1:d&&t[e]&&(a0)return;if(!e.visible&&e.snap)return t}}dispose(){super.dispose(),(0,c.B9)(this.viewItems),this.viewItems=[],this.sashItems.forEach((e=>e.disposable.dispose())),this.sashItems=[]}}},3794:(e,t,i)=>{"use strict";i.d(t,{$:()=>l});var n=i(5321),r=i(9069),o=i(3938),s=i(553),a=i(5976);class l extends a.JT{onclick(e,t){this._register(n.nm(e,n.tw.CLICK,(e=>t(new o.n(e)))))}onmousedown(e,t){this._register(n.nm(e,n.tw.MOUSE_DOWN,(e=>t(new o.n(e)))))}onmouseover(e,t){this._register(n.nm(e,n.tw.MOUSE_OVER,(e=>t(new o.n(e)))))}onnonbubblingmouseout(e,t){this._register(n.j_(e,(e=>t(new o.n(e)))))}onkeydown(e,t){this._register(n.nm(e,n.tw.KEY_DOWN,(e=>t(new r.y(e)))))}onkeyup(e,t){this._register(n.nm(e,n.tw.KEY_UP,(e=>t(new r.y(e)))))}oninput(e,t){this._register(n.nm(e,n.tw.INPUT,t))}onblur(e,t){this._register(n.nm(e,n.tw.BLUR,t))}onfocus(e,t){this._register(n.nm(e,n.tw.FOCUS,t))}ignoreGesture(e){s.o.ignoreTarget(e)}}},4741:(e,t,i)=>{"use strict";i.d(t,{Wi:()=>l,Z0:()=>c,aU:()=>a,eZ:()=>d,wY:()=>h});var n=i(4669),r=i(5976),o=i(3580),s=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class a extends r.JT{constructor(e,t="",i="",r=!0,o){super(),this._onDidChange=this._register(new n.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=e,this._label=t,this._cssClass=i,this._enabled=r,this._actionCallback=o}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return s(this,void 0,void 0,(function*(){this._actionCallback&&(yield this._actionCallback(e))}))}}class l extends r.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new n.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new n.Q5),this.onDidRun=this._onDidRun.event}run(e,t){return s(this,void 0,void 0,(function*(){if(!e.enabled)return;let i;this._onBeforeRun.fire({action:e});try{yield this.runAction(e,t)}catch(e){i=e}this._onDidRun.fire({action:e,error:i})}))}runAction(e,t){return s(this,void 0,void 0,(function*(){yield e.run(t)}))}}class c extends a{constructor(e){super(c.ID,e,e?"separator text":"separator"),this.checked=!1,this.enabled=!1}}c.ID="vs.actions.separator";class h{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=void 0,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return s(this,void 0,void 0,(function*(){}))}}class d extends a{constructor(){super(d.ID,o.N("submenu.empty","(empty)"),void 0,!1)}}d.ID="vs.actions.empty"},9488:(e,t,i)=>{"use strict";function n(e,t=0){return e[e.length-(1+t)]}function r(e){if(0===e.length)throw new Error("Invalid tail call");return[e.slice(0,e.length-1),e[e.length-1]]}function o(e,t,i=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;if(e.length!==t.length)return!1;for(let n=0,r=e.length;n0))return o;r=o-1}}return-(n+1)}function a(e,t){let i=0,n=e.length;if(0===n)return 0;for(;i=t.length)throw new TypeError("invalid index");let n=t[Math.floor(t.length*Math.random())],r=[],o=[],s=[];for(let e of t){const t=i(e,n);t<0?r.push(e):t>0?o.push(e):s.push(e)}return e!!e))}function d(e){return!Array.isArray(e)||0===e.length}function u(e){return Array.isArray(e)&&e.length>0}function g(e,t=(e=>e)){const i=new Set;return e.filter((e=>{const n=t(e);return!i.has(n)&&(i.add(n),!0)}))}function f(e,t){const i=function(e,t){for(let i=e.length-1;i>=0;i--)if(t(e[i]))return i;return-1}(e,t);if(-1!==i)return e[i]}function p(e,t){return e.length>0?e[0]:t}function m(e){return[].concat(...e)}function _(e,t){let i="number"==typeof t?e:0;"number"==typeof t?i=e:(i=0,t=e);const n=[];if(i<=t)for(let e=i;et;e--)n.push(e);return n}function v(e,t,i){const n=e.slice(0,t),r=e.slice(t);return n.concat(i,r)}function b(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.unshift(t))}function y(e,t){const i=e.indexOf(t);i>-1&&(e.splice(i,1),e.push(t))}function w(e){return Array.isArray(e)?e:[e]}function C(e,t,i,n){const r=x(e,t),o=e.splice(r,i);return function(e,t,i){const n=x(e,t),r=e.length,o=i.length;e.length=r+o;for(let t=r-1;t>=n;t--)e[t+o]=e[t];for(let t=0;tt(e(i),e(n))}i.d(t,{Dc:()=>L,EB:()=>g,Gb:()=>n,H9:()=>D,HW:()=>l,JH:()=>r,Of:()=>u,VJ:()=>E,XY:()=>d,Xh:()=>p,Zv:()=>v,_2:()=>w,al:()=>y,dF:()=>f,db:()=>C,fS:()=>o,fv:()=>k,jV:()=>N,kX:()=>h,lG:()=>a,ry:()=>s,tT:()=>S,vM:()=>c,w6:()=>_,xH:()=>m,zI:()=>b});const k=(e,t)=>e-t;function L(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n0&&(i=r)}return i}function N(e,t){if(0===e.length)return;let i=e[0];for(let n=1;n=0&&(i=r)}return i}function E(e,t){return L(e,((e,i)=>-t(e,i)))}class D{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;for(;t=0&&e(this.items[t]);)t--;const i=t===this.lastIdx?null:this.items.slice(t+1,this.lastIdx+1);return this.lastIdx=t,i}peek(){return this.items[this.firstIdx]}dequeue(){const e=this.items[this.firstIdx];return this.firstIdx++,e}takeCount(e){const t=this.items.slice(this.firstIdx,this.firstIdx+e);return this.firstIdx+=e,t}}},5146:(e,t,i)=>{"use strict";function n(e,t){if(!e)throw new Error(t?`Assertion failed (${t})`:"Assertion Failed")}i.d(t,{ok:()=>n})},5393:(e,t,i)=>{"use strict";i.d(t,{Aq:()=>N,CR:()=>k,J8:()=>h,PG:()=>d,Ps:()=>b,To:()=>x,Ue:()=>S,Vg:()=>v,Vs:()=>_,_F:()=>y,eP:()=>u,jT:()=>L,ne:()=>f,pY:()=>C,rH:()=>m,vp:()=>p,zS:()=>D,zh:()=>w});var n=i(1050),r=i(7301),o=i(4669),s=i(5976),a=i(1432),l=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))},c=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,r){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,r,(t=e[i](t)).done,t.value)}))}}};function h(e){return!!e&&"function"==typeof e.then}function d(e){const t=new n.A,i=e(t.token),o=new Promise(((e,n)=>{const o=t.token.onCancellationRequested((()=>{o.dispose(),t.dispose(),n(new r.FU)}));Promise.resolve(i).then((i=>{o.dispose(),t.dispose(),e(i)}),(e=>{o.dispose(),t.dispose(),n(e)}))}));return new class{cancel(){t.cancel()}then(e,t){return o.then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return o.finally(e)}}}function u(e,t,i){return new Promise(((n,r)=>{const o=t.onCancellationRequested((()=>{o.dispose(),n(i)}));e.then(n,r).finally((()=>o.dispose()))}))}class g{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const e=()=>{this.queuedPromise=null;const e=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,e};this.queuedPromise=new Promise((t=>{this.activePromise.then(e,e).then(t)}))}return new Promise(((e,t)=>{this.queuedPromise.then(e,t)}))}return this.activePromise=e(),new Promise(((e,t)=>{this.activePromise.then((t=>{this.activePromise=null,e(t)}),(e=>{this.activePromise=null,t(e)}))}))}}const f=Symbol("MicrotaskDelay");class p{constructor(e){this.defaultDelay=e,this.deferred=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise(((e,t)=>{this.doResolve=e,this.doReject=t})).then((()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const e=this.task;return this.task=null,e()}})));const i=()=>{var e;this.deferred=null,null===(e=this.doResolve)||void 0===e||e.call(this,null)};return this.deferred=t===f?(e=>{let t=!0;return queueMicrotask((()=>{t&&(t=!1,e())})),{isTriggered:()=>t,dispose:()=>{t=!1}}})(i):((e,t)=>{let i=!0;const n=setTimeout((()=>{i=!1,t()}),e);return{isTriggered:()=>i,dispose:()=>{clearTimeout(n),i=!1}}})(t,i),this.completionPromise}isTriggered(){var e;return!!(null===(e=this.deferred)||void 0===e?void 0:e.isTriggered())}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(new r.FU),this.completionPromise=null)}cancelTimeout(){var e;null===(e=this.deferred)||void 0===e||e.dispose(),this.deferred=null}dispose(){this.cancel()}}class m{constructor(e){this.delayer=new p(e),this.throttler=new g}trigger(e,t){return this.delayer.trigger((()=>this.throttler.queue(e)),t)}dispose(){this.delayer.dispose()}}function _(e,t){return t?new Promise(((i,n)=>{const o=setTimeout((()=>{s.dispose(),i()}),e),s=t.onCancellationRequested((()=>{clearTimeout(o),s.dispose(),n(new r.FU)}))})):d((t=>_(e,t)))}function v(e,t=0){const i=setTimeout(e,t);return(0,s.OF)((()=>clearTimeout(i)))}function b(e,t=(e=>!!e),i=null){let n=0;const r=e.length,o=()=>{if(n>=r)return Promise.resolve(i);const s=e[n++];return Promise.resolve(s()).then((e=>t(e)?Promise.resolve(e):o()))};return o()}class y{constructor(e,t){this._token=-1,"function"==typeof e&&"number"==typeof t&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout((()=>{this._token=-1,e()}),t)}setIfNotSet(e,t){-1===this._token&&(this._token=setTimeout((()=>{this._token=-1,e()}),t))}}class w{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){-1!==this._token&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval((()=>{e()}),t)}}class C{constructor(e,t){this.timeoutToken=-1,this.runner=e,this.timeout=t,this.timeoutHandler=this.onTimeout.bind(this)}dispose(){this.cancel(),this.runner=null}cancel(){this.isScheduled()&&(clearTimeout(this.timeoutToken),this.timeoutToken=-1)}schedule(e=this.timeout){this.cancel(),this.timeoutToken=setTimeout(this.timeoutHandler,e)}get delay(){return this.timeout}set delay(e){this.timeout=e}isScheduled(){return-1!==this.timeoutToken}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let x;x="function"!=typeof requestIdleCallback||"function"!=typeof cancelIdleCallback?e=>{(0,a.fn)((()=>{if(t)return;const i=Date.now()+15;e(Object.freeze({didTimeout:!0,timeRemaining:()=>Math.max(0,i-Date.now())}))}));let t=!1;return{dispose(){t||(t=!0)}}}:(e,t)=>{const i=requestIdleCallback(e,"number"==typeof t?{timeout:t}:void 0);let n=!1;return{dispose(){n||(n=!0,cancelIdleCallback(i))}}};class S{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(e){this._error=e}finally{this._didRun=!0}},this._handle=x((()=>this._executor()))}dispose(){this._handle.dispose()}get value(){if(this._didRun||(this._handle.dispose(),this._executor()),this._error)throw this._error;return this._value}get isInitialized(){return this._didRun}}class k{constructor(){this.rejected=!1,this.resolved=!1,this.p=new Promise(((e,t)=>{this.completeCallback=e,this.errorCallback=t}))}get isRejected(){return this.rejected}get isSettled(){return this.rejected||this.resolved}complete(e){return new Promise((t=>{this.completeCallback(e),this.resolved=!0,t()}))}cancel(){new Promise((e=>{this.errorCallback(new r.FU),this.rejected=!0,e()}))}}var L;!function(e){e.settled=function(e){return l(this,void 0,void 0,(function*(){let t;const i=yield Promise.all(e.map((e=>e.then((e=>e),(e=>{t||(t=e)})))));if(void 0!==t)throw t;return i}))},e.withAsyncBody=function(e){return new Promise(((t,i)=>l(this,void 0,void 0,(function*(){try{yield e(t,i)}catch(e){i(e)}}))))}}(L||(L={}));class N{constructor(e){this._state=0,this._results=[],this._error=null,this._onStateChanged=new o.Q5,queueMicrotask((()=>l(this,void 0,void 0,(function*(){const t={emitOne:e=>this.emitOne(e),emitMany:e=>this.emitMany(e),reject:e=>this.reject(e)};try{yield Promise.resolve(e(t)),this.resolve()}catch(e){this.reject(e)}finally{t.emitOne=void 0,t.emitMany=void 0,t.reject=void 0}}))))}static fromArray(e){return new N((t=>{t.emitMany(e)}))}static fromPromise(e){return new N((t=>l(this,void 0,void 0,(function*(){t.emitMany(yield e)}))))}static fromPromises(e){return new N((t=>l(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>l(this,void 0,void 0,(function*(){return t.emitOne(yield e)})))))}))))}static merge(e){return new N((t=>l(this,void 0,void 0,(function*(){yield Promise.all(e.map((e=>{var i,n;return l(this,void 0,void 0,(function*(){var r,o;try{for(i=c(e);!(n=yield i.next()).done;){const e=n.value;t.emitOne(e)}}catch(e){r={error:e}}finally{try{n&&!n.done&&(o=i.return)&&(yield o.call(i))}finally{if(r)throw r.error}}}))})))}))))}[Symbol.asyncIterator](){let e=0;return{next:()=>l(this,void 0,void 0,(function*(){for(;;){if(2===this._state)throw this._error;if(el(this,void 0,void 0,(function*(){var n,r;try{for(var o,s=c(e);!(o=yield s.next()).done;){const e=o.value;i.emitOne(t(e))}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=s.return)&&(yield r.call(s))}finally{if(n)throw n.error}}}))))}map(e){return N.map(this,e)}static filter(e,t){return new N((i=>l(this,void 0,void 0,(function*(){var n,r;try{for(var o,s=c(e);!(o=yield s.next()).done;){const e=o.value;t(e)&&i.emitOne(e)}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=s.return)&&(yield r.call(s))}finally{if(n)throw n.error}}}))))}filter(e){return N.filter(this,e)}static coalesce(e){return N.filter(e,(e=>!!e))}coalesce(){return N.coalesce(this)}static toPromise(e){var t,i,n,r;return l(this,void 0,void 0,(function*(){const o=[];try{for(t=c(e);!(i=yield t.next()).done;){const e=i.value;o.push(e)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=t.return)&&(yield r.call(t))}finally{if(n)throw n.error}}return o}))}toPromise(){return N.toPromise(this)}emitOne(e){0===this._state&&(this._results.push(e),this._onStateChanged.fire())}emitMany(e){0===this._state&&(this._results=this._results.concat(e),this._onStateChanged.fire())}resolve(){0===this._state&&(this._state=1,this._onStateChanged.fire())}reject(e){0===this._state&&(this._state=2,this._error=e,this._onStateChanged.fire())}}N.EMPTY=N.fromArray([]);class E extends N{constructor(e,t){super(t),this._source=e}cancel(){this._source.cancel()}}function D(e){const t=new n.A,i=e(t.token);return new E(t,(e=>l(this,void 0,void 0,(function*(){var n,o;const s=t.token.onCancellationRequested((()=>{s.dispose(),t.dispose(),e.reject(new r.FU)}));try{try{for(var a,l=c(i);!(a=yield l.next()).done;){const i=a.value;if(t.token.isCancellationRequested)return;e.emitOne(i)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=l.return)&&(yield o.call(l))}finally{if(n)throw n.error}}s.dispose(),t.dispose()}catch(i){s.dispose(),t.dispose(),e.reject(i)}}))))}},3060:(e,t,i)=>{"use strict";i.d(t,{Ag:()=>l,Cg:()=>d,KN:()=>o,Q$:()=>h,T4:()=>c,mP:()=>s,oq:()=>a});const n="undefined"!=typeof Buffer;let r;class o{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return n&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new o(e)}toString(){return n?this.buffer.toString():(r||(r=new TextDecoder),r.decode(this.buffer))}}function s(e,t){return e[t+0]<<0>>>0|e[t+1]<<8>>>0}function a(e,t,i){e[i+0]=255&t,t>>>=8,e[i+1]=255&t}function l(e,t){return e[t]*Math.pow(2,24)+e[t+1]*Math.pow(2,16)+e[t+2]*Math.pow(2,8)+e[t+3]}function c(e,t,i){e[i+3]=t,t>>>=8,e[i+2]=t,t>>>=8,e[i+1]=t,t>>>=8,e[i]=t}function h(e,t){return e[t]}function d(e,t,i){e[i]=t}},1050:(e,t,i)=>{"use strict";i.d(t,{A:()=>a,T:()=>o});var n=i(4669);const r=Object.freeze((function(e,t){const i=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(i)}}}));var o;!function(e){e.isCancellationToken=function(t){return t===e.None||t===e.Cancelled||t instanceof s||!(!t||"object"!=typeof t)&&"boolean"==typeof t.isCancellationRequested&&"function"==typeof t.onCancellationRequested},e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:n.ju.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r})}(o||(o={}));class s{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?r:(this._emitter||(this._emitter=new n.Q5),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class a{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token instanceof s&&this._token.cancel():this._token=o.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof s&&this._token.dispose():this._token=o.None}}},3046:(e,t,i)=>{"use strict";function n(e){return e?e.replace(/\$\((.*?)\)/g,((e,t)=>` ${t} `)).trim():""}i.d(t,{JL:()=>n,dT:()=>o,lA:()=>r});class r{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,r._allCodicons.push(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}static getAll(){return r._allCodicons}}var o;r._allCodicons=[],r.add=new r("add",{fontCharacter:"\\ea60"}),r.plus=new r("plus",r.add.definition),r.gistNew=new r("gist-new",r.add.definition),r.repoCreate=new r("repo-create",r.add.definition),r.lightbulb=new r("lightbulb",{fontCharacter:"\\ea61"}),r.lightBulb=new r("light-bulb",{fontCharacter:"\\ea61"}),r.repo=new r("repo",{fontCharacter:"\\ea62"}),r.repoDelete=new r("repo-delete",{fontCharacter:"\\ea62"}),r.gistFork=new r("gist-fork",{fontCharacter:"\\ea63"}),r.repoForked=new r("repo-forked",{fontCharacter:"\\ea63"}),r.gitPullRequest=new r("git-pull-request",{fontCharacter:"\\ea64"}),r.gitPullRequestAbandoned=new r("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),r.recordKeys=new r("record-keys",{fontCharacter:"\\ea65"}),r.keyboard=new r("keyboard",{fontCharacter:"\\ea65"}),r.tag=new r("tag",{fontCharacter:"\\ea66"}),r.tagAdd=new r("tag-add",{fontCharacter:"\\ea66"}),r.tagRemove=new r("tag-remove",{fontCharacter:"\\ea66"}),r.person=new r("person",{fontCharacter:"\\ea67"}),r.personFollow=new r("person-follow",{fontCharacter:"\\ea67"}),r.personOutline=new r("person-outline",{fontCharacter:"\\ea67"}),r.personFilled=new r("person-filled",{fontCharacter:"\\ea67"}),r.gitBranch=new r("git-branch",{fontCharacter:"\\ea68"}),r.gitBranchCreate=new r("git-branch-create",{fontCharacter:"\\ea68"}),r.gitBranchDelete=new r("git-branch-delete",{fontCharacter:"\\ea68"}),r.sourceControl=new r("source-control",{fontCharacter:"\\ea68"}),r.mirror=new r("mirror",{fontCharacter:"\\ea69"}),r.mirrorPublic=new r("mirror-public",{fontCharacter:"\\ea69"}),r.star=new r("star",{fontCharacter:"\\ea6a"}),r.starAdd=new r("star-add",{fontCharacter:"\\ea6a"}),r.starDelete=new r("star-delete",{fontCharacter:"\\ea6a"}),r.starEmpty=new r("star-empty",{fontCharacter:"\\ea6a"}),r.comment=new r("comment",{fontCharacter:"\\ea6b"}),r.commentAdd=new r("comment-add",{fontCharacter:"\\ea6b"}),r.alert=new r("alert",{fontCharacter:"\\ea6c"}),r.warning=new r("warning",{fontCharacter:"\\ea6c"}),r.search=new r("search",{fontCharacter:"\\ea6d"}),r.searchSave=new r("search-save",{fontCharacter:"\\ea6d"}),r.logOut=new r("log-out",{fontCharacter:"\\ea6e"}),r.signOut=new r("sign-out",{fontCharacter:"\\ea6e"}),r.logIn=new r("log-in",{fontCharacter:"\\ea6f"}),r.signIn=new r("sign-in",{fontCharacter:"\\ea6f"}),r.eye=new r("eye",{fontCharacter:"\\ea70"}),r.eyeUnwatch=new r("eye-unwatch",{fontCharacter:"\\ea70"}),r.eyeWatch=new r("eye-watch",{fontCharacter:"\\ea70"}),r.circleFilled=new r("circle-filled",{fontCharacter:"\\ea71"}),r.primitiveDot=new r("primitive-dot",{fontCharacter:"\\ea71"}),r.closeDirty=new r("close-dirty",{fontCharacter:"\\ea71"}),r.debugBreakpoint=new r("debug-breakpoint",{fontCharacter:"\\ea71"}),r.debugBreakpointDisabled=new r("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),r.debugHint=new r("debug-hint",{fontCharacter:"\\ea71"}),r.primitiveSquare=new r("primitive-square",{fontCharacter:"\\ea72"}),r.edit=new r("edit",{fontCharacter:"\\ea73"}),r.pencil=new r("pencil",{fontCharacter:"\\ea73"}),r.info=new r("info",{fontCharacter:"\\ea74"}),r.issueOpened=new r("issue-opened",{fontCharacter:"\\ea74"}),r.gistPrivate=new r("gist-private",{fontCharacter:"\\ea75"}),r.gitForkPrivate=new r("git-fork-private",{fontCharacter:"\\ea75"}),r.lock=new r("lock",{fontCharacter:"\\ea75"}),r.mirrorPrivate=new r("mirror-private",{fontCharacter:"\\ea75"}),r.close=new r("close",{fontCharacter:"\\ea76"}),r.removeClose=new r("remove-close",{fontCharacter:"\\ea76"}),r.x=new r("x",{fontCharacter:"\\ea76"}),r.repoSync=new r("repo-sync",{fontCharacter:"\\ea77"}),r.sync=new r("sync",{fontCharacter:"\\ea77"}),r.clone=new r("clone",{fontCharacter:"\\ea78"}),r.desktopDownload=new r("desktop-download",{fontCharacter:"\\ea78"}),r.beaker=new r("beaker",{fontCharacter:"\\ea79"}),r.microscope=new r("microscope",{fontCharacter:"\\ea79"}),r.vm=new r("vm",{fontCharacter:"\\ea7a"}),r.deviceDesktop=new r("device-desktop",{fontCharacter:"\\ea7a"}),r.file=new r("file",{fontCharacter:"\\ea7b"}),r.fileText=new r("file-text",{fontCharacter:"\\ea7b"}),r.more=new r("more",{fontCharacter:"\\ea7c"}),r.ellipsis=new r("ellipsis",{fontCharacter:"\\ea7c"}),r.kebabHorizontal=new r("kebab-horizontal",{fontCharacter:"\\ea7c"}),r.mailReply=new r("mail-reply",{fontCharacter:"\\ea7d"}),r.reply=new r("reply",{fontCharacter:"\\ea7d"}),r.organization=new r("organization",{fontCharacter:"\\ea7e"}),r.organizationFilled=new r("organization-filled",{fontCharacter:"\\ea7e"}),r.organizationOutline=new r("organization-outline",{fontCharacter:"\\ea7e"}),r.newFile=new r("new-file",{fontCharacter:"\\ea7f"}),r.fileAdd=new r("file-add",{fontCharacter:"\\ea7f"}),r.newFolder=new r("new-folder",{fontCharacter:"\\ea80"}),r.fileDirectoryCreate=new r("file-directory-create",{fontCharacter:"\\ea80"}),r.trash=new r("trash",{fontCharacter:"\\ea81"}),r.trashcan=new r("trashcan",{fontCharacter:"\\ea81"}),r.history=new r("history",{fontCharacter:"\\ea82"}),r.clock=new r("clock",{fontCharacter:"\\ea82"}),r.folder=new r("folder",{fontCharacter:"\\ea83"}),r.fileDirectory=new r("file-directory",{fontCharacter:"\\ea83"}),r.symbolFolder=new r("symbol-folder",{fontCharacter:"\\ea83"}),r.logoGithub=new r("logo-github",{fontCharacter:"\\ea84"}),r.markGithub=new r("mark-github",{fontCharacter:"\\ea84"}),r.github=new r("github",{fontCharacter:"\\ea84"}),r.terminal=new r("terminal",{fontCharacter:"\\ea85"}),r.console=new r("console",{fontCharacter:"\\ea85"}),r.repl=new r("repl",{fontCharacter:"\\ea85"}),r.zap=new r("zap",{fontCharacter:"\\ea86"}),r.symbolEvent=new r("symbol-event",{fontCharacter:"\\ea86"}),r.error=new r("error",{fontCharacter:"\\ea87"}),r.stop=new r("stop",{fontCharacter:"\\ea87"}),r.variable=new r("variable",{fontCharacter:"\\ea88"}),r.symbolVariable=new r("symbol-variable",{fontCharacter:"\\ea88"}),r.array=new r("array",{fontCharacter:"\\ea8a"}),r.symbolArray=new r("symbol-array",{fontCharacter:"\\ea8a"}),r.symbolModule=new r("symbol-module",{fontCharacter:"\\ea8b"}),r.symbolPackage=new r("symbol-package",{fontCharacter:"\\ea8b"}),r.symbolNamespace=new r("symbol-namespace",{fontCharacter:"\\ea8b"}),r.symbolObject=new r("symbol-object",{fontCharacter:"\\ea8b"}),r.symbolMethod=new r("symbol-method",{fontCharacter:"\\ea8c"}),r.symbolFunction=new r("symbol-function",{fontCharacter:"\\ea8c"}),r.symbolConstructor=new r("symbol-constructor",{fontCharacter:"\\ea8c"}),r.symbolBoolean=new r("symbol-boolean",{fontCharacter:"\\ea8f"}),r.symbolNull=new r("symbol-null",{fontCharacter:"\\ea8f"}),r.symbolNumeric=new r("symbol-numeric",{fontCharacter:"\\ea90"}),r.symbolNumber=new r("symbol-number",{fontCharacter:"\\ea90"}),r.symbolStructure=new r("symbol-structure",{fontCharacter:"\\ea91"}),r.symbolStruct=new r("symbol-struct",{fontCharacter:"\\ea91"}),r.symbolParameter=new r("symbol-parameter",{fontCharacter:"\\ea92"}),r.symbolTypeParameter=new r("symbol-type-parameter",{fontCharacter:"\\ea92"}),r.symbolKey=new r("symbol-key",{fontCharacter:"\\ea93"}),r.symbolText=new r("symbol-text",{fontCharacter:"\\ea93"}),r.symbolReference=new r("symbol-reference",{fontCharacter:"\\ea94"}),r.goToFile=new r("go-to-file",{fontCharacter:"\\ea94"}),r.symbolEnum=new r("symbol-enum",{fontCharacter:"\\ea95"}),r.symbolValue=new r("symbol-value",{fontCharacter:"\\ea95"}),r.symbolRuler=new r("symbol-ruler",{fontCharacter:"\\ea96"}),r.symbolUnit=new r("symbol-unit",{fontCharacter:"\\ea96"}),r.activateBreakpoints=new r("activate-breakpoints",{fontCharacter:"\\ea97"}),r.archive=new r("archive",{fontCharacter:"\\ea98"}),r.arrowBoth=new r("arrow-both",{fontCharacter:"\\ea99"}),r.arrowDown=new r("arrow-down",{fontCharacter:"\\ea9a"}),r.arrowLeft=new r("arrow-left",{fontCharacter:"\\ea9b"}),r.arrowRight=new r("arrow-right",{fontCharacter:"\\ea9c"}),r.arrowSmallDown=new r("arrow-small-down",{fontCharacter:"\\ea9d"}),r.arrowSmallLeft=new r("arrow-small-left",{fontCharacter:"\\ea9e"}),r.arrowSmallRight=new r("arrow-small-right",{fontCharacter:"\\ea9f"}),r.arrowSmallUp=new r("arrow-small-up",{fontCharacter:"\\eaa0"}),r.arrowUp=new r("arrow-up",{fontCharacter:"\\eaa1"}),r.bell=new r("bell",{fontCharacter:"\\eaa2"}),r.bold=new r("bold",{fontCharacter:"\\eaa3"}),r.book=new r("book",{fontCharacter:"\\eaa4"}),r.bookmark=new r("bookmark",{fontCharacter:"\\eaa5"}),r.debugBreakpointConditionalUnverified=new r("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),r.debugBreakpointConditional=new r("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),r.debugBreakpointConditionalDisabled=new r("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),r.debugBreakpointDataUnverified=new r("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),r.debugBreakpointData=new r("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),r.debugBreakpointDataDisabled=new r("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),r.debugBreakpointLogUnverified=new r("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),r.debugBreakpointLog=new r("debug-breakpoint-log",{fontCharacter:"\\eaab"}),r.debugBreakpointLogDisabled=new r("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),r.briefcase=new r("briefcase",{fontCharacter:"\\eaac"}),r.broadcast=new r("broadcast",{fontCharacter:"\\eaad"}),r.browser=new r("browser",{fontCharacter:"\\eaae"}),r.bug=new r("bug",{fontCharacter:"\\eaaf"}),r.calendar=new r("calendar",{fontCharacter:"\\eab0"}),r.caseSensitive=new r("case-sensitive",{fontCharacter:"\\eab1"}),r.check=new r("check",{fontCharacter:"\\eab2"}),r.checklist=new r("checklist",{fontCharacter:"\\eab3"}),r.chevronDown=new r("chevron-down",{fontCharacter:"\\eab4"}),r.dropDownButton=new r("drop-down-button",r.chevronDown.definition),r.chevronLeft=new r("chevron-left",{fontCharacter:"\\eab5"}),r.chevronRight=new r("chevron-right",{fontCharacter:"\\eab6"}),r.chevronUp=new r("chevron-up",{fontCharacter:"\\eab7"}),r.chromeClose=new r("chrome-close",{fontCharacter:"\\eab8"}),r.chromeMaximize=new r("chrome-maximize",{fontCharacter:"\\eab9"}),r.chromeMinimize=new r("chrome-minimize",{fontCharacter:"\\eaba"}),r.chromeRestore=new r("chrome-restore",{fontCharacter:"\\eabb"}),r.circleOutline=new r("circle-outline",{fontCharacter:"\\eabc"}),r.debugBreakpointUnverified=new r("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),r.circleSlash=new r("circle-slash",{fontCharacter:"\\eabd"}),r.circuitBoard=new r("circuit-board",{fontCharacter:"\\eabe"}),r.clearAll=new r("clear-all",{fontCharacter:"\\eabf"}),r.clippy=new r("clippy",{fontCharacter:"\\eac0"}),r.closeAll=new r("close-all",{fontCharacter:"\\eac1"}),r.cloudDownload=new r("cloud-download",{fontCharacter:"\\eac2"}),r.cloudUpload=new r("cloud-upload",{fontCharacter:"\\eac3"}),r.code=new r("code",{fontCharacter:"\\eac4"}),r.collapseAll=new r("collapse-all",{fontCharacter:"\\eac5"}),r.colorMode=new r("color-mode",{fontCharacter:"\\eac6"}),r.commentDiscussion=new r("comment-discussion",{fontCharacter:"\\eac7"}),r.compareChanges=new r("compare-changes",{fontCharacter:"\\eafd"}),r.creditCard=new r("credit-card",{fontCharacter:"\\eac9"}),r.dash=new r("dash",{fontCharacter:"\\eacc"}),r.dashboard=new r("dashboard",{fontCharacter:"\\eacd"}),r.database=new r("database",{fontCharacter:"\\eace"}),r.debugContinue=new r("debug-continue",{fontCharacter:"\\eacf"}),r.debugDisconnect=new r("debug-disconnect",{fontCharacter:"\\ead0"}),r.debugPause=new r("debug-pause",{fontCharacter:"\\ead1"}),r.debugRestart=new r("debug-restart",{fontCharacter:"\\ead2"}),r.debugStart=new r("debug-start",{fontCharacter:"\\ead3"}),r.debugStepInto=new r("debug-step-into",{fontCharacter:"\\ead4"}),r.debugStepOut=new r("debug-step-out",{fontCharacter:"\\ead5"}),r.debugStepOver=new r("debug-step-over",{fontCharacter:"\\ead6"}),r.debugStop=new r("debug-stop",{fontCharacter:"\\ead7"}),r.debug=new r("debug",{fontCharacter:"\\ead8"}),r.deviceCameraVideo=new r("device-camera-video",{fontCharacter:"\\ead9"}),r.deviceCamera=new r("device-camera",{fontCharacter:"\\eada"}),r.deviceMobile=new r("device-mobile",{fontCharacter:"\\eadb"}),r.diffAdded=new r("diff-added",{fontCharacter:"\\eadc"}),r.diffIgnored=new r("diff-ignored",{fontCharacter:"\\eadd"}),r.diffModified=new r("diff-modified",{fontCharacter:"\\eade"}),r.diffRemoved=new r("diff-removed",{fontCharacter:"\\eadf"}),r.diffRenamed=new r("diff-renamed",{fontCharacter:"\\eae0"}),r.diff=new r("diff",{fontCharacter:"\\eae1"}),r.discard=new r("discard",{fontCharacter:"\\eae2"}),r.editorLayout=new r("editor-layout",{fontCharacter:"\\eae3"}),r.emptyWindow=new r("empty-window",{fontCharacter:"\\eae4"}),r.exclude=new r("exclude",{fontCharacter:"\\eae5"}),r.extensions=new r("extensions",{fontCharacter:"\\eae6"}),r.eyeClosed=new r("eye-closed",{fontCharacter:"\\eae7"}),r.fileBinary=new r("file-binary",{fontCharacter:"\\eae8"}),r.fileCode=new r("file-code",{fontCharacter:"\\eae9"}),r.fileMedia=new r("file-media",{fontCharacter:"\\eaea"}),r.filePdf=new r("file-pdf",{fontCharacter:"\\eaeb"}),r.fileSubmodule=new r("file-submodule",{fontCharacter:"\\eaec"}),r.fileSymlinkDirectory=new r("file-symlink-directory",{fontCharacter:"\\eaed"}),r.fileSymlinkFile=new r("file-symlink-file",{fontCharacter:"\\eaee"}),r.fileZip=new r("file-zip",{fontCharacter:"\\eaef"}),r.files=new r("files",{fontCharacter:"\\eaf0"}),r.filter=new r("filter",{fontCharacter:"\\eaf1"}),r.flame=new r("flame",{fontCharacter:"\\eaf2"}),r.foldDown=new r("fold-down",{fontCharacter:"\\eaf3"}),r.foldUp=new r("fold-up",{fontCharacter:"\\eaf4"}),r.fold=new r("fold",{fontCharacter:"\\eaf5"}),r.folderActive=new r("folder-active",{fontCharacter:"\\eaf6"}),r.folderOpened=new r("folder-opened",{fontCharacter:"\\eaf7"}),r.gear=new r("gear",{fontCharacter:"\\eaf8"}),r.gift=new r("gift",{fontCharacter:"\\eaf9"}),r.gistSecret=new r("gist-secret",{fontCharacter:"\\eafa"}),r.gist=new r("gist",{fontCharacter:"\\eafb"}),r.gitCommit=new r("git-commit",{fontCharacter:"\\eafc"}),r.gitCompare=new r("git-compare",{fontCharacter:"\\eafd"}),r.gitMerge=new r("git-merge",{fontCharacter:"\\eafe"}),r.githubAction=new r("github-action",{fontCharacter:"\\eaff"}),r.githubAlt=new r("github-alt",{fontCharacter:"\\eb00"}),r.globe=new r("globe",{fontCharacter:"\\eb01"}),r.grabber=new r("grabber",{fontCharacter:"\\eb02"}),r.graph=new r("graph",{fontCharacter:"\\eb03"}),r.gripper=new r("gripper",{fontCharacter:"\\eb04"}),r.heart=new r("heart",{fontCharacter:"\\eb05"}),r.home=new r("home",{fontCharacter:"\\eb06"}),r.horizontalRule=new r("horizontal-rule",{fontCharacter:"\\eb07"}),r.hubot=new r("hubot",{fontCharacter:"\\eb08"}),r.inbox=new r("inbox",{fontCharacter:"\\eb09"}),r.issueClosed=new r("issue-closed",{fontCharacter:"\\eba4"}),r.issueReopened=new r("issue-reopened",{fontCharacter:"\\eb0b"}),r.issues=new r("issues",{fontCharacter:"\\eb0c"}),r.italic=new r("italic",{fontCharacter:"\\eb0d"}),r.jersey=new r("jersey",{fontCharacter:"\\eb0e"}),r.json=new r("json",{fontCharacter:"\\eb0f"}),r.kebabVertical=new r("kebab-vertical",{fontCharacter:"\\eb10"}),r.key=new r("key",{fontCharacter:"\\eb11"}),r.law=new r("law",{fontCharacter:"\\eb12"}),r.lightbulbAutofix=new r("lightbulb-autofix",{fontCharacter:"\\eb13"}),r.linkExternal=new r("link-external",{fontCharacter:"\\eb14"}),r.link=new r("link",{fontCharacter:"\\eb15"}),r.listOrdered=new r("list-ordered",{fontCharacter:"\\eb16"}),r.listUnordered=new r("list-unordered",{fontCharacter:"\\eb17"}),r.liveShare=new r("live-share",{fontCharacter:"\\eb18"}),r.loading=new r("loading",{fontCharacter:"\\eb19"}),r.location=new r("location",{fontCharacter:"\\eb1a"}),r.mailRead=new r("mail-read",{fontCharacter:"\\eb1b"}),r.mail=new r("mail",{fontCharacter:"\\eb1c"}),r.markdown=new r("markdown",{fontCharacter:"\\eb1d"}),r.megaphone=new r("megaphone",{fontCharacter:"\\eb1e"}),r.mention=new r("mention",{fontCharacter:"\\eb1f"}),r.milestone=new r("milestone",{fontCharacter:"\\eb20"}),r.mortarBoard=new r("mortar-board",{fontCharacter:"\\eb21"}),r.move=new r("move",{fontCharacter:"\\eb22"}),r.multipleWindows=new r("multiple-windows",{fontCharacter:"\\eb23"}),r.mute=new r("mute",{fontCharacter:"\\eb24"}),r.noNewline=new r("no-newline",{fontCharacter:"\\eb25"}),r.note=new r("note",{fontCharacter:"\\eb26"}),r.octoface=new r("octoface",{fontCharacter:"\\eb27"}),r.openPreview=new r("open-preview",{fontCharacter:"\\eb28"}),r.package_=new r("package",{fontCharacter:"\\eb29"}),r.paintcan=new r("paintcan",{fontCharacter:"\\eb2a"}),r.pin=new r("pin",{fontCharacter:"\\eb2b"}),r.play=new r("play",{fontCharacter:"\\eb2c"}),r.run=new r("run",{fontCharacter:"\\eb2c"}),r.plug=new r("plug",{fontCharacter:"\\eb2d"}),r.preserveCase=new r("preserve-case",{fontCharacter:"\\eb2e"}),r.preview=new r("preview",{fontCharacter:"\\eb2f"}),r.project=new r("project",{fontCharacter:"\\eb30"}),r.pulse=new r("pulse",{fontCharacter:"\\eb31"}),r.question=new r("question",{fontCharacter:"\\eb32"}),r.quote=new r("quote",{fontCharacter:"\\eb33"}),r.radioTower=new r("radio-tower",{fontCharacter:"\\eb34"}),r.reactions=new r("reactions",{fontCharacter:"\\eb35"}),r.references=new r("references",{fontCharacter:"\\eb36"}),r.refresh=new r("refresh",{fontCharacter:"\\eb37"}),r.regex=new r("regex",{fontCharacter:"\\eb38"}),r.remoteExplorer=new r("remote-explorer",{fontCharacter:"\\eb39"}),r.remote=new r("remote",{fontCharacter:"\\eb3a"}),r.remove=new r("remove",{fontCharacter:"\\eb3b"}),r.replaceAll=new r("replace-all",{fontCharacter:"\\eb3c"}),r.replace=new r("replace",{fontCharacter:"\\eb3d"}),r.repoClone=new r("repo-clone",{fontCharacter:"\\eb3e"}),r.repoForcePush=new r("repo-force-push",{fontCharacter:"\\eb3f"}),r.repoPull=new r("repo-pull",{fontCharacter:"\\eb40"}),r.repoPush=new r("repo-push",{fontCharacter:"\\eb41"}),r.report=new r("report",{fontCharacter:"\\eb42"}),r.requestChanges=new r("request-changes",{fontCharacter:"\\eb43"}),r.rocket=new r("rocket",{fontCharacter:"\\eb44"}),r.rootFolderOpened=new r("root-folder-opened",{fontCharacter:"\\eb45"}),r.rootFolder=new r("root-folder",{fontCharacter:"\\eb46"}),r.rss=new r("rss",{fontCharacter:"\\eb47"}),r.ruby=new r("ruby",{fontCharacter:"\\eb48"}),r.saveAll=new r("save-all",{fontCharacter:"\\eb49"}),r.saveAs=new r("save-as",{fontCharacter:"\\eb4a"}),r.save=new r("save",{fontCharacter:"\\eb4b"}),r.screenFull=new r("screen-full",{fontCharacter:"\\eb4c"}),r.screenNormal=new r("screen-normal",{fontCharacter:"\\eb4d"}),r.searchStop=new r("search-stop",{fontCharacter:"\\eb4e"}),r.server=new r("server",{fontCharacter:"\\eb50"}),r.settingsGear=new r("settings-gear",{fontCharacter:"\\eb51"}),r.settings=new r("settings",{fontCharacter:"\\eb52"}),r.shield=new r("shield",{fontCharacter:"\\eb53"}),r.smiley=new r("smiley",{fontCharacter:"\\eb54"}),r.sortPrecedence=new r("sort-precedence",{fontCharacter:"\\eb55"}),r.splitHorizontal=new r("split-horizontal",{fontCharacter:"\\eb56"}),r.splitVertical=new r("split-vertical",{fontCharacter:"\\eb57"}),r.squirrel=new r("squirrel",{fontCharacter:"\\eb58"}),r.starFull=new r("star-full",{fontCharacter:"\\eb59"}),r.starHalf=new r("star-half",{fontCharacter:"\\eb5a"}),r.symbolClass=new r("symbol-class",{fontCharacter:"\\eb5b"}),r.symbolColor=new r("symbol-color",{fontCharacter:"\\eb5c"}),r.symbolCustomColor=new r("symbol-customcolor",{fontCharacter:"\\eb5c"}),r.symbolConstant=new r("symbol-constant",{fontCharacter:"\\eb5d"}),r.symbolEnumMember=new r("symbol-enum-member",{fontCharacter:"\\eb5e"}),r.symbolField=new r("symbol-field",{fontCharacter:"\\eb5f"}),r.symbolFile=new r("symbol-file",{fontCharacter:"\\eb60"}),r.symbolInterface=new r("symbol-interface",{fontCharacter:"\\eb61"}),r.symbolKeyword=new r("symbol-keyword",{fontCharacter:"\\eb62"}),r.symbolMisc=new r("symbol-misc",{fontCharacter:"\\eb63"}),r.symbolOperator=new r("symbol-operator",{fontCharacter:"\\eb64"}),r.symbolProperty=new r("symbol-property",{fontCharacter:"\\eb65"}),r.wrench=new r("wrench",{fontCharacter:"\\eb65"}),r.wrenchSubaction=new r("wrench-subaction",{fontCharacter:"\\eb65"}),r.symbolSnippet=new r("symbol-snippet",{fontCharacter:"\\eb66"}),r.tasklist=new r("tasklist",{fontCharacter:"\\eb67"}),r.telescope=new r("telescope",{fontCharacter:"\\eb68"}),r.textSize=new r("text-size",{fontCharacter:"\\eb69"}),r.threeBars=new r("three-bars",{fontCharacter:"\\eb6a"}),r.thumbsdown=new r("thumbsdown",{fontCharacter:"\\eb6b"}),r.thumbsup=new r("thumbsup",{fontCharacter:"\\eb6c"}),r.tools=new r("tools",{fontCharacter:"\\eb6d"}),r.triangleDown=new r("triangle-down",{fontCharacter:"\\eb6e"}),r.triangleLeft=new r("triangle-left",{fontCharacter:"\\eb6f"}),r.triangleRight=new r("triangle-right",{fontCharacter:"\\eb70"}),r.triangleUp=new r("triangle-up",{fontCharacter:"\\eb71"}),r.twitter=new r("twitter",{fontCharacter:"\\eb72"}),r.unfold=new r("unfold",{fontCharacter:"\\eb73"}),r.unlock=new r("unlock",{fontCharacter:"\\eb74"}),r.unmute=new r("unmute",{fontCharacter:"\\eb75"}),r.unverified=new r("unverified",{fontCharacter:"\\eb76"}),r.verified=new r("verified",{fontCharacter:"\\eb77"}),r.versions=new r("versions",{fontCharacter:"\\eb78"}),r.vmActive=new r("vm-active",{fontCharacter:"\\eb79"}),r.vmOutline=new r("vm-outline",{fontCharacter:"\\eb7a"}),r.vmRunning=new r("vm-running",{fontCharacter:"\\eb7b"}),r.watch=new r("watch",{fontCharacter:"\\eb7c"}),r.whitespace=new r("whitespace",{fontCharacter:"\\eb7d"}),r.wholeWord=new r("whole-word",{fontCharacter:"\\eb7e"}),r.window=new r("window",{fontCharacter:"\\eb7f"}),r.wordWrap=new r("word-wrap",{fontCharacter:"\\eb80"}),r.zoomIn=new r("zoom-in",{fontCharacter:"\\eb81"}),r.zoomOut=new r("zoom-out",{fontCharacter:"\\eb82"}),r.listFilter=new r("list-filter",{fontCharacter:"\\eb83"}),r.listFlat=new r("list-flat",{fontCharacter:"\\eb84"}),r.listSelection=new r("list-selection",{fontCharacter:"\\eb85"}),r.selection=new r("selection",{fontCharacter:"\\eb85"}),r.listTree=new r("list-tree",{fontCharacter:"\\eb86"}),r.debugBreakpointFunctionUnverified=new r("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),r.debugBreakpointFunction=new r("debug-breakpoint-function",{fontCharacter:"\\eb88"}),r.debugBreakpointFunctionDisabled=new r("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),r.debugStackframeActive=new r("debug-stackframe-active",{fontCharacter:"\\eb89"}),r.debugStackframeDot=new r("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),r.debugStackframe=new r("debug-stackframe",{fontCharacter:"\\eb8b"}),r.debugStackframeFocused=new r("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),r.debugBreakpointUnsupported=new r("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),r.symbolString=new r("symbol-string",{fontCharacter:"\\eb8d"}),r.debugReverseContinue=new r("debug-reverse-continue",{fontCharacter:"\\eb8e"}),r.debugStepBack=new r("debug-step-back",{fontCharacter:"\\eb8f"}),r.debugRestartFrame=new r("debug-restart-frame",{fontCharacter:"\\eb90"}),r.callIncoming=new r("call-incoming",{fontCharacter:"\\eb92"}),r.callOutgoing=new r("call-outgoing",{fontCharacter:"\\eb93"}),r.menu=new r("menu",{fontCharacter:"\\eb94"}),r.expandAll=new r("expand-all",{fontCharacter:"\\eb95"}),r.feedback=new r("feedback",{fontCharacter:"\\eb96"}),r.groupByRefType=new r("group-by-ref-type",{fontCharacter:"\\eb97"}),r.ungroupByRefType=new r("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),r.account=new r("account",{fontCharacter:"\\eb99"}),r.bellDot=new r("bell-dot",{fontCharacter:"\\eb9a"}),r.debugConsole=new r("debug-console",{fontCharacter:"\\eb9b"}),r.library=new r("library",{fontCharacter:"\\eb9c"}),r.output=new r("output",{fontCharacter:"\\eb9d"}),r.runAll=new r("run-all",{fontCharacter:"\\eb9e"}),r.syncIgnored=new r("sync-ignored",{fontCharacter:"\\eb9f"}),r.pinned=new r("pinned",{fontCharacter:"\\eba0"}),r.githubInverted=new r("github-inverted",{fontCharacter:"\\eba1"}),r.debugAlt=new r("debug-alt",{fontCharacter:"\\eb91"}),r.serverProcess=new r("server-process",{fontCharacter:"\\eba2"}),r.serverEnvironment=new r("server-environment",{fontCharacter:"\\eba3"}),r.pass=new r("pass",{fontCharacter:"\\eba4"}),r.stopCircle=new r("stop-circle",{fontCharacter:"\\eba5"}),r.playCircle=new r("play-circle",{fontCharacter:"\\eba6"}),r.record=new r("record",{fontCharacter:"\\eba7"}),r.debugAltSmall=new r("debug-alt-small",{fontCharacter:"\\eba8"}),r.vmConnect=new r("vm-connect",{fontCharacter:"\\eba9"}),r.cloud=new r("cloud",{fontCharacter:"\\ebaa"}),r.merge=new r("merge",{fontCharacter:"\\ebab"}),r.exportIcon=new r("export",{fontCharacter:"\\ebac"}),r.graphLeft=new r("graph-left",{fontCharacter:"\\ebad"}),r.magnet=new r("magnet",{fontCharacter:"\\ebae"}),r.notebook=new r("notebook",{fontCharacter:"\\ebaf"}),r.redo=new r("redo",{fontCharacter:"\\ebb0"}),r.checkAll=new r("check-all",{fontCharacter:"\\ebb1"}),r.pinnedDirty=new r("pinned-dirty",{fontCharacter:"\\ebb2"}),r.passFilled=new r("pass-filled",{fontCharacter:"\\ebb3"}),r.circleLargeFilled=new r("circle-large-filled",{fontCharacter:"\\ebb4"}),r.circleLargeOutline=new r("circle-large-outline",{fontCharacter:"\\ebb5"}),r.combine=new r("combine",{fontCharacter:"\\ebb6"}),r.gather=new r("gather",{fontCharacter:"\\ebb6"}),r.table=new r("table",{fontCharacter:"\\ebb7"}),r.variableGroup=new r("variable-group",{fontCharacter:"\\ebb8"}),r.typeHierarchy=new r("type-hierarchy",{fontCharacter:"\\ebb9"}),r.typeHierarchySub=new r("type-hierarchy-sub",{fontCharacter:"\\ebba"}),r.typeHierarchySuper=new r("type-hierarchy-super",{fontCharacter:"\\ebbb"}),r.gitPullRequestCreate=new r("git-pull-request-create",{fontCharacter:"\\ebbc"}),r.runAbove=new r("run-above",{fontCharacter:"\\ebbd"}),r.runBelow=new r("run-below",{fontCharacter:"\\ebbe"}),r.notebookTemplate=new r("notebook-template",{fontCharacter:"\\ebbf"}),r.debugRerun=new r("debug-rerun",{fontCharacter:"\\ebc0"}),r.workspaceTrusted=new r("workspace-trusted",{fontCharacter:"\\ebc1"}),r.workspaceUntrusted=new r("workspace-untrusted",{fontCharacter:"\\ebc2"}),r.workspaceUnspecified=new r("workspace-unspecified",{fontCharacter:"\\ebc3"}),r.terminalCmd=new r("terminal-cmd",{fontCharacter:"\\ebc4"}),r.terminalDebian=new r("terminal-debian",{fontCharacter:"\\ebc5"}),r.terminalLinux=new r("terminal-linux",{fontCharacter:"\\ebc6"}),r.terminalPowershell=new r("terminal-powershell",{fontCharacter:"\\ebc7"}),r.terminalTmux=new r("terminal-tmux",{fontCharacter:"\\ebc8"}),r.terminalUbuntu=new r("terminal-ubuntu",{fontCharacter:"\\ebc9"}),r.terminalBash=new r("terminal-bash",{fontCharacter:"\\ebca"}),r.arrowSwap=new r("arrow-swap",{fontCharacter:"\\ebcb"}),r.copy=new r("copy",{fontCharacter:"\\ebcc"}),r.personAdd=new r("person-add",{fontCharacter:"\\ebcd"}),r.filterFilled=new r("filter-filled",{fontCharacter:"\\ebce"}),r.wand=new r("wand",{fontCharacter:"\\ebcf"}),r.debugLineByLine=new r("debug-line-by-line",{fontCharacter:"\\ebd0"}),r.inspect=new r("inspect",{fontCharacter:"\\ebd1"}),r.layers=new r("layers",{fontCharacter:"\\ebd2"}),r.layersDot=new r("layers-dot",{fontCharacter:"\\ebd3"}),r.layersActive=new r("layers-active",{fontCharacter:"\\ebd4"}),r.compass=new r("compass",{fontCharacter:"\\ebd5"}),r.compassDot=new r("compass-dot",{fontCharacter:"\\ebd6"}),r.compassActive=new r("compass-active",{fontCharacter:"\\ebd7"}),r.azure=new r("azure",{fontCharacter:"\\ebd8"}),r.issueDraft=new r("issue-draft",{fontCharacter:"\\ebd9"}),r.gitPullRequestClosed=new r("git-pull-request-closed",{fontCharacter:"\\ebda"}),r.gitPullRequestDraft=new r("git-pull-request-draft",{fontCharacter:"\\ebdb"}),r.debugAll=new r("debug-all",{fontCharacter:"\\ebdc"}),r.debugCoverage=new r("debug-coverage",{fontCharacter:"\\ebdd"}),r.runErrors=new r("run-errors",{fontCharacter:"\\ebde"}),r.folderLibrary=new r("folder-library",{fontCharacter:"\\ebdf"}),r.debugContinueSmall=new r("debug-continue-small",{fontCharacter:"\\ebe0"}),r.beakerStop=new r("beaker-stop",{fontCharacter:"\\ebe1"}),r.graphLine=new r("graph-line",{fontCharacter:"\\ebe2"}),r.graphScatter=new r("graph-scatter",{fontCharacter:"\\ebe3"}),r.pieChart=new r("pie-chart",{fontCharacter:"\\ebe4"}),r.bracket=new r("bracket",r.json.definition),r.bracketDot=new r("bracket-dot",{fontCharacter:"\\ebe5"}),r.bracketError=new r("bracket-error",{fontCharacter:"\\ebe6"}),r.lockSmall=new r("lock-small",{fontCharacter:"\\ebe7"}),r.azureDevops=new r("azure-devops",{fontCharacter:"\\ebe8"}),r.verifiedFilled=new r("verified-filled",{fontCharacter:"\\ebe9"}),r.newLine=new r("newline",{fontCharacter:"\\ebea"}),r.layout=new r("layout",{fontCharacter:"\\ebeb"}),r.layoutActivitybarLeft=new r("layout-activitybar-left",{fontCharacter:"\\ebec"}),r.layoutActivitybarRight=new r("layout-activitybar-right",{fontCharacter:"\\ebed"}),r.layoutPanelLeft=new r("layout-panel-left",{fontCharacter:"\\ebee"}),r.layoutPanelCenter=new r("layout-panel-center",{fontCharacter:"\\ebef"}),r.layoutPanelJustify=new r("layout-panel-justify",{fontCharacter:"\\ebf0"}),r.layoutPanelRight=new r("layout-panel-right",{fontCharacter:"\\ebf1"}),r.layoutPanel=new r("layout-panel",{fontCharacter:"\\ebf2"}),r.layoutSidebarLeft=new r("layout-sidebar-left",{fontCharacter:"\\ebf3"}),r.layoutSidebarRight=new r("layout-sidebar-right",{fontCharacter:"\\ebf4"}),r.layoutStatusbar=new r("layout-statusbar",{fontCharacter:"\\ebf5"}),r.layoutMenubar=new r("layout-menubar",{fontCharacter:"\\ebf6"}),r.layoutCentered=new r("layout-centered",{fontCharacter:"\\ebf7"}),r.target=new r("target",{fontCharacter:"\\ebf8"}),r.indent=new r("indent",{fontCharacter:"\\ebf9"}),r.recordSmall=new r("record-small",{fontCharacter:"\\ebfa"}),r.errorSmall=new r("error-small",{fontCharacter:"\\ebfb"}),r.arrowCircleDown=new r("arrow-circle-down",{fontCharacter:"\\ebfc"}),r.arrowCircleLeft=new r("arrow-circle-left",{fontCharacter:"\\ebfd"}),r.arrowCircleRight=new r("arrow-circle-right",{fontCharacter:"\\ebfe"}),r.arrowCircleUp=new r("arrow-circle-up",{fontCharacter:"\\ebff"}),r.dialogError=new r("dialog-error",r.error.definition),r.dialogWarning=new r("dialog-warning",r.warning.definition),r.dialogInfo=new r("dialog-info",r.info.definition),r.dialogClose=new r("dialog-close",r.close.definition),r.treeItemExpanded=new r("tree-item-expanded",r.chevronDown.definition),r.treeFilterOnTypeOn=new r("tree-filter-on-type-on",r.listFilter.definition),r.treeFilterOnTypeOff=new r("tree-filter-on-type-off",r.listSelection.definition),r.treeFilterClear=new r("tree-filter-clear",r.close.definition),r.treeItemLoading=new r("tree-item-loading",r.loading.definition),r.menuSelection=new r("menu-selection",r.check.definition),r.menuSubmenu=new r("menu-submenu",r.chevronRight.definition),r.menuBarMore=new r("menubar-more",r.more.definition),r.scrollbarButtonLeft=new r("scrollbar-button-left",r.triangleLeft.definition),r.scrollbarButtonRight=new r("scrollbar-button-right",r.triangleRight.definition),r.scrollbarButtonUp=new r("scrollbar-button-up",r.triangleUp.definition),r.scrollbarButtonDown=new r("scrollbar-button-down",r.triangleDown.definition),r.toolBarMore=new r("toolbar-more",r.more.definition),r.quickInputBack=new r("quick-input-back",r.arrowLeft.definition),function(e){e.iconNameSegment="[A-Za-z0-9]+",e.iconNameExpression="[A-Za-z0-9-]+",e.iconModifierExpression="~[A-Za-z]+",e.iconNameCharacter="[A-Za-z0-9~-]";const t=new RegExp(`^(${e.iconNameExpression})(${e.iconModifierExpression})?$`);function i(e){if(e instanceof r)return["codicon","codicon-"+e.id];const n=t.exec(e.id);if(!n)return i(r.error);let[,o,s]=n;const a=["codicon","codicon-"+o];return s&&a.push("codicon-modifier-"+s.substr(1)),a}e.asClassNameArray=i,e.asClassName=function(e){return i(e).join(" ")},e.asCSSSelector=function(e){return"."+i(e).join(".")}}(o||(o={}))},6626:(e,t,i)=>{"use strict";i.d(t,{E:()=>r,r:()=>o});const n=Object.prototype.hasOwnProperty;function r(e,t){for(let i in e)if(n.call(e,i)&&!1===t({key:i,value:e[i]},(function(){delete e[i]})))return}class o{constructor(){this.map=new Map}add(e,t){let i=this.map.get(e);i||(i=new Set,this.map.set(e,i)),i.add(t)}delete(e,t){const i=this.map.get(e);i&&(i.delete(t),0===i.size&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);i&&i.forEach(t)}}},1264:(e,t,i)=>{"use strict";function n(e,t){const i=Math.pow(10,t);return Math.round(e*i)/i}i.d(t,{Il:()=>a,VS:()=>r,tx:()=>s});class r{constructor(e,t,i,r=1){this._rgbaBrand=void 0,this.r=0|Math.min(255,Math.max(0,e)),this.g=0|Math.min(255,Math.max(0,t)),this.b=0|Math.min(255,Math.max(0,i)),this.a=n(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.r===t.r&&e.g===t.g&&e.b===t.b&&e.a===t.a}}class o{constructor(e,t,i,r){this._hslaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.l=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.l===t.l&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,r=e.a,s=Math.max(t,i,n),a=Math.min(t,i,n);let l=0,c=0;const h=(a+s)/2,d=s-a;if(d>0){switch(c=Math.min(h<=.5?d/(2*h):d/(2-2*h),1),s){case t:l=(i-n)/d+(i1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}static toRGBA(e){const t=e.h/360,{s:i,l:n,a:s}=e;let a,l,c;if(0===i)a=l=c=n;else{const e=n<.5?n*(1+i):n+i-n*i,r=2*n-e;a=o._hue2rgb(r,e,t+1/3),l=o._hue2rgb(r,e,t),c=o._hue2rgb(r,e,t-1/3)}return new r(Math.round(255*a),Math.round(255*l),Math.round(255*c),s)}}class s{constructor(e,t,i,r){this._hsvaBrand=void 0,this.h=0|Math.max(Math.min(360,e),0),this.s=n(Math.max(Math.min(1,t),0),3),this.v=n(Math.max(Math.min(1,i),0),3),this.a=n(Math.max(Math.min(1,r),0),3)}static equals(e,t){return e.h===t.h&&e.s===t.s&&e.v===t.v&&e.a===t.a}static fromRGBA(e){const t=e.r/255,i=e.g/255,n=e.b/255,r=Math.max(t,i,n),o=r-Math.min(t,i,n),a=0===r?0:o/r;let l;return l=0===o?0:r===t?((i-n)/o%6+6)%6:r===i?(n-t)/o+2:(t-i)/o+4,new s(Math.round(60*l),a,r,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:o}=e,s=n*i,a=s*(1-Math.abs(t/60%2-1)),l=n-s;let[c,h,d]=[0,0,0];return t<60?(c=s,h=a):t<120?(c=a,h=s):t<180?(h=s,d=a):t<240?(h=a,d=s):t<300?(c=a,d=s):t<=360&&(c=s,d=a),c=Math.round(255*(c+l)),h=Math.round(255*(h+l)),d=Math.round(255*(d+l)),new r(c,h,d,o)}}class a{constructor(e){if(!e)throw new Error("Color needs a value");if(e instanceof r)this.rgba=e;else if(e instanceof o)this._hsla=e,this.rgba=o.toRGBA(e);else{if(!(e instanceof s))throw new Error("Invalid color ctor argument");this._hsva=e,this.rgba=s.toRGBA(e)}}static fromHex(e){return a.Format.CSS.parseHex(e)||a.red}get hsla(){return this._hsla?this._hsla:o.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:s.fromRGBA(this.rgba)}equals(e){return!!e&&r.equals(this.rgba,e.rgba)&&o.equals(this.hsla,e.hsla)&&s.equals(this.hsva,e.hsva)}getRelativeLuminance(){return n(.2126*a._relativeLuminanceForComponent(this.rgba.r)+.7152*a._relativeLuminanceForComponent(this.rgba.g)+.0722*a._relativeLuminanceForComponent(this.rgba.b),4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3>=128}isLighterThan(e){return this.getRelativeLuminance()>e.getRelativeLuminance()}isDarkerThan(e){return this.getRelativeLuminance(){"use strict";function n(e,t,i){let n=null,r=null;if("function"==typeof i.value?(n="value",r=i.value,0!==r.length&&console.warn("Memoize should only be used in functions with zero parameters")):"function"==typeof i.get&&(n="get",r=i.get),!r)throw new Error("not supported");const o=`$memoize$${t}`;i[n]=function(...e){return this.hasOwnProperty(o)||Object.defineProperty(this,o,{configurable:!1,enumerable:!1,writable:!1,value:r.apply(this,e)}),this[o]}}i.d(t,{H:()=>n})},2484:(e,t,i)=>{"use strict";i.d(t,{Hs:()=>h,a$:()=>s});class n{constructor(e,t,i,n){this.originalStart=e,this.originalLength=t,this.modifiedStart=i,this.modifiedLength=n}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}var r=i(9954);class o{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i0||this.m_modifiedCount>0)&&this.m_changes.push(new n(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_originalCount++}AddModifiedElement(e,t){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,t),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class h{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,r,o]=h._getElements(e),[s,a,l]=h._getElements(t);this._hasStrings=o&&l,this._originalStringElements=n,this._originalElementsOrHash=r,this._modifiedStringElements=s,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&"string"==typeof e[0]}static _getElements(e){const t=e.getElements();if(h._isStringArray(t)){const e=new Int32Array(t.length);for(let i=0,n=t.length;i=e&&r>=i&&this.ElementsAreEqual(t,r);)t--,r--;if(e>t||i>r){let o;return i<=r?(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),o=[new n(e,0,i,r-i+1)]):e<=t?(a.Assert(i===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[new n(e,t-e+1,i,0)]):(a.Assert(e===t+1,"originalStart should only be one more than originalEnd"),a.Assert(i===r+1,"modifiedStart should only be one more than modifiedEnd"),o=[]),o}const s=[0],l=[0],c=this.ComputeRecursionPoint(e,t,i,r,s,l,o),h=s[0],d=l[0];if(null!==c)return c;if(!o[0]){const s=this.ComputeDiffRecursive(e,h,i,d,o);let a=[];return a=o[0]?[new n(h+1,t-(h+1)+1,d+1,r-(d+1)+1)]:this.ComputeDiffRecursive(h+1,t,d+1,r,o),this.ConcatenateChanges(s,a)}return[new n(e,t-e+1,i,r-i+1)]}WALKTRACE(e,t,i,r,o,s,a,l,h,d,u,g,f,p,m,_,v,b){let y=null,w=null,C=new c,x=t,S=i,k=f[0]-_[0]-r,L=-1073741824,N=this.m_forwardHistory.length-1;do{const t=k+e;t===x||t=0&&(e=(h=this.m_forwardHistory[N])[0],x=1,S=h.length-1)}while(--N>=-1);if(y=C.getReverseChanges(),b[0]){let e=f[0]+1,t=_[0]+1;if(null!==y&&y.length>0){const i=y[y.length-1];e=Math.max(e,i.getOriginalEnd()),t=Math.max(t,i.getModifiedEnd())}w=[new n(e,g-e+1,t,m-t+1)]}else{C=new c,x=s,S=a,k=f[0]-_[0]-l,L=1073741824,N=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const e=k+o;e===x||e=d[e+1]?(p=(u=d[e+1]-1)-k-l,u>L&&C.MarkNextChange(),L=u+1,C.AddOriginalElement(u+1,p+1),k=e+1-o):(p=(u=d[e-1])-k-l,u>L&&C.MarkNextChange(),L=u,C.AddModifiedElement(u+1,p+1),k=e-1-o),N>=0&&(o=(d=this.m_reverseHistory[N])[0],x=1,S=d.length-1)}while(--N>=-1);w=C.getChanges()}return this.ConcatenateChanges(y,w)}ComputeRecursionPoint(e,t,i,r,o,s,a){let c=0,h=0,d=0,u=0,g=0,f=0;e--,i--,o[0]=0,s[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const p=t-e+(r-i),m=p+1,_=new Int32Array(m),v=new Int32Array(m),b=r-i,y=t-e,w=e-i,C=t-r,x=(y-b)%2==0;_[b]=e,v[y]=t,a[0]=!1;for(let S=1;S<=p/2+1;S++){let p=0,k=0;d=this.ClipDiagonalBound(b-S,S,b,m),u=this.ClipDiagonalBound(b+S,S,b,m);for(let e=d;e<=u;e+=2){c=e===d||ep+k&&(p=c,k=h),!x&&Math.abs(e-y)<=S-1&&c>=v[e])return o[0]=c,s[0]=h,i<=v[e]&&S<=1448?this.WALKTRACE(b,d,u,w,y,g,f,C,_,v,c,t,o,h,r,s,x,a):null}const L=(p-e+(k-i)-S)/2;if(null!==this.ContinueProcessingPredicate&&!this.ContinueProcessingPredicate(p,L))return a[0]=!0,o[0]=p,s[0]=k,L>0&&S<=1448?this.WALKTRACE(b,d,u,w,y,g,f,C,_,v,c,t,o,h,r,s,x,a):(e++,i++,[new n(e,t-e+1,i,r-i+1)]);g=this.ClipDiagonalBound(y-S,S,y,m),f=this.ClipDiagonalBound(y+S,S,y,m);for(let n=g;n<=f;n+=2){c=n===g||n=v[n+1]?v[n+1]-1:v[n-1],h=c-(n-y)-C;const l=c;for(;c>e&&h>i&&this.ElementsAreEqual(c,h);)c--,h--;if(v[n]=c,x&&Math.abs(n-b)<=S&&c<=_[n])return o[0]=c,s[0]=h,l>=_[n]&&S<=1448?this.WALKTRACE(b,d,u,w,y,g,f,C,_,v,c,t,o,h,r,s,x,a):null}if(S<=1447){let e=new Int32Array(u-d+2);e[0]=b-d+1,l.Copy2(_,d,e,1,u-d+1),this.m_forwardHistory.push(e),e=new Int32Array(f-g+2),e[0]=y-g+1,l.Copy2(v,g,e,1,f-g+1),this.m_reverseHistory.push(e)}}return this.WALKTRACE(b,d,u,w,y,g,f,C,_,v,c,t,o,h,r,s,x,a)}PrettifyChanges(e){for(let t=0;t0,s=i.modifiedLength>0;for(;i.originalStart+i.originalLength=0;t--){const i=e[t];let n=0,r=0;if(t>0){const i=e[t-1];n=i.originalStart+i.originalLength,r=i.modifiedStart+i.modifiedLength}const o=i.originalLength>0,s=i.modifiedLength>0;let a=0,l=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let e=1;;e++){const t=i.originalStart-e,c=i.modifiedStart-e;if(tl&&(l=h,a=e)}i.originalStart-=a,i.modifiedStart-=a;const c=[null];t>0&&this.ChangesOverlap(e[t-1],e[t],c)&&(e[t-1]=c[0],e.splice(t,1),t++)}if(this._hasStrings)for(let t=1,i=e.length;t0&&i>a&&(a=i,l=t,c=e)}return a>0?[l,c]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let r=0;r=this._originalElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,t){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._OriginalIsBoundary(i-1)||this._OriginalIsBoundary(i))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1||this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,t){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(t>0){const i=e+t;if(this._ModifiedIsBoundary(i-1)||this._ModifiedIsBoundary(i))return!0}return!1}_boundaryScore(e,t,i,n){return(this._OriginalRegionIsBoundary(e,t)?1:0)+(this._ModifiedRegionIsBoundary(i,n)?1:0)}ConcatenateChanges(e,t){let i=[];if(0===e.length||0===t.length)return t.length>0?t:e;if(this.ChangesOverlap(e[e.length-1],t[0],i)){const n=new Array(e.length+t.length-1);return l.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],l.Copy(t,1,n,e.length,t.length-1),n}{const i=new Array(e.length+t.length);return l.Copy(e,0,i,0,e.length),l.Copy(t,0,i,e.length,t.length),i}}ChangesOverlap(e,t,i){if(a.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),a.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){const r=e.originalStart;let o=e.originalLength;const s=e.modifiedStart;let a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(o=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new n(r,o,s,a),!0}return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e{"use strict";i.d(t,{B8:()=>g,Cp:()=>o,F0:()=>h,FU:()=>c,L6:()=>u,b1:()=>d,dL:()=>r,n2:()=>l,ri:()=>s});const n=new class{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout((()=>{if(e.stack)throw new Error(e.message+"\n\n"+e.stack);throw e}),0)}}emit(e){this.listeners.forEach((t=>{t(e)}))}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}};function r(e){l(e)||n.onUnexpectedError(e)}function o(e){l(e)||n.onUnexpectedExternalError(e)}function s(e){if(e instanceof Error){let{name:t,message:i}=e;return{$isError:!0,name:t,message:i,stack:e.stacktrace||e.stack}}return e}const a="Canceled";function l(e){return e instanceof c||e instanceof Error&&e.name===a&&e.message===a}class c extends Error{constructor(){super(a),this.name=this.message}}function h(){const e=new Error(a);return e.name=e.message,e}function d(e){return e?new Error(`Illegal argument: ${e}`):new Error("Illegal argument")}function u(e){return e?new Error(`Illegal state: ${e}`):new Error("Illegal state")}class g extends Error{constructor(e){super("NotSupported"),e&&(this.message=e)}}},4669:(e,t,i)=>{"use strict";i.d(t,{D0:()=>g,E7:()=>f,K3:()=>u,Q5:()=>d,ZD:()=>p,ju:()=>n});var n,r=i(7301),o=i(5976),s=i(1741),a=i(4013);!function(e){function t(e){return(t,i=null,n)=>{let r,o=!1;return r=e((e=>{if(!o)return r?r.dispose():o=!0,t.call(i,e)}),null,n),o&&r.dispose(),r}}function i(e,t,i){return a(((i,n=null,r)=>e((e=>i.call(n,t(e))),null,r)),i)}function n(e,t,i){return a(((i,n=null,r)=>e((e=>{t(e),i.call(n,e)}),null,r)),i)}function r(e,t,i){return a(((i,n=null,r)=>e((e=>t(e)&&i.call(n,e)),null,r)),i)}function s(e,t,n,r){let o=n;return i(e,(e=>(o=t(o,e),o)),r)}function a(e,t){let i;const n=new d({onFirstListenerAdd(){i=e(n.fire,n)},onLastListenerRemove(){i.dispose()}});return t&&t.add(n),n.event}function l(e,t,i=100,n=!1,r,o){let s,a,l,c=0;const h=new d({leakWarningThreshold:r,onFirstListenerAdd(){s=e((e=>{c++,a=t(a,e),n&&!l&&(h.fire(a),a=void 0),clearTimeout(l),l=setTimeout((()=>{const e=a;a=void 0,l=void 0,(!n||c>1)&&h.fire(e),c=0}),i)}))},onLastListenerRemove(){s.dispose()}});return o&&o.add(h),h.event}function c(e,t=((e,t)=>e===t),i){let n,o=!0;return r(e,(e=>{const i=o||!t(e,n);return o=!1,n=e,i}),i)}e.None=()=>o.JT.None,e.once=t,e.map=i,e.forEach=n,e.filter=r,e.signal=function(e){return e},e.any=function(...e){return(t,i=null,n)=>(0,o.F8)(...e.map((e=>e((e=>t.call(i,e)),null,n))))},e.reduce=s,e.debounce=l,e.latch=c,e.split=function(t,i,n){return[e.filter(t,i,n),e.filter(t,(e=>!i(e)),n)]},e.buffer=function(e,t=!1,i=[]){let n=i.slice(),r=e((e=>{n?n.push(e):s.fire(e)}));const o=()=>{n&&n.forEach((e=>s.fire(e))),n=null},s=new d({onFirstListenerAdd(){r||(r=e((e=>s.fire(e))))},onFirstListenerDidAdd(){n&&(t?setTimeout(o):o())},onLastListenerRemove(){r&&r.dispose(),r=null}});return s.event};class h{constructor(e){this.event=e}map(e){return new h(i(this.event,e))}forEach(e){return new h(n(this.event,e))}filter(e){return new h(r(this.event,e))}reduce(e,t){return new h(s(this.event,e,t))}latch(){return new h(c(this.event))}debounce(e,t=100,i=!1,n){return new h(l(this.event,e,t,i,n))}on(e,t,i){return this.event(e,t,i)}once(e,i,n){return t(this.event)(e,i,n)}}e.chain=function(e){return new h(e)},e.fromNodeEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>r.fire(i(...e)),r=new d({onFirstListenerAdd:()=>e.on(t,n),onLastListenerRemove:()=>e.removeListener(t,n)});return r.event},e.fromDOMEventEmitter=function(e,t,i=(e=>e)){const n=(...e)=>r.fire(i(...e)),r=new d({onFirstListenerAdd:()=>e.addEventListener(t,n),onLastListenerRemove:()=>e.removeEventListener(t,n)});return r.event},e.toPromise=function(e){return new Promise((i=>t(e)(i)))},e.runAndSubscribe=function(e,t){return t(void 0),e((e=>t(e)))},e.runAndSubscribeWithStore=function(e,t){let i=null;function n(e){null==i||i.dispose(),i=new o.SL,t(e,i)}n(void 0);const r=e((e=>n(e)));return(0,o.OF)((()=>{r.dispose(),null==i||i.dispose()}))}}(n||(n={}));class l{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${l._idPool++}`}start(e){this._stopWatch=new a.G(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}l._idPool=0;class c{constructor(e){this.value=e}static create(){var e;return new c(null!==(e=(new Error).stack)&&void 0!==e?e:"")}print(){console.warn(this.value.split("\n").slice(2).join("\n"))}}class h{constructor(e,t,i){this.callback=e,this.callbackThis=t,this.stack=i,this.subscription=new o.dt}invoke(e){this.callback.call(this.callbackThis,e)}}class d{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=(null===(t=this._options)||void 0===t?void 0:t._profName)?new l(this._options._profName):void 0}dispose(){var e,t,i,n;this._disposed||(this._disposed=!0,this._listeners&&this._listeners.clear(),null===(e=this._deliveryQueue)||void 0===e||e.clear(),null===(i=null===(t=this._options)||void 0===t?void 0:t.onLastListenerRemove)||void 0===i||i.call(t),null===(n=this._leakageMon)||void 0===n||n.dispose())}get event(){return this._event||(this._event=(e,t,i)=>{var n,r,a;this._listeners||(this._listeners=new s.S);const l=this._listeners.isEmpty();let d,u;l&&(null===(n=this._options)||void 0===n?void 0:n.onFirstListenerAdd)&&this._options.onFirstListenerAdd(this),this._leakageMon&&this._listeners.size>=30&&(u=c.create(),d=this._leakageMon.check(u,this._listeners.size+1));const g=new h(e,t,u),f=this._listeners.push(g);l&&(null===(r=this._options)||void 0===r?void 0:r.onFirstListenerDidAdd)&&this._options.onFirstListenerDidAdd(this),(null===(a=this._options)||void 0===a?void 0:a.onListenerDidAdd)&&this._options.onListenerDidAdd(this,e,t);const p=g.subscription.set((()=>{d&&d(),!this._disposed&&(f(),this._options&&this._options.onLastListenerRemove)&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this))}));return i instanceof o.SL?i.add(p):Array.isArray(i)&&i.push(p),p}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new s.S);for(let t of this._listeners)this._deliveryQueue.push([t,e]);for(null===(t=this._perfMon)||void 0===t||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[e,t]=this._deliveryQueue.shift();try{e.invoke(t)}catch(e){(0,r.dL)(e)}}null===(i=this._perfMon)||void 0===i||i.stop()}}}class u extends d{constructor(e){super(e),this._isPaused=0,this._eventQueue=new s.S,this._mergeFn=null==e?void 0:e.merge}pause(){this._isPaused++}resume(){if(0!==this._isPaused&&0==--this._isPaused)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&0!==this._eventQueue.size;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(0!==this._isPaused?this._eventQueue.push(e):super.fire(e))}}class g extends u{constructor(e){var t;super(e),this._delay=null!==(t=e.delay)&&void 0!==t?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout((()=>{this._handle=void 0,this.resume()}),this._delay)),super.fire(e)}}class f{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e((e=>{const n=this.buffers[this.buffers.length-1];n?n.push((()=>t.call(i,e))):t.call(i,e)}),void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach((e=>e())),i}}class p{constructor(){this.listening=!1,this.inputEvent=n.None,this.inputEventListener=o.JT.None,this.emitter=new d({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(e){this.inputEvent=e,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=e(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},5527:(e,t,i)=>{"use strict";i.d(t,{KM:()=>h,ej:()=>a,fn:()=>l,oP:()=>g,vY:()=>u,yj:()=>c});var n=i(8721),r=i(1432),o=i(5924);function s(e){return 47===e||92===e}function a(e){return e.replace(/[\\/]/g,n.KR.sep)}function l(e){return-1===e.indexOf("/")&&(e=a(e)),/^[a-zA-Z]:(\/|$)/.test(e)&&(e="/"+e),e}function c(e,t=n.KR.sep){if(!e)return"";const i=e.length,r=e.charCodeAt(0);if(s(r)){if(s(e.charCodeAt(1))&&!s(e.charCodeAt(2))){let n=3;const r=n;for(;ne.length)return!1;if(i){if(!(0,o.ok)(e,t))return!1;if(t.length===e.length)return!0;let i=t.length;return t.charAt(t.length-1)===r&&i--,e.charAt(i)===r}return t.charAt(t.length-1)!==r&&(t+=r),0===e.indexOf(t)}function d(e){return e>=65&&e<=90||e>=97&&e<=122}function u(e){const t=(0,n.Fv)(e);return r.ED?!(e.length>3)&&g(t)&&(2===e.length||92===t.charCodeAt(2)):t===n.KR.sep}function g(e,t){return!!(void 0!==t?t:r.ED)&&d(e.charCodeAt(0))&&58===e.charCodeAt(1)}},5392:(e,t,i)=>{"use strict";i.d(t,{CL:()=>z,EW:()=>H,Ji:()=>s,KZ:()=>w,Oh:()=>N,ir:()=>l,jB:()=>E,l7:()=>U,mB:()=>D,or:()=>o});var n=i(3702),r=i(5924);function o(...e){return function(t,i){for(let n=0,r=e.length;n0?[{start:0,end:t.length}]:[]:null}function l(e,t){const i=t.toLowerCase().indexOf(e.toLowerCase());return-1===i?null:[{start:i,end:i+e.length}]}function c(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]===t[n]){let r=null;return(r=c(e,t,i+1,n+1))?_({start:n,end:n+1},r):null}return c(e,t,i,n+1)}function h(e){return 97<=e&&e<=122}function d(e){return 65<=e&&e<=90}function u(e){return 48<=e&&e<=57}function g(e){return 32===e||9===e||10===e||13===e}const f=new Set;function p(e){return g(e)||f.has(e)}function m(e){return h(e)||d(e)||u(e)}function _(e,t){return 0===t.length?t=[e]:e.end===t[0].start?t[0].start=e.start:t.unshift(e),t}function v(e,t){for(let i=t;i0&&!m(e.charCodeAt(i-1)))return i}return e.length}function b(e,t,i,n){if(i===e.length)return[];if(n===t.length)return null;if(e[i]!==t[n].toLowerCase())return null;{let r=null,o=n+1;for(r=b(e,t,i+1,n+1);!r&&(o=v(t,o))60)return null;const i=function(e){let t=0,i=0,n=0,r=0,o=0;for(let s=0;s.2&&t<.8&&n>.6&&r<.2}(i)){if(!function(e){const{upperPercent:t,lowerPercent:i}=e;return 0===i&&t>.6}(i))return null;t=t.toLowerCase()}let n=null,r=0;for(e=e.toLowerCase();r0&&p(e.charCodeAt(i-1)))return i;return e.length}"()[]{}<>`'\"-/;:,.?!".split("").forEach((e=>f.add(e.charCodeAt(0))));const S=o(s,y,l),k=o(s,y,(function(e,t){return c(e.toLowerCase(),t.toLowerCase(),0,0)})),L=new n.z6(1e4);function N(e,t,i=!1){if("string"!=typeof e||"string"!=typeof t)return null;let n=L.get(e);n||(n=new RegExp(r.un(e),"i"),L.set(e,n));const o=n.exec(t);return o?[{start:o.index,end:o.index+o[0].length}]:i?k(e,t):S(e,t)}function E(e,t,i,n,r,o){const s=Math.min(13,e.length);for(;i1;n--){const r=e[n]+i,o=t[t.length-1];o&&o.end===r?o.end=r+1:t.push({start:r,end:r+1})}return t}const A=128;function T(){const e=[],t=[];for(let e=0;e<=A;e++)t[e]=0;for(let i=0;i<=A;i++)e.push(t.slice(0));return e}function I(e){const t=[];for(let i=0;i<=e;i++)t[i]=0;return t}const M=I(256),O=I(256),R=T(),P=T(),F=T();function B(e,t){if(t<0||t>=e.length)return!1;const i=e.codePointAt(t);switch(i){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!r.C8(i)}}function W(e,t){if(t<0||t>=e.length)return!1;switch(e.charCodeAt(t)){case 32:case 9:return!0;default:return!1}}function V(e,t,i){return t[e]!==i[e]}var z;function H(e,t,i,n,r,o,s){const a=e.length>A?A:e.length,l=n.length>A?A:n.length;if(i>=a||o>=l||a-i>l-o)return;if(!function(e,t,i,n,r,o,s=!1){for(;t=i&&a>=n;)r[s]===o[a]&&(O[s]=a,s--),a--}(a,l,i,o,t,r);let c=1,h=1,d=i,u=o;const g=[!1];for(c=1,d=i;ds,v=_?P[c][h-1]+(R[c][h-1]>0?-5:0):0,b=u>s+1&&R[c][h-1]>0,y=b?P[c][h-2]+(R[c][h-2]>0?-5:0):0;if(b&&(!_||y>=v)&&(!p||y>=m))P[c][h]=y,F[c][h]=3,R[c][h]=0;else if(_&&(!p||v>=m))P[c][h]=v,F[c][h]=2,R[c][h]=0;else{if(!p)throw new Error("not possible");P[c][h]=m,F[c][h]=1,R[c][h]=R[c-1][h-1]+1}}}if(!g[0]&&!s)return;c--,h--;const f=[P[c][h],o];let p=0,m=0;for(;c>=1;){let e=h;do{const t=F[c][e];if(3===t)e-=2;else{if(2!==t)break;e-=1}}while(e>=1);p>1&&t[i+c-1]===r[o+h-1]&&!V(e+o-1,n,r)&&p+1>R[c][e]&&(e=h),e===h?p++:p=1,m||(m=e),c--,h=e-1,f.push(h)}l===a&&(f[0]+=2);const _=m-a;return f[0]-=_,f}function j(e,t,i,n,r,o,s,a,l,c,h){if(t[i]!==o[s])return Number.MIN_SAFE_INTEGER;let d=1,u=!1;return s===i-n?d=e[i]===r[s]?7:5:!V(s,r,o)||0!==s&&V(s-1,r,o)?!B(o,s)||0!==s&&B(o,s-1)?(B(o,s-1)||W(o,s-1))&&(d=5,u=!0):d=5:(d=e[i]===r[s]?7:5,u=!0),d>1&&i===n&&(h[0]=!0),u||(u=V(s,r,o)||B(o,s-1)||W(o,s-1)),i===n?s>l&&(d-=u?3:5):d+=c?u?2:0:u?0:1,s+1===a&&(d-=u?3:5),d}function U(e,t,i,n,r,o,s){return function(e,t,i,n,r,o,s,a){let l=H(e,t,i,n,r,o,a);if(e.length>=3){const t=Math.min(7,e.length-1);for(let s=i+1;sl[0])&&(l=e))}}}return l}(e,t,i,n,r,o,0,s)}function $(e,t){if(t+1>=e.length)return;const i=e[t],n=e[t+1];return i!==n?e.slice(0,t)+n+i+e.slice(t+2):void 0}!function(e){e.Default=[-100,0],e.isDefault=function(e){return!e||2===e.length&&-100===e[0]&&0===e[1]}}(z||(z={}))},8289:(e,t,i)=>{"use strict";function n(e){const t=this;let i,n=!1;return function(){return n||(n=!0,i=e.apply(t,arguments)),i}}i.d(t,{I:()=>n})},9954:(e,t,i)=>{"use strict";i.d(t,{Cv:()=>a,SP:()=>o,vp:()=>r,yP:()=>d});var n=i(5924);function r(e){return o(e,0)}function o(e,t){switch(typeof e){case"object":return null===e?s(349,t):Array.isArray(e)?(i=e,n=s(104579,n=t),i.reduce(((e,t)=>o(t,e)),n)):function(e,t){return t=s(181387,t),Object.keys(e).sort().reduce(((t,i)=>(t=a(i,t),o(e[i],t))),t)}(e,t);case"string":return a(e,t);case"boolean":return function(e,t){return s(e?433:863,t)}(e,t);case"number":return s(e,t);case"undefined":return s(937,t);default:return s(617,t)}var i,n}function s(e,t){return(t<<5)-t+e|0}function a(e,t){t=s(149417,t);for(let i=0,n=e.length;i>>n)>>>0}function c(e,t=0,i=e.byteLength,n=0){for(let r=0;re.toString(16).padStart(2,"0"))).join(""):function(e,t,i="0"){for(;e.length>>0).toString(16),t/4)}class d{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(67),this._buffDV=new DataView(this._buff.buffer),this._buffLen=0,this._totalLen=0,this._leftoverHighSurrogate=0,this._finished=!1}update(e){const t=e.length;if(0===t)return;const i=this._buff;let r,o,s=this._buffLen,a=this._leftoverHighSurrogate;for(0!==a?(r=a,o=-1,a=0):(r=e.charCodeAt(0),o=0);;){let l=r;if(n.ZG(r)){if(!(o+1>>6,e[t++]=128|(63&i)>>>0):i<65536?(e[t++]=224|(61440&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0):(e[t++]=240|(1835008&i)>>>18,e[t++]=128|(258048&i)>>>12,e[t++]=128|(4032&i)>>>6,e[t++]=128|(63&i)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64],e[1]=e[65],e[2]=e[66]),t}digest(){return this._finished||(this._finished=!0,this._leftoverHighSurrogate&&(this._leftoverHighSurrogate=0,this._buffLen=this._push(this._buff,this._buffLen,65533)),this._totalLen+=this._buffLen,this._wrapUp()),h(this._h0)+h(this._h1)+h(this._h2)+h(this._h3)+h(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,c(this._buff,this._buffLen),this._buffLen>56&&(this._step(),c(this._buff));const e=8*this._totalLen;this._buffDV.setUint32(56,Math.floor(e/4294967296),!1),this._buffDV.setUint32(60,e%4294967296,!1),this._step()}_step(){const e=d._bigBlock32,t=this._buffDV;for(let i=0;i<64;i+=4)e.setUint32(i,t.getUint32(i,!1),!1);for(let t=64;t<320;t+=4)e.setUint32(t,l(e.getUint32(t-12,!1)^e.getUint32(t-32,!1)^e.getUint32(t-56,!1)^e.getUint32(t-64,!1),1),!1);let i,n,r,o=this._h0,s=this._h1,a=this._h2,c=this._h3,h=this._h4;for(let t=0;t<80;t++)t<20?(i=s&a|~s&c,n=1518500249):t<40?(i=s^a^c,n=1859775393):t<60?(i=s&a|s&c|a&c,n=2400959708):(i=s^a^c,n=3395469782),r=l(o,5)+i+h+n+e.getUint32(4*t,!1)&4294967295,h=c,c=a,a=l(s,30),s=o,o=r;this._h0=this._h0+o&4294967295,this._h1=this._h1+s&4294967295,this._h2=this._h2+a&4294967295,this._h3=this._h3+c&4294967295,this._h4=this._h4+h&4294967295}}d._bigBlock32=new DataView(new ArrayBuffer(320))},9365:(e,t,i)=>{"use strict";i.d(t,{CP:()=>s,Fr:()=>a,W5:()=>o,oR:()=>l,v1:()=>c});var n=i(7301),r=i(1212);class o{constructor(e="",t=!1){var i,r,o;if(this.value=e,"string"!=typeof this.value)throw(0,n.b1)("value");"boolean"==typeof t?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=null!==(i=t.isTrusted)&&void 0!==i?i:void 0,this.supportThemeIcons=null!==(r=t.supportThemeIcons)&&void 0!==r&&r,this.supportHtml=null!==(o=t.supportHtml)&&void 0!==o&&o)}appendText(e,t=0){var i;return this.value+=(i=this.supportThemeIcons?(0,r.Qo)(e):e,i.replace(/[\\`*_{}[\]()#+\-!]/g,"\\$&")).replace(/([ \t]+)/g,((e,t)=>" ".repeat(t.length))).replace(/\>/gm,"\\>").replace(/\n/g,1===t?"\\\n":"\n\n"),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+="\n",this.value+=t,this.value+="\n```\n",this}}function s(e){return a(e)?!e.value:!Array.isArray(e)||e.every(s)}function a(e){return e instanceof o||!(!e||"object"!=typeof e)&&!("string"!=typeof e.value||"boolean"!=typeof e.isTrusted&&void 0!==e.isTrusted||"boolean"!=typeof e.supportThemeIcons&&void 0!==e.supportThemeIcons)}function l(e){return e?e.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1"):e}function c(e){const t=[],i=e.split("|").map((e=>e.trim()));e=i[0];const n=i[1];if(n){const e=/height=(\d+)/.exec(n),i=/width=(\d+)/.exec(n),r=e?e[1]:"",o=i?i[1]:"",s=isFinite(parseInt(o)),a=isFinite(parseInt(r));s&&t.push(`width="${o}"`),a&&t.push(`height="${r}"`)}return{href:e,dimensions:t}}},1212:(e,t,i)=>{"use strict";i.d(t,{Gt:()=>m,Ho:()=>p,Qo:()=>h,f$:()=>u,x$:()=>f});var n=i(3046),r=i(5392),o=i(5924);const s="$(",a=new RegExp(`\\$\\(${n.dT.iconNameExpression}(?:${n.dT.iconModifierExpression})?\\)`,"g"),l=new RegExp(n.dT.iconNameCharacter),c=new RegExp(`(\\\\)?${a.source}`,"g");function h(e){return e.replace(c,((e,t)=>t?e:`\\${e}`))}const d=new RegExp(`\\\\${a.source}`,"g");function u(e){return e.replace(d,(e=>`\\${e}`))}const g=new RegExp(`(\\s)?(\\\\)?${a.source}(\\s)?`,"g");function f(e){return-1===e.indexOf(s)?e:e.replace(g,((e,t,i,n)=>i?e:t||n||""))}function p(e){const t=e.indexOf(s);return-1===t?{text:e}:function(e,t){const i=[];let n="";function r(e){if(e){n+=e;for(const t of e)i.push(d)}}let o,a,c=-1,h="",d=0,u=t;const g=e.length;for(r(e.substr(0,t));u{"use strict";i.d(t,{R:()=>n,a:()=>r});class n{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const r=new n("id#")},3725:(e,t,i)=>{"use strict";var n;i.d(t,{$:()=>n}),function(e){e.is=function(e){return e&&"object"==typeof e&&"function"==typeof e[Symbol.iterator]};const t=Object.freeze([]);e.empty=function(){return t},e.single=function*(e){yield e},e.from=function(e){return e||t},e.isEmpty=function(e){return!e||!0===e[Symbol.iterator]().next().done},e.first=function(e){return e[Symbol.iterator]().next().value},e.some=function(e,t){for(const i of e)if(t(i))return!0;return!1},e.find=function(e,t){for(const i of e)if(t(i))return i},e.filter=function*(e,t){for(const i of e)t(i)&&(yield i)},e.map=function*(e,t){let i=0;for(const n of e)yield t(n,i++)},e.concat=function*(...e){for(const t of e)for(const e of t)yield e},e.concatNested=function*(e){for(const t of e)for(const e of t)yield e},e.reduce=function(e,t,i){let n=i;for(const i of e)n=t(n,i);return n},e.slice=function*(e,t,i=e.length){for(t<0&&(t+=e.length),i<0?i+=e.length:i>e.length&&(i=e.length);tr}]},e.equals=function(e,t,i=((e,t)=>e===t)){const n=e[Symbol.iterator](),r=t[Symbol.iterator]();for(;;){const e=n.next(),t=r.next();if(e.done!==t.done)return!1;if(e.done)return!0;if(!i(e.value,t.value))return!1}}}(n||(n={}))},2258:(e,t,i)=>{"use strict";i.d(t,{H_:()=>a,Vd:()=>u,gx:()=>p,kL:()=>f});class n{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,t){this._keyCodeToStr[e]=t,this._strToKeyCode[t.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const r=new n,o=new n,s=new n,a=new Array(230),l={},c=[],h=Object.create(null),d=Object.create(null),u=[],g=[];for(let e=0;e<=193;e++)u[e]=-1;for(let e=0;e<=127;e++)g[e]=-1;var f;function p(e,t){return(e|(65535&t)<<16>>>0)>>>0}!function(){const e="",t=[[0,1,0,"None",0,"unknown",0,"VK_UNKNOWN",e,e],[0,1,1,"Hyper",0,e,0,e,e,e],[0,1,2,"Super",0,e,0,e,e,e],[0,1,3,"Fn",0,e,0,e,e,e],[0,1,4,"FnLock",0,e,0,e,e,e],[0,1,5,"Suspend",0,e,0,e,e,e],[0,1,6,"Resume",0,e,0,e,e,e],[0,1,7,"Turbo",0,e,0,e,e,e],[0,1,8,"Sleep",0,e,0,"VK_SLEEP",e,e],[0,1,9,"WakeUp",0,e,0,e,e,e],[31,0,10,"KeyA",31,"A",65,"VK_A",e,e],[32,0,11,"KeyB",32,"B",66,"VK_B",e,e],[33,0,12,"KeyC",33,"C",67,"VK_C",e,e],[34,0,13,"KeyD",34,"D",68,"VK_D",e,e],[35,0,14,"KeyE",35,"E",69,"VK_E",e,e],[36,0,15,"KeyF",36,"F",70,"VK_F",e,e],[37,0,16,"KeyG",37,"G",71,"VK_G",e,e],[38,0,17,"KeyH",38,"H",72,"VK_H",e,e],[39,0,18,"KeyI",39,"I",73,"VK_I",e,e],[40,0,19,"KeyJ",40,"J",74,"VK_J",e,e],[41,0,20,"KeyK",41,"K",75,"VK_K",e,e],[42,0,21,"KeyL",42,"L",76,"VK_L",e,e],[43,0,22,"KeyM",43,"M",77,"VK_M",e,e],[44,0,23,"KeyN",44,"N",78,"VK_N",e,e],[45,0,24,"KeyO",45,"O",79,"VK_O",e,e],[46,0,25,"KeyP",46,"P",80,"VK_P",e,e],[47,0,26,"KeyQ",47,"Q",81,"VK_Q",e,e],[48,0,27,"KeyR",48,"R",82,"VK_R",e,e],[49,0,28,"KeyS",49,"S",83,"VK_S",e,e],[50,0,29,"KeyT",50,"T",84,"VK_T",e,e],[51,0,30,"KeyU",51,"U",85,"VK_U",e,e],[52,0,31,"KeyV",52,"V",86,"VK_V",e,e],[53,0,32,"KeyW",53,"W",87,"VK_W",e,e],[54,0,33,"KeyX",54,"X",88,"VK_X",e,e],[55,0,34,"KeyY",55,"Y",89,"VK_Y",e,e],[56,0,35,"KeyZ",56,"Z",90,"VK_Z",e,e],[22,0,36,"Digit1",22,"1",49,"VK_1",e,e],[23,0,37,"Digit2",23,"2",50,"VK_2",e,e],[24,0,38,"Digit3",24,"3",51,"VK_3",e,e],[25,0,39,"Digit4",25,"4",52,"VK_4",e,e],[26,0,40,"Digit5",26,"5",53,"VK_5",e,e],[27,0,41,"Digit6",27,"6",54,"VK_6",e,e],[28,0,42,"Digit7",28,"7",55,"VK_7",e,e],[29,0,43,"Digit8",29,"8",56,"VK_8",e,e],[30,0,44,"Digit9",30,"9",57,"VK_9",e,e],[21,0,45,"Digit0",21,"0",48,"VK_0",e,e],[3,1,46,"Enter",3,"Enter",13,"VK_RETURN",e,e],[9,1,47,"Escape",9,"Escape",27,"VK_ESCAPE",e,e],[1,1,48,"Backspace",1,"Backspace",8,"VK_BACK",e,e],[2,1,49,"Tab",2,"Tab",9,"VK_TAB",e,e],[10,1,50,"Space",10,"Space",32,"VK_SPACE",e,e],[83,0,51,"Minus",83,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[81,0,52,"Equal",81,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[87,0,53,"BracketLeft",87,"[",219,"VK_OEM_4","[","OEM_4"],[89,0,54,"BracketRight",89,"]",221,"VK_OEM_6","]","OEM_6"],[88,0,55,"Backslash",88,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,0,56,"IntlHash",0,e,0,e,e,e],[80,0,57,"Semicolon",80,";",186,"VK_OEM_1",";","OEM_1"],[90,0,58,"Quote",90,"'",222,"VK_OEM_7","'","OEM_7"],[86,0,59,"Backquote",86,"`",192,"VK_OEM_3","`","OEM_3"],[82,0,60,"Comma",82,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[84,0,61,"Period",84,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[85,0,62,"Slash",85,"/",191,"VK_OEM_2","/","OEM_2"],[8,1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL",e,e],[59,1,64,"F1",59,"F1",112,"VK_F1",e,e],[60,1,65,"F2",60,"F2",113,"VK_F2",e,e],[61,1,66,"F3",61,"F3",114,"VK_F3",e,e],[62,1,67,"F4",62,"F4",115,"VK_F4",e,e],[63,1,68,"F5",63,"F5",116,"VK_F5",e,e],[64,1,69,"F6",64,"F6",117,"VK_F6",e,e],[65,1,70,"F7",65,"F7",118,"VK_F7",e,e],[66,1,71,"F8",66,"F8",119,"VK_F8",e,e],[67,1,72,"F9",67,"F9",120,"VK_F9",e,e],[68,1,73,"F10",68,"F10",121,"VK_F10",e,e],[69,1,74,"F11",69,"F11",122,"VK_F11",e,e],[70,1,75,"F12",70,"F12",123,"VK_F12",e,e],[0,1,76,"PrintScreen",0,e,0,e,e,e],[79,1,77,"ScrollLock",79,"ScrollLock",145,"VK_SCROLL",e,e],[7,1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE",e,e],[19,1,79,"Insert",19,"Insert",45,"VK_INSERT",e,e],[14,1,80,"Home",14,"Home",36,"VK_HOME",e,e],[11,1,81,"PageUp",11,"PageUp",33,"VK_PRIOR",e,e],[20,1,82,"Delete",20,"Delete",46,"VK_DELETE",e,e],[13,1,83,"End",13,"End",35,"VK_END",e,e],[12,1,84,"PageDown",12,"PageDown",34,"VK_NEXT",e,e],[17,1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",e],[15,1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",e],[18,1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",e],[16,1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",e],[78,1,89,"NumLock",78,"NumLock",144,"VK_NUMLOCK",e,e],[108,1,90,"NumpadDivide",108,"NumPad_Divide",111,"VK_DIVIDE",e,e],[103,1,91,"NumpadMultiply",103,"NumPad_Multiply",106,"VK_MULTIPLY",e,e],[106,1,92,"NumpadSubtract",106,"NumPad_Subtract",109,"VK_SUBTRACT",e,e],[104,1,93,"NumpadAdd",104,"NumPad_Add",107,"VK_ADD",e,e],[3,1,94,"NumpadEnter",3,e,0,e,e,e],[94,1,95,"Numpad1",94,"NumPad1",97,"VK_NUMPAD1",e,e],[95,1,96,"Numpad2",95,"NumPad2",98,"VK_NUMPAD2",e,e],[96,1,97,"Numpad3",96,"NumPad3",99,"VK_NUMPAD3",e,e],[97,1,98,"Numpad4",97,"NumPad4",100,"VK_NUMPAD4",e,e],[98,1,99,"Numpad5",98,"NumPad5",101,"VK_NUMPAD5",e,e],[99,1,100,"Numpad6",99,"NumPad6",102,"VK_NUMPAD6",e,e],[100,1,101,"Numpad7",100,"NumPad7",103,"VK_NUMPAD7",e,e],[101,1,102,"Numpad8",101,"NumPad8",104,"VK_NUMPAD8",e,e],[102,1,103,"Numpad9",102,"NumPad9",105,"VK_NUMPAD9",e,e],[93,1,104,"Numpad0",93,"NumPad0",96,"VK_NUMPAD0",e,e],[107,1,105,"NumpadDecimal",107,"NumPad_Decimal",110,"VK_DECIMAL",e,e],[92,0,106,"IntlBackslash",92,"OEM_102",226,"VK_OEM_102",e,e],[58,1,107,"ContextMenu",58,"ContextMenu",93,e,e,e],[0,1,108,"Power",0,e,0,e,e,e],[0,1,109,"NumpadEqual",0,e,0,e,e,e],[71,1,110,"F13",71,"F13",124,"VK_F13",e,e],[72,1,111,"F14",72,"F14",125,"VK_F14",e,e],[73,1,112,"F15",73,"F15",126,"VK_F15",e,e],[74,1,113,"F16",74,"F16",127,"VK_F16",e,e],[75,1,114,"F17",75,"F17",128,"VK_F17",e,e],[76,1,115,"F18",76,"F18",129,"VK_F18",e,e],[77,1,116,"F19",77,"F19",130,"VK_F19",e,e],[0,1,117,"F20",0,e,0,"VK_F20",e,e],[0,1,118,"F21",0,e,0,"VK_F21",e,e],[0,1,119,"F22",0,e,0,"VK_F22",e,e],[0,1,120,"F23",0,e,0,"VK_F23",e,e],[0,1,121,"F24",0,e,0,"VK_F24",e,e],[0,1,122,"Open",0,e,0,e,e,e],[0,1,123,"Help",0,e,0,e,e,e],[0,1,124,"Select",0,e,0,e,e,e],[0,1,125,"Again",0,e,0,e,e,e],[0,1,126,"Undo",0,e,0,e,e,e],[0,1,127,"Cut",0,e,0,e,e,e],[0,1,128,"Copy",0,e,0,e,e,e],[0,1,129,"Paste",0,e,0,e,e,e],[0,1,130,"Find",0,e,0,e,e,e],[0,1,131,"AudioVolumeMute",112,"AudioVolumeMute",173,"VK_VOLUME_MUTE",e,e],[0,1,132,"AudioVolumeUp",113,"AudioVolumeUp",175,"VK_VOLUME_UP",e,e],[0,1,133,"AudioVolumeDown",114,"AudioVolumeDown",174,"VK_VOLUME_DOWN",e,e],[105,1,134,"NumpadComma",105,"NumPad_Separator",108,"VK_SEPARATOR",e,e],[110,0,135,"IntlRo",110,"ABNT_C1",193,"VK_ABNT_C1",e,e],[0,1,136,"KanaMode",0,e,0,e,e,e],[0,0,137,"IntlYen",0,e,0,e,e,e],[0,1,138,"Convert",0,e,0,e,e,e],[0,1,139,"NonConvert",0,e,0,e,e,e],[0,1,140,"Lang1",0,e,0,e,e,e],[0,1,141,"Lang2",0,e,0,e,e,e],[0,1,142,"Lang3",0,e,0,e,e,e],[0,1,143,"Lang4",0,e,0,e,e,e],[0,1,144,"Lang5",0,e,0,e,e,e],[0,1,145,"Abort",0,e,0,e,e,e],[0,1,146,"Props",0,e,0,e,e,e],[0,1,147,"NumpadParenLeft",0,e,0,e,e,e],[0,1,148,"NumpadParenRight",0,e,0,e,e,e],[0,1,149,"NumpadBackspace",0,e,0,e,e,e],[0,1,150,"NumpadMemoryStore",0,e,0,e,e,e],[0,1,151,"NumpadMemoryRecall",0,e,0,e,e,e],[0,1,152,"NumpadMemoryClear",0,e,0,e,e,e],[0,1,153,"NumpadMemoryAdd",0,e,0,e,e,e],[0,1,154,"NumpadMemorySubtract",0,e,0,e,e,e],[0,1,155,"NumpadClear",126,"Clear",12,"VK_CLEAR",e,e],[0,1,156,"NumpadClearEntry",0,e,0,e,e,e],[5,1,0,e,5,"Ctrl",17,"VK_CONTROL",e,e],[4,1,0,e,4,"Shift",16,"VK_SHIFT",e,e],[6,1,0,e,6,"Alt",18,"VK_MENU",e,e],[57,1,0,e,57,"Meta",0,"VK_COMMAND",e,e],[5,1,157,"ControlLeft",5,e,0,"VK_LCONTROL",e,e],[4,1,158,"ShiftLeft",4,e,0,"VK_LSHIFT",e,e],[6,1,159,"AltLeft",6,e,0,"VK_LMENU",e,e],[57,1,160,"MetaLeft",57,e,0,"VK_LWIN",e,e],[5,1,161,"ControlRight",5,e,0,"VK_RCONTROL",e,e],[4,1,162,"ShiftRight",4,e,0,"VK_RSHIFT",e,e],[6,1,163,"AltRight",6,e,0,"VK_RMENU",e,e],[57,1,164,"MetaRight",57,e,0,"VK_RWIN",e,e],[0,1,165,"BrightnessUp",0,e,0,e,e,e],[0,1,166,"BrightnessDown",0,e,0,e,e,e],[0,1,167,"MediaPlay",0,e,0,e,e,e],[0,1,168,"MediaRecord",0,e,0,e,e,e],[0,1,169,"MediaFastForward",0,e,0,e,e,e],[0,1,170,"MediaRewind",0,e,0,e,e,e],[114,1,171,"MediaTrackNext",119,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK",e,e],[115,1,172,"MediaTrackPrevious",120,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK",e,e],[116,1,173,"MediaStop",121,"MediaStop",178,"VK_MEDIA_STOP",e,e],[0,1,174,"Eject",0,e,0,e,e,e],[117,1,175,"MediaPlayPause",122,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE",e,e],[0,1,176,"MediaSelect",123,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT",e,e],[0,1,177,"LaunchMail",124,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL",e,e],[0,1,178,"LaunchApp2",125,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2",e,e],[0,1,179,"LaunchApp1",0,e,0,"VK_MEDIA_LAUNCH_APP1",e,e],[0,1,180,"SelectTask",0,e,0,e,e,e],[0,1,181,"LaunchScreenSaver",0,e,0,e,e,e],[0,1,182,"BrowserSearch",115,"BrowserSearch",170,"VK_BROWSER_SEARCH",e,e],[0,1,183,"BrowserHome",116,"BrowserHome",172,"VK_BROWSER_HOME",e,e],[112,1,184,"BrowserBack",117,"BrowserBack",166,"VK_BROWSER_BACK",e,e],[113,1,185,"BrowserForward",118,"BrowserForward",167,"VK_BROWSER_FORWARD",e,e],[0,1,186,"BrowserStop",0,e,0,"VK_BROWSER_STOP",e,e],[0,1,187,"BrowserRefresh",0,e,0,"VK_BROWSER_REFRESH",e,e],[0,1,188,"BrowserFavorites",0,e,0,"VK_BROWSER_FAVORITES",e,e],[0,1,189,"ZoomToggle",0,e,0,e,e,e],[0,1,190,"MailReply",0,e,0,e,e,e],[0,1,191,"MailForward",0,e,0,e,e,e],[0,1,192,"MailSend",0,e,0,e,e,e],[109,1,0,e,109,"KeyInComposition",229,e,e,e],[111,1,0,e,111,"ABNT_C2",194,"VK_ABNT_C2",e,e],[91,1,0,e,91,"OEM_8",223,"VK_OEM_8",e,e],[0,1,0,e,0,e,0,"VK_KANA",e,e],[0,1,0,e,0,e,0,"VK_HANGUL",e,e],[0,1,0,e,0,e,0,"VK_JUNJA",e,e],[0,1,0,e,0,e,0,"VK_FINAL",e,e],[0,1,0,e,0,e,0,"VK_HANJA",e,e],[0,1,0,e,0,e,0,"VK_KANJI",e,e],[0,1,0,e,0,e,0,"VK_CONVERT",e,e],[0,1,0,e,0,e,0,"VK_NONCONVERT",e,e],[0,1,0,e,0,e,0,"VK_ACCEPT",e,e],[0,1,0,e,0,e,0,"VK_MODECHANGE",e,e],[0,1,0,e,0,e,0,"VK_SELECT",e,e],[0,1,0,e,0,e,0,"VK_PRINT",e,e],[0,1,0,e,0,e,0,"VK_EXECUTE",e,e],[0,1,0,e,0,e,0,"VK_SNAPSHOT",e,e],[0,1,0,e,0,e,0,"VK_HELP",e,e],[0,1,0,e,0,e,0,"VK_APPS",e,e],[0,1,0,e,0,e,0,"VK_PROCESSKEY",e,e],[0,1,0,e,0,e,0,"VK_PACKET",e,e],[0,1,0,e,0,e,0,"VK_DBE_SBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_DBE_DBCSCHAR",e,e],[0,1,0,e,0,e,0,"VK_ATTN",e,e],[0,1,0,e,0,e,0,"VK_CRSEL",e,e],[0,1,0,e,0,e,0,"VK_EXSEL",e,e],[0,1,0,e,0,e,0,"VK_EREOF",e,e],[0,1,0,e,0,e,0,"VK_PLAY",e,e],[0,1,0,e,0,e,0,"VK_ZOOM",e,e],[0,1,0,e,0,e,0,"VK_NONAME",e,e],[0,1,0,e,0,e,0,"VK_PA1",e,e],[0,1,0,e,0,e,0,"VK_OEM_CLEAR",e,e]];let i=[],n=[];for(const e of t){const[t,f,p,m,_,v,b,y,w,C]=e;if(n[p]||(n[p]=!0,c[p]=m,h[m]=p,d[m.toLowerCase()]=p,f&&(u[p]=_,0!==_&&3!==_&&5!==_&&4!==_&&6!==_&&57!==_&&(g[_]=p))),!i[_]){if(i[_]=!0,!v)throw new Error(`String representation missing for key code ${_} around scan code ${m}`);r.define(_,v),o.define(_,w||v),s.define(_,C||w||v)}b&&(a[b]=_),y&&(l[y]=_)}g[3]=46}(),function(e){e.toString=function(e){return r.keyCodeToStr(e)},e.fromString=function(e){return r.strToKeyCode(e)},e.toUserSettingsUS=function(e){return o.keyCodeToStr(e)},e.toUserSettingsGeneral=function(e){return s.keyCodeToStr(e)},e.fromUserSettings=function(e){return o.strToKeyCode(e)||s.strToKeyCode(e)},e.toElectronAccelerator=function(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return r.keyCodeToStr(e)}}(f||(f={}))},8030:(e,t,i)=>{"use strict";i.d(t,{X4:()=>s,jC:()=>a,xo:()=>o});var n=i(3580);class r{constructor(e,t,i=t){this.modifierLabels=[null],this.modifierLabels[2]=e,this.modifierLabels[1]=t,this.modifierLabels[3]=i}toLabel(e,t,i){if(0===t.length)return null;const n=[];for(let r=0,o=t.length;r{"use strict";i.d(t,{BQ:()=>l,QC:()=>s,X_:()=>a,f1:()=>c,gm:()=>r});var n=i(7301);function r(e,t){if(0===e)return null;const i=(65535&e)>>>0,n=(4294901760&e)>>>16;return new a(0!==n?[o(i,t),o(n,t)]:[o(i,t)])}function o(e,t){const i=!!(2048&e),n=!!(256&e);return new s(2===t?n:i,!!(1024&e),!!(512&e),2===t?i:n,255&e)}class s{constructor(e,t,i,n,r){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=r}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return 0===this.keyCode||5===this.keyCode||57===this.keyCode||6===this.keyCode||4===this.keyCode}toChord(){return new a([this])}isDuplicateModifierCase(){return this.ctrlKey&&5===this.keyCode||this.shiftKey&&4===this.keyCode||this.altKey&&6===this.keyCode||this.metaKey&&57===this.keyCode}}class a{constructor(e){if(0===e.length)throw(0,n.b1)("parts");this.parts=e}}class l{constructor(e,t,i,n,r,o){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyLabel=r,this.keyAriaLabel=o}}class c{}},8843:(e,t,i)=>{"use strict";i.d(t,{D:()=>c,p:()=>l});var n=i(5527),r=i(6663),o=i(1432),s=i(5935),a=i(666);function l(e){if(!e)return;"string"==typeof e&&(e=a.o.file(e));const t=(0,s.EZ)(e)||(e.scheme===r.lg.file?e.fsPath:e.path);return o.ED&&(0,n.vY)(t)?c(t):t}function c(e,t){return(0,n.oP)(e,t)?e.charAt(0).toUpperCase()+e.slice(1):e}Object.create(null)},9579:(e,t,i)=>{"use strict";i.d(t,{o:()=>n});class n{constructor(e){this.executor=e,this._didRun=!1}getValue(){if(!this._didRun)try{this._value=this.executor()}catch(e){this._error=e}finally{this._didRun=!0}if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}},5976:(e,t,i)=>{"use strict";i.d(t,{B9:()=>l,F8:()=>c,JT:()=>u,Jz:()=>p,OF:()=>h,SL:()=>d,Wf:()=>a,XK:()=>g,dk:()=>o,dt:()=>f});var n=i(8289),r=i(3725);function o(e){return e}class s extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`),this.errors=e}}function a(e){return"function"==typeof e.dispose&&0===e.dispose.length}function l(e){if(r.$.is(e)){let t=[];for(const i of e)if(i)try{i.dispose()}catch(e){t.push(e)}if(1===t.length)throw t[0];if(t.length>1)throw new s(t);return Array.isArray(e)?[]:e}if(e)return e.dispose(),e}function c(...e){const t=h((()=>l(e)));return t}function h(e){const t={dispose:(0,n.I)((()=>{e()}))};return t}class d{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){try{l(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?d.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}}d.DISABLE_DISPOSED_WARNING=!1;class u{constructor(){this._store=new d,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}u.None=Object.freeze({dispose(){}});class g{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||(null===(t=this._value)||void 0===t||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,null===(e=this._value)||void 0===e||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class f{constructor(){this.dispose=()=>{},this.unset=()=>{},this.isset=()=>!1}set(e){let t=e;return this.unset=()=>t=void 0,this.isset=()=>void 0!==t,this.dispose=()=>{t&&(t(),t=void 0)},this}}class p{constructor(e){this.object=e}dispose(){}}},1741:(e,t,i)=>{"use strict";i.d(t,{S:()=>r});class n{constructor(e){this.element=e,this.next=n.Undefined,this.prev=n.Undefined}}n.Undefined=new n(void 0);class r{constructor(){this._first=n.Undefined,this._last=n.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===n.Undefined}clear(){let e=this._first;for(;e!==n.Undefined;){const t=e.next;e.prev=n.Undefined,e.next=n.Undefined,e=t}this._first=n.Undefined,this._last=n.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new n(e);if(this._first===n.Undefined)this._first=i,this._last=i;else if(t){const e=this._last;this._last=i,i.prev=e,e.next=i}else{const e=this._first;this._first=i,i.next=e,e.prev=i}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(i))}}shift(){if(this._first!==n.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==n.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==n.Undefined&&e.next!==n.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===n.Undefined&&e.next===n.Undefined?(this._first=n.Undefined,this._last=n.Undefined):e.next===n.Undefined?(this._last=this._last.prev,this._last.next=n.Undefined):e.prev===n.Undefined&&(this._first=this._first.next,this._first.prev=n.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==n.Undefined;)yield e.element,e=e.next}}},3702:(e,t,i)=>{"use strict";i.d(t,{Id:()=>d,Y9:()=>g,z6:()=>p});var n,r,o=i(5924);class s{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos=0;t--,this._valueLen--){const e=this._value.charCodeAt(t);if(!(47===e||this._splitOnBackslash&&92===e))break}return this.next()}hasNext(){return this._to!1)){return new d(new c(e))}static forStrings(){return new d(new s)}static forConfigKeys(){return new d(new a)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;this._root||(this._root=new h,this._root.segment=i.value());const r=[];for(n=this._root;;){const e=i.cmp(n.segment);if(e>0)n.left||(n.left=new h,n.left.segment=i.value()),r.push([-1,n]),n=n.left;else if(e<0)n.right||(n.right=new h,n.right.segment=i.value()),r.push([1,n]),n=n.right;else{if(!i.hasNext())break;i.next(),n.mid||(n.mid=new h,n.mid.segment=i.value()),r.push([0,n]),n=n.mid}}const o=n.value;n.value=t,n.key=e;for(let e=r.length-1;e>=0;e--){const t=r[e][1];t.updateHeight();const i=t.balanceFactor();if(i<-1||i>1){const i=r[e][0],n=r[e+1][0];if(1===i&&1===n)r[e][1]=t.rotateLeft();else if(-1===i&&-1===n)r[e][1]=t.rotateRight();else if(1===i&&-1===n)t.right=r[e+1][1]=r[e+1][1].rotateRight(),r[e][1]=t.rotateLeft();else{if(-1!==i||1!==n)throw new Error;t.left=r[e+1][1]=r[e+1][1].rotateLeft(),r[e][1]=t.rotateRight()}if(e>0)switch(r[e-1][0]){case-1:r[e-1][1].left=r[e][1];break;case 1:r[e-1][1].right=r[e][1];break;case 0:r[e-1][1].mid=r[e][1]}else this._root=r[0][1]}}return o}get(e){var t;return null===(t=this._getNode(e))||void 0===t?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())break;t.next(),i=i.mid}}return i}has(e){const t=this._getNode(e);return!(void 0===(null==t?void 0:t.value)&&void 0===(null==t?void 0:t.mid))}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){var i;const n=this._iter.reset(e),r=[];let o=this._root;for(;o;){const e=n.cmp(o.segment);if(e>0)r.push([-1,o]),o=o.left;else if(e<0)r.push([1,o]),o=o.right;else{if(!n.hasNext())break;n.next(),r.push([0,o]),o=o.mid}}if(o){if(t?(o.left=void 0,o.mid=void 0,o.right=void 0,o.height=1):(o.key=void 0,o.value=void 0),!o.mid&&!o.value)if(o.left&&o.right){const e=this._min(o.right),{key:t,value:i,segment:n}=e;this._delete(e.key,!1),o.key=t,o.value=i,o.segment=n}else{const e=null!==(i=o.left)&&void 0!==i?i:o.right;if(r.length>0){const[t,i]=r[r.length-1];switch(t){case-1:i.left=e;break;case 0:i.mid=e;break;case 1:i.right=e}}else this._root=e}for(let e=r.length-1;e>=0;e--){const t=r[e][1];t.updateHeight();const i=t.balanceFactor();if(i>1?(t.right.balanceFactor()>=0||(t.right=t.right.rotateRight()),r[e][1]=t.rotateLeft()):i<-1&&(t.left.balanceFactor()<=0||(t.left=t.left.rotateLeft()),r[e][1]=t.rotateRight()),e>0)switch(r[e-1][0]){case-1:r[e-1][1].left=r[e][1];break;case 1:r[e-1][1].right=r[e][1];break;case 0:r[e-1][1].mid=r[e][1]}else this._root=r[0][1]}}}_min(e){for(;e.left;)e=e.left;return e}findSubstr(e){const t=this._iter.reset(e);let i,n=this._root;for(;n;){const e=t.cmp(n.segment);if(e>0)n=n.left;else if(e<0)n=n.right;else{if(!t.hasNext())break;t.next(),i=n.value||i,n=n.mid}}return n&&n.value||i}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const e=t.cmp(i.segment);if(e>0)i=i.left;else if(e<0)i=i.right;else{if(!t.hasNext())return i.mid?this._entries(i.mid):void 0;t.next(),i=i.mid}}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(e.left&&(yield*this._entries(e.left)),e.value&&(yield[e.key,e.value]),e.mid&&(yield*this._entries(e.mid)),e.right&&(yield*this._entries(e.right)))}}class u{constructor(e,t){this.uri=e,this.value=t}}class g{constructor(e,t){this[n]="ResourceMap",e instanceof g?(this.map=new Map(e.map),this.toKey=null!=t?t:g.defaultToKey):(this.map=new Map,this.toKey=null!=e?e:g.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),new u(e,t)),this}get(e){var t;return null===(t=this.map.get(this.toKey(e)))||void 0===t?void 0:t.value}has(e){return this.map.has(this.toKey(e))}get size(){return this.map.size}clear(){this.map.clear()}delete(e){return this.map.delete(this.toKey(e))}forEach(e,t){void 0!==t&&(e=e.bind(t));for(let[t,i]of this.map)e(i.value,i.uri,this)}*values(){for(let e of this.map.values())yield e.value}*keys(){for(let e of this.map.values())yield e.uri}*entries(){for(let e of this.map.values())yield[e.uri,e.value]}*[(n=Symbol.toStringTag,Symbol.iterator)](){for(let[,e]of this.map)yield[e.uri,e.value]}}g.defaultToKey=e=>e.toString();class f{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){var e;return null===(e=this._head)||void 0===e?void 0:e.value}get last(){var e;return null===(e=this._tail)||void 0===e?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(i)return 0!==t&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,0!==i&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:case 2:default:this.addItemLast(n);break;case 1:this.addItemFirst(n)}this._map.set(e,n),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}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){const i=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==i)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.key,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:i.value,done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator]:()=>n,next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const e={value:[i.key,i.value],done:!1};return i=i.next,e}return{value:void 0,done:!0}}};return n}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,i=this.size;for(;t&&i>e;)this._map.delete(t.key),t=t.next,i--;this._head=t,this._size=i,t&&(t.previous=void 0),this._state++}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,this._state++}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,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,i=e.previous;if(!t||!i)throw new Error("Invalid list");t.previous=i,i.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(1===t||2===t)if(1===t){if(e===this._head)return;const t=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(t.previous=i,i.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(2===t){if(e===this._tail)return;const t=e.next,i=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=i,i.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach(((t,i)=>{e.push([i,t])})),e}fromJSON(e){this.clear();for(const[t,i]of e)this.set(t,i)}}class p extends f{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,t=2){return super.get(e,t)}peek(e){return super.get(e,0)}set(e,t){return super.set(e,t,2),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},3897:(e,t,i)=>{"use strict";i.d(t,{Q:()=>o});var n=i(3060),r=i(666);function o(e){let t=JSON.parse(e);return t=s(t),t}function s(e,t=0){if(!e||t>200)return e;if("object"==typeof e){switch(e.$mid){case 1:return r.o.revive(e);case 2:return new RegExp(e.source,e.flags);case 14:return new Date(e.source)}if(e instanceof n.KN||e instanceof Uint8Array)return e;if(Array.isArray(e))for(let i=0;i{"use strict";var n;i.d(t,{v:()=>n}),function(e){e.text="text/plain",e.binary="application/octet-stream",e.unknown="application/unknown",e.markdown="text/markdown",e.latex="text/latex",e.uriList="text/uri-list"}(n||(n={}))},6663:(e,t,i)=>{"use strict";i.d(t,{Gi:()=>l,WX:()=>s,lg:()=>n});var n,r=i(1432),o=i(666);!function(e){e.inMemory="inmemory",e.vscode="vscode",e.internal="private",e.walkThrough="walkThrough",e.walkThroughSnippet="walkThroughSnippet",e.http="http",e.https="https",e.file="file",e.mailto="mailto",e.untitled="untitled",e.data="data",e.command="command",e.vscodeRemote="vscode-remote",e.vscodeRemoteResource="vscode-remote-resource",e.userData="vscode-userdata",e.vscodeCustomEditor="vscode-custom-editor",e.vscodeNotebook="vscode-notebook",e.vscodeNotebookCell="vscode-notebook-cell",e.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",e.vscodeNotebookCellOutput="vscode-notebook-cell-output",e.vscodeInteractive="vscode-interactive",e.vscodeInteractiveInput="vscode-interactive-input",e.vscodeSettings="vscode-settings",e.vscodeWorkspaceTrust="vscode-workspace-trust",e.vscodeTerminal="vscode-terminal",e.webviewPanel="webview-panel",e.vscodeWebview="vscode-webview",e.extension="extension",e.vscodeFileResource="vscode-file",e.tmp="tmp",e.vsls="vsls"}(n||(n={}));const s=new class{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&-1!==i.indexOf(":")&&(i=`[${i}]`);const s=this._ports[t],a=this._connectionTokens[t];let l=`path=${encodeURIComponent(e.path)}`;return"string"==typeof a&&(l+=`&tkn=${encodeURIComponent(a)}`),o.o.from({scheme:r.$L?this._preferredWebSchema:n.vscodeRemoteResource,authority:`${i}:${s}`,path:"/vscode-remote-resource",query:l})}};class a{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===n.vscodeRemote?s.rewrite(i):i.scheme===n.file&&(r.tY||r.n2&&r.li.origin===`${n.vscodeFileResource}://${a.FALLBACK_AUTHORITY}`)?i.with({scheme:n.vscodeFileResource,authority:i.authority||a.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return o.o.isUri(e)?e:o.o.parse(t.toUrl(e))}}a.FALLBACK_AUTHORITY="vscode-app";const l=new a},9870:(e,t,i)=>{"use strict";function n(e,t,i){return Math.min(Math.max(e,t),i)}i.d(t,{N:()=>o,nM:()=>r,uZ:()=>n});class r{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this._val}get value(){return this._val}}class o{constructor(e){this._n=0,this._val=0,this._values=[],this._index=0,this._sum=0,this._values=new Array(e),this._values.fill(0,0,e)}update(e){const t=this._values[this._index];return this._values[this._index]=e,this._index=(this._index+1)%this._values.length,this._sum-=t,this._sum+=e,this._n{"use strict";i.d(t,{CJ:()=>d,I8:()=>r,_A:()=>o,fS:()=>h,jB:()=>c,rs:()=>a});var n=i(8401);function r(e){if(!e||"object"!=typeof e)return e;if(e instanceof RegExp)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((i=>{e[i]&&"object"==typeof e[i]?t[i]=r(e[i]):t[i]=e[i]})),t}function o(e){if(!e||"object"!=typeof e)return e;const t=[e];for(;t.length>0;){const e=t.shift();Object.freeze(e);for(const i in e)if(s.call(e,i)){const n=e[i];"object"!=typeof n||Object.isFrozen(n)||t.push(n)}}return e}const s=Object.prototype.hasOwnProperty;function a(e,t){return l(e,t,new Set)}function l(e,t,i){if((0,n.Jp)(e))return e;const r=t(e);if(void 0!==r)return r;if((0,n.kJ)(e)){const n=[];for(const r of e)n.push(l(r,t,i));return n}if((0,n.Kn)(e)){if(i.has(e))throw new Error("Cannot clone recursive data-structure");i.add(e);const n={};for(let r in e)s.call(e,r)&&(n[r]=l(e[r],t,i));return i.delete(e),n}return e}function c(e,t,i=!0){return(0,n.Kn)(e)?((0,n.Kn)(t)&&Object.keys(t).forEach((r=>{r in e?i&&((0,n.Kn)(e[r])&&(0,n.Kn)(t[r])?c(e[r],t[r],i):e[r]=t[r]):e[r]=t[r]})),e):t}function h(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;let i,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(i=0;i{"use strict";i.d(t,{EZ:()=>k,XX:()=>S,DZ:()=>L,Fv:()=>w,KR:()=>y,Gf:()=>x,DB:()=>C,ir:()=>N,Ku:()=>b});var n=i(1432);let r;if(void 0!==n.li.vscode&&void 0!==n.li.vscode.process){const e=n.li.vscode.process;r={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd:()=>e.cwd()}}else r="undefined"!=typeof process?{get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd:()=>process.env.VSCODE_CWD||process.cwd()}:{get platform(){return n.ED?"win32":n.dz?"darwin":"linux"},get arch(){},get env(){return{}},cwd:()=>"/"};const o=r.cwd,s=r.env,a=r.platform,l=46,c=47,h=92,d=58;class u extends Error{constructor(e,t,i){let n;"string"==typeof t&&0===t.indexOf("not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";const r=-1!==e.indexOf(".")?"property":"argument";let o=`The "${e}" ${r} ${n} of type ${t}`;o+=". Received type "+typeof i,super(o),this.code="ERR_INVALID_ARG_TYPE"}}function g(e,t){if("string"!=typeof e)throw new u(t,"string",e)}function f(e){return e===c||e===h}function p(e){return e===c}function m(e){return e>=65&&e<=90||e>=97&&e<=122}function _(e,t,i,n){let r="",o=0,s=-1,a=0,h=0;for(let d=0;d<=e.length;++d){if(d2){const e=r.lastIndexOf(i);-1===e?(r="",o=0):(r=r.slice(0,e),o=r.length-1-r.lastIndexOf(i)),s=d,a=0;continue}if(0!==r.length){r="",o=0,s=d,a=0;continue}}t&&(r+=r.length>0?`${i}..`:"..",o=2)}else r.length>0?r+=`${i}${e.slice(s+1,d)}`:r=e.slice(s+1,d),o=d-s-1;s=d,a=0}else h===l&&-1!==a?++a:a=-1}return r}function v(e,t){if(null===t||"object"!=typeof t)throw new u("pathObject","Object",t);const i=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return i?i===t.root?`${i}${n}`:`${i}${e}${n}`:n}const b={resolve(...e){let t="",i="",n=!1;for(let r=e.length-1;r>=-1;r--){let a;if(r>=0){if(a=e[r],g(a,"path"),0===a.length)continue}else 0===t.length?a=o():(a=s[`=${t}`]||o(),(void 0===a||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===h)&&(a=`${t}\\`));const l=a.length;let c=0,u="",p=!1;const _=a.charCodeAt(0);if(1===l)f(_)&&(c=1,p=!0);else if(f(_))if(p=!0,f(a.charCodeAt(1))){let e=2,t=e;for(;e2&&f(a.charCodeAt(2))&&(p=!0,c=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(i=`${a.slice(c)}\\${i}`,n=p,p&&t.length>0)break}return i=_(i,!n,"\\",f),n?`${t}\\${i}`:`${t}${i}`||"."},normalize(e){g(e,"path");const t=e.length;if(0===t)return".";let i,n=0,r=!1;const o=e.charCodeAt(0);if(1===t)return p(o)?"\\":e;if(f(o))if(r=!0,f(e.charCodeAt(1))){let r=2,o=r;for(;r2&&f(e.charCodeAt(2))&&(r=!0,n=3));let s=n0&&f(e.charCodeAt(t-1))&&(s+="\\"),void 0===i?r?`\\${s}`:s:r?`${i}\\${s}`:`${i}${s}`},isAbsolute(e){g(e,"path");const t=e.length;if(0===t)return!1;const i=e.charCodeAt(0);return f(i)||t>2&&m(i)&&e.charCodeAt(1)===d&&f(e.charCodeAt(2))},join(...e){if(0===e.length)return".";let t,i;for(let n=0;n0&&(void 0===t?t=i=r:t+=`\\${r}`)}if(void 0===t)return".";let n=!0,r=0;if("string"==typeof i&&f(i.charCodeAt(0))){++r;const e=i.length;e>1&&f(i.charCodeAt(1))&&(++r,e>2&&(f(i.charCodeAt(2))?++r:n=!1))}if(n){for(;r=2&&(t=`\\${t.slice(r)}`)}return b.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";const i=b.resolve(e),n=b.resolve(t);if(i===n)return"";if((e=i.toLowerCase())===(t=n.toLowerCase()))return"";let r=0;for(;rr&&e.charCodeAt(o-1)===h;)o--;const s=o-r;let a=0;for(;aa&&t.charCodeAt(l-1)===h;)l--;const c=l-a,d=sd){if(t.charCodeAt(a+f)===h)return n.slice(a+f+1);if(2===f)return n.slice(a+f)}s>d&&(e.charCodeAt(r+f)===h?u=f:2===f&&(u=3)),-1===u&&(u=0)}let p="";for(f=r+u+1;f<=o;++f)f!==o&&e.charCodeAt(f)!==h||(p+=0===p.length?"..":"\\..");return a+=u,p.length>0?`${p}${n.slice(a,l)}`:(n.charCodeAt(a)===h&&++a,n.slice(a,l))},toNamespacedPath(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=b.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===h){if(t.charCodeAt(1)===h){const e=t.charCodeAt(2);if(63!==e&&e!==l)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(m(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===h)return`\\\\?\\${t}`;return e},dirname(e){g(e,"path");const t=e.length;if(0===t)return".";let i=-1,n=0;const r=e.charCodeAt(0);if(1===t)return f(r)?e:".";if(f(r)){if(i=n=1,f(e.charCodeAt(1))){let r=2,o=r;for(;r2&&f(e.charCodeAt(2))?3:2,n=i);let o=-1,s=!0;for(let i=t-1;i>=n;--i)if(f(e.charCodeAt(i))){if(!s){o=i;break}}else s=!1;if(-1===o){if(-1===i)return".";o=i}return e.slice(0,o)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,r=-1,o=!0;if(e.length>=2&&m(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(n=2),void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=n;--i){const l=e.charCodeAt(i);if(f(l)){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(r=i):(s=-1,r=a))}return n===r?r=a:-1===r&&(r=e.length),e.slice(n,r)}for(i=e.length-1;i>=n;--i)if(f(e.charCodeAt(i))){if(!o){n=i+1;break}}else-1===r&&(o=!1,r=i+1);return-1===r?"":e.slice(n,r)},extname(e){g(e,"path");let t=0,i=-1,n=0,r=-1,o=!0,s=0;e.length>=2&&e.charCodeAt(1)===d&&m(e.charCodeAt(0))&&(t=n=2);for(let a=e.length-1;a>=t;--a){const t=e.charCodeAt(a);if(f(t)){if(!o){n=a+1;break}}else-1===r&&(o=!1,r=a+1),t===l?-1===i?i=a:1!==s&&(s=1):-1!==i&&(s=-1)}return-1===i||-1===r||0===s||1===s&&i===r-1&&i===n+1?"":e.slice(i,r)},format:v.bind(null,"\\"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.length;let n=0,r=e.charCodeAt(0);if(1===i)return f(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(f(r)){if(n=1,f(e.charCodeAt(1))){let t=2,r=t;for(;t0&&(t.root=e.slice(0,n));let o=-1,s=n,a=-1,c=!0,h=e.length-1,u=0;for(;h>=n;--h)if(r=e.charCodeAt(h),f(r)){if(!c){s=h+1;break}}else-1===a&&(c=!1,a=h+1),r===l?-1===o?o=h:1!==u&&(u=1):-1!==o&&(u=-1);return-1!==a&&(-1===o||0===u||1===u&&o===a-1&&o===s+1?t.base=t.name=e.slice(s,a):(t.name=e.slice(s,o),t.base=e.slice(s,a),t.ext=e.slice(o,a))),t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},y={resolve(...e){let t="",i=!1;for(let n=e.length-1;n>=-1&&!i;n--){const r=n>=0?e[n]:o();g(r,"path"),0!==r.length&&(t=`${r}/${t}`,i=r.charCodeAt(0)===c)}return t=_(t,!i,"/",p),i?`/${t}`:t.length>0?t:"."},normalize(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c,i=e.charCodeAt(e.length-1)===c;return 0===(e=_(e,!t,"/",p)).length?t?"/":i?"./":".":(i&&(e+="/"),t?`/${e}`:e)},isAbsolute:e=>(g(e,"path"),e.length>0&&e.charCodeAt(0)===c),join(...e){if(0===e.length)return".";let t;for(let i=0;i0&&(void 0===t?t=n:t+=`/${n}`)}return void 0===t?".":y.normalize(t)},relative(e,t){if(g(e,"from"),g(t,"to"),e===t)return"";if((e=y.resolve(e))===(t=y.resolve(t)))return"";const i=e.length,n=i-1,r=t.length-1,o=no){if(t.charCodeAt(1+a)===c)return t.slice(1+a+1);if(0===a)return t.slice(1+a)}else n>o&&(e.charCodeAt(1+a)===c?s=a:0===a&&(s=0));let l="";for(a=1+s+1;a<=i;++a)a!==i&&e.charCodeAt(a)!==c||(l+=0===l.length?"..":"/..");return`${l}${t.slice(1+s)}`},toNamespacedPath:e=>e,dirname(e){if(g(e,"path"),0===e.length)return".";const t=e.charCodeAt(0)===c;let i=-1,n=!0;for(let t=e.length-1;t>=1;--t)if(e.charCodeAt(t)===c){if(!n){i=t;break}}else n=!1;return-1===i?t?"/":".":t&&1===i?"//":e.slice(0,i)},basename(e,t){void 0!==t&&g(t,"ext"),g(e,"path");let i,n=0,r=-1,o=!0;if(void 0!==t&&t.length>0&&t.length<=e.length){if(t===e)return"";let s=t.length-1,a=-1;for(i=e.length-1;i>=0;--i){const l=e.charCodeAt(i);if(l===c){if(!o){n=i+1;break}}else-1===a&&(o=!1,a=i+1),s>=0&&(l===t.charCodeAt(s)?-1==--s&&(r=i):(s=-1,r=a))}return n===r?r=a:-1===r&&(r=e.length),e.slice(n,r)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===c){if(!o){n=i+1;break}}else-1===r&&(o=!1,r=i+1);return-1===r?"":e.slice(n,r)},extname(e){g(e,"path");let t=-1,i=0,n=-1,r=!0,o=0;for(let s=e.length-1;s>=0;--s){const a=e.charCodeAt(s);if(a!==c)-1===n&&(r=!1,n=s+1),a===l?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!r){i=s+1;break}}return-1===t||-1===n||0===o||1===o&&t===n-1&&t===i+1?"":e.slice(t,n)},format:v.bind(null,"/"),parse(e){g(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const i=e.charCodeAt(0)===c;let n;i?(t.root="/",n=1):n=0;let r=-1,o=0,s=-1,a=!0,h=e.length-1,d=0;for(;h>=n;--h){const t=e.charCodeAt(h);if(t!==c)-1===s&&(a=!1,s=h+1),t===l?-1===r?r=h:1!==d&&(d=1):-1!==r&&(d=-1);else if(!a){o=h+1;break}}if(-1!==s){const n=0===o&&i?1:o;-1===r||0===d||1===d&&r===s-1&&r===o+1?t.base=t.name=e.slice(n,s):(t.name=e.slice(n,r),t.base=e.slice(n,s),t.ext=e.slice(r,s))}return o>0?t.dir=e.slice(0,o-1):i&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};y.win32=b.win32=b,y.posix=b.posix=y;const w="win32"===a?b.normalize:y.normalize,C="win32"===a?b.resolve:y.resolve,x="win32"===a?b.relative:y.relative,S="win32"===a?b.dirname:y.dirname,k="win32"===a?b.basename:y.basename,L="win32"===a?b.extname:y.extname,N="win32"===a?b.sep:y.sep},1432:(e,t,i)=>{"use strict";var n;i.d(t,{$L:()=>N,ED:()=>x,G6:()=>W,IJ:()=>k,OS:()=>M,dK:()=>T,dz:()=>S,fn:()=>I,gn:()=>D,i7:()=>F,li:()=>v,n2:()=>E,r:()=>P,tY:()=>L,un:()=>V,vU:()=>B});const r="en";let o,s,a=!1,l=!1,c=!1,h=!1,d=!1,u=!1,g=!1,f=!1,p=!1,m=r,_=null;const v="object"==typeof self?self:"object"==typeof i.g?i.g:{};let b;void 0!==v.vscode&&void 0!==v.vscode.process?b=v.vscode.process:"undefined"!=typeof process&&(b=process);const y="string"==typeof(null===(n=null==b?void 0:b.versions)||void 0===n?void 0:n.electron),w=y&&"renderer"===(null==b?void 0:b.type);if("object"!=typeof navigator||w)if("object"==typeof b){a="win32"===b.platform,l="darwin"===b.platform,c="linux"===b.platform,h=c&&!!b.env.SNAP&&!!b.env.SNAP_REVISION,g=y,p=!!b.env.CI||!!b.env.BUILD_ARTIFACTSTAGINGDIRECTORY,o=r,m=r;const e=b.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),i=t.availableLanguages["*"];o=t.locale,m=i||r,_=t._translationsConfigFile}catch(e){}d=!0}else console.error("Unable to resolve platform.");else s=navigator.userAgent,a=s.indexOf("Windows")>=0,l=s.indexOf("Macintosh")>=0,f=(s.indexOf("Macintosh")>=0||s.indexOf("iPad")>=0||s.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,c=s.indexOf("Linux")>=0,u=!0,o=navigator.language,m=o;let C=0;l?C=1:a?C=3:c&&(C=2);const x=a,S=l,k=c,L=d,N=u,E=u&&"function"==typeof v.importScripts,D=f,A=s,T=m,I=(()=>{if("function"==typeof v.postMessage&&!v.importScripts){let e=[];v.addEventListener("message",(t=>{if(t.data&&t.data.vscodeScheduleAsyncWork)for(let i=0,n=e.length;i{const n=++t;e.push({id:n,callback:i}),v.postMessage({vscodeScheduleAsyncWork:n},"*")}}return e=>setTimeout(e)})(),M=l||f?2:a?1:3;let O=!0,R=!1;function P(){if(!R){R=!0;const e=new Uint8Array(2);e[0]=1,e[1]=2;const t=new Uint16Array(e.buffer);O=513===t[0]}return O}const F=!!(A&&A.indexOf("Chrome")>=0),B=!!(A&&A.indexOf("Firefox")>=0),W=!!(!F&&A&&A.indexOf("Safari")>=0),V=!!(A&&A.indexOf("Edg/")>=0);A&&A.indexOf("Android")},1134:(e,t,i)=>{"use strict";var n;i.d(t,{e:()=>n}),function(e){function t(e,t){if(e.start>=t.end||t.start>=e.end)return{start:0,end:0};const i=Math.max(e.start,t.start),n=Math.min(e.end,t.end);return n-i<=0?{start:0,end:0}:{start:i,end:n}}function i(e){return e.end-e.start<=0}e.intersect=t,e.isEmpty=i,e.intersects=function(e,n){return!i(t(e,n))},e.relativeComplement=function(e,t){const n=[],r={start:e.start,end:Math.min(t.start,e.end)},o={start:Math.max(t.end,e.start),end:e.end};return i(r)||n.push(r),i(o)||n.push(o),n}}(n||(n={}))},5935:(e,t,i)=>{"use strict";i.d(t,{AH:()=>v,DZ:()=>p,EZ:()=>f,Hx:()=>g,SF:()=>d,Vb:()=>C,Vo:()=>_,XX:()=>m,Xy:()=>u,i3:()=>b,z_:()=>c});var n=i(5527),r=i(6663),o=i(8721),s=i(1432),a=i(5924),l=i(666);function c(e){return(0,l.q)(e,!0)}class h{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:(0,a.qu)(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t||!(!e||!t)&&this.getComparisonKey(e,i)===this.getComparisonKey(t,i)}getComparisonKey(e,t=!1){return e.with({path:this._ignorePathCasing(e)?e.path.toLowerCase():void 0,fragment:t?null:void 0}).toString()}isEqualOrParent(e,t,i=!1){if(e.scheme===t.scheme){if(e.scheme===r.lg.file)return n.KM(c(e),c(t),this._ignorePathCasing(e))&&e.query===t.query&&(i||e.fragment===t.fragment);if(y(e.authority,t.authority))return n.KM(e.path,t.path,this._ignorePathCasing(e),"/")&&e.query===t.query&&(i||e.fragment===t.fragment)}return!1}joinPath(e,...t){return l.o.joinPath(e,...t)}basenameOrAuthority(e){return f(e)||e.authority}basename(e){return o.KR.basename(e.path)}extname(e){return o.KR.extname(e.path)}dirname(e){if(0===e.path.length)return e;let t;return e.scheme===r.lg.file?t=l.o.file(o.XX(c(e))).path:(t=o.KR.dirname(e.path),e.authority&&t.length&&47!==t.charCodeAt(0)&&(console.error(`dirname("${e.toString})) resulted in a relative path`),t="/")),e.with({path:t})}normalizePath(e){if(!e.path.length)return e;let t;return t=e.scheme===r.lg.file?l.o.file(o.Fv(c(e))).path:o.KR.normalize(e.path),e.with({path:t})}relativePath(e,t){if(e.scheme!==t.scheme||!y(e.authority,t.authority))return;if(e.scheme===r.lg.file){const i=o.Gf(c(e),c(t));return s.ED?n.ej(i):i}let i=e.path||"/",a=t.path||"/";if(this._ignorePathCasing(e)){let e=0;for(const t=Math.min(i.length,a.length);en.yj(i).length&&i[i.length-1]===t}{const t=e.path;return t.length>1&&47===t.charCodeAt(t.length-1)&&!/^[a-zA-Z]:(\/$|\\$)/.test(e.fsPath)}}removeTrailingPathSeparator(e,t=o.ir){return w(e,t)?e.with({path:e.path.substr(0,e.path.length-1)}):e}addTrailingPathSeparator(e,t=o.ir){let i=!1;if(e.scheme===r.lg.file){const r=c(e);i=void 0!==r&&r.length===n.yj(r).length&&r[r.length-1]===t}else{t="/";const n=e.path;i=1===n.length&&47===n.charCodeAt(n.length-1)}return i||w(e,t)?e:e.with({path:e.path+"/"})}}const d=new h((()=>!1)),u=(new h((e=>e.scheme!==r.lg.file||!s.IJ)),new h((e=>!0)),d.isEqual.bind(d)),g=(d.isEqualOrParent.bind(d),d.getComparisonKey.bind(d),d.basenameOrAuthority.bind(d)),f=d.basename.bind(d),p=d.extname.bind(d),m=d.dirname.bind(d),_=d.joinPath.bind(d),v=d.normalizePath.bind(d),b=(d.relativePath.bind(d),d.resolvePath.bind(d)),y=(d.isAbsolutePath.bind(d),d.isEqualAuthority.bind(d)),w=d.hasTrailingPathSeparator.bind(d);var C;d.removeTrailingPathSeparator.bind(d),d.addTrailingPathSeparator.bind(d),function(e){e.META_DATA_LABEL="label",e.META_DATA_DESCRIPTION="description",e.META_DATA_SIZE="size",e.META_DATA_MIME="mime",e.parseMetaData=function(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach((e=>{const[t,n]=e.split(":");t&&n&&i.set(t,n)}));const n=t.path.substring(0,t.path.indexOf(";"));return n&&i.set(e.META_DATA_MIME,n),i}}(C||(C={}))},6633:(e,t,i)=>{"use strict";i.d(t,{Rm:()=>s});var n=i(4669),r=i(5976);class o{constructor(e,t,i,n,r,o,s){this._forceIntegerValues=e,this._scrollStateBrand=void 0,this._forceIntegerValues&&(t|=0,i|=0,n|=0,r|=0,o|=0,s|=0),this.rawScrollLeft=n,this.rawScrollTop=s,t<0&&(t=0),n+t>i&&(n=i-t),n<0&&(n=0),r<0&&(r=0),s+r>o&&(s=o-r),s<0&&(s=0),this.width=t,this.scrollWidth=i,this.scrollLeft=n,this.height=r,this.scrollHeight=o,this.scrollTop=s}equals(e){return this.rawScrollLeft===e.rawScrollLeft&&this.rawScrollTop===e.rawScrollTop&&this.width===e.width&&this.scrollWidth===e.scrollWidth&&this.scrollLeft===e.scrollLeft&&this.height===e.height&&this.scrollHeight===e.scrollHeight&&this.scrollTop===e.scrollTop}withScrollDimensions(e,t){return new o(this._forceIntegerValues,void 0!==e.width?e.width:this.width,void 0!==e.scrollWidth?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,void 0!==e.height?e.height:this.height,void 0!==e.scrollHeight?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new o(this._forceIntegerValues,this.width,this.scrollWidth,void 0!==e.scrollLeft?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,void 0!==e.scrollTop?e.scrollTop:this.rawScrollTop)}createScrollEvent(e,t){const i=this.width!==e.width,n=this.scrollWidth!==e.scrollWidth,r=this.scrollLeft!==e.scrollLeft,o=this.height!==e.height,s=this.scrollHeight!==e.scrollHeight,a=this.scrollTop!==e.scrollTop;return{inSmoothScrolling:t,oldWidth:e.width,oldScrollWidth:e.scrollWidth,oldScrollLeft:e.scrollLeft,width:this.width,scrollWidth:this.scrollWidth,scrollLeft:this.scrollLeft,oldHeight:e.height,oldScrollHeight:e.scrollHeight,oldScrollTop:e.scrollTop,height:this.height,scrollHeight:this.scrollHeight,scrollTop:this.scrollTop,widthChanged:i,scrollWidthChanged:n,scrollLeftChanged:r,heightChanged:o,scrollHeightChanged:s,scrollTopChanged:a}}}class s extends r.JT{constructor(e){super(),this._scrollableBrand=void 0,this._onScroll=this._register(new n.Q5),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e.smoothScrollDuration,this._scheduleAtNextAnimationFrame=e.scheduleAtNextAnimationFrame,this._state=new o(e.forceIntegerValues,0,0,0,0,0,0),this._smoothScrolling=null}dispose(){this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),super.dispose()}setSmoothScrollDuration(e){this._smoothScrollDuration=e}validateScrollPosition(e){return this._state.withScrollPosition(e)}getScrollDimensions(){return this._state}setScrollDimensions(e,t){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.acceptScrollDimensions(this._state)}getFutureScrollPosition(){return this._smoothScrolling?this._smoothScrolling.to:this._state}getCurrentScrollPosition(){return this._state}setScrollPositionNow(e){const t=this._state.withScrollPosition(e);this._smoothScrolling&&(this._smoothScrolling.dispose(),this._smoothScrolling=null),this._setState(t,!1)}setScrollPositionSmooth(e,t){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};const i=this._state.withScrollPosition(e);if(this._smoothScrolling.to.scrollLeft===i.scrollLeft&&this._smoothScrolling.to.scrollTop===i.scrollTop)return;let n;n=t?new c(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const t=this._state.withScrollPosition(e);this._smoothScrolling=c.start(this._state,t,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);return this._setState(t,!0),this._smoothScrolling?e.isDone?(this._smoothScrolling.dispose(),void(this._smoothScrolling=null)):void(this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame((()=>{this._smoothScrolling&&(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())}))):void 0}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class a{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function l(e,t){const i=t-e;return function(t){return e+i*(1-(n=1-t,Math.pow(n,3)));var n}}class c{constructor(e,t,i,n){this.from=e,this.to=t,this.duration=n,this.startTime=i,this.animationFrameDisposable=null,this._initAnimations()}_initAnimations(){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)}_initAnimation(e,t,i){if(Math.abs(e-t)>2.5*i){let s,a;return e{"use strict";i.d(t,{Z:()=>o});var n,r=i(5924);!function(e){e[e.Ignore=0]="Ignore",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(n||(n={})),function(e){const t="error",i="warning",n="info";e.fromValue=function(o){return o?r.qq(t,o)?e.Error:r.qq(i,o)||r.qq("warn",o)?e.Warning:r.qq(n,o)?e.Info:e.Ignore:e.Ignore},e.toString=function(r){switch(r){case e.Error:return t;case e.Warning:return i;case e.Info:return n;default:return"ignore"}}}(n||(n={}));const o=n},4013:(e,t,i)=>{"use strict";i.d(t,{G:()=>o});var n=i(1432);const r=n.li.performance&&"function"==typeof n.li.performance.now;class o{constructor(e){this._highResolution=r&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new o(e)}stop(){this._stopTime=this._now()}elapsed(){return-1!==this._stopTime?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?n.li.performance.now():Date.now()}}},5924:(e,t,i)=>{"use strict";i.d(t,{ZK:()=>re,W1:()=>F,vU:()=>oe,Qe:()=>$,c1:()=>Y,Mh:()=>A,P1:()=>T,qu:()=>C,zY:()=>S,TT:()=>x,j_:()=>k,rL:()=>O,Ut:()=>H,ab:()=>K,Kw:()=>Q,un:()=>g,GF:()=>p,qq:()=>E,YU:()=>l,ec:()=>c,LC:()=>b,WU:()=>a,J_:()=>V,V8:()=>y,oH:()=>te,ZH:()=>R,$i:()=>U,C8:()=>G,m5:()=>o,K7:()=>q,ZG:()=>I,YK:()=>M,mK:()=>L,df:()=>N,ow:()=>w,j3:()=>d,vH:()=>B,B4:()=>ne,HO:()=>W,mr:()=>_,IO:()=>m,oL:()=>u,PJ:()=>X,uq:()=>v,ok:()=>D,uS:()=>Z,R1:()=>f,fy:()=>h});var n,r=i(9579);function o(e){return!e||"string"!=typeof e||0===e.trim().length}const s=/{(\d+)}/g;function a(e,...t){return 0===t.length?e:e.replace(s,(function(e,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=t.length?e:t[n]}))}function l(e){return e.replace(/[<>&]/g,(function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}}))}function c(e){return e.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function h(e,t=" "){return u(d(e,t),t)}function d(e,t){if(!e||!t)return e;const i=t.length;if(0===i||0===e.length)return e;let n=0;for(;e.indexOf(t,n)===n;)n+=i;return e.substring(n)}function u(e,t){if(!e||!t)return e;const i=t.length,n=e.length;if(0===i||0===n)return e;let r=n,o=-1;for(;o=e.lastIndexOf(t,r-1),-1!==o&&o+i===r;){if(0===o)return"";r=o}return e.substring(0,r)}function g(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function f(e){return e.replace(/\*/g,"")}function p(e,t,i={}){if(!e)throw new Error("Cannot create regex from empty string");t||(e=c(e)),i.wholeWord&&(/\B/.test(e.charAt(0))||(e="\\b"+e),/\B/.test(e.charAt(e.length-1))||(e+="\\b"));let n="";return i.global&&(n+="g"),i.matchCase||(n+="i"),i.multiline&&(n+="m"),i.unicode&&(n+="u"),new RegExp(e,n)}function m(e){return"^"!==e.source&&"^$"!==e.source&&"$"!==e.source&&"^\\s*$"!==e.source&&!(!e.exec("")||0!==e.lastIndex)}function _(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")}function v(e){return e.split(/\r\n|\r|\n/)}function b(e){for(let t=0,i=e.length;t=0;i--){const t=e.charCodeAt(i);if(32!==t&&9!==t)return i}return-1}function C(e,t){return et?1:0}function x(e,t,i=0,n=e.length,r=0,o=t.length){for(;io)return 1}const s=n-i,a=o-r;return sa?1:0}function S(e,t){return k(e,t,0,e.length,0,t.length)}function k(e,t,i=0,n=e.length,r=0,o=t.length){for(;i=128||a>=128)return x(e.toLowerCase(),t.toLowerCase(),i,n,r,o);L(s)&&(s-=32),L(a)&&(a-=32);const l=s-a;if(0!==l)return l}const s=n-i,a=o-r;return sa?1:0}function L(e){return e>=97&&e<=122}function N(e){return e>=65&&e<=90}function E(e,t){return e.length===t.length&&0===k(e,t)}function D(e,t){const i=t.length;return!(t.length>e.length)&&0===k(e,t,0,i)}function A(e,t){let i,n=Math.min(e.length,t.length);for(i=0;i1){const n=e.charCodeAt(t-2);if(I(n))return O(n,i)}return i}(this._str,this._offset);return this._offset-=e>=65536?2:1,e}nextCodePoint(){const e=R(this._str,this._len,this._offset);return this._offset+=e>=65536?2:1,e}eol(){return this._offset>=this._len}}class F{constructor(e,t=0){this._iterator=new P(e,t)}get offset(){return this._iterator.offset}nextGraphemeLength(){const e=ee.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.nextCodePoint());for(;!t.eol();){const i=t.offset,r=e.getGraphemeBreakType(t.nextCodePoint());if(J(n,r)){t.setOffset(i);break}n=r}return t.offset-i}prevGraphemeLength(){const e=ee.getInstance(),t=this._iterator,i=t.offset;let n=e.getGraphemeBreakType(t.prevCodePoint());for(;t.offset>0;){const i=t.offset,r=e.getGraphemeBreakType(t.prevCodePoint());if(J(r,n)){t.setOffset(i);break}n=r}return i-t.offset}eol(){return this._iterator.eol()}}function B(e,t){return new F(e,t).nextGraphemeLength()}function W(e,t){return new F(e,t).prevGraphemeLength()}function V(e,t){t>0&&M(e.charCodeAt(t))&&t--;const i=t+B(e,t);return[i-W(e,i),i]}const z=/(?:[\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\u07FE-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u088E\u08A0-\u08C9\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDC7\uFDF0-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE35\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDD23\uDE80-\uDEA9\uDEAD-\uDF45\uDF51-\uDF81\uDF86-\uDFF6]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD4B-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function H(e){return z.test(e)}const j=/^[\t\n\r\x20-\x7E]*$/;function U(e){return j.test(e)}const $=/[\u2028\u2029]/;function K(e){return $.test(e)}function q(e){return e>=11904&&e<=55215||e>=63744&&e<=64255||e>=65281&&e<=65374}function G(e){return e>=127462&&e<=127487||8986===e||8987===e||9200===e||9203===e||e>=9728&&e<=10175||11088===e||11093===e||e>=127744&&e<=128591||e>=128640&&e<=128764||e>=128992&&e<=129008||e>=129280&&e<=129535||e>=129648&&e<=129782}const Y=String.fromCharCode(65279);function Z(e){return!!(e&&e.length>0&&65279===e.charCodeAt(0))}function Q(e,t=!1){return!!e&&(t&&(e=e.replace(/\\./g,"")),e.toLowerCase()!==e)}function X(e){return(e%=52)<26?String.fromCharCode(97+e):String.fromCharCode(65+e-26)}function J(e,t){return 0===e?5!==t&&7!==t:!(2===e&&3===t||4!==e&&2!==e&&3!==e&&4!==t&&2!==t&&3!==t&&(8===e&&(8===t||9===t||11===t||12===t)||!(11!==e&&9!==e||9!==t&&10!==t)||(12===e||10===e)&&10===t||5===t||13===t||7===t||1===e||13===e&&14===t||6===e&&6===t))}class ee{constructor(){this._data=JSON.parse("[0,0,0,51229,51255,12,44061,44087,12,127462,127487,6,7083,7085,5,47645,47671,12,54813,54839,12,128678,128678,14,3270,3270,5,9919,9923,14,45853,45879,12,49437,49463,12,53021,53047,12,71216,71218,7,128398,128399,14,129360,129374,14,2519,2519,5,4448,4519,9,9742,9742,14,12336,12336,14,44957,44983,12,46749,46775,12,48541,48567,12,50333,50359,12,52125,52151,12,53917,53943,12,69888,69890,5,73018,73018,5,127990,127990,14,128558,128559,14,128759,128760,14,129653,129655,14,2027,2035,5,2891,2892,7,3761,3761,5,6683,6683,5,8293,8293,4,9825,9826,14,9999,9999,14,43452,43453,5,44509,44535,12,45405,45431,12,46301,46327,12,47197,47223,12,48093,48119,12,48989,49015,12,49885,49911,12,50781,50807,12,51677,51703,12,52573,52599,12,53469,53495,12,54365,54391,12,65279,65279,4,70471,70472,7,72145,72147,7,119173,119179,5,127799,127818,14,128240,128244,14,128512,128512,14,128652,128652,14,128721,128722,14,129292,129292,14,129445,129450,14,129734,129743,14,1476,1477,5,2366,2368,7,2750,2752,7,3076,3076,5,3415,3415,5,4141,4144,5,6109,6109,5,6964,6964,5,7394,7400,5,9197,9198,14,9770,9770,14,9877,9877,14,9968,9969,14,10084,10084,14,43052,43052,5,43713,43713,5,44285,44311,12,44733,44759,12,45181,45207,12,45629,45655,12,46077,46103,12,46525,46551,12,46973,46999,12,47421,47447,12,47869,47895,12,48317,48343,12,48765,48791,12,49213,49239,12,49661,49687,12,50109,50135,12,50557,50583,12,51005,51031,12,51453,51479,12,51901,51927,12,52349,52375,12,52797,52823,12,53245,53271,12,53693,53719,12,54141,54167,12,54589,54615,12,55037,55063,12,69506,69509,5,70191,70193,5,70841,70841,7,71463,71467,5,72330,72342,5,94031,94031,5,123628,123631,5,127763,127765,14,127941,127941,14,128043,128062,14,128302,128317,14,128465,128467,14,128539,128539,14,128640,128640,14,128662,128662,14,128703,128703,14,128745,128745,14,129004,129007,14,129329,129330,14,129402,129402,14,129483,129483,14,129686,129704,14,130048,131069,14,173,173,4,1757,1757,1,2200,2207,5,2434,2435,7,2631,2632,5,2817,2817,5,3008,3008,5,3201,3201,5,3387,3388,5,3542,3542,5,3902,3903,7,4190,4192,5,6002,6003,5,6439,6440,5,6765,6770,7,7019,7027,5,7154,7155,7,8205,8205,13,8505,8505,14,9654,9654,14,9757,9757,14,9792,9792,14,9852,9853,14,9890,9894,14,9937,9937,14,9981,9981,14,10035,10036,14,11035,11036,14,42654,42655,5,43346,43347,7,43587,43587,5,44006,44007,7,44173,44199,12,44397,44423,12,44621,44647,12,44845,44871,12,45069,45095,12,45293,45319,12,45517,45543,12,45741,45767,12,45965,45991,12,46189,46215,12,46413,46439,12,46637,46663,12,46861,46887,12,47085,47111,12,47309,47335,12,47533,47559,12,47757,47783,12,47981,48007,12,48205,48231,12,48429,48455,12,48653,48679,12,48877,48903,12,49101,49127,12,49325,49351,12,49549,49575,12,49773,49799,12,49997,50023,12,50221,50247,12,50445,50471,12,50669,50695,12,50893,50919,12,51117,51143,12,51341,51367,12,51565,51591,12,51789,51815,12,52013,52039,12,52237,52263,12,52461,52487,12,52685,52711,12,52909,52935,12,53133,53159,12,53357,53383,12,53581,53607,12,53805,53831,12,54029,54055,12,54253,54279,12,54477,54503,12,54701,54727,12,54925,54951,12,55149,55175,12,68101,68102,5,69762,69762,7,70067,70069,7,70371,70378,5,70720,70721,7,71087,71087,5,71341,71341,5,71995,71996,5,72249,72249,7,72850,72871,5,73109,73109,5,118576,118598,5,121505,121519,5,127245,127247,14,127568,127569,14,127777,127777,14,127872,127891,14,127956,127967,14,128015,128016,14,128110,128172,14,128259,128259,14,128367,128368,14,128424,128424,14,128488,128488,14,128530,128532,14,128550,128551,14,128566,128566,14,128647,128647,14,128656,128656,14,128667,128673,14,128691,128693,14,128715,128715,14,128728,128732,14,128752,128752,14,128765,128767,14,129096,129103,14,129311,129311,14,129344,129349,14,129394,129394,14,129413,129425,14,129466,129471,14,129511,129535,14,129664,129666,14,129719,129722,14,129760,129767,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2307,2307,7,2382,2383,7,2497,2500,5,2563,2563,7,2677,2677,5,2763,2764,7,2879,2879,5,2914,2915,5,3021,3021,5,3142,3144,5,3263,3263,5,3285,3286,5,3398,3400,7,3530,3530,5,3633,3633,5,3864,3865,5,3974,3975,5,4155,4156,7,4229,4230,5,5909,5909,7,6078,6085,7,6277,6278,5,6451,6456,7,6744,6750,5,6846,6846,5,6972,6972,5,7074,7077,5,7146,7148,7,7222,7223,5,7416,7417,5,8234,8238,4,8417,8417,5,9000,9000,14,9203,9203,14,9730,9731,14,9748,9749,14,9762,9763,14,9776,9783,14,9800,9811,14,9831,9831,14,9872,9873,14,9882,9882,14,9900,9903,14,9929,9933,14,9941,9960,14,9974,9974,14,9989,9989,14,10006,10006,14,10062,10062,14,10160,10160,14,11647,11647,5,12953,12953,14,43019,43019,5,43232,43249,5,43443,43443,5,43567,43568,7,43696,43696,5,43765,43765,7,44013,44013,5,44117,44143,12,44229,44255,12,44341,44367,12,44453,44479,12,44565,44591,12,44677,44703,12,44789,44815,12,44901,44927,12,45013,45039,12,45125,45151,12,45237,45263,12,45349,45375,12,45461,45487,12,45573,45599,12,45685,45711,12,45797,45823,12,45909,45935,12,46021,46047,12,46133,46159,12,46245,46271,12,46357,46383,12,46469,46495,12,46581,46607,12,46693,46719,12,46805,46831,12,46917,46943,12,47029,47055,12,47141,47167,12,47253,47279,12,47365,47391,12,47477,47503,12,47589,47615,12,47701,47727,12,47813,47839,12,47925,47951,12,48037,48063,12,48149,48175,12,48261,48287,12,48373,48399,12,48485,48511,12,48597,48623,12,48709,48735,12,48821,48847,12,48933,48959,12,49045,49071,12,49157,49183,12,49269,49295,12,49381,49407,12,49493,49519,12,49605,49631,12,49717,49743,12,49829,49855,12,49941,49967,12,50053,50079,12,50165,50191,12,50277,50303,12,50389,50415,12,50501,50527,12,50613,50639,12,50725,50751,12,50837,50863,12,50949,50975,12,51061,51087,12,51173,51199,12,51285,51311,12,51397,51423,12,51509,51535,12,51621,51647,12,51733,51759,12,51845,51871,12,51957,51983,12,52069,52095,12,52181,52207,12,52293,52319,12,52405,52431,12,52517,52543,12,52629,52655,12,52741,52767,12,52853,52879,12,52965,52991,12,53077,53103,12,53189,53215,12,53301,53327,12,53413,53439,12,53525,53551,12,53637,53663,12,53749,53775,12,53861,53887,12,53973,53999,12,54085,54111,12,54197,54223,12,54309,54335,12,54421,54447,12,54533,54559,12,54645,54671,12,54757,54783,12,54869,54895,12,54981,55007,12,55093,55119,12,55243,55291,10,66045,66045,5,68325,68326,5,69688,69702,5,69817,69818,5,69957,69958,7,70089,70092,5,70198,70199,5,70462,70462,5,70502,70508,5,70750,70750,5,70846,70846,7,71100,71101,5,71230,71230,7,71351,71351,5,71737,71738,5,72000,72000,7,72160,72160,5,72273,72278,5,72752,72758,5,72882,72883,5,73031,73031,5,73461,73462,7,94192,94193,7,119149,119149,7,121403,121452,5,122915,122916,5,126980,126980,14,127358,127359,14,127535,127535,14,127759,127759,14,127771,127771,14,127792,127793,14,127825,127867,14,127897,127899,14,127945,127945,14,127985,127986,14,128000,128007,14,128021,128021,14,128066,128100,14,128184,128235,14,128249,128252,14,128266,128276,14,128335,128335,14,128379,128390,14,128407,128419,14,128444,128444,14,128481,128481,14,128499,128499,14,128526,128526,14,128536,128536,14,128543,128543,14,128556,128556,14,128564,128564,14,128577,128580,14,128643,128645,14,128649,128649,14,128654,128654,14,128660,128660,14,128664,128664,14,128675,128675,14,128686,128689,14,128695,128696,14,128705,128709,14,128717,128719,14,128725,128725,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129009,129023,14,129160,129167,14,129296,129304,14,129320,129327,14,129340,129342,14,129356,129356,14,129388,129392,14,129399,129400,14,129404,129407,14,129432,129442,14,129454,129455,14,129473,129474,14,129485,129487,14,129648,129651,14,129659,129660,14,129671,129679,14,129709,129711,14,129728,129730,14,129751,129753,14,129776,129782,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2274,2274,1,2363,2363,7,2377,2380,7,2402,2403,5,2494,2494,5,2507,2508,7,2558,2558,5,2622,2624,7,2641,2641,5,2691,2691,7,2759,2760,5,2786,2787,5,2876,2876,5,2881,2884,5,2901,2902,5,3006,3006,5,3014,3016,7,3072,3072,5,3134,3136,5,3157,3158,5,3260,3260,5,3266,3266,5,3274,3275,7,3328,3329,5,3391,3392,7,3405,3405,5,3457,3457,5,3536,3537,7,3551,3551,5,3636,3642,5,3764,3772,5,3895,3895,5,3967,3967,7,3993,4028,5,4146,4151,5,4182,4183,7,4226,4226,5,4253,4253,5,4957,4959,5,5940,5940,7,6070,6070,7,6087,6088,7,6158,6158,4,6432,6434,5,6448,6449,7,6679,6680,5,6742,6742,5,6754,6754,5,6783,6783,5,6912,6915,5,6966,6970,5,6978,6978,5,7042,7042,7,7080,7081,5,7143,7143,7,7150,7150,7,7212,7219,5,7380,7392,5,7412,7412,5,8203,8203,4,8232,8232,4,8265,8265,14,8400,8412,5,8421,8432,5,8617,8618,14,9167,9167,14,9200,9200,14,9410,9410,14,9723,9726,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9774,14,9786,9786,14,9794,9794,14,9823,9823,14,9828,9828,14,9833,9850,14,9855,9855,14,9875,9875,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9935,9935,14,9939,9939,14,9962,9962,14,9972,9972,14,9978,9978,14,9986,9986,14,9997,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10133,10135,14,10548,10549,14,11093,11093,14,12330,12333,5,12441,12442,5,42608,42610,5,43010,43010,5,43045,43046,5,43188,43203,7,43302,43309,5,43392,43394,5,43446,43449,5,43493,43493,5,43571,43572,7,43597,43597,7,43703,43704,5,43756,43757,5,44003,44004,7,44009,44010,7,44033,44059,12,44089,44115,12,44145,44171,12,44201,44227,12,44257,44283,12,44313,44339,12,44369,44395,12,44425,44451,12,44481,44507,12,44537,44563,12,44593,44619,12,44649,44675,12,44705,44731,12,44761,44787,12,44817,44843,12,44873,44899,12,44929,44955,12,44985,45011,12,45041,45067,12,45097,45123,12,45153,45179,12,45209,45235,12,45265,45291,12,45321,45347,12,45377,45403,12,45433,45459,12,45489,45515,12,45545,45571,12,45601,45627,12,45657,45683,12,45713,45739,12,45769,45795,12,45825,45851,12,45881,45907,12,45937,45963,12,45993,46019,12,46049,46075,12,46105,46131,12,46161,46187,12,46217,46243,12,46273,46299,12,46329,46355,12,46385,46411,12,46441,46467,12,46497,46523,12,46553,46579,12,46609,46635,12,46665,46691,12,46721,46747,12,46777,46803,12,46833,46859,12,46889,46915,12,46945,46971,12,47001,47027,12,47057,47083,12,47113,47139,12,47169,47195,12,47225,47251,12,47281,47307,12,47337,47363,12,47393,47419,12,47449,47475,12,47505,47531,12,47561,47587,12,47617,47643,12,47673,47699,12,47729,47755,12,47785,47811,12,47841,47867,12,47897,47923,12,47953,47979,12,48009,48035,12,48065,48091,12,48121,48147,12,48177,48203,12,48233,48259,12,48289,48315,12,48345,48371,12,48401,48427,12,48457,48483,12,48513,48539,12,48569,48595,12,48625,48651,12,48681,48707,12,48737,48763,12,48793,48819,12,48849,48875,12,48905,48931,12,48961,48987,12,49017,49043,12,49073,49099,12,49129,49155,12,49185,49211,12,49241,49267,12,49297,49323,12,49353,49379,12,49409,49435,12,49465,49491,12,49521,49547,12,49577,49603,12,49633,49659,12,49689,49715,12,49745,49771,12,49801,49827,12,49857,49883,12,49913,49939,12,49969,49995,12,50025,50051,12,50081,50107,12,50137,50163,12,50193,50219,12,50249,50275,12,50305,50331,12,50361,50387,12,50417,50443,12,50473,50499,12,50529,50555,12,50585,50611,12,50641,50667,12,50697,50723,12,50753,50779,12,50809,50835,12,50865,50891,12,50921,50947,12,50977,51003,12,51033,51059,12,51089,51115,12,51145,51171,12,51201,51227,12,51257,51283,12,51313,51339,12,51369,51395,12,51425,51451,12,51481,51507,12,51537,51563,12,51593,51619,12,51649,51675,12,51705,51731,12,51761,51787,12,51817,51843,12,51873,51899,12,51929,51955,12,51985,52011,12,52041,52067,12,52097,52123,12,52153,52179,12,52209,52235,12,52265,52291,12,52321,52347,12,52377,52403,12,52433,52459,12,52489,52515,12,52545,52571,12,52601,52627,12,52657,52683,12,52713,52739,12,52769,52795,12,52825,52851,12,52881,52907,12,52937,52963,12,52993,53019,12,53049,53075,12,53105,53131,12,53161,53187,12,53217,53243,12,53273,53299,12,53329,53355,12,53385,53411,12,53441,53467,12,53497,53523,12,53553,53579,12,53609,53635,12,53665,53691,12,53721,53747,12,53777,53803,12,53833,53859,12,53889,53915,12,53945,53971,12,54001,54027,12,54057,54083,12,54113,54139,12,54169,54195,12,54225,54251,12,54281,54307,12,54337,54363,12,54393,54419,12,54449,54475,12,54505,54531,12,54561,54587,12,54617,54643,12,54673,54699,12,54729,54755,12,54785,54811,12,54841,54867,12,54897,54923,12,54953,54979,12,55009,55035,12,55065,55091,12,55121,55147,12,55177,55203,12,65024,65039,5,65520,65528,4,66422,66426,5,68152,68154,5,69291,69292,5,69633,69633,5,69747,69748,5,69811,69814,5,69826,69826,5,69932,69932,7,70016,70017,5,70079,70080,7,70095,70095,5,70196,70196,5,70367,70367,5,70402,70403,7,70464,70464,5,70487,70487,5,70709,70711,7,70725,70725,7,70833,70834,7,70843,70844,7,70849,70849,7,71090,71093,5,71103,71104,5,71227,71228,7,71339,71339,5,71344,71349,5,71458,71461,5,71727,71735,5,71985,71989,7,71998,71998,5,72002,72002,7,72154,72155,5,72193,72202,5,72251,72254,5,72281,72283,5,72344,72345,5,72766,72766,7,72874,72880,5,72885,72886,5,73023,73029,5,73104,73105,5,73111,73111,5,92912,92916,5,94095,94098,5,113824,113827,4,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,125252,125258,5,127183,127183,14,127340,127343,14,127377,127386,14,127491,127503,14,127548,127551,14,127744,127756,14,127761,127761,14,127769,127769,14,127773,127774,14,127780,127788,14,127796,127797,14,127820,127823,14,127869,127869,14,127894,127895,14,127902,127903,14,127943,127943,14,127947,127950,14,127972,127972,14,127988,127988,14,127992,127994,14,128009,128011,14,128019,128019,14,128023,128041,14,128064,128064,14,128102,128107,14,128174,128181,14,128238,128238,14,128246,128247,14,128254,128254,14,128264,128264,14,128278,128299,14,128329,128330,14,128348,128359,14,128371,128377,14,128392,128393,14,128401,128404,14,128421,128421,14,128433,128434,14,128450,128452,14,128476,128478,14,128483,128483,14,128495,128495,14,128506,128506,14,128519,128520,14,128528,128528,14,128534,128534,14,128538,128538,14,128540,128542,14,128544,128549,14,128552,128555,14,128557,128557,14,128560,128563,14,128565,128565,14,128567,128576,14,128581,128591,14,128641,128642,14,128646,128646,14,128648,128648,14,128650,128651,14,128653,128653,14,128655,128655,14,128657,128659,14,128661,128661,14,128663,128663,14,128665,128666,14,128674,128674,14,128676,128677,14,128679,128685,14,128690,128690,14,128694,128694,14,128697,128702,14,128704,128704,14,128710,128714,14,128716,128716,14,128720,128720,14,128723,128724,14,128726,128727,14,128733,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129008,129008,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129661,129663,14,129667,129670,14,129680,129685,14,129705,129708,14,129712,129718,14,129723,129727,14,129731,129733,14,129744,129750,14,129754,129759,14,129768,129775,14,129783,129791,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2192,2193,1,2250,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3132,3132,5,3137,3140,7,3146,3149,5,3170,3171,5,3202,3203,7,3262,3262,7,3264,3265,7,3267,3268,7,3271,3272,7,3276,3277,5,3298,3299,5,3330,3331,7,3390,3390,5,3393,3396,5,3402,3404,7,3406,3406,1,3426,3427,5,3458,3459,7,3535,3535,5,3538,3540,5,3544,3550,7,3570,3571,7,3635,3635,7,3655,3662,5,3763,3763,7,3784,3789,5,3893,3893,5,3897,3897,5,3953,3966,5,3968,3972,5,3981,3991,5,4038,4038,5,4145,4145,7,4153,4154,5,4157,4158,5,4184,4185,5,4209,4212,5,4228,4228,7,4237,4237,5,4352,4447,8,4520,4607,10,5906,5908,5,5938,5939,5,5970,5971,5,6068,6069,5,6071,6077,5,6086,6086,5,6089,6099,5,6155,6157,5,6159,6159,5,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6862,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7679,5,8204,8204,5,8206,8207,4,8233,8233,4,8252,8252,14,8288,8292,4,8294,8303,4,8413,8416,5,8418,8420,5,8482,8482,14,8596,8601,14,8986,8987,14,9096,9096,14,9193,9196,14,9199,9199,14,9201,9202,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9729,14,9732,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9775,9775,14,9784,9785,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9874,14,9876,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9934,14,9936,9936,14,9938,9938,14,9940,9940,14,9961,9961,14,9963,9967,14,9970,9971,14,9973,9973,14,9975,9977,14,9979,9980,14,9982,9985,14,9987,9988,14,9992,9996,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10083,14,10085,10087,14,10145,10145,14,10175,10175,14,11013,11015,14,11088,11088,14,11503,11505,5,11744,11775,5,12334,12335,5,12349,12349,14,12951,12951,14,42607,42607,5,42612,42621,5,42736,42737,5,43014,43014,5,43043,43044,7,43047,43047,7,43136,43137,7,43204,43205,5,43263,43263,5,43335,43345,5,43360,43388,8,43395,43395,7,43444,43445,7,43450,43451,7,43454,43456,7,43561,43566,5,43569,43570,5,43573,43574,5,43596,43596,5,43644,43644,5,43698,43700,5,43710,43711,5,43755,43755,7,43758,43759,7,43766,43766,5,44005,44005,5,44008,44008,5,44012,44012,7,44032,44032,11,44060,44060,11,44088,44088,11,44116,44116,11,44144,44144,11,44172,44172,11,44200,44200,11,44228,44228,11,44256,44256,11,44284,44284,11,44312,44312,11,44340,44340,11,44368,44368,11,44396,44396,11,44424,44424,11,44452,44452,11,44480,44480,11,44508,44508,11,44536,44536,11,44564,44564,11,44592,44592,11,44620,44620,11,44648,44648,11,44676,44676,11,44704,44704,11,44732,44732,11,44760,44760,11,44788,44788,11,44816,44816,11,44844,44844,11,44872,44872,11,44900,44900,11,44928,44928,11,44956,44956,11,44984,44984,11,45012,45012,11,45040,45040,11,45068,45068,11,45096,45096,11,45124,45124,11,45152,45152,11,45180,45180,11,45208,45208,11,45236,45236,11,45264,45264,11,45292,45292,11,45320,45320,11,45348,45348,11,45376,45376,11,45404,45404,11,45432,45432,11,45460,45460,11,45488,45488,11,45516,45516,11,45544,45544,11,45572,45572,11,45600,45600,11,45628,45628,11,45656,45656,11,45684,45684,11,45712,45712,11,45740,45740,11,45768,45768,11,45796,45796,11,45824,45824,11,45852,45852,11,45880,45880,11,45908,45908,11,45936,45936,11,45964,45964,11,45992,45992,11,46020,46020,11,46048,46048,11,46076,46076,11,46104,46104,11,46132,46132,11,46160,46160,11,46188,46188,11,46216,46216,11,46244,46244,11,46272,46272,11,46300,46300,11,46328,46328,11,46356,46356,11,46384,46384,11,46412,46412,11,46440,46440,11,46468,46468,11,46496,46496,11,46524,46524,11,46552,46552,11,46580,46580,11,46608,46608,11,46636,46636,11,46664,46664,11,46692,46692,11,46720,46720,11,46748,46748,11,46776,46776,11,46804,46804,11,46832,46832,11,46860,46860,11,46888,46888,11,46916,46916,11,46944,46944,11,46972,46972,11,47000,47000,11,47028,47028,11,47056,47056,11,47084,47084,11,47112,47112,11,47140,47140,11,47168,47168,11,47196,47196,11,47224,47224,11,47252,47252,11,47280,47280,11,47308,47308,11,47336,47336,11,47364,47364,11,47392,47392,11,47420,47420,11,47448,47448,11,47476,47476,11,47504,47504,11,47532,47532,11,47560,47560,11,47588,47588,11,47616,47616,11,47644,47644,11,47672,47672,11,47700,47700,11,47728,47728,11,47756,47756,11,47784,47784,11,47812,47812,11,47840,47840,11,47868,47868,11,47896,47896,11,47924,47924,11,47952,47952,11,47980,47980,11,48008,48008,11,48036,48036,11,48064,48064,11,48092,48092,11,48120,48120,11,48148,48148,11,48176,48176,11,48204,48204,11,48232,48232,11,48260,48260,11,48288,48288,11,48316,48316,11,48344,48344,11,48372,48372,11,48400,48400,11,48428,48428,11,48456,48456,11,48484,48484,11,48512,48512,11,48540,48540,11,48568,48568,11,48596,48596,11,48624,48624,11,48652,48652,11,48680,48680,11,48708,48708,11,48736,48736,11,48764,48764,11,48792,48792,11,48820,48820,11,48848,48848,11,48876,48876,11,48904,48904,11,48932,48932,11,48960,48960,11,48988,48988,11,49016,49016,11,49044,49044,11,49072,49072,11,49100,49100,11,49128,49128,11,49156,49156,11,49184,49184,11,49212,49212,11,49240,49240,11,49268,49268,11,49296,49296,11,49324,49324,11,49352,49352,11,49380,49380,11,49408,49408,11,49436,49436,11,49464,49464,11,49492,49492,11,49520,49520,11,49548,49548,11,49576,49576,11,49604,49604,11,49632,49632,11,49660,49660,11,49688,49688,11,49716,49716,11,49744,49744,11,49772,49772,11,49800,49800,11,49828,49828,11,49856,49856,11,49884,49884,11,49912,49912,11,49940,49940,11,49968,49968,11,49996,49996,11,50024,50024,11,50052,50052,11,50080,50080,11,50108,50108,11,50136,50136,11,50164,50164,11,50192,50192,11,50220,50220,11,50248,50248,11,50276,50276,11,50304,50304,11,50332,50332,11,50360,50360,11,50388,50388,11,50416,50416,11,50444,50444,11,50472,50472,11,50500,50500,11,50528,50528,11,50556,50556,11,50584,50584,11,50612,50612,11,50640,50640,11,50668,50668,11,50696,50696,11,50724,50724,11,50752,50752,11,50780,50780,11,50808,50808,11,50836,50836,11,50864,50864,11,50892,50892,11,50920,50920,11,50948,50948,11,50976,50976,11,51004,51004,11,51032,51032,11,51060,51060,11,51088,51088,11,51116,51116,11,51144,51144,11,51172,51172,11,51200,51200,11,51228,51228,11,51256,51256,11,51284,51284,11,51312,51312,11,51340,51340,11,51368,51368,11,51396,51396,11,51424,51424,11,51452,51452,11,51480,51480,11,51508,51508,11,51536,51536,11,51564,51564,11,51592,51592,11,51620,51620,11,51648,51648,11,51676,51676,11,51704,51704,11,51732,51732,11,51760,51760,11,51788,51788,11,51816,51816,11,51844,51844,11,51872,51872,11,51900,51900,11,51928,51928,11,51956,51956,11,51984,51984,11,52012,52012,11,52040,52040,11,52068,52068,11,52096,52096,11,52124,52124,11,52152,52152,11,52180,52180,11,52208,52208,11,52236,52236,11,52264,52264,11,52292,52292,11,52320,52320,11,52348,52348,11,52376,52376,11,52404,52404,11,52432,52432,11,52460,52460,11,52488,52488,11,52516,52516,11,52544,52544,11,52572,52572,11,52600,52600,11,52628,52628,11,52656,52656,11,52684,52684,11,52712,52712,11,52740,52740,11,52768,52768,11,52796,52796,11,52824,52824,11,52852,52852,11,52880,52880,11,52908,52908,11,52936,52936,11,52964,52964,11,52992,52992,11,53020,53020,11,53048,53048,11,53076,53076,11,53104,53104,11,53132,53132,11,53160,53160,11,53188,53188,11,53216,53216,11,53244,53244,11,53272,53272,11,53300,53300,11,53328,53328,11,53356,53356,11,53384,53384,11,53412,53412,11,53440,53440,11,53468,53468,11,53496,53496,11,53524,53524,11,53552,53552,11,53580,53580,11,53608,53608,11,53636,53636,11,53664,53664,11,53692,53692,11,53720,53720,11,53748,53748,11,53776,53776,11,53804,53804,11,53832,53832,11,53860,53860,11,53888,53888,11,53916,53916,11,53944,53944,11,53972,53972,11,54000,54000,11,54028,54028,11,54056,54056,11,54084,54084,11,54112,54112,11,54140,54140,11,54168,54168,11,54196,54196,11,54224,54224,11,54252,54252,11,54280,54280,11,54308,54308,11,54336,54336,11,54364,54364,11,54392,54392,11,54420,54420,11,54448,54448,11,54476,54476,11,54504,54504,11,54532,54532,11,54560,54560,11,54588,54588,11,54616,54616,11,54644,54644,11,54672,54672,11,54700,54700,11,54728,54728,11,54756,54756,11,54784,54784,11,54812,54812,11,54840,54840,11,54868,54868,11,54896,54896,11,54924,54924,11,54952,54952,11,54980,54980,11,55008,55008,11,55036,55036,11,55064,55064,11,55092,55092,11,55120,55120,11,55148,55148,11,55176,55176,11,55216,55238,9,64286,64286,5,65056,65071,5,65438,65439,5,65529,65531,4,66272,66272,5,68097,68099,5,68108,68111,5,68159,68159,5,68900,68903,5,69446,69456,5,69632,69632,7,69634,69634,7,69744,69744,5,69759,69761,5,69808,69810,7,69815,69816,7,69821,69821,1,69837,69837,1,69927,69931,5,69933,69940,5,70003,70003,5,70018,70018,7,70070,70078,5,70082,70083,1,70094,70094,7,70188,70190,7,70194,70195,7,70197,70197,7,70206,70206,5,70368,70370,7,70400,70401,5,70459,70460,5,70463,70463,7,70465,70468,7,70475,70477,7,70498,70499,7,70512,70516,5,70712,70719,5,70722,70724,5,70726,70726,5,70832,70832,5,70835,70840,5,70842,70842,5,70845,70845,5,70847,70848,5,70850,70851,5,71088,71089,7,71096,71099,7,71102,71102,7,71132,71133,5,71219,71226,5,71229,71229,5,71231,71232,5,71340,71340,7,71342,71343,7,71350,71350,7,71453,71455,5,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,118528,118573,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123566,123566,5,125136,125142,5,126976,126979,14,126981,127182,14,127184,127231,14,127279,127279,14,127344,127345,14,127374,127374,14,127405,127461,14,127489,127490,14,127514,127514,14,127538,127546,14,127561,127567,14,127570,127743,14,127757,127758,14,127760,127760,14,127762,127762,14,127766,127768,14,127770,127770,14,127772,127772,14,127775,127776,14,127778,127779,14,127789,127791,14,127794,127795,14,127798,127798,14,127819,127819,14,127824,127824,14,127868,127868,14,127870,127871,14,127892,127893,14,127896,127896,14,127900,127901,14,127904,127940,14,127942,127942,14,127944,127944,14,127946,127946,14,127951,127955,14,127968,127971,14,127973,127984,14,127987,127987,14,127989,127989,14,127991,127991,14,127995,127999,5,128008,128008,14,128012,128014,14,128017,128018,14,128020,128020,14,128022,128022,14,128042,128042,14,128063,128063,14,128065,128065,14,128101,128101,14,128108,128109,14,128173,128173,14,128182,128183,14,128236,128237,14,128239,128239,14,128245,128245,14,128248,128248,14,128253,128253,14,128255,128258,14,128260,128263,14,128265,128265,14,128277,128277,14,128300,128301,14,128326,128328,14,128331,128334,14,128336,128347,14,128360,128366,14,128369,128370,14,128378,128378,14,128391,128391,14,128394,128397,14,128400,128400,14,128405,128406,14,128420,128420,14,128422,128423,14,128425,128432,14,128435,128443,14,128445,128449,14,128453,128464,14,128468,128475,14,128479,128480,14,128482,128482,14,128484,128487,14,128489,128494,14,128496,128498,14,128500,128505,14,128507,128511,14,128513,128518,14,128521,128525,14,128527,128527,14,128529,128529,14,128533,128533,14,128535,128535,14,128537,128537,14]")}static getInstance(){return ee._INSTANCE||(ee._INSTANCE=new ee),ee._INSTANCE}getGraphemeBreakType(e){if(e<32)return 10===e?3:13===e?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(et[3*n+1]))return t[3*n+2];n=2*n+1}return 0}}function te(e,t){if(0===e)return 0;const i=function(e,t){const i=new P(t,e);let n=i.prevCodePoint();for(;ie(n)||65039===n||8419===n;){if(0===i.offset)return;n=i.prevCodePoint()}if(!G(n))return;let r=i.offset;return r>0&&8205===i.prevCodePoint()&&(r=i.offset),r}(e,t);if(void 0!==i)return i;const n=new P(t,e);return n.prevCodePoint(),n.offset}function ie(e){return 127995<=e&&e<=127999}ee._INSTANCE=null;const ne=" ";class re{constructor(e){this.confusableDictionary=e}static getInstance(e){return re.cache.get(Array.from(e))}static getLocales(){return re._locales.getValue()}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}n=re,re.ambiguousCharacterData=new r.o((()=>JSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,8218,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,8242,96,1370,96,1523,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71922,67,71913,67,65315,67,8557,67,8450,67,8493,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71919,87,71910,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,66293,90,71909,90,65338,90,8484,90,8488,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65297,49,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125],"_default":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"cs":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"es":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"fr":[65374,126,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"it":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ja":[8211,45,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65292,44,65307,59],"ko":[8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"pt-BR":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"ru":[65374,126,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65288,40,65289,41,65292,44,65307,59,65311,63],"zh-hans":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41],"zh-hant":[8211,45,65374,126,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65283,35,65307,59]}'))),re.cache=new class{constructor(e){this.computeFn=e,this.lastCache=void 0,this.lastArgKey=void 0}get(e){const t=JSON.stringify(e);return this.lastArgKey!==t&&(this.lastArgKey=t,this.lastCache=this.computeFn(e)),this.lastCache}}((e=>{function t(e){const t=new Map;for(let i=0;i!e.startsWith("_")&&e in r));0===s.length&&(s=["_default"]);for(const e of s)o=i(o,t(r[e]));const a=function(e,t){const i=new Map(e);for(const[e,n]of t)i.set(e,n);return i}(t(r._common),o);return new re(a)})),re._locales=new r.o((()=>Object.keys(re.ambiguousCharacterData.getValue()).filter((e=>!e.startsWith("_")))));class oe{static getRawData(){return JSON.parse("[9,10,11,12,13,32,127,160,173,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8203,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12288,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999]")}static getData(){return this._data||(this._data=new Set(oe.getRawData())),this._data}static isInvisibleCharacter(e){return oe.getData().has(e)}static get codePoints(){return oe.getData()}}oe._data=void 0},8401:(e,t,i)=>{"use strict";function n(e){return Array.isArray(e)}function r(e){return"string"==typeof e}function o(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function s(e){return"number"==typeof e&&!isNaN(e)}function a(e){return!!e&&"function"==typeof e[Symbol.iterator]}function l(e){return!0===e||!1===e}function c(e){return void 0===e}function h(e){return!d(e)}function d(e){return c(e)||null===e}function u(e,t){if(!e)throw new Error(t?`Unexpected type, expected '${t}'`:"Unexpected type")}function g(e){if(d(e))throw new Error("Assertion Failed: argument is undefined or null");return e}function f(e){return"function"==typeof e}function p(e,t){const i=Math.min(e.length,t.length);for(let n=0;nfunction(){const i=Array.prototype.slice.call(arguments,0);return t(e,i)};let n={};for(const t of e)n[t]=i(t);return n}function b(e){return null===e?void 0:e}function y(e,t="Unreachable"){throw new Error(t)}i.d(t,{$E:()=>_,$K:()=>h,D8:()=>p,HD:()=>r,IU:()=>v,Jp:()=>d,Kn:()=>o,TW:()=>a,cW:()=>g,f6:()=>b,hj:()=>s,jn:()=>l,kJ:()=>n,mf:()=>f,o8:()=>c,p_:()=>u,vE:()=>y})},5427:(e,t,i)=>{"use strict";function n(e){return e<0?0:e>255?255:0|e}function r(e){return e<0?0:e>4294967295?4294967295:0|e}i.d(t,{A:()=>r,K:()=>n})},666:(e,t,i)=>{"use strict";i.d(t,{o:()=>u,q:()=>v});var n=i(8721),r=i(1432);const o=/^\w[\w\d+.-]*$/,s=/^\//,a=/^\/\//;function l(e,t){if(!e.scheme&&t)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!o.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!s.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(a.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}const c="",h="/",d=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class u{constructor(e,t,i,n,r,o=!1){"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=function(e,t){return e||t?e:"file"}(e,o),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,i||c),this.query=n||c,this.fragment=r||c,l(this,o))}static isUri(e){return e instanceof u||!!e&&"string"==typeof e.authority&&"string"==typeof e.fragment&&"string"==typeof e.path&&"string"==typeof e.query&&"string"==typeof e.scheme&&"string"==typeof e.fsPath&&"function"==typeof e.with&&"function"==typeof e.toString}get fsPath(){return v(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:r,fragment:o}=e;return void 0===t?t=this.scheme:null===t&&(t=c),void 0===i?i=this.authority:null===i&&(i=c),void 0===n?n=this.path:null===n&&(n=c),void 0===r?r=this.query:null===r&&(r=c),void 0===o?o=this.fragment:null===o&&(o=c),t===this.scheme&&i===this.authority&&n===this.path&&r===this.query&&o===this.fragment?this:new f(t,i,n,r,o)}static parse(e,t=!1){const i=d.exec(e);return i?new f(i[2]||c,C(i[4]||c),C(i[5]||c),C(i[7]||c),C(i[9]||c),t):new f(c,c,c,c,c)}static file(e){let t=c;if(r.ED&&(e=e.replace(/\\/g,h)),e[0]===h&&e[1]===h){const i=e.indexOf(h,2);-1===i?(t=e.substring(2),e=h):(t=e.substring(2,i),e=e.substring(i)||h)}return new f("file",t,e,c,c)}static from(e){const t=new f(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return i=r.ED&&"file"===e.scheme?u.file(n.Ku.join(v(e,!0),...t)).path:n.KR.join(e.path,...t),e.with({path:i})}toString(e=!1){return b(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof u)return e;{const t=new f(e);return t._formatted=e.external,t._fsPath=e._sep===g?e.fsPath:null,t}}return e}}const g=r.ED?1:void 0;class f extends u{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=v(this,!1)),this._fsPath}toString(e=!1){return e?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=g),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const p={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function m(e,t){let i,n=-1;for(let r=0;r=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||45===o||46===o||95===o||126===o||t&&47===o)-1!==n&&(i+=encodeURIComponent(e.substring(n,r)),n=-1),void 0!==i&&(i+=e.charAt(r));else{void 0===i&&(i=e.substr(0,r));const t=p[o];void 0!==t?(-1!==n&&(i+=encodeURIComponent(e.substring(n,r)),n=-1),i+=t):-1===n&&(n=r)}}return-1!==n&&(i+=encodeURIComponent(e.substring(n))),void 0!==i?i:e}function _(e){let t;for(let i=0;i1&&"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)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,r.ED&&(i=i.replace(/\//g,"\\")),i}function b(e,t){const i=t?_:m;let n="",{scheme:r,authority:o,path:s,query:a,fragment:l}=e;if(r&&(n+=r,n+=":"),(o||"file"===r)&&(n+=h,n+=h),o){let e=o.indexOf("@");if(-1!==e){const t=o.substr(0,e);o=o.substr(e+1),e=t.indexOf(":"),-1===e?n+=i(t,!1):(n+=i(t.substr(0,e),!1),n+=":",n+=i(t.substr(e+1),!1)),n+="@"}o=o.toLowerCase(),e=o.indexOf(":"),-1===e?n+=i(o,!1):(n+=i(o.substr(0,e),!1),n+=o.substr(e))}if(s){if(s.length>=3&&47===s.charCodeAt(0)&&58===s.charCodeAt(2)){const e=s.charCodeAt(1);e>=65&&e<=90&&(s=`/${String.fromCharCode(e+32)}:${s.substr(3)}`)}else if(s.length>=2&&58===s.charCodeAt(1)){const e=s.charCodeAt(0);e>=65&&e<=90&&(s=`${String.fromCharCode(e+32)}:${s.substr(2)}`)}n+=i(s,!0)}return a&&(n+="?",n+=i(a,!1)),l&&(n+="#",n+=t?l:m(l,!1)),n}function y(e){try{return decodeURIComponent(e)}catch(t){return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}const w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,(e=>y(e))):e}},7746:(e,t,i)=>{"use strict";i.d(t,{Jq:()=>r,X5:()=>n,jG:()=>o});const n={ctrlCmd:!1,alt:!1};var r,o;!function(e){e[e.Blur=1]="Blur",e[e.Gesture=2]="Gesture",e[e.Other=3]="Other"}(r||(r={})),function(e){e[e.NONE=0]="NONE",e[e.FIRST=1]="FIRST",e[e.SECOND=2]="SECOND",e[e.LAST=3]="LAST"}(o||(o={})),new class{constructor(e){this.options=e}}},5552:(e,t,i)=>{"use strict";i.d(t,{H:()=>u});var n=i(158),r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,l={};((e,t,i,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of s(t))a.call(e,i)||"default"===i||r(e,i,{get:()=>t[i],enumerable:!(n=o(t,i))||n.enumerable})})(l,n);var c={},h={},d=class{static getOrCreate(e){return h[e]||(h[e]=new d(e)),h[e]}_languageId;_loadingTriggered;_lazyLoadPromise;_lazyLoadPromiseResolve;_lazyLoadPromiseReject;constructor(e){this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(((e,t)=>{this._lazyLoadPromiseResolve=e,this._lazyLoadPromiseReject=t}))}load(){return this._loadingTriggered||(this._loadingTriggered=!0,c[this._languageId].loader().then((e=>this._lazyLoadPromiseResolve(e)),(e=>this._lazyLoadPromiseReject(e)))),this._lazyLoadPromise}};function u(e){const t=e.id;c[t]=e,l.languages.register(e);const i=d.getOrCreate(t);l.languages.registerTokensProviderFactory(t,{create:async()=>(await i.load()).language}),l.languages.onLanguage(t,(async()=>{const e=await i.load();l.languages.setLanguageConfiguration(t,e.conf)}))}},4199:(e,t,i)=>{"use strict";i.r(t),(0,i(5552).H)({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:()=>i.e(3585).then(i.bind(i,3585))})},2136:(e,t,i)=>{"use strict";i.d(t,{N:()=>s});var n=i(6268),r=i(8626),o=i(4141);function s(e,t){e instanceof r.Z?(e.setFontFamily(t.getMassagedFontFamily(n.isSafari?o.hL.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)):(e.style.fontFamily=t.getMassagedFontFamily(n.isSafari?o.hL.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px")}},4534:(e,t,i)=>{"use strict";i.d(t,{I:()=>o});var n=i(5976),r=i(4669);class o extends n.JT{constructor(e,t){super(),this._onDidChange=this._register(new r.Q5),this.onDidChange=this._onDidChange.event,this._referenceDomElement=e,this._width=-1,this._height=-1,this._resizeObserver=null,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this._width}getHeight(){return this._height}startObserving(){!this._resizeObserver&&this._referenceDomElement&&(this._resizeObserver=new ResizeObserver((e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()})),this._resizeObserver.observe(this._referenceDomElement))}stopObserving(){this._resizeObserver&&(this._resizeObserver.disconnect(),this._resizeObserver=null)}observe(e){this.measureReferenceDomElement(!0,e)}measureReferenceDomElement(e,t){let i=0,n=0;t?(i=t.width,n=t.height):this._referenceDomElement&&(i=this._referenceDomElement.clientWidth,n=this._referenceDomElement.clientHeight),i=Math.max(5,i),n=Math.max(5,n),this._width===i&&this._height===n||(this._width=i,this._height=n,e&&this._onDidChange.fire())}}},7231:(e,t,i)=>{"use strict";i.d(t,{g:()=>g});var n=i(6268),r=i(4669),o=i(5976),s=i(2136);class a{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class l{constructor(e,t){this._bareFontInfo=e,this._requests=t,this._container=null,this._testElements=null}read(){this._createDomElements(),document.body.appendChild(this._container),this._readFromDomElements(),document.body.removeChild(this._container),this._container=null,this._testElements=null}_createDomElements(){const e=document.createElement("div");e.style.position="absolute",e.style.top="-50000px",e.style.width="50000px";const t=document.createElement("div");(0,s.N)(t,this._bareFontInfo),e.appendChild(t);const i=document.createElement("div");(0,s.N)(i,this._bareFontInfo),i.style.fontWeight="bold",e.appendChild(i);const n=document.createElement("div");(0,s.N)(n,this._bareFontInfo),n.style.fontStyle="italic",e.appendChild(n);const r=[];for(const e of this._requests){let o;0===e.type&&(o=t),2===e.type&&(o=i),1===e.type&&(o=n),o.appendChild(document.createElement("br"));const s=document.createElement("span");l._render(s,e),o.appendChild(s),r.push(s)}this._container=e,this._testElements=r}static _render(e,t){if(" "===t.chr){let t=" ";for(let e=0;e<8;e++)t+=t;e.innerText=t}else{let i=t.chr;for(let e=0;e<8;e++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e{this._evictUntrustedReadingsTimeout=-1,this._evictUntrustedReadings()}),5e3))}_evictUntrustedReadings(){const e=this._cache.getValues();let t=!1;for(const i of e)i.isTrusted||(t=!0,this._cache.remove(i));t&&this._onDidChange.fire()}readFontInfo(e){if(!this._cache.has(e)){let t=this._actualReadFontInfo(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new h.pR({pixelRatio:n.PixelRatio.value,fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,lineHeight:t.lineHeight,letterSpacing:t.letterSpacing,isMonospace:t.isMonospace,typicalHalfwidthCharacterWidth:Math.max(t.typicalHalfwidthCharacterWidth,5),typicalFullwidthCharacterWidth:Math.max(t.typicalFullwidthCharacterWidth,5),canUseHalfwidthRightwardsArrow:t.canUseHalfwidthRightwardsArrow,spaceWidth:Math.max(t.spaceWidth,5),middotWidth:Math.max(t.middotWidth,5),wsmiddotWidth:Math.max(t.wsmiddotWidth,5),maxDigitWidth:Math.max(t.maxDigitWidth,5)},!1)),this._writeToCache(e,t)}return this._cache.get(e)}_createRequest(e,t,i,n){const r=new a(e,t);return i.push(r),n&&n.push(r),r}_actualReadFontInfo(e){const t=[],i=[],r=this._createRequest("n",0,t,i),o=this._createRequest("m",0,t,null),s=this._createRequest(" ",0,t,i),a=this._createRequest("0",0,t,i),d=this._createRequest("1",0,t,i),u=this._createRequest("2",0,t,i),g=this._createRequest("3",0,t,i),f=this._createRequest("4",0,t,i),p=this._createRequest("5",0,t,i),m=this._createRequest("6",0,t,i),_=this._createRequest("7",0,t,i),v=this._createRequest("8",0,t,i),b=this._createRequest("9",0,t,i),y=this._createRequest("→",0,t,i),w=this._createRequest("→",0,t,null),C=this._createRequest("·",0,t,i),x=this._createRequest(String.fromCharCode(11825),0,t,null),S="|/-_ilm%";for(let e=0,n=S.length;e.001){L=!1;break}}let E=!0;return L&&w.width!==N&&(E=!1),w.width>y.width&&(E=!1),new h.pR({pixelRatio:n.PixelRatio.value,fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:L,typicalHalfwidthCharacterWidth:r.width,typicalFullwidthCharacterWidth:o.width,canUseHalfwidthRightwardsArrow:E,spaceWidth:s.width,middotWidth:C.width,wsmiddotWidth:x.width,maxDigitWidth:k},!0)}}class u{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map((e=>this._values[e]))}}const g=new d},7940:(e,t,i)=>{"use strict";i.d(t,{n:()=>r});var n=i(4669);const r=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new n.Q5,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(e){this._tabFocus!==e&&(this._tabFocus=e,this._onDidChangeTabFocus.fire(this._tabFocus))}}},5715:(e,t,i)=>{"use strict";i.d(t,{Fz:()=>_,Nl:()=>p,RA:()=>f,Tj:()=>b,pd:()=>n});var n,r=i(6268),o=i(5321),s=i(9069),a=i(5393),l=i(4669),c=i(5976),h=i(1170),d=i(5924),u=i(5887),g=i(3860);!function(e){e.Tap="-monaco-textarea-synthetic-tap"}(n||(n={}));const f={forceCopyWithSyntaxHighlighting:!1};class p{constructor(){this._lastState=null}set(e,t){this._lastState={lastCopiedValue:e,data:t}}get(e){return this._lastState&&this._lastState.lastCopiedValue===e?this._lastState.data:(this._lastState=null,null)}}p.INSTANCE=new p;class m{constructor(){this._lastTypeTextLength=0}handleCompositionUpdate(e){const t={text:e=e||"",replacePrevCharCnt:this._lastTypeTextLength,replaceNextCharCnt:0,positionDelta:0};return this._lastTypeTextLength=e.length,t}}class _ extends c.JT{constructor(e,t,i,n){super(),this._host=e,this._textArea=t,this._OS=i,this._browser=n,this._onFocus=this._register(new l.Q5),this.onFocus=this._onFocus.event,this._onBlur=this._register(new l.Q5),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new l.Q5),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new l.Q5),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new l.Q5),this.onCut=this._onCut.event,this._onPaste=this._register(new l.Q5),this.onPaste=this._onPaste.event,this._onType=this._register(new l.Q5),this.onType=this._onType.event,this._onCompositionStart=this._register(new l.Q5),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new l.Q5),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new l.Q5),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new l.Q5),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._asyncTriggerCut=this._register(new a.pY((()=>this._onCut.fire()),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new a.pY((()=>this.writeScreenReaderContent("asyncFocusGain")),0)),this._textAreaState=u.un.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._currentComposition=null;let r=null;this._register(this._textArea.onKeyDown((e=>{const t=new s.y(e);(109===t.keyCode||this._currentComposition&&1===t.keyCode)&&t.stopPropagation(),t.equals(9)&&t.preventDefault(),r=t,this._onKeyDown.fire(t)}))),this._register(this._textArea.onKeyUp((e=>{const t=new s.y(e);this._onKeyUp.fire(t)}))),this._register(this._textArea.onCompositionStart((e=>{u.al&&console.log("[compositionstart]",e);const t=new m;if(this._currentComposition)this._currentComposition=t;else{if(this._currentComposition=t,2===this._OS&&r&&r.equals(109)&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===e.data&&("ArrowRight"===r.code||"ArrowLeft"===r.code))return u.al&&console.log("[compositionstart] Handling long press case on macOS + arrow key",e),t.handleCompositionUpdate("x"),void this._onCompositionStart.fire({data:e.data});this._browser.isAndroid,this._onCompositionStart.fire({data:e.data})}}))),this._register(this._textArea.onCompositionUpdate((e=>{u.al&&console.log("[compositionupdate]",e);const t=this._currentComposition;if(!t)return;if(this._browser.isAndroid){const t=u.un.readFromTextArea(this._textArea),i=u.un.deduceAndroidCompositionInput(this._textAreaState,t);return this._textAreaState=t,this._onType.fire(i),void this._onCompositionUpdate.fire(e)}const i=t.handleCompositionUpdate(e.data);this._textAreaState=u.un.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionUpdate.fire(e)}))),this._register(this._textArea.onCompositionEnd((e=>{u.al&&console.log("[compositionend]",e);const t=this._currentComposition;if(!t)return;if(this._currentComposition=null,this._browser.isAndroid){const e=u.un.readFromTextArea(this._textArea),t=u.un.deduceAndroidCompositionInput(this._textAreaState,e);return this._textAreaState=e,this._onType.fire(t),void this._onCompositionEnd.fire()}const i=t.handleCompositionUpdate(e.data);this._textAreaState=u.un.readFromTextArea(this._textArea),this._onType.fire(i),this._onCompositionEnd.fire()}))),this._register(this._textArea.onInput((e=>{if(u.al&&console.log("[input]",e),this._textArea.setIgnoreSelectionChangeTime("received input event"),this._currentComposition)return;const t=u.un.readFromTextArea(this._textArea),i=u.un.deduceInput(this._textAreaState,t,2===this._OS);0===i.replacePrevCharCnt&&1===i.text.length&&d.ZG(i.text.charCodeAt(0))||(this._textAreaState=t,""===i.text&&0===i.replacePrevCharCnt&&0===i.replaceNextCharCnt&&0===i.positionDelta||this._onType.fire(i))}))),this._register(this._textArea.onCut((e=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(e),this._asyncTriggerCut.schedule()}))),this._register(this._textArea.onCopy((e=>{this._ensureClipboardGetsEditorSelection(e)}))),this._register(this._textArea.onPaste((e=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),e.preventDefault(),!e.clipboardData)return;let[t,i]=v.getTextData(e.clipboardData);t&&(i=i||p.INSTANCE.get(t),this._onPaste.fire({text:t,metadata:i}))}))),this._register(this._textArea.onFocus((()=>{const e=this._hasFocus;this._setHasFocus(!0),this._browser.isSafari&&!e&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()}))),this._register(this._textArea.onBlur((()=>{this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)}))),this._register(this._textArea.onSyntheticTap((()=>{this._browser.isAndroid&&this._currentComposition&&(this._currentComposition=null,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())})))}_installSelectionChangeListener(){let e=0;return o.nm(document,"selectionchange",(t=>{if(!this._hasFocus)return;if(this._currentComposition)return;if(!this._browser.isChrome)return;const i=Date.now(),n=i-e;if(e=i,n<5)return;const r=i-this._textArea.getIgnoreSelectionChangeTime();if(this._textArea.resetSelectionChangeTime(),r<100)return;if(!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const s=this._textArea.getSelectionStart(),a=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===s&&this._textAreaState.selectionEnd===a)return;const l=this._textAreaState.deduceEditorPosition(s),c=this._host.deduceModelPosition(l[0],l[1],l[2]),h=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(h[0],h[1],h[2]),u=new g.Y(c.lineNumber,c.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(u)}))}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){this._setHasFocus(this._textArea.hasFocus())}_setHasFocus(e){this._hasFocus!==e&&(this._hasFocus=e,this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null),this._hasFocus&&(this._selectionChangeListener=this._installSelectionChangeListener()),this._hasFocus&&this.writeScreenReaderContent("focusgain"),this._hasFocus?this._onFocus.fire():this._onBlur.fire())}_setAndWriteTextAreaState(e,t){this._hasFocus||(t=t.collapseSelection()),t.writeToTextArea(e,this._textArea,this._hasFocus),this._textAreaState=t}writeScreenReaderContent(e){this._currentComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};p.INSTANCE.set(this._browser.isFirefox?t.text.replace(/\r\n/g,"\n"):t.text,i),e.preventDefault(),e.clipboardData&&v.setTextData(e.clipboardData,t.text,t.html,i)}}class v{static getTextData(e){const t=e.getData(h.v.text);let i=null;const n=e.getData("vscode-editor-data");if("string"==typeof n)try{i=JSON.parse(n),1!==i.version&&(i=null)}catch(e){}return[t,i]}static setTextData(e,t,i,n){e.setData(h.v.text,t),"string"==typeof i&&e.setData("text/html",i),e.setData("vscode-editor-data",JSON.stringify(n))}}class b extends c.JT{constructor(e){super(),this._actual=e,this.onKeyDown=this._register(o.IC(this._actual,"keydown")).event,this.onKeyUp=this._register(o.IC(this._actual,"keyup")).event,this.onCompositionStart=this._register(o.IC(this._actual,"compositionstart")).event,this.onCompositionUpdate=this._register(o.IC(this._actual,"compositionupdate")).event,this.onCompositionEnd=this._register(o.IC(this._actual,"compositionend")).event,this.onInput=this._register(o.IC(this._actual,"input")).event,this.onCut=this._register(o.IC(this._actual,"cut")).event,this.onCopy=this._register(o.IC(this._actual,"copy")).event,this.onPaste=this._register(o.IC(this._actual,"paste")).event,this.onFocus=this._register(o.IC(this._actual,"focus")).event,this.onBlur=this._register(o.IC(this._actual,"blur")).event,this._onSyntheticTap=this._register(new l.Q5),this.onSyntheticTap=this._onSyntheticTap.event,this._ignoreSelectionChangeTime=0,this._register(o.nm(this._actual,n.Tap,(()=>this._onSyntheticTap.fire())))}hasFocus(){const e=o.Ay(this._actual);return e?e.activeElement===this._actual:!!o.Uw(this._actual)&&document.activeElement===this._actual}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.value}setValue(e,t){const i=this._actual;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return"backward"===this._actual.selectionDirection?this._actual.selectionEnd:this._actual.selectionStart}getSelectionEnd(){return"backward"===this._actual.selectionDirection?this._actual.selectionStart:this._actual.selectionEnd}setSelectionRange(e,t,i){const n=this._actual;let s=null;const a=o.Ay(n);s=a?a.activeElement:document.activeElement;const l=s===n,c=n.selectionStart,h=n.selectionEnd;if(l&&c===t&&h===i)r.isFirefox&&window.parent!==window&&n.focus();else{if(l)return this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),void(r.isFirefox&&window.parent!==window&&n.focus());try{const e=o.vL(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),o._0(n,e)}catch(e){}}}}},5887:(e,t,i)=>{"use strict";i.d(t,{al:()=>s,ee:()=>l,un:()=>a});var n=i(5924),r=i(187),o=i(4314);const s=!1;class a{constructor(e,t,i,n,r){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=r}toString(){return`[ <${this.value}>, selectionStart: ${this.selectionStart}, selectionEnd: ${this.selectionEnd}]`}static readFromTextArea(e){return new a(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new a(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){s&&console.log(`writeToTextArea ${e}: ${this.toString()}`),t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const t=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,t,-1)}if(e>=this.selectionEnd){const t=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,t,1)}const t=this.value.substring(this.selectionStart,e);if(-1===t.indexOf(String.fromCharCode(8230)))return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,r=-1;for(;-1!==(r=t.indexOf("\n",r+1));)n++;return[e,i*t.length,n]}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};s&&(console.log("------------------------deduceInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`));const r=Math.min(n.Mh(e.value,t.value),e.selectionStart,t.selectionStart),o=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd,t.value.length-t.selectionEnd),a=e.value.substring(r,e.value.length-o),l=t.value.substring(r,t.value.length-o),c=e.selectionStart-r,h=e.selectionEnd-r,d=t.selectionStart-r,u=t.selectionEnd-r;if(s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${a}>, selectionStart: ${c}, selectionEnd: ${h}`),console.log(`AFTER DIFFING CURRENT STATE: <${l}>, selectionStart: ${d}, selectionEnd: ${u}`)),d===u){const t=e.selectionStart-r;return s&&console.log(`REMOVE PREVIOUS: ${t} chars`),{text:l,replacePrevCharCnt:t,replaceNextCharCnt:0,positionDelta:0}}return{text:l,replacePrevCharCnt:h-c,replaceNextCharCnt:0,positionDelta:0}}static deduceAndroidCompositionInput(e,t){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};if(s&&(console.log("------------------------deduceAndroidCompositionInput"),console.log(`PREVIOUS STATE: ${e.toString()}`),console.log(`CURRENT STATE: ${t.toString()}`)),e.value===t.value)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:t.selectionEnd-e.selectionEnd};const i=Math.min(n.Mh(e.value,t.value),e.selectionEnd),r=Math.min(n.P1(e.value,t.value),e.value.length-e.selectionEnd),o=e.value.substring(i,e.value.length-r),a=t.value.substring(i,t.value.length-r),l=e.selectionStart-i,c=e.selectionEnd-i,h=t.selectionStart-i,d=t.selectionEnd-i;return s&&(console.log(`AFTER DIFFING PREVIOUS STATE: <${o}>, selectionStart: ${l}, selectionEnd: ${c}`),console.log(`AFTER DIFFING CURRENT STATE: <${a}>, selectionStart: ${h}, selectionEnd: ${d}`)),{text:a,replacePrevCharCnt:c,replaceNextCharCnt:o.length-c,positionDelta:d-a.length}}}a.EMPTY=new a("",0,0,null,null);class l{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,r=i+t;return new o.e(n,1,r+1,1)}static fromEditorSelection(e,t,i,n,s){const c=l._getPageOfLine(i.startLineNumber,n),h=l._getRangeForPage(c,n),d=l._getPageOfLine(i.endLineNumber,n),u=l._getRangeForPage(d,n),g=h.intersectRanges(new o.e(1,1,i.startLineNumber,i.startColumn));let f=t.getValueInRange(g,1);const p=t.getLineCount(),m=t.getLineMaxColumn(p),_=u.intersectRanges(new o.e(i.endLineNumber,i.endColumn,p,m));let v,b=t.getValueInRange(_,1);if(c===d||c+1===d)v=t.getValueInRange(i,1);else{const e=h.intersectRanges(i),n=u.intersectRanges(i);v=t.getValueInRange(e,1)+String.fromCharCode(8230)+t.getValueInRange(n,1)}if(s){const e=500;f.length>e&&(f=f.substring(f.length-e,f.length)),b.length>e&&(b=b.substring(0,e)),v.length>2*e&&(v=v.substring(0,e)+String.fromCharCode(8230)+v.substring(v.length-e,v.length))}return new a(f+v+b,f.length,f.length+v.length,new r.L(i.startLineNumber,i.startColumn),new r.L(i.endLineNumber,i.endColumn))}}},9317:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CoreEditingCommands:()=>N,CoreEditorCommand:()=>C,CoreNavigationCommands:()=>p,EditorScroll_:()=>g,RevealLine_:()=>f});var n=i(3580),r=i(6268),o=i(8401),s=i(1588),a=i(6830),l=i(1640),c=i(5343),h=i(187),d=i(4314);class u{static columnSelect(e,t,i,n,r,o){const s=Math.abs(r-i)+1,a=i>r,l=n>o,u=no)continue;if(_n)continue;if(m0&&n--,u.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,n)}static columnSelectRight(e,t,i){let n=0;const r=Math.min(i.fromViewLineNumber,i.toViewLineNumber),o=Math.max(i.fromViewLineNumber,i.toViewLineNumber);for(let i=r;i<=o;i++){const r=t.getLineMaxColumn(i),o=e.visibleColumnFromColumn(t,new h.L(i,r));n=Math.max(n,o)}let s=i.toViewVisualColumn;return s{const i=e.get(l.$).getFocusedCodeEditor();return!(!i||!i.hasTextFocus())&&this._runEditorCommand(e,i,t)})),e.addImplementation(1e3,"generic-dom-input-textarea",((e,t)=>{const i=document.activeElement;return!!(i&&["input","textarea"].indexOf(i.tagName.toLowerCase())>=0)&&(this.runDOMCommand(),!0)})),e.addImplementation(0,"generic-dom",((e,t)=>{const i=e.get(l.$).getActiveCodeEditor();return!!i&&(i.focus(),this._runEditorCommand(e,i,t))}))}_runEditorCommand(e,t,i){return this.runEditorCommand(e,t,i)||!0}}!function(e){class t extends C{constructor(e){super(e),this._minimalReveal=e.minimalReveal,this._inSelectionMode=e.inSelectionMode}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[_.P.moveTo(e,e.getPrimaryCursorState(),this._inSelectionMode,t.position,t.viewPosition)])&&e.revealPrimaryCursor(t.source,!0,this._minimalReveal)}}e.MoveTo=(0,a.fK)(new t({id:"_moveTo",minimalReveal:!0,inSelectionMode:!1,precondition:void 0})),e.MoveToSelect=(0,a.fK)(new t({id:"_moveToSelect",minimalReveal:!1,inSelectionMode:!0,precondition:void 0}));class i extends C{runCoreEditorCommand(e,t){e.model.pushStackElement();const i=this._getColumnSelectResult(e,e.getPrimaryCursorState(),e.getCursorColumnSelectData(),t);e.setCursorStates(t.source,3,i.viewStates.map((e=>c.Vi.fromViewState(e)))),e.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:i.fromLineNumber,fromViewVisualColumn:i.fromVisualColumn,toViewLineNumber:i.toLineNumber,toViewVisualColumn:i.toVisualColumn}),i.reversed?e.revealTopMostCursor(t.source):e.revealBottomMostCursor(t.source)}}e.ColumnSelect=(0,a.fK)(new class extends i{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(e,t,i,n){const r=e.model.validatePosition(n.position),o=e.coordinatesConverter.validateViewPosition(new h.L(n.viewPosition.lineNumber,n.viewPosition.column),r),s=n.doColumnSelect?i.fromViewLineNumber:o.lineNumber,a=n.doColumnSelect?i.fromViewVisualColumn:n.mouseColumn-1;return u.columnSelect(e.cursorConfig,e,s,a,o.lineNumber,n.mouseColumn-1)}}),e.CursorColumnSelectLeft=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectLeft(e.cursorConfig,e,i)}}),e.CursorColumnSelectRight=(0,a.fK)(new class extends i{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(e,t,i,n){return u.columnSelectRight(e.cursorConfig,e,i)}});class o extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectUp(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectUp=(0,a.fK)(new o({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3600,linux:{primary:0}}})),e.CursorColumnSelectPageUp=(0,a.fK)(new o({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3595,linux:{primary:0}}}));class l extends i{constructor(e){super(e),this._isPaged=e.isPaged}_getColumnSelectResult(e,t,i,n){return u.columnSelectDown(e.cursorConfig,e,i,this._isPaged)}}e.CursorColumnSelectDown=(0,a.fK)(new l({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3602,linux:{primary:0}}})),e.CursorColumnSelectPageDown=(0,a.fK)(new l({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:3596,linux:{primary:0}}}));class p extends C{constructor(){super({id:"cursorMove",precondition:void 0,description:_.N.description})}runCoreEditorCommand(e,t){const i=_.N.parse(t);i&&this._runCursorMove(e,t.source,i)}_runCursorMove(e,t,i){e.model.pushStackElement(),e.setCursorStates(t,3,p._move(e,e.getCursorStates(),i)),e.revealPrimaryCursor(t,!0)}static _move(e,t,i){const n=i.select,r=i.value;switch(i.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return _.P.simpleMove(e,t,i.direction,n,r,i.unit);case 11:case 13:case 12:case 14:return _.P.viewportMove(e,t,i.direction,n,r);default:return null}}}e.CursorMoveImpl=p,e.CursorMove=(0,a.fK)(new p);class m extends C{constructor(e){super(e),this._staticArgs=e.args}runCoreEditorCommand(e,t){let i=this._staticArgs;-1===this._staticArgs.value&&(i={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:t.pageSize||e.cursorConfig.pageSize}),e.model.pushStackElement(),e.setCursorStates(t.source,3,_.P.simpleMove(e,e.getCursorStates(),i.direction,i.select,i.value,i.unit)),e.revealPrimaryCursor(t.source,!0)}}e.CursorLeft=(0,a.fK)(new m({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),e.CursorLeftSelect=(0,a.fK)(new m({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1039}})),e.CursorRight=(0,a.fK)(new m({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),e.CursorRightSelect=(0,a.fK)(new m({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1041}})),e.CursorUp=(0,a.fK)(new m({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),e.CursorUpSelect=(0,a.fK)(new m({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),e.CursorPageUp=(0,a.fK)(new m({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:11}})),e.CursorPageUpSelect=(0,a.fK)(new m({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1035}})),e.CursorDown=(0,a.fK)(new m({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),e.CursorDownSelect=(0,a.fK)(new m({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),e.CursorPageDown=(0,a.fK)(new m({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:12}})),e.CursorPageDownSelect=(0,a.fK)(new m({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1036}})),e.CreateCursor=(0,a.fK)(new class extends C{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(e,t){let i;i=t.wholeLine?_.P.line(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition):_.P.moveTo(e,e.getPrimaryCursorState(),!1,t.position,t.viewPosition);const n=e.getCursorStates();if(n.length>1){const r=i.modelState?i.modelState.position:null,o=i.viewState?i.viewState.position:null;for(let i=0,s=n.length;io&&(r=o);const s=new d.e(r,1,r,e.model.getLineMaxColumn(r));let a=0;if(i.at)switch(i.at){case f.RawAtArgument.Top:a=3;break;case f.RawAtArgument.Center:a=1;break;case f.RawAtArgument.Bottom:a=4}const l=e.coordinatesConverter.convertModelRangeToViewRange(s);e.revealRange(t.source,!1,l,a,0)}}),e.SelectAll=new class extends x{constructor(){super(a.Sq)}runDOMCommand(){r.isFirefox&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditorCommand(n,i)}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates("keyboard",3,[_.P.selectAll(e,e.getPrimaryCursorState())])}},e.SetSelection=(0,a.fK)(new class extends C{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(e,t){e.model.pushStackElement(),e.setCursorStates(t.source,3,[c.Vi.fromModelSelection(t.selection)])}})}(p||(p={}));const S=y.Ao.and(b.u.textInputFocus,b.u.columnSelection);function k(e,t){w.W.registerKeybindingRule({id:e,primary:t,when:S,weight:1})}function L(e){return e.register(),e}var N;k(p.CursorColumnSelectLeft.id,1039),k(p.CursorColumnSelectRight.id,1041),k(p.CursorColumnSelectUp.id,1040),k(p.CursorColumnSelectPageUp.id,1035),k(p.CursorColumnSelectDown.id,1042),k(p.CursorColumnSelectPageDown.id,1036),function(e){class t extends a._l{runEditorCommand(e,t,i){const n=t._getViewModel();n&&this.runCoreEditingCommand(t,n,i||{})}}e.CoreEditingCommand=t,e.LineBreakInsert=(0,a.fK)(new class extends t{constructor(){super({id:"lineBreakInsert",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.lineBreakInsert(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection))))}}),e.Outdent=(0,a.fK)(new class extends t{constructor(){super({id:"outdent",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:y.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.outdent(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.Tab=(0,a.fK)(new class extends t{constructor(){super({id:"tab",precondition:b.u.writable,kbOpts:{weight:0,kbExpr:y.Ao.and(b.u.editorTextFocus,b.u.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(e,t,i){e.pushUndoStop(),e.executeCommands(this.id,v.u.tab(t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)))),e.pushUndoStop()}}),e.DeleteLeft=(0,a.fK)(new class extends t{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(e,t,i){const[n,r]=m.A.deleteLeft(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)),t.getCursorAutoClosedCharacters());n&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(2)}}),e.DeleteRight=(0,a.fK)(new class extends t{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:0,kbExpr:b.u.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(e,t,i){const[n,r]=m.A.deleteRight(t.getPrevEditOperationType(),t.cursorConfig,t.model,t.getCursorStates().map((e=>e.modelState.selection)));n&&e.pushUndoStop(),e.executeCommands(this.id,r),t.setPrevEditOperationType(3)}}),e.Undo=new class extends x{constructor(){super(a.n_)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().undo()}},e.Redo=new class extends x{constructor(){super(a.kz)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(e,t,i){if(t.hasModel()&&!0!==t.getOption(81))return t.getModel().redo()}}}(N||(N={}));class E extends a.mY{constructor(e,t,i){super({id:e,precondition:void 0,description:i}),this._handlerId=t}runCommand(e,t){const i=e.get(l.$).getFocusedCodeEditor();i&&i.trigger("keyboard",this._handlerId,t)}}function D(e,t){L(new E("default:"+e,e)),L(new E(e,e,t))}D("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]}),D("replacePreviousChar"),D("compositionType"),D("compositionStart"),D("compositionEnd"),D("paste"),D("cut")},5520:(e,t,i)=>{"use strict";i.d(t,{CL:()=>r,Pi:()=>s,QI:()=>o});var n=i(6518);function r(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.ICodeEditor}function o(e){return!(!e||"function"!=typeof e.getEditorType)&&e.getEditorType()===n.g.IDiffEditor}function s(e){return r(e)?e:o(e)?e.getModifiedEditor():null}},9994:(e,t,i)=>{"use strict";i.d(t,{N5:()=>m,Pp:()=>f,YN:()=>c,gy:()=>p,iB:()=>v,kG:()=>g,rU:()=>h,t7:()=>b,tC:()=>_});var n=i(5321),r=i(7974),o=i(3938),s=i(5393),a=i(5976),l=i(3910);class c{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new h(this.x-n.DI.scrollX,this.y-n.DI.scrollY)}}class h{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new c(this.clientX+n.DI.scrollX,this.clientY+n.DI.scrollY)}}class d{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}class u{constructor(e,t){this.x=e,this.y=t,this._positionRelativeToEditorBrand=void 0}}function g(e){const t=n.i(e);return new d(t.left,t.top,t.width,t.height)}function f(e,t,i){const n=t.width/e.offsetWidth,r=t.height/e.offsetHeight,o=(i.x-t.x)/n,s=(i.y-t.y)/r;return new u(o,s)}class p extends o.n{constructor(e,t){super(e),this._editorMouseEventBrand=void 0,this.pos=new c(this.posx,this.posy),this.editorPos=g(t),this.relativePos=f(t,this.editorPos,this.pos)}}class m{constructor(e){this._editorViewDomNode=e}_create(e){return new p(e,this._editorViewDomNode)}onContextMenu(e,t){return n.nm(e,"contextmenu",(e=>{t(this._create(e))}))}onMouseUp(e,t){return n.nm(e,"mouseup",(e=>{t(this._create(e))}))}onMouseDown(e,t){return n.nm(e,"mousedown",(e=>{t(this._create(e))}))}onMouseLeave(e,t){return n.j_(e,(e=>{t(this._create(e))}))}onMouseMoveThrottled(e,t,i,r){return n.Y_(e,"mousemove",t,((e,t)=>i(e,this._create(t))),r)}}class _{constructor(e){this._editorViewDomNode=e}_create(e){return new p(e,this._editorViewDomNode)}onPointerUp(e,t){return n.nm(e,"pointerup",(e=>{t(this._create(e))}))}onPointerDown(e,t){return n.nm(e,"pointerdown",(e=>{t(this._create(e))}))}onPointerLeave(e,t){return n.RE(e,(e=>{t(this._create(e))}))}onPointerMoveThrottled(e,t,i,r){return n.Y_(e,"pointermove",t,((e,t)=>i(e,this._create(t))),r)}}class v extends a.JT{constructor(e){super(),this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new r.Z),this._keydownListener=null}startMonitoring(e,t,i,r,o){this._keydownListener=n.mu(document,"keydown",(e=>{e.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,e.browserEvent)}),!0),this._globalMouseMoveMonitor.startMonitoring(e,t,((e,t)=>i(e,new p(t,this._editorViewDomNode))),r,(e=>{this._keydownListener.dispose(),o(e)}))}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class b{constructor(e){this._editor=e,this._instanceId=++b._idPool,this._counter=0,this._rules=new Map,this._garbageCollectionScheduler=new s.pY((()=>this.garbageCollect()),1e3)}createClassNameRef(e){const t=this.getOrCreateRule(e);return t.increaseRefCount(),{className:t.className,dispose:()=>{t.decreaseRefCount(),this._garbageCollectionScheduler.schedule()}}}getOrCreateRule(e){const t=this.computeUniqueKey(e);let i=this._rules.get(t);if(!i){const r=this._counter++;i=new y(t,`dyn-rule-${this._instanceId}-${r}`,n.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0,e),this._rules.set(t,i)}return i}computeUniqueKey(e){return JSON.stringify(e)}garbageCollect(){for(const e of this._rules.values())e.hasReferences()||(this._rules.delete(e.key),e.dispose())}}b._idPool=0;class y{constructor(e,t,i,r){this.key=e,this.className=t,this.properties=r,this._referenceCount=0,this._styleElement=n.dS(i),this._styleElement.textContent=this.getCssText(this.className,this.properties)}getCssText(e,t){let i=`.${e} {`;for(const e in t){const n=t[e];let r;r="object"==typeof n?`var(${(0,l.QO2)(n.id)})`:n,i+=`\n\t${w(e)}: ${r};`}return i+="\n}",i}dispose(){this._styleElement.remove()}increaseRefCount(){this._referenceCount++}decreaseRefCount(){this._referenceCount--}hasReferences(){return this._referenceCount>0}}function w(e){return e.replace(/(^[A-Z])/,(([e])=>e.toLowerCase())).replace(/([A-Z])/g,(([e])=>`-${e.toLowerCase()}`))}},6830:(e,t,i)=>{"use strict";i.d(t,{AJ:()=>y,QG:()=>D,Qr:()=>N,R6:()=>x,Sq:()=>R,Uc:()=>n,_K:()=>A,_l:()=>C,fK:()=>L,jY:()=>S,kz:()=>O,mY:()=>b,n_:()=>M,rn:()=>E,sb:()=>k});var n,r=i(3580),o=i(666),s=i(1640),a=i(187),l=i(3733),c=i(8216),h=i(4144),d=i(4565),u=i(8819),g=i(2065),f=i(9989),p=i(9872),m=i(829),_=i(8401),v=i(3557);class b{constructor(e){this.id=e.id,this.precondition=e.precondition,this._kbOpts=e.kbOpts,this._menuOpts=e.menuOpts,this._description=e.description}register(){if(Array.isArray(this._menuOpts)?this._menuOpts.forEach(this._registerMenuItem,this):this._menuOpts&&this._registerMenuItem(this._menuOpts),this._kbOpts){const e=Array.isArray(this._kbOpts)?this._kbOpts:[this._kbOpts];for(const t of e){let e=t.kbExpr;this.precondition&&(e=e?u.Ao.and(e,this.precondition):this.precondition);const i={id:this.id,weight:t.weight,args:t.args,when:e,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};f.W.registerKeybindingRule(i)}}d.P0.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){h.BH.appendMenuItem(e.menuId,{group:e.group,command:{id:this.id,title:e.title,icon:e.icon,precondition:this.precondition},when:e.when,order:e.order})}}class y extends b{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort(((e,t)=>t.priority-e.priority)),{dispose:()=>{for(let e=0;e{if(e.get(u.i6).contextMatchesRules((0,_.f6)(this.precondition)))return this.runEditorCommand(e,n,t)}))}}class x extends C{constructor(e){super(x.convertOptions(e)),this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;function i(t){return t.menuId||(t.menuId=h.eH.EditorContext),t.title||(t.title=e.label),t.when=u.Ao.and(e.precondition,t.when),t}return t=Array.isArray(e.menuOpts)?e.menuOpts:e.menuOpts?[e.menuOpts]:[],Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(m.b).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class S extends x{constructor(){super(...arguments),this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort(((e,t)=>t[0]-e[0])),{dispose:()=>{for(let e=0;enew Promise(((r,o)=>{try{r(n.invokeFunction(t,e.object.textEditorModel,a.L.lift(s),i.slice(2)))}catch(e){o(e)}})).finally((()=>{e.dispose()}))))}))}function L(e){return T.INSTANCE.registerEditorCommand(e),e}function N(e){const t=new e;return T.INSTANCE.registerEditorAction(t),t}function E(e){return T.INSTANCE.registerEditorAction(e),e}function D(e){T.INSTANCE.registerEditorAction(e)}function A(e,t){T.INSTANCE.registerEditorContribution(e,t)}!function(e){e.getEditorCommand=function(e){return T.INSTANCE.getEditorCommand(e)},e.getEditorActions=function(){return T.INSTANCE.getEditorActions()},e.getEditorContributions=function(){return T.INSTANCE.getEditorContributions()},e.getSomeEditorContributions=function(e){return T.INSTANCE.getEditorContributions().filter((t=>e.indexOf(t.id)>=0))},e.getDiffEditorContributions=function(){return T.INSTANCE.getDiffEditorContributions()}}(n||(n={}));class T{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}function I(e){return e.register(),e}T.INSTANCE=new T,p.B.add("editor.contributions",T.INSTANCE);const M=I(new y({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:r.N({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:h.eH.CommandPalette,group:"",title:r.N("undo","Undo"),order:1}]}));I(new w(M,{id:"default:undo",precondition:void 0}));const O=I(new y({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"1_do",title:r.N({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:h.eH.CommandPalette,group:"",title:r.N("redo","Redo"),order:1}]}));I(new w(O,{id:"default:redo",precondition:void 0}));const R=I(new y({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:h.eH.MenubarSelectionMenu,group:"1_basic",title:r.N({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:h.eH.CommandPalette,group:"",title:r.N("selectAll","Select All"),order:1}]}))},6007:(e,t,i)=>{"use strict";i.d(t,{Gl:()=>l,fo:()=>a,vu:()=>s});var n=i(2065),r=i(666),o=i(8401);const s=(0,n.yh)("IWorkspaceEditService");class a{constructor(e){this.metadata=e}static convert(e){return e.edits.map((e=>{if(t=e,(0,o.Kn)(t)&&r.o.isUri(t.resource)&&(0,o.Kn)(t.edit))return new l(e.resource,e.edit,e.modelVersionId,e.metadata);var t;if(function(e){return(0,o.Kn)(e)&&(Boolean(e.newUri)||Boolean(e.oldUri))}(e))return new c(e.oldUri,e.newUri,e.options,e.metadata);throw new Error("Unsupported edit")}))}}class l extends a{constructor(e,t,i,n){super(n),this.resource=e,this.textEdit=t,this.versionId=i}}class c extends a{constructor(e,t,i,n){super(n),this.oldResource=e,this.newResource=t,this.options=i}}},1640:(e,t,i)=>{"use strict";i.d(t,{$:()=>n});const n=(0,i(2065).yh)("codeEditorService")},3407:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});class n{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(0!==e.getScrollTop()){const n=e.getVisibleRanges();if(n.length>0){t=n[0].getStartPosition();const r=e.getTopForPosition(t.lineNumber,t.column);i=e.getScrollTop()-r}}return new n(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){const t=e.getPosition();if(!this._cursorPosition||!t)return;const i=e.getTopForLineNumber(t.lineNumber)-e.getTopForLineNumber(this._cursorPosition.lineNumber);e.setScrollTop(e.getScrollTop()+i)}}},6505:(e,t,i)=>{"use strict";i.d(t,{Gm:()=>no});var n=i(6357),r=i(6830);let o=class{constructor(e,t){}dispose(){}};var s,a;o.ID="editor.contrib.markerDecorations",o=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(s=1,a=n.i,function(e,t){a(e,t,s)})],o),(0,r._K)(o.ID,o);var l=i(3379),c=i.n(l),h=i(7795),d=i.n(h),u=i(569),g=i.n(u),f=i(3565),p=i.n(f),m=i(9216),_=i.n(m),v=i(4589),b=i.n(v),y=i(9783),w={};w.styleTagTransform=b(),w.setAttributes=p(),w.insert=g().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=_(),c()(y.Z,w),y.Z&&y.Z.locals&&y.Z.locals;var C=i(3580),x=i(5321),S=i(7301),k=i(4669),L=i(5976),N=i(6663),E=i(6268),D=i(9488),A=i(6248),T=i(1432),I=i(4534),M=i(7231),O=i(6626),R=i(7940),P=i(4141),F=i(2334),B=i(7374),W=i(1106);let V=class extends L.JT{constructor(e,t,i,n){super(),this._accessibilityService=n,this._onDidChange=this._register(new k.Q5),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new k.Q5),this.onDidChangeFast=this._onDidChangeFast.event,this._isDominatedByLongLines=!1,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._reservedHeight=0,this._computeOptionsMemory=new P.LJ,this.isSimpleWidget=e,this._containerObserver=this._register(new I.I(i,t.dimension)),this._rawOptions=$(t),this._validatedOptions=U.validateOptions(this._rawOptions),this.options=this._computeOptions(),this.options.get(10)&&this._containerObserver.startObserving(),this._register(F.C.onDidChangeZoomLevel((()=>this._recomputeOptions()))),this._register(R.n.onDidChangeTabFocus((()=>this._recomputeOptions()))),this._register(this._containerObserver.onDidChange((()=>this._recomputeOptions()))),this._register(M.g.onDidChange((()=>this._recomputeOptions()))),this._register(E.PixelRatio.onDidChange((()=>this._recomputeOptions()))),this._register(this._accessibilityService.onDidChangeScreenReaderOptimized((()=>this._recomputeOptions())))}_recomputeOptions(){const e=this._computeOptions(),t=U.checkEquals(this.options,e);null!==t&&(this.options=e,this._onDidChangeFast.fire(t),this._onDidChange.fire(t))}_computeOptions(){const e=this._readEnvConfiguration(),t=B.E4.createFromValidatedSettings(this._validatedOptions,e.pixelRatio,this.isSimpleWidget),i=this._readFontInfo(t),n={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight-this._reservedHeight,fontInfo:i,extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:R.n.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return U.computeOptions(this._validatedOptions,n)}_readEnvConfiguration(){return{extraEditorClassName:z(),outerWidth:this._containerObserver.getWidth(),outerHeight:this._containerObserver.getHeight(),emptySelectionClipboard:E.isWebKit||E.isFirefox,pixelRatio:E.PixelRatio.value,accessibilitySupport:this._accessibilityService.isScreenReaderOptimized()?2:this._accessibilityService.getAccessibilitySupport()}}_readFontInfo(e){return M.g.readFontInfo(e)}getRawOptions(){return this._rawOptions}updateOptions(e){const t=$(e);U.applyUpdate(this._rawOptions,t)&&(this._validatedOptions=U.validateOptions(this._rawOptions),this._recomputeOptions())}observeContainer(e){this._containerObserver.observe(e)}setIsDominatedByLongLines(e){this._isDominatedByLongLines!==e&&(this._isDominatedByLongLines=e,this._recomputeOptions())}setModelLineCount(e){const t=function(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}setReservedHeight(e){this._reservedHeight!==e&&(this._reservedHeight=e,this._recomputeOptions())}};function z(){let e="";return E.isSafari||E.isWebkitWebView||(e+="no-user-select "),E.isSafari&&(e+="no-minimap-shadow "),T.dz&&(e+="mac "),e}V=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(3,W.F)],V);class H{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class j{constructor(){this._values=[]}_read(e){if(e>=this._values.length)throw new Error("Cannot read uninitialized value");return this._values[e]}get(e){return this._read(e)}_write(e,t){this._values[e]=t}}class U{static validateOptions(e){const t=new H;for(const i of P.Bc){const n="_never_"===i.name?void 0:e[i.name];t._write(i.id,i.validate(n))}return t}static computeOptions(e,t){const i=new j;for(const n of P.Bc)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return e===t;if(Array.isArray(e)||Array.isArray(t))return!(!Array.isArray(e)||!Array.isArray(t))&&D.fS(e,t);if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const i in e)if(!U._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const r of P.Bc){const o=!U._deepEquals(e._read(r.id),t._read(r.id));i[r.id]=o,o&&(n=!0)}return n?new P.Bb(i):null}static applyUpdate(e,t){let i=!1;for(const n of P.Bc)if(t.hasOwnProperty(n.name)){const r=n.applyUpdate(e[n.name],t[n.name]);e[n.name]=r.newValue,i=i||r.didChange}return i}}function $(e){const t=A.I8(e);return function(e){const t=e.wordWrap;!0===t?e.wordWrap="on":!1===t&&(e.wordWrap="off");const i=e.lineNumbers;!0===i?e.lineNumbers="on":!1===i&&(e.lineNumbers="off"),!1===e.autoClosingBrackets&&(e.autoClosingBrackets="never",e.autoClosingQuotes="never",e.autoSurround="never"),"visible"===e.cursorBlinking&&(e.cursorBlinking="solid");const n=e.renderWhitespace;!0===n?e.renderWhitespace="boundary":!1===n&&(e.renderWhitespace="none");const r=e.renderLineHighlight;!0===r?e.renderLineHighlight="line":!1===r&&(e.renderLineHighlight="none");const o=e.acceptSuggestionOnEnter;!0===o?e.acceptSuggestionOnEnter="on":!1===o&&(e.acceptSuggestionOnEnter="off");const s=e.tabCompletion;!1===s?e.tabCompletion="off":!0===s&&(e.tabCompletion="onlySnippets");const a=e.suggest;if(a&&"object"==typeof a.filteredTypes&&a.filteredTypes){const e={method:"showMethods",function:"showFunctions",constructor:"showConstructors",deprecated:"showDeprecated",field:"showFields",variable:"showVariables",class:"showClasses",struct:"showStructs",interface:"showInterfaces",module:"showModules",property:"showProperties",event:"showEvents",operator:"showOperators",unit:"showUnits",value:"showValues",constant:"showConstants",enum:"showEnums",enumMember:"showEnumMembers",keyword:"showKeywords",text:"showWords",color:"showColors",file:"showFiles",reference:"showReferences",folder:"showFolders",typeParameter:"showTypeParameters",snippet:"showSnippets"};(0,O.E)(e,(e=>{const t=a.filteredTypes[e.key];!1===t&&(a[e.value]=t)}))}const l=e.hover;!0===l?e.hover={enabled:!0}:!1===l&&(e.hover={enabled:!1});const c=e.parameterHints;!0===c?e.parameterHints={enabled:!0}:!1===c&&(e.parameterHints={enabled:!1});const h=e.autoIndent;!0===h?e.autoIndent="full":!1===h&&(e.autoIndent="advanced");const d=e.matchBrackets;!0===d?e.matchBrackets="always":!1===d&&(e.matchBrackets="never");const{renderIndentGuides:u,highlightActiveIndentGuide:g}=e;e.guides||(e.guides={}),void 0!==u&&(e.guides.indentation=!!u),void 0!==g&&(e.guides.highlightActiveIndentation=!!g)}(t),t}var K=i(1640),q=i(3860),G=i(8626),Y=i(553),Z=i(3938),Q=i(5393),X=i(9994);class J extends L.JT{constructor(){super(),this._shouldRender=!0}shouldRender(){return this._shouldRender}forceShouldRender(){this._shouldRender=!0}setShouldRender(){this._shouldRender=!0}onDidRender(){this._shouldRender=!1}onCompositionStart(e){return!1}onCompositionEnd(e){return!1}onConfigurationChanged(e){return!1}onCursorStateChanged(e){return!1}onDecorationsChanged(e){return!1}onFlushed(e){return!1}onFocusChanged(e){return!1}onLanguageConfigurationChanged(e){return!1}onLineMappingChanged(e){return!1}onLinesChanged(e){return!1}onLinesDeleted(e){return!1}onLinesInserted(e){return!1}onRevealRangeRequest(e){return!1}onScrollChanged(e){return!1}onThemeChanged(e){return!1}onTokensChanged(e){return!1}onTokensColorsChanged(e){return!1}onZonesChanged(e){return!1}handleEvents(e){let t=!1;for(let i=0,n=e.length;i=o.left?n.width=Math.max(n.width,o.left+o.width-n.left):(t[i++]=n,n=o)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t,i){if(!e||0===e.length)return null;const n=[];for(let r=0,o=e.length;rl)return null;if((t=Math.min(l,Math.max(0,t)))===(n=Math.min(l,Math.max(0,n)))&&i===r&&0===i&&!e.children[t].firstChild){const i=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(i,o,s)}t!==n&&n>0&&0===r&&(n--,r=1073741824);let c=e.children[t].firstChild,h=e.children[n].firstChild;if(c&&h||(!c&&0===i&&t>0&&(c=e.children[t-1].firstChild,i=1073741824),!h&&0===r&&n>0&&(h=e.children[n-1].firstChild,r=1073741824)),!c||!h)return null;i=Math.min(c.textContent.length,Math.max(0,i)),r=Math.min(h.textContent.length,Math.max(0,r));const d=this._readClientRects(c,i,h,r,a);return this._createHorizontalRangesFromClientRects(d,o,s)}}var ce=i(2550),he=i(7736),de=i(2321);const ue=!!T.tY||!(T.IJ||E.isFirefox||E.isSafari);let ge=!0;class fe{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectScale=1,this._clientRectRead=!1,this.endNode=t}readClientRect(){if(!this._clientRectRead){this._clientRectRead=!0;const e=this._domNode.getBoundingClientRect();this._clientRectDeltaLeft=e.left,this._clientRectScale=e.width/this._domNode.offsetWidth}}get clientRectDeltaLeft(){return this._clientRectRead||this.readClientRect(),this._clientRectDeltaLeft}get clientRectScale(){return this._clientRectRead||this.readClientRect(),this._clientRectScale}}class pe{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(44);this.renderWhitespace=i.get(88),this.renderControlCharacters=i.get(83),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(59),this.stopRenderingLineAfter=i.get(105),this.fontLigatures=i.get(45)}equals(e){return this.themeType===e.themeType&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineHeight===e.lineHeight&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.fontLigatures===e.fontLigatures}}class me{constructor(e){this._options=e,this._isMaybeInvalid=!0,this._renderedViewLine=null}getDomNode(){return this._renderedViewLine&&this._renderedViewLine.domNode?this._renderedViewLine.domNode.domNode:null}setDomNode(e){if(!this._renderedViewLine)throw new Error("I have no rendered view line to set the dom node to...");this._renderedViewLine.domNode=(0,G.X)(e)}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return(this._options.themeType===de.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace)&&(this._isMaybeInvalid=!0,!0)}renderLine(e,t,i,n){if(!1===this._isMaybeInvalid)return!1;this._isMaybeInvalid=!1;const r=i.getViewLineRenderingData(e),o=this._options,s=ce.Kp.filter(r.inlineDecorations,e,r.minColumn,r.maxColumn);let a=null;if(o.themeType===de.e.HIGH_CONTRAST||"selection"===this._options.renderWhitespace){const t=i.selections;for(const i of t){if(i.endLineNumbere)continue;const t=i.startLineNumber===e?i.startColumn:r.minColumn,n=i.endLineNumber===e?i.endColumn:r.maxColumn;t');const c=(0,he.d1)(l,n);n.appendASCIIString("");let h=null;return ge&&ue&&r.isBasicASCII&&o.useMonospaceOptimizations&&0===c.containsForeignElements&&r.content.length<300&&l.lineTokens.getCount()<100&&(h=new _e(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping)),h||(h=ye(this._renderedViewLine?this._renderedViewLine.domNode:null,l,c.characterMapping,c.containsRTL,c.containsForeignElements)),this._renderedViewLine=h,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return!this._renderedViewLine||this._renderedViewLine.getWidthIsFast()}needsMonospaceFontCheck(){return!!this._renderedViewLine&&this._renderedViewLine instanceof _e}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof _e?this._renderedViewLine.monospaceAssumptionsAreValid():ge}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof _e&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,t)),i=Math.min(this._renderedViewLine.input.lineContent.length+1,Math.max(1,i));const r=this._renderedViewLine.input.stopRenderingLineAfter;let o=!1;-1!==r&&t>r+1&&i>r+1&&(o=!0),-1!==r&&t>r+1&&(t=r+1),-1!==r&&i>r+1&&(i=r+1);const s=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return s&&s.length>0?new ae(o,s):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}me.CLASS_NAME="view-line";class _e{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return ge;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),ge=!1),ge}toSlowRenderedLine(){return ye(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const r=this._getCharPosition(t),o=this._getCharPosition(i);return[new oe(r,o-r)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let r=-1;for(;t;)t=t.previousSibling,r++;return this._characterMapping.getColumn(new he.Nd(r,i),n)}}class ve{constructor(e,t,i,n,r){if(this.domNode=e,this.input=t,this._characterMapping=i,this._isWhitespaceOnly=/^\s*$/.test(t.lineContent),this._containsForeignElements=r,this._cachedWidth=-1,this._pixelOffsetCache=null,!n||0===this._characterMapping.length){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let e=0,t=this._characterMapping.length;e<=t;e++)this._pixelOffsetCache[e]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(-1===this._cachedWidth&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return-1!==this._cachedWidth}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(null!==this._pixelOffsetCache){const r=this._readPixelOffset(this.domNode,e,t,n);if(-1===r)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return-1===o?null:[new oe(r,o-r)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,r){if(i===n){const n=this._readPixelOffset(e,t,i,r);return-1===n?null:[new oe(n,0)]}return this._readRawVisibleRangesForRange(e,i,n,r)}_readPixelOffset(e,t,i,n){if(0===this._characterMapping.length){if(0===this._containsForeignElements)return 0;if(2===this._containsForeignElements)return 0;if(1===this._containsForeignElements)return this.getWidth();const t=this._getReadingTarget(e);return t.firstChild?t.firstChild.offsetWidth:0}if(null!==this._pixelOffsetCache){const r=this._pixelOffsetCache[i];if(-1!==r)return r;const o=this._actualReadPixelOffset(e,t,i,n);return this._pixelOffsetCache[i]=o,o}return this._actualReadPixelOffset(e,t,i,n)}_actualReadPixelOffset(e,t,i,n){if(0===this._characterMapping.length){const t=le.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);return t&&0!==t.length?t[0].left:-1}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&0===this._containsForeignElements)return this.getWidth();const r=this._characterMapping.getDomPosition(i),o=le.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,r.partIndex,r.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode);if(!o||0===o.length)return-1;const s=o[0].left;if(this.input.isBasicASCII){const e=this._characterMapping.getAbsoluteOffset(i),t=Math.round(this.input.spaceWidth*e);if(Math.abs(t-s)<=1)return t}return s}_readRawVisibleRangesForRange(e,t,i,n){if(1===t&&i===this._characterMapping.length)return[new oe(0,this.getWidth())];const r=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return le.readHorizontalRanges(this._getReadingTarget(e),r.partIndex,r.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.clientRectScale,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let r=-1;for(;t;)t=t.previousSibling,r++;return this._characterMapping.getColumn(new he.Nd(r,i),n)}}class be extends ve{_readVisibleRangesForRange(e,t,i,n,r){const o=super._readVisibleRangesForRange(e,t,i,n,r);if(!o||0===o.length||i===n||1===i&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const i=this._readPixelOffset(e,t,n,r);if(-1!==i){const e=o[o.length-1];e.left=4&&3===e[0]&&7===e[3]}static isStrictChildOfViewLines(e){return e.length>4&&3===e[0]&&7===e[3]}static isChildOfScrollableElement(e){return e.length>=2&&3===e[0]&&5===e[1]}static isChildOfMinimap(e){return e.length>=2&&3===e[0]&&8===e[1]}static isChildOfContentWidgets(e){return e.length>=4&&3===e[0]&&1===e[3]}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&2===e[0]}static isChildOfOverlayWidgets(e){return e.length>=2&&3===e[0]&&4===e[1]}}class Te{constructor(e,t,i){this.viewModel=e.viewModel;const n=e.configuration.options;this.layoutInfo=n.get(131),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(59),this.stickyTabStops=n.get(104),this.typicalHalfwidthCharacterWidth=n.get(44).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return Te.getZoneAtCoord(this._context,e)}static getZoneAtCoord(e,t){const i=e.viewLayout.getWhitespaceAtVerticalOffset(t);if(i){const n=i.verticalOffset+i.height/2,r=e.viewModel.getLineCount();let o,s=null,a=null;return i.afterLineNumber!==r&&(a=new Ce.L(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(s=new Ce.L(i.afterLineNumber,e.viewModel.getLineMaxColumn(i.afterLineNumber))),o=null===a?s:null===s?a:t=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,Re._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}{constructor(e,t,i,n,r){super(e,t,i,n),this._ctx=e,r?(this.target=r,this.targetPath=te.collect(r,e.viewDomNode)):(this.target=null,this.targetPath=new Uint8Array(0))}toString(){return`pos(${this.pos.x},${this.pos.y}), editorPos(${this.editorPos.x},${this.editorPos.y}), relativePos(${this.relativePos.x},${this.relativePos.y}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset}\n\ttarget: ${this.target?this.target.outerHTML:null}`}_getMouseColumn(e=null){return e&&e.columno.contentLeft+o.width)continue;const i=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(i<=r&&r<=i+o.height)return t.fulfillContentText(o.position,null,{mightBeForeignElement:!1,injectedText:null})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const e=t.isInContentArea?8:5;return t.fulfillViewZone(e,i.position,i)}return null}static _hitTestTextArea(e,t){return Ae.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfillContentText(e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1,injectedText:null}):t.fulfillTextarea():null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let r=Math.abs(t.relativePos.x);const o={isAfterLines:i.isAfterLines,glyphMarginLeft:e.layoutInfo.glyphMarginLeft,glyphMarginWidth:e.layoutInfo.glyphMarginWidth,lineNumbersWidth:e.layoutInfo.lineNumbersWidth,offsetX:r};return r-=e.layoutInfo.glyphMarginLeft,r<=e.layoutInfo.glyphMarginWidth?t.fulfillMargin(2,n,i.range,o):(r-=e.layoutInfo.glyphMarginWidth,r<=e.layoutInfo.lineNumbersWidth?t.fulfillMargin(3,n,i.range,o):(r-=e.layoutInfo.lineNumbersWidth,t.fulfillMargin(4,n,i.range,o)))}return null}static _hitTestViewLines(e,t,i){if(!Ae.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfillContentEmpty(new Ce.L(1,1),Me);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const i=e.viewModel.getLineCount(),n=e.viewModel.getLineMaxColumn(i);return t.fulfillContentEmpty(new Ce.L(i,n),Me)}if(i){if(Ae.isStrictChildOfViewLines(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(0===e.viewModel.getLineLength(i)){const n=e.getLineWidth(i),r=Oe(t.mouseContentHorizontalOffset-n);return t.fulfillContentEmpty(new Ce.L(i,1),r)}const n=e.getLineWidth(i);if(t.mouseContentHorizontalOffset>=n){const r=Oe(t.mouseContentHorizontalOffset-n),o=new Ce.L(i,e.viewModel.getLineMaxColumn(i));return t.fulfillContentEmpty(o,r)}}return t.fulfillUnknown()}const n=Re._doHitTest(e,t);return 1===n.type?Re.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(Ae.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ce.L(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(Ae.isChildOfScrollableElement(t.targetPath)&&t.target&&1===t.target.nodeType){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ce.L(i,n))}}return null}static _hitTestScrollbar(e,t){if(Ae.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.viewModel.getLineMaxColumn(i);return t.fulfillScrollbar(new Ce.L(i,n))}return null}getMouseColumn(e){const t=this._context.configuration.options,i=t.get(131),n=this._context.viewLayout.getCurrentScrollLeft()+e.x-i.contentLeft;return Re._getMouseColumn(n,t.get(44).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,r){const o=n.lineNumber,s=n.column,a=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>a){const e=Oe(t.mouseContentHorizontalOffset-a);return t.fulfillContentEmpty(n,e)}const l=e.visibleRangeForPosition(o,s);if(!l)return t.fulfillUnknown(n);const c=l.left;if(t.mouseContentHorizontalOffset===c)return t.fulfillContentText(n,null,{mightBeForeignElement:!!r,injectedText:r});const h=[];if(h.push({offset:l.left,column:s}),s>1){const t=e.visibleRangeForPosition(o,s-1);t&&h.push({offset:t.left,column:s-1})}if(se.offset-t.offset));const d=t.pos.toClientCoordinates(),u=i.getBoundingClientRect(),g=u.left<=d.clientX&&d.clientX<=u.right;for(let e=1;e=t.editorPos.y+t.editorPos.height&&(r=t.editorPos.y+t.editorPos.height-1);const o=new X.YN(t.pos.x,r),s=this._actualDoHitTestWithCaretRangeFromPoint(e,o.toClientCoordinates());return 1===s.type?s:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=x.Ay(e.viewDomNode);let n;if(n=i?void 0===i.caretRangeFromPoint?function(e,t,i){const n=document.createRange();let r=e.elementFromPoint(t,i);if(null!==r){for(;r&&r.firstChild&&r.firstChild.nodeType!==r.firstChild.TEXT_NODE&&r.lastChild&&r.lastChild.firstChild;)r=r.lastChild;const e=r.getBoundingClientRect(),i=window.getComputedStyle(r,null).getPropertyValue("font"),o=r.innerText;let s,a=e.left,l=0;if(t>e.left+e.width)l=o.length;else{const e=Pe.getInstance();for(let n=0;nthis._createMouseTarget(e,t)),(e=>this._getMouseColumn(e)))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(131).height;const n=new X.N5(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,(e=>this._onContextMenu(e,!0)))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Fe(this.mouseTargetFactory),Be.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e)))),this._register(x.nm(this.viewHelper.viewDomNode,x.tw.MOUSE_WHEEL,(e=>{if(this.viewController.emitMouseWheel(e),!this._context.configuration.options.get(68))return;const t=new Z.q(e);if(T.dz?(e.metaKey||e.ctrlKey)&&!e.shiftKey&&!e.altKey:e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey){const e=F.C.getZoomLevel(),i=t.deltaY>0?1:-1;F.C.setZoomLevel(e+i),t.preventDefault(),t.stopPropagation()}}),{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(131)){const e=this._context.configuration.options.get(131).height;this._height!==e&&(this._height=e,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const i=new X.rU(e,t).toPageCoordinates(),n=(0,X.kG)(this.viewHelper.viewDomNode);if(i.yn.y+n.height||i.xn.x+n.width)return null;const r=(0,X.Pp)(this.viewHelper.viewDomNode,n,i);return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),n,i,r,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const t=x.Ay(this.viewHelper.viewDomNode);t&&(i=t.elementsFromPoint(e.posx,e.posy).find((e=>this.viewHelper.viewDomNode.contains(e))))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,e.relativePos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.relativePos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp{e.preventDefault(),this.viewHelper.focusTextArea()};if(l&&(i||r&&o))c(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(s){const i=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(i.viewZoneId)&&(c(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else a&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(c(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Be.MOUSE_MOVE_MINIMUM_TIME=100;class We extends L.JT{constructor(e,t,i,n,r){super(),this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=r,this._mouseMoveMonitor=this._register(new X.iB(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new Q._F),this._mouseState=new Ve,this._currentSelection=new q.Y(1,1,1,1),this._isActive=!1,this._lastMouseEvent=null}dispose(){super.dispose()}isActive(){return this._isActive}_onMouseDownThenMove(e){this._lastMouseEvent=e,this._mouseState.setModifiers(e);const t=this._findMousePosition(e,!0);t&&(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(3===e),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(81)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&6===i.type&&i.position&&this._currentSelection.containsPosition(i.position))return this._mouseState.isDragAndDrop=!0,this._isActive=!0,void this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Fe(null),(e=>this._onMouseDownThenMove(e)),(e=>{const t=this._findMousePosition(this._lastMouseEvent,!0);e&&e instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:t?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()}));this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Fe(null),(e=>this._onMouseDownThenMove(e)),(()=>this._stop())))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){this._isActive&&this._onScrollTimeout.setIfNotSet((()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);e&&(this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0))}),10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.viewModel,n=this._context.viewLayout,r=this._getMouseColumn(e);if(e.posyt.y+t.height){const t=n.getCurrentScrollTop()+e.relativePos.y,o=Te.getZoneAtCoord(this._context,t);if(o){const e=this._helpPositionJumpOverViewZone(o);if(e)return De.createOutsideEditor(r,e)}const s=n.getLineNumberAtVerticalOffset(t);return De.createOutsideEditor(r,new Ce.L(s,i.getLineMaxColumn(s)))}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+e.relativePos.y);return e.posxt.x+t.width?De.createOutsideEditor(r,new Ce.L(o,i.getLineMaxColumn(o))):null}_findMousePosition(e,t){const i=this._getPositionOutsideEditor(e);if(i)return i;const n=this._createMouseTarget(e,t);if(!n.position)return null;if(8===n.type||5===n.type){const e=this._helpPositionJumpOverViewZone(n.detail);if(e)return De.createViewZone(n.type,n.element,n.mouseColumn,e,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new Ce.L(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){e.position&&this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,inSelectionMode:t,mouseDownCount:this._mouseState.count,altKey:this._mouseState.altKey,ctrlKey:this._mouseState.ctrlKey,metaKey:this._mouseState.metaKey,shiftKey:this._mouseState.shiftKey,leftButton:this._mouseState.leftButton,middleButton:this._mouseState.middleButton,onInjectedText:6===e.type&&null!==e.detail.injectedText})}}class Ve{constructor(){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}get altKey(){return this._altKey}get ctrlKey(){return this._ctrlKey}get metaKey(){return this._metaKey}get shiftKey(){return this._shiftKey}get leftButton(){return this._leftButton}get middleButton(){return this._middleButton}get startedOnLineNumbers(){return this._startedOnLineNumbers}get count(){return this._lastMouseDownCount}setModifiers(e){this._altKey=e.altKey,this._ctrlKey=e.ctrlKey,this._metaKey=e.metaKey,this._shiftKey=e.shiftKey}setStartButtons(e){this._leftButton=e.leftButton,this._middleButton=e.middleButton}setStartedOnLineNumbers(e){this._startedOnLineNumbers=e}trySetCount(e,t){const i=(new Date).getTime();i-this._lastSetMouseDownCountTime>Ve.CLEAR_MOUSE_DOWN_COUNT_TIME&&(e=1),this._lastSetMouseDownCountTime=i,e>this._lastMouseDownCount+1&&(e=this._lastMouseDownCount+1),this._lastMouseDownPosition&&this._lastMouseDownPosition.equals(t)?this._lastMouseDownPositionEqualCount++:this._lastMouseDownPositionEqualCount=1,this._lastMouseDownPosition=t,this._lastMouseDownCount=Math.min(e,this._lastMouseDownPositionEqualCount)}}Ve.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var ze=i(161),He=i(5715);class je extends Be{constructor(e,t,i){super(e,t,i),this._register(Y.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(x.nm(this.viewHelper.linesContentDomNode,Y.t.Tap,(e=>this.onTap(e)))),this._register(x.nm(this.viewHelper.linesContentDomNode,Y.t.Change,(e=>this.onChange(e)))),this._register(x.nm(this.viewHelper.linesContentDomNode,Y.t.Contextmenu,(e=>this._onContextMenu(new X.gy(e,this.viewHelper.viewDomNode),!1)))),this._lastPointerType="mouse",this._register(x.nm(this.viewHelper.linesContentDomNode,"pointerdown",(e=>{const t=e.pointerType;this._lastPointerType="mouse"!==t?"touch"===t?"touch":"pen":"mouse"})));const n=new X.tC(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,(e=>this._onMouseMove(e)),Fe(this.mouseTargetFactory),Be.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,(e=>this._onMouseUp(e)))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,(e=>this._onMouseLeave(e)))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,(e=>this._onMouseDown(e))))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new X.gy(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1,onInjectedText:6===t.type&&null!==t.detail.injectedText})}onChange(e){"touch"===this._lastPointerType&&this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){"touch"!==e.browserEvent.pointerType&&super._onMouseDown(e)}}class Ue extends Be{constructor(e,t,i){super(e,t,i),this._register(Y.o.addTarget(this.viewHelper.linesContentDomNode)),this._register(x.nm(this.viewHelper.linesContentDomNode,Y.t.Tap,(e=>this.onTap(e)))),this._register(x.nm(this.viewHelper.linesContentDomNode,Y.t.Change,(e=>this.onChange(e)))),this._register(x.nm(this.viewHelper.linesContentDomNode,Y.t.Contextmenu,(e=>this._onContextMenu(new X.gy(e,this.viewHelper.viewDomNode),!1))))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new X.gy(e,this.viewHelper.viewDomNode),!1);if(t.position){const e=document.createEvent("CustomEvent");e.initEvent(He.pd.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(e),this.viewController.moveTo(t.position)}}onChange(e){this._context.viewModel.viewLayout.deltaScrollNow(-e.translationX,-e.translationY)}}class $e extends L.JT{constructor(e,t,i){super(),T.gn&&ze.D.pointerEvents?this.handler=this._register(new je(e,t,i)):window.TouchEvent?this.handler=this._register(new Ue(e,t,i)):this.handler=this._register(new Be(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}var Ke=i(2729),qe={};qe.styleTagTransform=b(),qe.setAttributes=p(),qe.insert=g().bind(null,"head"),qe.domAPI=d(),qe.insertStyleElement=_(),c()(Ke.Z,qe),Ke.Z&&Ke.Z.locals&&Ke.Z.locals;var Ge=i(5924),Ye=i(2136),Ze=i(5887),Qe=i(1715),Xe={};Xe.styleTagTransform=b(),Xe.setAttributes=p(),Xe.insert=g().bind(null,"head"),Xe.domAPI=d(),Xe.insertStyleElement=_(),c()(Qe.Z,Xe),Qe.Z&&Qe.Z.locals&&Qe.Z.locals;class Je extends J{}var et=i(8625),tt=i(7781);class it extends Je{constructor(e){super(),this._context=e,this._readConfig(),this._lastCursorModelPosition=new Ce.L(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(59);const t=e.get(60);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(84);const i=e.get(131);this._lineNumbersLeft=i.lineNumbersLeft,this._lineNumbersWidth=i.lineNumbersWidth}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return this._readConfig(),!0}onCursorStateChanged(e){const t=e.selections[0].getPosition();this._lastCursorModelPosition=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),2!==this._renderLineNumbers&&3!==this._renderLineNumbers||(i=!0),i}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getLineRenderLineNumber(e){const t=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Ce.L(e,1));if(1!==t.column)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(2===this._renderLineNumbers){const e=Math.abs(this._lastCursorModelPosition.lineNumber-i);return 0===e?''+i+"":String(e)}return 3===this._renderLineNumbers?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(0===this._renderLineNumbers)return void(this._renderResult=null);const t=T.IJ?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,r='
',o=this._context.viewModel.getLineCount(),s=[];for(let e=i;e<=n;e++){const n=e-i;if(!this._renderFinalNewline&&e===o&&0===this._context.viewModel.getLineLength(e)){s[n]="";continue}const a=this._getLineRenderLineNumber(e);a?e===this._activeLineNumber?s[n]='
'+a+"
":s[n]=r+a+"
":s[n]=""}this._renderResult=s}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}it.CLASS_NAME="line-numbers",(0,tt.Ic)(((e,t)=>{const i=e.getColor(et.hw);i&&t.addRule(`.monaco-editor .line-numbers { color: ${i}; }`);const n=e.getColor(et.DD);n&&t.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${n}; }`)}));class nt extends ee{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=(0,G.X)(document.createElement("div")),this._domNode.setClassName(nt.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=(0,G.X)(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(nt.CLASS_NAME),this._domNode.appendChild(this._glyphMarginBackgroundDomNode)}dispose(){super.dispose()}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollTopChanged}prepareRender(e){}render(e){this._domNode.setLayerHinting(this._canUseLayerHinting),this._domNode.setContain("strict");const t=e.scrollTop-e.bigNumbersDelta;this._domNode.setTop(-t);const i=Math.min(e.scrollHeight,1e6);this._domNode.setHeight(i),this._domNode.setWidth(this._contentLeft),this._glyphMarginBackgroundDomNode.setLeft(this._glyphMarginLeft),this._glyphMarginBackgroundDomNode.setWidth(this._glyphMarginWidth),this._glyphMarginBackgroundDomNode.setHeight(i)}}nt.CLASS_NAME="glyph-margin",nt.OUTER_CLASS_NAME="margin";var rt=i(4929),ot=i(6237),st=i(6887),at=i(1264);class lt{constructor(e,t,i,n,r){this._context=e,this.modelLineNumber=t,this.distanceToModelLineStart=i,this.widthOfHiddenLineTextBefore=n,this.distanceToModelLineEnd=r,this._visibleTextAreaBrand=void 0,this.startPosition=null,this.endPosition=null,this.visibleTextareaStart=null,this.visibleTextareaEnd=null,this._previousPresentation=null}prepareRender(e){const t=new Ce.L(this.modelLineNumber,this.distanceToModelLineStart+1),i=new Ce.L(this.modelLineNumber,this._context.viewModel.model.getLineMaxColumn(this.modelLineNumber)-this.distanceToModelLineEnd);this.startPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(t),this.endPosition=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i),this.startPosition.lineNumber===this.endPosition.lineNumber?(this.visibleTextareaStart=e.visibleRangeForPosition(this.startPosition),this.visibleTextareaEnd=e.visibleRangeForPosition(this.endPosition)):(this.visibleTextareaStart=null,this.visibleTextareaEnd=null)}definePresentation(e){return this._previousPresentation||(this._previousPresentation=e||{foreground:1,italic:!1,bold:!1,underline:!1,strikethrough:!1}),this._previousPresentation}}const ct=E.isFirefox;class ht extends ee{constructor(e,t,i){super(e),this._primaryCursorPosition=new Ce.L(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._visibleRangeProvider=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,r=n.get(131);this._setAccessibilityOptions(n),this._contentLeft=r.contentLeft,this._contentWidth=r.contentWidth,this._contentHeight=r.height,this._fontInfo=n.get(44),this._lineHeight=n.get(59),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this._visibleTextArea=null,this._selections=[new q.Y(1,1,1,1)],this._modelSelections=[new q.Y(1,1,1,1)],this._lastRenderPosition=null,this.textArea=(0,G.X)(document.createElement("textarea")),te.write(this.textArea,6),this.textArea.setClassName(`inputarea ${ot.S}`),this.textArea.setAttribute("wrap","off"),this.textArea.setAttribute("autocorrect","off"),this.textArea.setAttribute("autocapitalize","off"),this.textArea.setAttribute("autocomplete","off"),this.textArea.setAttribute("spellcheck","false"),this.textArea.setAttribute("aria-label",this._getAriaLabel(n)),this.textArea.setAttribute("tabindex",String(n.get(112))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",C.N("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(30)&&n.get(81)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=(0,G.X)(document.createElement("div")),this.textAreaCover.setPosition("absolute");const o={getLineCount:()=>this._context.viewModel.getLineCount(),getLineMaxColumn:e=>this._context.viewModel.getLineMaxColumn(e),getValueInRange:(e,t)=>this._context.viewModel.getValueInRange(e,t)},s={getDataToCopy:()=>{const e=this._context.viewModel.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,T.ED),t=this._context.viewModel.model.getEOL(),i=this._emptySelectionClipboard&&1===this._modelSelections.length&&this._modelSelections[0].isEmpty(),n=Array.isArray(e)?e:null,r=Array.isArray(e)?e.join(t):e;let o,s=null;if(He.RA.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&r.length<65536){const e=this._context.viewModel.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);e&&(o=e.html,s=e.mode)}return{isFromEmptySelection:i,multicursorText:n,text:r,html:o,mode:s}},getScreenReaderContent:e=>{if(1===this._accessibilitySupport){if(T.dz){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition();let i=this._getWordBeforePosition(t);if(0===i.length&&(i=this._getCharacterBeforePosition(t)),i.length>0)return new Ze.un(i,i.length,i.length,t,t)}}return Ze.un.EMPTY}if(E.isAndroid){const e=this._selections[0];if(e.isEmpty()){const t=e.getStartPosition(),[i,n]=this._getAndroidWordAtPosition(t);if(i.length>0)return new Ze.un(i,n,n,t,t)}return Ze.un.EMPTY}return Ze.ee.fromEditorSelection(e,o,this._selections[0],this._accessibilityPageSize,0===this._accessibilitySupport)},deduceModelPosition:(e,t,i)=>this._context.viewModel.deduceModelPositionRelativeToViewPosition(e,t,i)},a=this._register(new He.Tj(this.textArea.domNode));this._textAreaInput=this._register(new He.Fz(s,a,T.OS,E)),this._register(this._textAreaInput.onKeyDown((e=>{this._viewController.emitKeyDown(e)}))),this._register(this._textAreaInput.onKeyUp((e=>{this._viewController.emitKeyUp(e)}))),this._register(this._textAreaInput.onPaste((e=>{let t=!1,i=null,n=null;e.metadata&&(t=this._emptySelectionClipboard&&!!e.metadata.isFromEmptySelection,i=void 0!==e.metadata.multicursorText?e.metadata.multicursorText:null,n=e.metadata.mode),this._viewController.paste(e.text,t,i,n)}))),this._register(this._textAreaInput.onCut((()=>{this._viewController.cut()}))),this._register(this._textAreaInput.onType((e=>{e.replacePrevCharCnt||e.replaceNextCharCnt||e.positionDelta?(Ze.al&&console.log(` => compositionType: <<${e.text}>>, ${e.replacePrevCharCnt}, ${e.replaceNextCharCnt}, ${e.positionDelta}`),this._viewController.compositionType(e.text,e.replacePrevCharCnt,e.replaceNextCharCnt,e.positionDelta)):(Ze.al&&console.log(` => type: <<${e.text}>>`),this._viewController.type(e.text))}))),this._register(this._textAreaInput.onSelectionChangeRequest((e=>{this._viewController.setSelection(e)}))),this._register(this._textAreaInput.onCompositionStart((e=>{const t=this.textArea.domNode,i=this._modelSelections[0],{distanceToModelLineStart:n,widthOfHiddenTextBefore:r}=(()=>{const e=t.value.substring(0,Math.min(t.selectionStart,t.selectionEnd)),n=e.lastIndexOf("\n"),r=e.substring(n+1),o=r.lastIndexOf("\t"),s=r.length-o-1,a=i.getStartPosition(),l=Math.min(a.column-1,s);return{distanceToModelLineStart:a.column-1-l,widthOfHiddenTextBefore:function(e,t){if(0===e.length)return 0;const i=document.createElement("div");i.style.position="absolute",i.style.top="-50000px",i.style.width="50000px";const n=document.createElement("span");(0,Ye.N)(n,t),n.style.whiteSpace="pre",n.append(e),i.appendChild(n),document.body.appendChild(i);const r=n.offsetWidth;return document.body.removeChild(i),r}(r.substring(0,r.length-l),this._fontInfo)}})(),{distanceToModelLineEnd:o}=(()=>{const e=t.value.substring(Math.max(t.selectionStart,t.selectionEnd)),n=e.indexOf("\n"),r=-1===n?e:e.substring(0,n),o=r.indexOf("\t"),s=-1===o?r.length:r.length-o-1,a=i.getEndPosition(),l=Math.min(this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column,s);return{distanceToModelLineEnd:this._context.viewModel.model.getLineMaxColumn(a.lineNumber)-a.column-l}})();this._context.viewModel.revealRange("keyboard",!0,xe.e.fromPositions(this._selections[0].getStartPosition()),0,1),this._visibleTextArea=new lt(this._context,i.startLineNumber,n,r,o),this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render(),this.textArea.setClassName(`inputarea ${ot.S} ime-input`),this._viewController.compositionStart(),this._context.viewModel.onCompositionStart()}))),this._register(this._textAreaInput.onCompositionUpdate((e=>{this._visibleTextArea&&(this._visibleTextArea.prepareRender(this._visibleRangeProvider),this._render())}))),this._register(this._textAreaInput.onCompositionEnd((()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${ot.S}`),this._viewController.compositionEnd(),this._context.viewModel.onCompositionEnd()}))),this._register(this._textAreaInput.onFocus((()=>{this._context.viewModel.setHasFocus(!0)}))),this._register(this._textAreaInput.onBlur((()=>{this._context.viewModel.setHasFocus(!1)})))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,rt.u)('`~!@#$%^&*()-=+[{]}\\|;:",.<>/?');let n=!0,r=e.column,o=!0,s=e.column,a=0;for(;a<50&&(n||o);){if(n&&r<=1&&(n=!1),n){const e=t.charCodeAt(r-2);0!==i.get(e)?n=!1:r--}if(o&&s>t.length&&(o=!1),o){const e=t.charCodeAt(s-1);0!==i.get(e)?o=!1:s++}a++}return[t.substring(r-1,s-1),e.column-r]}_getWordBeforePosition(e){const t=this._context.viewModel.getLineContent(e.lineNumber),i=(0,rt.u)(this._context.configuration.options.get(117));let n=e.column,r=0;for(;n>1;){const o=t.charCodeAt(n-2);if(0!==i.get(o)||r>50)return t.substring(n-1,e.column-1);r++,n--}return t.substring(0,e.column-1)}_getCharacterBeforePosition(e){if(e.column>1){const t=this._context.viewModel.getLineContent(e.lineNumber).charAt(e.column-2);if(!Ge.ZG(t.charCodeAt(0)))return t}return""}_getAriaLabel(e){return 1===e.get(2)?C.N("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",T.IJ?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);2===this._accessibilitySupport&&t===P.BH.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(44),this._lineHeight=t.get(59),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(112))),(e.hasChanged(30)||e.hasChanged(81))&&(t.get(30)&&t.get(81)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),e.hasChanged(2)&&this._textAreaInput.writeScreenReaderContent("strategy changed"),!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),this._modelSelections=e.modelSelections.slice(0),this._textAreaInput.writeScreenReaderContent("selection changed"),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return this._scrollLeft=e.scrollLeft,this._scrollTop=e.scrollTop,!0}onZonesChanged(e){return!0}isFocused(){return this._textAreaInput.isFocused()}focusTextArea(){this._textAreaInput.focusTextArea()}getLastRenderData(){return this._lastRenderPosition}setAriaOptions(e){e.activeDescendant?(this.textArea.setAttribute("aria-haspopup","true"),this.textArea.setAttribute("aria-autocomplete","list"),this.textArea.setAttribute("aria-activedescendant",e.activeDescendant)):(this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),this.textArea.removeAttribute("aria-activedescendant")),e.role&&this.textArea.setAttribute("role",e.role)}prepareRender(e){this._primaryCursorPosition=new Ce.L(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition),this._visibleTextArea&&this._visibleTextArea.prepareRender(e)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){const e=this._visibleTextArea.visibleTextareaStart,t=this._visibleTextArea.visibleTextareaEnd,i=this._visibleTextArea.startPosition,n=this._visibleTextArea.endPosition;if(i&&n&&e&&t&&t.left>=this._scrollLeft&&e.left<=this._scrollLeft+this._contentWidth){const r=this._context.viewLayout.getVerticalOffsetForLineNumber(this._primaryCursorPosition.lineNumber)-this._scrollTop,o=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));let s=this._visibleTextArea.widthOfHiddenLineTextBefore,a=this._contentLeft+e.left-this._scrollLeft,l=t.left-e.left+1;if(athis._contentWidth&&(l=this._contentWidth);const c=this._context.viewModel.getViewLineData(i.lineNumber),h=c.tokens.findTokenIndexAtOffset(i.column-1),d=h===c.tokens.findTokenIndexAtOffset(n.column-1),u=this._visibleTextArea.definePresentation(d?c.tokens.getPresentation(h):null);this.textArea.domNode.scrollTop=o*this._lineHeight,this.textArea.domNode.scrollLeft=s,this._doRender({lastRenderPosition:null,top:r,left:a,width:l,height:this._lineHeight,useCover:!1,color:(st.RW.getColorMap()||[])[u.foreground],italic:u.italic,bold:u.bold,underline:u.underline,strikethrough:u.strikethrough})}return}if(!this._primaryCursorVisibleRange)return void this._renderAtTopLeft();const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(ethis._contentLeft+this._contentWidth)return void this._renderAtTopLeft();const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight)this._renderAtTopLeft();else if(T.dz){this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:ct?0:1,height:this._lineHeight,useCover:!1}),this.textArea.domNode.scrollLeft=this._primaryCursorVisibleRange.left;const i=this._newlinecount(this.textArea.domNode.value.substr(0,this.textArea.domNode.selectionStart));this.textArea.domNode.scrollTop=i*this._lineHeight}else this._doRender({lastRenderPosition:this._primaryCursorPosition,top:t,left:e,width:ct?0:1,height:ct?0:1,useCover:!1})}_newlinecount(e){let t=0,i=-1;for(;i=e.indexOf("\n",i+1),-1!==i;)t++;return t}_renderAtTopLeft(){this._doRender({lastRenderPosition:null,top:0,left:0,width:ct?0:1,height:ct?0:1,useCover:!0})}_doRender(e){this._lastRenderPosition=e.lastRenderPosition;const t=this.textArea,i=this.textAreaCover;(0,Ye.N)(t,this._fontInfo),t.setTop(e.top),t.setLeft(e.left),t.setWidth(e.width),t.setHeight(e.height),t.setColor(e.color?at.Il.Format.CSS.formatHex(e.color):""),t.setFontStyle(e.italic?"italic":""),e.bold&&t.setFontWeight("bold"),t.setTextDecoration(`${e.underline?" underline":""}${e.strikethrough?" line-through":""}`),i.setTop(e.useCover?e.top:0),i.setLeft(e.useCover?e.left:0),i.setWidth(e.useCover?e.width:0),i.setHeight(e.useCover?e.height:0);const n=this._context.configuration.options;n.get(50)?i.setClassName("monaco-editor-background textAreaCover "+nt.OUTER_CLASS_NAME):0!==n.get(60).renderType?i.setClassName("monaco-editor-background textAreaCover "+it.CLASS_NAME):i.setClassName("monaco-editor-background textAreaCover")}}var dt=i(9317);class ut{constructor(e,t,i,n){this.configuration=e,this.viewModel=t,this.userInputEvents=i,this.commandDelegate=n}paste(e,t,i,n){this.commandDelegate.paste(e,t,i,n)}type(e){this.commandDelegate.type(e)}compositionType(e,t,i,n){this.commandDelegate.compositionType(e,t,i,n)}compositionStart(){this.commandDelegate.startComposition()}compositionEnd(){this.commandDelegate.endComposition()}cut(){this.commandDelegate.cut()}setSelection(e){dt.CoreNavigationCommands.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const 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?e.onInjectedText||(this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position)):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey||n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){dt.CoreNavigationCommands.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){dt.CoreNavigationCommands.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),dt.CoreNavigationCommands.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),dt.CoreNavigationCommands.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){dt.CoreNavigationCommands.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){dt.CoreNavigationCommands.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){dt.CoreNavigationCommands.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){dt.CoreNavigationCommands.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){dt.CoreNavigationCommands.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){dt.CoreNavigationCommands.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){dt.CoreNavigationCommands.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){dt.CoreNavigationCommands.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){dt.CoreNavigationCommands.SelectAll.runCoreEditorCommand(this.viewModel,{source:"mouse"})}_convertViewToModelPosition(e){return this.viewModel.coordinatesConverter.convertViewPositionToModelPosition(e)}emitKeyDown(e){this.userInputEvents.emitKeyDown(e)}emitKeyUp(e){this.userInputEvents.emitKeyUp(e)}emitContextMenu(e){this.userInputEvents.emitContextMenu(e)}emitMouseMove(e){this.userInputEvents.emitMouseMove(e)}emitMouseLeave(e){this.userInputEvents.emitMouseLeave(e)}emitMouseUp(e){this.userInputEvents.emitMouseUp(e)}emitMouseDown(e){this.userInputEvents.emitMouseDown(e)}emitMouseDrag(e){this.userInputEvents.emitMouseDrag(e)}emitMouseDrop(e){this.userInputEvents.emitMouseDrop(e)}emitMouseDropCanceled(){this.userInputEvents.emitMouseDropCanceled()}emitMouseWheel(e){this.userInputEvents.emitMouseWheel(e)}}class gt{constructor(e){this.onKeyDown=null,this.onKeyUp=null,this.onContextMenu=null,this.onMouseMove=null,this.onMouseLeave=null,this.onMouseDown=null,this.onMouseUp=null,this.onMouseDrag=null,this.onMouseDrop=null,this.onMouseDropCanceled=null,this.onMouseWheel=null,this._coordinatesConverter=e}emitKeyDown(e){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return gt.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){const i=Object.assign({},e);return i.position&&(i.position=t.convertViewPositionToModelPosition(i.position)),i.range&&(i.range=t.convertViewRangeToModelRange(i.range)),i}}var ft,pt=i(72);class mt{constructor(e){this._createLine=e,this._set(1,[])}flush(){this._set(1,[])}_set(e,t){this._lines=t,this._rendLineNumberStart=e}_get(){return{rendLineNumberStart:this._rendLineNumberStart,lines:this._lines}}getStartLineNumber(){return this._rendLineNumberStart}getEndLineNumber(){return this._rendLineNumberStart+this._lines.length-1}getCount(){return this._lines.length}getLine(e){const t=e-this._rendLineNumberStart;if(t<0||t>=this._lines.length)throw new Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(0===this.getCount())return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(tn)return null;let r=0,o=0;for(let s=i;s<=n;s++){const i=s-this._rendLineNumberStart;e<=s&&s<=t&&(0===o?(r=i,o=1):o++)}if(e=i&&o<=n&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),r=!0);return r}onLinesInserted(e,t){if(0===this.getCount())return null;const i=t-e+1,n=this.getStartLineNumber(),r=this.getEndLineNumber();if(e<=n)return this._rendLineNumberStart+=i,null;if(e>r)return null;if(i+e>r)return this._lines.splice(e-this._rendLineNumberStart,r-e+1);const o=[];for(let e=0;ei)continue;const s=Math.max(t,o.fromLineNumber),a=Math.min(i,o.toLineNumber);for(let e=s;e<=a;e++){const t=e-this._rendLineNumberStart;this._lines[t].onTokensChanged(),n=!0}}return n}}class _t{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new mt((()=>this._host.createVisibleLine()))}_createDomNode(){const e=(0,G.X)(document.createElement("div"));return e.setClassName("view-layer"),e.setPosition("absolute"),e.domNode.setAttribute("role","presentation"),e.domNode.setAttribute("aria-hidden","true"),e}onConfigurationChanged(e){return!!e.hasChanged(131)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let e=0,i=t.length;et){const e=t,o=Math.min(i,r.rendLineNumberStart-1);e<=o&&(this._insertLinesBefore(r,e,o,n,t),r.linesLength+=o-e+1)}else if(r.rendLineNumberStart0&&(this._removeLinesBefore(r,e),r.linesLength-=e)}if(r.rendLineNumberStart=t,r.rendLineNumberStart+r.linesLength-1i){const e=Math.max(0,i-r.rendLineNumberStart+1),t=r.linesLength-1-e+1;t>0&&(this._removeLinesAfter(r,t),r.linesLength-=t)}return this._finishRendering(r,!1,n),r}_renderUntouchedLines(e,t,i,n,r){const o=e.rendLineNumberStart,s=e.lines;for(let e=t;e<=i;e++){const t=o+e;s[e].layoutLine(t,n[t-r])}}_insertLinesBefore(e,t,i,n,r){const o=[];let s=0;for(let e=t;e<=i;e++)o[s++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i=0;t--){const i=e.lines[t];n[t]&&(i.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");vt._ttPolicy&&(t=vt._ttPolicy.createHTML(t)),n.innerHTML=t;for(let t=0;te}),vt._sb=(0,pt.l$)(1e5);class bt extends ee{constructor(e){super(e),this._visibleLines=new _t(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;ee.shouldRender()));for(let i=0,n=t.length;i'),n.appendASCIIString(r),n.appendASCIIString(""),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class wt extends bt{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._contentWidth=t.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._contentWidth=t.contentWidth,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollWidthChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e),this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth))}}class Ct extends bt{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),(0,Ye.N)(this.domNode,t.get(44))}onConfigurationChanged(e){const t=this._context.configuration.options;(0,Ye.N)(this.domNode,t.get(44));const i=t.get(131);return this._contentLeft=i.contentLeft,super.onConfigurationChanged(e)||!0}onScrollChanged(e){return super.onScrollChanged(e)||e.scrollHeightChanged}_viewOverlaysRender(e){super._viewOverlaysRender(e);const t=Math.min(e.scrollHeight,1e6);this.domNode.setHeight(t),this.domNode.setWidth(this._contentLeft)}}class xt{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class St extends ee{constructor(e,t){super(e),this._viewDomNode=t,this._widgets={},this.domNode=(0,G.X)(document.createElement("div")),te.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=(0,G.X)(document.createElement("div")),te.write(this.overflowingContentWidgetsDomNode,2),this.overflowingContentWidgetsDomNode.setClassName("overflowingContentWidgets")}dispose(){super.dispose(),this._widgets={}}onConfigurationChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onConfigurationChanged(e);return!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLineMappingChanged(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new kt(this._context,this._viewDomNode,e);this._widgets[t.id]=t,t.allowEditorOverflow?this.overflowingContentWidgetsDomNode.appendChild(t.domNode):this.domNode.appendChild(t.domNode),this.setShouldRender()}setWidgetPosition(e,t,i){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t];delete this._widgets[t];const i=e.domNode.domNode;i.parentNode.removeChild(i),i.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return!!this._widgets.hasOwnProperty(e)&&this._widgets[e].suppressMouseDown}onBeforeRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onBeforeRender(e)}prepareRender(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].prepareRender(e)}render(e){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].render(e)}}class kt{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=(0,G.X)(this._actual.getDomNode()),this.id=this._actual.getId(),this.allowEditorOverflow=this._actual.allowEditorOverflow||!1,this.suppressMouseDown=this._actual.suppressMouseDown||!1;const n=this._context.configuration.options,r=n.get(131);this._fixedOverflowWidgets=n.get(36),this._contentWidth=r.contentWidth,this._contentLeft=r.contentLeft,this._lineHeight=n.get(59),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),this.domNode.setDisplay("none"),this.domNode.setVisibility("hidden"),this.domNode.setAttribute("widgetId",this.id),this.domNode.setMaxWidth(this._maxWidth)}onConfigurationChanged(e){const t=this._context.configuration.options;if(this._lineHeight=t.get(59),e.hasChanged(131)){const e=t.get(131);this._contentLeft=e.contentLeft,this._contentWidth=e.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const e=this._context.viewModel.model.validateRange(this._range);(this._context.viewModel.coordinatesConverter.modelPositionIsVisible(e.getStartPosition())||this._context.viewModel.coordinatesConverter.modelPositionIsVisible(e.getEndPosition()))&&(this._viewRange=this._context.viewModel.coordinatesConverter.convertModelRangeToViewRange(e))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.offsetWidth||document.body.offsetWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._viewRange&&this._preference&&this._preference.length>0?this.domNode.setDisplay("block"):this.domNode.setDisplay("none"),this._cachedDomNodeOffsetWidth=-1,this._cachedDomNodeOffsetHeight=-1}_layoutBoxInViewport(e,t,i,n,r){const o=e.top,s=o,a=t.top+this._lineHeight,l=o-n,c=s>=n,h=a,d=r.viewportHeight-a>=n;let u=e.left,g=t.left;return u+i>r.scrollLeft+r.viewportWidth&&(u=r.scrollLeft+r.viewportWidth-i),g+i>r.scrollLeft+r.viewportWidth&&(g=r.scrollLeft+r.viewportWidth-i),uo){const e=s-(o-n);s-=e,i-=e}if(s=22,m=c+n<=h.height-22;return this._fixedOverflowWidgets?{fitsAbove:p,aboveTop:Math.max(l,22),aboveLeft:u,fitsBelow:m,belowTop:c,belowLeft:f}:{fitsAbove:p,aboveTop:o,aboveLeft:d,fitsBelow:m,belowTop:s,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new xt(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||0===t.length)return[null,null];let i=t[0],n=t[0];for(const e of t)e.lineNumbern.lineNumber&&(n=e);let r=1073741824;for(const e of i.ranges)e.lefte.endLineNumber||this.domNode.setMaxWidth(this._maxWidth))}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData)return this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),void("function"==typeof this._actual.afterRender&&Lt(this._actual.afterRender,this._actual,null));this.allowEditorOverflow?(this.domNode.setTop(this._renderData.coordinate.top),this.domNode.setLeft(this._renderData.coordinate.left)):(this.domNode.setTop(this._renderData.coordinate.top+e.scrollTop-e.bigNumbersDelta),this.domNode.setLeft(this._renderData.coordinate.left)),this._isVisible||(this.domNode.setVisibility("inherit"),this.domNode.setAttribute("monaco-visible-content-widget","true"),this._isVisible=!0),"function"==typeof this._actual.afterRender&&Lt(this._actual.afterRender,this._actual,this._renderData.position)}}function Lt(e,t,...i){try{return e.call(t,...i)}catch(e){return null}}var Nt=i(5875),Et={};Et.styleTagTransform=b(),Et.setAttributes=p(),Et.insert=g().bind(null,"head"),Et.domAPI=d(),Et.insertStyleElement=_(),c()(Nt.Z,Et),Nt.Z&&Nt.Z.locals&&Nt.Z.locals;class Dt extends Je{constructor(e){super(),this._context=e;const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new q.Y(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=this._selections.map((e=>e.positionLineNumber));t.sort(((e,t)=>e-t)),D.fS(this._cursorLineNumbers,t)||(this._cursorLineNumbers=t,e=!0);const i=this._selections.every((e=>e.isEmpty()));return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(131);return this._lineHeight=t.get(59),this._renderLineHighlight=t.get(85),this._renderLineHighlightOnlyWhenFocus=t.get(86),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,!0}onCursorStateChanged(e){return this._selections=e.selections,this._readFromSelections()}onFlushed(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollWidthChanged||e.scrollTopChanged}onZonesChanged(e){return!0}onFocusChanged(e){return!!this._renderLineHighlightOnlyWhenFocus&&(this._focused=e.isFocused,!0)}prepareRender(e){if(!this._shouldRenderThis())return void(this._renderData=null);const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,r=this._cursorLineNumbers.length;let o=0;const s=[];for(let e=i;e<=n;e++){const n=e-i;for(;o=this._renderData.length?"":this._renderData[i]}_shouldRenderInMargin(){return("gutter"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderInContent(){return("line"===this._renderLineHighlight||"all"===this._renderLineHighlight)&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class At extends Dt{_renderOne(e){return`
`}_shouldRenderThis(){return this._shouldRenderInContent()}_shouldRenderOther(){return this._shouldRenderInMargin()}}class Tt extends Dt{_renderOne(e){return`
`}_shouldRenderThis(){return!0}_shouldRenderOther(){return this._shouldRenderInContent()}}(0,tt.Ic)(((e,t)=>{const i=e.getColor(et.Kh);if(i&&(t.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${i}; border: none; }`)),!i||i.isTransparent()||e.defines(et.Mm)){const i=e.getColor(et.Mm);i&&(t.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),t.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),"hc"===e.type&&(t.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),t.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}}));var It=i(2429),Mt={};Mt.styleTagTransform=b(),Mt.setAttributes=p(),Mt.insert=g().bind(null,"head"),Mt.domAPI=d(),Mt.insertStyleElement=_(),c()(It.Z,Mt),It.Z&&It.Z.locals&&It.Z.locals;class Ot extends Je{constructor(e){super(),this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}prepareRender(e){const t=e.getDecorationsInViewport();let i=[],n=0;for(let e=0,r=t.length;e{if(e.options.zIndext.options.zIndex)return 1;const i=e.options.className,n=t.options.className;return in?1:xe.e.compareRangesUsingStarts(e.range,t.range)}));const r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,s=[];for(let e=r;e<=o;e++)s[e-r]="";this._renderWholeLineDecorations(e,i,s),this._renderNormalDecorations(e,i,s),this._renderResult=s}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),r=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let e=0,s=t.length;e',l=Math.max(s.range.startLineNumber,r),c=Math.min(s.range.endLineNumber,o);for(let e=l;e<=c;e++)i[e-r]+=a}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),r=e.visibleRange.startLineNumber;let o=null,s=!1,a=null;for(let l=0,c=t.length;l';s[l]+=o}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}var Rt=i(433),Pt=i(3910);class Ft extends ee{constructor(e,t,i,n){super(e);const r=this._context.configuration.options,o=r.get(92),s=r.get(67),a=r.get(34),l=r.get(95),c={listenOnDomNode:i.domNode,className:"editor-scrollable "+(0,tt.m6)(e.theme.type),useShadows:!1,lazyRender:!0,vertical:o.vertical,horizontal:o.horizontal,verticalHasArrows:o.verticalHasArrows,horizontalHasArrows:o.horizontalHasArrows,verticalScrollbarSize:o.verticalScrollbarSize,verticalSliderSize:o.verticalSliderSize,horizontalScrollbarSize:o.horizontalScrollbarSize,horizontalSliderSize:o.horizontalSliderSize,handleMouseWheel:o.handleMouseWheel,alwaysConsumeMouseWheel:o.alwaysConsumeMouseWheel,arrowSize:o.arrowSize,mouseWheelScrollSensitivity:s,fastScrollSensitivity:a,scrollPredominantAxis:l,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new Rt.$Z(t.domNode,c,this._context.viewLayout.getScrollable())),te.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=(0,G.X)(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const h=(e,t,i)=>{const n={};if(t){const t=e.scrollTop;t&&(n.scrollTop=this._context.viewLayout.getCurrentScrollTop()+t,e.scrollTop=0)}if(i){const t=e.scrollLeft;t&&(n.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+t,e.scrollLeft=0)}this._context.viewModel.viewLayout.setScrollPosition(n,1)};this._register(x.nm(i.domNode,"scroll",(e=>h(i.domNode,!0,!0)))),this._register(x.nm(t.domNode,"scroll",(e=>h(t.domNode,!0,!1)))),this._register(x.nm(n.domNode,"scroll",(e=>h(n.domNode,!0,!1)))),this._register(x.nm(this.scrollbarDomNode.domNode,"scroll",(e=>h(this.scrollbarDomNode.domNode,!0,!1))))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(131);this.scrollbarDomNode.setLeft(t.contentLeft),"right"===e.get(65).side?this.scrollbarDomNode.setWidth(t.contentWidth+t.minimap.minimapWidth):this.scrollbarDomNode.setWidth(t.contentWidth),this.scrollbarDomNode.setHeight(t.height)}getOverviewRulerLayoutInfo(){return this.scrollbar.getOverviewRulerLayoutInfo()}getDomNode(){return this.scrollbarDomNode}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(92)||e.hasChanged(67)||e.hasChanged(34)){const e=this._context.configuration.options,t=e.get(92),i=e.get(67),n=e.get(34),r=e.get(95),o={vertical:t.vertical,horizontal:t.horizontal,verticalScrollbarSize:t.verticalScrollbarSize,horizontalScrollbarSize:t.horizontalScrollbarSize,scrollByPage:t.scrollByPage,handleMouseWheel:t.handleMouseWheel,mouseWheelScrollSensitivity:i,fastScrollSensitivity:n,scrollPredominantAxis:r};this.scrollbar.updateOptions(o)}return e.hasChanged(131)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+(0,tt.m6)(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}(0,tt.Ic)(((e,t)=>{const i=e.getColor(Pt._wn);i&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .shadow.top {\n\t\t\t\tbox-shadow: ${i} 0 6px 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.left {\n\t\t\t\tbox-shadow: ${i} 6px 0 6px -6px inset;\n\t\t\t}\n\n\t\t\t.monaco-scrollable-element > .shadow.top.left {\n\t\t\t\tbox-shadow: ${i} 6px 6px 6px -6px inset;\n\t\t\t}\n\t\t`);const n=e.getColor(Pt.etL);n&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider {\n\t\t\t\tbackground: ${n};\n\t\t\t}\n\t\t`);const r=e.getColor(Pt.ABB);r&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider:hover {\n\t\t\t\tbackground: ${r};\n\t\t\t}\n\t\t`);const o=e.getColor(Pt.ynu);o&&t.addRule(`\n\t\t\t.monaco-scrollable-element > .scrollbar > .slider.active {\n\t\t\t\tbackground: ${o};\n\t\t\t}\n\t\t`)}));var Bt=i(4891),Wt={};Wt.styleTagTransform=b(),Wt.setAttributes=p(),Wt.insert=g().bind(null,"head"),Wt.domAPI=d(),Wt.insertStyleElement=_(),c()(Bt.Z,Wt),Bt.Z&&Bt.Z.locals&&Bt.Z.locals;class Vt{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class zt extends Je{_render(e,t,i){const n=[];for(let i=e;i<=t;i++)n[i-e]=[];if(0===i.length)return n;i.sort(((e,t)=>e.className===t.className?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.className',s=[];for(let e=t;e<=i;e++){const i=e-t,r=n[i];0===r.length?s[i]="":s[i]='
=this._renderResult.length?"":this._renderResult[i]}}var jt=i(2073),Ut={};Ut.styleTagTransform=b(),Ut.setAttributes=p(),Ut.insert=g().bind(null,"head"),Ut.domAPI=d(),Ut.insertStyleElement=_(),c()(jt.Z,Ut),jt.Z&&jt.Z.locals&&jt.Z.locals;var $t=i(8401),Kt=i(7671),qt=i(5094);class Gt extends Je{constructor(e){super(),this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(132),n=t.get(44);this._lineHeight=t.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(132),n=t.get(44);return this._lineHeight=t.get(59),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=-1===i.wrappingColumn?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const i=e.selections[0].getPosition();return!(null===(t=this._primaryPosition)||void 0===t?void 0:t.equals(i))&&(this._primaryPosition=i,!0)}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}onLanguageConfigurationChanged(e){return!0}prepareRender(e){var t,i,n,r;if(!this._bracketPairGuideOptions.indentation&&!1===this._bracketPairGuideOptions.bracketPairs)return void(this._renderResult=null);const o=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,a=e.scrollWidth,l=this._lineHeight,c=this._primaryPosition,h=this.getGuidesByLine(o,s,c),d=[];for(let c=o;c<=s;c++){const s=c-o,u=h[s];let g="";const f=null!==(i=null===(t=e.visibleRangeForPosition(new Ce.L(c,1)))||void 0===t?void 0:t.left)&&void 0!==i?i:0;for(const t of u){const i=f+(t.visibleColumn-1)*this._spaceWidth;if(i>a||this._maxIndentLeft>0&&i>this._maxIndentLeft)break;const o=t.horizontalLine?t.horizontalLine.top?"horizontal-top":"horizontal-bottom":"vertical",s=t.horizontalLine?(null!==(r=null===(n=e.visibleRangeForPosition(new Ce.L(c,t.horizontalLine.endColumn)))||void 0===n?void 0:n.left)&&void 0!==r?r:i+this._spaceWidth)-i:this._spaceWidth;g+=`
`}d[s]=g}this._renderResult=d}getGuidesByLine(e,t,i){const n=!1!==this._bracketPairGuideOptions.bracketPairs?this._context.viewModel.getBracketGuidesInRangeByLine(e,t,i,{highlightActive:this._bracketPairGuideOptions.highlightActiveBracketPair,horizontalGuides:!0===this._bracketPairGuideOptions.bracketPairsHorizontal?qt.s6.Enabled:"active"===this._bracketPairGuideOptions.bracketPairsHorizontal?qt.s6.EnabledForActive:qt.s6.Disabled,includeInactive:!0===this._bracketPairGuideOptions.bracketPairs}):null,r=this._bracketPairGuideOptions.indentation?this._context.viewModel.getLinesIndentGuides(e,t):null;let o=0,s=0,a=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const n=this._context.viewModel.getActiveIndentGuide(i.lineNumber,e,t);o=n.startLineNumber,s=n.endLineNumber,a=n.indent}const{indentSize:l}=this._context.viewModel.model.getOptions(),c=[];for(let i=e;i<=t;i++){const t=new Array;c.push(t);const h=n?n[i-e]:[],d=new D.H9(h),u=r?r[i-e]:[];for(let e=1;e<=u;e++){const n=(e-1)*l+1,r=0===h.length&&o<=i&&i<=s&&e===a;t.push(...d.takeWhile((e=>e.visibleColumn!0))||[])}return c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Yt(e){if(!e||!e.isTransparent())return e}(0,tt.Ic)(((e,t)=>{const i=e.getColor(et.tR);i&&t.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=e.getColor(et.Ym)||i;n&&t.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${n} inset; }`);const r=[{bracketColor:et.zJ,guideColor:et.oV,guideColorActive:et.Qb},{bracketColor:et.Vs,guideColor:et.m$,guideColorActive:et.m3},{bracketColor:et.CE,guideColor:et.DS,guideColorActive:et.To},{bracketColor:et.UP,guideColor:et.lS,guideColorActive:et.L7},{bracketColor:et.r0,guideColor:et.Jn,guideColorActive:et.HV},{bracketColor:et.m1,guideColor:et.YF,guideColorActive:et.f9}],o=new Kt.W,s=r.map((t=>{var i,n;const r=e.getColor(t.bracketColor),o=e.getColor(t.guideColor),s=e.getColor(t.guideColorActive),a=Yt(null!==(i=Yt(o))&&void 0!==i?i:null==r?void 0:r.transparent(.3)),l=Yt(null!==(n=Yt(s))&&void 0!==n?n:r);if(a&&l)return{guideColor:a,guideColorActive:l}})).filter($t.$K);if(s.length>0){for(let e=0;e<30;e++){const i=s[e%s.length];t.addRule(`.monaco-editor .${o.getInlineClassNameOfLevel(e).replace(/ /g,".")} { --guide-color: ${i.guideColor}; --guide-color-active: ${i.guideColorActive}; }`)}t.addRule(".monaco-editor .vertical { box-shadow: 1px 0 0 0 var(--guide-color) inset; }"),t.addRule(".monaco-editor .horizontal-top { border-top: 1px solid var(--guide-color); }"),t.addRule(".monaco-editor .horizontal-bottom { border-bottom: 1px solid var(--guide-color); }"),t.addRule(`.monaco-editor .vertical.${o.activeClassName} { box-shadow: 1px 0 0 0 var(--guide-color-active) inset; }`),t.addRule(`.monaco-editor .horizontal-top.${o.activeClassName} { border-top: 1px solid var(--guide-color-active); }`),t.addRule(`.monaco-editor .horizontal-bottom.${o.activeClassName} { border-bottom: 1px solid var(--guide-color-active); }`)}}));var Zt=i(9523),Qt={};Qt.styleTagTransform=b(),Qt.setAttributes=p(),Qt.insert=g().bind(null,"head"),Qt.domAPI=d(),Qt.insertStyleElement=_(),c()(Zt.Z,Qt),Zt.Z&&Zt.Z.locals&&Zt.Z.locals;class Xt{constructor(){this._currentVisibleRange=new xe.e(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class Jt{constructor(e,t,i,n,r,o,s){this.minimalReveal=e,this.lineNumber=t,this.startColumn=i,this.endColumn=n,this.startScrollTop=r,this.stopScrollTop=o,this.scrollType=s,this.type="range",this.minLineNumber=t,this.maxLineNumber=t}}class ei{constructor(e,t,i,n,r){this.minimalReveal=e,this.selections=t,this.startScrollTop=i,this.stopScrollTop=n,this.scrollType=r,this.type="selections";let o=t[0].startLineNumber,s=t[0].endLineNumber;for(let e=1,i=t.length;e{this._updateLineWidthsSlow()}),200),this._asyncCheckMonospaceFontAssumptions=new Q.pY((()=>{this._checkMonospaceFontAssumptions()}),2e3),this._lastRenderedData=new Xt,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new me(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(132)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(44),n=t.get(132),r=t.get(131);return this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(89),this._horizontalScrollbarHeight=r.horizontalScrollbarHeight,this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),(0,Ye.N)(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(131)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new pe(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const e=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let t=e;t<=i;t++)this._visibleLines.getVisibleLine(t).onOptionsChanged(this._viewLineOptions);return!0}return!1}onCursorStateChanged(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=!1;for(let e=t;e<=i;e++)n=this._visibleLines.getVisibleLine(e).onSelectionChanged()||n;return n}onDecorationsChanged(e){{const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)this._visibleLines.getVisibleLine(i).onDecorationsChanged()}return!0}onFlushed(e){const t=this._visibleLines.onFlushed(e);return this._maxLineWidth=0,t}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onRevealRangeRequest(e){const t=this._computeScrollTopToRevealRange(this._context.viewLayout.getFutureViewport(),e.source,e.minimalReveal,e.range,e.selections,e.verticalType);if(-1===t)return!1;let i=this._context.viewLayout.validateScrollPosition({scrollTop:t});e.revealHorizontal?e.range&&e.range.startLineNumber!==e.range.endLineNumber?i={scrollTop:i.scrollTop,scrollLeft:0}:e.range?this._horizontalRevealRequest=new Jt(e.minimalReveal,e.range.startLineNumber,e.range.startColumn,e.range.endColumn,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType):e.selections&&e.selections.length>0&&(this._horizontalRevealRequest=new ei(e.minimalReveal,e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const n=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.viewModel.viewLayout.setScrollPosition(i,n),!0}onScrollChanged(e){if(this._horizontalRevealRequest&&e.scrollLeftChanged&&(this._horizontalRevealRequest=null),this._horizontalRevealRequest&&e.scrollTopChanged){const t=Math.min(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop),i=Math.max(this._horizontalRevealRequest.startScrollTop,this._horizontalRevealRequest.stopScrollTop);(e.scrollTopi)&&(this._horizontalRevealRequest=null)}return this.domNode.setWidth(e.scrollWidth),this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._context.viewModel.viewLayout.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(null===i)return null;const n=this._getLineNumberFor(i);if(-1===n)return null;if(n<1||n>this._context.viewModel.getLineCount())return null;if(1===this._context.viewModel.getLineMaxColumn(n))return new Ce.L(n,1);const r=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(no)return null;let s=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const a=this._context.viewModel.getLineMinColumn(n);return si?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=xe.e.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let r=[],o=0;const s=new fe(this.domNode.domNode,this._textRangeRestingSpot);let a=0;t&&(a=this._context.viewModel.coordinatesConverter.convertViewPositionToModelPosition(new Ce.L(n.startLineNumber,1)).lineNumber);const l=this._visibleLines.getStartLineNumber(),c=this._visibleLines.getEndLineNumber();for(let e=n.startLineNumber;e<=n.endLineNumber;e++){if(ec)continue;const h=e===n.startLineNumber?n.startColumn:1,d=e===n.endLineNumber?n.endColumn:this._context.viewModel.getLineMaxColumn(e),u=this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,h,d,s);if(u){if(t&&ethis._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new fe(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new se(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,r=!0;for(let o=t;o<=i;o++){const t=this._visibleLines.getVisibleLine(o);!e||t.getWidthIsFast()?n=Math.max(n,t.getWidth()):r=!1}return r&&1===t&&i===this._context.viewModel.getLineCount()&&(this._maxLineWidth=0),this._ensureMaxLineWidth(n),r}_checkMonospaceFontAssumptions(){let e=-1,t=-1;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let r=i;r<=n;r++){const i=this._visibleLines.getVisibleLine(r);if(i.needsMonospaceFontCheck()){const n=i.getWidth();n>t&&(t=n,e=r)}}if(-1!==e&&!this._visibleLines.getVisibleLine(e).monospaceAssumptionsAreValid())for(let e=i;e<=n;e++)this._visibleLines.getVisibleLine(e).onMonospaceAssumptionsInvalidated()}prepareRender(){throw new Error("Not supported")}render(){throw new Error("Not supported")}renderText(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){const t=this._horizontalRevealRequest;if(e.startLineNumber<=t.minLineNumber&&t.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const e=this._computeScrollLeftToReveal(t);e&&(this._isViewportWrapping||this._ensureMaxLineWidth(e.maxHorizontalOffset),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},t.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),T.IJ&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const e=this._visibleLines.getStartLineNumber(),t=this._visibleLines.getEndLineNumber();for(let i=e;i<=t;i++)if(this._visibleLines.getVisibleLine(i).needsMonospaceFontCheck()){this._asyncCheckMonospaceFontAssumptions.schedule();break}}this._linesContent.setLayerHinting(this._canUseLayerHinting),this._linesContent.setContain("strict");const t=this._context.viewLayout.getCurrentScrollTop()-e.bigNumbersDelta;this._linesContent.setTop(-t),this._linesContent.setLeft(-this._context.viewLayout.getCurrentScrollLeft())}_ensureMaxLineWidth(e){const t=Math.ceil(e);this._maxLineWidth0){let e=r[0].startLineNumber,t=r[0].endLineNumber;for(let i=1,n=r.length;ia){if(!c)return-1;u=h}else if(5===o||6===o)if(6===o&&s<=h&&d<=l)u=s;else{const e=h-Math.max(5*this._lineHeight,.2*a),t=d-a;u=Math.max(t,e)}else if(1===o||2===o)if(2===o&&s<=h&&d<=l)u=s;else{const e=(h+d)/2;u=Math.max(0,e-a/2)}else u=this._computeMinimumScrolling(s,l,h,d,3===o,4===o);return u}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let r=1073741824,o=0;if("range"===e.type){const t=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!t)return null;for(const e of t.ranges)r=Math.min(r,Math.round(e.left)),o=Math.max(o,Math.round(e.left+e.width))}else for(const t of e.selections){if(t.startLineNumber!==t.endLineNumber)return null;const e=this._visibleRangesForLineRange(t.startLineNumber,t.startColumn,t.endColumn);if(!e)return null;for(const t of e.ranges)r=Math.min(r,Math.round(t.left)),o=Math.max(o,Math.round(t.left+t.width))}return e.minimalReveal||(r=Math.max(0,r-ti.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding),"selections"===e.type&&o-r>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,r,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,i,n,r,o){r=!!r,o=!!o;const s=(t|=0)-(e|=0);return(n|=0)-(i|=0)t?Math.max(0,n-s):e:i}}ti.HORIZONTAL_EXTRA_PX=30;var ii=i(5228),ni={};ni.styleTagTransform=b(),ni.setAttributes=p(),ni.insert=g().bind(null,"head"),ni.domAPI=d(),ni.insertStyleElement=_(),c()(ii.Z,ni),ii.Z&&ii.Z.locals&&ii.Z.locals;class ri extends zt{constructor(e){super(),this._context=e;const t=this._context.configuration.options.get(131);this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._decorationsLeft=t.decorationsLeft,this._decorationsWidth=t.decorationsWidth,!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_getDecorations(e){const t=e.getDecorationsInViewport(),i=[];let n=0;for(let e=0,r=t.length;e
',o=[];for(let e=t;e<=i;e++){const i=e-t,s=n[i];let a="";for(let e=0,t=s.length;e';r[i]=s}this._renderResult=r}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}var li=i(7751),ci={};ci.styleTagTransform=b(),ci.setAttributes=p(),ci.insert=g().bind(null,"head"),ci.domAPI=d(),ci.insertStyleElement=_(),c()(li.Z,ci),li.Z&&li.Z.locals&&li.Z.locals;var hi=i(7974);class di{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=di._clamp(e),this.g=di._clamp(t),this.b=di._clamp(i),this.a=di._clamp(n)}equals(e){return this.r===e.r&&this.g===e.g&&this.b===e.b&&this.a===e.a}static _clamp(e){return e<0?0:e>255?255:0|e}}di.Empty=new di(0,0,0,0);class ui extends L.JT{constructor(){super(),this._onDidChange=new k.Q5,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(st.RW.onDidChange((e=>{e.changedColorMap&&this._updateColorMap()})))}static getInstance(){return this._INSTANCE||(this._INSTANCE=(0,L.dk)(new ui)),this._INSTANCE}_updateColorMap(){const e=st.RW.getColorMap();if(!e)return this._colors=[di.Empty],void(this._backgroundIsLight=!0);this._colors=[di.Empty];for(let t=1;t=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}ui._INSTANCE=null;var gi=i(1118);const fi=(()=>{const e=[];for(let t=32;t<=126;t++)e.push(t);return e.push(65533),e})();var pi=i(5427);class mi{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=mi.soften(e,.8),this.charDataLight=mi.soften(e,50/60)}static soften(e,t){const i=new Uint8ClampedArray(e.length);for(let n=0,r=e.length;ne.width||i+g>e.height)return void console.warn("bad render request outside image data");const f=c?this.charDataLight:this.charDataNormal,p=((e,t)=>(e-=32)<0||e>96?t<=2?(e+96)%96:95:e)(n,l),m=4*e.width,_=s.r,v=s.g,b=s.b,y=r.r-_,w=r.g-v,C=r.b-b,x=Math.max(o,a),S=e.data;let k=p*d*u,L=i*m+4*t;for(let e=0;ee.width||i+h>e.height)return void console.warn("bad render request outside image data");const d=4*e.width,u=r/255*.5,g=o.r,f=o.g,p=o.b,m=g+(n.r-g)*u,_=f+(n.g-f)*u,v=p+(n.b-p)*u,b=Math.max(r,s),y=e.data;let w=i*d+4*t;for(let e=0;e{const t=new Uint8ClampedArray(e.length/2);for(let i=0;i>1]=vi[e[i]]<<4|15&vi[e[i+1]];return t},yi={1:(0,_i.I)((()=>bi("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792"))),2:(0,_i.I)((()=>bi("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126")))};class wi{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return i=yi[e]?new mi(yi[e](),e):wi.createFromSampleData(wi.createSampleData(t).data,e),this.lastFontFamily=t,this.lastCreated=i,i}static createSampleData(e){const t=document.createElement("canvas"),i=t.getContext("2d");t.style.height="16px",t.height=16,t.width=960,t.style.width="960px",i.fillStyle="#ffffff",i.font=`bold 16px ${e}`,i.textBaseline="middle";let n=0;for(const e of fi)i.fillText(String.fromCharCode(e),n,8),n+=10;return i.getImageData(0,0,960,16)}static createFromSampleData(e,t){if(61440!==e.length)throw new Error("Unexpected source in MinimapCharRenderer");const i=wi._downsample(e,t);return new mi(i,t)}static _downsampleChar(e,t,i,n,r){const o=1*r,s=2*r;let a=n,l=0;for(let n=0;n0){const e=255/a;for(let t=0;twi.create(this.fontScale,a.fontFamily))),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=xi._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=xi._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(Pt.kVY);return i?new di(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(Pt.Itd);return t?di._clamp(Math.round(255*t.rgba.a)):255}equals(e){return this.renderMinimap===e.renderMinimap&&this.size===e.size&&this.minimapHeightIsEditorHeight===e.minimapHeightIsEditorHeight&&this.scrollBeyondLastLine===e.scrollBeyondLastLine&&this.showSlider===e.showSlider&&this.pixelRatio===e.pixelRatio&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.lineHeight===e.lineHeight&&this.minimapLeft===e.minimapLeft&&this.minimapWidth===e.minimapWidth&&this.minimapHeight===e.minimapHeight&&this.canvasInnerWidth===e.canvasInnerWidth&&this.canvasInnerHeight===e.canvasInnerHeight&&this.canvasOuterWidth===e.canvasOuterWidth&&this.canvasOuterHeight===e.canvasOuterHeight&&this.isSampling===e.isSampling&&this.editorHeight===e.editorHeight&&this.fontScale===e.fontScale&&this.minimapLineHeight===e.minimapLineHeight&&this.minimapCharWidth===e.minimapCharWidth&&this.defaultBackgroundColor&&this.defaultBackgroundColor.equals(e.defaultBackgroundColor)&&this.backgroundColor&&this.backgroundColor.equals(e.backgroundColor)&&this.foregroundAlpha===e.foregroundAlpha}}class Si{constructor(e,t,i,n,r,o,s,a){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=r,this.sliderHeight=o,this.startLineNumber=s,this.endLineNumber=a}getDesiredScrollTopFromDelta(e){return Math.round(this.scrollTop+e/this._computedSliderRatio)}getDesiredScrollTopFromTouchLocation(e){return Math.round((e-this.sliderHeight/2)/this._computedSliderRatio)}static create(e,t,i,n,r,o,s,a,l,c,h){const d=e.pixelRatio,u=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/u),f=e.lineHeight;if(e.minimapHeightIsEditorHeight){const t=a*e.lineHeight+(e.scrollBeyondLastLine?r-e.lineHeight:0),i=Math.max(1,Math.floor(r*r/t)),n=Math.max(0,e.minimapHeight-i),o=n/(c-r),h=l*o,d=n>0,u=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new Si(l,c,d,o,h,i,1,Math.min(s,u))}let p,m;if(o&&i!==s){const e=i-t+1;p=Math.floor(e*u/d)}else{const e=r/f;p=Math.floor(e*u/d)}m=e.scrollBeyondLastLine?(s-1)*u/d:Math.max(0,s*u/d-p),m=Math.min(e.minimapHeight-p,m);const _=m/(c-r),v=l*_;let b=0;if(e.scrollBeyondLastLine&&(b=r/f-1),g>=s+b)return new Si(l,c,m>0,_,v,p,1,s);{let e=Math.max(1,Math.floor(t-v*d/u));h&&h.scrollHeight===c&&(h.scrollTop>l&&(e=Math.min(e,h.startLineNumber)),h.scrollTopki.INVALID)),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const t=this._renderedLines._get().lines;for(let e=0,i=t.length;e1){for(let t=0,i=s-1;t0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1t)return null}return[i+1,n+1]}decorationLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e),n=this.modelLineToMinimapLine(t);return e!==t&&n===i&&(n===this.minimapLines.length?i>1&&i--:n++),[i,n]}onLinesDeleted(e){const t=e.toLineNumber-e.fromLineNumber+1;let i=this.minimapLines.length,n=0;for(let r=this.minimapLines.length-1;r>=0&&!(this.minimapLines[r]=0&&!(this.minimapLines[i]0,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,viewportStartLineNumber:t,viewportEndLineNumber:i,viewportStartLineNumberVerticalOffset:e.getVerticalOffsetForLineNumber(t),scrollTop:e.scrollTop,scrollLeft:e.scrollLeft,viewportWidth:e.viewportWidth,viewportHeight:e.viewportHeight};this._actual.render(n)}_recreateLineSampling(){this._minimapSelections=null;const e=Boolean(this._samplingState),[t,i]=Ei.compute(this.options,this._context.viewModel.getLineCount(),this._samplingState);if(this._samplingState=t,e&&this._samplingState)for(const e of i)switch(e.type){case"deleted":this._actual.onLinesDeleted(e.deleteFromLineNumber,e.deleteToLineNumber);break;case"inserted":this._actual.onLinesInserted(e.insertFromLineNumber,e.insertToLineNumber);break;case"flush":this._actual.onFlushed()}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.viewModel.getLineCount()}getRealLineCount(){return this._context.viewModel.getLineCount()}getLineContent(e){return this._samplingState?this._context.viewModel.getLineContent(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.viewModel.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.viewModel.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){const n=[];for(let r=0,o=t-e+1;r{if(e.preventDefault(),0===this._model.options.renderMinimap)return;if(!this._lastRenderData)return;if("proportional"!==this._model.options.size){if(e.leftButton&&this._lastRenderData){const t=x.i(this._slider.domNode),i=t.top+t.height/2;this._startSliderDragging(e.buttons,e.posx,i,e.posy,this._lastRenderData.renderedLayout)}return}const t=this._model.options.minimapLineHeight,i=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*e.browserEvent.offsetY;let n=Math.floor(i/t)+this._lastRenderData.renderedLayout.startLineNumber;n=Math.min(n,this._model.getLineCount()),this._model.revealLineNumber(n)})),this._sliderMouseMoveMonitor=new hi.Z,this._sliderMouseDownListener=x.mu(this._slider.domNode,"mousedown",(e=>{e.preventDefault(),e.stopPropagation(),e.leftButton&&this._lastRenderData&&this._startSliderDragging(e.buttons,e.posx,e.posy,e.posy,this._lastRenderData.renderedLayout)})),this._gestureDisposable=Y.o.addTarget(this._domNode.domNode),this._sliderTouchStartListener=x.nm(this._domNode.domNode,Y.t.Start,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(e))}),{passive:!1}),this._sliderTouchMoveListener=x.nm(this._domNode.domNode,Y.t.Change,(e=>{e.preventDefault(),e.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(e)}),{passive:!1}),this._sliderTouchEndListener=x.mu(this._domNode.domNode,Y.t.End,(e=>{e.preventDefault(),e.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)}))}_startSliderDragging(e,t,i,n,r){this._slider.toggleClassName("active",!0);const o=(e,n)=>{const o=Math.abs(n-t);if(T.ED&&o>140)return void this._model.setScrollTop(r.scrollTop);const s=e-i;this._model.setScrollTop(r.getDesiredScrollTopFromDelta(s))};n!==i&&o(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,hi.e,(e=>o(e.posy,e.posx)),(()=>{this._slider.toggleClassName("active",!1)}))}scrollDueToTouchEvent(e){const t=this._domNode.domNode.getBoundingClientRect().top,i=this._lastRenderData.renderedLayout.getDesiredScrollTopFromTouchLocation(e.pageY-t);this._model.setScrollTop(i)}dispose(){this._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return"always"===this._model.options.showSlider?"minimap slider-always":"minimap slider-mouseover"}getDomNode(){return this._domNode}_applyLayout(){this._domNode.setLeft(this._model.options.minimapLeft),this._domNode.setWidth(this._model.options.minimapWidth),this._domNode.setHeight(this._model.options.minimapHeight),this._shadow.setHeight(this._model.options.minimapHeight),this._canvas.setWidth(this._model.options.canvasOuterWidth),this._canvas.setHeight(this._model.options.canvasOuterHeight),this._canvas.domNode.width=this._model.options.canvasInnerWidth,this._canvas.domNode.height=this._model.options.canvasInnerHeight,this._decorationsCanvas.setWidth(this._model.options.canvasOuterWidth),this._decorationsCanvas.setHeight(this._model.options.canvasOuterHeight),this._decorationsCanvas.domNode.width=this._model.options.canvasInnerWidth,this._decorationsCanvas.domNode.height=this._model.options.canvasInnerHeight,this._slider.setWidth(this._model.options.minimapWidth)}_getBuffer(){return this._buffers||this._model.options.canvasInnerWidth>0&&this._model.options.canvasInnerHeight>0&&(this._buffers=new Ni(this._canvas.domNode.getContext("2d"),this._model.options.canvasInnerWidth,this._model.options.canvasInnerHeight,this._model.options.backgroundColor)),this._buffers?this._buffers.getBuffer():null}onDidChangeOptions(){this._lastRenderData=null,this._buffers=null,this._applyLayout(),this._domNode.setClassName(this._getMinimapDomNodeClassName())}onSelectionChanged(){return this._renderDecorations=!0,!0}onDecorationsChanged(){return this._renderDecorations=!0,!0}onFlushed(){return this._lastRenderData=null,!0}onLinesChanged(e,t){return!!this._lastRenderData&&this._lastRenderData.onLinesChanged(e,t)}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(Pt.ov3),this._renderDecorations=!0,!0}onTokensChanged(e){return!!this._lastRenderData&&this._lastRenderData.onTokensChanged(e)}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(0===this._model.options.renderMinimap)return this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),void this._sliderHorizontal.setHeight(0);e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const t=Si.create(this._model.options,e.viewportStartLineNumber,e.viewportEndLineNumber,e.viewportStartLineNumberVerticalOffset,e.viewportHeight,e.viewportContainsWhitespaceGaps,this._model.getLineCount(),this._model.getRealLineCount(),e.scrollTop,e.scrollHeight,this._lastRenderData?this._lastRenderData.renderedLayout:null);this._slider.setDisplay(t.sliderNeeded?"block":"none"),this._slider.setTop(t.sliderTop),this._slider.setHeight(t.sliderHeight),this._sliderHorizontal.setLeft(0),this._sliderHorizontal.setWidth(this._model.options.minimapWidth),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(t.sliderHeight),this.renderDecorations(t),this._lastRenderData=this.renderLines(t)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(xe.e.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort(((e,t)=>(e.options.zIndex||0)-(t.options.zIndex||0)));const{canvasInnerWidth:n,canvasInnerHeight:r}=this._model.options,o=this._model.options.minimapLineHeight,s=this._model.options.minimapCharWidth,a=this._model.getOptions().tabSize,l=this._decorationsCanvas.domNode.getContext("2d");l.clearRect(0,0,n,r);const c=new Ti(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(l,t,c,e,o),this._renderDecorationsLineHighlights(l,i,c,e,o);const h=new Ti(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(l,t,h,e,o,a,s,n),this._renderDecorationsHighlights(l,i,h,e,o,a,s,n)}}_renderSelectionLineHighlights(e,t,i,n,r){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,s=0;for(const a of t){const t=Math.max(n.startLineNumber,a.startLineNumber),l=Math.min(n.endLineNumber,a.endLineNumber);if(t>l)continue;for(let e=t;e<=l;e++)i.set(e,!0);const c=(t-n.startLineNumber)*r,h=(l-n.startLineNumber)*r+r;s>=c||(s>o&&e.fillRect(P.y0,o,e.canvas.width,s-o),o=c),s=h}s>o&&e.fillRect(P.y0,o,e.canvas.width,s-o)}_renderDecorationsLineHighlights(e,t,i,n,r){const o=new Map;for(let s=t.length-1;s>=0;s--){const a=t[s],l=a.options.minimap;if(!l||l.position!==Ci.F5.Inline)continue;const c=Math.max(n.startLineNumber,a.range.startLineNumber),h=Math.min(n.endLineNumber,a.range.endLineNumber);if(c>h)continue;const d=l.getColor(this._theme.value);if(!d||d.isTransparent())continue;let u=o.get(d.toString());u||(u=d.transparent(.5).toString(),o.set(d.toString(),u)),e.fillStyle=u;for(let t=c;t<=h;t++){if(i.has(t))continue;i.set(t,!0);const o=(c-n.startLineNumber)*r;e.fillRect(P.y0,o,e.canvas.width,r)}}}_renderSelectionsHighlights(e,t,i,n,r,o,s,a){if(this._selectionColor&&!this._selectionColor.isTransparent())for(const l of t){const t=Math.max(n.startLineNumber,l.startLineNumber),c=Math.min(n.endLineNumber,l.endLineNumber);if(!(t>c))for(let h=t;h<=c;h++)this.renderDecorationOnLine(e,i,l,this._selectionColor,n,h,r,r,o,s,a)}}_renderDecorationsHighlights(e,t,i,n,r,o,s,a){for(const l of t){const t=l.options.minimap;if(!t)continue;const c=Math.max(n.startLineNumber,l.range.startLineNumber),h=Math.min(n.endLineNumber,l.range.endLineNumber);if(c>h)continue;const d=t.getColor(this._theme.value);if(d&&!d.isTransparent())for(let u=c;u<=h;u++)switch(t.position){case Ci.F5.Inline:this.renderDecorationOnLine(e,i,l.range,d,n,u,r,r,o,s,a);continue;case Ci.F5.Gutter:{const t=(u-n.startLineNumber)*r,i=2;this.renderDecoration(e,d,i,t,2,r);continue}}}}renderDecorationOnLine(e,t,i,n,r,o,s,a,l,c,h){const d=(o-r.startLineNumber)*a;if(d+s<0||d>this._model.options.canvasInnerHeight)return;const{startLineNumber:u,endLineNumber:g}=i,f=u===o?i.startColumn:1,p=g===o?i.endColumn:this._model.getLineMaxColumn(o),m=this.getXOffsetForPosition(t,o,f,l,c,h),_=this.getXOffsetForPosition(t,o,p,l,c,h);this.renderDecoration(e,n,m,d,_-m,s)}getXOffsetForPosition(e,t,i,n,r,o){if(1===i)return P.y0;if((i-1)*r>=o)return o;let s=e.get(t);if(!s){const i=this._model.getLineContent(t);s=[P.y0];let a=P.y0;for(let e=1;e=o){s[e]=o;break}s[e]=l,a=l}e.set(t,s)}return i-1b?Math.floor((n-b)/2):0,w=d.a/255,C=new di(Math.round((d.r-h.r)*w+h.r),Math.round((d.g-h.g)*w+h.g),Math.round((d.b-h.b)*w+h.b),255);let x=0;const S=[];for(let e=0,o=i-t+1;e=0&&r_)return;const s=p.charCodeAt(y);if(9===s){const e=d-(y+w)%d;w+=e-1,b+=e*o}else if(32===s)b+=o;else{const d=Ge.K7(s)?2:1;for(let u=0;u_)return}}}}}class Ti{constructor(e,t,i){this._startLineNumber=e,this._endLineNumber=t,this._defaultValue=i,this._values=[];for(let e=0,t=this._endLineNumber-this._startLineNumber+1;ethis._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return ethis._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}(0,tt.Ic)(((e,t)=>{const i=e.getColor(Pt.CA6);i&&t.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${i}; }`);const n=e.getColor(Pt.Xy4);n&&t.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${n}; }`);const r=e.getColor(Pt.brw);r&&t.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${r}; }`);const o=e.getColor(Pt._wn);o&&t.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${o} -6px 0 6px -6px inset; }`)}));var Ii=i(7789),Mi={};Mi.styleTagTransform=b(),Mi.setAttributes=p(),Mi.insert=g().bind(null,"head"),Mi.domAPI=d(),Mi.insertStyleElement=_(),c()(Ii.Z,Mi),Ii.Z&&Ii.Z.locals&&Ii.Z.locals;class Oi extends ee{constructor(e){super(e);const t=this._context.configuration.options.get(131);this._widgets={},this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,this._domNode=(0,G.X)(document.createElement("div")),te.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const t=this._context.configuration.options.get(131);return this._verticalScrollbarWidth=t.verticalScrollbarWidth,this._minimapWidth=t.minimap.minimapWidth,this._horizontalScrollbarHeight=t.horizontalScrollbarHeight,this._editorHeight=t.height,this._editorWidth=t.width,!0}addWidget(e){const t=(0,G.X)(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()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference!==t&&(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const e=this._widgets[t].domNode.domNode;delete this._widgets[t],e.parentNode.removeChild(e),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(null!==e.preference)if(0===e.preference)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(1===e.preference){const e=t.domNode.clientHeight;t.setTop(this._editorHeight-e-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else 2===e.preference&&(t.setTop(0),t.domNode.style.right="50%");else t.unsetTop()}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let e=0,i=t.length;e=3){const t=Math.floor(n/3),i=Math.floor(n/3),r=n-t-i,o=e+t;return[[0,e,o,e,e+t+r,e,o,e],[0,t,r,t+r,i,t+r+i,r+i,t+r+i]]}if(2===i){const t=Math.floor(n/2),i=n-t;return[[0,e,e,e,e+t,e,e,e],[0,t,t,t,i,t+i,t+i,t+i]]}return[[0,e,e,e,e,e,e,e],[0,n,n,n,n,n,n,n]]}equals(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}}class Pi extends ee{constructor(e){super(e),this._domNode=(0,G.X)(document.createElement("canvas")),this._domNode.setClassName("decorationsOverviewRuler"),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._domNode.setAttribute("aria-hidden","true"),this._updateSettings(!1),this._tokensColorTrackerListener=st.RW.onDidChange((e=>{e.changedColorMap&&this._updateSettings(!0)})),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new Ri(this._context.configuration,this._context.theme);return!(this._settings&&this._settings.equals(t)||(this._settings=t,this._domNode.setTop(this._settings.top),this._domNode.setRight(this._settings.right),this._domNode.setWidth(this._settings.domWidth),this._domNode.setHeight(this._settings.domHeight),this._domNode.domNode.width=this._settings.canvasWidth,this._domNode.domNode.height=this._settings.canvasHeight,e&&this._render(),0))}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;tt&&(e=t-a),_=e-a,v=e+a}_>f+1||o!==u?(0!==e&&l.fillRect(c[u],g,h[u],f-g),u=o,g=_,f=v):v>f&&(f=v)}l.fillRect(c[u],g,h[u],f-g)}if(!this._settings.hideCursor&&this._settings.cursorColor){const e=2*this._settings.pixelRatio|0,i=e/2|0,o=this._settings.x[7],s=this._settings.w[7];l.fillStyle=this._settings.cursorColor;let a=-100,c=-100;for(let h=0,d=this._cursorPositions.length;ht&&(u=t-i);const g=u-i,f=g+e;g>c+1?(0!==h&&l.fillRect(o,a,s,c-a),a=g,c=f):f>c&&(c=f)}l.fillRect(o,a,s,c-a)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(l.beginPath(),l.lineWidth=1,l.strokeStyle=this._settings.borderColor,l.moveTo(0,0),l.lineTo(0,t),l.stroke(),l.moveTo(0,0),l.lineTo(e,0),l.stroke())}}var Fi=i(665);class Bi extends J{constructor(e,t){super(),this._context=e;const i=this._context.configuration.options;this._domNode=(0,G.X)(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new Fi.Tj((e=>this._context.viewLayout.getVerticalOffsetForLineNumber(e))),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(59)),this._zoneManager.setPixelRatio(i.get(129)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(59)&&(this._zoneManager.setLineHeight(t.get(59)),this._render()),e.hasChanged(129)&&(this._zoneManager.setPixelRatio(t.get(129)),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}onFlushed(e){return this._render(),!0}onScrollChanged(e){return e.scrollHeightChanged&&(this._zoneManager.setOuterHeight(e.scrollHeight),this._render()),!0}onZonesChanged(e){return this._render(),!0}getDomNode(){return this._domNode.domNode}setLayout(e){this._domNode.setTop(e.top),this._domNode.setRight(e.right);let t=!1;t=this._zoneManager.setDOMWidth(e.width)||t,t=this._zoneManager.setDOMHeight(e.height)||t,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())}setZones(e){this._zoneManager.setZones(e),this._render()}_render(){if(0===this._zoneManager.getOuterHeight())return!1;const e=this._zoneManager.getCanvasWidth(),t=this._zoneManager.getCanvasHeight(),i=this._zoneManager.resolveColorZones(),n=this._zoneManager.getId2Color(),r=this._domNode.domNode.getContext("2d");return r.clearRect(0,0,e,t),i.length>0&&this._renderOneLane(r,i,n,e),!0}_renderOneLane(e,t,i,n){let r=0,o=0,s=0;for(const a of t){const t=a.colorId,l=a.from,c=a.to;t!==r?(e.fillRect(0,o,n,s-o),r=t,e.fillStyle=i[r],o=l,s=c):s>=l?s=Math.max(s,c):(e.fillRect(0,o,n,s-o),o=l,s=c)}e.fillRect(0,o,n,s-o)}}var Wi=i(7073),Vi={};Vi.styleTagTransform=b(),Vi.setAttributes=p(),Vi.insert=g().bind(null,"head"),Vi.domAPI=d(),Vi.insertStyleElement=_(),c()(Wi.Z,Vi),Wi.Z&&Wi.Z.locals&&Wi.Z.locals;class zi extends ee{constructor(e){super(e),this.domNode=(0,G.X)(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.domNode.setClassName("view-rulers"),this._renderedRulers=[];const t=this._context.configuration.options;this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(91),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e0;){const e=(0,G.X)(document.createElement("div"));e.setClassName("view-ruler"),e.setWidth(n),this.domNode.appendChild(e),this._renderedRulers.push(e),r--}return}let i=e-t;for(;i>0;){const e=this._renderedRulers.pop();this.domNode.removeChild(e),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t{const i=e.getColor(et.zk);i&&t.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${i} inset; }`)}));var Hi=i(458),ji={};ji.styleTagTransform=b(),ji.setAttributes=p(),ji.insert=g().bind(null,"head"),ji.domAPI=d(),ji.insertStyleElement=_(),c()(Hi.Z,ji),Hi.Z&&Hi.Z.locals&&Hi.Z.locals;class Ui extends ee{constructor(e){super(e),this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const t=this._context.configuration.options.get(92);this._useShadows=t.useShadows,this._domNode=(0,G.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e&&(this._shouldShow=e,!0)}getDomNode(){return this._domNode}_updateWidth(){const e=this._context.configuration.options.get(131);0===e.minimap.renderMinimap||e.minimap.minimapWidth>0&&0===e.minimap.minimapLeft?this._width=e.width:this._width=e.width-e.minimap.minimapWidth-e.verticalScrollbarWidth}onConfigurationChanged(e){const t=this._context.configuration.options.get(92);return this._useShadows=t.useShadows,this._updateWidth(),this._updateShouldShow(),!0}onScrollChanged(e){return this._scrollTop=e.scrollTop,this._updateShouldShow()}prepareRender(e){}render(e){this._domNode.setWidth(this._width),this._domNode.setClassName(this._shouldShow?"scroll-decoration":"")}}(0,tt.Ic)(((e,t)=>{const i=e.getColor(Pt._wn);i&&t.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${i} 0 6px 6px -6px inset; }`)}));var $i=i(3147),Ki={};Ki.styleTagTransform=b(),Ki.setAttributes=p(),Ki.insert=g().bind(null,"head"),Ki.domAPI=d(),Ki.insertStyleElement=_(),c()($i.Z,Ki),$i.Z&&$i.Z.locals&&$i.Z.locals;class qi{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class Gi{constructor(e,t){this.lineNumber=e,this.ranges=t}}function Yi(e){return new qi(e)}function Zi(e){return new Gi(e.lineNumber,e.ranges.map(Yi))}class Qi extends Je{constructor(e){super(),this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,this._selections=[],this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._lineHeight=t.get(59),this._roundedSelection=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(44).typicalHalfwidthCharacterWidth,!0}onCursorStateChanged(e){return this._selections=e.selections.slice(0),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return e.scrollTopChanged}onZonesChanged(e){return!0}_visibleRangesHaveGaps(e){for(let t=0,i=e.length;t1)return!0;return!1}_enrichVisibleRangesWithStyle(e,t,i){const n=this._typicalHalfwidthCharacterWidth/4;let r=null,o=null;if(i&&i.length>0&&t.length>0){const n=t[0].lineNumber;if(n===e.startLineNumber)for(let e=0;!r&&e=0;e--)i[e].lineNumber===s&&(o=i[e].ranges[0]);r&&!r.startStyle&&(r=null),o&&!o.startStyle&&(o=null)}for(let e=0,i=t.length;e0){const i=t[e-1].ranges[0].left,r=t[e-1].ranges[0].left+t[e-1].ranges[0].width;Xi(a-i)i&&(c.top=1),Xi(l-r)'}_actualRenderOneSelection(e,t,i,n){if(0===n.length)return;const r=!!n[0].ranges[0].startStyle,o=this._lineHeight.toString(),s=(this._lineHeight-1).toString(),a=n[0].lineNumber,l=n[n.length-1].lineNumber;for(let c=0,h=n.length;c1,s)}this._previousFrameVisibleRangesWithStyle=r,this._renderResult=t.map((([e,t])=>e+t))}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}function Xi(e){return e<0?-e:e}Qi.SELECTION_CLASS_NAME="selected-text",Qi.SELECTION_TOP_LEFT="top-left-radius",Qi.SELECTION_BOTTOM_LEFT="bottom-left-radius",Qi.SELECTION_TOP_RIGHT="top-right-radius",Qi.SELECTION_BOTTOM_RIGHT="bottom-right-radius",Qi.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background",Qi.ROUNDED_PIECE_WIDTH=10,(0,tt.Ic)(((e,t)=>{const i=e.getColor(Pt.hEj);i&&t.addRule(`.monaco-editor .focused .selected-text { background-color: ${i}; }`);const n=e.getColor(Pt.ES4);n&&t.addRule(`.monaco-editor .selected-text { background-color: ${n}; }`);const r=e.getColor(Pt.yb5);r&&!r.isTransparent()&&t.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${r}; }`)}));var Ji=i(6649),en={};en.styleTagTransform=b(),en.setAttributes=p(),en.insert=g().bind(null,"head"),en.domAPI=d(),en.insertStyleElement=_(),c()(Ji.Z,en),Ji.Z&&Ji.Z.locals&&Ji.Z.locals;class tn{constructor(e,t,i,n,r,o){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=r,this.textContentClassName=o}}class nn{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(44);this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=(0,G.X)(document.createElement("div")),this._domNode.setClassName(`cursor ${ot.S}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),(0,Ye.N)(this._domNode,i),this._domNode.setDisplay("none"),this._position=new Ce.L(1,1),this._lastRenderedContent="",this._renderData=null}getDomNode(){return this._domNode}getPosition(){return this._position}show(){this._isVisible||(this._domNode.setVisibility("inherit"),this._isVisible=!0)}hide(){this._isVisible&&(this._domNode.setVisibility("hidden"),this._isVisible=!1)}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(44);return this._cursorStyle=t.get(24),this._lineHeight=t.get(59),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),(0,Ye.N)(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_getGraphemeAwarePosition(){const{lineNumber:e,column:t}=this._position,i=this._context.viewModel.getLineContent(e),[n,r]=Ge.J_(i,t-1);return[new Ce.L(e,n+1),i.substring(n,r)]}_prepareRender(e){let t="";const[i,n]=this._getGraphemeAwarePosition();if(this._cursorStyle===P.d2.Line||this._cursorStyle===P.d2.LineThin){const r=e.visibleRangeForPosition(i);if(!r||r.outsideRenderedLine)return null;let o;this._cursorStyle===P.d2.Line?(o=x.Uh(this._lineCursorWidth>0?this._lineCursorWidth:2),o>2&&(t=n)):o=x.Uh(1);let s=r.left;o>=2&&s>=1&&(s-=1);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta;return new tn(a,s,o,this._lineHeight,t,"")}const r=e.linesVisibleRangesForRange(new xe.e(i.lineNumber,i.column,i.lineNumber,i.column+n.length),!1);if(!r||0===r.length)return null;const o=r[0];if(o.outsideRenderedLine||0===o.ranges.length)return null;const s=o.ranges[0],a=s.width<1?this._typicalHalfwidthCharacterWidth:s.width;let l="";if(this._cursorStyle===P.d2.Block){const e=this._context.viewModel.getViewLineData(i.lineNumber);t=n;const r=e.tokens.findTokenIndexAtOffset(i.column-1);l=e.tokens.getClassName(r)}let c=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.bigNumbersDelta,h=this._lineHeight;return this._cursorStyle!==P.d2.Underline&&this._cursorStyle!==P.d2.UnderlineThin||(c+=this._lineHeight-2,h=2),new tn(c,s.left,a,h,t,l)}prepareRender(e){this._renderData=this._prepareRender(e)}render(e){return this._renderData?(this._lastRenderedContent!==this._renderData.textContent&&(this._lastRenderedContent=this._renderData.textContent,this._domNode.domNode.textContent=this._lastRenderedContent),this._domNode.setClassName(`cursor ${ot.S} ${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)}}class rn extends ee{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new nn(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=(0,G.X)(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._updateDomClassName(),this._domNode.appendChild(this._primaryCursor.getDomNode()),this._startCursorBlinkAnimation=new Q._F,this._cursorFlatBlinkInterval=new Q.zh,this._blinkingEnabled=!1,this._editorHasFocus=!1,this._updateBlinking()}dispose(){super.dispose(),this._startCursorBlinkAnimation.dispose(),this._cursorFlatBlinkInterval.dispose()}getDomNode(){return this._domNode}onCompositionStart(e){return this._isComposingInput=!0,this._updateBlinking(),!0}onCompositionEnd(e){return this._isComposingInput=!1,this._updateBlinking(),!0}onConfigurationChanged(e){const t=this._context.configuration.options;this._readOnly=t.get(81),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let t=0,i=this._secondaryCursors.length;tt.length){const e=this._secondaryCursors.length-t.length;for(let t=0;t{for(let i=0,n=e.ranges.length;i{this._isVisible?this._hide():this._show()}),rn.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet((()=>{this._blinkingEnabled=!0,this._updateDomClassName()}),rn.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case P.d2.Line:e+=" cursor-line-style";break;case P.d2.Block:e+=" cursor-block-style";break;case P.d2.Underline:e+=" cursor-underline-style";break;case P.d2.LineThin:e+=" cursor-line-thin-style";break;case P.d2.BlockOutline:e+=" cursor-block-outline-style";break;case P.d2.UnderlineThin:e+=" cursor-underline-thin-style";break;default:e+=" cursor-line-style"}if(this._blinkingEnabled)switch(this._getCursorBlinking()){case 1:e+=" cursor-blink";break;case 2:e+=" cursor-smooth";break;case 3:e+=" cursor-phase";break;case 4:e+=" cursor-expand";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e{const i=e.getColor(et.n0);if(i){let n=e.getColor(et.fY);n||(n=i.opposite()),t.addRule(`.monaco-editor .inputarea.ime-input { caret-color: ${i}; }`),t.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${i}; border-color: ${i}; color: ${n}; }`),"hc"===e.type&&t.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${n}; border-right: 1px solid ${n}; }`)}}));const on=()=>{throw new Error("Invalid change accessor")};class sn extends ee{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(131);this._lineHeight=t.get(59),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=(0,G.X)(document.createElement("div")),this.domNode.setClassName("view-zones"),this.domNode.setPosition("absolute"),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this.marginDomNode=(0,G.X)(document.createElement("div")),this.marginDomNode.setClassName("margin-view-zones"),this.marginDomNode.setPosition("absolute"),this.marginDomNode.setAttribute("role","presentation"),this.marginDomNode.setAttribute("aria-hidden","true"),this._zones={}}dispose(){super.dispose(),this._zones={}}_recomputeWhitespacesProps(){const e=this._context.viewLayout.getWhitespaces(),t=new Map;for(const i of e)t.set(i.id,i);let i=!1;return this._context.viewModel.changeWhitespace((e=>{const n=Object.keys(this._zones);for(let r=0,o=n.length;r{const n={addZone:e=>(t=!0,this._addZone(i,e)),removeZone:e=>{e&&(t=this._removeZone(i,e)||t)},layoutZone:e=>{e&&(t=this._layoutZone(i,e)||t)}};!function(e,t){try{e(t)}catch(e){(0,S.dL)(e)}}(e,n),n.addZone=on,n.removeZone=on,n.layoutZone=on})),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),n={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isInHiddenArea:i.isInHiddenArea,isVisible:!1,domNode:(0,G.X)(t.domNode),marginDomNode:t.marginDomNode?(0,G.X)(t.marginDomNode):null};return this._safeCallOnComputedHeight(n.delegate,i.heightInPx),n.domNode.setPosition("absolute"),n.domNode.domNode.style.width="100%",n.domNode.setDisplay("none"),n.domNode.setAttribute("monaco-view-zone",n.whitespaceId),this.domNode.appendChild(n.domNode),n.marginDomNode&&(n.marginDomNode.setPosition("absolute"),n.marginDomNode.domNode.style.width="100%",n.marginDomNode.setDisplay("none"),n.marginDomNode.setAttribute("monaco-view-zone",n.whitespaceId),this.marginDomNode.appendChild(n.marginDomNode)),this._zones[n.whitespaceId]=n,this.setShouldRender(),n.whitespaceId}_removeZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t];return delete this._zones[t],e.removeWhitespace(i.whitespaceId),i.domNode.removeAttribute("monaco-visible-view-zone"),i.domNode.removeAttribute("monaco-view-zone"),i.domNode.domNode.parentNode.removeChild(i.domNode.domNode),i.marginDomNode&&(i.marginDomNode.removeAttribute("monaco-visible-view-zone"),i.marginDomNode.removeAttribute("monaco-view-zone"),i.marginDomNode.domNode.parentNode.removeChild(i.marginDomNode.domNode)),this.setShouldRender(),!0}return!1}_layoutZone(e,t){if(this._zones.hasOwnProperty(t)){const i=this._zones[t],n=this._computeWhitespaceProps(i.delegate);return i.isInHiddenArea=n.isInHiddenArea,e.changeOneWhitespace(i.whitespaceId,n.afterViewLineNumber,n.heightInPx),this._safeCallOnComputedHeight(i.delegate,n.heightInPx),this.setShouldRender(),!0}return!1}shouldSuppressMouseDownOnViewZone(e){if(this._zones.hasOwnProperty(e)){const t=this._zones[e];return Boolean(t.delegate.suppressMouseDown)}return!1}_heightInPixels(e){return"number"==typeof e.heightInPx?e.heightInPx:"number"==typeof e.heightInLines?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return"number"==typeof e.minWidthInPx?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if("function"==typeof e.onComputedHeight)try{e.onComputedHeight(t)}catch(e){(0,S.dL)(e)}}_safeCallOnDomNodeTop(e,t){if("function"==typeof e.onDomNodeTop)try{e.onDomNodeTop(t)}catch(e){(0,S.dL)(e)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(const e of t)this._zones[e.id].isInHiddenArea||(i[e.id]=e,n=!0);const r=Object.keys(this._zones);for(let t=0,n=r.length;t{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new Ee(e,t)},shouldSuppressMouseDownOnViewZone:e=>this._viewZones.shouldSuppressMouseDownOnViewZone(e),shouldSuppressMouseDownOnWidget:e=>this._contentWidgets.shouldSuppressMouseDownOnWidget(e),getPositionFromDOMInfo:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getPositionFromDOMInfo(e,t)),visibleRangeForPosition:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new Ce.L(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPosition:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(e))}}_applyLayout(){const e=this._context.configuration.options.get(131);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)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(128)+" "+(0,tt.m6)(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this._context.theme.update(e.theme),this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){null!==this._renderAnimationFrame&&(this._renderAnimationFrame.dispose(),this._renderAnimationFrame=null),this._contentWidgets.overflowingContentWidgetsDomNode.domNode.remove(),this._context.removeEventHandler(this),this._viewLines.dispose();for(const e of this._viewParts)e.dispose();super.dispose()}_scheduleRender(){null===this._renderAnimationFrame&&(this._renderAnimationFrame=x.lI(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){!function(e){try{e()}catch(e){(0,S.dL)(e)}}((()=>this._actualRender()))}_getViewPartsToRender(){const e=[];let t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!x.Uw(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&0===e.length)return;const t=this._context.viewLayout.getLinesViewportData();this._context.viewModel.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new cn(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.viewModel);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new ie(this._context.viewLayout,i,this._viewLines);for(const t of e)t.prepareRender(n);for(const t of e)t.render(n),t.onDidRender()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.viewModel.viewLayout.setScrollPosition({scrollTop:e.scrollTop},1),this._context.viewModel.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.viewModel.viewLayout.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.viewModel.model.validatePosition({lineNumber:e,column:t}),n=this._context.viewModel.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const r=this._viewLines.visibleRangeForPosition(new Ce.L(n.lineNumber,n.column));return r?r.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?gt.convertViewToModelMouseTarget(i,this._context.viewModel.coordinatesConverter):null}createOverviewRuler(e){return new Bi(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const e of this._viewParts)e.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}focus(){this._textAreaHandler.focusTextArea()}isFocused(){return this._textAreaHandler.isFocused()}setAriaOptions(e){this._textAreaHandler.setAriaOptions(e)}addContentWidget(e){this._contentWidgets.addWidget(e.widget),this.layoutContentWidget(e),this._scheduleRender()}layoutContentWidget(e){let t=e.position&&e.position.range||null;if(null===t){const i=e.position?e.position.position:null;null!==i&&(t=new xe.e(i.lineNumber,i.column,i.lineNumber,i.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),this._scheduleRender()}removeContentWidget(e){this._contentWidgets.removeWidget(e.widget),this._scheduleRender()}addOverlayWidget(e){this._overlayWidgets.addWidget(e.widget),this.layoutOverlayWidget(e),this._scheduleRender()}layoutOverlayWidget(e){const t=e.position?e.position.preference:null;this._overlayWidgets.setWidgetPosition(e.widget,t)&&this._scheduleRender()}removeOverlayWidget(e){this._overlayWidgets.removeWidget(e.widget),this._scheduleRender()}}var dn=i(5343);class un{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new dn.rS(new xe.e(1,1,1,1),0,new Ce.L(1,1),0),new dn.rS(new xe.e(1,1,1,1),0,new Ce.L(1,1),0))}dispose(e){this._removeTrackedRange(e)}startTrackingSelection(e){this._trackSelection=!0,this._updateTrackedRange(e)}stopTrackingSelection(e){this._trackSelection=!1,this._removeTrackedRange(e)}_updateTrackedRange(e){this._trackSelection&&(this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,this.modelState.selection,0))}_removeTrackedRange(e){this._selTrackedRange=e.model._setTrackedRange(this._selTrackedRange,null,0)}asCursorState(){return new dn.Vi(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return q.Y.fromRange(t,this.modelState.selection.getDirection())}ensureValidState(e){this._setState(e,this.modelState,this.viewState)}setState(e,t,i){this._setState(e,t,i)}static _validatePositionWithCache(e,t,i,n){return t.equals(i)?n:e.normalizePosition(t,2)}static _validateViewState(e,t){const i=t.position,n=t.selectionStart.getStartPosition(),r=t.selectionStart.getEndPosition(),o=e.normalizePosition(i,2),s=this._validatePositionWithCache(e,n,i,o),a=this._validatePositionWithCache(e,r,n,s);return i.equals(o)&&n.equals(s)&&r.equals(a)?t:new dn.rS(xe.e.fromPositions(s,a),t.selectionStartLeftoverVisibleColumns+n.column-s.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=un._validateViewState(e.viewModel,i)),t){const i=e.model.validateRange(t.selectionStart),n=t.selectionStart.equalsRange(i)?t.selectionStartLeftoverVisibleColumns:0,r=e.model.validatePosition(t.position),o=t.position.equals(r)?t.leftoverVisibleColumns:0;t=new dn.rS(i,n,r,o)}else{if(!i)return;const n=e.model.validateRange(e.coordinatesConverter.convertViewRangeToModelRange(i.selectionStart)),r=e.model.validatePosition(e.coordinatesConverter.convertViewPositionToModelPosition(i.position));t=new dn.rS(n,i.selectionStartLeftoverVisibleColumns,r,i.leftoverVisibleColumns)}if(i){const n=e.coordinatesConverter.validateViewRange(i.selectionStart,t.selectionStart),r=e.coordinatesConverter.validateViewPosition(i.position,t.position);i=new dn.rS(n,t.selectionStartLeftoverVisibleColumns,r,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new Ce.L(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),r=e.coordinatesConverter.convertModelPositionToViewPosition(new Ce.L(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new xe.e(n.lineNumber,n.column,r.lineNumber,r.column),s=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new dn.rS(o,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class gn{constructor(e){this.context=e,this.cursors=[new un(e)],this.lastAddedCursorIndex=0}dispose(){for(const e of this.cursors)e.dispose(this.context)}startTrackingSelections(){for(const e of this.cursors)e.startTrackingSelection(this.context)}stopTrackingSelections(){for(const e of this.cursors)e.stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){for(const e of this.cursors)e.ensureValidState(this.context)}readSelectionFromMarkers(){return this.cursors.map((e=>e.readSelectionFromMarkers(this.context)))}getAll(){return this.cursors.map((e=>e.asCursorState()))}getViewPositions(){return this.cursors.map((e=>e.viewState.position))}getTopMostViewPosition(){return(0,D.VJ)(this.cursors,(0,D.tT)((e=>e.viewState.position),Ce.L.compare)).viewState.position}getBottomMostViewPosition(){return(0,D.jV)(this.cursors,(0,D.tT)((e=>e.viewState.position),Ce.L.compare)).viewState.position}getSelections(){return this.cursors.map((e=>e.modelState.selection))}getViewSelections(){return this.cursors.map((e=>e.viewState.selection))}setSelections(e){this.setStates(dn.Vi.fromModelSelections(e))}getPrimaryCursor(){return this.cursors[0].asCursorState()}setStates(e){null!==e&&(this.cursors[0].setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.cursors.length-1,i=e.length;if(ti){const e=t-i;for(let t=0;t=e+1&&this.lastAddedCursorIndex--,this.cursors[e+1].dispose(this.context),this.cursors.splice(e+1,1)}normalize(){if(1===this.cursors.length)return;const e=this.cursors.slice(0),t=[];for(let i=0,n=e.length;ie.selection),xe.e.compareRangesUsingStarts));for(let i=0;ia&&e.index--;e.splice(a,1),t.splice(s,1),this._removeSecondaryCursor(a-1),i--}}}}class fn{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}var pn=i(9436),mn=i(1336),_n=i(4706);class vn{constructor(){this.type=0}}class bn{constructor(){this.type=1}}class yn{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class wn{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class Cn{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class xn{constructor(){this.type=5}}class Sn{constructor(e){this.type=6,this.isFocused=e}}class kn{constructor(){this.type=7}}class Ln{constructor(){this.type=8}}class Nn{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class En{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class Dn{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class An{constructor(e,t,i,n,r,o,s){this.source=e,this.minimalReveal=t,this.range=i,this.selections=n,this.verticalType=r,this.revealHorizontal=o,this.scrollType=s,this.type=12}}class Tn{constructor(e){this.type=13,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}}class In{constructor(e){this.theme=e,this.type=14}}class Mn{constructor(e){this.type=15,this.ranges=e}}class On{constructor(){this.type=16}}class Rn{constructor(){this.type=17}}class Pn extends L.JT{constructor(){super(),this._onEvent=this._register(new k.Q5),this.onEvent=this._onEvent.event,this._eventHandlers=[],this._viewEventQueue=null,this._isConsumingViewEventQueue=!1,this._collector=null,this._collectorCnt=0,this._outgoingEvents=[]}emitOutgoingEvent(e){this._addOutgoingEvent(e),this._emitOutgoingEvents()}_addOutgoingEvent(e){for(let t=0,i=this._outgoingEvents.length;t0;){if(this._collector||this._isConsumingViewEventQueue)return;const e=this._outgoingEvents.shift();e.isNoOp()||this._onEvent.fire(e)}}addViewEventHandler(e){for(let t=0,i=this._eventHandlers.length;t0&&this._emitMany(t)}this._emitOutgoingEvents()}emitSingleViewEvent(e){try{this.beginEmitViewEvents().emitViewEvent(e)}finally{this.endEmitViewEvents()}}_emitMany(e){this._viewEventQueue?this._viewEventQueue=this._viewEventQueue.concat(e):this._viewEventQueue=e,this._isConsumingViewEventQueue||this._consumeViewEventQueue()}_consumeViewEventQueue(){try{this._isConsumingViewEventQueue=!0,this._doConsumeQueue()}finally{this._isConsumingViewEventQueue=!1}}_doConsumeQueue(){for(;this._viewEventQueue;){const e=this._viewEventQueue;this._viewEventQueue=null;const t=this._eventHandlers.slice(0);for(const i of t)i.handleEvents(e)}}}class Fn{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class Bn{constructor(e,t,i,n){this.kind=0,this._oldContentWidth=e,this._oldContentHeight=t,this.contentWidth=i,this.contentHeight=n,this.contentWidthChanged=this._oldContentWidth!==this.contentWidth,this.contentHeightChanged=this._oldContentHeight!==this.contentHeight}isNoOp(){return!this.contentWidthChanged&&!this.contentHeightChanged}merge(e){return 0!==e.kind?this:new Bn(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class Wn{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return 1!==e.kind?this:new Wn(this.oldHasFocus,e.hasFocus)}}class Vn{constructor(e,t,i,n,r,o,s,a){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=r,this.scrollLeft=o,this.scrollHeight=s,this.scrollTop=a,this.scrollWidthChanged=this._oldScrollWidth!==this.scrollWidth,this.scrollLeftChanged=this._oldScrollLeft!==this.scrollLeft,this.scrollHeightChanged=this._oldScrollHeight!==this.scrollHeight,this.scrollTopChanged=this._oldScrollTop!==this.scrollTop}isNoOp(){return!(this.scrollWidthChanged||this.scrollLeftChanged||this.scrollHeightChanged||this.scrollTopChanged)}merge(e){return 2!==e.kind?this:new Vn(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class zn{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Hn{constructor(e,t,i,n,r,o,s){this.kind=6,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=r,this.reason=o,this.reachedMaxCursorCount=s}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length;if(i!==t.length)return!1;for(let n=0;n0){const e=this._cursors.getSelections();for(let t=0;tUn.MAX_CURSOR_COUNT&&(n=n.slice(0,Un.MAX_CURSOR_COUNT),r=!0);const o=$n.from(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,o,r)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n,r,o){const s=this._cursors.getViewPositions();let a=null,l=null;s.length>1?l=this._cursors.getViewSelections():a=xe.e.fromPositions(s[0],s[0]),e.emitViewEvent(new An(t,i,a,l,n,r,o))}saveState(){const e=[],t=this._cursors.getSelections();for(let i=0,n=t.length;i0){const i=dn.Vi.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,i)&&this.revealPrimary(e,"modelChange",!1,0,!0,0)}else{const t=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,dn.Vi.fromModelSelections(t))}}}getSelection(){return this._cursors.getPrimaryCursor().modelState.selection}getTopMostViewPosition(){return this._cursors.getTopMostViewPosition()}getBottomMostViewPosition(){return this._cursors.getBottomMostViewPosition()}getCursorColumnSelectData(){if(this._columnSelectData)return this._columnSelectData;const e=this._cursors.getPrimaryCursor(),t=e.viewState.selectionStart.getStartPosition(),i=e.viewState.position;return{isReal:!1,fromViewLineNumber:t.lineNumber,fromViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:this.context.cursorConfig.visibleColumnFromColumn(this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,dn.Vi.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){const i=[],n=[];for(let r=0,o=e.length;r0&&(o[0]._isTracked=!0);let s=e.model.pushEditOperations(e.selectionsBefore,o,(i=>{const n=[];for(let t=0;te.identifier.minor-t.identifier.minor,o=[];for(let i=0;i0?(n[i].sort(r),o[i]=t[i].computeCursorState(e.model,{getInverseEditOperations:()=>n[i],getTrackedSelection:t=>{const i=parseInt(t,10),n=e.model._getTrackedRange(e.trackedRanges[i]);return 0===e.trackedRangesDirection[i]?new q.Y(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new q.Y(n.endLineNumber,n.endColumn,n.startLineNumber,n.startColumn)}})):o[i]=e.selectionsBefore[i];return o}));s||(s=e.selectionsBefore);const a=[];for(let e in r)r.hasOwnProperty(e)&&a.push(parseInt(e,10));a.sort(((e,t)=>t-e));for(const e of a)s.splice(e,1);return s}static _arrayIsEmpty(e){for(let t=0,i=e.length;t{xe.e.isEmpty(e)&&""===o||n.push({identifier:{major:t,minor:r++},range:e,text:o,forceMoveMarkers:s,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let s=!1;const a={addEditOperation:o,addTrackedEditOperation:(e,t,i)=>{s=!0,o(e,t,i)},trackSelection:(t,i)=>{const n=q.Y.liftSelection(t);let r;if(n.isEmpty())if("boolean"==typeof i)r=i?2:3;else{const t=e.model.getLineMaxColumn(n.startLineNumber);r=n.startColumn===t?2:3}else r=1;const o=e.trackedRanges.length,s=e.model._setTrackedRange(null,n,r);return e.trackedRanges[o]=s,e.trackedRangesDirection[o]=n.getDirection(),o.toString()}};try{i.getEditOperations(e.model,a)}catch(e){return(0,S.dL)(e),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:s}}static _getLoserCursorMap(e){(e=e.slice(0)).sort(((e,t)=>-xe.e.compareRangesUsingEnds(e.range,t.range)));const t={};for(let i=1;ir.identifier.major?n.identifier.major:r.identifier.major,t[o.toString()]=!0;for(let t=0;t0&&i--}}return t}}.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);const i=[],n=[];for(let t=0;t0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){e&&0!==e.length||(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,r){const o=$n.from(this._model,this);if(o.equals(n))return!1;const s=this._cursors.getSelections(),a=this._cursors.getViewSelections();if(e.emitViewEvent(new wn(a,s)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some(((e,t)=>!e.modelState.equals(n.cursorState[t].modelState)))){const a=n?n.cursorState.map((e=>e.modelState.selection)):null,l=n?n.modelVersionId:0;e.emitOutgoingEvent(new Hn(a,s,l,o.modelVersionId,t||"keyboard",i,r))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;const t=[];for(let i=0,n=e.length;i=0)return null;const r=n.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!r)return null;const o=r[1],s=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(o);if(!s||1!==s.length)return null;const a=s[0].open,l=n.text.length-r[2].length-1,c=n.text.lastIndexOf(a,l-1);if(-1===c)return null;t.push([c,l])}return t}executeEdits(e,t,i,n){let r=null;"snippet"===t&&(r=this._findAutoClosingPairs(i)),r&&(i[0]._isTracked=!0);const o=[],s=[],a=this._model.pushEditOperations(this.getSelections(),i,(e=>{if(r)for(let t=0,i=r.length;t0&&this._pushAutoClosedAction(o,s)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const r=$n.from(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(e){(0,S.dL)(e)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,r,!1)&&this.revealPrimary(t,i,!1,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return Kn.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit((()=>{"keyboard"===t&&(this._executeEditOperation(mn.u.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)}),e,t)}type(e,t,i){this._executeEdit((()=>{if("keyboard"===i){const e=t.length;let i=0;for(;i{this._executeEditOperation(mn.u.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,r))}),e,o);else if(0!==r){const t=this.getSelections().map((e=>{const t=e.getPosition();return new q.Y(t.lineNumber,t.column+r,t.lineNumber,t.column+r)}));this.setSelections(e,o,t,0)}}paste(e,t,i,n,r){this._executeEdit((()=>{this._executeEditOperation(mn.u.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))}),e,r,4)}cut(e,t){this._executeEdit((()=>{this._executeEditOperation(pn.A.cut(this.context.cursorConfig,this._model,this.getSelections()))}),e,t)}executeCommand(e,t,i){this._executeEdit((()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new dn.Tp(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}executeCommands(e,t,i){this._executeEdit((()=>{this._executeEditOperation(new dn.Tp(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))}),e,i)}}Un.MAX_CURSOR_COUNT=1e4;class $n{constructor(e,t){this.modelVersionId=e,this.cursorState=t}static from(e,t){return new $n(e.getVersionId(),t.getCursorStates())}equals(e){if(!e)return!1;if(this.modelVersionId!==e.modelVersionId)return!1;if(this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t=t.length)return!1;if(!t[i].strictContainsRange(e[i]))return!1}return!0}}var qn=i(653),Gn=i(6518),Yn=i(9102),Zn=i(8801),Qn=i(2963),Xn=i(6633);class Jn{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class er{constructor(e,t,i,n,r){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=r,this.prefixSum=0}}class tr{constructor(e,t,i,n){this._instanceId=Ge.PJ(++tr.INSTANCE_COUNT),this._pendingChanges=new Jn,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,r=e.length;for(;n>>1;t===e[o].afterLineNumber?i{t=!0,e|=0,i|=0,n|=0,r|=0;const o=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new er(o,e,i,n,r)),o},changeOneWhitespace:(e,i,n)=>{t=!0,i|=0,n|=0,this._pendingChanges.change({id:e,newAfterLineNumber:i,newHeight:n})},removeWhitespace:e=>{t=!0,this._pendingChanges.remove({id:e})}})}finally{this._pendingChanges.commit(this)}return t}_commitPendingChanges(e,t,i){if((e.length>0||i.length>0)&&(this._minWidth=-1),e.length+t.length+i.length<=1){for(const t of e)this._insertWhitespace(t);for(const e of t)this._changeOneWhitespace(e.id,e.newAfterLineNumber,e.newHeight);for(const e of i){const t=this._findWhitespaceIndex(e.id);-1!==t&&this._removeWhitespace(t)}return}const n=new Set;for(const e of i)n.add(e.id);const r=new Map;for(const e of t)r.set(e.id,e);const o=e=>{const t=[];for(const i of e)if(!n.has(i.id)){if(r.has(i.id)){const e=r.get(i.id);i.afterLineNumber=e.newAfterLineNumber,i.height=e.newHeight}t.push(i)}return t},s=o(this._arr).concat(o(e));s.sort(((e,t)=>e.afterLineNumber===t.afterLineNumber?e.ordinal-t.ordinal:e.afterLineNumber-t.afterLineNumber)),this._arr=s,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=tr.findInsertionIndex(this._arr,e.afterLineNumber,e.ordinal);this._arr.splice(t,0,e),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,t-1)}_findWhitespaceIndex(e){const t=this._arr;for(let i=0,n=t.length;it&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e|=0,t|=0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i=t.length||t[r+1].afterLineNumber>=e)return r;i=r+1|0}else n=r-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e|=0;const t=this._findLastWhitespaceBeforeLineNumber(e)+1;return t1?this._lineHeight*(e-1):0,t+this.getWhitespaceAccumulatedHeightBeforeLineNumber(e)+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),-1===this._minWidth){let e=0;for(let t=0,i=this._arr.length;tthis.getLinesTotalHeight()}isInTopPadding(e){return 0!==this._paddingTop&&(this._checkPendingChanges(),e=this.getLinesTotalHeight()-this._paddingBottom)}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),(e|=0)<0)return 1;const t=0|this._lineCount,i=this._lineHeight;let n=1,r=t;for(;n=o+i)n=t+1;else{if(e>=o)return t;r=t}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this._lineHeight,n=0|this.getLineNumberAtOrAfterVerticalOffset(e),r=0|this.getVerticalOffsetForLineNumber(n);let o=0|this._lineCount,s=0|this.getFirstWhitespaceIndexAfterLineNumber(n);const a=0|this.getWhitespacesCount();let l,c;-1===s?(s=a,c=o+1,l=0):(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));let h=r,d=h;const u=5e5;let g=0;r>=u&&(g=Math.floor(r/u)*u,g=Math.floor(g/i)*i,d-=g);const f=[],p=e+(t-e)/2;let m=-1;for(let e=n;e<=o;e++){if(-1===m){const t=h,n=h+i;(t<=p&&pp)&&(m=e)}for(h+=i,f[e-n]=d,d+=i;c===e;)d+=l,h+=l,s++,s>=a?c=o+1:(c=0|this.getAfterLineNumberForWhitespaceIndex(s),l=0|this.getHeightForWhitespaceIndex(s));if(h>=t){o=e;break}}-1===m&&(m=o);const _=0|this.getVerticalOffsetForLineNumber(o);let v=n,b=o;return vt&&b--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:f,centeredLineNumber:m,completelyVisibleStartLineNumber:v,completelyVisibleEndLineNumber:b}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e|=0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i,n;return i=t>=1?this._lineHeight*t:0,n=e>0?this.getWhitespacesAccumulatedHeight(e-1):0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e|=0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;if(e>=this.getVerticalOffsetForWhitespaceIndex(i)+this.getHeightForWhitespaceIndex(i))return-1;for(;t=r+this.getHeightForWhitespaceIndex(n))t=n+1;else{if(e>=r)return n;i=n}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e|=0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0)return null;if(t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t);return{id:this.getIdForWhitespaceIndex(t),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(t),verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e|=0,t|=0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];const r=[];for(let e=i;e<=n;e++){const i=this.getVerticalOffsetForWhitespaceIndex(e),n=this.getHeightForWhitespaceIndex(e);if(i>=t)break;r.push({id:this.getIdForWhitespaceIndex(e),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(e),verticalOffset:i,height:n})}return r}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e|=0,this._arr[e].height}}tr.INSTANCE_COUNT=0;class ir{constructor(e,t,i,n){(e|=0)<0&&(e=0),(t|=0)<0&&(t=0),(i|=0)<0&&(i=0),(n|=0)<0&&(n=0),this.width=e,this.contentWidth=t,this.scrollWidth=Math.max(e,t),this.height=i,this.contentHeight=n,this.scrollHeight=Math.max(i,n)}equals(e){return this.width===e.width&&this.contentWidth===e.contentWidth&&this.height===e.height&&this.contentHeight===e.contentHeight}}class nr extends L.JT{constructor(e,t){super(),this._onDidContentSizeChange=this._register(new k.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new ir(0,0,0,0),this._scrollable=this._register(new Xn.Rm({forceIntegerValues:!0,smoothScrollDuration:e,scheduleAtNextAnimationFrame:t})),this.onDidScroll=this._scrollable.onScroll}getScrollable(){return this._scrollable}setSmoothScrollDuration(e){this._scrollable.setSmoothScrollDuration(e)}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}getScrollDimensions(){return this._dimensions}setScrollDimensions(e){if(this._dimensions.equals(e))return;const t=this._dimensions;this._dimensions=e,this._scrollable.setScrollDimensions({width:e.width,scrollWidth:e.scrollWidth,height:e.height,scrollHeight:e.scrollHeight},!0);const i=t.contentWidth!==e.contentWidth,n=t.contentHeight!==e.contentHeight;(i||n)&&this._onDidContentSizeChange.fire(new Bn(t.contentWidth,t.contentHeight,e.contentWidth,e.contentHeight))}getFutureScrollPosition(){return this._scrollable.getFutureScrollPosition()}getCurrentScrollPosition(){return this._scrollable.getCurrentScrollPosition()}setScrollPositionNow(e){this._scrollable.setScrollPositionNow(e)}setScrollPositionSmooth(e){this._scrollable.setScrollPositionSmooth(e)}}class rr extends L.JT{constructor(e,t,i){super(),this._configuration=e;const n=this._configuration.options,r=n.get(131),o=n.get(75);this._linesLayout=new tr(t,n.get(59),o.top,o.bottom),this._scrollable=this._register(new nr(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new ir(r.contentWidth,0,r.height,0)),this.onDidScroll=this._scrollable.onDidScroll,this.onDidContentSizeChange=this._scrollable.onDidContentSizeChange,this._updateHeight()}dispose(){super.dispose()}getScrollable(){return this._scrollable.getScrollable()}onHeightMaybeChanged(){this._updateHeight()}_configureSmoothScrollDuration(){this._scrollable.setSmoothScrollDuration(this._configuration.options.get(103)?125:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(59)&&this._linesLayout.setLineHeight(t.get(59)),e.hasChanged(75)){const e=t.get(75);this._linesLayout.setPadding(e.top,e.bottom)}if(e.hasChanged(131)){const e=t.get(131),i=e.contentWidth,n=e.height,r=this._scrollable.getScrollDimensions(),o=r.contentWidth;this._scrollable.setScrollDimensions(new ir(i,r.contentWidth,n,this._getContentHeight(i,n,o)))}else this._updateHeight();e.hasChanged(103)&&this._configureSmoothScrollDuration()}onFlushed(e){this._linesLayout.onFlushed(e)}onLinesDeleted(e,t){this._linesLayout.onLinesDeleted(e,t)}onLinesInserted(e,t){this._linesLayout.onLinesInserted(e,t)}_getHorizontalScrollbarHeight(e,t){const i=this._configuration.options.get(92);return 2===i.horizontal||e>=t?0:i.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let r=this._linesLayout.getLinesTotalHeight();return n.get(94)?r+=Math.max(0,t-n.get(59)-n.get(75).bottom):r+=this._getHorizontalScrollbarHeight(e,i),r}_updateHeight(){const e=this._scrollable.getScrollDimensions(),t=e.width,i=e.height,n=e.contentWidth;this._scrollable.setScrollDimensions(new ir(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new gi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new gi.l_(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(132),n=t.get(44);if(i.isViewportWrapping){const i=t.get(131),r=t.get(65);return e>i.contentWidth+n.typicalHalfwidthCharacterWidth&&r.enabled&&"right"===r.side?e+i.verticalScrollbarWidth:e}{const i=t.get(93)*n.typicalHalfwidthCharacterWidth,r=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+i,r)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new ir(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition(),t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t);return{scrollTop:t,scrollTopWithoutViewZones:t-this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i),scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}isAfterLines(e){return this._linesLayout.isAfterLines(e)}isInTopPadding(e){return this._linesLayout.isInTopPadding(e)}isInBottomPadding(e){return this._linesLayout.isInBottomPadding(e)}getLineNumberAtVerticalOffset(e){return this._linesLayout.getLineNumberAtOrAfterVerticalOffset(e)}getWhitespaceAtVerticalOffset(e){return this._linesLayout.getWhitespaceAtVerticalOffset(e)}getLinesViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getLinesViewportData(e.top,e.top+e.height)}getLinesViewportDataAtScrollTop(e){const 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)}getWhitespaceViewportData(){const e=this.getCurrentViewport();return this._linesLayout.getWhitespaceViewportData(e.top,e.top+e.height)}getWhitespaces(){return this._linesLayout.getWhitespaces()}getContentWidth(){return this._scrollable.getScrollDimensions().contentWidth}getScrollWidth(){return this._scrollable.getScrollDimensions().scrollWidth}getContentHeight(){return this._scrollable.getScrollDimensions().contentHeight}getScrollHeight(){return this._scrollable.getScrollDimensions().scrollHeight}getCurrentScrollLeft(){return this._scrollable.getCurrentScrollPosition().scrollLeft}getCurrentScrollTop(){return this._scrollable.getCurrentScrollPosition().scrollTop}validateScrollPosition(e){return this._scrollable.validateScrollPosition(e)}setScrollPosition(e,t){1===t?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}var or=i(168),sr=i(3084),ar=i(7378);function lr(e,t){return null===e?t?hr.INSTANCE:dr.INSTANCE:new cr(e,t)}class cr{constructor(e,t){this._projectionData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getProjectionData(){return this._projectionData}getViewLineCount(){return this._isVisible?this._projectionData.getOutputLineCount():0}getViewLineContent(e,t,i){this._assertVisible();const n=i>0?this._projectionData.breakOffsets[i-1]:0,r=this._projectionData.breakOffsets[i];let o;if(null!==this._projectionData.injectionOffsets){const i=this._projectionData.injectionOffsets.map(((e,t)=>new _n.gk(0,0,e+1,this._projectionData.injectionOptions[t],0)));o=_n.gk.applyInjectedText(e.getLineContent(t),i).substring(n,r)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:r+1});return i>0&&(o=gr(this._projectionData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){return this._assertVisible(),this._projectionData.getLineLength(i)}getViewLineMinColumn(e,t,i){return this._assertVisible(),this._projectionData.getMinOutputOffset(i)+1}getViewLineMaxColumn(e,t,i){return this._assertVisible(),this._projectionData.getMaxOutputOffset(i)+1}getViewLineData(e,t,i){const n=new Array;return this.getViewLinesData(e,t,i,1,0,[!0],n),n[0]}getViewLinesData(e,t,i,n,r,o,s){this._assertVisible();const a=this._projectionData,l=a.injectionOffsets,c=a.injectionOptions;let h,d=null;if(l){d=[];let e=0,t=0;for(let i=0;i0?a.breakOffsets[i-1]:0,o=a.breakOffsets[i];for(;to)break;if(r0?a.wrappedTextIndentLength:0,s=t+Math.max(h-r,0),l=t+Math.min(d-r,o);s!==l&&n.push(new gi.Wx(s,l,e.inlineClassName,e.inlineClassNameAffectsLetterSpacing))}}if(!(d<=o))break;e+=s,t++}}}h=l?e.getLineTokens(t).withInserted(l.map(((e,t)=>({offset:e,text:c[t].content,tokenMetadata:ar.A.defaultTokenMetadata})))):e.getLineTokens(t);for(let e=i;e0?n.wrappedTextIndentLength:0,o=i>0?n.breakOffsets[i-1]:0,s=n.breakOffsets[i],a=e.sliceAndInflate(o,s,r);let l=a.getLineContent();i>0&&(l=gr(n.wrappedTextIndentLength)+l);const c=this._projectionData.getMinOutputOffset(i)+1,h=l.length+1,d=i+1=ur.length)for(let t=1;t<=e;t++)ur[t]=fr(t);return ur[e]}function fr(e){return new Array(e+1).join(" ")}var pr=i(310);class mr{constructor(e,t,i,n,r,o,s,a,l){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=r,this.tabSize=o,this.wrappingStrategy=s,this.wrappingColumn=a,this.wrappingIndent=l,this._constructLines(!0,null)}dispose(){this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[])}createCoordinatesConverter(){return new br(this)}_constructLines(e,t){this.modelLineProjections=[],e&&(this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,[]));const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),r=i.length,o=this.createLineBreaksComputer(),s=new D.H9(_n.gk.fromDecorations(n));for(let e=0;et.lineNumber===e+1));o.addRequest(i[e],n,t?t[e]:null)}const a=o.finalize(),l=[],c=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(xe.e.compareRangesUsingStarts);let h=1,d=0,u=-1,g=u+1=h&&t<=d,n=lr(a[e],!i);l[e]=n.getViewLineCount(),this.modelLineProjections[e]=n}this._validModelVersionId=this.model.getVersionId(),this.projectedModelLineLineCounts=new pr.Ck(l)}getHiddenAreas(){return this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e)))}setHiddenAreas(e){const t=function(e){if(0===e.length)return[];const t=e.slice();t.sort(xe.e.compareRangesUsingStarts);const i=[];let n=t[0].startLineNumber,r=t[0].endLineNumber;for(let e=1,o=t.length;er+1?(i.push(new xe.e(n,1,r,1)),n=o.startLineNumber,r=o.endLineNumber):o.endLineNumber>r&&(r=o.endLineNumber)}return i.push(new xe.e(n,1,r,1)),i}(e.map((e=>this.model.validateRange(e)))),i=this.hiddenAreasDecorationIds.map((e=>this.model.getDecorationRange(e))).sort(xe.e.compareRangesUsingStarts);if(t.length===i.length){let e=!1;for(let n=0;n({range:e,options:sr.qx.EMPTY})));this.hiddenAreasDecorationIds=this.model.deltaDecorations(this.hiddenAreasDecorationIds,n);const r=t;let o=1,s=0,a=-1,l=a+1=o&&t<=s?this.modelLineProjections[e].isVisible()&&(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!1),i=!0):(c=!0,this.modelLineProjections[e].isVisible()||(this.modelLineProjections[e]=this.modelLineProjections[e].setVisible(!0),i=!0)),i){const t=this.modelLineProjections[e].getViewLineCount();this.projectedModelLineLineCounts.setValue(e,t)}}return c||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return!(e<1||e>this.modelLineProjections.length)&&this.modelLineProjections[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.modelLineProjections.length?1:this.modelLineProjections[e-1].getViewLineCount()}setTabSize(e){return this.tabSize!==e&&(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const r=this.fontInfo.equals(e),o=this.wrappingStrategy===t,s=this.wrappingColumn===i,a=this.wrappingIndent===n;if(r&&o&&s&&a)return!1;const l=r&&o&&!s&&a;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let c=null;if(l){c=[];for(let e=0,t=this.modelLineProjections.length;e2&&!this.modelLineProjections[t-2].isVisible(),o=1===t?1:this.projectedModelLineLineCounts.getPrefixSum(t-1)+1;let s=0;const a=[],l=[];for(let e=0,t=n.length;es?(l=this.projectedModelLineLineCounts.getPrefixSum(t-1)+1,c=l+s-1,u=c+1,g=u+(r-s)-1,a=!0):rt?t:0|e}getActiveIndentGuide(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t),i=this._toValidViewLineNumber(i);const n=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),r=this.convertViewPositionToModelPosition(t,this.getViewLineMinColumn(t)),o=this.convertViewPositionToModelPosition(i,this.getViewLineMinColumn(i)),s=this.model.guides.getActiveIndentGuide(n.lineNumber,r.lineNumber,o.lineNumber),a=this.convertModelPositionToViewPosition(s.startLineNumber,1),l=this.convertModelPositionToViewPosition(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber));return{startLineNumber:a.lineNumber,endLineNumber:l.lineNumber,indent:s.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);const t=this.projectedModelLineLineCounts.getIndexOf(e-1),i=t.index,n=t.remainder;return new _r(i+1,n)}getMinColumnOfViewLine(e){return this.modelLineProjections[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ce.L(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.modelLineProjections[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new Ce.L(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),r=new Array;let o=this.getModelStartPositionOfViewLine(i),s=new Array;for(let e=i.modelLineNumber;e<=n.modelLineNumber;e++){const t=this.modelLineProjections[e-1];if(t.isVisible()){const r=e===i.modelLineNumber?i.modelLineWrappedLineIdx:0,o=e===n.modelLineNumber?n.modelLineWrappedLineIdx+1:t.getViewLineCount();for(let t=r;te.horizontalLine?new qt.UO(e.visibleColumn,e.className,new qt.vW(e.horizontalLine.top,this.convertModelPositionToViewPosition(n.modelLineNumber,e.horizontalLine.endColumn).column)):e)),o.push(i)}}return o}getViewLinesIndentGuides(e,t){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);const i=this.convertViewPositionToModelPosition(e,this.getViewLineMinColumn(e)),n=this.convertViewPositionToModelPosition(t,this.getViewLineMaxColumn(t));let r=[];const o=[],s=[],a=i.lineNumber-1,l=n.lineNumber-1;let c=null;for(let e=a;e<=l;e++){const t=this.modelLineProjections[e];if(t.isVisible()){const n=t.getViewLineNumberOfModelPosition(0,e===a?i.column:1),r=t.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(e+1)),l=r-n+1;let h=0;l>1&&1===t.getViewLineMinColumn(this.model,e+1,r)&&(h=0===n?1:2),o.push(l),s.push(h),null===c&&(c=new Ce.L(e+1,0))}else null!==c&&(r=r.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,e)),c=null)}null!==c&&(r=r.concat(this.model.guides.getLinesIndentGuides(c.lineNumber,n.lineNumber)),c=null);const h=t-e+1,d=new Array(h);let u=0;for(let e=0,t=r.length;et&&(d=!0,h=t-r+1),l.getViewLinesData(this.model,n+1,c,h,r-e,i,a),r+=h,d)break}return a}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);const n=this.projectedModelLineLineCounts.getIndexOf(e-1),r=n.index,o=n.remainder,s=this.modelLineProjections[r],a=s.getViewLineMinColumn(this.model,r+1,o),l=s.getViewLineMaxColumn(this.model,r+1,o);tl&&(t=l);const c=s.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new Ce.L(r+1,c)).equals(i)?new Ce.L(e,t):this.convertModelPositionToViewPosition(i.lineNumber,i.column)}validateViewRange(e,t){const i=this.validateViewPosition(e.startLineNumber,e.startColumn,t.getStartPosition()),n=this.validateViewPosition(e.endLineNumber,e.endColumn,t.getEndPosition());return new xe.e(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){const i=this.getViewLineInfo(e),n=this.modelLineProjections[i.modelLineNumber-1].getModelColumnOfViewPosition(i.modelLineWrappedLineIdx,t);return this.model.validatePosition(new Ce.L(i.modelLineNumber,n))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new xe.e(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new Ce.L(e,t)),r=n.lineNumber,o=n.column;let s=r-1,a=!1;for(;s>0&&!this.modelLineProjections[s].isVisible();)s--,a=!0;if(0===s&&!this.modelLineProjections[s].isVisible())return new Ce.L(1,1);const l=1+this.projectedModelLineLineCounts.getPrefixSum(s);let c;return c=a?this.modelLineProjections[s].getViewPositionOfModelPosition(l,this.model.getLineMaxColumn(s+1),i):this.modelLineProjections[r-1].getViewPositionOfModelPosition(l,o,i),c}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return xe.e.fromPositions(i)}{const t=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),i=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new xe.e(t.lineNumber,t.column,i.lineNumber,i.column)}}getViewLineNumberOfModelPosition(e,t){let i=e-1;if(this.modelLineProjections[i].isVisible()){const e=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(e,t)}for(;i>0&&!this.modelLineProjections[i].isVisible();)i--;if(0===i&&!this.modelLineProjections[i].isVisible())return 1;const n=1+this.projectedModelLineLineCounts.getPrefixSum(i);return this.modelLineProjections[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),r=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(r.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new xe.e(n.lineNumber,1,r.lineNumber,r.column),t,i);let o=[];const s=n.lineNumber-1,a=r.lineNumber-1;let l=null;for(let e=s;e<=a;e++)if(this.modelLineProjections[e].isVisible())null===l&&(l=new Ce.L(e+1,e===s?n.column:1));else if(null!==l){const n=this.model.getLineMaxColumn(e);o=o.concat(this.model.getDecorationsInRange(new xe.e(l.lineNumber,l.column,e,n),t,i)),l=null}null!==l&&(o=o.concat(this.model.getDecorationsInRange(new xe.e(l.lineNumber,l.column,r.lineNumber,r.column),t,i)),l=null),o.sort(((e,t)=>{const i=xe.e.compareRangesUsingStarts(e.range,t.range);return 0===i?e.idt.id?1:0:i}));let c=[],h=0,d=null;for(const e of o){const t=e.id;d!==t&&(d=t,c[h++]=e)}return c}getInjectedTextAt(e){const t=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[t.modelLineNumber-1].getInjectedTextAt(t.modelLineWrappedLineIdx,e.column)}normalizePosition(e,t){const i=this.getViewLineInfo(e.lineNumber);return this.modelLineProjections[i.modelLineNumber-1].normalizePosition(i.modelLineWrappedLineIdx,e,t)}getLineIndentColumn(e){const t=this.getViewLineInfo(e);return 0===t.modelLineWrappedLineIdx?this.model.getLineIndentColumn(t.modelLineNumber):0}}class _r{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class vr{constructor(e,t){this.modelRange=e,this.viewLines=t}}class br{constructor(e){this._lines=e}convertViewPositionToModelPosition(e){return this._lines.convertViewPositionToModelPosition(e.lineNumber,e.column)}convertViewRangeToModelRange(e){return this._lines.convertViewRangeToModelRange(e)}validateViewPosition(e,t){return this._lines.validateViewPosition(e.lineNumber,e.column,t)}validateViewRange(e,t){return this._lines.validateViewRange(e,t)}convertModelPositionToViewPosition(e,t){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}convertModelRangeToViewRange(e,t){return this._lines.convertModelRangeToViewRange(e,t)}modelPositionIsVisible(e){return this._lines.modelPositionIsVisible(e.lineNumber,e.column)}getModelLineViewLineCount(e){return this._lines.getModelLineViewLineCount(e)}getViewLineNumberOfModelPosition(e,t){return this._lines.getViewLineNumberOfModelPosition(e,t)}}class yr{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new wr(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){const e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new En(t,i)}onModelLinesInserted(e,t,i,n){return new Dn(t,i)}onModelLineChanged(e,t,i){return[!1,new Nn(t,t),null,null]}acceptVersionId(e){}getViewLineCount(){return this.model.getLineCount()}getActiveIndentGuide(e,t,i){return{startLineNumber:e,endLineNumber:e,indent:0}}getViewLinesBracketGuides(e,t,i){return new Array(t-e+1).fill([])}getViewLinesIndentGuides(e,t){const i=t-e+1,n=new Array(i);for(let e=0;et)}getModelLineViewLineCount(e){return 1}getViewLineNumberOfModelPosition(e,t){return e}}class Cr extends L.JT{constructor(e,t,i,n,r,o,s,a){if(super(),this.languageConfigurationService=s,this._themeService=a,this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Pn,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new dn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._tokenizeViewportSoon=this._register(new Q.pY((()=>this.tokenizeViewport()),50)),this._updateConfigurationViewLineCount=this._register(new Q.pY((()=>this._updateConfigurationViewLineCountNow()),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new yr(this.model);else{const e=this._configuration.options,t=e.get(44),i=e.get(125),o=e.get(132),s=e.get(124);this._lines=new mr(this._editorId,this.model,n,r,t,this.model.getOptions().tabSize,i,o.wrappingColumn,s)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Un(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new rr(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll((e=>{e.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Tn(e)),this._eventDispatcher.emitOutgoingEvent(new Vn(e.oldScrollWidth,e.oldScrollLeft,e.oldScrollHeight,e.oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop))}))),this._register(this.viewLayout.onDidContentSizeChange((e=>{this._eventDispatcher.emitOutgoingEvent(e)}))),this._decorations=new or.CU(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}}))),this._register(ui.getInstance().onDidChange((()=>{this._eventDispatcher.emitSingleViewEvent(new On)}))),this._register(this._themeService.onDidColorThemeChange((e=>{this._invalidateDecorationsColorCache(),this._eventDispatcher.emitSingleViewEvent(new In(e))}))),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),this._eventDispatcher.dispose()}createLineBreaksComputer(){return this._lines.createLineBreaksComputer()}addViewEventHandler(e){this._eventDispatcher.addViewEventHandler(e)}removeViewEventHandler(e){this._eventDispatcher.removeViewEventHandler(e)}_updateConfigurationViewLineCountNow(){this._configuration.setViewLineCount(this._lines.getViewLineCount())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=new xe.e(e.startLineNumber,this.getLineMinColumn(e.startLineNumber),e.endLineNumber,this.getLineMaxColumn(e.endLineNumber)),i=this._toModelVisibleRanges(t);for(const e of i)this.model.tokenizeViewport(e.startLineNumber,e.endLineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Sn(e)),this._eventDispatcher.emitOutgoingEvent(new Wn(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new vn)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new bn)}_onConfigurationChanged(e,t){let i=null;if(-1!==this._viewportStartLine){const e=new Ce.L(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(e)}let n=!1;const r=this._configuration.options,o=r.get(44),s=r.get(125),a=r.get(132),l=r.get(124);if(this._lines.setWrappingSettings(o,s,a.wrappingColumn,l)&&(e.emitViewEvent(new xn),e.emitViewEvent(new Ln),e.emitViewEvent(new Cn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),0!==this.viewLayout.getCurrentScrollTop()&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(81)&&(this._decorations.reset(),e.emitViewEvent(new Cn(null))),e.emitViewEvent(new yn(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const e=this.coordinatesConverter.convertModelPositionToViewPosition(i),t=this.viewLayout.getVerticalOffsetForLineNumber(e.lineNumber);this.viewLayout.setScrollPosition({scrollTop:t+this._viewportStartLineDelta},1)}dn.LM.shouldRecreate(t)&&(this.cursorConfig=new dn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig))}_registerModelEvents(){this._register(this.model.onDidChangeContentOrInjectedText((e=>{try{const t=this._eventDispatcher.beginEmitViewEvents();let i=!1,n=!1;const r=e.changes,o=e instanceof _n.dQ?e.versionId:null,s=this._lines.createLineBreaksComputer();for(const e of r)switch(e.changeType){case 4:for(let t=0;t!e.ownerId||e.ownerId===this._editorId))),s.addRequest(i,n,null)}break;case 2:{let t=null;e.injectedText&&(t=e.injectedText.filter((e=>!e.ownerId||e.ownerId===this._editorId))),s.addRequest(e.detail,t,null);break}}const a=s.finalize(),l=new D.H9(a);for(const e of r)switch(e.changeType){case 1:this._lines.onModelFlushed(),t.emitViewEvent(new xn),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break;case 3:{const n=this._lines.onModelLinesDeleted(o,e.fromLineNumber,e.toLineNumber);null!==n&&(t.emitViewEvent(n),this.viewLayout.onLinesDeleted(n.fromLineNumber,n.toLineNumber)),i=!0;break}case 4:{const n=l.takeCount(e.detail.length),r=this._lines.onModelLinesInserted(o,e.fromLineNumber,e.toLineNumber,n);null!==r&&(t.emitViewEvent(r),this.viewLayout.onLinesInserted(r.fromLineNumber,r.toLineNumber)),i=!0;break}case 2:{const i=l.dequeue(),[r,s,a,c]=this._lines.onModelLineChanged(o,e.lineNumber,i);n=r,s&&t.emitViewEvent(s),a&&(t.emitViewEvent(a),this.viewLayout.onLinesInserted(a.fromLineNumber,a.toLineNumber)),c&&(t.emitViewEvent(c),this.viewLayout.onLinesDeleted(c.fromLineNumber,c.toLineNumber));break}}null!==o&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Ln),t.emitViewEvent(new Cn(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setModelLineCount(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const e=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(e){const t=this.coordinatesConverter.convertModelPositionToViewPosition(e.getStartPosition()),i=this.viewLayout.getVerticalOffsetForLineNumber(t.lineNumber);this.viewLayout.setScrollPosition({scrollTop:i+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}this._tokenizeViewportSoon.schedule()}))),this._register(this.model.onDidChangeTokens((e=>{const t=[];for(let i=0,n=e.ranges.length;i{this._eventDispatcher.emitSingleViewEvent(new kn),this.cursorConfig=new dn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeLanguage((e=>{this.cursorConfig=new dn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeOptions((e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const e=this._eventDispatcher.beginEmitViewEvents();e.emitViewEvent(new xn),e.emitViewEvent(new Ln),e.emitViewEvent(new Cn(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new dn.LM(this.model.getLanguageId(),this.model.getOptions(),this._configuration,this.languageConfigurationService),this._cursor.updateConfiguration(this.cursorConfig)}))),this._register(this.model.onDidChangeDecorations((e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new Cn(e))})))}setHiddenAreas(e){let t=!1;try{const i=this._eventDispatcher.beginEmitViewEvents();t=this._lines.setHiddenAreas(e),t&&(i.emitViewEvent(new xn),i.emitViewEvent(new Ln),i.emitViewEvent(new Cn(null)),this._cursor.onLineMappingChanged(i),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule(),t&&this._eventDispatcher.emitOutgoingEvent(new zn)}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(131),t=this._configuration.options.get(59),i=Math.max(20,Math.round(e.height/t)),n=this.viewLayout.getLinesViewportData(),r=Math.max(1,n.completelyVisibleStartLineNumber-i),o=Math.min(this.getLineCount(),n.completelyVisibleEndLineNumber+i);return this._toModelVisibleRanges(new xe.e(r,this.getLineMinColumn(r),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(0===i.length)return[t];const n=[];let r=0,o=t.startLineNumber,s=t.startColumn;const a=t.endLineNumber,l=t.endColumn;for(let e=0,t=i.length;ea||(oe.toInlineDecoration(t)))]),new gi.wA(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,s,r,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){const n=this._lines.getViewLinesData(e,t,i);return new gi.ud(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){const t=this.model.getOverviewRulerDecorations(this._editorId,(0,P.$J)(this._configuration.options)),i=new xr;for(const n of t){const t=n.options,r=t.overviewRuler;if(!r)continue;const o=r.position;if(0===o)continue;const s=r.getColor(e.value),a=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.startLineNumber,n.range.startColumn),l=this.coordinatesConverter.getViewLineNumberOfModelPosition(n.range.endLineNumber,n.range.endColumn);i.accept(s,t.zIndex,a,l,o)}return i.asArray}_invalidateDecorationsColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const e=t.options.overviewRuler;e&&e.invalidateCachedColor();const i=t.options.minimap;i&&i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);2===this.model.getEOL().length&&(t<0?t-=i:t+=i);const r=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(r)}getPlainTextToCopy(e,t,i){const n=i?"\r\n":this.model.getEOL();(e=e.slice(0)).sort(xe.e.compareRangesUsingStarts);let r=!1,o=!1;for(const t of e)t.isEmpty()?r=!0:o=!0;if(!o){if(!t)return"";const i=e.map((e=>e.startLineNumber));let r="";for(let e=0;e0&&i[e-1]===i[e]||(r+=this.model.getLineContent(i[e])+n);return r}if(r&&t){const t=[];let n=0;for(const r of e){const e=r.startLineNumber;r.isEmpty()?e!==n&&t.push(this.model.getLineContent(e)):t.push(this.model.getValueInRange(r,i?2:0)),n=e}return 1===t.length?t[0]:t}const s=[];for(const t of e)t.isEmpty()||s.push(this.model.getValueInRange(t,i?2:0));return 1===s.length?s[0]:s}getRichTextToCopy(e,t){const i=this.model.getLanguageId();if(i===Zn.bd)return null;if(1!==e.length)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const e=n.startLineNumber;n=new xe.e(e,this.model.getLineMinColumn(e),e,this.model.getLineMaxColumn(e))}const r=this._configuration.options.get(44),o=this._getColorMap();let s;return/[:;\\\/<>]/.test(r.fontFamily)||r.fontFamily===P.hL.fontFamily?s=P.hL.fontFamily:(s=r.fontFamily,s=s.replace(/"/g,"'"),/[,']/.test(s)||/[+ ]/.test(s)&&(s=`'${s}'`),s=`${s}, ${P.hL.fontFamily}`),{mode:i,html:`
`+this._getHTMLToCopy(n,o)+"
"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,o=e.endColumn,s=this.getTabSize();let a="";for(let e=i;e<=r;e++){const l=this.model.getLineTokens(e),c=l.getLineContent(),h=e===i?n-1:0,d=e===r?o-1:c.length;a+=""===c?"
":(0,Qn.Fq)(c,l.inflate(),t,h,d,s,T.ED)}return a}_getColorMap(){const e=st.RW.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;ithis._cursor.setStates(n,e,t,i)))}getCursorColumnSelectData(){return this._cursor.getCursorColumnSelectData()}getCursorAutoClosedCharacters(){return this._cursor.getAutoClosedCharacters()}setCursorColumnSelectData(e){this._cursor.setCursorColumnSelectData(e)}getPrevEditOperationType(){return this._cursor.getPrevEditOperationType()}setPrevEditOperationType(e){this._cursor.setPrevEditOperationType(e)}getSelection(){return this._cursor.getSelection()}getSelections(){return this._cursor.getSelections()}getPosition(){return this._cursor.getPrimaryCursorState().modelState.position}setSelections(e,t,i=0){this._withViewEventsCollector((n=>this._cursor.setSelections(n,e,t,i)))}saveCursorState(){return this._cursor.saveState()}restoreCursorState(e){this._withViewEventsCollector((t=>this._cursor.restoreState(t,e)))}_executeCursorEdit(e){this._cursor.context.cursorConfig.readOnly?this._eventDispatcher.emitOutgoingEvent(new jn):this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit((n=>this._cursor.executeEdits(n,e,t,i)))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit((e=>this._cursor.startComposition(e)))}endComposition(e){this._cursor.setIsDoingComposition(!1),this._executeCursorEdit((t=>this._cursor.endComposition(t,e)))}type(e,t){this._executeCursorEdit((i=>this._cursor.type(i,e,t)))}compositionType(e,t,i,n,r){this._executeCursorEdit((o=>this._cursor.compositionType(o,e,t,i,n,r)))}paste(e,t,i,n){this._executeCursorEdit((r=>this._cursor.paste(r,e,t,i,n)))}cut(e){this._executeCursorEdit((t=>this._cursor.cut(t,e)))}executeCommand(e,t){this._executeCursorEdit((i=>this._cursor.executeCommand(i,e,t)))}executeCommands(e,t){this._executeCursorEdit((i=>this._cursor.executeCommands(i,e,t)))}revealPrimaryCursor(e,t,i=!1){this._withViewEventsCollector((n=>this._cursor.revealPrimary(n,e,i,0,t,0)))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new xe.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new An(e,!1,i,null,0,!0,0))))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new xe.e(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector((t=>t.emitViewEvent(new An(e,!1,i,null,0,!0,0))))}revealRange(e,t,i,n,r){this._withViewEventsCollector((o=>o.emitViewEvent(new An(e,!1,i,null,n,t,r))))}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Rn),this._eventDispatcher.emitOutgoingEvent(new zn))}_withViewEventsCollector(e){try{return e(this._eventDispatcher.beginEmitViewEvents())}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class xr{constructor(){this._asMap=Object.create(null),this.asArray=[]}accept(e,t,i,n,r){const o=this._asMap[e];if(o){const e=o.data,t=e[e.length-3],s=e[e.length-1];if(t===r&&s+1>=i)return void(n>s&&(e[e.length-1]=n));e.push(r,i,n)}else{const o=new gi.SQ(e,t,[r,i,n]);this._asMap[e]=o,this.asArray.push(o)}}}var Sr=i(4565),kr=i(8819),Lr=i(2065),Nr=i(972),Er=i(9422),Dr=i(4906);class Ar{constructor(e,t,i,n,r){this.injectionOffsets=e,this.injectionOptions=t,this.breakOffsets=i,this.breakOffsetsVisibleColumn=n,this.wrappedTextIndentLength=r}getOutputLineCount(){return this.breakOffsets.length}getMinOutputOffset(e){return e>0?this.wrappedTextIndentLength:0}getLineLength(e){const t=e>0?this.breakOffsets[e-1]:0;let i=this.breakOffsets[e]-t;return e>0&&(i+=this.wrappedTextIndentLength),i}getMaxOutputOffset(e){return this.getLineLength(e)}translateToInputOffset(e,t){e>0&&(t=Math.max(0,t-this.wrappedTextIndentLength));let i=0===e?t:this.breakOffsets[e-1]+t;if(null!==this.injectionOffsets)for(let e=0;ethis.injectionOffsets[e];e++)i0?this.breakOffsets[r-1]:0,0===t)if(e<=o)n=r-1;else{if(!(e>s))break;i=r+1}else if(e=s))break;i=r+1}}let s=e-o;return r>0&&(s+=this.wrappedTextIndentLength),new Mr(r,s)}normalizeOutputPosition(e,t,i){if(null!==this.injectionOffsets){const n=this.outputPositionToOffsetInInputWithInjections(e,t),r=this.normalizeOffsetInInputWithInjectionsAroundInjections(n,i);if(r!==n)return this.offsetInInputWithInjectionsToOutputPosition(r,i)}if(0===i){if(e>0&&t===this.getMinOutputOffset(e))return new Mr(e-1,this.getMaxOutputOffset(e-1))}else if(1===i&&e0&&(t=Math.max(0,t-this.wrappedTextIndentLength)),(e>0?this.breakOffsets[e-1]:0)+t}normalizeOffsetInInputWithInjectionsAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(2===t){if(e===i.offsetInInputWithInjections+i.length&&Tr(this.injectionOptions[i.injectedTextIndex].cursorStops))return i.offsetInInputWithInjections+i.length;{let e=i.offsetInInputWithInjections;if(Ir(this.injectionOptions[i.injectedTextIndex].cursorStops))return e;let t=i.injectedTextIndex-1;for(;t>=0&&this.injectionOffsets[t]===this.injectionOffsets[i.injectedTextIndex]&&!Tr(this.injectionOptions[t].cursorStops)&&(e-=this.injectionOptions[t].content.length,!Ir(this.injectionOptions[t].cursorStops));)t--;return e}}if(1===t){let e=i.offsetInInputWithInjections+i.length,t=i.injectedTextIndex;for(;t+1=0&&this.injectionOffsets[t-1]===this.injectionOffsets[t];)e-=this.injectionOptions[t-1].content.length,t--;return e}(0,$t.vE)(t)}getInjectedText(e,t){const i=this.outputPositionToOffsetInInputWithInjections(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(null!==t){let n=0;for(let r=0;re)break;if(e<=a)return{injectedTextIndex:r,offsetInInputWithInjections:s,length:o};n+=o}}}}function Tr(e){return null==e||e===Ci.RM.Right||e===Ci.RM.Both}function Ir(e){return null==e||e===Ci.RM.Left||e===Ci.RM.Both}class Mr{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e){return new Ce.L(e+this.outputLineIndex,this.outputOffset+1)}}class Or{constructor(e,t){this.classifier=new Rr(e,t)}static create(e){return new Or(e.get(120),e.get(119))}createLineBreaksComputer(e,t,i,n){const r=[],o=[],s=[];return{addRequest:(e,t,i)=>{r.push(e),o.push(t),s.push(i)},finalize:()=>{const a=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth,l=[];for(let e=0,c=r.length;e=0&&e<256?this._asciiMap[e]:e>=12352&&e<=12543||e>=13312&&e<=19903||e>=19968&&e<=40959?3:this._map.get(e)||this._defaultValue}}let Pr=[],Fr=[];function Br(e,t,i,n,r,o,s){if(-1===r)return null;const a=i.length;if(a<=1)return null;const l=t.breakOffsets,c=t.breakOffsetsVisibleColumn,h=jr(i,n,r,o,s),d=r-h,u=Pr,g=Fr;let f=0,p=0,m=0,_=r;const v=l.length;let b=0;if(b>=0){let e=Math.abs(c[b]-_);for(;b+1=e)break;e=t,b++}}for(;bt&&(t=p,r=m);let s=0,h=0,y=0,w=0;if(r<=_){let m=r,v=0===t?0:i.charCodeAt(t-1),b=0===t?0:e.get(v),C=!0;for(let r=t;rp&&Hr(0,b,a,l)&&(s=t,h=m),m+=c,m>_){t>p?(y=t,w=m-c):(y=r+1,w=m),m-h>d&&(s=0),C=!1;break}v=a,b=l}if(C){f>0&&(u[f]=l[l.length-1],g[f]=c[l.length-1],f++);break}}if(0===s){let a=r,l=i.charCodeAt(t),c=e.get(l),u=!1;for(let n=t-1;n>=p;n--){const t=n+1,r=i.charCodeAt(n);if(9===r){u=!0;break}let g,f;if(Ge.YK(r)?(n--,g=0,f=2):(g=e.get(r),f=Ge.K7(r)?o:1),a<=_){if(0===y&&(y=t,w=a),a<=_-d)break;if(Hr(0,g,l,c)){s=t,h=a;break}}a-=f,l=r,c=g}if(0!==s){const e=d-(w-h);if(e<=n){const t=i.charCodeAt(y);let r;r=Ge.ZG(t)?2:Vr(t,w,n,o),e-r<0&&(s=0)}}if(u){b--;continue}}if(0===s&&(s=y,h=w),s<=p){const e=i.charCodeAt(p);Ge.ZG(e)?(s=p+2,h=m+2):(s=p+1,h=m+Vr(e,m,n,o))}for(p=s,u[f]=s,m=h,g[f]=h,f++,_=h+d;b<0||b=C)break;C=e,b++}}return 0===f?null:(u.length=f,g.length=f,Pr=t.breakOffsets,Fr=t.breakOffsetsVisibleColumn,t.breakOffsets=u,t.breakOffsetsVisibleColumn=g,t.wrappedTextIndentLength=h,t)}function Wr(e,t,i,n,r,o,s){const a=_n.gk.applyInjectedText(t,i);let l,c;if(i&&i.length>0?(l=i.map((e=>e.options)),c=i.map((e=>e.column-1))):(l=null,c=null),-1===r)return l?new Ar(c,l,[a.length],[],0):null;const h=a.length;if(h<=1)return l?new Ar(c,l,[a.length],[],0):null;const d=jr(a,n,r,o,s),u=r-d,g=[],f=[];let p=0,m=0,_=0,v=r,b=a.charCodeAt(0),y=e.get(b),w=Vr(b,0,n,o),C=1;Ge.ZG(b)&&(w+=1,b=a.charCodeAt(1),y=e.get(b),C++);for(let t=C;tv&&((0===m||w-_>u)&&(m=i,_=w-l),g[p]=m,f[p]=_,p++,v=_+u,m=0),b=r,y=s}return 0!==p||i&&0!==i.length?(g[p]=h,f[p]=w,new Ar(c,l,g,f,d)):null}function Vr(e,t,i,n){return 9===e?i-t%i:Ge.K7(e)||e<32?n:1}function zr(e,t){return t-e%t}function Hr(e,t,i,n){return 32!==i&&(2===t||3===t&&2!==n||1===n||3===n&&1!==t)}function jr(e,t,i,n,r){let o=0;if(0!==r){const s=Ge.LC(e);if(-1!==s){for(let i=0;ii&&(o=0)}}return o}var Ur;const $r=null===(Ur=window.trustedTypes)||void 0===Ur?void 0:Ur.createPolicy("domLineBreaksComputer",{createHTML:e=>e});class Kr{static create(){return new Kr}constructor(){}createLineBreaksComputer(e,t,i,n){const r=[],o=[];return{addRequest:(e,t,i)=>{r.push(e),o.push(t)},finalize:()=>function(e,t,i,n,r,o){var s;function a(t){const i=o[t];if(i){const n=_n.gk.applyInjectedText(e[t],i),r=i.map((e=>e.options)),o=i.map((e=>e.column-1));return new Ar(o,r,[n.length],[],0)}return null}if(-1===n){const t=[];for(let i=0,n=e.length;il?(a=0,c=0):h=l-e}const u=s.substr(a),b=qr(u,c,i,h,g,d);f[n]=a,p[n]=c,m[n]=u,_[n]=b[0],v[n]=b[1]}const b=g.build(),y=null!==(s=null==$r?void 0:$r.createHTML(b))&&void 0!==s?s:b;u.innerHTML=y,u.style.position="absolute",u.style.top="10000",u.style.wordWrap="break-word",document.body.appendChild(u);const w=document.createRange(),C=Array.prototype.slice.call(u.children,0),x=[];for(let t=0;te.options)),c=d.map((e=>e.column-1))):(l=null,c=null),x[t]=new Ar(c,l,e,s,n)}return document.body.removeChild(u),x}(r,e,t,i,n,o)}}}function qr(e,t,i,n,r,o){if(0!==o){const e=String(o);r.appendASCIIString('
');const s=e.length;let a=t,l=0;const c=[],h=[];let d=0");for(let t=0;t"),c[t]=l,h[t]=a;const n=d;d=t+1"),c[e.length]=l,h[e.length]=a,r.appendASCIIString("
"),[c,h]}function Gr(e,t,i,n){if(i.length<=1)return null;const r=Array.prototype.slice.call(t.children,0),o=[];try{Yr(e,r,n,0,null,i.length-1,null,o)}catch(e){return console.log(e),null}return 0===o.length?null:(o.push(i.length),o)}function Yr(e,t,i,n,r,o,s,a){if(n===o)return;if(r=r||Zr(e,t,i[n],i[n+1]),s=s||Zr(e,t,i[o],i[o+1]),Math.abs(r[0].top-s[0].top)<=.1)return;if(n+1===o)return void a.push(o);const l=n+(o-n)/2|0,c=Zr(e,t,i[l],i[l+1]);Yr(e,t,i,n,r,l,c,a),Yr(e,t,i,l,c,o,s,a)}function Zr(e,t,i,n){return e.setStart(t[i/16384|0].firstChild,i%16384),e.setEnd(t[n/16384|0].firstChild,n%16384),e.getClientRects()}var Qr=i(2896),Xr=i(9381),Jr=i(1922),eo=function(e,t){return function(i,n){t(i,n,e)}};let to=0;class io{constructor(e,t,i,n,r){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=r}dispose(){(0,L.B9)(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let no=class e extends L.JT{constructor(e,t,i,n,o,s,a,l,c,h,d,u){super(),this.languageConfigurationService=d,this._onDidDispose=this._register(new k.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new k.Q5),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new k.Q5),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new k.Q5),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new k.Q5),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new k.Q5),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new k.Q5),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new k.Q5),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new k.Q5),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new k.Q5),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new k.Q5),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new k.Q5),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new ro),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new ro),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new k.Q5),this.onWillType=this._onWillType.event,this._onDidType=this._register(new k.Q5),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new k.Q5),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new k.Q5),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new k.Q5),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new k.Q5),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new k.Q5),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new k.Q5),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new k.Q5),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new k.Q5),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new k.Q5),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new k.Q5),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new k.Q5),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new k.Q5),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new k.Q5),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new k.Q5),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new k.Q5),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new k.Q5),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new k.Q5),this.onDidChangeViewZones=this._onDidChangeViewZones.event,this._onDidChangeHiddenAreas=this._register(new k.Q5),this.onDidChangeHiddenAreas=this._onDidChangeHiddenAreas.event,this._bannerDomNode=null;const g=Object.assign({},t);let f;this._domElement=e,this._overflowWidgetsDomNode=g.overflowWidgetsDomNode,delete g.overflowWidgetsDomNode,this._id=++to,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(i.isSimpleWidget||!1,g,h)),this._register(this._configuration.onDidChange((e=>{this._onDidChangeConfiguration.fire(e);const t=this._configuration.options;if(e.hasChanged(131)){const e=t.get(131);this._onDidLayoutChange.fire(e)}}))),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=o,this._commandService=s,this._themeService=l,this._register(new oo(this,this._contextKeyService)),this._register(new so(this,this._contextKeyService,u)),this._instantiationService=n.createChild(new Nr.y([kr.i6,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new ao(e),this._register(this._focusTracker.onChange((()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())}))),this._contentWidgets={},this._overlayWidgets={},f=Array.isArray(i.contributions)?i.contributions:r.Uc.getEditorContributions();for(const e of f)if(this._contributions[e.id])(0,S.dL)(new Error(`Cannot have two contributions with the same id ${e.id}`));else try{const t=this._instantiationService.createInstance(e.ctor,this);this._contributions[e.id]=t}catch(e){(0,S.dL)(e)}r.Uc.getEditorActions().forEach((e=>{if(this._actions[e.id])return void(0,S.dL)(new Error(`Cannot have two actions with the same id ${e.id}`));const t=new qn.p(e.id,e.label,e.alias,(0,$t.f6)(e.precondition),(()=>this._instantiationService.invokeFunction((t=>Promise.resolve(e.runEditorCommand(t,this,null))))),this._contextKeyService);this._actions[t.id]=t})),this._codeEditorService.addCodeEditor(this)}get isSimpleWidget(){return this._configuration.isSimpleWidget}_createConfiguration(e,t,i){return new V(e,t,this._domElement,i)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return Gn.g.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;txe.e.lift(e))))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Se.i.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e,t="api"){if(this._modelData){if(!Ce.L.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!xe.e.isIRange(e))throw new Error("Invalid arguments");const r=this._modelData.model.validateRange(e),o=this._modelData.viewModel.coordinatesConverter.convertModelRangeToViewRange(r);this._modelData.viewModel.revealRange("api",i,o,t,n)}revealLine(e,t=0){this._revealLine(e,0,t)}revealLineInCenter(e,t=0){this._revealLine(e,1,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._revealLine(e,2,t)}revealLineNearTop(e,t=0){this._revealLine(e,5,t)}_revealLine(e,t,i){if("number"!=typeof e)throw new Error("Invalid arguments");this._sendRevealRange(new xe.e(e,1,e,1),t,!1,i)}revealPosition(e,t=0){this._revealPosition(e,0,!0,t)}revealPositionInCenter(e,t=0){this._revealPosition(e,1,!0,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._revealPosition(e,2,!0,t)}revealPositionNearTop(e,t=0){this._revealPosition(e,5,!0,t)}_revealPosition(e,t,i,n){if(!Ce.L.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new xe.e(e.lineNumber,e.column,e.lineNumber,e.column),t,i,n)}getSelection(){return this._modelData?this._modelData.viewModel.getSelection():null}getSelections(){return this._modelData?this._modelData.viewModel.getSelections():null}setSelection(e,t="api"){const i=q.Y.isISelection(e),n=xe.e.isIRange(e);if(!i&&!n)throw new Error("Invalid arguments");if(i)this._setSelectionImpl(e,t);else if(n){const i={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(i,t)}}_setSelectionImpl(e,t){if(!this._modelData)return;const i=new q.Y(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections(t,[i])}revealLines(e,t,i=0){this._revealLines(e,t,0,i)}revealLinesInCenter(e,t,i=0){this._revealLines(e,t,1,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._revealLines(e,t,2,i)}revealLinesNearTop(e,t,i=0){this._revealLines(e,t,5,i)}_revealLines(e,t,i,n){if("number"!=typeof e||"number"!=typeof t)throw new Error("Invalid arguments");this._sendRevealRange(new xe.e(e,1,t,1),i,!1,n)}revealRange(e,t=0,i=!1,n=!0){this._revealRange(e,i?1:0,n,t)}revealRangeInCenter(e,t=0){this._revealRange(e,1,!0,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._revealRange(e,2,!0,t)}revealRangeNearTop(e,t=0){this._revealRange(e,5,!0,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._revealRange(e,6,!0,t)}revealRangeAtTop(e,t=0){this._revealRange(e,3,!0,t)}_revealRange(e,t,i,n){if(!xe.e.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(xe.e.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(this._modelData){if(!e||0===e.length)throw new Error("Invalid arguments");for(let t=0,i=e.length;t0&&this._modelData.viewModel.restoreCursorState(e):this._modelData.viewModel.restoreCursorState([e]);const i=t.contributionsState||{},n=Object.keys(this._contributions);for(let e=0,t=n.length;ee.isSupported())),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":return void this._startComposition();case"compositionEnd":return void this._endComposition(e);case"type":{const t=i;return void this._type(e,t.text||"")}case"replacePreviousChar":{const t=i;return void this._compositionType(e,t.text||"",t.replaceCharCnt||0,0,0)}case"compositionType":{const t=i;return void this._compositionType(e,t.text||"",t.replacePrevCharCnt||0,t.replaceNextCharCnt||0,t.positionDelta||0)}case"paste":{const t=i;return void this._paste(e,t.text||"",t.pasteOnNewLine||!1,t.multicursorText||null,t.mode||null)}case"cut":return void this._cut(e)}const n=this.getAction(t);n?Promise.resolve(n.run()).then(void 0,S.dL):this._modelData&&(this._triggerEditorCommand(e,t,i)||this._triggerCommand(t,i))}_triggerCommand(e,t){this._commandService.executeCommand(e,t)}_startComposition(){this._modelData&&(this._modelData.viewModel.startComposition(),this._onDidCompositionStart.fire())}_endComposition(e){this._modelData&&(this._modelData.viewModel.endComposition(e),this._onDidCompositionEnd.fire())}_type(e,t){this._modelData&&0!==t.length&&("keyboard"===e&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),"keyboard"===e&&this._onDidType.fire(t))}_compositionType(e,t,i,n,r){this._modelData&&this._modelData.viewModel.compositionType(t,i,n,r,e)}_paste(e,t,i,n,r){if(!this._modelData||0===t.length)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const s=this._modelData.viewModel.getSelection().getStartPosition();"keyboard"===e&&this._onDidPaste.fire({range:new xe.e(o.lineNumber,o.column,s.lineNumber,s.column),languageId:r})}_cut(e){this._modelData&&this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=r.Uc.getEditorCommand(t);return!!n&&((i=i||{}).source=e,this._instantiationService.invokeFunction((e=>{Promise.resolve(n.runEditorCommand(e,this,i)).then(void 0,S.dL)})),!0)}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!!this._modelData&&!this._configuration.options.get(81)&&(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!!this._modelData&&!this._configuration.options.get(81)&&(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData)return!1;if(this._configuration.options.get(81))return!1;let n;return n=i?Array.isArray(i)?()=>i:i:()=>null,this._modelData.viewModel.executeEdits(e,t,n),!0}executeCommand(e,t){this._modelData&&this._modelData.viewModel.executeCommand(t,e)}executeCommands(e,t){this._modelData&&this._modelData.viewModel.executeCommands(t,e)}changeDecorations(e){return this._modelData?this._modelData.model.changeDecorations(e,this._id):null}getLineDecorations(e){return this._modelData?this._modelData.model.getLineDecorations(e,this._id,(0,P.$J)(this._configuration.options)):null}getDecorationsInRange(e){return this._modelData?this._modelData.model.getDecorationsInRange(e,this._id,(0,P.$J)(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?0===e.length&&0===t.length?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(e){const t=this._decorationTypeKeysToIds[e];t&&this.deltaDecorations(t,[]),this._decorationTypeKeysToIds.hasOwnProperty(e)&&delete this._decorationTypeKeysToIds[e],this._decorationTypeSubtypes.hasOwnProperty(e)&&delete this._decorationTypeSubtypes[e]}getLayoutInfo(){return this._configuration.options.get(131)}createOverviewRuler(e){return this._modelData&&this._modelData.hasRealView?this._modelData.view.createOverviewRuler(e):null}getContainerDomNode(){return this._domElement}getDomNode(){return this._modelData&&this._modelData.hasRealView?this._modelData.view.domNode.domNode:null}delegateVerticalScrollbarMouseDown(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeContainer(e),this.render()}focus(){this._modelData&&this._modelData.hasRealView&&this._modelData.view.focus()}hasTextFocus(){return!(!this._modelData||!this._modelData.hasRealView)&&this._modelData.view.isFocused()}hasWidgetFocus(){return this._focusTracker&&this._focusTracker.hasFocus()}addContentWidget(e){const t={widget:e,position:e.getPosition()};this._contentWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting a content widget with the same id."),this._contentWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addContentWidget(t)}layoutContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const i=this._contentWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutContentWidget(i)}}removeContentWidget(e){const t=e.getId();if(this._contentWidgets.hasOwnProperty(t)){const e=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(e)}}addOverlayWidget(e){const t={widget:e,position:e.getPosition()};this._overlayWidgets.hasOwnProperty(e.getId())&&console.warn("Overwriting an overlay widget with the same id."),this._overlayWidgets[e.getId()]=t,this._modelData&&this._modelData.hasRealView&&this._modelData.view.addOverlayWidget(t)}layoutOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const i=this._overlayWidgets[t];i.position=e.getPosition(),this._modelData&&this._modelData.hasRealView&&this._modelData.view.layoutOverlayWidget(i)}}removeOverlayWidget(e){const t=e.getId();if(this._overlayWidgets.hasOwnProperty(t)){const e=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(e)}}changeViewZones(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getTargetAtClientPoint(e,t):null}getScrolledVisiblePosition(t){if(!this._modelData||!this._modelData.hasRealView)return null;const i=this._modelData.model.validatePosition(t),n=this._configuration.options,r=n.get(131);return{top:e._getVerticalOffsetForPosition(this._modelData,i.lineNumber,i.column)-this.getScrollTop(),left:this._modelData.view.getOffsetForColumn(i.lineNumber,i.column)+r.glyphMarginWidth+r.lineNumbersWidth+r.decorationsWidth-this.getScrollLeft(),height:n.get(59)}}getOffsetForColumn(e,t){return this._modelData&&this._modelData.hasRealView?this._modelData.view.getOffsetForColumn(e,t):-1}render(e=!1){this._modelData&&this._modelData.hasRealView&&this._modelData.view.render(!0,e)}setAriaOptions(e){this._modelData&&this._modelData.hasRealView&&this._modelData.view.setAriaOptions(e)}applyFontInfo(e){(0,Ye.N)(e,this._configuration.options.get(44))}setBanner(e,t){this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),this._bannerDomNode=e,this._configuration.setReservedHeight(e?t:0),this._bannerDomNode&&this._domElement.prepend(this._bannerDomNode)}_attachModel(e){if(!e)return void(this._modelData=null);const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setModelLineCount(e.getLineCount()),e.onBeforeAttached();const i=new Cr(this._id,this._configuration,e,Kr.create(),Or.create(this._configuration.options),(e=>x.jL(e)),this.languageConfigurationService,this._themeService);t.push(e.onDidChangeDecorations((e=>this._onDidChangeModelDecorations.fire(e)))),t.push(e.onDidChangeLanguage((t=>{this._domElement.setAttribute("data-mode-id",e.getLanguageId()),this._onDidChangeModelLanguage.fire(t)}))),t.push(e.onDidChangeLanguageConfiguration((e=>this._onDidChangeModelLanguageConfiguration.fire(e)))),t.push(e.onDidChangeContent((e=>this._onDidChangeModelContent.fire(e)))),t.push(e.onDidChangeOptions((e=>this._onDidChangeModelOptions.fire(e)))),t.push(e.onWillDispose((()=>this.setModel(null)))),t.push(i.onEvent((e=>{switch(e.kind){case 0:this._onDidContentSizeChange.fire(e);break;case 1:this._editorTextFocus.setValue(e.hasFocus);break;case 2:this._onDidScrollChange.fire(e);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidChangeHiddenAreas.fire();break;case 5:this._onDidAttemptReadOnlyEdit.fire();break;case 6:{e.reachedMaxCursorCount&&this._notificationService.warn(C.N("cursors.maximum","The number of cursors has been limited to {0}.",Un.MAX_CURSOR_COUNT));const t=[];for(let i=0,n=e.selections.length;i{this._paste("keyboard",e,t,i,n)},type:e=>{this._type("keyboard",e)},compositionType:(e,t,i,n)=>{this._compositionType("keyboard",e,t,i,n)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:{paste:(e,t,i,n)=>{const r={text:e,pasteOnNewLine:t,multicursorText:i,mode:n};this._commandService.executeCommand("paste",r)},type:e=>{const t={text:e};this._commandService.executeCommand("type",t)},compositionType:(e,t,i,n)=>{if(i||n){const r={text:e,replacePrevCharCnt:t,replaceNextCharCnt:i,positionDelta:n};this._commandService.executeCommand("compositionType",r)}else{const i={text:e,replaceCharCnt:t};this._commandService.executeCommand("replacePreviousChar",i)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new gt(e.coordinatesConverter);return i.onKeyDown=e=>this._onKeyDown.fire(e),i.onKeyUp=e=>this._onKeyUp.fire(e),i.onContextMenu=e=>this._onContextMenu.fire(e),i.onMouseMove=e=>this._onMouseMove.fire(e),i.onMouseLeave=e=>this._onMouseLeave.fire(e),i.onMouseDown=e=>this._onMouseDown.fire(e),i.onMouseUp=e=>this._onMouseUp.fire(e),i.onMouseDrag=e=>this._onMouseDrag.fire(e),i.onMouseDrop=e=>this._onMouseDrop.fire(e),i.onMouseDropCanceled=e=>this._onMouseDropCanceled.fire(e),i.onMouseWheel=e=>this._onMouseWheel.fire(e),[new hn(t,this._configuration,this._themeService.getColorTheme(),e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){e&&e.removeAllDecorationsWithOwnerId(this._id)}_detachModel(){if(!this._modelData)return null;const e=this._modelData.model,t=this._modelData.hasRealView?this._modelData.view.domNode.domNode:null;return this._modelData.dispose(),this._modelData=null,this._domElement.removeAttribute("data-mode-id"),t&&this._domElement.contains(t)&&this._domElement.removeChild(t),this._bannerDomNode&&this._domElement.contains(this._bannerDomNode)&&this._domElement.removeChild(this._bannerDomNode),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return null!==this._modelData}};no=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([eo(3,Lr.TG),eo(4,K.$),eo(5,Sr.Hy),eo(6,kr.i6),eo(7,tt.XE),eo(8,Er.lT),eo(9,W.F),eo(10,Xr.c_),eo(11,Jr.p)],no);class ro extends L.JT{constructor(){super(),this._onDidChangeToTrue=this._register(new k.Q5),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new k.Q5),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,2===this._value?this._onDidChangeToTrue.fire():1===this._value&&this._onDidChangeToFalse.fire())}}class oo extends L.JT{constructor(e,t){super(),this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=Yn.u.editorSimpleInput.bindTo(t),this._editorFocus=Yn.u.focus.bindTo(t),this._textInputFocus=Yn.u.textInputFocus.bindTo(t),this._editorTextFocus=Yn.u.editorTextFocus.bindTo(t),this._editorTabMovesFocus=Yn.u.tabMovesFocus.bindTo(t),this._editorReadonly=Yn.u.readOnly.bindTo(t),this._inDiffEditor=Yn.u.inDiffEditor.bindTo(t),this._editorColumnSelection=Yn.u.columnSelection.bindTo(t),this._hasMultipleSelections=Yn.u.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=Yn.u.hasNonEmptySelection.bindTo(t),this._canUndo=Yn.u.canUndo.bindTo(t),this._canRedo=Yn.u.canRedo.bindTo(t),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromConfig()))),this._register(this._editor.onDidChangeCursorSelection((()=>this._updateFromSelection()))),this._register(this._editor.onDidFocusEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorWidget((()=>this._updateFromFocus()))),this._register(this._editor.onDidFocusEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidBlurEditorText((()=>this._updateFromFocus()))),this._register(this._editor.onDidChangeModel((()=>this._updateFromModel()))),this._register(this._editor.onDidChangeConfiguration((()=>this._updateFromModel()))),this._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(130)),this._editorReadonly.set(e.get(81)),this._inDiffEditor.set(e.get(54)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some((e=>!e.isEmpty())))):(this._hasMultipleSelections.reset(),this._hasNonEmptySelection.reset())}_updateFromFocus(){this._editorFocus.set(this._editor.hasWidgetFocus()&&!this._editor.isSimpleWidget),this._editorTextFocus.set(this._editor.hasTextFocus()&&!this._editor.isSimpleWidget),this._textInputFocus.set(this._editor.hasTextFocus())}_updateFromModel(){const e=this._editor.getModel();this._canUndo.set(Boolean(e&&e.canUndo())),this._canRedo.set(Boolean(e&&e.canRedo()))}}class so extends L.JT{constructor(e,t,i){super(),this._editor=e,this._contextKeyService=t,this._languageFeaturesService=i,this._langId=Yn.u.languageId.bindTo(t),this._hasCompletionItemProvider=Yn.u.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=Yn.u.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=Yn.u.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=Yn.u.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=Yn.u.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=Yn.u.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=Yn.u.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=Yn.u.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=Yn.u.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=Yn.u.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=Yn.u.hasReferenceProvider.bindTo(t),this._hasRenameProvider=Yn.u.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=Yn.u.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=Yn.u.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=Yn.u.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=Yn.u.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=Yn.u.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=Yn.u.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=Yn.u.isInWalkThroughSnippet.bindTo(t);const n=()=>this._update();this._register(e.onDidChangeModel(n)),this._register(e.onDidChangeModelLanguage(n)),this._register(i.completionProvider.onDidChange(n)),this._register(i.codeActionProvider.onDidChange(n)),this._register(i.codeLensProvider.onDidChange(n)),this._register(i.definitionProvider.onDidChange(n)),this._register(i.declarationProvider.onDidChange(n)),this._register(i.implementationProvider.onDidChange(n)),this._register(i.typeDefinitionProvider.onDidChange(n)),this._register(i.hoverProvider.onDidChange(n)),this._register(i.documentHighlightProvider.onDidChange(n)),this._register(i.documentSymbolProvider.onDidChange(n)),this._register(i.referenceProvider.onDidChange(n)),this._register(i.renameProvider.onDidChange(n)),this._register(i.documentFormattingEditProvider.onDidChange(n)),this._register(i.documentRangeFormattingEditProvider.onDidChange(n)),this._register(i.signatureHelpProvider.onDidChange(n)),this._register(i.inlayHintsProvider.onDidChange(n)),n()}dispose(){super.dispose()}reset(){this._contextKeyService.bufferChangeEvents((()=>{this._langId.reset(),this._hasCompletionItemProvider.reset(),this._hasCodeActionsProvider.reset(),this._hasCodeLensProvider.reset(),this._hasDefinitionProvider.reset(),this._hasDeclarationProvider.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()}))}_update(){const e=this._editor.getModel();e?this._contextKeyService.bufferChangeEvents((()=>{this._langId.set(e.getLanguageId()),this._hasCompletionItemProvider.set(this._languageFeaturesService.completionProvider.has(e)),this._hasCodeActionsProvider.set(this._languageFeaturesService.codeActionProvider.has(e)),this._hasCodeLensProvider.set(this._languageFeaturesService.codeLensProvider.has(e)),this._hasDefinitionProvider.set(this._languageFeaturesService.definitionProvider.has(e)),this._hasDeclarationProvider.set(this._languageFeaturesService.declarationProvider.has(e)),this._hasImplementationProvider.set(this._languageFeaturesService.implementationProvider.has(e)),this._hasTypeDefinitionProvider.set(this._languageFeaturesService.typeDefinitionProvider.has(e)),this._hasHoverProvider.set(this._languageFeaturesService.hoverProvider.has(e)),this._hasDocumentHighlightProvider.set(this._languageFeaturesService.documentHighlightProvider.has(e)),this._hasDocumentSymbolProvider.set(this._languageFeaturesService.documentSymbolProvider.has(e)),this._hasReferenceProvider.set(this._languageFeaturesService.referenceProvider.has(e)),this._hasRenameProvider.set(this._languageFeaturesService.renameProvider.has(e)),this._hasSignatureHelpProvider.set(this._languageFeaturesService.signatureHelpProvider.has(e)),this._hasInlayHintsProvider.set(this._languageFeaturesService.inlayHintsProvider.has(e)),this._hasDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.has(e)||this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.has(e)),this._hasMultipleDocumentFormattingProvider.set(this._languageFeaturesService.documentFormattingEditProvider.all(e).length+this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(this._languageFeaturesService.documentRangeFormattingEditProvider.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===N.lg.walkThroughSnippet)})):this.reset()}}class ao extends L.JT{constructor(e){super(),this._onChange=this._register(new k.Q5),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(x.go(e)),this._register(this._domFocusTracker.onDidFocus((()=>{this._hasFocus=!0,this._onChange.fire(void 0)}))),this._register(this._domFocusTracker.onDidBlur((()=>{this._hasFocus=!1,this._onChange.fire(void 0)})))}hasFocus(){return this._hasFocus}}const lo=encodeURIComponent("");function ho(e){return lo+encodeURIComponent(e.toString())+co}const uo=encodeURIComponent('');(0,tt.Ic)(((e,t)=>{const i=e.getColor(Pt.b6y);i&&t.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${i}; }`);const n=e.getColor(Pt.lXJ);n&&t.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${ho(n)}") repeat-x bottom left; }`);const r=e.getColor(Pt.L_H);r&&t.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${r}; }`);const o=e.getColor(Pt.pW3);o&&t.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${o}; }`);const s=e.getColor(Pt.uoC);s&&t.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${ho(s)}") repeat-x bottom left; }`);const a=e.getColor(Pt.gpD);a&&t.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=e.getColor(Pt.T83);l&&t.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=e.getColor(Pt.c63);c&&t.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${ho(c)}") repeat-x bottom left; }`);const h=e.getColor(Pt.few);h&&t.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${h}; }`);const d=e.getColor(Pt.fEB);d&&t.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${d}; }`);const u=e.getColor(Pt.Dut);u&&t.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${function(e){return uo+encodeURIComponent(e.toString())+go}(u)}") no-repeat bottom left; }`);const g=e.getColor(et.zu);g&&t.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${g.rgba.a}; }`);const f=e.getColor(et.kp);f&&t.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${f}; }`);const p=e.getColor(Pt.NOs)||"inherit";t.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${p}}`)}))},1214:(e,t,i)=>{"use strict";i.d(t,{p:()=>De});var n=i(3379),r=i.n(n),o=i(7795),s=i.n(o),a=i(569),l=i.n(a),c=i(3565),h=i.n(c),d=i(9216),u=i.n(d),g=i(4589),f=i.n(g),p=i(1927),m={};m.styleTagTransform=f(),m.setAttributes=h(),m.insert=l().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=u(),r()(p.Z,m),p.Z&&p.Z.locals&&p.Z.locals;var _=i(3580),v=i(5321),b=i(8626),y=i(3878),w=i(5393),C=i(4669),x=i(5976),S=i(2136),k=i(3407),L=i(1640),N=i(6505),E=i(4914),D={};D.styleTagTransform=f(),D.setAttributes=h(),D.insert=l().bind(null,"head"),D.domAPI=s(),D.insertStyleElement=u(),r()(E.Z,D),E.Z&&E.Z.locals&&E.Z.locals;var A,T=i(317),I=i(433),M=i(4741),O=i(6830),R=i(4141),P=i(7378),F=i(187),B=i(8625),W=i(7736),V=i(1118),z=i(8819),H=i(3910),j=i(7781),U=i(3046),$=i(9554),K=i(2042);class q{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return 0===this.originalLineStart?1:0===this.modifiedLineStart?2:0}}class G{constructor(e){this.entries=e}}const Y=(0,$.q5)("diff-review-insert",U.lA.add,_.N("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Z=(0,$.q5)("diff-review-remove",U.lA.remove,_.N("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),Q=(0,$.q5)("diff-review-close",U.lA.close,_.N("diffReviewCloseIcon","Icon for 'Close' in diff review."));let X=class e extends x.JT{constructor(e,t){super(),this._languageService=t,this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=(0,b.X)(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=(0,b.X)(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new T.o(this.actionBarContainer.domNode)),this._actionBar.push(new M.aU("diffreview.close",_.N("label.close","Close"),"close-diff-review "+j.kS.asClassName(Q),!0,(()=>{return e=this,t=void 0,n=function*(){return this.hide()},new((i=void 0)||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n})),{label:!1,icon:!0}),this.domNode=(0,b.X)(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=(0,b.X)(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new I.s$(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff((()=>{this._isVisible&&(this._diffs=this._compute(),this._render())}))),this._register(e.getModifiedEditor().onDidChangeCursorPosition((()=>{this._isVisible&&this._render()}))),this._register(v.mu(this.domNode.domNode,"click",(e=>{e.preventDefault();const t=v.Fx(e.target,"diff-review-row");t&&this._goToRow(t)}))),this._register(v.mu(this.domNode.domNode,"keydown",(e=>{(e.equals(18)||e.equals(2066)||e.equals(530))&&(e.preventDefault(),this._goToRow(this._getNextRow())),(e.equals(16)||e.equals(2064)||e.equals(528))&&(e.preventDefault(),this._goToRow(this._getPrevRow())),(e.equals(9)||e.equals(2057)||e.equals(521)||e.equals(1033))&&(e.preventDefault(),this.hide()),(e.equals(10)||e.equals(3))&&(e.preventDefault(),this.accept())}))),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let t=-1;for(let e=0,i=this._diffs.length;e0){const t=e[o-1];n=0===t.originalEndLineNumber?t.originalStartLineNumber+1:t.originalEndLineNumber+1,r=0===t.modifiedEndLineNumber?t.modifiedStartLineNumber+1:t.modifiedEndLineNumber+1}let s=t-3+1,a=i-3+1;if(sa){const e=a-p;p+=e,m+=e}if(m>f){const e=f-m;p+=e,m+=e}u[g++]=new q(n,p,r,m)}n[r++]=new G(u)}let o=n[0].entries;const s=[];let a=0;for(let e=1,t=n.length;ed)&&(d=n),0!==r&&(0===u||rg)&&(g=o)}const f=document.createElement("div");f.className="diff-review-row";const p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const m=d-h+1,b=g-u+1;p.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${h},${m} +${u},${b} @@`)),f.setAttribute("data-line",String(u));const y=e=>0===e?_.N("no_lines_changed","no lines changed"):1===e?_.N("one_line_changed","1 line changed"):_.N("more_lines_changed","{0} lines changed",e),w=y(m),C=y(b);f.setAttribute("aria-label",_.N({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,h,w,u,C)),f.appendChild(p),f.setAttribute("role","listitem"),c.appendChild(f);const x=i.get(59);let k=u;for(let a=0,h=l.length;ae}),X=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(J=1,ee=K.O,function(e,t){ee(e,t,J)})],X),(0,j.Ic)(((e,t)=>{const i=e.getColor(B.hw);i&&t.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${i}; }`);const n=e.getColor(H._wn);n&&t.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${n} 0 -6px 6px -6px inset; }`)}));class te extends O.R6{constructor(){super({id:"editor.action.diffReview.next",label:_.N("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:z.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=ne(e);i&&i.diffReviewNext()}}class ie extends O.R6{constructor(){super({id:"editor.action.diffReview.prev",label:_.N("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:z.Ao.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=ne(e);i&&i.diffReviewPrev()}}function ne(e){const t=e.get(L.$),i=t.listDiffEditors(),n=t.getActiveCodeEditor();if(!n)return null;for(let e=0,t=i.length;en.modifiedStartLineNumber?_.N("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):_.N("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"):n.originalEndLineNumber>n.modifiedStartLineNumber?_.N("diff.clipboard.copyChangedLinesContent.label","Copy changed lines"):_.N("diff.clipboard.copyChangedLinesContent.single.label","Copy changed line"),void 0,!0,(()=>pe(this,void 0,void 0,(function*(){const e=new re.e(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),t=n.originalModel.getValueInRange(e);yield this._clipboardService.writeText(t)})))));let h,d=0;n.originalEndLineNumber>n.modifiedStartLineNumber&&(h=new M.aU("diff.clipboard.copyDeletedLineContent",c?_.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber):_.N("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber),void 0,!0,(()=>pe(this,void 0,void 0,(function*(){const e=n.originalModel.getLineContent(n.originalStartLineNumber+d);if(""===e){const e=n.originalModel.getEndOfLineSequence();yield this._clipboardService.writeText(0===e?"\n":"\r\n")}else yield this._clipboardService.writeText(e)})))),l.push(h)),i.getOption(81)||l.push(new M.aU("diff.inline.revertChange",_.N("diff.inline.revertChange.label","Revert this change"),void 0,!0,(()=>pe(this,void 0,void 0,(function*(){const e=new re.e(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),t=n.originalModel.getValueInRange(e);if(0===n.modifiedEndLineNumber){const e=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new re.e(n.modifiedStartLineNumber,e,n.modifiedStartLineNumber,e),text:a+t}])}else{const e=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new re.e(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,e),text:t}])}})))));const u=(e,t)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:e,y:t}),getActions:()=>(h&&(h.label=c?_.N("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+d):_.N("diff.clipboard.copyChangedLineContent.label","Copy changed line ({0})",n.originalStartLineNumber+d)),l),autoSelectFirstItem:!0})};this._register(v.mu(this._diffActions,"mousedown",(e=>{const{top:t,height:i}=v.i(this._diffActions),n=Math.floor(s/3);e.preventDefault(),u(e.posx,t+i+n)}))),this._register(i.onMouseMove((e=>{(8===e.target.type||5===e.target.type)&&e.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,d=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s)):this.visibility=!1}))),this._register(i.onMouseDown((e=>{!e.event.rightButton||8!==e.target.type&&5!==e.target.type||e.target.detail.viewZoneId===this._viewZoneId&&(e.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,e.event.browserEvent.y,s),u(e.event.posx,e.event.posy+s))})))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,this._diffActions.style.visibility=e?"visible":"hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=v.i(e),r=t-n,o=Math.floor(r/i),s=o*i;if(this._diffActions.style.top=`${s}px`,this.diff.viewLineCounts){let e=0;for(let t=0;t!this._zonesMap[String(e.id)]))}clean(e){this._zones.length>0&&e.changeViewZones((e=>{for(const t of this._zones)e.removeZone(t)})),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const r=n?k.Z.capture(e):null;e.changeViewZones((t=>{var n;for(const e of this._zones)t.removeZone(e);for(const e of this._inlineDiffMargins)e.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let r=0,o=i.zones.length;re});let De=class e extends x.JT{constructor(t,i,n,r,o,s,a,l,c,h,d,u){super(),this._editorProgressService=u,this._onDidDispose=this._register(new C.Q5),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new C.Q5),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new C.Q5),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=o,this._codeEditorService=l,this._contextKeyService=this._register(s.createScoped(t)),this._instantiationService=a.createChild(new ue.y([z.i6,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=h,this._id=++ke,this._state=0,this._updatingDiffProgress=null,this._domElement=t,i=i||{},this._options=je(i,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),void 0!==i.isInEmbeddedEditor?this._contextKeyService.createKey("isInEmbeddedDiffEditor",i.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new w.pY((()=>this._updateDecorations()),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=(0,b.X)(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(v.mu(this._overviewDomElement,"mousedown",(e=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(e)}))),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new Se(d,r),this._modifiedEditorState=new Se(d,r),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new we.I(this._containerDomElement,i.dimension)),this._register(this._elementSizeObserver.onDidChange((()=>this._onDidContainerSizeChanged()))),i.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(i,n.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(i,n.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=a.createInstance(X,this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new Re(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Fe(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange((t=>{this._strategy&&this._strategy.applyColors(t)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)})));const g=O.Uc.getDiffEditorContributions();for(const e of g)try{this._register(a.createInstance(e.ctor,this))}catch(e){(0,be.dL)(e)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),1===this._state&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=(0,j.m6)(e.type),i}_recreateOverviewRulers(){this._options.renderOverviewRuler&&(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})));const r=this._contextKeyService.createKey("isInDiffLeftEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>r.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>r.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createRightHandSideEditor(t,i){const n=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(t),i);this._register(n.onDidScrollChange((e=>{this._isHandlingScrollEvent||(e.scrollTopChanged||e.scrollLeftChanged||e.scrollHeightChanged)&&(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())}))),this._register(n.onDidChangeViewZones((()=>{this._onViewZonesChanged()}))),this._register(n.onDidChangeConfiguration((e=>{n.getModel()&&(e.hasChanged(44)&&this._updateDecorationsRunner.schedule(),e.hasChanged(132)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))}))),this._register(n.onDidChangeHiddenAreas((()=>{this._updateDecorationsRunner.cancel(),this._updateDecorations()}))),this._register(n.onDidChangeModelContent((()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}))),this._register(n.onDidChangeModelOptions((e=>{e.tabSize&&this._updateDecorationsRunner.schedule()})));const r=this._contextKeyService.createKey("isInDiffRightEditor",n.hasWidgetFocus());return this._register(n.onDidFocusEditorWidget((()=>r.set(!0)))),this._register(n.onDidBlurEditorWidget((()=>r.set(!1)))),this._register(n.onDidContentSizeChange((t=>{const i=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+e.ONE_OVERVIEW_WIDTH,n=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:n,contentWidth:i,contentHeightChanged:t.contentHeightChanged,contentWidthChanged:t.contentWidthChanged})}))),n}_createInnerEditor(e,t,i,n){return e.createInstance(N.Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return se.g.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(t){const i=je(t,this._options),n=(o=i,{enableSplitViewResizing:(r=this._options).enableSplitViewResizing!==o.enableSplitViewResizing,renderSideBySide:r.renderSideBySide!==o.renderSideBySide,maxComputationTime:r.maxComputationTime!==o.maxComputationTime,maxFileSize:r.maxFileSize!==o.maxFileSize,ignoreTrimWhitespace:r.ignoreTrimWhitespace!==o.ignoreTrimWhitespace,renderIndicators:r.renderIndicators!==o.renderIndicators,originalEditable:r.originalEditable!==o.originalEditable,diffCodeLens:r.diffCodeLens!==o.diffCodeLens,renderOverviewRuler:r.renderOverviewRuler!==o.renderOverviewRuler,diffWordWrap:r.diffWordWrap!==o.diffWordWrap});var r,o;this._options=i;const s=n.ignoreTrimWhitespace||n.renderIndicators,a=this._isVisible&&(n.maxComputationTime||n.maxFileSize);s?this._beginUpdateDecorations():a&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(t)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(t)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),n.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new Re(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new Fe(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=e._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),n.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getContainerDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e,t="api"){this._modifiedEditor.setPosition(e,t)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e,t="api"){this._modifiedEditor.setSelection(e,t)}setSelections(e,t="api"){this._modifiedEditor.setSelections(e,t)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){return{original:this._originalEditor.saveViewState(),modified:this._modifiedEditor.saveViewState()}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler)return;if(!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=e.ENTIRE_DIFF_OVERVIEW_WIDTH-2*e.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:e.ONE_OVERVIEW_WIDTH,right:n+e.ONE_OVERVIEW_WIDTH,height:t-i}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:e.ONE_OVERVIEW_WIDTH,height:t-i}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){-1!==this._beginUpdateDecorationsTimeout&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout((()=>this._beginUpdateDecorations()),e.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t||!(!e||!t)&&e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const t=this._originalEditor.getModel(),i=this._modifiedEditor.getModel();if(!t||!i)return;this._diffComputationToken++;const n=this._diffComputationToken,r=1024*this._options.maxFileSize*1024,o=e=>{const t=e.getValueLength();return 0===r||t<=r};o(t)&&o(i)?(this._setState(1),this._editorWorkerService.computeDiff(t.uri,i.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then((e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=e,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())}),(e=>{n===this._diffComputationToken&&t===this._originalEditor.getModel()&&i===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())}))):e._equals(t.uri,this._lastOriginalWarning)&&e._equals(i.uri,this._lastModifiedWarning)||(this._lastOriginalWarning=t.uri,this._lastModifiedWarning=i.uri,this._notificationService.warn(_.N("diff.tooLarge","Cannot compare files because one file is too large.")))}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);return t.inDiffEditor=!0,t.automaticLayout=!1,t.scrollbar=Object.assign({},t.scrollbar||{}),t.scrollbar.vertical="visible",t.folding=!1,t.codeLens=this._options.diffCodeLens,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:(t.wordWrapOverride1="off",t.wordWrapOverride2="off"),e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(t){const i=this._adjustOptionsForSubEditor(t);return t.modifiedAriaLabel&&(i.ariaLabel=t.modifiedAriaLabel),i.wordWrapOverride1=this._options.diffWordWrap,i.revealHorizontalRightPadding=R.BH.revealHorizontalRightPadding.defaultValue+e.ENTIRE_DIFF_OVERVIEW_WIDTH,i.scrollbar.verticalHasArrows=!1,i.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},i),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const t=this._elementSizeObserver.getWidth(),i=this._elementSizeObserver.getHeight(),n=this._getReviewHeight(),r=this._strategy.layout();this._originalDomNode.style.width=r+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=t-r+"px",this._modifiedDomNode.style.left=r+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=i-n+"px",this._overviewDomElement.style.width=e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=t-e.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(e.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:r,height:i-n}),this._modifiedEditor.layout({width:t-r-(this._options.renderOverviewRuler?e.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:i-n}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(i-n,t,n),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),r=Math.max(0,n-0),o=i>0?r/i:0;return{height:Math.max(0,Math.floor(e.height*o)),top:Math.floor(t*o)}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(0===i.length||e=a?n=o+1:(n=o,r=o)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.originalStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-i;return s<=r?n+Math.min(s,o):n+o-r+s}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,(e=>e.modifiedStartLineNumber));if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),r=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,s=e-n;return s<=o?i+Math.min(s,r):i+r-o+s}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};De.ONE_OVERVIEW_WIDTH=15,De.ENTIRE_DIFF_OVERVIEW_WIDTH=30,De.UPDATE_DIFF_DECORATIONS_DELAY=200,De=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([xe(3,ve.p),xe(4,le.p),xe(5,z.i6),xe(6,de.TG),xe(7,L.$),xe(8,j.XE),xe(9,ge.lT),xe(10,fe.i),xe(11,ye.ek)],De);class Ae extends x.JT{constructor(e){super(),this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=e.getColor(H.P6Y)||(e.getColor(H.ypS)||H.CzK).transparent(2),i=e.getColor(H.F9q)||(e.getColor(H.P4M)||H.keg).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,r){r=r.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber)),n=n.sort(((e,t)=>e.afterLineNumber-t.afterLineNumber));const o=this._getViewZones(e,n,r,i),s=this._getOriginalEditorDecorations(o,e,t,i),a=this._getModifiedEditorDecorations(o,e,t,i);return{original:{decorations:s.decorations,overviewZones:s.overviewZones,zones:o.original},modified:{decorations:a.decorations,overviewZones:a.overviewZones,zones:o.modified}}}}class Te{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._indexe.afterLineNumber-t.afterLineNumber,_=(e,t)=>{if(null===t.domNode&&e.length>0){const i=e[e.length-1];if(i.afterLineNumber===t.afterLineNumber&&null===i.domNode)return void(i.heightInLines+=t.heightInLines)}e.push(t)},v=new Te(this._modifiedForeignVZ),b=new Te(this._originalForeignVZ);let y=1,w=1;for(let i=0,n=this._lineChanges.length;i<=n;i++){const C=i0?-1:0),g=C.modifiedStartLineNumber+(C.modifiedEndLineNumber>0?-1:0),d=C.originalEndLineNumber>0?Ie._getViewLineCount(this._originalEditor,C.originalStartLineNumber,C.originalEndLineNumber):0,h=C.modifiedEndLineNumber>0?Ie._getViewLineCount(this._modifiedEditor,C.modifiedStartLineNumber,C.modifiedEndLineNumber):0,f=Math.max(C.originalStartLineNumber,C.originalEndLineNumber),p=Math.max(C.modifiedStartLineNumber,C.modifiedEndLineNumber)):(u+=1e7+d,g+=1e7+h,f=u,p=g);let x=[],S=[];if(r){let e;e=C?C.originalEndLineNumber>0?C.originalStartLineNumber-y:C.modifiedStartLineNumber-w:o.getLineCount()-y+1;for(let t=0;tr&&S.push({afterLineNumber:i,heightInLines:n-r,domNode:null,marginDomNode:null})}C&&(y=(C.originalEndLineNumber>0?C.originalEndLineNumber:C.originalStartLineNumber)+1,w=(C.modifiedEndLineNumber>0?C.modifiedEndLineNumber:C.modifiedStartLineNumber)+1)}for(;v.current&&v.current.afterLineNumber<=p;){let e;e=v.current.afterLineNumber<=g?u-g+v.current.afterLineNumber:f;let i=null;C&&C.modifiedStartLineNumber<=v.current.afterLineNumber&&v.current.afterLineNumber<=C.modifiedEndLineNumber&&(i=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),x.push({afterLineNumber:e,heightInLines:v.current.height/t,domNode:null,marginDomNode:i}),v.advance()}for(;b.current&&b.current.afterLineNumber<=f;){let t;t=b.current.afterLineNumber<=u?g-u+b.current.afterLineNumber:p,S.push({afterLineNumber:t,heightInLines:b.current.height/e,domNode:null}),b.advance()}if(null!==C&&We(C)){const e=this._produceOriginalFromDiff(C,d,h);e&&x.push(e)}if(null!==C&&Ve(C)){const e=this._produceModifiedFromDiff(C,d,h);e&&S.push(e)}let k=0,L=0;for(x=x.sort(m),S=S.sort(m);k=t.heightInLines?(e.heightInLines-=t.heightInLines,L++):(t.heightInLines-=e.heightInLines,k++)}for(;k(e.domNode||(e.domNode=ze()),e)))}}function Me(e,t,i,n,r){return{range:new re.e(e,t,i,n),options:r}}const Oe={charDelete:ae.qx.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:ae.qx.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:ae.qx.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:ae.qx.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:ae.qx.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"gutter-insert",isWholeLine:!0}),lineInsertWithSign:ae.qx.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+j.kS.asClassName(Le),marginClassName:"gutter-insert",isWholeLine:!0}),lineDelete:ae.qx.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteWithSign:ae.qx.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+j.kS.asClassName(Ne),marginClassName:"gutter-delete",isWholeLine:!0}),lineDeleteMargin:ae.qx.register({description:"diff-editor-line-delete-margin",marginClassName:"gutter-delete"})};class Re extends Ae{constructor(e,t){super(e),this._disableSash=!1===t,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new y.g(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart((()=>this._onSashDragStart())),this._sash.onDidChange((e=>this._onSashDrag(e))),this._sash.onDidEnd((()=>this._onSashDragEnd())),this._sash.onDidReset((()=>this._onSashReset()))}setEnableSplitViewResizing(e){const t=!1===e;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?De.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let i=Math.floor((e||.5)*t);const n=Math.floor(.5*t);return i=this._disableSash?n:i||n,t>2*Re.MINIMUM_EDITOR_WIDTH?(it-Re.MINIMUM_EDITOR_WIDTH&&(i=t-Re.MINIMUM_EDITOR_WIDTH)):i=n,this._sashPosition!==i&&(this._sashPosition=i),this._sash.layout(),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const t=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?De.ENTIRE_DIFF_OVERVIEW_WIDTH:0),i=this.layout((this._startSashPosition+(e.currentX-e.startX))/t);this._sashRatio=i/t,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),r=this._dataSource.getModifiedEditor();return new Pe(e,t,i,n,r).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const r=this._dataSource.getOriginalEditor(),o=String(this._removeColor),s={decorations:[],overviewZones:[]},a=r.getModel(),l=r._getViewModel();for(const e of t)if(Ve(e)){s.decorations.push({range:new re.e(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824),options:n?Oe.lineDeleteWithSign:Oe.lineDelete}),We(e)&&e.charChanges||s.decorations.push(Me(e.originalStartLineNumber,1,e.originalEndLineNumber,1073741824,Oe.charDeleteWholeLine));const t=He(a,l,e.originalStartLineNumber,e.originalEndLineNumber);if(s.overviewZones.push(new ce.EY(t.startLineNumber,t.endLineNumber,0,o)),e.charChanges)for(const t of e.charChanges)if(Ve(t))if(i)for(let e=t.originalStartLineNumber;e<=t.originalEndLineNumber;e++){let i,n;i=e===t.originalStartLineNumber?t.originalStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.originalEndLineNumber?t.originalEndColumn:a.getLineLastNonWhitespaceColumn(e),s.decorations.push(Me(e,i,e,n,Oe.charDelete))}else s.decorations.push(Me(t.originalStartLineNumber,t.originalStartColumn,t.originalEndLineNumber,t.originalEndColumn,Oe.charDelete))}return s}_getModifiedEditorDecorations(e,t,i,n){const r=this._dataSource.getModifiedEditor(),o=String(this._insertColor),s={decorations:[],overviewZones:[]},a=r.getModel(),l=r._getViewModel();for(const e of t)if(We(e)){s.decorations.push({range:new re.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824),options:n?Oe.lineInsertWithSign:Oe.lineInsert}),Ve(e)&&e.charChanges||s.decorations.push(Me(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber,1073741824,Oe.charInsertWholeLine));const t=He(a,l,e.modifiedStartLineNumber,e.modifiedEndLineNumber);if(s.overviewZones.push(new ce.EY(t.startLineNumber,t.endLineNumber,0,o)),e.charChanges)for(const t of e.charChanges)if(We(t))if(i)for(let e=t.modifiedStartLineNumber;e<=t.modifiedEndLineNumber;e++){let i,n;i=e===t.modifiedStartLineNumber?t.modifiedStartColumn:a.getLineFirstNonWhitespaceColumn(e),n=e===t.modifiedEndLineNumber?t.modifiedEndColumn:a.getLineLastNonWhitespaceColumn(e),s.decorations.push(Me(e,i,e,n,Oe.charInsert))}else s.decorations.push(Me(t.modifiedStartLineNumber,t.modifiedStartColumn,t.modifiedEndLineNumber,t.modifiedEndColumn,Oe.charInsert))}return s}}Re.MINIMUM_EDITOR_WIDTH=100;class Pe extends Ie{constructor(e,t,i,n,r){super(e,t,i,n,r)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class Fe extends Ae{constructor(e,t){super(e),this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange((t=>{this._decorationsLeft!==t.decorationsLeft&&(this._decorationsLeft=t.decorationsLeft,e.relayoutEditors())})))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const r=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new Be(e,t,i,r,o,n).getViewZones()}_getOriginalEditorDecorations(e,t,i,n){const r=String(this._removeColor),o={decorations:[],overviewZones:[]},s=this._dataSource.getOriginalEditor(),a=s.getModel(),l=s._getViewModel();let c=0;for(const i of t)if(Ve(i)){for(o.decorations.push({range:new re.e(i.originalStartLineNumber,1,i.originalEndLineNumber,1073741824),options:Oe.lineDeleteMargin});c=i.originalStartLineNumber)break;c++}let t=0;if(c0,x=(0,oe.l$)(1e4);let k=0,L=0,N=null;for(let t=_.originalStartLineNumber;t<=_.originalEndLineNumber;t++){const o=t-_.originalStartLineNumber,s=this._originalModel.getLineTokens(t),b=s.getLineContent(),S=p[m++],E=he.Kp.filter(w,t,1,b.length+1);if(S){let p=0;for(const e of S.breakOffsets){const t=s.sliceAndInflate(p,e,0),o=b.substring(p,e);k=Math.max(k,this._renderOriginalLine(L++,o,t,he.Kp.extractWrapped(E,p,e),C,a,l,n,r,c,h,d,u,g,f,i,x,y)),p=e}for(N||(N=[]);N.lengthe.afterLineNumber-t.afterLineNumber))}_renderOriginalLine(e,t,i,n,r,o,s,a,l,c,h,d,u,g,f,p,m,_){m.appendASCIIString('
');const v=V.wA.isBasicASCII(t,o),b=V.wA.containsRTL(t,v,s),y=(0,W.d1)(new W.IJ(a.isMonospace&&!l,a.canUseHalfwidthRightwardsArrow,t,!1,v,b,0,i,n,p,0,a.spaceWidth,a.middotWidth,a.wsmiddotWidth,d,u,g,f!==R.n0.OFF,null),m);if(m.appendASCIIString("
"),this._renderIndicators){const t=document.createElement("div");t.className=`delete-sign ${j.kS.asClassName(Ne)}`,t.setAttribute("style",`position:absolute;top:${e*c}px;width:${h}px;height:${c}px;right:0;`),_.appendChild(t)}return y.characterMapping.getAbsoluteOffset(y.characterMapping.length)}}function We(e){return e.modifiedEndLineNumber>0}function Ve(e){return e.originalEndLineNumber>0}function ze(){const e=document.createElement("div");return e.className="diagonal-fill",e}function He(e,t,i,n){const r=e.getLineCount();return i=Math.min(r,Math.max(1,i)),n=Math.min(r,Math.max(1,n)),t.coordinatesConverter.convertModelRangeToViewRange(new re.e(i,e.getLineMinColumn(i),n,e.getLineMaxColumn(n)))}function je(e,t){return{enableSplitViewResizing:(0,R.O7)(e.enableSplitViewResizing,t.enableSplitViewResizing),renderSideBySide:(0,R.O7)(e.renderSideBySide,t.renderSideBySide),maxComputationTime:(0,R.Zc)(e.maxComputationTime,t.maxComputationTime,0,1073741824),maxFileSize:(0,R.Zc)(e.maxFileSize,t.maxFileSize,0,1073741824),ignoreTrimWhitespace:(0,R.O7)(e.ignoreTrimWhitespace,t.ignoreTrimWhitespace),renderIndicators:(0,R.O7)(e.renderIndicators,t.renderIndicators),originalEditable:(0,R.O7)(e.originalEditable,t.originalEditable),diffCodeLens:(0,R.O7)(e.diffCodeLens,t.diffCodeLens),renderOverviewRuler:(0,R.O7)(e.renderOverviewRuler,t.renderOverviewRuler),diffWordWrap:(i=e.diffWordWrap,n=t.diffWordWrap,(0,R.NY)(i,n,["off","on","inherit"]))};var i,n}(0,j.Ic)(((e,t)=>{const i=e.getColor(H.ypS);i&&t.addRule(`.monaco-editor .char-insert, .monaco-diff-editor .char-insert { background-color: ${i}; }`);const n=e.getColor(H.hzo)||i;n&&t.addRule(`.monaco-editor .line-insert, .monaco-diff-editor .line-insert { background-color: ${n}; }`);const r=e.getColor(H.j51)||n;r&&(t.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${r}; }`),t.addRule(`.monaco-editor .gutter-insert, .monaco-diff-editor .gutter-insert { background-color: ${r}; }`));const o=e.getColor(H.P4M);o&&t.addRule(`.monaco-editor .char-delete, .monaco-diff-editor .char-delete { background-color: ${o}; }`);const s=e.getColor(H.xi6)||o;s&&t.addRule(`.monaco-editor .line-delete, .monaco-diff-editor .line-delete { background-color: ${s}; }`);const a=e.getColor(H.zOm)||s;a&&(t.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${a}; }`),t.addRule(`.monaco-editor .gutter-delete, .monaco-diff-editor .gutter-delete { background-color: ${a}; }`));const l=e.getColor(H.XL$);l&&t.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${"hc"===e.type?"dashed":"solid"} ${l}; }`);const c=e.getColor(H.mHy);c&&t.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${"hc"===e.type?"dashed":"solid"} ${c}; }`);const h=e.getColor(H._wn);h&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${h}; }`);const d=e.getColor(H.LLc);d&&t.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${d}; }`);const u=e.getColor(H.etL);u&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport {\n\t\t\t\tbackground: ${u};\n\t\t\t}\n\t\t`);const g=e.getColor(H.ABB);g&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:hover {\n\t\t\t\tbackground: ${g};\n\t\t\t}\n\t\t`);const f=e.getColor(H.ynu);f&&t.addRule(`\n\t\t\t.monaco-diff-editor .diffViewport:active {\n\t\t\t\tbackground: ${f};\n\t\t\t}\n\t\t`);const p=e.getColor(H.L_t);t.addRule(`\n\t.monaco-editor .diagonal-fill {\n\t\tbackground-image: linear-gradient(\n\t\t\t-45deg,\n\t\t\t${p} 12.5%,\n\t\t\t#0000 12.5%, #0000 50%,\n\t\t\t${p} 50%, ${p} 62.5%,\n\t\t\t#0000 62.5%, #0000 100%\n\t\t);\n\t\tbackground-size: 8px 8px;\n\t}\n\t`)}))},5623:(e,t,i)=>{"use strict";i.d(t,{F:()=>c});var n=i(5146),r=i(4669),o=i(5976),s=i(6248),a=i(4314);const l={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class c extends o.JT{constructor(e,t={}){super(),this._onDidUpdate=this._register(new r.Q5),this._editor=e,this._options=s.jB(t,l,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose((()=>this.dispose()))),this._register(this._editor.onDidUpdateDiff((()=>this._onDiffUpdated()))),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition((e=>{this.ignoreSelectionChange||(this.nextIdx=-1)}))),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel((e=>{this.revealFirst=!0}))),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&null!==this._editor.getLineChanges()&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach((e=>{!this._options.ignoreCharChanges&&e.charChanges?e.charChanges.forEach((e=>{this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,e.modifiedStartColumn,e.modifiedEndLineNumber,e.modifiedEndColumn)})})):0===e.modifiedEndLineNumber?this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedStartLineNumber+1,1)}):this.ranges.push({rhs:!0,range:new a.e(e.modifiedStartLineNumber,1,e.modifiedEndLineNumber+1,1)})})),this.ranges.sort(((e,t)=>a.e.compareRangesUsingStarts(e.range,t.range))),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1;const i=this._editor.getPosition();if(i){for(let n=0,r=this.ranges.length;n=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));const i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{const e=i.range.getStartPosition();this._editor.setPosition(e),this._editor.revealRangeInCenter(i.range,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}},4527:(e,t,i)=>{"use strict";i.d(t,{H:()=>p});var n=i(6248),r=i(1640),o=i(6505),s=i(4565),a=i(8819),l=i(2065),c=i(9422),h=i(7781),d=i(1106),u=i(9381),g=i(1922),f=function(e,t){return function(i,n){t(i,n,e)}};let p=class extends o.Gm{constructor(e,t,i,n,r,o,s,a,l,c,h,d){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,r,o,s,a,l,c,h,d),this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration((e=>this._onParentConfigurationChanged(e))))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){n.jB(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};p=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([f(3,l.TG),f(4,r.$),f(5,s.Hy),f(6,a.i6),f(7,h.XE),f(8,c.lT),f(9,d.F),f(10,u.c_),f(11,g.p)],p)},1329:(e,t,i)=>{"use strict";i.d(t,{OY:()=>o,Sj:()=>s,T4:()=>r,Uo:()=>a,hP:()=>l});var n=i(3860);class r{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition())}}class o{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromRange(i,0)}}class s{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getStartPosition())}}class a{constructor(e,t,i,n,r=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=r}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return n.Y.fromPositions(i.getEndPosition().delta(this._lineNumberDeltaOffset,this._columnDeltaOffset))}}class l{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}},291:(e,t,i)=>{"use strict";i.d(t,{U:()=>h});var n=i(5924),r=i(7988),o=i(4314),s=i(3860),a=i(9381);const l=Object.create(null);function c(e,t){if(t<=0)return"";l[e]||(l[e]=["",e]);const i=l[e];for(let n=i.length;n<=t;n++)i[n]=i[n-1]+e;return i[t]}class h{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,o){const s=r.i.visibleColumnFromColumn(e,t,i);if(o){const e=c(" ",n);return c(e,r.i.prevIndentTabStop(s,n)/n)}return c("\t",r.i.prevRenderTabStop(s,i)/i)}static shiftIndent(e,t,i,n,o){const s=r.i.visibleColumnFromColumn(e,t,i);if(o){const e=c(" ",n);return c(e,r.i.nextIndentTabStop(s,n)/n)}return c("\t",r.i.nextRenderTabStop(s,i)/i)}_addEditOperation(e,t,i){this._useLastEditRangeForCursorEndPosition?e.addTrackedEditOperation(t,i):e.addEditOperation(t,i)}getEditOperations(e,t){const i=this._selection.startLineNumber;let s=this._selection.endLineNumber;1===this._selection.endColumn&&i!==s&&(s-=1);const{tabSize:l,indentSize:d,insertSpaces:u}=this._opts,g=i===s;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,f=0;for(let p=i;p<=s;p++,c=f){f=0;const s=e.getLineContent(p);let m,_=n.LC(s);if((!this._opts.isUnshift||0!==s.length&&0!==_)&&(g||this._opts.isUnshift||0!==s.length)){if(-1===_&&(_=s.length),p>1&&r.i.visibleColumnFromColumn(s,_+1,l)%d!=0&&e.isCheapToTokenize(p-1)){const t=a.zu.getEnterAction(this._opts.autoIndent,e,new o.e(p-1,e.getLineMaxColumn(p-1),p-1,e.getLineMaxColumn(p-1)));if(t){if(f=c,t.appendText)for(let e=0,i=t.appendText.length;e{"use strict";i.d(t,{$J:()=>A,Av:()=>I,BH:()=>B,Bb:()=>h,Bc:()=>P,LJ:()=>d,NY:()=>x,O7:()=>_,Zc:()=>b,d2:()=>L,gk:()=>D,hL:()=>R,n0:()=>N,qt:()=>M,rk:()=>g,y0:()=>c});var n=i(3580),r=i(1432),o=i(270),s=i(9488),a=i(6248),l=i(2075);const c=8;class h{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class d{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class u{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return f(e,t)}compute(e,t,i){return i}}class g{constructor(e,t){this.newValue=e,this.didChange=t}}function f(e,t){if("object"!=typeof e||"object"!=typeof t||!e||!t)return new g(t,e!==t);if(Array.isArray(e)||Array.isArray(t)){const i=Array.isArray(e)&&Array.isArray(t)&&s.fS(e,t);return new g(t,i)}let i=!1;for(const n in t)if(t.hasOwnProperty(n)){const r=f(e[n],t[n]);r.didChange&&(e[n]=r.newValue,i=!0)}return new g(e,i)}class p{constructor(e){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0}applyUpdate(e,t){return f(e,t)}validate(e){return this.defaultValue}}class m{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}applyUpdate(e,t){return f(e,t)}validate(e){return void 0===e?this.defaultValue:e}compute(e,t,i){return i}}function _(e,t){return void 0===e?t:"false"!==e&&Boolean(e)}class v extends m{constructor(e,t,i,n){void 0!==n&&(n.type="boolean",n.default=i),super(e,t,i,n)}validate(e){return _(e,this.defaultValue)}}function b(e,t,i,n){if(void 0===e)return t;let r=parseInt(e,10);return isNaN(r)?t:(r=Math.max(i,r),r=Math.min(n,r),0|r)}class y extends m{constructor(e,t,i,n,r,o){void 0!==o&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=r),super(e,t,i,o),this.minimum=n,this.maximum=r}static clampedInt(e,t,i,n){return b(e,t,i,n)}validate(e){return y.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class w extends m{constructor(e,t,i,n,r){void 0!==r&&(r.type="number",r.default=i),super(e,t,i,r),this.validationFn=n}static clamp(e,t,i){return ei?i:e}static float(e,t){if("number"==typeof e)return e;if(void 0===e)return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(w.float(e,this.defaultValue))}}class C extends m{static string(e,t){return"string"!=typeof e?t:e}constructor(e,t,i,n){void 0!==n&&(n.type="string",n.default=i),super(e,t,i,n)}validate(e){return C.string(e,this.defaultValue)}}function x(e,t,i){return"string"!=typeof e||-1===i.indexOf(e)?t:e}class S extends m{constructor(e,t,i,n,r){void 0!==r&&(r.type="string",r.enum=n,r.default=i),super(e,t,i,r),this._allowedValues=n}validate(e){return x(e,this.defaultValue,this._allowedValues)}}class k extends u{constructor(e,t,i,n,r,o,s){void 0!==s&&(s.type="string",s.enum=r,s.default=n),super(e,t,i,s),this._allowedValues=r,this._convert=o}validate(e){return"string"!=typeof e||-1===this._allowedValues.indexOf(e)?this.defaultValue:this._convert(e)}}var L;!function(e){e[e.Line=1]="Line",e[e.Block=2]="Block",e[e.Underline=3]="Underline",e[e.LineThin=4]="LineThin",e[e.BlockOutline=5]="BlockOutline",e[e.UnderlineThin=6]="UnderlineThin"}(L||(L={}));class N extends u{constructor(){super(45,"fontLigatures",N.OFF,{anyOf:[{type:"boolean",description:n.N("fontLigatures","Enables/Disables font ligatures ('calt' and 'liga' font features). Change this to a string for fine-grained control of the 'font-feature-settings' CSS property.")},{type:"string",description:n.N("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:n.N("fontLigaturesGeneral","Configures font ligatures or font features. Can be either a boolean to enable/disable ligatures or a string for the value of the CSS 'font-feature-settings' property."),default:!1})}validate(e){return void 0===e?this.defaultValue:"string"==typeof e?"false"===e?N.OFF:"true"===e?N.ON:e:Boolean(e)?N.ON:N.OFF}}N.OFF='"liga" off, "calt" off',N.ON='"liga" on, "calt" on';class E extends u{constructor(){super(47,"fontWeight",R.fontWeight,{anyOf:[{type:"number",minimum:E.MINIMUM_VALUE,maximum:E.MAXIMUM_VALUE,errorMessage:n.N("fontWeightErrorMessage",'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.')},{type:"string",pattern:"^(normal|bold|1000|[1-9][0-9]{0,2})$"},{enum:E.SUGGESTION_VALUES}],default:R.fontWeight,description:n.N("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return"normal"===e||"bold"===e?e:String(y.clampedInt(e,R.fontWeight,E.MINIMUM_VALUE,E.MAXIMUM_VALUE))}}E.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"],E.MINIMUM_VALUE=1,E.MAXIMUM_VALUE=1e3;class D extends p{constructor(){super(131)}compute(e,t,i){return D.computeLayout(t,{memory:e.memory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,isDominatedByLongLines:e.isDominatedByLongLines,lineHeight:e.fontInfo.lineHeight,viewLineCount:e.viewLineCount,lineNumbersDigitCount:e.lineNumbersDigitCount,typicalHalfwidthCharacterWidth:e.fontInfo.typicalHalfwidthCharacterWidth,maxDigitWidth:e.fontInfo.maxDigitWidth,pixelRatio:e.pixelRatio})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount:Math.floor(e.viewLineCount/n)}}static _computeMinimapLayout(e,t){const i=e.outerWidth,n=e.outerHeight,r=e.pixelRatio;if(!e.minimap.enabled)return{renderMinimap:0,minimapLeft:0,minimapWidth:0,minimapHeightIsEditorHeight:!1,minimapIsSampling:!1,minimapScale:1,minimapLineHeight:1,minimapCanvasInnerWidth:0,minimapCanvasInnerHeight:Math.floor(r*n),minimapCanvasOuterWidth:0,minimapCanvasOuterHeight:n};const o=t.stableMinimapLayoutInput,s=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&e.minimap.enabled===o.minimap.enabled&&e.minimap.side===o.minimap.side&&e.minimap.size===o.minimap.size&&e.minimap.showSlider===o.minimap.showSlider&&e.minimap.renderCharacters===o.minimap.renderCharacters&&e.minimap.maxColumn===o.minimap.maxColumn&&e.minimap.scale===o.minimap.scale&&e.verticalScrollbarWidth===o.verticalScrollbarWidth&&e.isViewportWrapping===o.isViewportWrapping,a=e.lineHeight,l=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,d=e.minimap.renderCharacters;let u=r>=2?Math.round(2*e.minimap.scale):e.minimap.scale;const g=e.minimap.maxColumn,f=e.minimap.size,p=e.minimap.side,m=e.verticalScrollbarWidth,_=e.viewLineCount,v=e.remainingWidth,b=e.isViewportWrapping,y=d?2:3;let w=Math.floor(r*n);const C=w/r;let x=!1,S=!1,k=y*u,L=u/r,N=1;if("fill"===f||"fit"===f){const{typicalViewportLineCount:i,extraLinesBeyondLastLine:o,desiredRatio:l,minimapLineCount:c}=D.computeContainedMinimapLineCount({viewLineCount:_,scrollBeyondLastLine:h,height:n,lineHeight:a,pixelRatio:r});if(_/c>1)x=!0,S=!0,u=1,k=1,L=u/r;else{let n=!1,c=u+1;if("fit"===f){const e=Math.ceil((_+o)*k);b&&s&&v<=t.stableFitRemainingWidth?(n=!0,c=t.stableFitMaxMinimapScale):n=e>w}if("fill"===f||n){x=!0;const n=u;k=Math.min(a*r,Math.max(1,Math.floor(1/l))),b&&s&&v<=t.stableFitRemainingWidth&&(c=t.stableFitMaxMinimapScale),u=Math.min(c,Math.max(1,Math.floor(k/y))),u>n&&(N=Math.min(2,u/n)),L=u/r/N,w=Math.ceil(Math.max(i,_+o)*k),b?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=v,t.stableFitMaxMinimapScale=u):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const E=Math.floor(g*L),A=Math.min(E,Math.max(0,Math.floor((v-m-2)*L/(l+L)))+c);let T=Math.floor(r*A);const I=T/r;return T=Math.floor(T*N),{renderMinimap:d?1:2,minimapLeft:"left"===p?0:i-A-m,minimapWidth:A,minimapHeightIsEditorHeight:x,minimapIsSampling:S,minimapScale:u,minimapLineHeight:k,minimapCanvasInnerWidth:T,minimapCanvasInnerHeight:w,minimapCanvasOuterWidth:I,minimapCanvasOuterHeight:C}}static computeLayout(e,t){const i=0|t.outerWidth,n=0|t.outerHeight,r=0|t.lineHeight,o=0|t.lineNumbersDigitCount,s=t.typicalHalfwidthCharacterWidth,a=t.maxDigitWidth,l=t.pixelRatio,c=t.viewLineCount,h=e.get(123),u="inherit"===h?e.get(122):h,g="inherit"===u?e.get(118):u,f=e.get(121),p=e.get(2),m=t.isDominatedByLongLines,_=e.get(50),v=0!==e.get(60).renderType,b=e.get(61),w=e.get(94),C=e.get(65),x=e.get(92),S=x.verticalScrollbarSize,k=x.verticalHasArrows,L=x.arrowSize,N=x.horizontalScrollbarSize,E=e.get(58),A=e.get(37);let T;if("string"==typeof E&&/^\d+(\.\d+)?ch$/.test(E)){const e=parseFloat(E.substr(0,E.length-2));T=y.clampedInt(e*s,0,0,1e3)}else T=y.clampedInt(E,0,0,1e3);A&&(T+=16);let I=0;if(v){const e=Math.max(o,b);I=Math.round(e*a)}let M=0;_&&(M=r);let O=0,R=O+M,P=R+I,F=P+T;const B=i-M-I-T;let W=!1,V=!1,z=-1;2!==p&&("inherit"===u&&m?(W=!0,V=!0):"on"===g||"bounded"===g?V=!0:"wordWrapColumn"===g&&(z=f));const H=D._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:r,typicalHalfwidthCharacterWidth:s,pixelRatio:l,scrollBeyondLastLine:w,minimap:C,verticalScrollbarWidth:S,viewLineCount:c,remainingWidth:B,isViewportWrapping:V},t.memory||new d);0!==H.renderMinimap&&0===H.minimapLeft&&(O+=H.minimapWidth,R+=H.minimapWidth,P+=H.minimapWidth,F+=H.minimapWidth);const j=B-H.minimapWidth,U=Math.max(1,Math.floor((j-S-2)/s)),$=k?L:0;return V&&(z=Math.max(1,U),"bounded"===g&&(z=Math.min(z,f))),{width:i,height:n,glyphMarginLeft:O,glyphMarginWidth:M,lineNumbersLeft:R,lineNumbersWidth:I,decorationsLeft:P,decorationsWidth:T,contentLeft:F,contentWidth:j,minimap:H,viewportColumn:U,isWordWrapMinified:W,isViewportWrapping:V,wrappingColumn:z,verticalScrollbarWidth:S,horizontalScrollbarHeight:N,overviewRuler:{top:$,width:S,height:n-2*$,right:0}}}}function A(e){const t=e.get(87);return"editable"===t?e.get(81):"on"!==t}function T(e,t){if("string"!=typeof e)return t;switch(e){case"hidden":return 2;case"visible":return 3;default:return 1}}const I="inUntrustedWorkspace",M={allowedCharacters:"editor.unicodeHighlight.allowedCharacters",invisibleCharacters:"editor.unicodeHighlight.invisibleCharacters",nonBasicASCII:"editor.unicodeHighlight.nonBasicASCII",ambiguousCharacters:"editor.unicodeHighlight.ambiguousCharacters",includeComments:"editor.unicodeHighlight.includeComments",includeStrings:"editor.unicodeHighlight.includeStrings",allowedLocales:"editor.unicodeHighlight.allowedLocales"};function O(e,t,i){const n=i.indexOf(e);return-1===n?t:i[n]}const R={fontFamily:r.dz?"Menlo, Monaco, 'Courier New', monospace":r.IJ?"'Droid Sans Mono', 'monospace', monospace":"Consolas, 'Courier New', monospace",fontWeight:"normal",fontSize:r.dz?12:14,lineHeight:0,letterSpacing:0},P=[];function F(e){return P[e.id]=e,e}const B={acceptSuggestionOnCommitCharacter:F(new v(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:n.N("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.")})),acceptSuggestionOnEnter:F(new S(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",n.N("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:n.N("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:F(new class extends u{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[n.N("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),n.N("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),n.N("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:n.N("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return 0===i?e.accessibilitySupport:i}}),accessibilityPageSize:F(new y(3,"accessibilityPageSize",10,1,1073741824,{description:n.N("accessibilityPageSize","Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")})),ariaLabel:F(new C(4,"ariaLabel",n.N("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:F(new S(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),n.N("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:F(new S(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:F(new S(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",n.N("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:n.N("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:F(new S(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",n.N("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),n.N("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:n.N("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:F(new k(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],(function(e){switch(e){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}),{enumDescriptions:[n.N("editor.autoIndent.none","The editor will not insert indentation automatically."),n.N("editor.autoIndent.keep","The editor will keep the current line's indentation."),n.N("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),n.N("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),n.N("editor.autoIndent.full","The editor will keep the current line's indentation, honor language defined brackets, invoke special onEnterRules defined by languages, and honor indentationRules defined by languages.")],description:n.N("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:F(new v(10,"automaticLayout",!1)),autoSurround:F(new S(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[n.N("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),n.N("editor.autoSurround.quotes","Surround with quotes but not brackets."),n.N("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:n.N("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:F(new class extends u{constructor(){const e={enabled:l.D.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:n.N("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return e&&"object"==typeof e?{enabled:_(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),bracketPairGuides:F(new class extends u{constructor(){const e={bracketPairs:!1,bracketPairsHorizontal:"active",highlightActiveBracketPair:!0,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[n.N("editor.guides.bracketPairs.true","Enables bracket pair guides."),n.N("editor.guides.bracketPairs.active","Enables bracket pair guides only for the active bracket pair."),n.N("editor.guides.bracketPairs.false","Disables bracket pair guides.")],default:e.bracketPairs,description:n.N("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.bracketPairsHorizontal":{type:["boolean","string"],enum:[!0,"active",!1],enumDescriptions:[n.N("editor.guides.bracketPairsHorizontal.true","Enables horizontal guides as addition to vertical bracket pair guides."),n.N("editor.guides.bracketPairsHorizontal.active","Enables horizontal guides only for the active bracket pair."),n.N("editor.guides.bracketPairsHorizontal.false","Disables horizontal bracket pair guides.")],default:e.bracketPairsHorizontal,description:n.N("editor.guides.bracketPairsHorizontal","Controls whether horizontal bracket pair guides are enabled or not.")},"editor.guides.highlightActiveBracketPair":{type:"boolean",default:e.highlightActiveBracketPair,description:n.N("editor.guides.highlightActiveBracketPair","Controls whether the editor should highlight the active bracket pair.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:n.N("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:n.N("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{bracketPairs:O(t.bracketPairs,this.defaultValue.bracketPairs,[!0,!1,"active"]),bracketPairsHorizontal:O(t.bracketPairsHorizontal,this.defaultValue.bracketPairsHorizontal,[!0,!1,"active"]),highlightActiveBracketPair:_(t.highlightActiveBracketPair,this.defaultValue.highlightActiveBracketPair),indentation:_(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:_(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}),stickyTabStops:F(new v(104,"stickyTabStops",!1,{description:n.N("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:F(new v(14,"codeLens",!0,{description:n.N("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:F(new C(15,"codeLensFontFamily","",{description:n.N("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:F(new y(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:n.N("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, 90% of `#editor.fontSize#` is used.")})),colorDecorators:F(new v(17,"colorDecorators",!0,{description:n.N("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:F(new v(18,"columnSelection",!1,{description:n.N("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:F(new class extends u{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:n.N("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:n.N("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertSpace:_(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:_(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}),contextmenu:F(new v(20,"contextmenu",!0)),copyWithSyntaxHighlighting:F(new v(21,"copyWithSyntaxHighlighting",!0,{description:n.N("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:F(new k(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],(function(e){switch(e){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}),{description:n.N("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:F(new v(23,"cursorSmoothCaretAnimation",!1,{description:n.N("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:F(new k(24,"cursorStyle",L.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],(function(e){switch(e){case"line":return L.Line;case"block":return L.Block;case"underline":return L.Underline;case"line-thin":return L.LineThin;case"block-outline":return L.BlockOutline;case"underline-thin":return L.UnderlineThin}}),{description:n.N("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:F(new y(25,"cursorSurroundingLines",0,0,1073741824,{description:n.N("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:F(new S(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[n.N("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),n.N("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:n.N("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:F(new y(27,"cursorWidth",0,0,1073741824,{markdownDescription:n.N("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:F(new v(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:F(new v(29,"disableMonospaceOptimizations",!1)),domReadOnly:F(new v(30,"domReadOnly",!1)),dragAndDrop:F(new v(31,"dragAndDrop",!0,{description:n.N("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:F(new class extends v{constructor(){super(32,"emptySelectionClipboard",!0,{description:n.N("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}),extraEditorClassName:F(new C(33,"extraEditorClassName","")),fastScrollSensitivity:F(new w(34,"fastScrollSensitivity",5,(e=>e<=0?5:e),{markdownDescription:n.N("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:F(new class extends u{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:n.N("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[n.N("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),n.N("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),n.N("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:n.N("find.seedSearchStringFromSelection","Controls whether the search string in the Find Widget is seeded from the editor selection.")},"editor.find.autoFindInSelection":{type:"string",enum:["never","always","multiline"],default:e.autoFindInSelection,enumDescriptions:[n.N("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),n.N("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),n.N("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:n.N("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:n.N("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:r.dz},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:n.N("find.addExtraSpaceOnTop","Controls whether the Find Widget should add extra lines on top of the editor. When true, you can scroll beyond the first line when the Find Widget is visible.")},"editor.find.loop":{type:"boolean",default:e.loop,description:n.N("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{cursorMoveOnType:_(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:"boolean"==typeof e.seedSearchStringFromSelection?e.seedSearchStringFromSelection?"always":"never":x(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:"boolean"==typeof e.autoFindInSelection?e.autoFindInSelection?"always":"never":x(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:_(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:_(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:_(t.loop,this.defaultValue.loop)}}}),fixedOverflowWidgets:F(new v(36,"fixedOverflowWidgets",!1)),folding:F(new v(37,"folding",!0,{description:n.N("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:F(new S(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[n.N("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),n.N("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:n.N("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:F(new v(39,"foldingHighlight",!0,{description:n.N("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:F(new v(40,"foldingImportsByDefault",!1,{description:n.N("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),foldingMaximumRegions:F(new y(41,"foldingMaximumRegions",5e3,10,65e3,{description:n.N("foldingMaximumRegions","The maximum number of foldable regions. Increasing this value may result in the editor becoming less responsive when the current source has a large number of foldable regions.")})),unfoldOnClickAfterEndOfLine:F(new v(42,"unfoldOnClickAfterEndOfLine",!1,{description:n.N("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:F(new C(43,"fontFamily",R.fontFamily,{description:n.N("fontFamily","Controls the font family.")})),fontInfo:F(new class extends p{constructor(){super(44)}compute(e,t,i){return e.fontInfo}}),fontLigatures2:F(new N),fontSize:F(new class extends m{constructor(){super(46,"fontSize",R.fontSize,{type:"number",minimum:6,maximum:100,default:R.fontSize,description:n.N("fontSize","Controls the font size in pixels.")})}validate(e){const t=w.float(e,this.defaultValue);return 0===t?R.fontSize:w.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}),fontWeight:F(new E),formatOnPaste:F(new v(48,"formatOnPaste",!1,{description:n.N("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.")})),formatOnType:F(new v(49,"formatOnType",!1,{description:n.N("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:F(new v(50,"glyphMargin",!0,{description:n.N("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:F(new class extends u{constructor(){const e={multiple:"peek",multipleDefinitions:"peek",multipleTypeDefinitions:"peek",multipleDeclarations:"peek",multipleImplementations:"peek",multipleReferences:"peek",alternativeDefinitionCommand:"editor.action.goToReferences",alternativeTypeDefinitionCommand:"editor.action.goToReferences",alternativeDeclarationCommand:"editor.action.goToReferences",alternativeImplementationCommand:"",alternativeReferenceCommand:""},t={type:"string",enum:["peek","gotoAndPeek","goto"],default:e.multiple,enumDescriptions:[n.N("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),n.N("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),n.N("editor.gotoLocation.multiple.goto","Go to the primary result and enable peek-less navigation to others")]},i=["","editor.action.referenceSearch.trigger","editor.action.goToReferences","editor.action.peekImplementation","editor.action.goToImplementation","editor.action.peekTypeDefinition","editor.action.goToTypeDefinition","editor.action.peekDeclaration","editor.action.revealDeclaration","editor.action.peekDefinition","editor.action.revealDefinitionAside","editor.action.revealDefinition"];super(51,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:n.N("editor.gotoLocation.multiple.deprecated","This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.")},"editor.gotoLocation.multipleDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:n.N("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:n.N("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:n.N("editor.editor.gotoLocation.multipleReferences","Controls the behavior the 'Go to References'-command when multiple target locations exist.")},t),"editor.gotoLocation.alternativeDefinitionCommand":{type:"string",default:e.alternativeDefinitionCommand,enum:i,description:n.N("alternativeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Definition' is the current location.")},"editor.gotoLocation.alternativeTypeDefinitionCommand":{type:"string",default:e.alternativeTypeDefinitionCommand,enum:i,description:n.N("alternativeTypeDefinitionCommand","Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.")},"editor.gotoLocation.alternativeDeclarationCommand":{type:"string",default:e.alternativeDeclarationCommand,enum:i,description:n.N("alternativeDeclarationCommand","Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.")},"editor.gotoLocation.alternativeImplementationCommand":{type:"string",default:e.alternativeImplementationCommand,enum:i,description:n.N("alternativeImplementationCommand","Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.")},"editor.gotoLocation.alternativeReferenceCommand":{type:"string",default:e.alternativeReferenceCommand,enum:i,description:n.N("alternativeReferenceCommand","Alternative command id that is being executed when the result of 'Go to Reference' is the current location.")}})}validate(e){var t,i,n,r,o;if(!e||"object"!=typeof e)return this.defaultValue;const s=e;return{multiple:x(s.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:null!==(t=s.multipleDefinitions)&&void 0!==t?t:x(s.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:null!==(i=s.multipleTypeDefinitions)&&void 0!==i?i:x(s.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:null!==(n=s.multipleDeclarations)&&void 0!==n?n:x(s.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:null!==(r=s.multipleImplementations)&&void 0!==r?r:x(s.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:null!==(o=s.multipleReferences)&&void 0!==o?o:x(s.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:C.string(s.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:C.string(s.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:C.string(s.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:C.string(s.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:C.string(s.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}),hideCursorInOverviewRuler:F(new v(52,"hideCursorInOverviewRuler",!1,{description:n.N("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:F(new class extends u{constructor(){const e={enabled:!0,delay:300,sticky:!0,above:!0};super(53,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:n.N("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,minimum:0,maximum:1e4,description:n.N("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:n.N("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")},"editor.hover.above":{type:"boolean",default:e.above,description:n.N("hover.above","Prefer showing hovers above the line, if there's space.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),delay:y.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:_(t.sticky,this.defaultValue.sticky),above:_(t.above,this.defaultValue.above)}}}),inDiffEditor:F(new v(54,"inDiffEditor",!1)),letterSpacing:F(new w(56,"letterSpacing",R.letterSpacing,(e=>w.clamp(e,-5,20)),{description:n.N("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:F(new class extends u{constructor(){const e={enabled:!0};super(57,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:n.N("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return e&&"object"==typeof e?{enabled:_(e.enabled,this.defaultValue.enabled)}:this.defaultValue}}),lineDecorationsWidth:F(new m(58,"lineDecorationsWidth",10)),lineHeight:F(new class extends w{constructor(){super(59,"lineHeight",R.lineHeight,(e=>w.clamp(e,0,150)),{markdownDescription:n.N("lineHeight","Controls the line height. \n - Use 0 to automatically compute the line height from the font size.\n - Values between 0 and 8 will be used as a multiplier with the font size.\n - Values greater than or equal to 8 will be used as effective values.")})}compute(e,t,i){return e.fontInfo.lineHeight}}),lineNumbers:F(new class extends u{constructor(){super(60,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[n.N("lineNumbers.off","Line numbers are not rendered."),n.N("lineNumbers.on","Line numbers are rendered as absolute number."),n.N("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),n.N("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:n.N("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return void 0!==e&&("function"==typeof e?(t=4,i=e):t="interval"===e?3:"relative"===e?2:"on"===e?1:0),{renderType:t,renderFn:i}}}),lineNumbersMinChars:F(new y(61,"lineNumbersMinChars",5,1,300)),linkedEditing:F(new v(62,"linkedEditing",!1,{description:n.N("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:F(new v(63,"links",!0,{description:n.N("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:F(new S(64,"matchBrackets","always",["always","near","never"],{description:n.N("matchBrackets","Highlight matching brackets.")})),minimap:F(new class extends u{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(65,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:n.N("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[n.N("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),n.N("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),n.N("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:n.N("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:n.N("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:n.N("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:n.N("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:n.N("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:n.N("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),size:x(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:x(t.side,this.defaultValue.side,["right","left"]),showSlider:x(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:_(t.renderCharacters,this.defaultValue.renderCharacters),scale:y.clampedInt(t.scale,1,1,3),maxColumn:y.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}),mouseStyle:F(new S(66,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:F(new w(67,"mouseWheelScrollSensitivity",1,(e=>0===e?1:e),{markdownDescription:n.N("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:F(new v(68,"mouseWheelZoom",!1,{markdownDescription:n.N("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:F(new v(69,"multiCursorMergeOverlapping",!0,{description:n.N("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:F(new k(70,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],(function(e){return"ctrlCmd"===e?r.dz?"metaKey":"ctrlKey":"altKey"}),{markdownEnumDescriptions:[n.N("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),n.N("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:n.N({key:"multiCursorModifier",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 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).")})),multiCursorPaste:F(new S(71,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[n.N("multiCursorPaste.spread","Each cursor pastes a single line of the text."),n.N("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:n.N("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:F(new v(72,"occurrencesHighlight",!0,{description:n.N("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:F(new v(73,"overviewRulerBorder",!0,{description:n.N("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:F(new y(74,"overviewRulerLanes",3,0,3)),padding:F(new class extends u{constructor(){super(75,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.top","Controls the amount of space between the top edge of the editor and the first line.")},"editor.padding.bottom":{type:"number",default:0,minimum:0,maximum:1e3,description:n.N("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{top:y.clampedInt(t.top,0,0,1e3),bottom:y.clampedInt(t.bottom,0,0,1e3)}}}),parameterHints:F(new class extends u{constructor(){const e={enabled:!0,cycle:!1};super(76,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:n.N("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:n.N("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),cycle:_(t.cycle,this.defaultValue.cycle)}}}),peekWidgetDefaultFocus:F(new S(77,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[n.N("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),n.N("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:n.N("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:F(new v(78,"definitionLinkOpensInPeek",!1,{description:n.N("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:F(new class extends u{constructor(){const e={other:!0,comments:!1,strings:!1};super(79,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:n.N("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:n.N("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:n.N("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:n.N("quickSuggestions","Controls whether suggestions should automatically show up while typing.")}),this.defaultValue=e}validate(e){if("boolean"==typeof e)return e;if(e&&"object"==typeof e){const t=e,i={other:_(t.other,this.defaultValue.other),comments:_(t.comments,this.defaultValue.comments),strings:_(t.strings,this.defaultValue.strings)};return!!(i.other&&i.comments&&i.strings)||!!(i.other||i.comments||i.strings)&&i}return this.defaultValue}}),quickSuggestionsDelay:F(new y(80,"quickSuggestionsDelay",10,0,1073741824,{description:n.N("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:F(new v(81,"readOnly",!1)),renameOnType:F(new v(82,"renameOnType",!1,{description:n.N("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:n.N("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:F(new v(83,"renderControlCharacters",!0,{description:n.N("renderControlCharacters","Controls whether the editor should render control characters."),restricted:!0})),renderFinalNewline:F(new v(84,"renderFinalNewline",!0,{description:n.N("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:F(new S(85,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",n.N("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:n.N("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:F(new v(86,"renderLineHighlightOnlyWhenFocus",!1,{description:n.N("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:F(new S(87,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:F(new S(88,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",n.N("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),n.N("renderWhitespace.selection","Render whitespace characters only on selected text."),n.N("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:n.N("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:F(new y(89,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:F(new v(90,"roundedSelection",!0,{description:n.N("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:F(new class extends u{constructor(){const e=[],t={type:"number",description:n.N("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(91,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:n.N("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:n.N("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.")})}validate(e){if(Array.isArray(e)){const t=[];for(let i of e)if("number"==typeof i)t.push({column:y.clampedInt(i,0,0,1e4),color:null});else if(i&&"object"==typeof i){const e=i;t.push({column:y.clampedInt(e.column,0,0,1e4),color:e.color})}return t.sort(((e,t)=>e.column-t.column)),t}return this.defaultValue}}),scrollbar:F(new class extends u{constructor(){const e={vertical:1,horizontal:1,arrowSize:11,useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,horizontalScrollbarSize:12,horizontalSliderSize:12,verticalScrollbarSize:14,verticalSliderSize:14,handleMouseWheel:!0,alwaysConsumeMouseWheel:!0,scrollByPage:!1};super(92,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[n.N("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),n.N("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),n.N("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:n.N("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[n.N("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),n.N("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),n.N("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:n.N("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:n.N("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:n.N("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:n.N("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e,i=y.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=y.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:y.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:T(t.vertical,this.defaultValue.vertical),horizontal:T(t.horizontal,this.defaultValue.horizontal),useShadows:_(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:_(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:_(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:_(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:_(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:y.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:y.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:_(t.scrollByPage,this.defaultValue.scrollByPage)}}}),scrollBeyondLastColumn:F(new y(93,"scrollBeyondLastColumn",5,0,1073741824,{description:n.N("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:F(new v(94,"scrollBeyondLastLine",!0,{description:n.N("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:F(new v(95,"scrollPredominantAxis",!0,{description:n.N("scrollPredominantAxis","Scroll only along the predominant axis when scrolling both vertically and horizontally at the same time. Prevents horizontal drift when scrolling vertically on a trackpad.")})),selectionClipboard:F(new v(96,"selectionClipboard",!0,{description:n.N("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:r.IJ})),selectionHighlight:F(new v(97,"selectionHighlight",!0,{description:n.N("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:F(new v(98,"selectOnLineNumbers",!0)),showFoldingControls:F(new S(99,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[n.N("showFoldingControls.always","Always show the folding controls."),n.N("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:n.N("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:F(new v(100,"showUnused",!0,{description:n.N("showUnused","Controls fading out of unused code.")})),showDeprecated:F(new v(126,"showDeprecated",!0,{description:n.N("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:F(new class extends u{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(127,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:n.N("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:n.N("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:n.N("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),fontSize:y.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:C.string(t.fontFamily,this.defaultValue.fontFamily)}}}),snippetSuggestions:F(new S(101,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[n.N("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),n.N("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),n.N("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),n.N("snippetSuggestions.none","Do not show snippet suggestions.")],description:n.N("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:F(new class extends u{constructor(){super(102,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:n.N("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return e&&"object"==typeof e?{selectLeadingAndTrailingWhitespace:_(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}:this.defaultValue}}),smoothScrolling:F(new v(103,"smoothScrolling",!1,{description:n.N("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:F(new y(105,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:F(new class extends u{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!0,showFields:!0,showVariables:!0,showClasses:!0,showStructs:!0,showInterfaces:!0,showModules:!0,showProperties:!0,showEvents:!0,showOperators:!0,showUnits:!0,showValues:!0,showConstants:!0,showEnums:!0,showEnumMembers:!0,showKeywords:!0,showWords:!0,showColors:!0,showFiles:!0,showReferences:!0,showFolders:!0,showTypeParameters:!0,showSnippets:!0,showUsers:!0,showIssues:!0};super(106,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[n.N("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),n.N("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:n.N("suggest.insertMode","Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.")},"editor.suggest.filterGraceful":{type:"boolean",default:e.filterGraceful,description:n.N("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:n.N("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:n.N("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:n.N("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:n.N("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:n.N("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:n.N("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:n.N("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:n.N("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:n.N("deprecated","This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.")},"editor.suggest.showMethods":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:n.N("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{insertMode:x(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:_(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:_(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:_(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:_(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:_(t.showIcons,this.defaultValue.showIcons),showStatusBar:_(t.showStatusBar,this.defaultValue.showStatusBar),preview:_(t.preview,this.defaultValue.preview),previewMode:x(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:_(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:_(t.showMethods,this.defaultValue.showMethods),showFunctions:_(t.showFunctions,this.defaultValue.showFunctions),showConstructors:_(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:_(t.showDeprecated,this.defaultValue.showDeprecated),showFields:_(t.showFields,this.defaultValue.showFields),showVariables:_(t.showVariables,this.defaultValue.showVariables),showClasses:_(t.showClasses,this.defaultValue.showClasses),showStructs:_(t.showStructs,this.defaultValue.showStructs),showInterfaces:_(t.showInterfaces,this.defaultValue.showInterfaces),showModules:_(t.showModules,this.defaultValue.showModules),showProperties:_(t.showProperties,this.defaultValue.showProperties),showEvents:_(t.showEvents,this.defaultValue.showEvents),showOperators:_(t.showOperators,this.defaultValue.showOperators),showUnits:_(t.showUnits,this.defaultValue.showUnits),showValues:_(t.showValues,this.defaultValue.showValues),showConstants:_(t.showConstants,this.defaultValue.showConstants),showEnums:_(t.showEnums,this.defaultValue.showEnums),showEnumMembers:_(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:_(t.showKeywords,this.defaultValue.showKeywords),showWords:_(t.showWords,this.defaultValue.showWords),showColors:_(t.showColors,this.defaultValue.showColors),showFiles:_(t.showFiles,this.defaultValue.showFiles),showReferences:_(t.showReferences,this.defaultValue.showReferences),showFolders:_(t.showFolders,this.defaultValue.showFolders),showTypeParameters:_(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:_(t.showSnippets,this.defaultValue.showSnippets),showUsers:_(t.showUsers,this.defaultValue.showUsers),showIssues:_(t.showIssues,this.defaultValue.showIssues)}}}),inlineSuggest:F(new class extends u{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(55,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:n.N("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{enabled:_(t.enabled,this.defaultValue.enabled),mode:x(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}),suggestFontSize:F(new y(107,"suggestFontSize",0,0,1e3,{markdownDescription:n.N("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:F(new y(108,"suggestLineHeight",0,0,1e3,{markdownDescription:n.N("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:F(new v(109,"suggestOnTriggerCharacters",!0,{description:n.N("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:F(new S(110,"suggestSelection","first",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[n.N("suggestSelection.first","Always select the first suggestion."),n.N("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),n.N("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:n.N("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:F(new S(111,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[n.N("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),n.N("tabCompletion.off","Disable tab completions."),n.N("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:n.N("tabCompletion","Enables tab completions.")})),tabIndex:F(new y(112,"tabIndex",0,-1,1073741824)),unicodeHighlight:F(new class extends u{constructor(){const e={nonBasicASCII:I,invisibleCharacters:!0,ambiguousCharacters:!0,includeComments:I,includeStrings:!0,allowedCharacters:{},allowedLocales:{_os:!0,_vscode:!0}};super(113,"unicodeHighlight",e,{[M.nonBasicASCII]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,I],default:e.nonBasicASCII,description:n.N("unicodeHighlight.nonBasicASCII","Controls whether all non-basic ASCII characters are highlighted. Only characters between U+0020 and U+007E, tab, line-feed and carriage-return are considered basic ASCII.")},[M.invisibleCharacters]:{restricted:!0,type:"boolean",default:e.invisibleCharacters,description:n.N("unicodeHighlight.invisibleCharacters","Controls whether characters that just reserve space or have no width at all are highlighted.")},[M.ambiguousCharacters]:{restricted:!0,type:"boolean",default:e.ambiguousCharacters,description:n.N("unicodeHighlight.ambiguousCharacters","Controls whether characters are highlighted that can be confused with basic ASCII characters, except those that are common in the current user locale.")},[M.includeComments]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,I],default:e.includeComments,description:n.N("unicodeHighlight.includeComments","Controls whether characters in comments should also be subject to unicode highlighting.")},[M.includeStrings]:{restricted:!0,type:["boolean","string"],enum:[!0,!1,I],default:e.includeStrings,description:n.N("unicodeHighlight.includeStrings","Controls whether characters in strings should also be subject to unicode highlighting.")},[M.allowedCharacters]:{restricted:!0,type:"object",default:e.allowedCharacters,description:n.N("unicodeHighlight.allowedCharacters","Defines allowed characters that are not being highlighted."),additionalProperties:{type:"boolean"}},[M.allowedLocales]:{restricted:!0,type:"object",additionalProperties:{type:"boolean"},default:e.allowedLocales,description:n.N("unicodeHighlight.allowedLocales","Unicode characters that are common in allowed locales are not being highlighted.")}})}applyUpdate(e,t){let i=!1;t.allowedCharacters&&(a.fS(e.allowedCharacters,t.allowedCharacters)||(e=Object.assign(Object.assign({},e),{allowedCharacters:t.allowedCharacters}),i=!0)),t.allowedLocales&&(a.fS(e.allowedLocales,t.allowedLocales)||(e=Object.assign(Object.assign({},e),{allowedLocales:t.allowedLocales}),i=!0));const n=super.applyUpdate(e,t);return i?new g(n.newValue,!0):n}validate(e){if(!e||"object"!=typeof e)return this.defaultValue;const t=e;return{nonBasicASCII:O(t.nonBasicASCII,I,[!0,!1,I]),invisibleCharacters:_(t.invisibleCharacters,this.defaultValue.invisibleCharacters),ambiguousCharacters:_(t.ambiguousCharacters,this.defaultValue.ambiguousCharacters),includeComments:O(t.includeComments,I,[!0,!1,I]),includeStrings:O(t.includeStrings,I,[!0,!1,I]),allowedCharacters:this.validateBooleanMap(e.allowedCharacters,this.defaultValue.allowedCharacters),allowedLocales:this.validateBooleanMap(e.allowedLocales,this.defaultValue.allowedLocales)}}validateBooleanMap(e,t){if("object"!=typeof e||!e)return t;const i={};for(const[t,n]of Object.entries(e))!0===n&&(i[t]=!0);return i}}),unusualLineTerminators:F(new S(114,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[n.N("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),n.N("unusualLineTerminators.off","Unusual line terminators are ignored."),n.N("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:n.N("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:F(new v(115,"useShadowDOM",!0)),useTabStops:F(new v(116,"useTabStops",!0,{description:n.N("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:F(new C(117,"wordSeparators",o.vu,{description:n.N("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:F(new S(118,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[n.N("wordWrap.off","Lines will never wrap."),n.N("wordWrap.on","Lines will wrap at the viewport width."),n.N({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),n.N({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:n.N({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:F(new C(119,"wordWrapBreakAfterCharacters"," \t})]?|/&.,;¢°′″‰℃、。。、¢,.:;?!%・・ゝゞヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻ァィゥェォャュョッー”〉》」』】〕)]}」")),wordWrapBreakBeforeCharacters:F(new C(120,"wordWrapBreakBeforeCharacters","([{‘“〈《「『【〔([{「£¥$£¥++")),wordWrapColumn:F(new y(121,"wordWrapColumn",80,1,1073741824,{markdownDescription:n.N({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:F(new S(122,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:F(new S(123,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:F(new k(124,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],(function(e){switch(e){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}),{enumDescriptions:[n.N("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),n.N("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),n.N("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),n.N("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:n.N("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:F(new S(125,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[n.N("wrappingStrategy.simple","Assumes that all characters are of the same width. This is a fast algorithm that works correctly for monospace fonts and certain scripts (like Latin characters) where glyphs are of equal width."),n.N("wrappingStrategy.advanced","Delegates wrapping points computation to the browser. This is a slow algorithm, that might cause freezes for large files, but it works correctly in all cases.")],description:n.N("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:F(new class extends p{constructor(){super(128)}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),"default"===t.get(66)?n.push("mouse-default"):"copy"===t.get(66)&&n.push("mouse-copy"),t.get(100)&&n.push("showUnused"),t.get(126)&&n.push("showDeprecated"),n.join(" ")}}),pixelRatio:F(new class extends p{constructor(){super(129)}compute(e,t,i){return e.pixelRatio}}),tabFocusMode:F(new class extends p{constructor(){super(130)}compute(e,t,i){return!!t.get(81)||e.tabFocusMode}}),layoutInfo:F(new D),wrappingInfo:F(new class extends p{constructor(){super(132)}compute(e,t,i){const n=t.get(131);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}})}},2334:(e,t,i)=>{"use strict";i.d(t,{C:()=>r});var n=i(4669);const r=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new n.Q5,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(e){e=Math.min(Math.max(-5,e),20),this._zoomLevel!==e&&(this._zoomLevel=e,this._onDidChangeZoomLevel.fire(this._zoomLevel))}}},7374:(e,t,i)=>{"use strict";i.d(t,{E4:()=>s,pR:()=>a});var n=i(1432),r=i(2334);const o=n.dz?1.5:1.35;class s{constructor(e){this._bareFontInfoBrand=void 0,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=0|e.lineHeight,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i){const n=e.get(43),r=e.get(47),o=e.get(46),a=e.get(45),l=e.get(59),c=e.get(56);return s._create(n,r,o,a,l,c,t,i)}static _create(e,t,i,n,a,l,c,h){0===a?a=o*i:a<8&&(a*=i),(a=Math.round(a))<8&&(a=8);const d=1+(h?0:.1*r.C.getZoomLevel());return new s({pixelRatio:c,fontFamily:e,fontWeight:t,fontSize:i*=d,fontFeatureSettings:n,lineHeight:a*=d,letterSpacing:l})}getId(){return`${this.pixelRatio}-${this.fontFamily}-${this.fontWeight}-${this.fontSize}-${this.fontFeatureSettings}-${this.lineHeight}-${this.letterSpacing}`}getMassagedFontFamily(e){const t=s._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}class a extends s{constructor(e,t){super(e),this._editorStylingBrand=void 0,this.version=1,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}},4906:(e,t,i)=>{"use strict";i.d(t,{N:()=>r,q:()=>o});var n=i(5427);class r{constructor(e){const t=(0,n.K)(e);this._defaultValue=t,this._asciiMap=r._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){const t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){const i=(0,n.K)(t);e>=0&&e<256?this._asciiMap[e]=i:this._map.set(e,i)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}}class o{constructor(){this._actual=new r(0)}add(e){this._actual.set(e,1)}has(e){return 1===this._actual.get(e)}}},7988:(e,t,i)=>{"use strict";i.d(t,{i:()=>r});var n=i(5924);class r{static _nextVisibleColumn(e,t,i){return 9===e?r.nextRenderTabStop(t,i):n.K7(e)||n.C8(e)?t+2:t+1}static visibleColumnFromColumn(e,t,i){const r=Math.min(t-1,e.length),o=e.substring(0,r),s=new n.W1(o);let a=0;for(;!s.eol();){const e=n.ZH(o,r,s.offset);s.nextGraphemeLength(),a=this._nextVisibleColumn(e,a,i)}return a}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const r=e.length,o=new n.W1(e);let s=0,a=1;for(;!o.eol();){const l=n.ZH(e,r,o.offset);o.nextGraphemeLength();const c=this._nextVisibleColumn(l,s,i),h=o.offset+1;if(c>=t)return c-t{"use strict";i.d(t,{h:()=>r});var n=i(4314);class r{static insert(e,t){return{range:new n.e(e.lineNumber,e.column,e.lineNumber,e.column),text:t,forceMoveMarkers:!0}}static delete(e){return{range:e,text:null}}static replace(e,t){return{range:e,text:t}}static replaceMove(e,t){return{range:e,text:t,forceMoveMarkers:!0}}}},8625:(e,t,i)=>{"use strict";i.d(t,{CE:()=>W,DD:()=>y,DS:()=>K,Dl:()=>x,HV:()=>ee,IO:()=>T,Jn:()=>G,Kh:()=>a,L7:()=>J,Mm:()=>l,N5:()=>A,Qb:()=>Z,Re:()=>R,TC:()=>C,To:()=>X,UP:()=>V,Vs:()=>B,YF:()=>Y,Ym:()=>_,eS:()=>P,e_:()=>k,f9:()=>te,fY:()=>f,hw:()=>v,kp:()=>N,lK:()=>O,lS:()=>q,m$:()=>$,m1:()=>H,m3:()=>Q,m9:()=>M,n0:()=>g,oV:()=>U,r0:()=>z,tR:()=>m,ts:()=>j,x3:()=>D,zJ:()=>F,zk:()=>w,zu:()=>E,zw:()=>S});var n=i(3580),r=i(1264),o=i(3910),s=i(7781);const a=(0,o.P6G)("editor.lineHighlightBackground",{dark:null,light:null,hc:null},n.N("lineHighlight","Background color for the highlight of line at the cursor position.")),l=(0,o.P6G)("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},n.N("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),c=(0,o.P6G)("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},n.N("rangeHighlight","Background color of highlighted ranges, like by quick open and find features. The color must not be opaque so as not to hide underlying decorations."),!0),h=(0,o.P6G)("editor.rangeHighlightBorder",{dark:null,light:null,hc:o.xL1},n.N("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),d=(0,o.P6G)("editor.symbolHighlightBackground",{dark:o.MUv,light:o.MUv,hc:null},n.N("symbolHighlight","Background color of highlighted symbol, like for go to definition or go next/previous symbol. The color must not be opaque so as not to hide underlying decorations."),!0),u=(0,o.P6G)("editor.symbolHighlightBorder",{dark:null,light:null,hc:o.xL1},n.N("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),g=(0,o.P6G)("editorCursor.foreground",{dark:"#AEAFAD",light:r.Il.black,hc:r.Il.white},n.N("caret","Color of the editor cursor.")),f=(0,o.P6G)("editorCursor.background",null,n.N("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),p=(0,o.P6G)("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},n.N("editorWhitespaces","Color of whitespace characters in the editor.")),m=(0,o.P6G)("editorIndentGuide.background",{dark:p,light:p,hc:p},n.N("editorIndentGuides","Color of the editor indentation guides.")),_=(0,o.P6G)("editorIndentGuide.activeBackground",{dark:p,light:p,hc:p},n.N("editorActiveIndentGuide","Color of the active editor indentation guides.")),v=(0,o.P6G)("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:r.Il.white},n.N("editorLineNumbers","Color of editor line numbers.")),b=(0,o.P6G)("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:o.xL1},n.N("editorActiveLineNumber","Color of editor active line number"),!1,n.N("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),y=(0,o.P6G)("editorLineNumber.activeForeground",{dark:b,light:b,hc:b},n.N("editorActiveLineNumber","Color of editor active line number")),w=(0,o.P6G)("editorRuler.foreground",{dark:"#5A5A5A",light:r.Il.lightgrey,hc:r.Il.white},n.N("editorRuler","Color of the editor rulers.")),C=((0,o.P6G)("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},n.N("editorCodeLensForeground","Foreground color of editor CodeLens")),(0,o.P6G)("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},n.N("editorBracketMatchBackground","Background color behind matching brackets"))),x=(0,o.P6G)("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:o.lRK},n.N("editorBracketMatchBorder","Color for matching brackets boxes")),S=(0,o.P6G)("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},n.N("editorOverviewRulerBorder","Color of the overview ruler border.")),k=(0,o.P6G)("editorOverviewRuler.background",null,n.N("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),L=(0,o.P6G)("editorGutter.background",{dark:o.cvW,light:o.cvW,hc:o.cvW},n.N("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),N=(0,o.P6G)("editorUnnecessaryCode.border",{dark:null,light:null,hc:r.Il.fromHex("#fff").transparent(.8)},n.N("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),E=(0,o.P6G)("editorUnnecessaryCode.opacity",{dark:r.Il.fromHex("#000a"),light:r.Il.fromHex("#0007"),hc:null},n.N("unnecessaryCodeOpacity","Opacity of unnecessary (unused) source code in the editor. For example, \"#000000c0\" will render the code with 75% opacity. For high contrast themes, use the 'editorUnnecessaryCode.border' theme color to underline unnecessary code instead of fading it out.")),D=(0,o.P6G)("editorGhostText.border",{dark:null,light:null,hc:r.Il.fromHex("#fff").transparent(.8)},n.N("editorGhostTextBorder","Border color of ghost text in the editor.")),A=(0,o.P6G)("editorGhostText.foreground",{dark:r.Il.fromHex("#ffffff56"),light:r.Il.fromHex("#0007"),hc:null},n.N("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),T=(0,o.P6G)("editorGhostText.background",{dark:null,light:null,hc:null},n.N("editorGhostTextBackground","Background color of the ghost text in the editor.")),I=new r.Il(new r.VS(0,122,204,.6)),M=(0,o.P6G)("editorOverviewRuler.rangeHighlightForeground",{dark:I,light:I,hc:I},n.N("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),O=(0,o.P6G)("editorOverviewRuler.errorForeground",{dark:new r.Il(new r.VS(255,18,18,.7)),light:new r.Il(new r.VS(255,18,18,.7)),hc:new r.Il(new r.VS(255,50,50,1))},n.N("overviewRuleError","Overview ruler marker color for errors.")),R=(0,o.P6G)("editorOverviewRuler.warningForeground",{dark:o.uoC,light:o.uoC,hc:o.pW3},n.N("overviewRuleWarning","Overview ruler marker color for warnings.")),P=(0,o.P6G)("editorOverviewRuler.infoForeground",{dark:o.c63,light:o.c63,hc:o.T83},n.N("overviewRuleInfo","Overview ruler marker color for infos.")),F=(0,o.P6G)("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},n.N("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),B=(0,o.P6G)("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},n.N("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),W=(0,o.P6G)("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},n.N("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),V=(0,o.P6G)("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),z=(0,o.P6G)("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),H=(0,o.P6G)("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),j=(0,o.P6G)("editorBracketHighlight.unexpectedBracket.foreground",{dark:new r.Il(new r.VS(255,18,18,.8)),light:new r.Il(new r.VS(255,18,18,.8)),hc:new r.Il(new r.VS(255,50,50,1))},n.N("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets.")),U=(0,o.P6G)("editorBracketPairGuide.background1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background1","Background color of inactive bracket pair guides (1). Requires enabling bracket pair guides.")),$=(0,o.P6G)("editorBracketPairGuide.background2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background2","Background color of inactive bracket pair guides (2). Requires enabling bracket pair guides.")),K=(0,o.P6G)("editorBracketPairGuide.background3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background3","Background color of inactive bracket pair guides (3). Requires enabling bracket pair guides.")),q=(0,o.P6G)("editorBracketPairGuide.background4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background4","Background color of inactive bracket pair guides (4). Requires enabling bracket pair guides.")),G=(0,o.P6G)("editorBracketPairGuide.background5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background5","Background color of inactive bracket pair guides (5). Requires enabling bracket pair guides.")),Y=(0,o.P6G)("editorBracketPairGuide.background6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.background6","Background color of inactive bracket pair guides (6). Requires enabling bracket pair guides.")),Z=(0,o.P6G)("editorBracketPairGuide.activeBackground1",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground1","Background color of active bracket pair guides (1). Requires enabling bracket pair guides.")),Q=(0,o.P6G)("editorBracketPairGuide.activeBackground2",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground2","Background color of active bracket pair guides (2). Requires enabling bracket pair guides.")),X=(0,o.P6G)("editorBracketPairGuide.activeBackground3",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground3","Background color of active bracket pair guides (3). Requires enabling bracket pair guides.")),J=(0,o.P6G)("editorBracketPairGuide.activeBackground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground4","Background color of active bracket pair guides (4). Requires enabling bracket pair guides.")),ee=(0,o.P6G)("editorBracketPairGuide.activeBackground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground5","Background color of active bracket pair guides (5). Requires enabling bracket pair guides.")),te=(0,o.P6G)("editorBracketPairGuide.activeBackground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},n.N("editorBracketPairGuide.activeBackground6","Background color of active bracket pair guides (6). Requires enabling bracket pair guides."));(0,o.P6G)("editorUnicodeHighlight.border",{dark:"#BD9B03",light:"#CEA33D",hc:"#ff0000"},n.N("editorUnicodeHighlight.border","Border color used to highlight unicode characters.")),(0,s.Ic)(((e,t)=>{const i=e.getColor(o.cvW);i&&t.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${i}; }`);const n=e.getColor(o.NOs);n&&t.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${n}; }`);const r=e.getColor(L);r&&t.addRule(`.monaco-editor .margin { background-color: ${r}; }`);const s=e.getColor(c);s&&t.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const a=e.getColor(h);a&&t.addRule(`.monaco-editor .rangeHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${a}; }`);const l=e.getColor(d);l&&t.addRule(`.monaco-editor .symbolHighlight { background-color: ${l}; }`);const g=e.getColor(u);g&&t.addRule(`.monaco-editor .symbolHighlight { border: 1px ${"hc"===e.type?"dotted":"solid"} ${g}; }`);const f=e.getColor(p);f&&(t.addRule(`.monaco-editor .mtkw { color: ${f} !important; }`),t.addRule(`.monaco-editor .mtkz { color: ${f} !important; }`))}))},3795:(e,t,i)=>{"use strict";function n(e){let t=0,i=0,n=0,r=0;for(let o=0,s=e.length;on})},3158:(e,t,i)=>{"use strict";i.d(t,{x:()=>r});var n=i(5924);function r(e,t,i){let r=n.LC(e);return-1===r&&(r=e.length),function(e,t,i){let n=0;for(let i=0;i{"use strict";i.d(t,{L:()=>n});class n{constructor(e,t){this.lineNumber=e,this.column=t}with(e=this.lineNumber,t=this.column){return e===this.lineNumber&&t===this.column?this:new n(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return n.equals(this,e)}static equals(e,t){return!e&&!t||!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return n.isBefore(this,e)}static isBefore(e,t){return e.lineNumber{"use strict";i.d(t,{e:()=>r});var n=i(187);class r{constructor(e,t,i,n){e>i||e===i&&t>n?(this.startLineNumber=i,this.startColumn=n,this.endLineNumber=e,this.endColumn=t):(this.startLineNumber=e,this.startColumn=t,this.endLineNumber=i,this.endColumn=n)}isEmpty(){return r.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return r.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.columne.endColumn)}static strictContainsPosition(e,t){return!(t.lineNumbere.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<=e.startColumn||t.lineNumber===e.endLineNumber&&t.column>=e.endColumn)}containsRange(e){return r.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumne.endColumn)}strictContainsRange(e){return r.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumbere.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return r.plusRange(this,e)}static plusRange(e,t){let i,n,o,s;return t.startLineNumbere.endLineNumber?(o=t.endLineNumber,s=t.endColumn):t.endLineNumber===e.endLineNumber?(o=t.endLineNumber,s=Math.max(t.endColumn,e.endColumn)):(o=e.endLineNumber,s=e.endColumn),new r(i,n,o,s)}intersectRanges(e){return r.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,o=e.endLineNumber,s=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,h=t.endColumn;return ic?(o=c,s=h):o===c&&(s=Math.min(s,h)),i>o||i===o&&n>s?null:new r(i,n,o,s)}equalsRange(e){return r.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return r.getEndPosition(this)}static getEndPosition(e){return new n.L(e.endLineNumber,e.endColumn)}getStartPosition(){return r.getStartPosition(this)}static getStartPosition(e){return new n.L(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new r(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new r(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return r.collapseToStart(this)}static collapseToStart(e){return new r(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new r(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new r(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&"number"==typeof e.startLineNumber&&"number"==typeof e.startColumn&&"number"==typeof e.endLineNumber&&"number"==typeof e.endColumn}static areIntersectingOrTouching(e,t){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}}},3860:(e,t,i)=>{"use strict";i.d(t,{Y:()=>o});var n=i(187),r=i(4314);class o extends r.e{constructor(e,t,i,n){super(e,t,i,n),this.selectionStartLineNumber=e,this.selectionStartColumn=t,this.positionLineNumber=i,this.positionColumn=n}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return o.selectionsEqual(this,e)}static selectionsEqual(e,t){return e.selectionStartLineNumber===t.selectionStartLineNumber&&e.selectionStartColumn===t.selectionStartColumn&&e.positionLineNumber===t.positionLineNumber&&e.positionColumn===t.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,t){return 0===this.getDirection()?new o(this.startLineNumber,this.startColumn,e,t):new o(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new n.L(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new n.L(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,t){return 0===this.getDirection()?new o(e,t,this.endLineNumber,this.endColumn):new o(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new o(e.lineNumber,e.column,t.lineNumber,t.column)}static fromRange(e,t){return 0===t?new o(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new o(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new o(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,t){if(e&&!t||!e&&t)return!1;if(!e&&!t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i{"use strict";i.d(t,{kH:()=>g,l$:()=>u,lZ:()=>d,oe:()=>h});var n=i(5924),r=i(1432),o=i(3060);let s,a,l;function c(){return s||(s=new TextDecoder("UTF-16LE")),s}function h(){return l||(l=r.r()?c():(a||(a=new TextDecoder("UTF-16BE")),a)),l}const d="undefined"!=typeof TextDecoder;let u,g;function f(e,t,i){const n=[];let r=0;for(let s=0;snew p(e),g=function(e,t,i){const n=new Uint16Array(e.buffer,t,i);return i>0&&(65279===n[0]||65534===n[0])?f(e,t,i):c().decode(n)}):(u=e=>new m,g=f);class p{constructor(e){this._capacity=0|e,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return null!==this._completedStrings?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(0===this._bufferLength)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return h().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,null===this._completedStrings?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(0===t||n.ZG(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity)return this._flushBuffer(),void(this._completedStrings[this._completedStrings.length]=e);for(let i=0;i{"use strict";i.d(t,{b:()=>a,q:()=>s});var n=i(3060),r=i(72);function o(e){return e.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class s{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}get oldLength(){return this.oldText.length}get oldEnd(){return this.oldPosition+this.oldText.length}get newLength(){return this.newText.length}get newEnd(){return this.newPosition+this.newText.length}toString(){return 0===this.oldText.length?`(insert@${this.oldPosition} "${o(this.newText)}")`:0===this.newText.length?`(delete@${this.oldPosition} "${o(this.oldText)}")`:`(replace@${this.oldPosition} "${o(this.oldText)}" with "${o(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const r=t.length;n.T4(e,r,i),i+=4;for(let o=0;o{"use strict";i.d(t,{D:()=>n});const n={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}}},4929:(e,t,i)=>{"use strict";i.d(t,{u:()=>o});var n=i(4906);class r extends n.N{constructor(e){super(0);for(let t=0,i=e.length;t(t.hasOwnProperty(e)||(t[e]=(e=>new r(e))(e)),t[e])}()},270:(e,t,i)=>{"use strict";i.d(t,{Af:()=>r,eq:()=>o,t2:()=>a,vu:()=>n});const n="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",r=function(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const i of n)e.indexOf(i)>=0||(t+="\\"+i);return t+="\\s]+)",new RegExp(t,"g")}();function o(e){let t=r;if(e&&e instanceof RegExp)if(e.global)t=e;else{let i="g";e.ignoreCase&&(i+="i"),e.multiline&&(i+="m"),e.unicode&&(i+="u"),t=new RegExp(e.source,i)}return t.lastIndex=0,t}const s={maxLen:1e3,windowSize:15,timeBudget:150};function a(e,t,i,n,r=s){if(i.length>r.maxLen){let o=e-r.maxLen/2;return o<0?o=0:n+=o,a(e,t,i=i.substring(o,e+r.maxLen/2),n,r)}const o=Date.now(),c=e-1-n;let h=-1,d=null;for(let e=1;!(Date.now()-o>=r.timeBudget);e++){const n=c-r.windowSize*e;t.lastIndex=Math.max(0,n);const o=l(t,i,c,h);if(!o&&d)break;if(d=o,n<=0)break;h=n}if(d){const e={word:d[0],startColumn:n+1+d.index,endColumn:n+1+d.index+d[0].length};return t.lastIndex=0,e}return null}function l(e,t,i,n){let r;for(;r=e.exec(t);){const t=r.index||0;if(t<=i&&e.lastIndex>=i)return r;if(n>0&&t>n)return null}return null}},7128:(e,t,i)=>{"use strict";i.d(t,{l:()=>r});var n=i(7988);class r{static whitespaceVisibleColumn(e,t,i){const r=e.length;let o=0,s=-1,a=-1;for(let l=0;l{"use strict";i.d(t,{A:()=>h});var n=i(5924),r=i(1329),o=i(5343),s=i(7988),a=i(839),l=i(4314),c=i(187);class h{static deleteRight(e,t,i,n){const o=[];let s=3!==e;for(let e=0,c=n.length;e=d.length+1)return!1;const u=d.charAt(h.column-2),g=n.get(u);if(!g)return!1;if((0,o.LN)(u)){if("never"===i)return!1}else if("never"===t)return!1;const f=d.charAt(h.column-1);let p=!1;for(const e of g)e.open===u&&e.close===f&&(p=!0);if(!p)return!1;if("auto"===e){let e=!1;for(let t=0,i=a.length;t1){const e=t.getLineContent(r.lineNumber),o=n.LC(e),a=-1===o?e.length+1:o+1;if(r.column<=a){const e=i.visibleColumnFromColumn(t,r),n=s.i.prevIndentTabStop(e,i.indentSize),o=i.columnFromVisibleColumn(t,r.lineNumber,n);return new l.e(r.lineNumber,o,r.lineNumber,r.column)}}return l.e.fromPositions(h.getPositionAfterDeleteLeft(r,t),r)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=n.oH(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}if(e.lineNumber>1){const i=e.lineNumber-1;return new c.L(i,t.getLineMaxColumn(i))}return e}static cut(e,t,i){const n=[];let s=null;i.sort(((e,t)=>c.L.compare(e.getStartPosition(),t.getEndPosition())));for(let o=0,a=i.length;o1&&(null==s?void 0:s.endLineNumber)!==e.lineNumber?(i=e.lineNumber-1,c=t.getLineMaxColumn(e.lineNumber-1),h=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber)):(i=e.lineNumber,c=1,h=e.lineNumber,d=t.getLineMaxColumn(e.lineNumber));const u=new l.e(i,c,h,d);s=u,u.isEmpty()?n[o]=null:n[o]=new r.T4(u,"")}else n[o]=null;else n[o]=new r.T4(a,"")}return new o.Tp(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}},8108:(e,t,i)=>{"use strict";i.d(t,{N:()=>n,P:()=>h});var n,r=i(8401),o=i(5343),s=i(839),a=i(2896),l=i(187),c=i(4314);class h{static addCursorDown(e,t,i){const n=[];let r=0;for(let a=0,l=t.length;at&&(i=t,n=e.model.getLineMaxColumn(i)),o.Vi.fromModelState(new o.rS(new c.e(s.lineNumber,1,i,n),0,new l.L(i,n),0))}const h=t.modelState.selectionStart.getStartPosition().lineNumber;if(s.lineNumberh){const i=e.getLineCount();let n=a.lineNumber+1,r=1;return n>i&&(n=i,r=e.getLineMaxColumn(n)),o.Vi.fromViewState(t.viewState.move(t.modelState.hasSelection(),n,r,0))}{const e=t.modelState.selectionStart.getEndPosition();return o.Vi.fromModelState(t.modelState.move(t.modelState.hasSelection(),e.lineNumber,e.column,0))}}static word(e,t,i,n){const r=e.model.validatePosition(n);return o.Vi.fromModelState(a.w.word(e.cursorConfig,e.model,t.modelState,i,r))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new o.Vi(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return o.Vi.fromViewState(new o.rS(new c.e(i,n,i,n),0,new l.L(i,n),0))}static moveTo(e,t,i,n,r){const s=e.model.validatePosition(n),a=r?e.coordinatesConverter.validateViewPosition(new l.L(r.lineNumber,r.column),s):e.coordinatesConverter.convertModelPositionToViewPosition(s);return o.Vi.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,r,a){switch(i){case 0:return 4===a?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,r);case 1:return 4===a?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,r);case 2:return 2===a?this._moveUpByViewLines(e,t,n,r):this._moveUpByModelLines(e,t,n,r);case 3:return 2===a?this._moveDownByViewLines(e,t,n,r):this._moveDownByModelLines(e,t,n,r);case 4:return 2===a?t.map((t=>o.Vi.fromViewState(s.o.moveToPrevBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>o.Vi.fromModelState(s.o.moveToPrevBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 5:return 2===a?t.map((t=>o.Vi.fromViewState(s.o.moveToNextBlankLine(e.cursorConfig,e,t.viewState,n)))):t.map((t=>o.Vi.fromModelState(s.o.moveToNextBlankLine(e.cursorConfig,e.model,t.modelState,n))));case 6:return this._moveToViewMinColumn(e,t,n);case 7:return this._moveToViewFirstNonWhitespaceColumn(e,t,n);case 8:return this._moveToViewCenterColumn(e,t,n);case 9:return this._moveToViewMaxColumn(e,t,n);case 10:return this._moveToViewLastNonWhitespaceColumn(e,t,n);default:return null}}static viewportMove(e,t,i,n,r){const o=e.getCompletelyVisibleViewRange(),s=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const i=this._firstLineNumberInRange(e.model,s,r),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 13:{const i=this._lastLineNumberInRange(e.model,s,r),o=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,o)]}case 12:{const i=Math.round((s.startLineNumber+s.endLineNumber)/2),r=e.model.getLineFirstNonWhitespaceColumn(i);return[this._moveToModelPosition(e,t[0],n,i,r)]}case 14:{const i=[];for(let r=0,s=t.length;ri.endLineNumber-1?i.endLineNumber-1:ro.Vi.fromViewState(s.o.moveLeft(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineLeft(e,t,i){const n=[];for(let r=0,a=t.length;ro.Vi.fromViewState(s.o.moveRight(e.cursorConfig,e,t.viewState,i,n))))}static _moveHalfLineRight(e,t,i){const n=[];for(let r=0,a=t.length;r{"use strict";i.d(t,{o:()=>h});var n=i(5343),r=i(7988),o=i(187),s=i(4314),a=i(5924),l=i(7128);class c{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class h{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-a.HO(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new o.L(i,e.getLineMaxColumn(i))}return t}static leftPositionAtomicSoftTabs(e,t,i){if(t.column<=e.getLineIndentColumn(t.lineNumber)){const n=e.getLineMinColumn(t.lineNumber),r=e.getLineContent(t.lineNumber),s=l.l.atomicPosition(r,t.column-1,i,0);if(-1!==s&&s+1>=n)return new o.L(t.lineNumber,s+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?h.leftPositionAtomicSoftTabs(t,i,e.tabSize):h.leftPosition(t,i);return new c(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,r){let o,s;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,s=i.selection.startColumn;else{const n=i.position.delta(void 0,-(r-1)),a=t.normalizePosition(h.clipPositionColumn(n,t),0),l=h.left(e,t,a);o=l.lineNumber,s=l.column}return i.move(n,o,s,0)}static clipPositionColumn(e,t){return new o.L(e.lineNumber,h.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return ei?i:e}static rightPosition(e,t,i){return iu?(i=u,n=l?t.getLineMaxColumn(i):Math.min(t.getLineMaxColumn(i),n)):n=e.columnFromVisibleColumn(t,i,d),s=p?0:d-r.i.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),void 0!==h){const e=new o.L(i,n),r=t.normalizePosition(e,h);s+=n-r.column,i=r.lineNumber,n=r.column}return new c(i,n,s)}static down(e,t,i,n,r,o,s){return this.vertical(e,t,i,n,r,i+o,s,1)}static moveDown(e,t,i,n,r){let o,s;i.hasSelection()&&!n?(o=i.selection.endLineNumber,s=i.selection.endColumn):(o=i.position.lineNumber,s=i.position.column);const a=h.down(e,t,o,s,i.leftoverVisibleColumns,r,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateDown(e,t,i){const r=i.selection,a=h.down(e,t,r.selectionStartLineNumber,r.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=h.down(e,t,r.positionLineNumber,r.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static up(e,t,i,n,r,o,s){return this.vertical(e,t,i,n,r,i-o,s,0)}static moveUp(e,t,i,n,r){let o,s;i.hasSelection()&&!n?(o=i.selection.startLineNumber,s=i.selection.startColumn):(o=i.position.lineNumber,s=i.position.column);const a=h.up(e,t,o,s,i.leftoverVisibleColumns,r,!0);return i.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns)}static translateUp(e,t,i){const r=i.selection,a=h.up(e,t,r.selectionStartLineNumber,r.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),l=h.up(e,t,r.positionLineNumber,r.positionColumn,i.leftoverVisibleColumns,1,!1);return new n.rS(new s.e(a.lineNumber,a.column,a.lineNumber,a.column),a.leftoverVisibleColumns,new o.L(l.lineNumber,l.column),l.leftoverVisibleColumns)}static _isBlankLine(e,t){return 0===e.getLineFirstNonWhitespaceColumn(t)}static moveToPrevBlankLine(e,t,i,n){let r=i.position.lineNumber;for(;r>1&&this._isBlankLine(t,r);)r--;for(;r>1&&!this._isBlankLine(t,r);)r--;return i.move(n,r,t.getLineMinColumn(r),0)}static moveToNextBlankLine(e,t,i,n){const r=t.getLineCount();let o=i.position.lineNumber;for(;o{"use strict";i.d(t,{u:()=>m,g:()=>_});var n=i(7301),r=i(5924),o=i(1329),s=i(291),a=i(4314),l=i(3860);class c{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new a.e(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new a.e(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){const i=t.getInverseEditOperations(),n=i[0].range,r=i[1].range;return new l.Y(n.endLineNumber,n.endColumn,r.endLineNumber,r.endColumn-this._charAfterSelection.length)}}var h=i(5343),d=i(4929),u=i(187),g=i(9119),f=i(9381),p=i(9111);class m{static indent(e,t,i){if(null===t||null===i)return[];const n=[];for(let t=0,r=i.length;t1){let n;for(n=i-1;n>=1;n--){const e=t.getLineContent(n);if(r.ow(e)>=0)break}if(n<1)return null;const s=t.getLineMaxColumn(n),l=f.zu.getEnterAction(e.autoIndent,t,new a.e(n,s,n,s));l&&(o=l.indentation+l.appendText)}return n&&(n===g.wU.Indent&&(o=m.shiftIndent(e,o)),n===g.wU.Outdent&&(o=m.unshiftIndent(e,o)),o=e.normalizeIndentation(o)),o||null}static _replaceJumpToNextIndent(e,t,i,n){let r="";const s=i.getStartPosition();if(e.insertSpaces){const i=e.visibleColumnFromColumn(t,s),n=e.indentSize,o=n-i%n;for(let e=0;ethis._compositionType(i,e,r,o,s,a)));return new h.Tp(4,l,{shouldPushStackElementBefore:b(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,r,s){if(!t.isEmpty())return null;const l=t.getPosition(),c=Math.max(1,l.column-n),h=Math.min(e.getLineMaxColumn(l.lineNumber),l.column+r),d=new a.e(l.lineNumber,c,l.lineNumber,h);return e.getValueInRange(d)===i&&0===s?null:new o.Uo(d,i,0,s)}static _typeCommand(e,t,i){return i?new o.Sj(e,t,!0):new o.T4(e,t,!0)}static _enter(e,t,i,n){if(0===e.autoIndent)return m._typeCommand(n,"\n",i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||1===e.autoIndent){const o=t.getLineContent(n.startLineNumber),s=r.V8(o).substring(0,n.startColumn-1);return m._typeCommand(n,"\n"+e.normalizeIndentation(s),i)}const s=f.zu.getEnterAction(e.autoIndent,t,n);if(s){if(s.indentAction===g.wU.None)return m._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===g.wU.Indent)return m._typeCommand(n,"\n"+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===g.wU.IndentOutdent){const t=e.normalizeIndentation(s.indentation),r=e.normalizeIndentation(s.indentation+s.appendText),a="\n"+r+"\n"+t;return i?new o.Sj(n,a,!0):new o.Uo(n,a,-1,r.length-t.length,!0)}if(s.indentAction===g.wU.Outdent){const t=m.unshiftIndent(e,s.indentation);return m._typeCommand(n,"\n"+e.normalizeIndentation(t+s.appendText),i)}}const a=t.getLineContent(n.startLineNumber),l=r.V8(a).substring(0,n.startColumn-1);if(e.autoIndent>=4){const s=f.zu.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:t=>m.unshiftIndent(e,t),shiftIndent:t=>m.shiftIndent(e,t),normalizeIndentation:t=>e.normalizeIndentation(t)});if(s){let a=e.visibleColumnFromColumn(t,n.getEndPosition());const l=n.endColumn,c=t.getLineContent(n.endLineNumber),h=r.LC(c);if(n=h>=0?n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new o.Sj(n,"\n"+e.normalizeIndentation(s.afterEnter),!0);{let t=0;return l<=h+1&&(e.insertSpaces||(a=Math.ceil(a/e.indentSize)),t=Math.min(a+1-e.normalizeIndentation(s.afterEnter).length-1,0)),new o.Uo(n,"\n"+e.normalizeIndentation(s.afterEnter),0,t,!0)}}}return m._typeCommand(n,"\n"+e.normalizeIndentation(l),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let e=0,n=i.length;em.shiftIndent(e,t),unshiftIndent:t=>m.unshiftIndent(e,t)});if(null===o)return null;if(o!==e.normalizeIndentation(r)){const r=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return 0===r?m._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):m._typeCommand(new a.e(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(r-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,r){if("never"===e.autoClosingOvertype)return!1;if(!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(r))return!1;for(let o=0,s=i.length;o2?l.charCodeAt(a.column-2):0)&&c)return!1;if("auto"===e.autoClosingOvertype){let e=!1;for(let t=0,i=n.length;tt.startsWith(e.open))),s=r.some((e=>t.startsWith(e.close)));return!o&&s}static _findAutoClosingPairOpen(e,t,i,n){const r=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!r)return null;let o=null;for(const e of r)if(null===o||e.open.length>o.open.length){let r=!0;for(const o of i)if(t.getValueInRange(new a.e(o.lineNumber,o.column-e.open.length+1,o.lineNumber,o.column))+n!==e.open){r=!1;break}r&&(o=e)}return o}static _findContainedAutoClosingPair(e,t){if(t.open.length<=1)return null;const i=t.close.charAt(t.close.length-1),n=e.autoClosingPairs.autoClosingPairsCloseByEnd.get(i)||[];let r=null;for(const e of n)e.open!==t.open&&t.open.includes(e.open)&&t.close.endsWith(e.close)&&(!r||e.open.length>r.open.length)&&(r=e);return r}static _getAutoClosingPairClose(e,t,i,n,r){const o=(0,h.LN)(n),s=o?e.autoClosingQuotes:e.autoClosingBrackets,a=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;if("never"===s)return null;for(const e of i)if(!e.isEmpty())return null;const l=i.map((e=>{const t=e.getPosition();return r?{lineNumber:t.lineNumber,beforeColumn:t.column-n.length,afterColumn:t.column}:{lineNumber:t.lineNumber,beforeColumn:t.column,afterColumn:t.column}})),c=this._findAutoClosingPairOpen(e,t,l.map((e=>new u.L(e.lineNumber,e.beforeColumn))),n);if(!c)return null;const g=this._findContainedAutoClosingPair(e,c),f=g?g.close:"";let _=!0;for(const i of l){const{lineNumber:r,beforeColumn:o,afterColumn:l}=i,h=t.getLineContent(r),u=h.substring(0,o-1),g=h.substring(l-1);if(g.startsWith(f)||(_=!1),g.length>0){const t=g.charAt(0);if(!m._isBeforeClosingBrace(e,g)&&!a(t))return null}if(1===c.open.length&&("'"===n||'"'===n)&&"always"!==s){const t=(0,d.u)(e.wordSeparators);if(u.length>0){const e=u.charCodeAt(u.length-1);if(0===t.get(e))return null}}if(!t.isCheapToTokenize(r))return null;t.forceTokenization(r);const v=t.getLineTokens(r),b=(0,p.wH)(v,o-1);if(!c.shouldAutoClose(b,o-b.firstCharOffset))return null;const y=c.findNeutralCharacter();if(y){const e=t.getTokenTypeIfInsertingCharacter(r,o,y);if(!c.isOK(e))return null}}return _?c.close.substring(0,c.close.length-f.length):c.close}static _runAutoClosingOpenCharType(e,t,i,n,r,o,s){const a=[];for(let e=0,t=n.length;enew o.T4(new a.e(e.positionLineNumber,e.positionColumn,e.positionLineNumber,e.positionColumn+1),"",!1)));return new h.Tp(4,e,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const d=this._getAutoClosingPairClose(t,i,r,c,!0);return null!==d?this._runAutoClosingOpenCharType(e,t,i,r,c,!0,d):null}static typeWithInterceptors(e,t,i,n,r,s,a){if(!e&&"\n"===a){const e=[];for(let t=0,o=r.length;t{"use strict";i.d(t,{L:()=>h,w:()=>c});var n=i(5924),r=i(5343),o=i(9436),s=i(4929),a=i(187),l=i(4314);class c{static _createWord(e,t,i,n,r){return{start:n,end:r,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){const n=t.getLineContent(i.lineNumber);return this._doFindPreviousWordOnLine(n,e,i)}static _doFindPreviousWordOnLine(e,t,i){let n=0;for(let r=i.column-2;r>=0;r--){const i=e.charCodeAt(r),o=t.get(i);if(0===o){if(2===n)return this._createWord(e,n,o,r+1,this._findEndOfWord(e,t,n,r+1));n=1}else if(2===o){if(1===n)return this._createWord(e,n,o,r+1,this._findEndOfWord(e,t,n,r+1));n=2}else if(1===o&&0!==n)return this._createWord(e,n,o,r+1,this._findEndOfWord(e,t,n,r+1))}return 0!==n?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){const r=e.length;for(let o=n;o=0;r--){const n=e.charCodeAt(r),o=t.get(n);if(1===o)return r+1;if(1===i&&2===o)return r+1;if(2===i&&0===o)return r+1}return 0}static moveWordLeft(e,t,i,n){let r=i.lineNumber,o=i.column;1===o&&r>1&&(r-=1,o=t.getLineMaxColumn(r));let s=c._findPreviousWordOnLine(e,t,new a.L(r,o));if(0===n)return new a.L(r,s?s.start+1:1);if(1===n)return s&&2===s.wordType&&s.end-s.start==1&&0===s.nextCharClass&&(s=c._findPreviousWordOnLine(e,t,new a.L(r,s.start+1))),new a.L(r,s?s.start+1:1);if(3===n){for(;s&&2===s.wordType;)s=c._findPreviousWordOnLine(e,t,new a.L(r,s.start+1));return new a.L(r,s?s.start+1:1)}return s&&o<=s.end+1&&(s=c._findPreviousWordOnLine(e,t,new a.L(r,s.start+1))),new a.L(r,s?s.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,r=e.getLineMaxColumn(i);if(1===t.column)return i>1?new a.L(i-1,e.getLineMaxColumn(i-1)):t;const o=e.getLineContent(i);for(let e=t.column-1;e>1;e--){const t=o.charCodeAt(e-2),s=o.charCodeAt(e-1);if(95===t&&95!==s)return new a.L(i,e);if(n.mK(t)&&n.df(s))return new a.L(i,e);if(n.df(t)&&n.df(s)&&e+1=l.start+1&&(l=c._findNextWordOnLine(e,t,new a.L(r,l.end+1))),o=l?l.start+1:t.getLineMaxColumn(r);return new a.L(r,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,r=e.getLineMaxColumn(i);if(t.column===r)return i1?u=1:(d--,u=n.getLineMaxColumn(d)):(g&&u<=g.end+1&&(g=c._findPreviousWordOnLine(i,n,new a.L(d,g.start+1))),g?u=g.end+1:u>1?u=1:(d--,u=n.getLineMaxColumn(d))),new l.e(d,u,h.lineNumber,h.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new a.L(i.positionLineNumber,i.positionColumn);return this._deleteInsideWordWhitespace(t,n)||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return 32===i||9===i}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(0===n)return null;let r=Math.max(t.column-2,0);if(!this._charAtIsWhitespace(i,r))return null;let o=Math.min(t.column-1,n-1);if(!this._charAtIsWhitespace(i,o))return null;for(;r>0&&this._charAtIsWhitespace(i,r-1);)r--;for(;o+11?new l.e(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumbere.start+1<=i.column&&i.column<=e.end+1,s=(e,t)=>(e=Math.min(e,i.column),t=Math.max(t,i.column),new l.e(i.lineNumber,e,i.lineNumber,t)),a=e=>{let t=e.start+1,i=e.end+1,o=!1;for(;i-11&&this._charAtIsWhitespace(n,t-2);)t--;return s(t,i)},h=c._findPreviousWordOnLine(e,t,i);if(h&&o(h))return a(h);const d=c._findNextWordOnLine(e,t,i);return d&&o(d)?a(d):h&&d?s(h.end+1,d.start+1):h?s(h.start+1,h.end+1):d?s(d.start+1,d.end+1):s(1,r+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=c._moveWordPartLeft(e,i);return new l.e(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){const i=e.length;for(let n=t;n=f.start+1&&(f=c._findNextWordOnLine(i,n,new a.L(h,f.end+1))),f?d=f.start+1:dBoolean(e)))}},5343:(e,t,i)=>{"use strict";i.d(t,{LM:()=>u,LN:()=>v,Tp:()=>_,Vi:()=>g,rS:()=>m});var n=i(187),r=i(4314),o=i(3860),s=i(9111),a=i(7988),l=i(3158);const c=()=>!0,h=()=>!1,d=e=>" "===e||"\t"===e;class u{constructor(e,t,i,n){this.languageConfigurationService=n,this._cursorMoveConfigurationBrand=void 0,this._languageId=e;const r=i.options,o=r.get(131);this.readOnly=r.get(81),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=r.get(104),this.lineHeight=r.get(59),this.pageSize=Math.max(1,Math.floor(o.height/this.lineHeight)-2),this.useTabStops=r.get(116),this.wordSeparators=r.get(117),this.emptySelectionClipboard=r.get(32),this.copyWithSyntaxHighlighting=r.get(21),this.multiCursorMergeOverlapping=r.get(69),this.multiCursorPaste=r.get(71),this.autoClosingBrackets=r.get(5),this.autoClosingQuotes=r.get(8),this.autoClosingDelete=r.get(6),this.autoClosingOvertype=r.get(7),this.autoSurround=r.get(11),this.autoIndent=r.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:this._getShouldAutoClose(e,this.autoClosingQuotes),bracket:this._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=this.languageConfigurationService.getLanguageConfiguration(e).getAutoClosingPairs();const s=this.languageConfigurationService.getLanguageConfiguration(e).getSurroundingPairs();if(s)for(const e of s)this.surroundingPairs[e.open]=e.close}static shouldRecreate(e){return e.hasChanged(131)||e.hasChanged(117)||e.hasChanged(32)||e.hasChanged(69)||e.hasChanged(71)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(116)||e.hasChanged(59)||e.hasChanged(81)}get electricChars(){var e;if(!this._electricChars){this._electricChars={};const t=null===(e=this.languageConfigurationService.getLanguageConfiguration(this._languageId).electricCharacter)||void 0===e?void 0:e.getElectricCharacters();if(t)for(const e of t)this._electricChars[e]=!0}return this._electricChars}onElectricCharacter(e,t,i){const n=(0,s.wH)(t,i-1),r=this.languageConfigurationService.getLanguageConfiguration(n.languageId).electricCharacter;return r?r.onElectricCharacter(e,n,i-n.firstCharOffset):null}normalizeIndentation(e){return(0,l.x)(e,this.indentSize,this.insertSpaces)}_getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return d;case"languageDefined":return this._getLanguageDefinedShouldAutoClose(e);case"always":return c;case"never":return h}}_getLanguageDefinedShouldAutoClose(e){const t=this.languageConfigurationService.getLanguageConfiguration(e).getAutoCloseBeforeSet();return e=>-1!==t.indexOf(e)}visibleColumnFromColumn(e,t){return a.i.visibleColumnFromColumn(e.getLineContent(t.lineNumber),t.column,this.tabSize)}columnFromVisibleColumn(e,t,i){const n=a.i.columnFromVisibleColumn(e.getLineContent(t),i,this.tabSize),r=e.getLineMinColumn(t);if(no?o:n}}class g{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new f(e)}static fromViewState(e){return new p(e)}static fromModelSelection(e){const t=o.Y.liftSelection(e),i=new m(r.e.fromPositions(t.getSelectionStart()),0,t.getPosition(),0);return g.fromModelState(i)}static fromModelSelections(e){const t=[];for(let i=0,n=e.length;i{"use strict";i.d(t,{p:()=>n});class n{constructor(e,t,i,n,r,o){this.id=e,this.label=t,this.alias=i,this._precondition=n,this._run=r,this._contextKeyService=o}isSupported(){return this._contextKeyService.contextMatchesRules(this._precondition)}run(){return this.isSupported()?this._run():Promise.resolve(void 0)}}},6518:(e,t,i)=>{"use strict";i.d(t,{g:()=>n});const n={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"}},9102:(e,t,i)=>{"use strict";i.d(t,{u:()=>n});var n,r=i(3580),o=i(8819);!function(e){e.editorSimpleInput=new o.uy("editorSimpleInput",!1,!0),e.editorTextFocus=new o.uy("editorTextFocus",!1,r.N("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),e.focus=new o.uy("editorFocus",!1,r.N("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),e.textInputFocus=new o.uy("textInputFocus",!1,r.N("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),e.readOnly=new o.uy("editorReadonly",!1,r.N("editorReadonly","Whether the editor is read only")),e.inDiffEditor=new o.uy("inDiffEditor",!1,r.N("inDiffEditor","Whether the context is a diff editor")),e.columnSelection=new o.uy("editorColumnSelection",!1,r.N("editorColumnSelection","Whether `editor.columnSelection` is enabled")),e.writable=e.readOnly.toNegated(),e.hasNonEmptySelection=new o.uy("editorHasSelection",!1,r.N("editorHasSelection","Whether the editor has text selected")),e.hasOnlyEmptySelection=e.hasNonEmptySelection.toNegated(),e.hasMultipleSelections=new o.uy("editorHasMultipleSelections",!1,r.N("editorHasMultipleSelections","Whether the editor has multiple selections")),e.hasSingleSelection=e.hasMultipleSelections.toNegated(),e.tabMovesFocus=new o.uy("editorTabMovesFocus",!1,r.N("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),e.tabDoesNotMoveFocus=e.tabMovesFocus.toNegated(),e.isInWalkThroughSnippet=new o.uy("isInEmbeddedEditor",!1,!0),e.canUndo=new o.uy("canUndo",!1,!0),e.canRedo=new o.uy("canRedo",!1,!0),e.hoverVisible=new o.uy("editorHoverVisible",!1,r.N("editorHoverVisible","Whether the editor hover is visible")),e.inCompositeEditor=new o.uy("inCompositeEditor",void 0,r.N("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),e.notInCompositeEditor=e.inCompositeEditor.toNegated(),e.languageId=new o.uy("editorLangId","",r.N("editorLangId","The language identifier of the editor")),e.hasCompletionItemProvider=new o.uy("editorHasCompletionItemProvider",!1,r.N("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),e.hasCodeActionsProvider=new o.uy("editorHasCodeActionsProvider",!1,r.N("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),e.hasCodeLensProvider=new o.uy("editorHasCodeLensProvider",!1,r.N("editorHasCodeLensProvider","Whether the editor has a code lens provider")),e.hasDefinitionProvider=new o.uy("editorHasDefinitionProvider",!1,r.N("editorHasDefinitionProvider","Whether the editor has a definition provider")),e.hasDeclarationProvider=new o.uy("editorHasDeclarationProvider",!1,r.N("editorHasDeclarationProvider","Whether the editor has a declaration provider")),e.hasImplementationProvider=new o.uy("editorHasImplementationProvider",!1,r.N("editorHasImplementationProvider","Whether the editor has an implementation provider")),e.hasTypeDefinitionProvider=new o.uy("editorHasTypeDefinitionProvider",!1,r.N("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),e.hasHoverProvider=new o.uy("editorHasHoverProvider",!1,r.N("editorHasHoverProvider","Whether the editor has a hover provider")),e.hasDocumentHighlightProvider=new o.uy("editorHasDocumentHighlightProvider",!1,r.N("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),e.hasDocumentSymbolProvider=new o.uy("editorHasDocumentSymbolProvider",!1,r.N("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),e.hasReferenceProvider=new o.uy("editorHasReferenceProvider",!1,r.N("editorHasReferenceProvider","Whether the editor has a reference provider")),e.hasRenameProvider=new o.uy("editorHasRenameProvider",!1,r.N("editorHasRenameProvider","Whether the editor has a rename provider")),e.hasSignatureHelpProvider=new o.uy("editorHasSignatureHelpProvider",!1,r.N("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),e.hasInlayHintsProvider=new o.uy("editorHasInlayHintsProvider",!1,r.N("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),e.hasDocumentFormattingProvider=new o.uy("editorHasDocumentFormattingProvider",!1,r.N("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),e.hasDocumentSelectionFormattingProvider=new o.uy("editorHasDocumentSelectionFormattingProvider",!1,r.N("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),e.hasMultipleDocumentFormattingProvider=new o.uy("editorHasMultipleDocumentFormattingProvider",!1,r.N("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),e.hasMultipleDocumentSelectionFormattingProvider=new o.uy("editorHasMultipleDocumentSelectionFormattingProvider",!1,r.N("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))}(n||(n={}))},6887:(e,t,i)=>{"use strict";i.d(t,{mY:()=>f,gX:()=>c,MY:()=>u,DI:()=>y,AD:()=>C,gl:()=>p,bw:()=>h,WW:()=>d,uZ:()=>g,WU:()=>v,NX:()=>_,RW:()=>x,hG:()=>b,vx:()=>w});var n=i(666),r=i(4314),o=i(4669),s=i(5976),a=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class l extends s.JT{constructor(e,t,i){super(),this._registry=e,this._languageId=t,this._factory=i,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}get isResolved(){return this._isResolved}dispose(){this._isDisposed=!0,super.dispose()}resolve(){return a(this,void 0,void 0,(function*(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}))}_create(){return a(this,void 0,void 0,(function*(){const e=yield Promise.resolve(this._factory.createTokenizationSupport());this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}))}}var c,h,d,u,g,f,p,m=i(3046);class _{static getLanguageId(e){return(255&e)>>>0}static getTokenType(e){return(768&e)>>>8}static getFontStyle(e){return(15360&e)>>>10}static getForeground(e){return(8372224&e)>>>14}static getBackground(e){return(4286578688&e)>>>23}static getClassNameFromMetadata(e){let t="mtk"+this.getForeground(e);const i=this.getFontStyle(e);return 1&i&&(t+=" mtki"),2&i&&(t+=" mtkb"),4&i&&(t+=" mtku"),8&i&&(t+=" mtks"),t}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let r=`color: ${t[i]};`;1&n&&(r+="font-style: italic;"),2&n&&(r+="font-weight: bold;");let o="";return 4&n&&(o+=" underline"),8&n&&(o+=" line-through"),o&&(r+=`text-decoration:${o};`),r}static getPresentationFromMetadata(e){const t=this.getForeground(e),i=this.getFontStyle(e);return{foreground:t,italic:Boolean(1&i),bold:Boolean(2&i),underline:Boolean(4&i),strikethrough:Boolean(8&i)}}}class v{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class b{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class y{constructor(e,t){this._encodedTokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}function w(e){return e&&n.o.isUri(e.uri)&&r.e.isIRange(e.range)&&(r.e.isIRange(e.originSelectionRange)||r.e.isIRange(e.targetSelectionRange))}!function(e){const t=new Map;t.set(0,m.lA.symbolMethod),t.set(1,m.lA.symbolFunction),t.set(2,m.lA.symbolConstructor),t.set(3,m.lA.symbolField),t.set(4,m.lA.symbolVariable),t.set(5,m.lA.symbolClass),t.set(6,m.lA.symbolStruct),t.set(7,m.lA.symbolInterface),t.set(8,m.lA.symbolModule),t.set(9,m.lA.symbolProperty),t.set(10,m.lA.symbolEvent),t.set(11,m.lA.symbolOperator),t.set(12,m.lA.symbolUnit),t.set(13,m.lA.symbolValue),t.set(15,m.lA.symbolEnum),t.set(14,m.lA.symbolConstant),t.set(15,m.lA.symbolEnum),t.set(16,m.lA.symbolEnumMember),t.set(17,m.lA.symbolKeyword),t.set(27,m.lA.symbolSnippet),t.set(18,m.lA.symbolText),t.set(19,m.lA.symbolColor),t.set(20,m.lA.symbolFile),t.set(21,m.lA.symbolReference),t.set(22,m.lA.symbolCustomColor),t.set(23,m.lA.symbolFolder),t.set(24,m.lA.symbolTypeParameter),t.set(25,m.lA.account),t.set(26,m.lA.issues),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for CompletionItemKind "+e),i=m.lA.symbolProperty),i};const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",27),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),e.fromString=function(e,t){let n=i.get(e);return void 0!==n||t||(n=9),n}}(c||(c={})),function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"}(h||(h={})),function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"}(d||(d={})),function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"}(u||(u={})),function(e){const t=new Map;t.set(0,m.lA.symbolFile),t.set(1,m.lA.symbolModule),t.set(2,m.lA.symbolNamespace),t.set(3,m.lA.symbolPackage),t.set(4,m.lA.symbolClass),t.set(5,m.lA.symbolMethod),t.set(6,m.lA.symbolProperty),t.set(7,m.lA.symbolField),t.set(8,m.lA.symbolConstructor),t.set(9,m.lA.symbolEnum),t.set(10,m.lA.symbolInterface),t.set(11,m.lA.symbolFunction),t.set(12,m.lA.symbolVariable),t.set(13,m.lA.symbolConstant),t.set(14,m.lA.symbolString),t.set(15,m.lA.symbolNumber),t.set(16,m.lA.symbolBoolean),t.set(17,m.lA.symbolArray),t.set(18,m.lA.symbolObject),t.set(19,m.lA.symbolKey),t.set(20,m.lA.symbolNull),t.set(21,m.lA.symbolEnumMember),t.set(22,m.lA.symbolStruct),t.set(23,m.lA.symbolEvent),t.set(24,m.lA.symbolOperator),t.set(25,m.lA.symbolTypeParameter),e.toIcon=function(e){let i=t.get(e);return i||(console.info("No codicon found for SymbolKind "+e),i=m.lA.symbolProperty),i}}(g||(g={}));class C{constructor(e){this.value=e}}C.Comment=new C("comment"),C.Imports=new C("imports"),C.Region=new C("region"),function(e){e.is=function(e){return!(!e||"object"!=typeof e)&&"string"==typeof e.id&&"string"==typeof e.title}}(f||(f={})),function(e){e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"}(p||(p={}));const x=new class{constructor(){this._map=new Map,this._factories=new Map,this._onDidChange=new o.Q5,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),(0,s.OF)((()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))}))}registerFactory(e,t){var i;null===(i=this._factories.get(e))||void 0===i||i.dispose();const n=new l(this,e,t);return this._factories.set(e,n),(0,s.OF)((()=>{const t=this._factories.get(e);t&&t===n&&(this._factories.delete(e),t.dispose())}))}getOrCreate(e){return a(this,void 0,void 0,(function*(){const t=this.get(e);if(t)return t;const i=this._factories.get(e);return!i||i.isResolved?null:(yield i.resolve(),this.get(e))}))}get(e){return this._map.get(e)||null}isResolved(e){if(this.get(e))return!0;const t=this._factories.get(e);return!(t&&!t.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}},2042:(e,t,i)=>{"use strict";i.d(t,{O:()=>n});const n=(0,i(2065).yh)("languageService")},9119:(e,t,i)=>{"use strict";var n;i.d(t,{V6:()=>r,c$:()=>o,wU:()=>n}),function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"}(n||(n={}));class r{constructor(e){if(this._neutralCharacter=null,this._neutralCharacterSearched=!1,this.open=e.open,this.close=e.close,this._inString=!0,this._inComment=!0,this._inRegEx=!0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t{"use strict";i.d(t,{c_:()=>S,zu:()=>D});var n=i(4669),r=i(5976),o=i(5924),s=i(270),a=i(9119),l=i(9111);class c{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map((e=>new a.V6(e))):e.brackets?this._autoClosingPairs=e.brackets.map((e=>new a.V6({open:e[0],close:e[1]}))):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=h(e.colorizedBracketPairs.map((e=>[e[0],e[1]]))):e.brackets?this._colorizedBracketPairs=h(e.brackets.map((e=>[e[0],e[1]])).filter((e=>!("<"===e[0]&&">"===e[1])))):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new a.V6({open:t.open,close:t.close||""}))}this._autoCloseBefore="string"==typeof e.autoCloseBefore?e.autoCloseBefore:c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}function h(e){return e.filter((([e,t])=>""!==e&&""!==t))}c.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=";:.,=}])> \n\t";var d=i(9488),u=i(4302);class g{constructor(e){this._richEditBrackets=e}getElectricCharacters(){const e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const t=i.charAt(i.length-1);e.push(t)}return(0,d.EB)(e)}onElectricCharacter(e,t,i){if(!this._richEditBrackets||0===this._richEditBrackets.brackets.length)return null;const n=t.findTokenIndexAtOffset(i-1);if((0,l.Bu)(t.getStandardTokenType(n)))return null;const r=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,s=u.Vr.findPrevBracketInRange(r,1,o,0,o.length);if(!s)return null;const a=o.substring(s.startColumn-1,s.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[a])return null;const c=t.getActualLineContentBefore(s.startColumn-1);return/^\s*$/.test(c)?{matchOpenBracket:a}:null}}function f(e){return e.global&&(e.lastIndex=0),!0}class p{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&f(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&f(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&f(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&f(this._indentationRules.unIndentedLinePattern)&&this._indentationRules.unIndentedLinePattern.test(e))}getIndentMetadata(e){let t=0;return this.shouldIncrease(e)&&(t+=1),this.shouldDecrease(e)&&(t+=2),this.shouldIndentNextLine(e)&&(t+=4),this.shouldIgnore(e)&&(t+=8),t}}var m=i(7301);class _{constructor(e){(e=e||{}).brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach((e=>{const t=_._createOpenBracketRegExp(e[0]),i=_._createCloseBracketRegExp(e[1]);t&&i&&this._brackets.push({open:e[0],openRegExp:t,close:e[1],closeRegExp:i})})),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let e=0,r=this._regExpRules.length;e!e.reg||(e.reg.lastIndex=0,e.reg.test(e.text)))))return r.action}if(e>=2&&i.length>0&&n.length>0)for(let e=0,t=this._brackets.length;e=2&&i.length>0)for(let e=0,t=this._brackets.length;e{const t=e.change.keys.some((e=>i.has(e))),n=e.change.overrides.filter((([e,t])=>t.some((e=>i.has(e))))).map((([e])=>e));if(t)this.configurations.clear(),this.onDidChangeEmitter.fire(new x(void 0));else for(const e of n)this.languageService.isRegisteredLanguageId(e)&&(this.configurations.delete(e),this.onDidChangeEmitter.fire(new x(e)))}))),this._register(D.onDidChange((e=>{this.configurations.delete(e.languageId),this.onDidChangeEmitter.fire(new x(e.languageId))})))}getLanguageConfiguration(e){let t=this.configurations.get(e);return t||(t=function(e,t,i){let n=D.getLanguageConfiguration(e);if(!n){if(!i.isRegisteredLanguageId(e))throw new Error(`Language id "${e}" is not configured nor known`);n=new M(e,{})}const r=function(e,t){const i=t.getValue(L.brackets,{overrideIdentifier:e}),n=t.getValue(L.colorizedBracketPairs,{overrideIdentifier:e});return{brackets:N(i),colorizedBracketPairs:N(n)}}(n.languageId,t),o=T([n.underlyingConfig,r]);return new M(n.languageId,o)}(e,this.configurationService,this.languageService),this.configurations.set(e,t)),t}};k=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([C(0,b.Ui),C(1,y.O)],k);const L={brackets:"editor.language.brackets",colorizedBracketPairs:"editor.language.colorizedBracketPairs"};function N(e){if(Array.isArray(e))return e.map((e=>{if(Array.isArray(e)&&2===e.length)return[e[0],e[1]]})).filter((e=>!!e))}class E{constructor(e){this.languageId=e}}const D=new class{constructor(){this._entries=new Map,this._onDidChange=new n.Q5,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e);n||(n=new A(e),this._entries.set(e,n));const o=n.register(t,i);return this._onDidChange.fire(new E(e)),(0,r.OF)((()=>{o.dispose(),this._onDidChange.fire(new E(e))}))}getLanguageConfiguration(e){const t=this._entries.get(e);return(null==t?void 0:t.getResolvedConfiguration())||null}getComments(e){const t=this.getLanguageConfiguration(e);return t&&t.comments||null}getIndentRulesSupport(e){const t=this.getLanguageConfiguration(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){const n=e.getLanguageIdAtPosition(t,0);if(t>1){let r,o=-1;for(r=t-1;r>=1;r--){if(e.getLanguageIdAtPosition(r,0)!==n)return o;const t=e.getLineContent(r);if(!i.shouldIgnore(t)&&!/^\s+$/.test(t)&&""!==t)return r;o=r}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const r=this.getIndentRulesSupport(t.getLanguageId());if(!r)return null;if(i<=1)return{indentation:"",action:null};const s=this.getPrecedingValidLine(t,i,r);if(s<0)return null;if(s<1)return{indentation:"",action:null};const l=t.getLineContent(s);if(r.shouldIncrease(l)||r.shouldIndentNextLine(l))return{indentation:o.V8(l),action:a.wU.Indent,line:s};if(r.shouldDecrease(l))return{indentation:o.V8(l),action:null,line:s};{if(1===s)return{indentation:o.V8(t.getLineContent(s)),action:null,line:s};const e=s-1,i=r.getIndentMetadata(t.getLineContent(e));if(!(3&i)&&4&i){let i=0;for(let n=e-1;n>0;n--)if(!r.shouldIndentNextLine(t.getLineContent(n))){i=n;break}return{indentation:o.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(n)return{indentation:o.V8(t.getLineContent(s)),action:null,line:s};for(let e=s;e>0;e--){const i=t.getLineContent(e);if(r.shouldIncrease(i))return{indentation:o.V8(i),action:a.wU.Indent,line:e};if(r.shouldIndentNextLine(i)){let i=0;for(let n=e-1;n>0;n--)if(!r.shouldIndentNextLine(t.getLineContent(e))){i=n;break}return{indentation:o.V8(t.getLineContent(i+1)),action:null,line:i+1}}if(r.shouldDecrease(i))return{indentation:o.V8(i),action:null,line:e}}return{indentation:o.V8(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,r){if(e<4)return null;const s=this.getLanguageConfiguration(i);if(!s)return null;const l=this.getIndentRulesSupport(i);if(!l)return null;const c=this.getInheritIndentForLine(e,t,n),h=t.getLineContent(n);if(c){const i=c.line;if(void 0!==i){const n=s.onEnter(e,"",t.getLineContent(i),"");if(n){let e=o.V8(t.getLineContent(i));return n.removeText&&(e=e.substring(0,e.length-n.removeText)),n.indentAction===a.wU.Indent||n.indentAction===a.wU.IndentOutdent?e=r.shiftIndent(e):n.indentAction===a.wU.Outdent&&(e=r.unshiftIndent(e)),l.shouldDecrease(h)&&(e=r.unshiftIndent(e)),n.appendText&&(e+=n.appendText),o.V8(e)}}return l.shouldDecrease(h)?c.action===a.wU.Indent?c.indentation:r.unshiftIndent(c.indentation):c.action===a.wU.Indent?r.shiftIndent(c.indentation):c.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const r=t.getLineTokens(i.startLineNumber),s=(0,l.wH)(r,i.startColumn-1),c=s.getLineContent();let h,d,u=!1;s.firstCharOffset>0&&r.getLanguageId(0)!==s.languageId?(u=!0,h=c.substr(0,i.startColumn-1-s.firstCharOffset)):h=r.getLineContent().substring(0,i.startColumn-1),d=i.isEmpty()?c.substr(i.startColumn-1-s.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-s.firstCharOffset);const g=this.getIndentRulesSupport(s.languageId);if(!g)return null;const f=h,p=o.V8(h),m={getLineTokens:e=>t.getLineTokens(e),getLanguageId:()=>t.getLanguageId(),getLanguageIdAtPosition:(e,i)=>t.getLanguageIdAtPosition(e,i),getLineContent:e=>e===i.startLineNumber?f:t.getLineContent(e)},_=o.V8(r.getLineContent()),v=this.getInheritIndentForLine(e,m,i.startLineNumber+1);if(!v){const e=u?_:p;return{beforeEnter:e,afterEnter:e}}let b=u?_:v.indentation;return v.action===a.wU.Indent&&(b=n.shiftIndent(b)),g.shouldDecrease(d)&&(b=n.unshiftIndent(b)),{beforeEnter:u?_:p,afterEnter:b}}getIndentActionForType(e,t,i,n,r){if(e<4)return null;const o=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(o.firstCharOffset)return null;const s=this.getIndentRulesSupport(o.languageId);if(!s)return null;const l=o.getLineContent(),c=l.substr(0,i.startColumn-1-o.firstCharOffset);let h;if(h=i.isEmpty()?l.substr(i.startColumn-1-o.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-o.firstCharOffset),!s.shouldDecrease(c+h)&&s.shouldDecrease(c+n+h)){const n=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!n)return null;let o=n.indentation;return n.action!==a.wU.Indent&&(o=r.unshiftIndent(o)),o}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageId());return i?t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t)):null}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),r=this.getLanguageConfiguration(n.languageId);if(!r)return null;const o=n.getLineContent(),s=o.substr(0,i.startColumn-1-n.firstCharOffset);let l;l=i.isEmpty()?o.substr(i.startColumn-1-n.firstCharOffset):this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let c="";if(i.startLineNumber>1&&0===n.firstCharOffset){const e=this.getScopedLineTokens(t,i.startLineNumber-1);e.languageId===n.languageId&&(c=e.getLineContent())}const h=r.onEnter(e,c,s,l);if(!h)return null;const d=h.indentAction;let u=h.appendText;const g=h.removeText||0;u?d===a.wU.Indent&&(u="\t"+u):u=d===a.wU.Indent||d===a.wU.IndentOutdent?"\t":"";let f=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return g&&(f=f.substring(0,f.length-g)),{indentAction:d,appendText:u,removeText:g,indentation:f}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let r=o.V8(n);return r.length>i-1&&(r=r.substring(0,i-1)),r}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),r=void 0===i?e.getLineMaxColumn(t)-1:i-1;return(0,l.wH)(n,r)}};class A{constructor(e){this.languageId=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new I(e,t,++this._order);return this._entries.push(i),this._resolved=null,(0,r.OF)((()=>{for(let e=0;ee.configuration))))}}function T(e){let t={comments:void 0,brackets:void 0,wordPattern:void 0,indentationRules:void 0,onEnterRules:void 0,autoClosingPairs:void 0,surroundingPairs:void 0,autoCloseBefore:void 0,folding:void 0,colorizedBracketPairs:void 0,__electricCharacterSupport:void 0};for(const i of e)t={comments:i.comments||t.comments,brackets:i.brackets||t.brackets,wordPattern:i.wordPattern||t.wordPattern,indentationRules:i.indentationRules||t.indentationRules,onEnterRules:i.onEnterRules||t.onEnterRules,autoClosingPairs:i.autoClosingPairs||t.autoClosingPairs,surroundingPairs:i.surroundingPairs||t.surroundingPairs,autoCloseBefore:i.autoCloseBefore||t.autoCloseBefore,folding:i.folding||t.folding,colorizedBracketPairs:i.colorizedBracketPairs||t.colorizedBracketPairs,__electricCharacterSupport:i.__electricCharacterSupport||t.__electricCharacterSupport};return t}class I{constructor(e,t,i){this.configuration=e,this.priority=t,this.order=i}static cmp(e,t){return e.priority===t.priority?e.order-t.order:e.priority-t.priority}}class M{constructor(e,t){this.languageId=e,this.underlyingConfig=t,this._brackets=null,this._electricCharacter=null,this._onEnterSupport=this.underlyingConfig.brackets||this.underlyingConfig.indentationRules||this.underlyingConfig.onEnterRules?new _(this.underlyingConfig):null,this.comments=M._handleComments(this.underlyingConfig),this.characterPair=new c(this.underlyingConfig),this.wordDefinition=this.underlyingConfig.wordPattern||s.Af,this.indentationRules=this.underlyingConfig.indentationRules,this.underlyingConfig.indentationRules?this.indentRulesSupport=new p(this.underlyingConfig.indentationRules):this.indentRulesSupport=null,this.foldingRules=this.underlyingConfig.folding||{}}getWordDefinition(){return(0,s.eq)(this.wordDefinition)}get brackets(){return!this._brackets&&this.underlyingConfig.brackets&&(this._brackets=new u.EA(this.languageId,this.underlyingConfig.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new g(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}getAutoClosingPairs(){return new a.c$(this.characterPair.getAutoClosingPairs())}getAutoCloseBeforeSet(){return this.characterPair.getAutoCloseBeforeSet()}getSurroundingPairs(){return this.characterPair.getSurroundingPairs()}static _handleComments(e){const t=e.comments;if(!t)return null;const i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){const[e,n]=t.blockComment;i.blockCommentStartToken=e,i.blockCommentEndToken=n}return i}}(0,w.z)(S,k)},8801:(e,t,i)=>{"use strict";i.d(t,{bd:()=>h,dQ:()=>c});var n=i(3580),r=i(4669),o=i(9381),s=i(9872),a=i(1170),l=i(3193);const c=new class{constructor(){this._onDidChangeLanguages=new r.Q5,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0),s.B.as(l.IP.Configuration).registerDefaultConfigurations([{overrides:{"[plaintext]":{"editor.unicodeHighlight.ambiguousCharacters":!1,"editor.unicodeHighlight.invisibleCharacters":!1}}}])},276:(e,t,i)=>{"use strict";i.d(t,{Dy:()=>s,Ri:()=>o,TJ:()=>r});var n=i(6887);const r=new class{clone(){return this}equals(e){return this===e}};function o(e,t){return new n.hG([new n.WU(0,"",e)],t)}function s(e,t){const i=new Uint32Array(2);return i[0]=0,i[1]=(16384|e<<0|2<<23)>>>0,new n.DI(i,null===t?r:t)}},9111:(e,t,i)=>{"use strict";function n(e,t){const i=e.getCount(),n=e.findTokenIndexAtOffset(t),o=e.getLanguageId(n);let s=n;for(;s+10&&e.getLanguageId(a-1)===o;)a--;return new r(e,o,a,s+1,e.getStartOffset(a),e.getEndOffset(s))}i.d(t,{Bu:()=>o,wH:()=>n});class r{constructor(e,t,i,n,r,o){this._scopedLineTokensBrand=void 0,this._actual=e,this.languageId=t,this._firstTokenIndex=i,this._lastTokenIndex=n,this.firstCharOffset=r,this._lastCharOffset=o}getLineContent(){return this._actual.getLineContent().substring(this.firstCharOffset,this._lastCharOffset)}getActualLineContentBefore(e){return this._actual.getLineContent().substring(0,this.firstCharOffset+e)}getTokenCount(){return this._lastTokenIndex-this._firstTokenIndex}findTokenIndexAtOffset(e){return this._actual.findTokenIndexAtOffset(e+this.firstCharOffset)-this._firstTokenIndex}getStandardTokenType(e){return this._actual.getStandardTokenType(e+this._firstTokenIndex)}}function o(e){return 0!=(3&e)}},4302:(e,t,i)=>{"use strict";i.d(t,{EA:()=>a,Vr:()=>f});var n=i(5924),r=i(72),o=i(4314);class s{constructor(e,t,i,n,r,o){this._richEditBracketBrand=void 0,this.languageId=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=r,this.reversedRegex=o,this._openSet=s._toSet(this.open),this._closeSet=s._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}class a{constructor(e,t){this._richEditBracketsBrand=void 0;const i=function(e){const t=e.length;e=e.map((e=>[e[0].toLowerCase(),e[1].toLowerCase()]));const i=[];for(let e=0;e{const[i,n]=e,[r,o]=t;return i===r||i===o||n===r||n===o},r=(e,n)=>{const r=Math.min(e,n),o=Math.max(e,n);for(let e=0;e0&&o.push({open:r,close:s})}return o}(t);this.brackets=i.map(((t,n)=>new s(e,n,t.open,t.close,function(e,t,i,n){let r=[];r=r.concat(e),r=r.concat(t);for(let e=0,t=r.length;e=0&&n.push(t);for(const t of o.close)t.indexOf(e)>=0&&n.push(t)}}function c(e,t){return e.length-t.length}function h(e){if(e.length<=1)return e;const t=[],i=new Set;for(const n of e)i.has(n)||(t.push(n),i.add(n));return t}function d(e){const t=/^[\w ]+$/.test(e);return e=n.ec(e),t?`\\b${e}\\b`:e}function u(e){const t=`(${e.map(d).join(")|(")})`;return n.GF(t,!0)}const g=function(){let e=null,t=null;return function(i){return e!==i&&(e=i,t=function(e){if(r.lZ){const t=new Uint16Array(e.length);let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charCodeAt(n);return r.oe().decode(t)}{const t=[];let i=0;for(let n=e.length-1;n>=0;n--)t[i++]=e.charAt(n);return t.join("")}}(e)),t}}();class f{static _findPrevBracketInText(e,t,i,n){const r=i.match(e);if(!r)return null;const s=i.length-(r.index||0),a=r[0].length,l=n+s;return new o.e(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,r){const o=g(i).substring(i.length-r,i.length-n);return this._findPrevBracketInText(e,t,o,n)}static findNextBracketInText(e,t,i,n){const r=i.match(e);if(!r)return null;const s=r.index||0,a=r[0].length;if(0===a)return null;const l=n+s;return new o.e(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,r){const o=i.substring(n,r);return this.findNextBracketInText(e,t,o,n)}}},2963:(e,t,i)=>{"use strict";i.d(t,{C2:()=>l,Fq:()=>c});var n=i(5924),r=i(7378),o=i(6887),s=i(276);const a={getInitialState:()=>s.TJ,tokenizeEncoded:(e,t,i)=>(0,s.Dy)(0,i)};function l(e,t,i){return n=this,r=void 0,l=function*(){if(!i)return h(t,e.languageIdCodec,a);const n=yield o.RW.getOrCreate(i);return h(t,e.languageIdCodec,n||a)},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{a(l.next(e))}catch(e){t(e)}}function o(e){try{a(l.throw(e))}catch(e){t(e)}}function a(t){var n;t.done?e(t.value):(n=t.value,n instanceof s?n:new s((function(e){e(n)}))).then(i,o)}a((l=l.apply(n,r||[])).next())}));var n,r,s,l}function c(e,t,i,n,r,o,s){let a="
",l=n,c=0,h=!0;for(let d=0,u=t.getCount();d0;)s&&h?(g+=" ",h=!1):(g+=" ",h=!0),e--;break}case 60:g+="<",h=!1;break;case 62:g+=">",h=!1;break;case 38:g+="&",h=!1;break;case 0:g+="�",h=!1;break;case 65279:case 8232:case 8233:case 133:g+="�",h=!1;break;case 13:g+="​",h=!1;break;case 32:s&&h?(g+=" ",h=!1):(g+=" ",h=!0);break;default:g+=String.fromCharCode(t),h=!1}}if(a+=`${g}`,u>r||l>=r)break}return a+="
",a}function h(e,t,i){let o='
';const s=n.uq(e);let a=i.getInitialState();for(let e=0,l=s.length;e0&&(o+="
");const c=i.tokenizeEncoded(l,!0,a);r.A.convertToEndOffset(c.tokens,l.length);const h=new r.A(c.tokens,l,t).inflate();let d=0;for(let e=0,t=h.getCount();e${n.YU(l.substring(d,i))}`,d=i}a=c.endState}return o+="
",o}},4973:(e,t,i)=>{"use strict";i.d(t,{F5:()=>r,Qi:()=>c,RM:()=>o,Tx:()=>h,dJ:()=>a,je:()=>d,pt:()=>u,sh:()=>n,tk:()=>l});var n,r,o,s=i(6248);!function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"}(n||(n={})),function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"}(r||(r={})),function(e){e[e.Both=0]="Both",e[e.Right=1]="Right",e[e.Left=2]="Left",e[e.None=3]="None"}(o||(o={}));class a{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,0|e.tabSize),this.indentSize=0|e.tabSize,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=0|e.defaultEOL,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&(0,s.fS)(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class l{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class c{constructor(e,t,i,n,r,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=r,this._isTracked=o}}class h{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}class d{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function u(e){return!e.isTooLargeForSyncing()&&!e.isForSimpleWidget}},1720:(e,t,i)=>{"use strict";i.d(t,{BH:()=>p,Dm:()=>_,Kd:()=>a,Y0:()=>l,n2:()=>m});var n=i(7988),r=i(5035),o=i(1761);class s{constructor(e){this._length=e}get length(){return this._length}}class a extends s{constructor(e,t,i,n,r){super(e),this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=r}static create(e,t,i){let n=e.length;return t&&(n=(0,r.Ii)(n,t.length)),i&&(n=(0,r.Ii)(n,i.length)),new a(n,e,t,i,t?t.missingOpeningBracketIds:o.tS.getEmpty())}get kind(){return 2}get listHeight(){return 0}get childrenLength(){return 3}getChild(e){switch(e){case 0:return this.openingBracket;case 1:return this.child;case 2:return this.closingBracket}throw new Error("Invalid child index")}get children(){const e=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e){return null!==this.closingBracket&&!e.intersects(this.missingOpeningBracketIds)}deepClone(){return new a(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}computeMinIndentation(e,t){return this.child?this.child.computeMinIndentation((0,r.Ii)(e,this.openingBracket.length),t):Number.MAX_SAFE_INTEGER}}class l extends s{constructor(e,t,i){super(e),this.listHeight=t,this._missingOpeningBracketIds=i,this.cachedMinIndentation=-1}static create23(e,t,i,n=!1){let o=e.length,s=e.missingOpeningBracketIds;if(e.listHeight!==t.listHeight)throw new Error("Invalid list heights");if(o=(0,r.Ii)(o,t.length),s=s.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");o=(0,r.Ii)(o,i.length),s=s.merge(i.missingOpeningBracketIds)}return n?new h(o,e.listHeight+1,e,t,i,s):new c(o,e.listHeight+1,e,t,i,s)}static getEmpty(){return new u(r.xl,0,[],o.tS.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(0===e)return;const t=this.getChild(e-1),i=4===t.kind?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),0===this.childrenLength)return;const e=this.getChild(0),t=4===e.kind?e.toMutable():e;return e!==t&&this.setChild(0,t),t}canBeReused(e){if(e.intersects(this.missingOpeningBracketIds))return!1;let t,i=this;for(;4===i.kind&&(t=i.childrenLength)>0;)i=i.getChild(t-1);return i.canBeReused(e)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n{"use strict";i.d(t,{Q:()=>r,Y:()=>o});var n=i(5035);class r{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class o{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map((e=>s.from(e)))}getOffsetBeforeChange(e){return this.adjustNextEdit(e),this.translateCurToOld(e)}getDistanceToNextChange(e){this.adjustNextEdit(e);const t=this.edits[this.nextEditIdx],i=t?this.translateOldToCur(t.offsetObj):this.documentLength;return(0,n.BE)(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):(0,n.Hg)(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=(0,n.Hw)(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):(0,n.Hg)(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx{"use strict";i.d(t,{Z:()=>c});var n=i(5924),r=i(1720),o=i(5035),s=i(1761),a=i(6735);class l{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(e,i){return t.getKey(`${e}:::${i}`)}const n=e.characterPair.getColorizedBrackets(),c=new Map,h=new Set;for(const[t,r]of n){h.add(t);let n=c.get(r);const o=i(e.languageId,t);n||(n={openingBrackets:s.tS.getEmpty(),first:o},c.set(r,n)),n.openingBrackets=n.openingBrackets.add(o,s.Qw)}const d=new Map;for(const[t,i]of c){const n=(0,o.Hg)(0,t.length);d.set(t,new a.WU(n,2,i.first,i.openingBrackets,r.n2.create(n,e.languageId,i.openingBrackets)))}for(const t of h){const n=(0,o.Hg)(0,t.length),l=i(e.languageId,t),c=s.tS.getEmpty().add(l,s.Qw);d.set(t,new a.WU(n,1,l,c,r.n2.create(n,e.languageId,c)))}return new l(d)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map((e=>function(e){const t=(0,n.ec)(e);return/^[\w ]+$/.test(e)?`\\b${t}\\b`:t}(e))).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}findClosingTokenText(e){for(const[t,i]of this.map)if(i.bracketIds.intersects(e))return t}get isEmpty(){return 0===this.map.size}}class c{constructor(e,t){this.denseKeyProvider=e,this.getLanguageConfiguration=t,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=l.createFromLanguage(this.getLanguageConfiguration(e),this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}},5035:(e,t,i)=>{"use strict";i.d(t,{BE:()=>p,By:()=>_,F_:()=>g,Hg:()=>h,Hw:()=>d,Ii:()=>f,PZ:()=>b,Qw:()=>y,VR:()=>m,W9:()=>u,Zq:()=>v,av:()=>s,oR:()=>w,xd:()=>l,xl:()=>a});var n=i(5924),r=i(4314);class o{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function s(e,t,i,n){return e!==i?h(i-e,n):h(0,n-t)}o.zero=new o(0,0);const a=0;function l(e){return 0===e}const c=Math.pow(2,26);function h(e,t){return e*c+t}function d(e){const t=e,i=Math.floor(t/c);return new o(i,t-i*c)}function u(e){return Math.floor(e/c)}function g(e){return e}function f(e,t){return t=t}function b(e){return h(e.lineNumber-1,e.column-1)}function y(e,t){const i=e,n=Math.floor(i/c),o=i-n*c,s=t,a=Math.floor(s/c),l=s-a*c;return new r.e(n+1,o+1,a+1,l+1)}function w(e){const t=(0,n.uq)(e);return h(t.length-1,t[t.length-1].length)}},3883:(e,t,i)=>{"use strict";i.d(t,{w:()=>g});var n=i(1720),r=i(2442),o=i(1761),s=i(5035);function a(e,t=!1){if(0===e.length)return null;if(1===e.length)return e[0];let i=e.length;for(;i>3;){const r=i>>1;for(let o=0;o=3?e[2]:null,t)}function l(e,t){return Math.abs(e.listHeight-t.listHeight)}function c(e,t){return e.listHeight===t.listHeight?n.Y0.create23(e,t,null,!1):e.listHeight>t.listHeight?function(e,t){let i=e=e.toMutable();const r=new Array;let o;for(;;){if(t.listHeight===i.listHeight){o=t;break}if(4!==i.kind)throw new Error("unexpected");r.push(i),i=i.makeLastElementMutable()}for(let e=r.length-1;e>=0;e--){const t=r[e];o?t.childrenLength>=3?o=n.Y0.create23(t.unappendChild(),o,null,!1):(t.appendChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Y0.create23(e,o,null,!1):e}(e,t):function(e,t){let i=e=e.toMutable();const r=new Array;for(;t.listHeight!==i.listHeight;){if(4!==i.kind)throw new Error("unexpected");r.push(i),i=i.makeFirstElementMutable()}let o=t;for(let e=r.length-1;e>=0;e--){const t=r[e];o?t.childrenLength>=3?o=n.Y0.create23(o,t.unprependChild(),null,!1):(t.prependChildOfSameHeight(o),o=void 0):t.handleChildrenChanged()}return o?n.Y0.create23(o,e,null,!1):e}(t,e)}class h{constructor(e){this.lastOffset=s.xl,this.nextNodes=[e],this.offsets=[s.xl],this.idxs=[]}readLongestNodeAt(e,t){if((0,s.VR)(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=u(this.nextNodes);if(!i)return;const n=u(this.offsets);if((0,s.VR)(e,n))return;if((0,s.VR)(n,e))if((0,s.Ii)(n,i.length)<=e)this.nextNodeAfterCurrent();else{const e=d(i);-1!==e?(this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const e=d(i);if(-1===e)return void this.nextNodeAfterCurrent();this.nextNodes.push(i.getChild(e)),this.offsets.push(n),this.idxs.push(e)}}}}nextNodeAfterCurrent(){for(;;){const e=u(this.offsets),t=u(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),0===this.idxs.length)break;const i=u(this.nextNodes),n=d(i,this.idxs[this.idxs.length-1]);if(-1!==n){this.nextNodes.push(i.getChild(n)),this.offsets.push((0,s.Ii)(e,t.length)),this.idxs[this.idxs.length-1]=n;break}this.idxs.pop()}}}function d(e,t=-1){for(;;){if(++t>=e.childrenLength)return-1;if(e.getChild(t))return t}}function u(e){return e.length>0?e[e.length-1]:void 0}function g(e,t,i,n){return new f(e,t,i,n).parseDocument()}class f{constructor(e,t,i,n){if(this.tokenizer=e,this.createImmutableLists=n,this._itemsConstructed=0,this._itemsFromCache=0,i&&n)throw new Error("Not supported");this.oldNodeReader=i?new h(i):void 0,this.positionMapper=new r.Y(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(o.tS.getEmpty());return e||(e=n.Y0.getEmpty()),e}parseList(e){const t=new Array;for(;;){const i=this.tokenizer.peek();if(!i||2===i.kind&&i.bracketIds.intersects(e))break;const n=this.parseChild(e);4===n.kind&&0===n.childrenLength||t.push(n)}const i=this.oldNodeReader?function(e){if(0===e.length)return null;if(1===e.length)return e[0];let t=0;function i(){if(t>=e.length)return null;const i=t,n=e[i].listHeight;for(t++;t=2?a(0===i&&t===e.length?e:e.slice(i,t),!1):e[i]}let n=i(),r=i();if(!r)return n;for(let e=i();e;e=i())l(n,r)<=l(r,e)?(n=c(n,r),r=e):r=c(r,e);return c(n,r)}(t):a(t,this.createImmutableLists);return i}parseChild(e){if(this.oldNodeReader){const t=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!(0,s.xd)(t)){const i=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),(i=>!!(0,s.VR)(i.length,t)&&i.canBeReused(e)));if(i)return this._itemsFromCache++,this.tokenizer.skip(i.length),i}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new n.Dm(t.bracketIds,t.length);case 0:return t.astNode;case 1:{const i=e.merge(t.bracketIds),r=this.parseList(i),o=this.tokenizer.peek();return o&&2===o.kind&&(o.bracketId===t.bracketId||o.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),n.Kd.create(t.astNode,r,o.astNode)):n.Kd.create(t.astNode,r,null)}default:throw new Error("unexpected")}}}},1761:(e,t,i)=>{"use strict";i.d(t,{FE:()=>s,Qw:()=>o,tS:()=>r});const n=new Array;class r{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&0===t.length){let i=r.cache[e];return i||(i=new r(e,t),r.cache[e]=i),i}return new r(e,t)}static getEmpty(){return this.empty}add(e,t){const i=t.getKey(e);let n=i>>5;if(0===n){const e=1<e};class s{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return void 0===t&&(t=this.items.size,this.items.set(e,t)),t}}},6735:(e,t,i)=>{"use strict";i.d(t,{WU:()=>l,g:()=>d,xH:()=>c});var n=i(7301),r=i(6887),o=i(1720),s=i(5035),a=i(1761);class l{constructor(e,t,i,n,r){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=r}}class c{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new h(this.textModel,this.bracketTokens),this._offset=s.xl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return(0,s.Hg)(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=(0,s.Ii)(this._offset,e);const t=(0,s.Hw)(this._offset);this.reader.setPosition(t.lineCount,t.columnCount)}read(){let e;return this.peeked?(this.didPeek=!1,e=this.peeked):e=this.reader.read(),e&&(this._offset=(0,s.Ii)(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class h{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.lineIdx=0,this.line=null,this.lineCharOffset=0,this.lineTokens=null,this.lineTokenOffset=0,this.peekedToken=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}setPosition(e,t){e===this.lineIdx?(this.lineCharOffset=t,this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const e=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=(0,s.F_)(e.length),e}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;null===this.line&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=0===this.lineCharOffset?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;;){const n=this.lineTokens,o=n.getCount();let a=null;if(this.lineTokenOffset1e3)break}if(i>1500)break}const n=(0,s.av)(e,t,this.lineIdx,this.lineCharOffset);return new l(n,0,-1,a.tS.getEmpty(),new o.BH(n))}}class d{constructor(e,t){this.text=e,this._offset=s.xl,this.idx=0;const i=t.getRegExpStr()?new RegExp(t.getRegExpStr()+"|\n","g"):null,n=[];let r,c=0,h=0,d=0,u=0;const g=new Array;for(let e=0;e<60;e++)g.push(new l((0,s.Hg)(0,e),0,-1,a.tS.getEmpty(),new o.BH((0,s.Hg)(0,e))));const f=new Array;for(let e=0;e<60;e++)f.push(new l((0,s.Hg)(1,e),0,-1,a.tS.getEmpty(),new o.BH((0,s.Hg)(1,e))));if(i)for(i.lastIndex=0;null!==(r=i.exec(e));){const e=r.index,i=r[0];if("\n"===i)c++,h=e+1;else{if(d!==e){let t;if(u===c){const i=e-d;if(i{"use strict";i.d(t,{NL:()=>p,e9:()=>f});var n=i(3580),r=i(7301),o=i(3860),s=i(666),a=i(3033),l=i(3060),c=i(5935);function h(e){return e.toString()}class d{constructor(e,t,i,n,r,o,s){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=r,this.afterCursorState=o,this.changes=s}static create(e,t){const i=e.getAlternativeVersionId(),n=g(e);return new d(i,i,n,n,t,t,[])}append(e,t,i,n,r){t.length>0&&(this.changes=(0,a.b)(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=r}static _writeSelectionsSize(e){return 4+16*(e?e.length:0)}static _writeSelections(e,t,i){if(l.T4(e,t?t.length:0,i),i+=4,t)for(const n of t)l.T4(e,n.selectionStartLineNumber,i),i+=4,l.T4(e,n.selectionStartColumn,i),i+=4,l.T4(e,n.positionLineNumber,i),i+=4,l.T4(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=l.Ag(e,t);t+=4;for(let r=0;re.toString())).join(", ")}matchesResource(e){return(s.o.isUri(this.model)?this.model:this.model.uri).toString()===e.toString()}setModel(e){this.model=e}canAppend(e){return this.model===e&&this._data instanceof d}append(e,t,i,n,r){this._data instanceof d&&this._data.append(e,t,i,n,r)}close(){this._data instanceof d&&(this._data=this._data.serialize())}open(){this._data instanceof d||(this._data=d.deserialize(this._data))}undo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(s.o.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof d&&(this._data=this._data.serialize());const e=d.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof d&&(this._data=this._data.serialize()),this._data.byteLength+168}}function g(e){return"\n"===e.getEOL()?0:1}function f(e){return!!e&&(e instanceof u||e instanceof class{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const e of this._editStackElementsArr){const t=h(e.resource);this._editStackElementsMap.set(t,e)}this._delegate=null}get resources(){return this._editStackElementsArr.map((e=>e.resource))}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=h(e);return this._editStackElementsMap.has(t)}setModel(e){const t=h(s.o.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=h(e.uri);return!!this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).canAppend(e)}append(e,t,i,n,r){const o=h(e.uri);this._editStackElementsMap.get(o).append(e,t,i,n,r)}close(){this._isOpen=!1}open(){}undo(){this._isOpen=!1;for(const e of this._editStackElementsArr)e.undo()}redo(){for(const e of this._editStackElementsArr)e.redo()}heapSize(e){const t=h(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${(0,c.EZ)(t.resource)}: ${t}`);return`{${e.join(", ")}}`}})}class p{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);f(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(f(t)&&t.canAppend(this._model))return t;const i=new u(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],g(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),r=this._model.applyEdits(t,!0),o=p._computeCursorState(i,r),s=r.map(((e,t)=>({index:t,textChange:e.textChange})));return s.sort(((e,t)=>e.textChange.oldPosition===t.textChange.oldPosition?e.index-t.index:e.textChange.oldPosition-t.textChange.oldPosition)),n.append(this._model,s.map((e=>e.textChange)),g(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(e){return(0,r.dL)(e),null}}}},7671:(e,t,i)=>{"use strict";i.d(t,{W:()=>h,l:()=>c});var n=i(9488),r=i(5924),o=i(7988),s=i(4314),a=i(9616),l=i(5094);class c extends class{constructor(){this._isDisposed=!1}dispose(){this._isDisposed=!0}assertNotDisposed(){if(this._isDisposed)throw new Error("TextModelPart is disposed!")}}{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t}getLanguageConfiguration(e){return this.languageConfigurationService.getLanguageConfiguration(e)}_computeIndentLevel(e){return(0,a.q)(this.textModel.getLineContent(e+1),this.textModel.getOptions().tabSize)}getActiveIndentGuide(e,t,i){this.assertNotDisposed();const n=this.textModel.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(r&&r.offSide);let s=-2,a=-1,l=-2,c=-1;const h=e=>{if(-1!==s&&(-2===s||s>e-1)){s=-1,a=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){s=t,a=e;break}}}if(-2===l){l=-1,c=-1;for(let t=e;t=0){l=t,c=e;break}}}};let d=-2,u=-1,g=-2,f=-1;const p=e=>{if(-2===d){d=-1,u=-1;for(let t=e-2;t>=0;t--){const e=this._computeIndentLevel(t);if(e>=0){d=t,u=e;break}}}if(-1!==g&&(-2===g||g=0){g=t,f=e;break}}}};let m=0,_=!0,v=0,b=!0,y=0,w=0;for(let r=0;_||b;r++){const s=e-r,g=e+r;r>1&&(s<1||s1&&(g>n||g>i)&&(b=!1),r>5e4&&(_=!1,b=!1);let C=-1;if(_&&s>=1){const e=this._computeIndentLevel(s-1);e>=0?(l=s-1,c=e,C=Math.ceil(e/this.textModel.getOptions().indentSize)):(h(s),C=this._getIndentLevelForWhitespaceLine(o,a,c))}let x=-1;if(b&&g<=n){const e=this._computeIndentLevel(g-1);e>=0?(d=g-1,u=e,x=Math.ceil(e/this.textModel.getOptions().indentSize)):(p(g),x=this._getIndentLevelForWhitespaceLine(o,u,f))}if(0!==r){if(1===r){if(g<=n&&x>=0&&w+1===x){_=!1,m=g,v=g,y=x;continue}if(s>=1&&C>=0&&C-1===w){b=!1,m=s,v=s,y=C;continue}if(m=e,v=e,y=w,0===y)return{startLineNumber:m,endLineNumber:v,indent:y}}_&&(C>=y?m=s:_=!1),b&&(x>=y?v=g:b=!1)}else w=C}return{startLineNumber:m,endLineNumber:v,indent:y}}getLinesBracketGuides(e,t,i,o){var a,c,d,u,g;const f=[],p=this.textModel.bracketPairs.getBracketPairsInRangeWithMinIndentation(new s.e(e,1,t,this.textModel.getLineMaxColumn(t)));let m;if(i&&p.length>0){const r=e<=i.lineNumber&&i.lineNumber<=t?p.filter((e=>s.e.strictContainsPosition(e.range,i))):this.textModel.bracketPairs.getBracketPairsInRange(s.e.fromPositions(i));m=null===(a=(0,n.dF)(r,(e=>e.range.startLineNumber!==e.range.endLineNumber)))||void 0===a?void 0:a.range}const _=new n.H9(p),v=new Array,b=new Array,y=new h;for(let i=e;i<=t;i++){let e=new Array;b.length>0&&(e=e.concat(b),b.length=0),f.push(e);for(const e of _.takeWhile((e=>e.openingBracketRange.startLineNumber<=i))||[]){if(e.range.startLineNumber===e.range.endLineNumber)continue;const t=Math.min(this.getVisibleColumnFromPosition(e.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition(null!==(d=null===(c=e.closingBracketRange)||void 0===c?void 0:c.getStartPosition())&&void 0!==d?d:e.range.getEndPosition()),e.minVisibleColumnIndentation+1);let i=!1;e.closingBracketRange&&r.LC(this.textModel.getLineContent(e.closingBracketRange.startLineNumber))=0;n--){const r=v[n];if(!r)continue;const s=o.highlightActive&&m&&r.bracketPair.range.equalsRange(m),a=y.getInlineClassNameOfLevel(r.nestingLevel)+(s?" "+y.activeClassName:"");(s||o.includeInactive)&&r.renderHorizontalEndLineAtTheBottom&&r.end.lineNumber===i+1&&b.push(new l.UO(r.guideVisibleColumn,a,null)),r.end.lineNumber<=i||r.start.lineNumber>=i||r.guideVisibleColumn>=t&&!s||(t=r.guideVisibleColumn,(s||o.includeInactive)&&e.push(new l.UO(r.guideVisibleColumn,a,null)))}e.sort(((e,t)=>e.visibleColumn-t.visibleColumn))}return f}getVisibleColumnFromPosition(e){return o.i.visibleColumnFromColumn(this.textModel.getLineContent(e.lineNumber),e.column,this.textModel.getOptions().tabSize)+1}getLinesIndentGuides(e,t){this.assertNotDisposed();const i=this.textModel.getLineCount();if(e<1||e>i)throw new Error("Illegal value for startLineNumber");if(t<1||t>i)throw new Error("Illegal value for endLineNumber");const n=this.textModel.getOptions(),r=this.getLanguageConfiguration(this.textModel.getLanguageId()).foldingRules,o=Boolean(r&&r.offSide),s=new Array(t-e+1);let a=-2,l=-1,c=-2,h=-1;for(let r=e;r<=t;r++){const t=r-e,d=this._computeIndentLevel(r-1);if(d>=0)a=r-1,l=d,s[t]=Math.ceil(d/n.indentSize);else{if(-2===a){a=-1,l=-1;for(let e=r-2;e>=0;e--){const t=this._computeIndentLevel(e);if(t>=0){a=e,l=t;break}}}if(-1!==c&&(-2===c||c=0){c=e,h=t;break}}}s[t]=this._getIndentLevelForWhitespaceLine(o,l,h)}}return s}_getIndentLevelForWhitespaceLine(e,t,i){const n=this.textModel.getOptions();return-1===t||-1===i?0:t{"use strict";i.d(t,{Ck:()=>s,oQ:()=>o});var n=i(9488),r=i(5427);class o{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=(0,r.A)(e);const i=this.values,n=this.prefixSum,o=t.length;return 0!==o&&(this.values=new Uint32Array(i.length+o),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+o),this.values.set(t,e),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,t){return e=(0,r.A)(e),t=(0,r.A)(t),this.values[e]!==t&&(this.values[e]=t,e-1=i.length)return!1;const o=i.length-e;return t>=o&&(t=o),0!==t&&(this.values=new Uint32Array(i.length-t),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e+t),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return 0===this.values.length?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=(0,r.A)(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;0===t&&(this.prefixSum[0]=this.values[0],t++),e>=this.values.length&&(e=this.values.length-1);for(let i=t;i<=e;i++)this.prefixSum[i]=this.prefixSum[i-1]+this.values[i];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let t=0,i=this.values.length-1,n=0,r=0,o=0;for(;t<=i;)if(n=t+(i-t)/2|0,r=this.prefixSum[n],o=r-this.values[n],e=r))break;t=n+1}return new a(n,e-o)}}class s{constructor(e){this._values=e,this._isValid=!1,this._validEndIndex=-1,this._prefixSum=[],this._indexBySum=[]}getTotalSum(){return this._ensureValid(),this._indexBySum.length}getPrefixSum(e){return this._ensureValid(),0===e?0:this._prefixSum[e-1]}getIndexOf(e){this._ensureValid();const t=this._indexBySum[e],i=t>0?this._prefixSum[t-1]:0;return new a(t,e-i)}removeValues(e,t){this._values.splice(e,t),this._invalidate(e)}insertValues(e,t){this._values=(0,n.Zv)(this._values,e,t),this._invalidate(e)}_invalidate(e){this._isValid=!1,this._validEndIndex=Math.min(this._validEndIndex,e-1)}_ensureValid(){if(!this._isValid){for(let e=this._validEndIndex+1,t=this._values.length;e0?this._prefixSum[e-1]:0;this._prefixSum[e]=i+t;for(let n=0;n{"use strict";i.d(t,{HS:()=>yt,qx:()=>wt,yO:()=>ut});var n=i(9488),r=i(1264),o=i(7301),s=i(4669),a=i(5976),l=i(5924),c=i(666),h=i(187),d=i(4314),u=i(3860),g=i(4973);class f{constructor(e,t,i){this.range=e,this.nestingLevel=t,this.isInvalid=i}}class p extends class{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}{constructor(e,t,i,n,r){super(e,t,i,n),this.minVisibleColumnIndentation=r}}var m=i(2442),_=i(5382),v=i(5035),b=i(3883),y=i(1761),w=i(6735);class C extends a.JT{constructor(e,t){if(super(),this.textModel=e,this.getLanguageConfiguration=t,this.didChangeEmitter=new s.Q5,this.denseKeyProvider=new y.FE,this.brackets=new _.Z(this.denseKeyProvider,this.getLanguageConfiguration),this.onDidChange=this.didChangeEmitter.event,0===e.backgroundTokenizationState){const e=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageId()),t=new w.g(this.textModel.getValue(),e);this.initialAstWithoutTokens=(0,b.w)(t,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else 2===e.backgroundTokenizationState?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):1===e.backgroundTokenizationState&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleDidChangeBackgroundTokenizationState(){if(2===this.textModel.backgroundTokenizationState){const e=void 0===this.initialAstWithoutTokens;this.initialAstWithoutTokens=void 0,e||this.didChangeEmitter.fire()}}handleDidChangeTokens({ranges:e}){const t=e.map((e=>new m.Q((0,v.Hg)(e.fromLineNumber-1,0),(0,v.Hg)(e.toLineNumber,0),(0,v.Hg)(e.toLineNumber-e.fromLineNumber+1,0))));this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeEmitter.fire()}handleContentChanged(e){const t=e.changes.map((e=>{const t=d.e.lift(e.range);return new m.Q((0,v.PZ)(t.getStartPosition()),(0,v.PZ)(t.getEndPosition()),(0,v.oR)(e.text))})).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t,r=new w.xH(this.textModel,this.brackets);return(0,b.w)(r,e,n,i)}getBracketsInRange(e){const t=(0,v.Hg)(e.startLineNumber-1,e.startColumn-1),i=(0,v.Hg)(e.endLineNumber-1,e.endColumn-1),n=new Array,r=this.initialAstWithoutTokens||this.astWithTokens;return x(r,v.xl,r.length,t,i,n),n}getBracketPairsInRange(e,t){const i=new Array,n=(0,v.PZ)(e.getStartPosition()),r=(0,v.PZ)(e.getEndPosition()),o=this.initialAstWithoutTokens||this.astWithTokens,s=new S(i,t,this.textModel);return k(o,v.xl,o.length,n,r,s),i}}function x(e,t,i,n,r,o,s=0){if(4===e.kind)for(const a of e.children)i=(0,v.Ii)(t,a.length),(0,v.By)(t,r)&&(0,v.Zq)(i,n)&&x(a,t,i,n,r,o,s),t=i;else if(2===e.kind){s++;{const a=e.openingBracket;if(i=(0,v.Ii)(t,a.length),(0,v.By)(t,r)&&(0,v.Zq)(i,n)){const n=(0,v.Qw)(t,i);o.push(new f(n,s-1,!e.closingBracket))}t=i}if(e.child){const a=e.child;i=(0,v.Ii)(t,a.length),(0,v.By)(t,r)&&(0,v.Zq)(i,n)&&x(a,t,i,n,r,o,s),t=i}if(e.closingBracket){const a=e.closingBracket;if(i=(0,v.Ii)(t,a.length),(0,v.By)(t,r)&&(0,v.Zq)(i,n)){const e=(0,v.Qw)(t,i);o.push(new f(e,s-1,!1))}t=i}}else if(3===e.kind){const e=(0,v.Qw)(t,i);o.push(new f(e,s-1,!0))}else if(1===e.kind){const e=(0,v.Qw)(t,i);o.push(new f(e,s-1,!1))}}class S{constructor(e,t,i){this.result=e,this.includeMinIndentation=t,this.textModel=i}}function k(e,t,i,n,r,o,s=0){var a;if(2===e.kind){const n=(0,v.Ii)(t,e.openingBracket.length);let r=-1;o.includeMinIndentation&&(r=e.computeMinIndentation(t,o.textModel)),o.result.push(new p((0,v.Qw)(t,i),(0,v.Qw)(t,n),e.closingBracket?(0,v.Qw)((0,v.Ii)(n,(null===(a=e.child)||void 0===a?void 0:a.length)||v.xl),i):void 0,s,r)),s++}let l=t;for(const t of e.children){const e=l;l=(0,v.Ii)(l,t.length),(0,v.By)(e,r)&&(0,v.By)(n,l)&&k(t,e,l,n,r,o,s)}}var L=i(9111),N=i(4302);class E extends a.JT{constructor(e,t){super(),this.textModel=e,this.languageConfigurationService=t,this.bracketPairsTree=this._register(new a.XK),this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.bracketsRequested=!1,this._register(this.languageConfigurationService.onDidChange((e=>{var t;e.languageId&&!(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.didLanguageChange(e.languageId))||(this.bracketPairsTree.clear(),this.updateBracketPairsTree())})))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}handleDidChangeOptions(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeLanguage(e){this.bracketPairsTree.clear(),this.updateBracketPairsTree()}handleDidChangeContent(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleContentChanged(e)}handleDidChangeBackgroundTokenizationState(){var e;null===(e=this.bracketPairsTree.value)||void 0===e||e.object.handleDidChangeBackgroundTokenizationState()}handleDidChangeTokens(e){var t;null===(t=this.bracketPairsTree.value)||void 0===t||t.object.handleDidChangeTokens(e)}updateBracketPairsTree(){if(this.bracketsRequested&&this.isDocumentSupported){if(!this.bracketPairsTree.value){const i=new a.SL;this.bracketPairsTree.value=(e=i.add(new C(this.textModel,(e=>this.languageConfigurationService.getLanguageConfiguration(e)))),t=i,{object:e,dispose:()=>null==t?void 0:t.dispose()}),i.add(this.bracketPairsTree.value.object.onDidChange((e=>this.onDidChangeEmitter.fire(e)))),this.onDidChangeEmitter.fire()}}else this.bracketPairsTree.value&&(this.bracketPairsTree.clear(),this.onDidChangeEmitter.fire());var e,t}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!1))||[]}getBracketPairsInRangeWithMinIndentation(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketPairsInRange(e,!0))||[]}getBracketsInRange(e){var t;return this.bracketsRequested=!0,this.updateBracketPairsTree(),(null===(t=this.bracketPairsTree.value)||void 0===t?void 0:t.object.getBracketsInRange(e))||[]}findMatchingBracketUp(e,t,i){const n=e.toLowerCase(),r=this.textModel.validatePosition(t),o=this.textModel.getLanguageIdAtPosition(r.lineNumber,r.column),s=this.languageConfigurationService.getLanguageConfiguration(o).brackets;if(!s)return null;const a=s.textIsBracket[n];return a?T(this._findMatchingBracketUp(a,r,D(i))):null}matchBracket(e,t){const i=D(t);return this._matchBracket(this.textModel.validatePosition(e),i)}_establishBracketSearchOffsets(e,t,i,n){const r=t.getCount(),o=t.getLanguageId(n);let s=Math.max(0,e.column-1-i.maxBracketLength);for(let e=n-1;e>=0;e--){const i=t.getEndOffset(e);if(i<=s)break;if((0,L.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==o){s=i;break}}let a=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let e=n+1;e=a)break;if((0,L.Bu)(t.getStandardTokenType(e))||t.getLanguageId(e)!==o){a=i;break}}return{searchStartOffset:s,searchEndOffset:a}}_matchBracket(e,t){const i=e.lineNumber,n=this.textModel.getLineTokens(i),r=this.textModel.getLineContent(i),o=n.findTokenIndexAtOffset(e.column-1);if(o<0)return null;const s=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(o)).brackets;if(s&&!(0,L.Bu)(n.getStandardTokenType(o))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,s,o),c=null;for(;;){const n=N.Vr.findNextBracketInRange(s.forwardRegex,i,r,a,l);if(!n)break;if(n.startColumn<=e.column&&e.column<=n.endColumn){const e=r.substring(n.startColumn-1,n.endColumn-1).toLowerCase(),i=this._matchFoundBracket(n,s.textIsBracket[e],s.textIsOpenBracket[e],t);if(i){if(i instanceof A)return null;c=i}}a=n.endColumn-1}if(c)return c}if(o>0&&n.getStartOffset(o)===e.column-1){const s=o-1,a=this.languageConfigurationService.getLanguageConfiguration(n.getLanguageId(s)).brackets;if(a&&!(0,L.Bu)(n.getStandardTokenType(s))){const{searchStartOffset:o,searchEndOffset:l}=this._establishBracketSearchOffsets(e,n,a,s),c=N.Vr.findPrevBracketInRange(a.reversedRegex,i,r,o,l);if(c&&c.startColumn<=e.column&&e.column<=c.endColumn){const e=r.substring(c.startColumn-1,c.endColumn-1).toLowerCase(),i=this._matchFoundBracket(c,a.textIsBracket[e],a.textIsOpenBracket[e],t);if(i)return i instanceof A?null:i}}}return null}_matchFoundBracket(e,t,i,n){if(!t)return null;const r=i?this._findMatchingBracketDown(t,e.getEndPosition(),n):this._findMatchingBracketUp(t,e.getStartPosition(),n);return r?r instanceof A?r:[e,r]:null}_findMatchingBracketUp(e,t,i){const n=e.languageId,r=e.reversedRegex;let o=-1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return A.INSTANCE;const c=N.Vr.findPrevBracketInRange(r,t,n,a,l);if(!c)break;const h=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?o++:e.isClose(h)&&o--,0===o)return c;l=c.startColumn-1}return null};for(let e=t.lineNumber;e>=1;e--){const i=this.textModel.getLineTokens(e),r=i.getCount(),o=this.textModel.getLineContent(e);let s=r-1,l=o.length,c=o.length;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;s>=0;s--){const t=i.getLanguageId(s)===n&&!(0,L.Bu)(i.getStandardTokenType(s));if(t)h?l=i.getStartOffset(s):(l=i.getStartOffset(s),c=i.getEndOffset(s));else if(h&&l!==c){const t=a(e,o,l,c);if(t)return t}h=t}if(h&&l!==c){const t=a(e,o,l,c);if(t)return t}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageId,r=e.forwardRegex;let o=1,s=0;const a=(t,n,a,l)=>{for(;;){if(i&&++s%100==0&&!i())return A.INSTANCE;const c=N.Vr.findNextBracketInRange(r,t,n,a,l);if(!c)break;const h=n.substring(c.startColumn-1,c.endColumn-1).toLowerCase();if(e.isOpen(h)?o++:e.isClose(h)&&o--,0===o)return c;a=c.endColumn-1}return null},l=this.textModel.getLineCount();for(let e=t.lineNumber;e<=l;e++){const i=this.textModel.getLineTokens(e),r=i.getCount(),o=this.textModel.getLineContent(e);let s=0,l=0,c=0;e===t.lineNumber&&(s=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1);let h=!0;for(;s=1;e--){const r=this.textModel.getLineTokens(e),o=r.getCount(),s=this.textModel.getLineContent(e);let a=o-1,l=s.length,c=s.length;if(e===t.lineNumber){a=r.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=r.getLanguageId(a);i!==e&&(i=e,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets)}let h=!0;for(;a>=0;a--){const t=r.getLanguageId(a);if(i!==t){if(n&&h&&l!==c){const t=N.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t);h=!1}i=t,n=this.languageConfigurationService.getLanguageConfiguration(i).brackets}const o=!!n&&!(0,L.Bu)(r.getStandardTokenType(a));if(o)h?l=r.getStartOffset(a):(l=r.getStartOffset(a),c=r.getEndOffset(a));else if(n&&h&&l!==c){const t=N.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}h=o}if(n&&h&&l!==c){const t=N.Vr.findPrevBracketInRange(n.reversedRegex,e,s,l,c);if(t)return this._toFoundBracket(n,t)}}return null}findNextBracket(e){const t=this.textModel.validatePosition(e),i=this.textModel.getLineCount();let n=null,r=null;for(let e=t.lineNumber;e<=i;e++){const i=this.textModel.getLineTokens(e),o=i.getCount(),s=this.textModel.getLineContent(e);let a=0,l=0,c=0;if(e===t.lineNumber){a=i.findTokenIndexAtOffset(t.column-1),l=t.column-1,c=t.column-1;const e=i.getLanguageId(a);n!==e&&(n=e,r=this.languageConfigurationService.getLanguageConfiguration(n).brackets)}let h=!0;for(;a{if(!o.has(e)){const i=[];for(let e=0,n=t?t.brackets.length:0;e{for(;;){if(i&&++l%100==0&&!i())return A.INSTANCE;const a=N.Vr.findNextBracketInRange(e.forwardRegex,t,n,r,o);if(!a)break;const c=n.substring(a.startColumn-1,a.endColumn-1).toLowerCase(),h=e.textIsBracket[c];if(h&&(h.isOpen(c)?s[h.index]++:h.isClose(c)&&s[h.index]--,-1===s[h.index]))return this._matchFoundBracket(a,h,!1,i);r=a.endColumn-1}return null};let h=null,d=null;for(let e=n.lineNumber;e<=r;e++){const t=this.textModel.getLineTokens(e),i=t.getCount(),r=this.textModel.getLineContent(e);let o=0,s=0,l=0;if(e===n.lineNumber){o=t.findTokenIndexAtOffset(n.column-1),s=n.column-1,l=n.column-1;const e=t.getLanguageId(o);h!==e&&(h=e,d=this.languageConfigurationService.getLanguageConfiguration(h).brackets,a(h,d))}let u=!0;for(;o!0;{const t=Date.now();return()=>Date.now()-t<=e}}class A{constructor(){this._searchCanceledBrand=void 0}}function T(e){return e instanceof A?null:e}A.INSTANCE=new A;var I=i(8625),M=i(7781);class O extends a.JT{constructor(e){super(),this.textModel=e,this.colorProvider=new R,this.onDidChangeEmitter=new s.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.colorizationOptions=e.getOptions().bracketPairColorizationOptions,this._register(e.bracketPairs.onDidChange((e=>{this.onDidChangeEmitter.fire()})))}handleDidChangeOptions(e){this.colorizationOptions=this.textModel.getOptions().bracketPairColorizationOptions}getDecorationsInRange(e,t,i){if(void 0===t)return[];if(!this.colorizationOptions.enabled)return[];const n=new Array,r=this.textModel.bracketPairs.getBracketsInRange(e);for(const e of r)n.push({id:`bracket${e.range.toString()}-${e.nestingLevel}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(e)},ownerId:0,range:e.range});return n}getAllDecorations(e,t){return void 0===e?[]:this.colorizationOptions.enabled?this.getDecorationsInRange(new d.e(1,1,this.textModel.getLineCount(),1),e,t):[]}}class R{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.nestingLevel)}getInlineClassNameOfLevel(e){return"bracket-highlighting-"+e%30}}(0,M.Ic)(((e,t)=>{const i=[I.zJ,I.Vs,I.CE,I.UP,I.r0,I.m1],n=new R;t.addRule(`.monaco-editor .${n.unexpectedClosingBracketClassName} { color: ${e.getColor(I.ts)}; }`);const r=i.map((t=>e.getColor(t))).filter((e=>!!e)).filter((e=>!e.isTransparent()));for(let e=0;e<30;e++){const i=r[e%r.length];t.addRule(`.monaco-editor .${n.getInlineClassNameOfLevel(e)} { color: ${i}; }`)}}));var P=i(5215),F=i(7671);class B{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function W(e,t,i,n,r){let o;for(r.spacesDiff=0,r.looksLikeAlignment=!1,o=0;o0&&a>0)return;if(l>0&&c>0)return;const h=Math.abs(a-c),d=Math.abs(s-l);if(0===h)return r.spacesDiff=d,void(d>0&&0<=l-1&&l-10?r++:p>1&&o++,W(s,a,d,f,h),h.looksLikeAlignment&&(!i||t!==h.spacesDiff))continue;const _=h.spacesDiff;_<=8&&c[_]++,s=d,a=f}let d=i;r!==o&&(d=r{const i=c[t];i>e&&(e=i,u=t)})),4===u&&c[4]>0&&c[2]>0&&c[2]>=c[4]/2&&(u=2)}return{insertSpaces:d,tabSize:u}}function z(e){return(1&e.metadata)>>>0}function H(e,t){e.metadata=254&e.metadata|t<<0}function j(e){return(2&e.metadata)>>>1==1}function U(e,t){e.metadata=253&e.metadata|(t?1:0)<<1}function $(e){return(4&e.metadata)>>>2==1}function K(e,t){e.metadata=251&e.metadata|(t?1:0)<<2}function q(e,t){e.metadata=231&e.metadata|t<<3}function G(e,t){e.metadata=223&e.metadata|(t?1:0)<<5}class Y{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,H(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,K(this,!1),q(this,1),G(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,U(this,!1)}reset(e,t,i,n){this.start=t,this.end=i,this.maxEnd=i,this.cachedVersionId=e,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=n}setOptions(e){this.options=e;const t=this.options.className;K(this,"squiggly-error"===t||"squiggly-warning"===t||"squiggly-info"===t),q(this,this.options.stickiness),G(this,this.options.collapseOnReplaceEdit)}setCachedOffsets(e,t,i){this.cachedVersionId!==i&&(this.range=null),this.cachedVersionId=i,this.cachedAbsoluteStart=e,this.cachedAbsoluteEnd=t}detach(){this.parent=null,this.left=null,this.right=null}}const Z=new Y(null,0,0);Z.parent=Z,Z.left=Z,Z.right=Z,H(Z,0);class Q{constructor(){this.root=Z,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,r){return this.root===Z?[]:function(e,t,i,n,r,o){let s=e.root,a=0,l=0,c=0,h=0;const d=[];let u=0;for(;s!==Z;)if(j(s))U(s.left,!1),U(s.right,!1),s===s.parent.right&&(a-=s.parent.delta),s=s.parent;else{if(!j(s.left)){if(l=a+s.maxEnd,li)U(s,!0);else{if(h=a+s.end,h>=t){s.setCachedOffsets(c,h,o);let e=!0;n&&s.ownerId&&s.ownerId!==n&&(e=!1),r&&$(s)&&(e=!1),e&&(d[u++]=s)}U(s,!0),s.right===Z||j(s.right)||(a+=s.delta,s=s.right)}}return U(e.root,!1),d}(this,e,t,i,n,r)}search(e,t,i){return this.root===Z?[]:function(e,t,i,n){let r=e.root,o=0,s=0,a=0;const l=[];let c=0;for(;r!==Z;){if(j(r)){U(r.left,!1),U(r.right,!1),r===r.parent.right&&(o-=r.parent.delta),r=r.parent;continue}if(r.left!==Z&&!j(r.left)){r=r.left;continue}s=o+r.start,a=o+r.end,r.setCachedOffsets(s,a,n);let e=!0;t&&r.ownerId&&r.ownerId!==t&&(e=!1),i&&$(r)&&(e=!1),e&&(l[c++]=r),U(r,!0),r.right===Z||j(r.right)||(o+=r.delta,r=r.right)}return U(e.root,!1),l}(this,e,t,i)}collectNodesFromOwner(e){return function(e,t){let i=e.root;const n=[];let r=0;for(;i!==Z;)j(i)?(U(i.left,!1),U(i.right,!1),i=i.parent):i.left===Z||j(i.left)?(i.ownerId===t&&(n[r++]=i),U(i,!0),i.right===Z||j(i.right)||(i=i.right)):i=i.left;return U(e.root,!1),n}(this,e)}collectNodesPostOrder(){return function(e){let t=e.root;const i=[];let n=0;for(;t!==Z;)j(t)?(U(t.left,!1),U(t.right,!1),t=t.parent):t.left===Z||j(t.left)?t.right===Z||j(t.right)?(i[n++]=t,U(t,!0)):t=t.right:t=t.left;return U(e.root,!1),i}(this)}insert(e){ee(this,e),this._normalizeDeltaIfNecessary()}delete(e){te(this,e),this._normalizeDeltaIfNecessary()}resolveNode(e,t){const i=e;let n=0;for(;e!==this.root;)e===e.parent.right&&(n+=e.parent.delta),e=e.parent;const r=i.start+n,o=i.end+n;i.setCachedOffsets(r,o,t)}acceptReplace(e,t,i,n){const r=function(e,t,i){let n=e.root,r=0,o=0,s=0,a=0;const l=[];let c=0;for(;n!==Z;)if(j(n))U(n.left,!1),U(n.right,!1),n===n.parent.right&&(r-=n.parent.delta),n=n.parent;else{if(!j(n.left)){if(o=r+n.maxEnd,oi?U(n,!0):(a=r+n.end,a>=t&&(n.setCachedOffsets(s,a,0),l[c++]=n),U(n,!0),n.right===Z||j(n.right)||(r+=n.delta,n=n.right))}return U(e.root,!1),l}(this,e,e+t);for(let e=0,t=r.length;ei?(r.start+=l,r.end+=l,r.delta+=l,(r.delta<-1073741824||r.delta>1073741824)&&(e.requestNormalizeDelta=!0),U(r,!0)):(U(r,!0),r.right===Z||j(r.right)||(o+=r.delta,r=r.right))}U(e.root,!1)}(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,s=r.length;oi)&&1!==n&&(2===n||t)}function J(e,t,i,n,r){const o=function(e){return(24&e.metadata)>>>3}(e),s=0===o||2===o,a=1===o||2===o,l=i-t,c=n,h=Math.min(l,c),d=e.start;let u=!1;const g=e.end;let f=!1;t<=d&&g<=i&&function(e){return(32&e.metadata)>>>5==1}(e)&&(e.start=t,u=!0,e.end=t,f=!0);{const e=r?1:l>0?2:0;!u&&X(d,s,t,e)&&(u=!0),!f&&X(g,a,t,e)&&(f=!0)}if(h>0&&!r){const e=l>c?2:0;!u&&X(d,s,t+h,e)&&(u=!0),!f&&X(g,a,t+h,e)&&(f=!0)}{const n=r?1:0;!u&&X(d,s,i,n)&&(e.start=t+c,u=!0),!f&&X(g,a,i,n)&&(e.end=t+c,f=!0)}const p=c-l;u||(e.start=Math.max(0,d+p)),f||(e.end=Math.max(0,g+p)),e.start>e.end&&(e.end=e.start)}function ee(e,t){if(e.root===Z)return t.parent=Z,t.left=Z,t.right=Z,H(t,0),e.root=t,e.root;!function(e,t){let i=0,n=e.root;const r=t.start,o=t.end;for(;;)if(s=r,a=o,l=n.start+i,c=n.end+i,(s===l?a-c:s-l)<0){if(n.left===Z){t.start-=i,t.end-=i,t.maxEnd-=i,n.left=t;break}n=n.left}else{if(n.right===Z){t.start-=i+n.delta,t.end-=i+n.delta,t.maxEnd-=i+n.delta,n.right=t;break}i+=n.delta,n=n.right}var s,a,l,c;t.parent=n,t.left=Z,t.right=Z,H(t,1)}(e,t),ae(t.parent);let i=t;for(;i!==e.root&&1===z(i.parent);)if(i.parent===i.parent.parent.left){const t=i.parent.parent.right;1===z(t)?(H(i.parent,0),H(t,0),H(i.parent.parent,1),i=i.parent.parent):(i===i.parent.right&&(i=i.parent,ne(e,i)),H(i.parent,0),H(i.parent.parent,1),re(e,i.parent.parent))}else{const t=i.parent.parent.left;1===z(t)?(H(i.parent,0),H(t,0),H(i.parent.parent,1),i=i.parent.parent):(i===i.parent.left&&(i=i.parent,re(e,i)),H(i.parent,0),H(i.parent.parent,1),ne(e,i.parent.parent))}return H(e.root,0),t}function te(e,t){let i,n;if(t.left===Z?(i=t.right,n=t,i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta):t.right===Z?(i=t.left,n=t):(n=function(e){for(;e.left!==Z;)e=e.left;return e}(t.right),i=n.right,i.start+=n.delta,i.end+=n.delta,i.delta+=n.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),n.start+=t.delta,n.end+=t.delta,n.delta=t.delta,(n.delta<-1073741824||n.delta>1073741824)&&(e.requestNormalizeDelta=!0)),n===e.root)return e.root=i,H(i,0),t.detach(),ie(),se(i),void(e.root.parent=Z);const r=1===z(n);if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?i.parent=n.parent:(n.parent===t?i.parent=n:i.parent=n.parent,n.left=t.left,n.right=t.right,n.parent=t.parent,H(n,z(t)),t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==Z&&(n.left.parent=n),n.right!==Z&&(n.right.parent=n)),t.detach(),r)return ae(i.parent),n!==t&&(ae(n),ae(n.parent)),void ie();let o;for(ae(i),ae(i.parent),n!==t&&(ae(n),ae(n.parent));i!==e.root&&0===z(i);)i===i.parent.left?(o=i.parent.right,1===z(o)&&(H(o,0),H(i.parent,1),ne(e,i.parent),o=i.parent.right),0===z(o.left)&&0===z(o.right)?(H(o,1),i=i.parent):(0===z(o.right)&&(H(o.left,0),H(o,1),re(e,o),o=i.parent.right),H(o,z(i.parent)),H(i.parent,0),H(o.right,0),ne(e,i.parent),i=e.root)):(o=i.parent.left,1===z(o)&&(H(o,0),H(i.parent,1),re(e,i.parent),o=i.parent.left),0===z(o.left)&&0===z(o.right)?(H(o,1),i=i.parent):(0===z(o.left)&&(H(o.right,0),H(o,1),ne(e,o),o=i.parent.left),H(o,z(i.parent)),H(i.parent,0),H(o.left,0),re(e,i.parent),i=e.root));H(i,0),ie()}function ie(){Z.parent=Z,Z.delta=0,Z.start=0,Z.end=0}function ne(e,t){const i=t.right;i.delta+=t.delta,(i.delta<-1073741824||i.delta>1073741824)&&(e.requestNormalizeDelta=!0),i.start+=t.delta,i.end+=t.delta,t.right=i.left,i.left!==Z&&(i.left.parent=t),i.parent=t.parent,t.parent===Z?e.root=i:t===t.parent.left?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i,se(t),se(i)}function re(e,t){const i=t.left;t.delta-=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(e.requestNormalizeDelta=!0),t.start-=i.delta,t.end-=i.delta,t.left=i.right,i.right!==Z&&(i.right.parent=t),i.parent=t.parent,t.parent===Z?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i,se(t),se(i)}function oe(e){let t=e.end;if(e.left!==Z){const i=e.left.maxEnd;i>t&&(t=i)}if(e.right!==Z){const i=e.right.maxEnd+e.delta;i>t&&(t=i)}return t}function se(e){e.maxEnd=oe(e)}function ae(e){for(;e!==Z;){const t=oe(e);if(e.maxEnd===t)return;e.maxEnd=t,e=e.parent}}class le{constructor(e,t){this.piece=e,this.color=t,this.size_left=0,this.lf_left=0,this.parent=this,this.left=this,this.right=this}next(){if(this.right!==ce)return he(this.right);let e=this;for(;e.parent!==ce&&e.parent.left!==e;)e=e.parent;return e.parent===ce?ce:e.parent}prev(){if(this.left!==ce)return de(this.left);let e=this;for(;e.parent!==ce&&e.parent.right!==e;)e=e.parent;return e.parent===ce?ce:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const ce=new le(null,0);function he(e){for(;e.left!==ce;)e=e.left;return e}function de(e){for(;e.right!==ce;)e=e.right;return e}function ue(e){return e===ce?0:e.size_left+e.piece.length+ue(e.right)}function ge(e){return e===ce?0:e.lf_left+e.piece.lineFeedCnt+ge(e.right)}function fe(){ce.parent=ce}function pe(e,t){const i=t.right;i.size_left+=t.size_left+(t.piece?t.piece.length:0),i.lf_left+=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),t.right=i.left,i.left!==ce&&(i.left.parent=t),i.parent=t.parent,t.parent===ce?e.root=i:t.parent.left===t?t.parent.left=i:t.parent.right=i,i.left=t,t.parent=i}function me(e,t){const i=t.left;t.left=i.right,i.right!==ce&&(i.right.parent=t),i.parent=t.parent,t.size_left-=i.size_left+(i.piece?i.piece.length:0),t.lf_left-=i.lf_left+(i.piece?i.piece.lineFeedCnt:0),t.parent===ce?e.root=i:t===t.parent.right?t.parent.right=i:t.parent.left=i,i.right=t,t.parent=i}function _e(e,t){let i,n;if(t.left===ce?(n=t,i=n.right):t.right===ce?(n=t,i=n.left):(n=he(t.right),i=n.right),n===e.root)return e.root=i,i.color=0,t.detach(),fe(),void(e.root.parent=ce);const r=1===n.color;if(n===n.parent.left?n.parent.left=i:n.parent.right=i,n===t?(i.parent=n.parent,ye(e,i)):(n.parent===t?i.parent=n:i.parent=n.parent,ye(e,i),n.left=t.left,n.right=t.right,n.parent=t.parent,n.color=t.color,t===e.root?e.root=n:t===t.parent.left?t.parent.left=n:t.parent.right=n,n.left!==ce&&(n.left.parent=n),n.right!==ce&&(n.right.parent=n),n.size_left=t.size_left,n.lf_left=t.lf_left,ye(e,n)),t.detach(),i.parent.left===i){const t=ue(i),n=ge(i);if(t!==i.parent.size_left||n!==i.parent.lf_left){const r=t-i.parent.size_left,o=n-i.parent.lf_left;i.parent.size_left=t,i.parent.lf_left=n,be(e,i.parent,r,o)}}if(ye(e,i.parent),r)return void fe();let o;for(;i!==e.root&&0===i.color;)i===i.parent.left?(o=i.parent.right,1===o.color&&(o.color=0,i.parent.color=1,pe(e,i.parent),o=i.parent.right),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.right.color&&(o.left.color=0,o.color=1,me(e,o),o=i.parent.right),o.color=i.parent.color,i.parent.color=0,o.right.color=0,pe(e,i.parent),i=e.root)):(o=i.parent.left,1===o.color&&(o.color=0,i.parent.color=1,me(e,i.parent),o=i.parent.left),0===o.left.color&&0===o.right.color?(o.color=1,i=i.parent):(0===o.left.color&&(o.right.color=0,o.color=1,pe(e,o),o=i.parent.left),o.color=i.parent.color,i.parent.color=0,o.left.color=0,me(e,i.parent),i=e.root));i.color=0,fe()}function ve(e,t){for(ye(e,t);t!==e.root&&1===t.parent.color;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.right&&pe(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,me(e,t.parent.parent))}else{const i=t.parent.parent.left;1===i.color?(t.parent.color=0,i.color=0,t.parent.parent.color=1,t=t.parent.parent):(t===t.parent.left&&me(e,t=t.parent),t.parent.color=0,t.parent.parent.color=1,pe(e,t.parent.parent))}e.root.color=0}function be(e,t,i,n){for(;t!==e.root&&t!==ce;)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}function ye(e,t){let i=0,n=0;if(t!==e.root){for(;t!==e.root&&t===t.parent.right;)t=t.parent;if(t!==e.root)for(i=ue((t=t.parent).left)-t.size_left,n=ge(t.left)-t.lf_left,t.size_left+=i,t.lf_left+=n;t!==e.root&&(0!==i||0!==n);)t.parent.left===t&&(t.parent.size_left+=i,t.parent.lf_left+=n),t=t.parent}}ce.parent=ce,ce.left=ce,ce.right=ce,ce.color=0;var we=i(7277);const Ce=65535;function xe(e){let t;return t=e[e.length-1]<65536?new Uint16Array(e.length):new Uint32Array(e.length),t.set(e,0),t}class Se{constructor(e,t,i,n,r){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=r}}function ke(e,t=!0){const i=[0];let n=1;for(let t=0,r=e.length;t(e!==ce&&this._pieces.push(e.piece),!0)))}read(){return 0===this._pieces.length?0===this._index?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:0===this._index?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class De{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartOffset<=e&&i.nodeStartOffset+i.node.piece.length>=e)return i}return null}get2(e){for(let t=this._cache.length-1;t>=0;t--){const i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1;const i=this._cache;for(let n=0;n=e)&&(i[n]=null,t=!0)}if(t){const e=[];for(const t of i)null!==t&&e.push(t);this._cache=e}}}class Ae{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Ne("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=ce,this._lineCnt=1,this._length=0,this._EOL=t,this._EOLLength=t.length,this._EOLNormalized=i;let n=null;for(let t=0,i=e.length;t0){e[t].lineStarts||(e[t].lineStarts=ke(e[t].buffer));const i=new Le(t+1,{line:0,column:0},{line:e[t].lineStarts.length-1,column:e[t].buffer.length-e[t].lineStarts[e[t].lineStarts.length-1]},e[t].lineStarts.length-1,e[t].buffer.length);this._buffers.push(e[t]),n=this.rbInsertRight(n,i)}this._searchCache=new De(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){const t=65535-Math.floor(21845),i=2*t;let n="",r=0;const o=[];if(this.iterate(this.root,(s=>{const a=this.getNodeContent(s),l=a.length;if(r<=t||r+l0){const t=n.replace(/\r\n|\r|\n/g,e);o.push(new Ne(t,ke(t)))}this.create(o,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new Ee(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==ce;)if(n.left!==ce&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,i+(this.getAccumulatedValue(n,e-n.lf_left-2)+t-1);e-=n.lf_left+n.piece.lineFeedCnt,i+=n.size_left+n.piece.length,n=n.right}return i}getPositionAt(e){e=Math.floor(e),e=Math.max(0,e);let t=this.root,i=0;const n=e;for(;t!==ce;)if(0!==t.size_left&&t.size_left>=e)t=t.left;else{if(t.size_left+t.piece.length>=e){const r=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+r.index,0===r.index){const e=n-this.getOffsetAt(i+1,1);return new h.L(i+1,e+1)}return new h.L(i+1,r.remainder+1)}if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===ce){const t=n-e-this.getOffsetAt(i+1,1);return new h.L(i+1,t+1)}t=t.right}return new h.L(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";const i=this.nodeAt2(e.startLineNumber,e.startColumn),n=this.nodeAt2(e.endLineNumber,e.endColumn),r=this.getValueInRange2(i,n);return t?t===this._EOL&&this._EOLNormalized&&t===this.getEOL()&&this._EOLNormalized?r:r.replace(/\r\n|\r|\n/g,t):r}getValueInRange2(e,t){if(e.node===t.node){const i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n.substring(r+e.remainder,r+t.remainder)}let i=e.node;const n=this._buffers[i.piece.bufferIndex].buffer,r=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);let o=n.substring(r+e.remainder,r+i.piece.length);for(i=i.next();i!==ce;){const e=this._buffers[i.piece.bufferIndex].buffer,n=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=e.substring(n,n+t.remainder);break}o+=e.substr(n,i.piece.length),i=i.next()}return o}getLinesContent(){const e=[];let t=0,i="",n=!1;return this.iterate(this.root,(r=>{if(r===ce)return!0;const o=r.piece;let s=o.length;if(0===s)return!0;const a=this._buffers[o.bufferIndex].buffer,l=this._buffers[o.bufferIndex].lineStarts,c=o.start.line,h=o.end.line;let d=l[c]+o.start.column;if(n&&(10===a.charCodeAt(d)&&(d++,s--),e[t++]=i,i="",n=!1,0===s))return!0;if(c===h)return this._EOLNormalized||13!==a.charCodeAt(d+s-1)?i+=a.substr(d,s):(n=!0,i+=a.substr(d,s-1)),!0;i+=this._EOLNormalized?a.substring(d,Math.max(d,l[c+1]-this._EOLLength)):a.substring(d,l[c+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let n=c+1;ne+f,t.reset(0)):(v=u.buffer,b=e=>e,t.reset(f));do{if(m=t.next(v),m){if(b(m.index)>=p)return c;this.positionInBuffer(e,b(m.index)-g,_);const t=this.getLineFeedCnt(e.piece.bufferIndex,r,_),o=_.line===r.line?_.column-r.column+n:_.column+1,s=o+m[0].length;if(h[c++]=(0,we.iE)(new d.e(i+t,o,i+t,s),m,a),b(m.index)+m[0].length>=p)return c;if(c>=l)return c}}while(m);return c}findMatchesLineByLine(e,t,i,n){const r=[];let o=0;const s=new we.sz(t.wordSeparators,t.regex);let a=this.nodeAt2(e.startLineNumber,e.startColumn);if(null===a)return[];const l=this.nodeAt2(e.endLineNumber,e.endColumn);if(null===l)return[];let c=this.positionInBuffer(a.node,a.remainder);const h=this.positionInBuffer(l.node,l.remainder);if(a.node===l.node)return this.findMatchesInNode(a.node,s,e.startLineNumber,e.startColumn,c,h,t,i,n,o,r),r;let d=e.startLineNumber,u=a.node;for(;u!==l.node;){const l=this.getLineFeedCnt(u.piece.bufferIndex,c,u.piece.end);if(l>=1){const a=this._buffers[u.piece.bufferIndex].lineStarts,h=this.offsetInBuffer(u.piece.bufferIndex,u.piece.start),g=a[c.line+l],f=d===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(u,s,d,f,c,this.positionInBuffer(u,g-h),t,i,n,o,r),o>=n)return r;d+=l}const h=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){const a=this.getLineContent(d).substring(h,e.endColumn-1);return o=this._findMatchesInLine(t,s,a,e.endLineNumber,h,o,r,i,n),r}if(o=this._findMatchesInLine(t,s,this.getLineContent(d).substr(h),d,h,o,r,i,n),o>=n)return r;d++,a=this.nodeAt2(d,1),u=a.node,c=this.positionInBuffer(a.node,a.remainder)}if(d===e.endLineNumber){const a=d===e.startLineNumber?e.startColumn-1:0,l=this.getLineContent(d).substring(a,e.endColumn-1);return o=this._findMatchesInLine(t,s,l,e.endLineNumber,a,o,r,i,n),r}const g=d===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(l.node,s,d,g,c,h,t,i,n,o,r),r}_findMatchesInLine(e,t,i,n,r,o,s,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const t=e.simpleSearch,a=t.length,h=i.length;let u=-a;for(;-1!==(u=i.indexOf(t,u+a));)if((!c||(0,we.cM)(c,i,h,u,a))&&(s[o++]=new g.tk(new d.e(n,u+1+r,n,u+1+a+r),null),o>=l))return o;return o}let h;t.reset(0);do{if(h=t.next(i),h&&(s[o++]=(0,we.iE)(new d.e(n,h.index+1+r,n,h.index+1+h[0].length+r),h,a),o>=l))return o}while(h);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==ce){const{node:i,remainder:n,nodeStartOffset:r}=this.nodeAt(e),o=i.piece,s=o.bufferIndex,a=this.positionInBuffer(i,n);if(0===i.piece.bufferIndex&&o.end.line===this._lastChangeBufferPos.line&&o.end.column===this._lastChangeBufferPos.column&&r+o.length===e&&t.lengthe){const e=[];let r=new Le(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),this.offsetInBuffer(s,o.end)-this.offsetInBuffer(s,a));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&10===this.nodeCharCodeAt(i,n)){const e={line:r.start.line+1,column:0};r=new Le(r.bufferIndex,e,r.end,this.getLineFeedCnt(r.bufferIndex,e,r.end),r.length-1),t+="\n"}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(13===this.nodeCharCodeAt(i,n-1)){const r=this.positionInBuffer(i,n-1);this.deleteNodeTail(i,r),t="\r"+t,0===i.piece.length&&e.push(i)}else this.deleteNodeTail(i,a);else this.deleteNodeTail(i,a);const l=this.createNewPieces(t);r.length>0&&this.rbInsertRight(i,r);let c=i;for(let e=0;e=0;e--)r=this.rbInsertLeft(r,n[e]);this.validateCRLFWithPrevNode(r),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+="\n");const i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]);let r=n;for(let e=1;e=h))break;a=c+1}return i?(i.line=c,i.column=s-d,null):{line:c,column:s-d}}getLineFeedCnt(e,t,i){if(0===i.column)return i.line-t.line;const n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;const r=n[i.line+1],o=n[i.line]+i.column;if(r>o+1)return i.line-t.line;const s=o-1;return 13===this._buffers[e].buffer.charCodeAt(s)?i.line-t.line+1:i.line-t.line}offsetInBuffer(e,t){return this._buffers[e].lineStarts[t.line]+t.column}deleteNodes(e){for(let t=0;tCe){const t=[];for(;e.length>Ce;){const i=e.charCodeAt(65534);let n;13===i||i>=55296&&i<=56319?(n=e.substring(0,65534),e=e.substring(65534)):(n=e.substring(0,Ce),e=e.substring(Ce));const r=ke(n);t.push(new Le(this._buffers.length,{line:0,column:0},{line:r.length-1,column:n.length-r[r.length-1]},r.length-1,n.length)),this._buffers.push(new Ne(n,r))}const i=ke(e);return t.push(new Le(this._buffers.length,{line:0,column:0},{line:i.length-1,column:e.length-i[i.length-1]},i.length-1,e.length)),this._buffers.push(new Ne(e,i)),t}let t=this._buffers[0].buffer.length;const i=ke(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&0!==t&&this.startWithLF(e)&&this.endWithCR(this._buffers[0].buffer)){this._lastChangeBufferPos={line:this._lastChangeBufferPos.line,column:this._lastChangeBufferPos.column+1},n=this._lastChangeBufferPos;for(let e=0;e=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const n=this.getAccumulatedValue(i,e-i.lf_left-2),s=this.getAccumulatedValue(i,e-i.lf_left-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return r+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:r,nodeStartLineNumber:o-(e-1-i.lf_left)}),a.substring(l+n,l+s-t)}if(i.lf_left+i.piece.lineFeedCnt===e-1){const t=this.getAccumulatedValue(i,e-i.lf_left-2),r=this._buffers[i.piece.bufferIndex].buffer,o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=r.substring(o+t,o+i.piece.length);break}e-=i.lf_left+i.piece.lineFeedCnt,r+=i.size_left+i.piece.length,i=i.right}}for(i=i.next();i!==ce;){const e=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){const r=this.getAccumulatedValue(i,0),o=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=e.substring(o,o+r-t),n}{const t=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=e.substr(t,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==ce;)t+=e.lf_left+e.piece.lineFeedCnt,i+=e.size_left+e.piece.length,e=e.right;this._lineCnt=t,this._length=i,this._searchCache.validate(this._length)}getIndexOf(e,t){const i=e.piece,n=this.positionInBuffer(e,t),r=n.line-i.start.line;if(this.offsetInBuffer(i.bufferIndex,i.end)-this.offsetInBuffer(i.bufferIndex,i.start)===t){const t=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(t!==r)return{index:t,remainder:0}}return{index:r,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;const i=e.piece,n=this._buffers[i.bufferIndex].lineStarts,r=i.start.line+t+1;return r>i.end.line?n[i.end.line]+i.end.column-n[i.start.line]-i.start.column:n[r]-n[i.start.line]-i.start.column}deleteNodeTail(e,t){const i=e.piece,n=i.lineFeedCnt,r=this.offsetInBuffer(i.bufferIndex,i.end),o=t,s=this.offsetInBuffer(i.bufferIndex,o),a=this.getLineFeedCnt(i.bufferIndex,i.start,o),l=a-n,c=s-r,h=i.length+c;e.piece=new Le(i.bufferIndex,i.start,o,a,h),be(this,e,c,l)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,r=this.offsetInBuffer(i.bufferIndex,i.start),o=t,s=this.getLineFeedCnt(i.bufferIndex,o,i.end),a=s-n,l=r-this.offsetInBuffer(i.bufferIndex,o),c=i.length+l;e.piece=new Le(i.bufferIndex,o,i.end,s,c),be(this,e,l,a)}shrinkNode(e,t,i){const n=e.piece,r=n.start,o=n.end,s=n.length,a=n.lineFeedCnt,l=t,c=this.getLineFeedCnt(n.bufferIndex,n.start,l),h=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,r);e.piece=new Le(n.bufferIndex,n.start,l,c,h),be(this,e,h-s,c-a);const d=new Le(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),u=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(u)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+="\n");const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const r=ke(t,!1);for(let e=0;ee)t=t.left;else{if(t.size_left+t.piece.length>=e){n+=t.size_left;const i={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(i),i}e-=t.size_left+t.piece.length,n+=t.size_left+t.piece.length,t=t.right}return null}nodeAt2(e,t){let i=this.root,n=0;for(;i!==ce;)if(i.left!==ce&&i.lf_left>=e-1)i=i.left;else{if(i.lf_left+i.piece.lineFeedCnt>e-1){const r=this.getAccumulatedValue(i,e-i.lf_left-2),o=this.getAccumulatedValue(i,e-i.lf_left-1);return n+=i.size_left,{node:i,remainder:Math.min(r+t-1,o),nodeStartOffset:n}}if(i.lf_left+i.piece.lineFeedCnt===e-1){const r=this.getAccumulatedValue(i,e-i.lf_left-2);if(r+t-1<=i.piece.length)return{node:i,remainder:r+t-1,nodeStartOffset:n};t-=i.piece.length-r;break}e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==ce;){if(i.piece.lineFeedCnt>0){const e=this.getAccumulatedValue(i,0),n=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,e),nodeStartOffset:n}}if(i.piece.length>=t-1)return{node:i,remainder:t-1,nodeStartOffset:this.offsetOfNode(i)};t-=i.piece.length,i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;const i=this._buffers[e.piece.bufferIndex],n=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start)+t;return i.buffer.charCodeAt(n)}offsetOfNode(e){if(!e)return 0;let t=e.size_left;for(;e!==this.root;)e.parent.right===e&&(t+=e.parent.size_left+e.parent.piece.length),e=e.parent;return t}shouldCheckCRLF(){return!(this._EOLNormalized&&"\n"===this._EOL)}startWithLF(e){if("string"==typeof e)return 10===e.charCodeAt(0);if(e===ce||0===e.piece.lineFeedCnt)return!1;const t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,r=i[n]+t.start.column;return n!==i.length-1&&(!(i[n+1]>r+1)&&10===this._buffers[t.bufferIndex].buffer.charCodeAt(r))}endWithCR(e){return"string"==typeof e?13===e.charCodeAt(e.length-1):e!==ce&&0!==e.piece.lineFeedCnt&&13===this.nodeCharCodeAt(e,e.piece.length-1)}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){const t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){const t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){const i=[],n=this._buffers[e.piece.bufferIndex].lineStarts;let r;r=0===e.piece.end.column?{line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:{line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,s=e.piece.lineFeedCnt-1;e.piece=new Le(e.piece.bufferIndex,e.piece.start,r,s,o),be(this,e,-1,-1),0===e.piece.length&&i.push(e);const a={line:t.piece.start.line+1,column:0},l=t.piece.length-1,c=this.getLineFeedCnt(t.piece.bufferIndex,a,t.piece.end);t.piece=new Le(t.piece.bufferIndex,a,t.piece.end,c,l),be(this,t,-1,-1),0===t.piece.length&&i.push(t);const h=this.createNewPieces("\r\n");this.rbInsertRight(e,h[0]);for(let e=0;ee.sortIndex-t.sortIndex))}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=r,this._mightContainNonBasicASCII=o;const f=this._doApplyEdits(a);let p=null;if(t&&d.length>0){d.sort(((e,t)=>t.lineNumber-e.lineNumber)),p=[];for(let e=0,t=d.length;e0&&d[e-1].lineNumber===t)continue;const i=d[e].oldContent,n=this.getLineContent(t);0!==n.length&&n!==i&&-1===l.LC(n)&&p.push(t)}}return this._onDidChangeContent.fire(),new g.je(u,f,p)}_reduceOperations(e){return e.length<1e3?e:[this._toSingleEditOperation(e)]}_toSingleEditOperation(e){let t=!1;const i=e[0].range,n=e[e.length-1].range,r=new d.e(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,s=i.startColumn;const a=[];for(let i=0,n=e.length;i0&&a.push(n.text),o=r.endLineNumber,s=r.endColumn}const l=a.join(""),[c,h,u]=(0,Te.Q)(l);return{sortIndex:0,identifier:e[0].identifier,range:r,rangeOffset:this.getOffsetAt(r.startLineNumber,r.startColumn),rangeLength:this.getValueLengthInRange(r,0),text:l,eolCount:c,firstLineLength:h,lastLineLength:u,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Me._sortOpsDescending);const t=[];for(let i=0;i0){const e=s.eolCount+1;c=1===e?new d.e(a,l,a,l+s.firstLineLength):new d.e(a,l,a+e-1,s.lastLineLength+1)}else c=new d.e(a,l,a,l);i=c.endLineNumber,n=c.endColumn,t.push(c),r=s}return t}static _sortOpsAscending(e,t){const i=d.e.compareRangesUsingEnds(e.range,t.range);return 0===i?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){const i=d.e.compareRangesUsingEnds(e.range,t.range);return 0===i?t.sortIndex-e.sortIndex:-i}}class Oe{constructor(e,t,i,n,r,o,s,a,l){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=r,this._containsRTL=o,this._containsUnusualLineTerminators=s,this._isBasicASCII=a,this._normalizeEOL=l}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return 0===t?1===e?"\n":"\r\n":i>t/2?"\r\n":"\n"}create(e){const t=this._getEOL(e),i=this._chunks;if(this._normalizeEOL&&("\r\n"===t&&(this._cr>0||this._lf>0)||"\n"===t&&(this._cr>0||this._crlf>0)))for(let e=0,n=i.length;e=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)}_acceptChunk1(e,t){(t||0!==e.length)&&(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=function(e,t){e.length=0,e[0]=0;let i=1,n=0,r=0,o=0,s=!0;for(let a=0,l=t.length;a126)&&(s=!1)}const a=new Se(xe(e),n,r,o,s);return e.length=0,a}(this._tmpLineStarts,e);this.chunks.push(new Ne(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=l.Ut(e)),this.isBasicASCII||this.containsUnusualLineTerminators||(this.containsUnusualLineTerminators=l.ab(e))}finish(e=!0){return this._finish(),new Oe(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(0===this.chunks.length&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;const e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);const t=ke(e.buffer);e.lineStarts=t,13===this._previousChar&&this.cr++}}}var Pe=i(4706),Fe=i(7378),Be=i(6887),We=i(276),Ve=i(4013);class ze{constructor(e,t){this._startLineNumber=e,this._tokens=t}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._startLineNumber+this._tokens.length-1}getLineTokens(e){return this._tokens[e-this._startLineNumber]}appendLineTokens(e){this._tokens.push(e)}}class He{constructor(){this._tokens=[]}add(e,t){if(this._tokens.length>0){const i=this._tokens[this._tokens.length-1];if(i.endLineNumber+1===e)return void i.appendLineTokens(t)}this._tokens.push(new ze(e,[t]))}finalize(){return this._tokens}}var je=i(5393),Ue=i(1432);class $e{constructor(e){this._default=e,this._store=[]}get(e){return e=this._store.length;)this._store[this._store.length]=this._default;this._store[e]=t}delete(e,t){0===t||e>=this._store.length||this._store.splice(e,t)}insert(e,t){if(0===t||e>=this._store.length)return;const i=[];for(let e=0;e{const t=this._textModel.getLanguageId();-1!==e.changedLanguages.indexOf(t)&&(this._resetTokenizationState(),this._textModel.clearTokens())}))),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}handleDidChangeContent(e){if(e.isFlush)this._resetTokenizationState();else{if(this._tokenizationStateStore)for(let t=0,i=e.changes.length;t{this._isScheduled=!1,this._backgroundTokenizeWithDeadline(e)})))}_backgroundTokenizeWithDeadline(e){const t=Date.now()+e.timeRemaining(),i=()=>{!this._isDisposed&&this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&(this._backgroundTokenizeForAtLeast1ms(),Date.now()1)break;if(this._tokenizeOneInvalidLine(t)>=e)break}while(this._hasLinesToTokenize());this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new He;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.finalize(),!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new He;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.finalize(),!this._hasLinesToTokenize())}getTokenTypeIfInsertingCharacter(e,t){if(!this._tokenizationStateStore)return 0;this.forceTokenization(e.lineNumber);const i=this._tokenizationStateStore.getBeginState(e.lineNumber-1);if(!i)return 0;const n=this._textModel.getLanguageId(),r=this._textModel.getLineContent(e.lineNumber),o=r.substring(0,e.column-1)+t+r.substring(e.column-1),s=Ge(this._languageIdCodec,n,this._tokenizationStateStore.tokenizationSupport,o,!0,i),a=new Fe.A(s.tokens,o,this._languageIdCodec);if(0===a.getCount())return 0;const l=a.findTokenIndexAtOffset(e.column-1);return a.getStandardTokenType(l)}tokenizeLineWithEdit(e,t,i){const n=e.lineNumber,r=e.column;if(!this._tokenizationStateStore)return null;this.forceTokenization(n);const o=this._tokenizationStateStore.getBeginState(n-1);if(!o)return null;const s=this._textModel.getLineContent(n),a=s.substring(0,r-1)+i+s.substring(r-1+t),l=this._textModel.getLanguageIdAtPosition(n,0),c=Ge(this._languageIdCodec,l,this._tokenizationStateStore.tokenizationSupport,a,!0,o);return new Fe.A(c.tokens,a,this._languageIdCodec)}isCheapToTokenize(e){if(!this._tokenizationStateStore)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return!(e>t)&&(e1&&e>=1;e--){const t=this._textModel.getLineFirstNonWhitespaceColumn(e);if(0!==t&&t=0;e--)a=Ge(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,r[e],!1,a).endState;for(let n=t;n<=i;n++){const t=this._textModel.getLineContent(n),i=Ge(this._languageIdCodec,s,this._tokenizationStateStore.tokenizationSupport,t,!0,a);e.add(n,i.tokens),this._tokenizationStateStore.markMustBeTokenized(n-1),a=i.endState}}}function Ge(e,t,i,n,r,s){let a=null;if(i)try{a=i.tokenizeEncoded(n,r,s.clone())}catch(e){(0,o.dL)(e)}return a||(a=(0,We.Dy)(e.encodeLanguageId(t),s)),Fe.A.convertToEndOffset(a.tokens,n.length),a}const Ye=new Uint32Array(0).buffer;class Ze{static deleteBeginning(e,t){return null===e||e===Ye?e:Ze.delete(e,0,t)}static deleteEnding(e,t){if(null===e||e===Ye)return e;const i=Qe(e),n=i[i.length-2];return Ze.delete(e,t,n)}static delete(e,t,i){if(null===e||e===Ye||t===i)return e;const n=Qe(e),r=n.length>>>1;if(0===t&&n[n.length-2]===i)return Ye;const o=Fe.A.findIndexInTokensArray(n,t),s=o>0?n[o-1<<1]:0;if(il&&(n[a++]=t,n[a++]=n[1+(e<<1)],l=t)}if(a===n.length)return e;const h=new Uint32Array(a);return h.set(n.subarray(0,a),0),h.buffer}static append(e,t){if(t===Ye)return e;if(e===Ye)return t;if(null===e)return e;if(null===t)return null;const i=Qe(e),n=Qe(t),r=n.length>>>1,o=new Uint32Array(i.length+n.length);o.set(i,0);let s=i.length;const a=i[i.length-2];for(let e=0;e>>1;let o=Fe.A.findIndexInTokensArray(n,t);o>0&&n[o-1<<1]===t&&o--;for(let e=o;e1&&(t=Be.NX.getLanguageId(n[1])!==e),!t)return Ye}if(!n||0===n.length){const i=new Uint32Array(2);return i[0]=t,i[1]=Je(e),i.buffer}return n[n.length-2]=t,0===n.byteOffset&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){0!==t&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(0===t)return;const i=[];for(let e=0;e=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;return void(this._lineTokens[t]=Ze.delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1))}this._lineTokens[t]=Ze.deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i=this._len||(0!==t?(this._lineTokens[n]=Ze.deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ze.insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)):this._lineTokens[n]=Ze.insert(this._lineTokens[n],e.column-1,i))}}function Je(e){return(16384|e<<0|2<<23)>>>0}class et{constructor(e){this._pieces=[],this._isComplete=!1,this._languageIdCodec=e}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return 0===this._pieces.length}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const n=t[0].getRange(),r=t[t.length-1].getRange();if(!n||!r)return e;i=e.plusRange(n).plusRange(r)}let r=null;for(let e=0,t=this._pieces.length;ei.endLineNumber){r=r||{index:e};break}if(n.removeTokens(i),n.isEmpty()){this._pieces.splice(e,1),e--,t--;continue}if(n.endLineNumberi.endLineNumber){r=r||{index:e};continue}const[o,s]=n.split(i);o.isEmpty()?r=r||{index:e}:s.isEmpty()||(this._pieces.splice(e,1,o,s),e++,t++,r=r||{index:e})}return r=r||{index:this._pieces.length},t.length>0&&(this._pieces=n.Zv(this._pieces,r.index,t)),i}isComplete(){return this._isComplete}addSparseTokens(e,t){const i=this._pieces;if(0===i.length)return t;const n=i[et._findFirstPieceWithLine(i,e)].getLineTokens(e);if(!n)return t;const r=t.getCount(),o=n.getCount();let s=0;const a=[];let l=0,c=0;const h=(e,t)=>{e!==c&&(c=e,a[l++]=e,a[l++]=t)};for(let e=0;e>>0,c=~l>>>0;for(;st)){for(;r>i&&e[r-1].startLineNumber<=t&&t<=e[r-1].endLineNumber;)r--;return r}n=r-1}}return i}acceptEdit(e,t,i,n,r){for(const o of this._pieces)o.acceptEdit(e,t,i,n,r)}}var tt=i(270),it=i(9381),nt=i(2042),rt=i(4862),ot=i(2075),st=i(3158),at=function(e,t){return function(i,n){t(i,n,e)}};function lt(e,t){return("string"==typeof e?function(e){const t=new Re;return t.acceptChunk(e),t.finish()}(e):e).create(t)}let ct=0;class ht{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;const e=[];let t=0,i=0;for(;;){const n=this._source.read();if(null===n)return this._eos=!0,0===t?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=65536)return e.join("")}}}const dt=()=>{throw new Error("Invalid change accessor")};let ut=class e extends a.JT{constructor(t,i,n,r=null,o,a,h){super(),this._undoRedoService=o,this._languageService=a,this._languageConfigurationService=h,this._onWillDispose=this._register(new s.Q5),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new St((e=>this.handleBeforeFireDecorationsChangedEvent(e)))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new s.Q5),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new s.Q5),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new s.Q5),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new s.Q5),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new s.Q5),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeInjectedText=this._register(new s.Q5),this._eventEmitter=this._register(new kt),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new s.Q5),ct++,this.id="$model"+ct,this.isForSimpleWidget=n.isForSimpleWidget,this._associatedResource=null==r?c.o.parse("inmemory://model/"+ct):r,this._attachedEditorCount=0;const{textBuffer:u,disposable:g}=lt(t,n.defaultEOL);this._buffer=u,this._bufferDisposable=g,this._options=e.resolveOptions(this._buffer,n);const f=this._buffer.getLineCount(),p=this._buffer.getValueLengthInRange(new d.e(1,1,f,this._buffer.getLineLength(f)+1),0);n.largeFileOptimizations?this._isTooLargeForTokenization=p>e.LARGE_FILE_SIZE_THRESHOLD||f>e.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=p>e.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageId=i,this._languageRegistryListener=this._languageConfigurationService.onDidChange((e=>{e.affects(this._languageId)&&this._onDidChangeLanguageConfiguration.fire({})})),this._instanceId=l.PJ(ct),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new pt,this._commandManager=new P.NL(this,this._undoRedoService),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new Xe(this._languageService.languageIdCodec),this._semanticTokens=new et(this._languageService.languageIdCodec),this._tokenization=new qe(this,this._languageService.languageIdCodec),this._bracketPairColorizer=this._register(new E(this,this._languageConfigurationService)),this._guidesTextModelPart=this._register(new F.l(this,this._languageConfigurationService)),this._decorationProvider=this._register(new O(this)),this._register(this._decorationProvider.onDidChange((()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()})))}static resolveOptions(e,t){if(t.detectIndentation){const i=V(e,t.tabSize,t.insertSpaces);return new g.dJ({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new g.dJ({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContent(e){return this._eventEmitter.slowEvent((t=>e(t.contentChangedEvent)))}onDidChangeContentOrInjectedText(e){return(0,a.F8)(this._eventEmitter.fastEvent((t=>e(t.rawContentChangedEvent))),this._onDidChangeInjectedText.event((t=>e(t))))}get bracketPairs(){return this._bracketPairColorizer}get guides(){return this._guidesTextModelPart}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(2===this._backgroundTokenizationState)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._bracketPairColorizer.handleDidChangeBackgroundTokenizationState(),this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new Me([],"","\n",!1,!1,!0,!0);e.dispose(),this._buffer=e,this._bufferDisposable=a.JT.None}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._isDisposing||(this._bracketPairColorizer.handleDidChangeContent(t),this._tokenization.handleDidChangeContent(t),this._eventEmitter.fire(new Pe.fV(e,t)))}setValue(e){if(this._assertNotDisposed(),null===e)return;const{textBuffer:t,disposable:i}=lt(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,r,o,s){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:r,isRedoing:o,isFlush:s}}_setValueFromTextBuffer(e,t){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),r=this.getLineCount(),o=this.getLineMaxColumn(r);this._buffer=e,this._bufferDisposable.dispose(),this._bufferDisposable=t,this._increaseVersionId(),this._tokens.flush(),this._semanticTokens.flush(),this._decorations=Object.create(null),this._decorationsTree=new pt,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Pe.dQ([new Pe.Jx],this._versionId,!1,!1),this._createContentChanged2(new d.e(1,1,r,o),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=1===e?"\r\n":"\n";if(this._buffer.getEOL()===t)return;const i=this.getFullModelRange(),n=this.getValueLengthInRange(i),r=this.getLineCount(),o=this.getLineMaxColumn(r);this._onBeforeEOLChange(),this._buffer.setEOL(t),this._increaseVersionId(),this._onAfterEOLChange(),this._emitContentChangedEvent(new Pe.dQ([new Pe.CZ],this._versionId,!1,!1),this._createContentChanged2(new d.e(1,1,r,o),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}isDisposed(){return this._isDisposed}isDominatedByLongLines(){if(this._assertNotDisposed(),this.isTooLargeForTokenization())return!1;let e=0,t=0;const i=this._buffer.getLineCount();for(let n=1;n<=i;n++){const i=this._buffer.getLineLength(n);i>=1e4?t+=i:e+=i}return t>e}get uri(){return this._associatedResource}getOptions(){return this._assertNotDisposed(),this._options}getFormattingOptions(){return{tabSize:this._options.indentSize,insertSpaces:this._options.insertSpaces}}updateOptions(e){this._assertNotDisposed();const t=void 0!==e.tabSize?e.tabSize:this._options.tabSize,i=void 0!==e.indentSize?e.indentSize:this._options.indentSize,n=void 0!==e.insertSpaces?e.insertSpaces:this._options.insertSpaces,r=void 0!==e.trimAutoWhitespace?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=void 0!==e.bracketColorizationOptions?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,s=new g.dJ({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:r,bracketPairColorizationOptions:o});if(this._options.equals(s))return;const a=this._options.createChangeEvent(s);this._options=s,this._bracketPairColorizer.handleDidChangeOptions(a),this._decorationProvider.handleDidChangeOptions(a),this._onDidChangeOptions.fire(a)}detectIndentation(e,t){this._assertNotDisposed();const i=V(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}normalizeIndentation(e){return this._assertNotDisposed(),(0,st.x)(e,this._options.indentSize,this._options.insertSpaces)}getVersionId(){return this._assertNotDisposed(),this._versionId}mightContainRTL(){return this._buffer.mightContainRTL()}mightContainUnusualLineTerminators(){return this._buffer.mightContainUnusualLineTerminators()}removeUnusualLineTerminators(e=null){const t=this.findMatches(l.Qe.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map((e=>({range:e.range,text:null}))),(()=>null))}mightContainNonBasicASCII(){return this._buffer.mightContainNonBasicASCII()}getAlternativeVersionId(){return this._assertNotDisposed(),this._alternativeVersionId}getInitialUndoRedoSnapshot(){return this._assertNotDisposed(),this._initialUndoRedoSnapshot}getOffsetAt(e){this._assertNotDisposed();const t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();const t=Math.min(this._buffer.getLength(),Math.max(0,e));return this._buffer.getPositionAt(t)}_increaseVersionId(){this._versionId=this._versionId+1,this._alternativeVersionId=this._versionId}_overwriteVersionId(e){this._versionId=e}_overwriteAlternativeVersionId(e){this._alternativeVersionId=e}_overwriteInitialUndoRedoSnapshot(e){this._initialUndoRedoSnapshot=e}getValue(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new ht(this._buffer.createSnapshot(e))}getValueLength(e,t=!1){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueLengthInRange(i,e);return t?this._buffer.getBOM().length+n:n}getValueInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueInRange(this.validateRange(e),t)}getValueLengthInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getValueLengthInRange(this.validateRange(e),t)}getCharacterCountInRange(e,t=0){return this._assertNotDisposed(),this._buffer.getCharacterCountInRange(this.validateRange(e),t)}getLineCount(){return this._assertNotDisposed(),this._buffer.getLineCount()}getLineContent(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),"\n"===this._buffer.getEOL()?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLastNonWhitespaceColumn(e)}_validateRangeRelaxedNoAllocations(e){const t=this._buffer.getLineCount(),i=e.startLineNumber,n=e.startColumn;let r=Math.floor("number"!=typeof i||isNaN(i)?1:i),o=Math.floor("number"!=typeof n||isNaN(n)?1:n);if(r<1)r=1,o=1;else if(r>t)r=t,o=this.getLineMaxColumn(r);else if(o<=1)o=1;else{const e=this.getLineMaxColumn(r);o>=e&&(o=e)}const s=e.endLineNumber,a=e.endColumn;let l=Math.floor("number"!=typeof s||isNaN(s)?1:s),c=Math.floor("number"!=typeof a||isNaN(a)?1:a);if(l<1)l=1,c=1;else if(l>t)l=t,c=this.getLineMaxColumn(l);else if(c<=1)c=1;else{const e=this.getLineMaxColumn(l);c>=e&&(c=e)}return i===r&&n===o&&s===l&&a===c&&e instanceof d.e&&!(e instanceof u.Y)?e:new d.e(r,o,l,c)}_isValidPosition(e,t,i){if("number"!=typeof e||"number"!=typeof t)return!1;if(isNaN(e)||isNaN(t))return!1;if(e<1||t<1)return!1;if((0|e)!==e||(0|t)!==t)return!1;if(e>this._buffer.getLineCount())return!1;if(1===t)return!0;if(t>this.getLineMaxColumn(e))return!1;if(1===i){const i=this._buffer.getLineCharCode(e,t-2);if(l.ZG(i))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor("number"!=typeof e||isNaN(e)?1:e),r=Math.floor("number"!=typeof t||isNaN(t)?1:t),o=this._buffer.getLineCount();if(n<1)return new h.L(1,1);if(n>o)return new h.L(o,this.getLineMaxColumn(o));if(r<=1)return new h.L(n,1);const s=this.getLineMaxColumn(n);if(r>=s)return new h.L(n,s);if(1===i){const e=this._buffer.getLineCharCode(n,r-2);if(l.ZG(e))return new h.L(n,r-1)}return new h.L(n,r)}validatePosition(e){return this._assertNotDisposed(),e instanceof h.L&&this._isValidPosition(e.lineNumber,e.column,1)?e:this._validatePosition(e.lineNumber,e.column,1)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,r=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0))return!1;if(!this._isValidPosition(r,o,0))return!1;if(1===t){const e=n>1?this._buffer.getLineCharCode(i,n-2):0,t=o>1&&o<=this._buffer.getLineLength(r)?this._buffer.getLineCharCode(r,o-2):0,s=l.ZG(e),a=l.ZG(t);return!s&&!a}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof d.e&&!(e instanceof u.Y)&&this._isValidRange(e,1))return e;const t=this._validatePosition(e.startLineNumber,e.startColumn,0),i=this._validatePosition(e.endLineNumber,e.endColumn,0),n=t.lineNumber,r=t.column,o=i.lineNumber,s=i.column;{const e=r>1?this._buffer.getLineCharCode(n,r-2):0,t=s>1&&s<=this._buffer.getLineLength(o)?this._buffer.getLineCharCode(o,s-2):0,i=l.ZG(e),a=l.ZG(t);return i||a?n===o&&r===s?new d.e(n,r-1,o,s-1):i&&a?new d.e(n,r-1,o,s+1):i?new d.e(n,r-1,o,s):new d.e(n,r,o,s+1):new d.e(n,r,o,s)}}modifyPosition(e,t){this._assertNotDisposed();const i=this.getOffsetAt(e)+t;return this.getPositionAt(Math.min(this._buffer.getLength(),Math.max(0,i)))}getFullModelRange(){this._assertNotDisposed();const e=this.getLineCount();return new d.e(1,1,e,this.getLineMaxColumn(e))}findMatchesLineByLine(e,t,i,n){return this._buffer.findMatchesLineByLine(e,t,i,n)}findMatches(e,t,i,n,r,o,s=999){this._assertNotDisposed();let a=null;null!==t&&(Array.isArray(t)||(t=[t]),t.every((e=>d.e.isIRange(e)))&&(a=t.map((e=>this.validateRange(e))))),null===a&&(a=[this.getFullModelRange()]),a=a.sort(((e,t)=>e.startLineNumber-t.startLineNumber||e.startColumn-t.startColumn));const l=[];let c;if(l.push(a.reduce(((e,t)=>d.e.areIntersecting(e,t)?e.plusRange(t):(l.push(e),t)))),!i&&e.indexOf("\n")<0){const t=new we.bc(e,i,n,r).parseSearchRequest();if(!t)return[];c=e=>this.findMatchesLineByLine(e,t,o,s)}else c=t=>we.pM.findMatches(this,new we.bc(e,i,n,r),t,o,s);return l.map(c).reduce(((e,t)=>e.concat(t)),[])}findNextMatch(e,t,i,n,r,o){this._assertNotDisposed();const s=this.validatePosition(t);if(!i&&e.indexOf("\n")<0){const t=new we.bc(e,i,n,r).parseSearchRequest();if(!t)return null;const a=this.getLineCount();let l=new d.e(s.lineNumber,s.column,a,this.getLineMaxColumn(a)),c=this.findMatchesLineByLine(l,t,o,1);return we.pM.findNextMatch(this,new we.bc(e,i,n,r),s,o),c.length>0?c[0]:(l=new d.e(1,1,s.lineNumber,this.getLineMaxColumn(s.lineNumber)),c=this.findMatchesLineByLine(l,t,o,1),c.length>0?c[0]:null)}return we.pM.findNextMatch(this,new we.bc(e,i,n,r),s,o)}findPreviousMatch(e,t,i,n,r,o){this._assertNotDisposed();const s=this.validatePosition(t);return we.pM.findPreviousMatch(this,new we.bc(e,i,n,r),s,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if(("\n"===this.getEOL()?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof g.Qi?e:new g.Qi(e.identifier||null,this.validateRange(e.range),e.text,e.forceMoveMarkers||!1,e.isAutoWhitespaceEdit||!1,e._isTracked||!1)}_validateEditOperations(e){const t=[];for(let i=0,n=e.length;i({range:this.validateRange(e.range),text:e.text})));let n=!0;if(e)for(let t=0,r=e.length;tr.endLineNumber,s=r.startLineNumber>t.endLineNumber;if(!n&&!s){o=!0;break}}if(!o){n=!1;break}}if(n)for(let e=0,n=this._trimAutoWhitespaceLines.length;et.endLineNumber||n===t.startLineNumber&&t.startColumn===r&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(0)||n===t.startLineNumber&&1===t.startColumn&&t.isEmpty()&&s&&s.length>0&&"\n"===s.charAt(s.length-1))){o=!1;break}}if(o){const e=new d.e(n,1,n,r);t.push(new g.Qi(null,e,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return null===this._initialUndoRedoSnapshot&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const r=e.map((e=>{const t=this.getPositionAt(e.newPosition),i=this.getPositionAt(e.newEnd);return{range:new d.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.oldText}}));this._applyUndoRedoEdits(r,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const r=e.map((e=>{const t=this.getPositionAt(e.oldPosition),i=this.getPositionAt(e.oldEnd);return{range:new d.e(t.lineNumber,t.column,i.lineNumber,i.column),text:e.newText}}));this._applyUndoRedoEdits(r,t,!1,!0,i,n)}_applyUndoRedoEdits(e,t,i,n,r,o){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._isUndoing=i,this._isRedoing=n,this.applyEdits(e,!1),this.setEOL(t),this._overwriteAlternativeVersionId(r)}finally{this._isUndoing=!1,this._isRedoing=!1,this._eventEmitter.endDeferredEmit(o),this._onDidChangeDecorations.endDeferredEmit()}}applyEdits(e,t=!1){try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit();const i=this._validateEditOperations(e);return this._doApplyEdits(i,t)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_doApplyEdits(e,t){const i=this._buffer.getLineCount(),r=this._buffer.applyEdits(e,this._options.trimAutoWhitespace,t),o=this._buffer.getLineCount(),s=r.changes;if(this._trimAutoWhitespaceLines=r.trimAutoWhitespaceLineNumbers,0!==s.length){for(let e=0,t=s.length;e0?t.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(t.rangeOffset,t.rangeLength,t.text.length,t.forceMoveMarkers)}const e=[];this._increaseVersionId();let t=i;for(let i=0,r=s.length;i=0;t--){const i=l+t,n=p+t;y.takeFromEndWhile((e=>e.lineNumber>n));const r=y.takeFromEndWhile((e=>e.lineNumber===n));e.push(new Pe.rU(i,this.getLineContent(n),r))}if(ge.lineNumbere.lineNumber===t))}e.push(new Pe.Tx(r+1,l+u,h,c))}t+=f}this._emitContentChangedEvent(new Pe.dQ(e,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:s,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return null===r.reverseEdits?void 0:r.reverseEdits}undo(){return this._undoRedoService.undo(this.uri)}canUndo(){return this._undoRedoService.canUndo(this.uri)}redo(){return this._undoRedoService.redo(this.uri)}canRedo(){return this._undoRedoService.canRedo(this.uri)}handleBeforeFireDecorationsChangedEvent(e){if(null===e||0===e.size)return;const t=[...e].map((e=>new Pe.rU(e,this.getLineContent(e),this._getInjectedTextInLine(e))));this._onDidChangeInjectedText.fire(new Pe.D8(t))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){const i={addDecoration:(t,i)=>this._deltaDecorationsImpl(e,[],[{range:t,options:i}])[0],changeDecoration:(e,t)=>{this._changeDecorationImpl(e,t)},changeDecorationOptions:(e,t)=>{this._changeDecorationOptionsImpl(e,xt(t))},removeDecoration:t=>{this._deltaDecorationsImpl(e,[t],[])},deltaDecorations:(t,i)=>0===t.length&&0===i.length?[]:this._deltaDecorationsImpl(e,t,i)};let n=null;try{n=t(i)}catch(e){(0,o.dL)(e)}return i.addDecoration=dt,i.changeDecoration=dt,i.changeDecorationOptions=dt,i.removeDecoration=dt,i.deltaDecorations=dt,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),0===e.length&&0===t.length)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_getTrackedRange(e){return this.getDecorationRange(e)}_setTrackedRange(e,t,i){const n=e?this._decorations[e]:null;if(!n)return t?this._deltaDecorationsImpl(0,[],[{range:t,options:Ct[i]}])[0]:null;if(!t)return this._decorationsTree.delete(n),delete this._decorations[n.id],null;const r=this._validateRangeRelaxedNoAllocations(t),o=this._buffer.getOffsetAt(r.startLineNumber,r.startColumn),s=this._buffer.getOffsetAt(r.endLineNumber,r.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,s,r),n.setOptions(Ct[i]),this._decorationsTree.insert(n),n.id}removeAllDecorationsWithOwnerId(e){if(this._isDisposed)return;const t=this._decorationsTree.collectNodesFromOwner(e);for(let e=0,i=t.length;ethis.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){const r=this.getLineCount(),o=Math.min(r,Math.max(1,e)),s=Math.min(r,Math.max(1,t)),a=this.getLineMaxColumn(s),l=new d.e(o,1,s,a),c=this._getDecorationsInRange(l,i,n);return c.push(...this._decorationProvider.getDecorationsInRange(l,i,n)),c}getDecorationsInRange(e,t=0,i=!1){const n=this.validateRange(e),r=this._getDecorationsInRange(n,t,i);return r.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),r}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}getInjectedTextDecorations(e=0){return this._decorationsTree.getAllInjectedText(this,e)}_getInjectedTextInLine(e){const t=this._buffer.getOffsetAt(e,1),i=t+this._buffer.getLineLength(e),n=this._decorationsTree.getInjectedTextInInterval(this,t,i,0);return Pe.gk.fromDecorations(n).filter((t=>t.lineNumber===e))}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),r=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,r,t,i)}getRangeAt(e,t){return this._buffer.getRangeAt(e,t-e)}_changeDecorationImpl(e,t){const i=this._decorations[e];if(!i)return;if(i.options.after){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.endLineNumber)}if(i.options.before){const t=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(t.startLineNumber)}const n=this._validateRangeRelaxedNoAllocations(t),r=this._buffer.getOffsetAt(n.startLineNumber,n.startColumn),o=this._buffer.getOffsetAt(n.endLineNumber,n.endColumn);this._decorationsTree.delete(i),i.reset(this.getVersionId(),r,o,n),this._decorationsTree.insert(i),this._onDidChangeDecorations.checkAffectedAndFire(i.options),i.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.endLineNumber),i.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(n.startLineNumber)}_changeDecorationOptionsImpl(e,t){const i=this._decorations[e];if(!i)return;const n=!(!i.options.overviewRuler||!i.options.overviewRuler.color),r=!(!t.overviewRuler||!t.overviewRuler.color);if(this._onDidChangeDecorations.checkAffectedAndFire(i.options),this._onDidChangeDecorations.checkAffectedAndFire(t),i.options.after||t.after){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.endLineNumber)}if(i.options.before||t.before){const e=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(e.startLineNumber)}n!==r?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),r=t.length;let o=0;const s=i.length;let a=0;const l=new Array(s);for(;o0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:t})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._semanticTokens.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:null!==e,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._semanticTokens.isComplete()}hasSomeSemanticTokens(){return!this._semanticTokens.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this.validateRange(this._semanticTokens.setPartial(e,t));this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||(this._bracketPairColorizer.handleDidChangeTokens(e),this._onDidChangeTokens.fire(e))}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageId,e-1,t);return this._semanticTokens.addSparseTokens(e,i)}getLanguageId(){return this._languageId}setMode(e){if(this._languageId===e)return;const t={oldLanguage:this._languageId,newLanguage:e};this._languageId=e,this._bracketPairColorizer.handleDidChangeLanguage(t),this._tokenization.handleDidChangeLanguage(t),this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new h.L(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getTokenTypeIfInsertingCharacter(e,t,i){const n=this.validatePosition(new h.L(e,t));return this._tokenization.getTokenTypeIfInsertingCharacter(n,i)}tokenizeLineWithEdit(e,t,i){const n=this.validatePosition(e);return this._tokenization.tokenizeLineWithEdit(n,t,i)}getLanguageConfiguration(e){return this._languageConfigurationService.getLanguageConfiguration(e)}getWordAtPosition(t){this._assertNotDisposed();const i=this.validatePosition(t),n=this.getLineContent(i.lineNumber),r=this._getLineTokens(i.lineNumber),o=r.findTokenIndexAtOffset(i.column-1),[s,a]=e._findLanguageBoundaries(r,o),l=(0,tt.t2)(i.column,this.getLanguageConfiguration(r.getLanguageId(o)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l;if(o>0&&s===i.column-1){const[s,a]=e._findLanguageBoundaries(r,o-1),l=(0,tt.t2)(i.column,this.getLanguageConfiguration(r.getLanguageId(o-1)).getWordDefinition(),n.substring(s,a),s);if(l&&l.startColumn<=t.column&&t.column<=l.endColumn)return l}return null}static _findLanguageBoundaries(e,t){const i=e.getLanguageId(t);let n=0;for(let r=t;r>=0&&e.getLanguageId(r)===i;r--)n=e.getStartOffset(r);let r=e.getLineContent().length;for(let n=t,o=e.getCount();n=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([at(4,rt.tJ),at(5,nt.O),at(6,it.c_)],ut);class pt{constructor(){this._decorationsTree0=new Q,this._decorationsTree1=new Q,this._injectedTextDecorationsTree=new Q}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)null===i.range&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,r){const o=e.getVersionId(),s=this._intervalSearch(t,i,n,r,o);return this._ensureNodesHaveRanges(e,s)}_intervalSearch(e,t,i,n,r){const o=this._decorationsTree0.intervalSearch(e,t,i,n,r),s=this._decorationsTree1.intervalSearch(e,t,i,n,r),a=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,r);return o.concat(s).concat(a)}getInjectedTextInInterval(e,t,i,n){const r=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,r);return this._ensureNodesHaveRanges(e,o).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter((e=>e.options.showIfCollapsed||!e.range.isEmpty()))}getAll(e,t,i,n){const r=e.getVersionId(),o=this._search(t,i,n,r);return this._ensureNodesHaveRanges(e,o)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const i=this._decorationsTree0.search(e,t,n),r=this._decorationsTree1.search(e,t,n),o=this._injectedTextDecorationsTree.search(e,t,n);return i.concat(r).concat(o)}}collectNodesFromOwner(e){const t=this._decorationsTree0.collectNodesFromOwner(e),i=this._decorationsTree1.collectNodesFromOwner(e),n=this._injectedTextDecorationsTree.collectNodesFromOwner(e);return t.concat(i).concat(n)}collectNodesPostOrder(){const e=this._decorationsTree0.collectNodesPostOrder(),t=this._decorationsTree1.collectNodesPostOrder(),i=this._injectedTextDecorationsTree.collectNodesPostOrder();return e.concat(t).concat(i)}insert(e){ft(e)?this._injectedTextDecorationsTree.insert(e):gt(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){ft(e)?this._injectedTextDecorationsTree.delete(e):gt(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),null===t.range&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){ft(e)?this._injectedTextDecorationsTree.resolveNode(e,t):gt(e)?this._decorationsTree1.resolveNode(e,t):this._decorationsTree0.resolveNode(e,t)}acceptReplace(e,t,i,n){this._decorationsTree0.acceptReplace(e,t,i,n),this._decorationsTree1.acceptReplace(e,t,i,n),this._injectedTextDecorationsTree.acceptReplace(e,t,i,n)}}function mt(e){return e.replace(/[^a-z0-9\-_]/gi," ")}class _t{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class vt extends _t{constructor(e){super(e),this._resolvedColor=null,this.position="number"==typeof e.position?e.position:g.sh.Center}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=null}_resolveColor(e,t){if("string"==typeof e)return e;const i=e?t.getColor(e.id):null;return i?i.toString():""}}class bt extends _t{constructor(e){super(e),this.position=e.position}getColor(e){return this._resolvedColor||("light"!==e.type&&this.darkColor?this._resolvedColor=this._resolveColor(this.darkColor,e):this._resolvedColor=this._resolveColor(this.color,e)),this._resolvedColor}invalidateCachedColor(){this._resolvedColor=void 0}_resolveColor(e,t){return"string"==typeof e?r.Il.fromHex(e):t.getColor(e.id)}}class yt{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.attachedData=e.attachedData||null,this.cursorStops=e.cursorStops||null}static from(e){return e instanceof yt?e:new yt(e)}}class wt{constructor(e){var t,i;this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?mt(e.className):null,this.hoverMessage=e.hoverMessage||null,this.glyphMarginHoverMessage=e.glyphMarginHoverMessage||null,this.isWholeLine=e.isWholeLine||!1,this.showIfCollapsed=e.showIfCollapsed||!1,this.collapseOnReplaceEdit=e.collapseOnReplaceEdit||!1,this.overviewRuler=e.overviewRuler?new vt(e.overviewRuler):null,this.minimap=e.minimap?new bt(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?mt(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?mt(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?mt(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?mt(e.marginClassName):null,this.inlineClassName=e.inlineClassName?mt(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?mt(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?mt(e.afterContentClassName):null,this.after=e.after?yt.from(e.after):null,this.before=e.before?yt.from(e.before):null,this.hideInCommentTokens=null!==(t=e.hideInCommentTokens)&&void 0!==t&&t,this.hideInStringTokens=null!==(i=e.hideInStringTokens)&&void 0!==i&&i}static register(e){return new wt(e)}static createDynamic(e){return new wt(e)}}wt.EMPTY=wt.register({description:"empty"});const Ct=[wt.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),wt.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),wt.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),wt.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function xt(e){return e instanceof wt?e:wt.createDynamic(e)}class St extends a.JT{constructor(e){super(),this.handleBeforeFire=e,this._actual=this._register(new s.Q5),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,0===this._deferredCnt){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const e={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(e)}null===(e=this._affectedInjectedTextLines)||void 0===e||e.clear(),this._affectedInjectedTextLines=null}}recordLineAffectedByInjectedText(e){this._affectedInjectedTextLines||(this._affectedInjectedTextLines=new Set),this._affectedInjectedTextLines.add(e)}checkAffectedAndFire(e){this._affectsMinimap||(this._affectsMinimap=!(!e.minimap||!e.minimap.position)),this._affectsOverviewRuler||(this._affectsOverviewRuler=!(!e.overviewRuler||!e.overviewRuler.color)),this._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class kt extends a.JT{constructor(){super(),this._fastEmitter=this._register(new s.Q5),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new s.Q5),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,0===this._deferredCnt&&null!==this._deferredEvent){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){this._deferredCnt>0?this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e:(this._fastEmitter.fire(e),this._slowEmitter.fire(e))}}},7277:(e,t,i)=>{"use strict";i.d(t,{bc:()=>l,cM:()=>u,iE:()=>c,pM:()=>d,sz:()=>g});var n=i(5924),r=i(4929),o=i(187),s=i(4314),a=i(4973);class l{constructor(e,t,i,n){this.searchString=e,this.isRegex=t,this.matchCase=i,this.wordSeparators=n}parseSearchRequest(){if(""===this.searchString)return null;let e;e=this.isRegex?function(e){if(!e||0===e.length)return!1;for(let t=0,i=e.length;t=i)break;const n=e.charCodeAt(t);if(110===n||114===n||87===n)return!0}return!1}(this.searchString):this.searchString.indexOf("\n")>=0;let t=null;try{t=n.GF(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch(e){return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new a.Tx(t,this.wordSeparators?(0,r.u)(this.wordSeparators):null,i?this.searchString:null)}}function c(e,t,i){if(!i)return new a.tk(e,null);const n=[];for(let e=0,i=t.length;e>0);t[r]>=e?n=r-1:t[r+1]>=e?(i=r,n=r):i=r+1}return i+1}}class d{static findMatches(e,t,i,n,r){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new g(o.wordSeparators,o.regex),n,r):this._doFindMatchesLineByLine(e,i,o,n,r):[]}static _getMultilineMatchRange(e,t,i,n,r,o){let a,l,c=0;if(n?(c=n.findLineFeedCountBeforeOffset(r),a=t+r+c):a=t+r,n){const e=n.findLineFeedCountBeforeOffset(r+o.length)-c;l=a+o.length+e}else l=a+o.length;const h=e.getPositionAt(a),d=e.getPositionAt(l);return new s.e(h.lineNumber,h.column,d.lineNumber,d.column)}static _doFindMatchesMultiline(e,t,i,n,r){const o=e.getOffsetAt(t.getStartPosition()),s=e.getValueInRange(t,1),a="\r\n"===e.getEOL()?new h(s):null,l=[];let d,u=0;for(i.reset(0);d=i.next(s);)if(l[u++]=c(this._getMultilineMatchRange(e,o,s,a,d.index,d[0]),d,n),u>=r)return l;return l}static _doFindMatchesLineByLine(e,t,i,n,r){const o=[];let s=0;if(t.startLineNumber===t.endLineNumber){const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,o,n,r),o}const a=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);s=this._findMatchesInLine(i,a,t.startLineNumber,t.startColumn-1,s,o,n,r);for(let a=t.startLineNumber+1;a=h))return r;return r}const f=new g(e.wordSeparators,e.regex);let p;f.reset(0);do{if(p=f.next(t),p&&(o[r++]=c(new s.e(i,p.index+1+n,i,p.index+1+p[0].length+n),p,l),r>=h))return r}while(p);return r}static findNextMatch(e,t,i,n){const r=t.parseSearchRequest();if(!r)return null;const o=new g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindNextMatchMultiline(e,i,o,n):this._doFindNextMatchLineByLine(e,i,o,n)}static _doFindNextMatchMultiline(e,t,i,n){const r=new o.L(t.lineNumber,1),a=e.getOffsetAt(r),l=e.getLineCount(),d=e.getValueInRange(new s.e(r.lineNumber,r.column,l,e.getLineMaxColumn(l)),1),u="\r\n"===e.getEOL()?new h(d):null;i.reset(t.column-1);let g=i.next(d);return g?c(this._getMultilineMatchRange(e,a,d,u,g.index,g[0]),g,n):1!==t.lineNumber||1!==t.column?this._doFindNextMatchMultiline(e,new o.L(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const r=e.getLineCount(),o=t.lineNumber,s=e.getLineContent(o),a=this._findFirstMatchInLine(i,s,o,t.column,n);if(a)return a;for(let t=1;t<=r;t++){const s=(o+t-1)%r,a=e.getLineContent(s+1),l=this._findFirstMatchInLine(i,a,s+1,1,n);if(l)return l}return null}static _findFirstMatchInLine(e,t,i,n,r){e.reset(n-1);const o=e.next(t);return o?c(new s.e(i,o.index+1,i,o.index+1+o[0].length),o,r):null}static findPreviousMatch(e,t,i,n){const r=t.parseSearchRequest();if(!r)return null;const o=new g(r.wordSeparators,r.regex);return r.regex.multiline?this._doFindPreviousMatchMultiline(e,i,o,n):this._doFindPreviousMatchLineByLine(e,i,o,n)}static _doFindPreviousMatchMultiline(e,t,i,n){const r=this._doFindMatchesMultiline(e,new s.e(1,1,t.lineNumber,t.column),i,n,9990);if(r.length>0)return r[r.length-1];const a=e.getLineCount();return t.lineNumber!==a||t.column!==e.getLineMaxColumn(a)?this._doFindPreviousMatchMultiline(e,new o.L(a,e.getLineMaxColumn(a)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const r=e.getLineCount(),o=t.lineNumber,s=e.getLineContent(o).substring(0,t.column-1),a=this._findLastMatchInLine(i,s,o,n);if(a)return a;for(let t=1;t<=r;t++){const s=(r+o-t-1)%r,a=e.getLineContent(s+1),l=this._findLastMatchInLine(i,a,s+1,n);if(l)return l}return null}static _findLastMatchInLine(e,t,i,n){let r,o=null;for(e.reset(0);r=e.next(t);)o=c(new s.e(i,r.index+1,i,r.index+1+r[0].length),r,n);return o}}function u(e,t,i,n,r){return function(e,t,i,n,r){if(0===n)return!0;const o=t.charCodeAt(n-1);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(r>0){const i=t.charCodeAt(n);if(0!==e.get(i))return!0}return!1}(e,t,0,n,r)&&function(e,t,i,n,r){if(n+r===i)return!0;const o=t.charCodeAt(n+r);if(0!==e.get(o))return!0;if(13===o||10===o)return!0;if(r>0){const i=t.charCodeAt(n+r-1);if(0!==e.get(i))return!0}return!1}(e,t,i,n,r)}class g{constructor(e,t){this._wordSeparators=e,this._searchRegex=t,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const t=e.length;let i;do{if(this._prevMatchStartIndex+this._prevMatchLength===t)return null;if(i=this._searchRegex.exec(e),!i)return null;const r=i.index,o=i[0].length;if(r===this._prevMatchStartIndex&&o===this._prevMatchLength){if(0===o){n.ZH(e,t,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=r,this._prevMatchLength=o,!this._wordSeparators||u(this._wordSeparators,e,t,r,o))return i}while(i);return null}}},9616:(e,t,i)=>{"use strict";function n(e,t){let i=0,n=0;const r=e.length;for(;nn})},4319:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(2065).yh)("editorWorkerService")},9510:(e,t,i)=>{"use strict";i.d(t,{OG:()=>x,ML:()=>b,KO:()=>w,Jc:()=>v,Vl:()=>p,Vj:()=>m});var n=i(1050),r=i(7301),o=i(666),s=i(3733),a=i(4565),l=i(8401),c=i(3060),h=i(1432);function d(e){const t=new Uint32Array(function(e){let t=0;if(t+=2,"full"===e.type)t+=1+e.data.length;else{t+=1,t+=3*e.deltas.length;for(const i of e.deltas)i.data&&(t+=i.data.length)}return t}(e));let i=0;if(t[i++]=e.id,"full"===e.type)t[i++]=1,t[i++]=e.data.length,t.set(e.data,i),i+=e.data.length;else{t[i++]=2,t[i++]=e.deltas.length;for(const n of e.deltas)t[i++]=n.start,t[i++]=n.deleteCount,n.data?(t[i++]=n.data.length,t.set(n.data,i),i+=n.data.length):t[i++]=0}return function(e){const t=new Uint8Array(e.buffer,e.byteOffset,4*e.length);return h.r()||function(e){for(let t=0,i=e.length;t0?i[0]:[]}(e,t),s=yield Promise.all(o.map((e=>f(this,void 0,void 0,(function*(){let o,s=null;try{o=yield e.provideDocumentSemanticTokens(t,e===i?n:null,r)}catch(e){s=e,o=null}return o&&(p(o)||m(o))||(o=null),new _(e,o,s)})))));for(const e of s){if(e.error)throw e.error;if(e.tokens)return e}return s.length>0?s[0]:null}))}class y{constructor(e,t){this.provider=e,this.tokens=t}}function w(e,t){return e.has(t)}function C(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:[]}function x(e,t,i,n){return f(this,void 0,void 0,(function*(){const o=C(e,t),s=yield Promise.all(o.map((e=>f(this,void 0,void 0,(function*(){let o;try{o=yield e.provideDocumentRangeSemanticTokens(t,i,n)}catch(e){(0,r.Cp)(e),o=null}return o&&p(o)||(o=null),new y(e,o)})))));for(const e of s)if(e.tokens)return e;return s.length>0?s[0]:null}))}a.P0.registerCommand("_provideDocumentSemanticTokensLegend",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,l.p_)(i instanceof o.o);const n=e.get(s.q).getModel(i);if(!n)return;const{documentSemanticTokensProvider:r}=e.get(g.p),c=function(e,t){const i=e.orderedGroups(t);return i.length>0?i[0]:null}(r,n);return c?c[0].getLegend():e.get(a.Hy).executeCommand("_provideDocumentRangeSemanticTokensLegend",i)})))),a.P0.registerCommand("_provideDocumentSemanticTokens",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i]=t;(0,l.p_)(i instanceof o.o);const r=e.get(s.q).getModel(i);if(!r)return;const{documentSemanticTokensProvider:c}=e.get(g.p);if(!v(c,r))return e.get(a.Hy).executeCommand("_provideDocumentRangeSemanticTokens",i,r.getFullModelRange());const h=yield b(c,r,null,null,n.T.None);if(!h)return;const{provider:u,tokens:f}=h;if(!f||!p(f))return;const m=d({id:0,type:"full",data:f.data});return f.resultId&&u.releaseDocumentSemanticTokens(f.resultId),m})))),a.P0.registerCommand("_provideDocumentRangeSemanticTokensLegend",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i,r]=t;(0,l.p_)(i instanceof o.o);const a=e.get(s.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(g.p),h=C(c,a);if(0===h.length)return;if(1===h.length)return h[0].getLegend();if(!r||!u.e.isIRange(r))return console.warn("provideDocumentRangeSemanticTokensLegend might be out-of-sync with provideDocumentRangeSemanticTokens unless a range argument is passed in"),h[0].getLegend();const d=yield x(c,a,u.e.lift(r),n.T.None);return d?d.provider.getLegend():void 0})))),a.P0.registerCommand("_provideDocumentRangeSemanticTokens",((e,...t)=>f(void 0,void 0,void 0,(function*(){const[i,r]=t;(0,l.p_)(i instanceof o.o),(0,l.p_)(u.e.isIRange(r));const a=e.get(s.q).getModel(i);if(!a)return;const{documentRangeSemanticTokensProvider:c}=e.get(g.p),h=yield x(c,a,u.e.lift(r),n.T.None);return h&&h.tokens?d({id:0,type:"full",data:h.tokens.data}):void 0}))))},8191:(e,t,i)=>{"use strict";i.d(t,{A:()=>c});var n=i(9954),r=i(3702),o=i(9870),s=i(5026),a=i(2065),l=i(3557);const c=(0,a.yh)("ILanguageFeatureDebounceService");var h;!function(e){const t=new WeakMap;let i=0;e.of=function(e){let n=t.get(e);return void 0===n&&(n=++i,t.set(e,n)),n}}(h||(h={}));class d{constructor(e,t,i,n,o,s){this._logService=e,this._name=t,this._registry=i,this._default=n,this._min=o,this._max=s,this._cache=new r.z6(50,.7)}_key(e){return e.id+this._registry.all(e).reduce(((e,t)=>(0,n.SP)(h.of(t),e)),0)}get(e){const t=this._key(e),i=this._cache.get(t);return i?(0,o.uZ)(i.value,this._min,this._max):this.default()}update(e,t){const i=this._key(e);let n=this._cache.get(i);n||(n=new o.N(6),this._cache.set(i,n));const r=(0,o.uZ)(n.update(t),this._min,this._max);return this._logService.trace(`[DEBOUNCE: ${this._name}] for ${e.uri.toString()} is ${r}ms`),r}_overall(){const e=new o.nM;for(const[,t]of this._cache)e.update(t.value);return e.value}default(){const e=0|this._overall()||this._default;return(0,o.uZ)(e,this._min,this._max)}}let u=class{constructor(e){this._logService=e,this._data=new Map}for(e,t,i){var n,r,o;const s=null!==(n=null==i?void 0:i.min)&&void 0!==n?n:50,a=null!==(r=null==i?void 0:i.max)&&void 0!==r?r:Math.pow(s,2),l=null!==(o=null==i?void 0:i.key)&&void 0!==o?o:void 0,c=`${h.of(e)},${s}${l?","+l:""}`;let u=this._data.get(c);return u||(u=new d(this._logService,t,e,0|this._overallAverage()||1.5*s,s,a),this._data.set(c,u)),u}_overallAverage(){let e=new o.nM;for(let t of this._data.values())e.update(t.default());return e.value}};var g,f;u=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(g=0,f=l.VZ,function(e,t){f(e,t,g)})],u),(0,s.z)(c,u,!0)},1922:(e,t,i)=>{"use strict";i.d(t,{p:()=>n});const n=(0,i(2065).yh)("ILanguageFeaturesService")},6357:(e,t,i)=>{"use strict";i.d(t,{i:()=>n});const n=(0,i(2065).yh)("markerDecorationsService")},3733:(e,t,i)=>{"use strict";i.d(t,{q:()=>n});const n=(0,i(2065).yh)("modelService")},1200:(e,t,i)=>{"use strict";i.d(t,{b$:()=>P,e3:()=>F,tw:()=>B});var n=i(4669),r=i(5976),o=i(1432),s=i(7301),a=i(3084),l=i(2075),c=i(8801),h=i(2042),d=i(3733),u=i(1765),g=i(3108),f=i(5393),p=i(1050),m=i(7781),_=i(3557),v=i(4862),b=i(9954),y=i(5215),w=i(6663),C=i(8802),x=i(9510),S=i(6248),k=i(9381),L=i(8191),N=i(4013),E=i(1922),D=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},A=function(e,t){return function(i,n){t(i,n,e)}};function T(e){return e.toString()}function I(e){const t=new b.yP,i=e.createSnapshot();let n;for(;n=i.read();)t.update(n);return t.digest()}class M{constructor(e,t,i){this._modelEventListeners=new r.SL,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose((()=>t(e)))),this._modelEventListeners.add(e.onDidChangeLanguage((t=>i(e,t))))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange((()=>this.model.setMode(e.languageId))),this.model.setMode(e.languageId)}}const O=o.IJ||o.dz?1:2;class R{constructor(e,t,i,n,r,o,s,a){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=r,this.sha1=o,this.versionId=s,this.alternativeVersionId=a}}let P=class e extends r.JT{constructor(e,t,i,r,o,s,a,l,c){super(),this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=r,this._undoRedoService=o,this._languageService=s,this._languageConfigurationService=a,this._languageFeatureDebounceService=l,this._onModelAdded=this._register(new n.Q5),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new n.Q5),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new n.Q5),this.onModelLanguageChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new V(this._themeService,this._languageService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration((()=>this._updateModelOptions()))),this._updateModelOptions(),this._register(new W(this._semanticStyling,this,this._themeService,this._configurationService,this._languageFeatureDebounceService,c))}static _readModelOptions(e,t){var i;let n=l.D.tabSize;if(e.editor&&void 0!==e.editor.tabSize){const t=parseInt(e.editor.tabSize,10);isNaN(t)||(n=t),n<1&&(n=1)}let r=n;if(e.editor&&void 0!==e.editor.indentSize&&"tabSize"!==e.editor.indentSize){const t=parseInt(e.editor.indentSize,10);isNaN(t)||(r=t),r<1&&(r=1)}let o=l.D.insertSpaces;e.editor&&void 0!==e.editor.insertSpaces&&(o="false"!==e.editor.insertSpaces&&Boolean(e.editor.insertSpaces));let s=O;const a=e.eol;"\r\n"===a?s=2:"\n"===a&&(s=1);let c=l.D.trimAutoWhitespace;e.editor&&void 0!==e.editor.trimAutoWhitespace&&(c="false"!==e.editor.trimAutoWhitespace&&Boolean(e.editor.trimAutoWhitespace));let h=l.D.detectIndentation;e.editor&&void 0!==e.editor.detectIndentation&&(h="false"!==e.editor.detectIndentation&&Boolean(e.editor.detectIndentation));let d=l.D.largeFileOptimizations;e.editor&&void 0!==e.editor.largeFileOptimizations&&(d="false"!==e.editor.largeFileOptimizations&&Boolean(e.editor.largeFileOptimizations));let u=l.D.bracketPairColorizationOptions;return(null===(i=e.editor)||void 0===i?void 0:i.bracketPairColorization)&&"object"==typeof e.editor.bracketPairColorization&&(u={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:n,indentSize:r,insertSpaces:o,detectIndentation:h,defaultEOL:s,trimAutoWhitespace:c,largeFileOptimizations:d,bracketPairColorizationOptions:u}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&"string"==typeof i&&"auto"!==i?i:3===o.OS||2===o.OS?"\n":"\r\n"}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return"boolean"!=typeof e||e}getCreationOptions(t,i,n){let r=this._modelCreationOptionsByLanguageAndResource[t+i];if(!r){const o=this._configurationService.getValue("editor",{overrideIdentifier:t,resource:i}),s=this._getEOL(i,t);r=e._readModelOptions({editor:o,eol:s},n),this._modelCreationOptionsByLanguageAndResource[t+i]=r}return r}_updateModelOptions(){const t=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const i=Object.keys(this._models);for(let n=0,r=i.length;ne){const t=[];for(this._disposedModels.forEach((e=>{e.sharesUndoRedoStack||t.push(e)})),t.sort(((e,t)=>e.time-t.time));t.length>0&&this._disposedModelsHeapSize>e;){const e=t.shift();this._removeDisposedModel(e.uri),null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const r=this.getCreationOptions(t,i,n),o=new a.yO(e,t,r,i,this._undoRedoService,this._languageService,this._languageConfigurationService);if(i&&this._disposedModels.has(T(i))){const e=this._removeDisposedModel(i),t=this._undoRedoService.getElements(i),n=I(o)===e.sha1;if(n||e.sharesUndoRedoStack){for(const e of t.past)(0,y.e9)(e)&&e.matchesResource(i)&&e.setModel(o);for(const e of t.future)(0,y.e9)(e)&&e.matchesResource(i)&&e.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,(e=>(0,y.e9)(e)&&e.matchesResource(i))),n&&(o._overwriteVersionId(e.versionId),o._overwriteAlternativeVersionId(e.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(e.initialUndoRedoSnapshot))}else null!==e.initialUndoRedoSnapshot&&this._undoRedoService.restoreSnapshot(e.initialUndoRedoSnapshot)}const s=T(o.uri);if(this._models[s])throw new Error("ModelService: Cannot add model because it already exists!");const l=new M(o,(e=>this._onWillDispose(e)),((e,t)=>this._onDidChangeLanguage(e,t)));return this._models[s]=l,l}createModel(e,t,i,n=!1){let r;return t?(r=this._createModelData(e,t.languageId,i,n),this.setMode(r.model,t)):r=this._createModelData(e,c.bd,i,n),this._onModelAdded.fire(r.model),r.model}setMode(e,t){if(!t)return;const i=this._models[T(e.uri)];i&&i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i0||e.future.length>0){for(const i of e.past)(0,y.e9)(i)&&i.matchesResource(t.uri)&&(o=!0,s+=i.heapSize(t.uri),i.setModel(t.uri));for(const i of e.future)(0,y.e9)(i)&&i.matchesResource(t.uri)&&(o=!0,s+=i.heapSize(t.uri),i.setModel(t.uri))}}const a=e.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(o)if(!r&&s>a){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}else this._ensureDisposedModelsHeapSize(a-s),this._undoRedoService.setElementsValidFlag(t.uri,!1,(e=>(0,y.e9)(e)&&e.matchesResource(t.uri))),this._insertDisposedModel(new R(t.uri,n.model.getInitialUndoRedoSnapshot(),Date.now(),r,s,I(t),t.getVersionId(),t.getAlternativeVersionId()));else if(!r){const e=n.model.getInitialUndoRedoSnapshot();null!==e&&this._undoRedoService.restoreSnapshot(e)}delete this._models[i],n.dispose(),delete this._modelCreationOptionsByLanguageAndResource[t.getLanguageId()+t.uri],this._onModelRemoved.fire(t)}_onDidChangeLanguage(t,i){const n=i.oldLanguage,r=t.getLanguageId(),o=this.getCreationOptions(n,t.uri,t.isForSimpleWidget),s=this.getCreationOptions(r,t.uri,t.isForSimpleWidget);e._setModelOptionsForModel(t,s,o),this._onModelModeChanged.fire({model:t,oldLanguageId:n})}};P.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20971520,P=D([A(0,g.Ui),A(1,u.y),A(2,m.XE),A(3,_.VZ),A(4,v.tJ),A(5,h.O),A(6,k.c_),A(7,L.A),A(8,E.p)],P);const F="editor.semanticHighlighting";function B(e,t,i){var n;const r=null===(n=i.getValue(F,{overrideIdentifier:e.getLanguageId(),resource:e.uri}))||void 0===n?void 0:n.enabled;return"boolean"==typeof r?r:t.getColorTheme().semanticHighlighting}let W=class extends r.JT{constructor(e,t,i,n,r,o){super(),this._watchers=Object.create(null),this._semanticStyling=e;const s=e=>{this._watchers[e.uri.toString()]=new H(e,this._semanticStyling,i,r,o)},a=(e,t)=>{t.dispose(),delete this._watchers[e.uri.toString()]},l=()=>{for(let e of t.getModels()){const t=this._watchers[e.uri.toString()];B(e,i,n)?t||s(e):t&&a(e,t)}};this._register(t.onModelAdded((e=>{B(e,i,n)&&s(e)}))),this._register(t.onModelRemoved((e=>{const t=this._watchers[e.uri.toString()];t&&a(e,t)}))),this._register(n.onDidChangeConfiguration((e=>{e.affectsConfiguration(F)&&l()}))),this._register(i.onDidColorThemeChange(l))}};W=D([A(1,d.q),A(2,m.XE),A(3,g.Ui),A(4,L.A),A(5,E.p)],W);class V extends r.JT{constructor(e,t,i){super(),this._themeService=e,this._languageService=t,this._logService=i,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange((()=>{this._caches=new WeakMap})))}get(e){return this._caches.has(e)||this._caches.set(e,new C.$(e.getLegend(),this._themeService,this._languageService,this._logService)),this._caches.get(e)}}class z{constructor(e,t,i){this.provider=e,this.resultId=t,this.data=i}dispose(){this.provider.releaseDocumentSemanticTokens(this.resultId)}}let H=class e extends r.JT{constructor(t,i,n,o,s){super(),this._isDisposed=!1,this._model=t,this._semanticStyling=i,this._provider=s.documentSemanticTokensProvider,this._debounceInformation=o.for(this._provider,"DocumentSemanticTokens",{min:e.REQUEST_MIN_DELAY,max:e.REQUEST_MAX_DELAY}),this._fetchDocumentSemanticTokens=this._register(new f.pY((()=>this._fetchDocumentSemanticTokensNow()),e.REQUEST_MIN_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent((()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(this._model.onDidChangeLanguage((()=>{this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(0)})));const a=()=>{(0,r.B9)(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const e of this._provider.all(t))"function"==typeof e.onDidChange&&this._documentProvidersChangeListeners.push(e.onDidChange((()=>this._fetchDocumentSemanticTokens.schedule(0))))};a(),this._register(this._provider.onDidChange((()=>{a(),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._register(n.onDidColorThemeChange((e=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))}))),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;if(!(0,x.Jc)(this._provider,this._model))return void(this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1));const e=new p.A,t=this._currentDocumentResponse?this._currentDocumentResponse.provider:null,i=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,n=(0,x.ML)(this._provider,this._model,t,i,e.token);this._currentDocumentRequestCancellationTokenSource=e;const r=[],o=this._model.onDidChangeContent((e=>{r.push(e)})),a=new N.G(!1);n.then((e=>{if(this._debounceInformation.update(this._model,a.elapsed()),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),e){const{provider:t,tokens:i}=e,n=this._semanticStyling.get(t);this._setDocumentSemanticTokens(t,i||null,n,r)}else this._setDocumentSemanticTokens(null,null,null,r)}),(e=>{e&&(s.n2(e)||"string"==typeof e.message&&-1!==e.message.indexOf("busy"))||s.dL(e),this._currentDocumentRequestCancellationTokenSource=null,o.dispose(),r.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model)))}))}static _copy(e,t,i,n,r){for(let o=0;o{r.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule(this._debounceInformation.get(this._model))};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed)t&&i&&t.releaseDocumentSemanticTokens(i.resultId);else if(t&&n){if(!i)return this._model.setSemanticTokens(null,!0),void s();if((0,x.Vj)(i)){if(!o)return void this._model.setSemanticTokens(null,!0);if(0===i.edits.length)i={resultId:i.resultId,data:o.data};else{let t=0;for(const e of i.edits)t+=(e.data?e.data.length:0)-e.deleteCount;const n=o.data,r=new Uint32Array(n.length+t);let s=n.length,a=r.length;for(let t=i.edits.length-1;t>=0;t--){const o=i.edits[t],l=s-(o.start+o.deleteCount);l>0&&(e._copy(n,s-l,r,a-l,l),a-=l),o.data&&(e._copy(o.data,0,r,a-o.data.length,o.data.length),a-=o.data.length),s=o.start}s>0&&e._copy(n,0,r,0,s),i={resultId:i.resultId,data:r}}}if((0,x.Vl)(i)){this._currentDocumentResponse=new z(t,i.resultId,i.data);const e=(0,C.h)(i,n,this._model.getLanguageId());if(r.length>0)for(const t of r)for(const i of e)for(const e of t.changes)i.applyEdit(e.range,e.text);this._model.setSemanticTokens(e,!0)}else this._model.setSemanticTokens(null,!0);s()}else this._model.setSemanticTokens(null,!1)}};H.REQUEST_MIN_DELAY=300,H.REQUEST_MAX_DELAY=2e3,H=D([A(2,m.XE),A(3,L.A),A(4,E.p)],H)},8216:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const n=(0,i(2065).yh)("textModelService")},8802:(e,t,i)=>{"use strict";i.d(t,{$:()=>f,h:()=>p});var n=i(6887),r=i(7781),o=i(3557),s=i(187),a=i(4314),l=i(3795);class c{constructor(e,t){this._startLineNumber=e,this._tokens=t,this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}static create(e,t){return new c(e,new h(t))}get startLineNumber(){return this._startLineNumber}get endLineNumber(){return this._endLineNumber}toString(){return this._tokens.toString(this._startLineNumber)}_updateEndLineNumber(){this._endLineNumber=this._startLineNumber+this._tokens.getMaxDeltaLine()}isEmpty(){return this._tokens.isEmpty()}getLineTokens(e){return this._startLineNumber<=e&&e<=this._endLineNumber?this._tokens.getLineTokens(e-this._startLineNumber):null}getRange(){const e=this._tokens.getRange();return e?new a.e(this._startLineNumber+e.startLineNumber,e.startColumn,this._startLineNumber+e.endLineNumber,e.endColumn):e}removeTokens(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;this._startLineNumber+=this._tokens.removeTokens(t,e.startColumn-1,i,e.endColumn-1),this._updateEndLineNumber()}split(e){const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber,[n,r,o]=this._tokens.split(t,e.startColumn-1,i,e.endColumn-1);return[new c(this._startLineNumber,n),new c(this._startLineNumber+o,r)]}applyEdit(e,t){const[i,n,r]=(0,l.Q)(t);this.acceptEdit(e,i,n,r,t.length>0?t.charCodeAt(0):0)}acceptEdit(e,t,i,n,r){this._acceptDeleteRange(e),this._acceptInsertText(new s.L(e.startLineNumber,e.startColumn),t,i,n,r),this._updateEndLineNumber()}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return;const t=e.startLineNumber-this._startLineNumber,i=e.endLineNumber-this._startLineNumber;if(i<0){const e=i-t;return void(this._startLineNumber-=e)}const n=this._tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1)return this._startLineNumber=0,void this._tokens.clear();if(t<0){const n=-t;this._startLineNumber-=n,this._tokens.acceptDeleteRange(e.startColumn-1,0,0,i,e.endColumn-1)}else this._tokens.acceptDeleteRange(0,t,e.startColumn-1,i,e.endColumn-1)}}_acceptInsertText(e,t,i,n,r){if(0===t&&0===i)return;const o=e.lineNumber-this._startLineNumber;o<0?this._startLineNumber+=t:o>=this._tokens.getMaxDeltaLine()+1||this._tokens.acceptInsertText(o,e.column-1,t,i,n,r)}}class h{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){const t=[];for(let i=0;ie)){let r=n;for(;r>t&&this._getDeltaLine(r-1)===e;)r--;let o=n;for(;oe||h===e&&u>=t)&&(he||h===e&&g>=t){if(hr?f-=r-i:f=i;else if(u===t&&g===i){if(!(u===n&&f>r)){c=!0;continue}f-=r-i}else if(ur)){c=!0;continue}u===t?(g=i,f=g+(f-r)):(g=0,f=g+(f-r))}else if(u>n){if(0===a&&!c){l=s;break}u-=a}else{if(!(u===n&&g>=r))throw new Error("Not possible!");e&&0===u&&(g+=e,f+=e),u-=a,g-=r-i,f-=r-i}const m=4*l;o[m]=u,o[m+1]=g,o[m+2]=f,o[m+3]=p,l++}this._tokenCount=l}acceptInsertText(e,t,i,n,r,o){const s=0===i&&1===n&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),a=this._tokens,l=this._tokenCount;for(let o=0;o0&&t>=1;e>0&&this._logService.getLevel()===o.in.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),l.push("not-in-legend"));const n=this._themeService.getColorTheme().getTokenStyleMetadata(s,l,i);void 0===n?a=2147483647:(a=0,void 0!==n.italic&&(a|=1|(n.italic?1:0)<<10),void 0!==n.bold&&(a|=2|(n.bold?2:0)<<10),void 0!==n.underline&&(a|=4|(n.underline?4:0)<<10),void 0!==n.strikethrough&&(a|=8|(n.strikethrough?8:0)<<10),n.foreground&&(a|=16|n.foreground<<14),0===a&&(a=2147483647))}else this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),a=2147483647,s="not-in-legend";this._hashTable.add(e,t,r,a),this._logService.getLevel()===o.in.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${s}) / ${t} (${l.join(" ")}): foreground ${n.NX.getForeground(a)}, fontStyle ${n.NX.getFontStyle(a).toString(2)}`)}return a}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}};function p(e,t,i){const n=e.data,r=e.data.length/5|0,o=Math.max(Math.ceil(r/1024),400),s=[];let a=0,l=1,h=0;for(;ae&&0===n[5*t];)t--;if(t-1===e){let e=d;for(;e+1c&&(t.warnOverlappingSemanticTokens(s,c+1),m=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([g(1,r.XE),g(2,u.O),g(3,o.VZ)],f);class m{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class _{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i=this._growCount){const e=this._elements;this._currentLengthIndex++,this._currentLength=_._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<_._SIZES.length?2/3*this._currentLength:0),this._elements=[],_._nullOutEntries(this._elements,this._currentLength);for(const t of e){let e=t;for(;e;){const t=e.next;e.next=null,this._add(e),e=t}}}this._add(new m(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}_._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143]},1765:(e,t,i)=>{"use strict";i.d(t,{V:()=>r,y:()=>o});var n=i(2065);const r=(0,n.yh)("textResourceConfigurationService"),o=(0,n.yh)("textResourcePropertiesService")},1446:(e,t,i)=>{"use strict";i.d(t,{a:()=>l});var n=i(4314),r=i(7277),o=i(5924),s=i(8401),a=i(270);class l{static computeUnicodeHighlights(e,t,i){const l=i?i.startLineNumber:1,h=i?i.endLineNumber:e.getLineCount(),d=new c(t),u=d.getCandidateCodePoints();let g;var f;g="allNonBasicAscii"===u?new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):new RegExp((f=Array.from(u),`[${o.ec(f.map((e=>String.fromCodePoint(e))).join(""))}]`),"g");const p=new r.sz(null,g),m=[];let _,v=!1,b=0,y=0,w=0;e:for(let t=l,i=h;t<=i;t++){const i=e.getLineContent(t),r=i.length;p.reset(0);do{if(_=p.next(i),_){let e=_.index,l=_.index+_[0].length;if(e>0){const t=i.charCodeAt(e-1);o.ZG(t)&&e--}if(l+1=i){v=!0;break e}m.push(new n.e(t,e+1,t,l+1))}}}while(_)}return{ranges:m,hasMore:v,ambiguousCharacterCount:b,invisibleCharacterCount:y,nonBasicAsciiCharacterCount:w}}static computeUnicodeHighlightReason(e,t){const i=new c(t);switch(i.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const n=e.codePointAt(0),r=i.ambiguousCharacters.getPrimaryConfusable(n),s=o.ZK.getLocales().filter((e=>!o.ZK.getInstance(new Set([...t.allowedLocales,e])).isAmbiguous(n)));return{kind:0,confusableWith:String.fromCodePoint(r),notAmbiguousInLocales:s}}case 1:return{kind:2}}}}class c{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=o.ZK.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const t of o.vU.codePoints)h(String.fromCodePoint(t))||e.add(t);if(this.options.ambiguousCharacters)for(const t of this.ambiguousCharacters.getConfusableCodePoints())e.add(t);for(const t of this.allowedCodePoints)e.delete(t);return e}shouldHighlightNonBasicASCII(e,t){const i=e.codePointAt(0);if(this.allowedCodePoints.has(i))return 0;if(this.options.nonBasicASCII)return 1;let n=!1,r=!1;if(t)for(let e of t){const t=e.codePointAt(0),i=o.$i(e);n=n||i,i||this.ambiguousCharacters.isAmbiguous(t)||o.vU.isInvisibleCharacter(t)||(r=!0)}return!n&&r?0:this.options.invisibleCharacters&&!h(e)&&o.vU.isInvisibleCharacter(i)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(i)?3:0}}function h(e){return" "===e||"\n"===e||"\t"===e}},913:(e,t,i)=>{"use strict";i.d(t,{B8:()=>c,Oe:()=>n,UX:()=>a,aq:()=>l,iN:()=>d,ld:()=>s,qq:()=>o,ug:()=>r,xi:()=>h});var n,r,o,s,a,l,c,h,d,u=i(3580);!function(e){e.noSelection=u.N("noSelection","No selection"),e.singleSelectionRange=u.N("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),e.singleSelection=u.N("singleSelection","Line {0}, Column {1}"),e.multiSelectionRange=u.N("multiSelectionRange","{0} selections ({1} characters selected)"),e.multiSelection=u.N("multiSelection","{0} selections"),e.emergencyConfOn=u.N("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),e.openingDocs=u.N("openingDocs","Now opening the Editor Accessibility documentation page."),e.readonlyDiffEditor=u.N("readonlyDiffEditor"," in a read-only pane of a diff editor."),e.editableDiffEditor=u.N("editableDiffEditor"," in a pane of a diff editor."),e.readonlyEditor=u.N("readonlyEditor"," in a read-only code editor"),e.editableEditor=u.N("editableEditor"," in a code editor"),e.changeConfigToOnMac=u.N("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),e.changeConfigToOnWinLinux=u.N("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),e.auto_on=u.N("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),e.auto_off=u.N("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),e.tabFocusModeOnMsg=u.N("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),e.tabFocusModeOnMsgNoKb=u.N("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."),e.tabFocusModeOffMsg=u.N("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),e.tabFocusModeOffMsgNoKb=u.N("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),e.openDocMac=u.N("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),e.openDocWinLinux=u.N("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),e.outroMsg=u.N("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),e.showAccessibilityHelpAction=u.N("showAccessibilityHelpAction","Show Accessibility Help")}(n||(n={})),function(e){e.inspectTokensAction=u.N("inspectTokens","Developer: Inspect Tokens")}(r||(r={})),function(e){e.gotoLineActionLabel=u.N("gotoLineActionLabel","Go to Line/Column...")}(o||(o={})),function(e){e.helpQuickAccessActionLabel=u.N("helpQuickAccess","Show all Quick Access Providers")}(s||(s={})),function(e){e.quickCommandActionLabel=u.N("quickCommandActionLabel","Command Palette"),e.quickCommandHelp=u.N("quickCommandActionHelp","Show And Run Commands")}(a||(a={})),function(e){e.quickOutlineActionLabel=u.N("quickOutlineActionLabel","Go to Symbol..."),e.quickOutlineByCategoryActionLabel=u.N("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")}(l||(l={})),function(e){e.editorViewAccessibleLabel=u.N("editorViewAccessibleLabel","Editor content"),e.accessibilityHelpMessage=u.N("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")}(c||(c={})),function(e){e.toggleHighContrast=u.N("toggleHighContrast","Toggle High Contrast Theme")}(h||(h={})),function(e){e.bulkEditServiceSummary=u.N("bulkEditServiceSummary","Made {0} edits in {1} files")}(d||(d={}))},4706:(e,t,i)=>{"use strict";i.d(t,{CZ:()=>l,D8:()=>h,Jx:()=>n,Tx:()=>a,dQ:()=>c,fV:()=>d,gk:()=>r,lN:()=>s,rU:()=>o});class n{constructor(){this.changeType=1}}class r{constructor(e,t,i,n,r){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=r}static applyInjectedText(e,t){if(!t||0===t.length)return e;let i="",n=0;for(const r of t)i+=e.substring(n,r.column-1),n=r.column-1,i+=r.options.content;return i+=e.substring(n),i}static fromDecorations(e){const t=[];for(const i of e)i.options.before&&i.options.before.content.length>0&&t.push(new r(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new r(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column===t.column?e.order-t.order:e.column-t.column:e.lineNumber-t.lineNumber)),t}}class o{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class s{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class a{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class l{constructor(){this.changeType=5}}class c{constructor(e,t,i,n){this.changes=e,this.versionId=t,this.isUndoing=i,this.isRedoing=n,this.resultingSelection=null}containsEvent(e){for(let t=0,i=this.changes.length;t{"use strict";var n;i.d(t,{UO:()=>r,s6:()=>n,vW:()=>o}),function(e){e[e.Disabled=0]="Disabled",e[e.EnabledForActive=1]="EnabledForActive",e[e.Enabled=2]="Enabled"}(n||(n={}));class r{constructor(e,t,i){this.visibleColumn=e,this.className=t,this.horizontalLine=i}}class o{constructor(e,t){this.top=e,this.endColumn=t}}},7378:(e,t,i)=>{"use strict";i.d(t,{A:()=>r});var n=i(6887);class r{constructor(e,t,i){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t,this._languageIdCodec=i}static createEmpty(e,t){const i=r.defaultTokenMetadata,n=new Uint32Array(2);return n[0]=e.length,n[1]=i,new r(n,e,t)}equals(e){return e instanceof r&&this.slicedEquals(e,0,this._tokensCount)}slicedEquals(e,t,i){if(this._text!==e._text)return!1;if(this._tokensCount!==e._tokensCount)return!1;const n=t<<1,r=n+(i<<1);for(let t=n;t0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[1+(e<<1)]}getLanguageId(e){const t=this._tokens[1+(e<<1)],i=n.NX.getLanguageId(t);return this._languageIdCodec.decodeLanguageId(i)}getStandardTokenType(e){const t=this._tokens[1+(e<<1)];return n.NX.getTokenType(t)}getForeground(e){const t=this._tokens[1+(e<<1)];return n.NX.getForeground(t)}getClassName(e){const t=this._tokens[1+(e<<1)];return n.NX.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[1+(e<<1)];return n.NX.getInlineStyleFromMetadata(i,t)}getPresentation(e){const t=this._tokens[1+(e<<1)];return n.NX.getPresentationFromMetadata(t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return r.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new o(this,e,t,i)}static convertToEndOffset(e,t){const i=(e.length>>>1)-1;for(let t=0;t>>1)-1;for(;it&&(n=r)}return i}withInserted(e){if(0===e.length)return this;let t=0,i=0,n="";const o=new Array;let s=0;for(;;){const r=ts){n+=this._text.substring(s,a.offset);const e=this._tokens[1+(t<<1)];o.push(n.length,e),s=a.offset}n+=a.text,o.push(n.length,a.tokenMetadata),i++}}return new r(new Uint32Array(o),n,this._languageIdCodec)}}r.defaultTokenMetadata=16793600;class o{constructor(e,t,i,n){this._source=e,this._startOffset=t,this._endOffset=i,this._deltaOffset=n,this._firstTokenIndex=e.findTokenIndexAtOffset(t),this._tokensCount=0;for(let t=this._firstTokenIndex,n=e.getCount();t=i);t++)this._tokensCount++}getMetadata(e){return this._source.getMetadata(this._firstTokenIndex+e)}getLanguageId(e){return this._source.getLanguageId(this._firstTokenIndex+e)}getLineContent(){return this._source.getLineContent().substring(this._startOffset,this._endOffset)}equals(e){return e instanceof o&&this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount)}getCount(){return this._tokensCount}getForeground(e){return this._source.getForeground(this._firstTokenIndex+e)}getEndOffset(e){const t=this._source.getEndOffset(this._firstTokenIndex+e);return Math.min(this._endOffset,t)-this._startOffset+this._deltaOffset}getClassName(e){return this._source.getClassName(this._firstTokenIndex+e)}getInlineStyle(e,t){return this._source.getInlineStyle(this._firstTokenIndex+e,t)}getPresentation(e){return this._source.getPresentation(this._firstTokenIndex+e)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}},2550:(e,t,i)=>{"use strict";i.d(t,{Kp:()=>r,k:()=>a});var n=i(5924);class r{constructor(e,t,i,n){this.startColumn=e,this.endColumn=t,this.className=i,this.type=n,this._lineDecorationBrand=void 0}static _equals(e,t){return e.startColumn===t.startColumn&&e.endColumn===t.endColumn&&e.className===t.className&&e.type===t.type}static equalsArr(e,t){const i=e.length;if(i!==t.length)return!1;for(let n=0;n=o||(a[l++]=new r(Math.max(1,t.startColumn-n+1),Math.min(s+1,t.endColumn-n+1),t.className,t.type));return a}static filter(e,t,i,n){if(0===e.length)return[];const o=[];let s=0;for(let a=0,l=e.length;at)continue;if(c.isEmpty()&&(0===l.type||3===l.type))continue;const h=c.startLineNumber===t?c.startColumn:i,d=c.endLineNumber===t?c.endColumn:n;o[s++]=new r(h,d,l.inlineClassName,l.type)}return o}static _typeCompare(e,t){const i=[2,0,1,3];return i[e]-i[t]}static compare(e,t){if(e.startColumn!==t.startColumn)return e.startColumn-t.startColumn;if(e.endColumn!==t.endColumn)return e.endColumn-t.endColumn;const i=r._typeCompare(e.type,t.type);return 0!==i?i:e.className!==t.className?e.className0&&this.stopOffsets[0]0&&t=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class a{static normalize(e,t){if(0===t.length)return[];const i=[],r=new s;let o=0;for(let s=0,a=t.length;s1){const t=e.charCodeAt(l-2);n.ZG(t)&&l--}if(c>1){const t=e.charCodeAt(c-2);n.ZG(t)&&c--}const u=l-1,g=c-2;o=r.consumeLowerThan(u,o,i),0===r.count&&(o=u),r.insert(g,h,d)}return r.consumeLowerThan(1073741824,o,i),i}}},7736:(e,t,i)=>{"use strict";i.d(t,{IJ:()=>l,Nd:()=>c,d1:()=>u,tF:()=>f,zG:()=>a});var n=i(5924),r=i(72),o=i(2550);class s{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(1&this.metadata)}isPseudoAfter(){return!!(4&this.metadata)}}class a{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class l{constructor(e,t,i,n,r,s,a,l,c,h,d,u,g,f,p,m,_,v,b){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=r,this.containsRTL=s,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(o.Kp.compare),this.tabSize=h,this.startVisibleColumn=d,this.spaceWidth=u,this.stopRenderingLineAfter=p,this.renderWhitespace="all"===m?4:"boundary"===m?1:"selection"===m?2:"trailing"===m?3:0,this.renderControlCharacters=_,this.fontLigatures=v,this.selectionsOnLine=b&&b.sort(((e,t)=>e.startOffset>>16}static getCharIndex(e){return(65535&e)>>>0}setColumnInfo(e,t,i,n){const r=(t<<16|i<<0)>>>0;this._data[e-1]=r,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return 0===this._absoluteOffsets.length?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return 0===this.length?0:e<0?this._data[0]:e>=this.length?this._data[this.length-1]:this._data[e]}getDomPosition(e){const t=this.charOffsetToPartData(e-1),i=h.getPartIndex(t),n=h.getCharIndex(t);return new c(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(0===this.length)return 0;const n=(e<<16|i<<0)>>>0;let r=0,o=this.length-1;for(;r+1>>1,t=this._data[e];if(t===n)return e;t>n?o=e:r=e}if(r===o)return r;const s=this._data[r],a=this._data[o];if(s===n)return r;if(a===n)return o;const l=h.getPartIndex(s),c=h.getCharIndex(s);let d;return d=l!==h.getPartIndex(a)?t:h.getCharIndex(a),i-c<=d-i?r:o}}class d{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function u(e,t){if(0===e.lineContent.length){if(e.lineDecorations.length>0){t.appendASCIIString("");let i=0,n=0,r=0;for(const o of e.lineDecorations)1!==o.type&&2!==o.type||(t.appendASCIIString(''),1===o.type&&(r|=1,i++),2===o.type&&(r|=2,n++));t.appendASCIIString("");const o=new h(1,i+n);return o.setColumnInfo(1,i,0,0),new d(o,!1,r)}return t.appendASCIIString(""),new d(new h(0,0),!1,0)}return function(e,t){const i=e.fontIsMonospace,r=e.canUseHalfwidthRightwardsArrow,o=e.containsForeignElements,s=e.lineContent,a=e.len,l=e.isOverflowing,c=e.parts,u=e.fauxIndentLength,g=e.tabSize,f=e.startVisibleColumn,p=e.containsRTL,_=e.spaceWidth,v=e.renderSpaceCharCode,b=e.renderWhitespace,y=e.renderControlCharacters,w=new h(a+1,c.length);let C=!1,x=0,S=f,k=0,L=0,N=0,E=0;p?t.appendASCIIString(''):t.appendASCIIString("");for(let e=0,l=c.length;e=u&&(t+=n)}}for(p&&(t.appendASCIIString(' style="width:'),t.appendASCIIString(String(_*i)),t.appendASCIIString('px"')),t.appendASCII(62);x1?t.write1(8594):t.write1(65515);for(let e=2;e<=i;e++)t.write1(160)}else i=1,t.write1(v);k+=i,x>=u&&(S+=i)}N=i}else{let i=0;for(t.appendASCII(62);x=u&&(S+=a)}N=i}D?L++:L=0,x>=a&&!C&&l.isPseudoAfter()&&(C=!0,w.setColumnInfo(x+1,e,k,E)),t.appendASCIIString("")}return C||w.setColumnInfo(a+1,c.length-1,k,E),l&&t.appendASCIIString(""),t.appendASCIIString(""),new d(w,p,o)}(function(e){const t=e.lineContent;let i,r;-1!==e.stopRenderingLineAfter&&e.stopRenderingLineAfter0&&(n[r++]=new s(t,"",0));for(let o=0,a=e.getCount();o=i){n[r++]=new s(i,l,0);break}n[r++]=new s(a,l,0)}return n}(e.lineTokens,e.fauxIndentLength,r);e.renderControlCharacters&&!e.isBasicASCII&&(a=function(e,t){const i=[];let n=new s(0,"",0),r=0;for(const o of t){const t=o.endIndex;for(;rn.endIndex&&(n=new s(r,o.type,o.metadata),i.push(n)),n=new s(r+1,"mtkcontrol",o.metadata),i.push(n));r>n.endIndex&&(n=new s(t,o.type,o.metadata),i.push(n))}return i}(t,a)),(4===e.renderWhitespace||1===e.renderWhitespace||2===e.renderWhitespace&&e.selectionsOnLine||3===e.renderWhitespace)&&(a=function(e,t,i,r){const o=e.continuesWithWrappedLine,a=e.fauxIndentLength,l=e.tabSize,c=e.startVisibleColumn,h=e.useMonospaceOptimizations,d=e.selectionsOnLine,u=1===e.renderWhitespace,g=3===e.renderWhitespace,f=e.renderSpaceWidth!==e.spaceWidth,p=[];let m=0,_=0,v=r[_].type,b=r[_].endIndex;const y=r.length;let w,C=!1,x=n.LC(t);-1===x?(C=!0,x=i,w=i):w=n.ow(t);let S=!1,k=0,L=d&&d[k],N=c%l;for(let e=a;e=L.endOffset&&(k++,L=d&&d[k]),ew)c=!0;else if(9===o)c=!0;else if(32===o)if(u)if(S)c=!0;else{const n=e+1e),c&&g&&(c=C||e>w),S){if(!c||!h&&N>=l){if(f)for(let t=(m>0?p[m-1].endIndex:a)+1;t<=e;t++)p[m++]=new s(t,"mtkw",1);else p[m++]=new s(e,"mtkw",1);N%=l}}else(e===b||c&&e>a)&&(p[m++]=new s(e,v,0),N%=l);for(9===o?N=l:n.K7(o)?N+=2:N++,S=c;e===b&&(_++,_0?t.charCodeAt(i-1):0,n=i>1?t.charCodeAt(i-2):0;32===e&&32!==n&&9!==n||(E=!0)}else E=!0;if(E)if(f)for(let e=(m>0?p[m-1].endIndex:a)+1;e<=i;e++)p[m++]=new s(e,"mtkw",1);else p[m++]=new s(i,"mtkw",1);else p[m++]=new s(i,v,0);return p}(e,t,r,a));let l=0;if(e.lineDecorations.length>0){for(let t=0,i=e.lineDecorations.length;td&&(d=e.startOffset,c[h++]=new s(d,o,u)),!(e.endOffset+1<=n)){d=n,c[h++]=new s(d,o+" "+e.className,u|e.metadata);break}d=e.endOffset+1,c[h++]=new s(d,o+" "+e.className,u|e.metadata),l++}n>d&&(d=n,c[h++]=new s(d,o,u))}const u=i[i.length-1].endIndex;if(l=50&&(r[o++]=new s(c+1,t,i),h=c+1,c=-1);h!==l&&(r[o++]=new s(l,t,i))}else r[o++]=a;n=l}else for(let e=0,i=t.length;e50){const e=i.type,t=i.metadata,c=Math.ceil(l/50);for(let i=1;i=8234&&e<=8238||e>=8294&&e<=8297||e>=8206&&e<=8207||1564===e}},1118:(e,t,i)=>{"use strict";i.d(t,{$l:()=>d,$t:()=>c,IP:()=>a,SQ:()=>u,Wx:()=>h,l_:()=>o,ud:()=>s,wA:()=>l});var n=i(5924),r=i(4314);class o{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=0|e,this.left=0|t,this.width=0|i,this.height=0|n}}class s{constructor(e,t){this.tabSize=e,this.data=t}}class a{constructor(e,t,i,n,r,o,s){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=r,this.tokens=o,this.inlineDecorations=s}}class l{constructor(e,t,i,n,r,o,s,a,c,h){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=l.isBasicASCII(i,o),this.containsRTL=l.containsRTL(i,this.isBasicASCII,r),this.tokens=s,this.inlineDecorations=a,this.tabSize=c,this.startVisibleColumn=h}static isBasicASCII(e,t){return!t||n.$i(e)}static containsRTL(e,t,i){return!(t||!i)&&n.Ut(e)}}class c{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class h{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new c(new r.e(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class d{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}class u{constructor(e,t,i){this.color=e,this.zIndex=t,this.data=i}static cmp(e,t){return e.zIndex===t.zIndex?e.colort.color?1:0:e.zIndex-t.zIndex}}},665:(e,t,i)=>{"use strict";i.d(t,{EY:()=>r,Tj:()=>o});class n{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=0|e,this.to=0|t,this.colorId=0|i}static compare(e,t){return e.colorId===t.colorId?e.from===t.from?e.to-t.to:e.from-t.from:e.colorId-t.colorId}}class r{constructor(e,t,i,n){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.heightInLines=i,this.color=n,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.heightInLines===t.heightInLines?e.endLineNumber-t.endLineNumber:e.heightInLines-t.heightInLines:e.startLineNumber-t.startLineNumber:e.colori&&(g=i-f);const p=l.color;let m=this._color2Id[p];m||(m=++this._lastAssignedId,this._color2Id[p]=m,this._id2Color[m]=p);const _=new n(g-f,g+f,m);l.setColorZone(_),s.push(_)}return this._colorZonesInvalid=!1,s.sort(n.compare),s}}},168:(e,t,i)=>{"use strict";i.d(t,{$t:()=>c,CU:()=>a,Fd:()=>l,zg:()=>h});var n=i(187),r=i(4314),o=i(1118),s=i(4141);class a{constructor(e,t,i,n,r){this.editorId=e,this.model=t,this.configuration=i,this._linesCollection=n,this._coordinatesConverter=r,this._decorationsCache=Object.create(null),this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}_clearCachedModelDecorationsResolver(){this._cachedModelDecorationsResolver=null,this._cachedModelDecorationsResolverViewRange=null}dispose(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}reset(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onModelDecorationsChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}onLineMappingChanged(){this._decorationsCache=Object.create(null),this._clearCachedModelDecorationsResolver()}_getOrCreateViewModelDecoration(e){const t=e.id;let i=this._decorationsCache[t];if(!i){const s=e.range,a=e.options;let l;if(a.isWholeLine){const e=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(s.startLineNumber,1),0),t=this._coordinatesConverter.convertModelPositionToViewPosition(new n.L(s.endLineNumber,this.model.getLineMaxColumn(s.endLineNumber)),1);l=new r.e(e.lineNumber,e.column,t.lineNumber,t.column)}else l=this._coordinatesConverter.convertModelRangeToViewRange(s,1);i=new o.$l(l,a),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=null!==this._cachedModelDecorationsResolver;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,(0,s.$J)(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber,a=[];let c=0;const h=[];for(let e=i;e<=n;e++)h[e-i]=[];for(let e=0,s=t.length;e1===e))}function h(e,t){return d(e,t.range,(e=>2===e))}function d(e,t,i){for(let n=t.startLineNumber;n<=t.endLineNumber;n++){const r=e.getLineTokens(n),o=n===t.startLineNumber,s=n===t.endLineNumber;let a=o?r.findTokenIndexAtOffset(t.startColumn-1):0;for(;at.endColumn-1);){if(!i(r.getStandardTokenType(a)))return!1;a++}}return!0}},8945:(e,t,i)=>{"use strict";i.r(t),i.d(t,{SelectionAnchorSet:()=>L});var n=i(1588),r=i(9365),o=i(2258),s=i(3379),a=i.n(s),l=i(7795),c=i.n(l),h=i(569),d=i.n(h),u=i(3565),g=i.n(u),f=i(9216),p=i.n(f),m=i(4589),_=i.n(m),v=i(1125),b={};b.styleTagTransform=_(),b.setAttributes=g(),b.insert=d().bind(null,"head"),b.domAPI=c(),b.insertStyleElement=p(),a()(v.Z,b),v.Z&&v.Z.locals&&v.Z.locals;var y=i(6830),w=i(3860),C=i(9102),x=i(3580),S=i(8819),k=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const L=new S.uy("selectionAnchorSet",!1);let N=class e{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=L.bindTo(t),this.modelChangeListener=e.onDidChangeModel((()=>this.selectionAnchorSetContextKey.reset()))}static get(t){return t.getContribution(e.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:w.Y.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:(new r.W5).appendText((0,x.N)("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),(0,n.Z9)((0,x.N)("anchorSet","Anchor set at {0}:{1}",e.lineNumber,e.column))}}goToSelectionAnchor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);e&&this.editor.setPosition(e.getStartPosition())}}selectFromAnchorToCursor(){if(this.editor.hasModel()&&this.decorationId){const e=this.editor.getModel().getDecorationRange(this.decorationId);if(e){const t=this.editor.getPosition();this.editor.setSelection(w.Y.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};var E,D;N.ID="editor.contrib.selectionAnchorController",N=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(E=1,D=S.i6,function(e,t){D(e,t,E)})],N);class A extends y.R6{constructor(){super({id:"editor.action.setSelectionAnchor",label:(0,x.N)("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:C.u.editorTextFocus,primary:(0,o.gx)(2089,2080),weight:100}})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=N.get(t))||void 0===i||i.setSelectionAnchor()}))}}class T extends y.R6{constructor(){super({id:"editor.action.goToSelectionAnchor",label:(0,x.N)("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:L})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=N.get(t))||void 0===i||i.goToSelectionAnchor()}))}}class I extends y.R6{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:(0,x.N)("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:L,kbOpts:{kbExpr:C.u.editorTextFocus,primary:(0,o.gx)(2089,2089),weight:100}})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=N.get(t))||void 0===i||i.selectFromAnchorToCursor()}))}}class M extends y.R6{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:(0,x.N)("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:L,kbOpts:{kbExpr:C.u.editorTextFocus,primary:9,weight:100}})}run(e,t){var i;return k(this,void 0,void 0,(function*(){null===(i=N.get(t))||void 0===i||i.cancelSelectionAnchor()}))}}(0,y._K)(N.ID,N),(0,y.Qr)(A),(0,y.Qr)(T),(0,y.Qr)(I),(0,y.Qr)(M)},293:(e,t,i)=>{"use strict";i.r(t),i.d(t,{BracketMatchingController:()=>R});var n=i(5393),r=i(5976),o=i(3379),s=i.n(o),a=i(7795),l=i.n(a),c=i(569),h=i.n(c),d=i(3565),u=i.n(d),g=i(9216),f=i.n(g),p=i(4589),m=i.n(p),_=i(5610),v={};v.styleTagTransform=m(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=f(),s()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals;var b=i(6830),y=i(187),w=i(4314),C=i(3860),x=i(9102),S=i(4973),k=i(3084),L=i(8625),N=i(3580),E=i(4144),D=i(3910),A=i(7781);const T=(0,D.P6G)("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},N.N("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class I extends b.R6{constructor(){super({id:"editor.action.jumpToBracket",label:N.N("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:x.u.editorTextFocus,primary:3160,weight:100}})}run(e,t){var i;null===(i=R.get(t))||void 0===i||i.jumpToBracket()}}class M extends b.R6{constructor(){super({id:"editor.action.selectToBracket",label:N.N("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){var n;let r=!0;i&&!1===i.selectBrackets&&(r=!1),null===(n=R.get(t))||void 0===n||n.selectToBracket(r)}}class O{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class R extends r.JT{constructor(e){super(),this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new n.pY((()=>this._updateBrackets()),50)),this._matchBrackets=this._editor.getOption(64),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition((e=>{"never"!==this._matchBrackets&&this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelContent((e=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModel((e=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeModelLanguageConfiguration((e=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(64)&&(this._matchBrackets=this._editor.getOption(64),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))),this._register(e.onDidBlurEditorWidget((()=>{this._updateBracketsSoon.schedule()}))),this._register(e.onDidFocusEditorWidget((()=>{this._updateBracketsSoon.schedule()})))}static get(e){return e.getContribution(R.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map((t=>{const i=t.getStartPosition(),n=e.bracketPairs.matchBracket(i);let r=null;if(n)n[0].containsPosition(i)?r=n[1].getStartPosition():n[1].containsPosition(i)&&(r=n[0].getStartPosition());else{const t=e.bracketPairs.findEnclosingBrackets(i);if(t)r=t[0].getStartPosition();else{const t=e.bracketPairs.findNextBracket(i);t&&t.range&&(r=t.range.getStartPosition())}}return r?new C.Y(r.lineNumber,r.column,r.lineNumber,r.column):new C.Y(i.lineNumber,i.column,i.lineNumber,i.column)}));this._editor.setSelections(t),this._editor.revealRange(t[0])}selectToBracket(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=[];this._editor.getSelections().forEach((n=>{const r=n.getStartPosition();let o=t.bracketPairs.matchBracket(r);if(!o&&(o=t.bracketPairs.findEnclosingBrackets(r),!o)){const e=t.bracketPairs.findNextBracket(r);e&&e.range&&(o=t.bracketPairs.matchBracket(e.range.getStartPosition()))}let s=null,a=null;if(o){o.sort(w.e.compareRangesUsingStarts);const[t,i]=o;if(s=e?t.getStartPosition():t.getEndPosition(),a=e?i.getEndPosition():i.getStartPosition(),i.containsPosition(r)){const e=s;s=a,a=e}}s&&a&&i.push(new C.Y(s.lineNumber,s.column,a.lineNumber,a.column))})),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if("never"===this._matchBrackets)return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()||!this._editor.hasWidgetFocus())return this._lastBracketsData=[],void(this._lastVersionId=0);const e=this._editor.getSelections();if(e.length>100)return this._lastBracketsData=[],void(this._lastVersionId=0);const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let r=[],o=0;for(let t=0,i=e.length;t1&&r.sort(y.L.compare);let s=[],a=0,l=0,c=n.length;for(let e=0,i=r.length;e{const i=e.getColor(L.TC);i&&t.addRule(`.monaco-editor .bracket-match { background-color: ${i}; }`);const n=e.getColor(L.Dl);n&&t.addRule(`.monaco-editor .bracket-match { border: 1px solid ${n}; }`)})),E.BH.appendMenuItem(E.eH.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:N.N({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2})},4367:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),r=i(9102),o=i(4314),s=i(3860);class a{constructor(e,t){this._selection=e,this._isMovingLeft=t}getEditOperations(e,t){if(this._selection.startLineNumber!==this._selection.endLineNumber||this._selection.isEmpty())return;const i=this._selection.startLineNumber,n=this._selection.startColumn,r=this._selection.endColumn;if((!this._isMovingLeft||1!==n)&&(this._isMovingLeft||r!==e.getLineMaxColumn(i)))if(this._isMovingLeft){const s=new o.e(i,n-1,i,n),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new o.e(i,r,i,r),a)}else{const s=new o.e(i,r,i,r+1),a=e.getValueInRange(s);t.addEditOperation(s,null),t.addEditOperation(new o.e(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new s.Y(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new s.Y(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}var l=i(3580);class c extends n.R6{constructor(e,t){super(t),this.left=e}run(e,t){if(!t.hasModel())return;const i=[],n=t.getSelections();for(const e of n)i.push(new a(e,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}(0,n.Qr)(class extends c{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:l.N("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:r.u.writable})}}),(0,n.Qr)(class extends c{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:l.N("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:r.u.writable})}})},2102:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),r=i(1329),o=i(839),s=i(4314),a=i(9102),l=i(3580);class c extends n.R6{constructor(){super({id:"editor.action.transposeLetters",label:l.N("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:a.u.writable,kbOpts:{kbExpr:a.u.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],a=t.getSelections();for(let e of a){if(!e.isEmpty())continue;let t=e.startLineNumber,a=e.startColumn,l=i.getLineMaxColumn(t);if(1===t&&(1===a||2===a&&2===l))continue;let c=a===l?e.getPosition():o.o.rightPosition(i,e.getPosition().lineNumber,e.getPosition().column),h=o.o.leftPosition(i,c),d=o.o.leftPosition(i,h),u=i.getValueInRange(s.e.fromPositions(d,h)),g=i.getValueInRange(s.e.fromPositions(h,c)),f=s.e.fromPositions(d,c);n.push(new r.T4(f,g+u))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}(0,n.Qr)(c)},5833:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CopyAction:()=>v,CutAction:()=>_,PasteAction:()=>b});var n=i(6268),r=i(1432),o=i(5715),s=i(6830),a=i(1640),l=i(9102),c=i(3580),h=i(4144),d=i(4972);const u="9_cutcopypaste",g=r.tY||document.queryCommandSupported("cut"),f=r.tY||document.queryCommandSupported("copy"),p=void 0!==navigator.clipboard&&!n.isFirefox||document.queryCommandSupported("paste");function m(e){return e.register(),e}const _=g?m(new s.AJ({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:r.tY?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:c.N({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:h.eH.EditorContext,group:u,title:c.N("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1},{menuId:h.eH.CommandPalette,group:"",title:c.N("actions.clipboard.cutLabel","Cut"),order:1},{menuId:h.eH.SimpleEditorContext,group:u,title:c.N("actions.clipboard.cutLabel","Cut"),when:l.u.writable,order:1}]})):void 0,v=f?m(new s.AJ({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:r.tY?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:c.N({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:h.eH.EditorContext,group:u,title:c.N("actions.clipboard.copyLabel","Copy"),order:2},{menuId:h.eH.CommandPalette,group:"",title:c.N("actions.clipboard.copyLabel","Copy"),order:1},{menuId:h.eH.SimpleEditorContext,group:u,title:c.N("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;h.BH.appendMenuItem(h.eH.MenubarEditMenu,{submenu:h.eH.MenubarCopy,title:{value:c.N("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3}),h.BH.appendMenuItem(h.eH.EditorContext,{submenu:h.eH.EditorContextCopy,title:{value:c.N("copy as","Copy As"),original:"Copy As"},group:u,order:3});const b=p?m(new s.AJ({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:r.tY?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:h.eH.MenubarEditMenu,group:"2_ccp",title:c.N({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:h.eH.EditorContext,group:u,title:c.N("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4},{menuId:h.eH.CommandPalette,group:"",title:c.N("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:h.eH.SimpleEditorContext,group:u,title:c.N("actions.clipboard.pasteLabel","Paste"),when:l.u.writable,order:4}]})):void 0;class y extends s.R6{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:c.N("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:l.u.textInputFocus,primary:0,weight:100}})}run(e,t){t.hasModel()&&(!t.getOption(32)&&t.getSelection().isEmpty()||(o.RA.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),o.RA.forceCopyWithSyntaxHighlighting=!1))}}function w(e,t){e&&(e.addImplementation(1e4,"code-editor",((e,i)=>{const n=e.get(a.$).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const e=n.getOption(32),i=n.getSelection();return i&&i.isEmpty()&&!e||document.execCommand(t),!0}return!1})),e.addImplementation(0,"generic-dom",((e,i)=>(document.execCommand(t),!0))))}w(_,"cut"),w(v,"copy"),b&&(b.addImplementation(1e4,"code-editor",((e,t)=>{const i=e.get(a.$),n=e.get(d.p),s=i.getFocusedCodeEditor();return!(!s||!s.hasTextFocus())&&(!(!document.execCommand("paste")&&r.$L)||(l=void 0,c=void 0,u=function*(){const e=yield n.readText();if(""!==e){const t=o.Nl.INSTANCE.get(e);let i=!1,n=null,r=null;t&&(i=s.getOption(32)&&!!t.isFromEmptySelection,n=void 0!==t.multicursorText?t.multicursorText:null,r=t.mode),s.trigger("keyboard","paste",{text:e,pasteOnNewLine:i,multicursorText:n,mode:r})}},new((h=void 0)||(h=Promise))((function(e,t){function i(e){try{r(u.next(e))}catch(e){t(e)}}function n(e){try{r(u.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof h?r:new h((function(e){e(r)}))).then(i,n)}r((u=u.apply(l,c||[])).next())}))));var l,c,h,u})),b.addImplementation(0,"generic-dom",((e,t)=>(document.execCommand("paste"),!0)))),f&&(0,s.Qr)(y)},5396:(e,t,i)=>{"use strict";i.d(t,{Bb:()=>v,MN:()=>b,RB:()=>_,TM:()=>w,aI:()=>k,bA:()=>C,uH:()=>y});var n=i(9488),r=i(1050),o=i(7301),s=i(5976),a=i(666),l=i(6467),c=i(4314),h=i(3860),d=i(3733),u=i(4565),g=i(535),f=i(6014),p=i(1922),m=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const _="editor.action.codeAction",v="editor.action.refactor",b="editor.action.sourceAction",y="editor.action.organizeImports",w="editor.action.fixAll";class C{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return m(this,void 0,void 0,(function*(){if((null===(t=this.provider)||void 0===t?void 0:t.resolveCodeAction)&&!this.action.edit){let t;try{t=yield this.provider.resolveCodeAction(this.action,e)}catch(e){(0,o.Cp)(e)}t&&(this.action.edit=t.edit)}return this}))}}class x extends s.JT{constructor(e,t,i){super(),this.documentation=t,this._register(i),this.allActions=[...e].sort(x.codeActionsComparator),this.validActions=this.allActions.filter((({action:e})=>!e.disabled))}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:(0,n.Of)(e.diagnostics)?(0,n.Of)(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:(0,n.Of)(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some((({action:e})=>!!e.kind&&f.yN.QuickFix.contains(new f.yN(e.kind))&&!!e.isPreferred))}}const S={actions:[],documentation:void 0};function k(e,t,i,r,a,c){var h;const d=r.filter||{},u={only:null===(h=d.include)||void 0===h?void 0:h.value,trigger:r.type},g=new l.YQ(t,c),p=function(e,t,i){return e.all(t).filter((e=>!e.providedCodeActionKinds||e.providedCodeActionKinds.some((e=>(0,f.EU)(i,new f.yN(e))))))}(e,t,d),_=new s.SL,v=p.map((e=>m(this,void 0,void 0,(function*(){try{a.report(e);const n=yield e.provideCodeActions(t,i,u,g.token);if(n&&_.add(n),g.token.isCancellationRequested)return S;const r=((null==n?void 0:n.actions)||[]).filter((e=>e&&(0,f.Yl)(d,e))),o=function(e,t,i){if(!e.documentation)return;const n=e.documentation.map((e=>({kind:new f.yN(e.kind),command:e.command})));if(i){let e;for(const t of n)t.kind.contains(i)&&(e?e.kind.contains(t.kind)&&(e=t):e=t);if(e)return null==e?void 0:e.command}for(const e of t)if(e.kind)for(const t of n)if(t.kind.contains(new f.yN(e.kind)))return t.command}(e,r,d.include);return{actions:r.map((t=>new C(t,e))),documentation:o}}catch(e){if((0,o.n2)(e))throw e;return(0,o.Cp)(e),S}})))),b=e.onDidChange((()=>{const i=e.all(t);(0,n.fS)(i,p)||g.cancel()}));return Promise.all(v).then((e=>{const t=(0,n.xH)(e.map((e=>e.actions))),i=(0,n.kX)(e.map((e=>e.documentation)));return new x(t,i,_)})).finally((()=>{b.dispose(),g.dispose()}))}u.P0.registerCommand("_executeCodeActionProvider",(function(e,t,i,n,s){return m(this,void 0,void 0,(function*(){if(!(t instanceof a.o))throw(0,o.b1)();const{codeActionProvider:l}=e.get(p.p),u=e.get(d.q).getModel(t);if(!u)throw(0,o.b1)();const m=h.Y.isISelection(i)?h.Y.liftSelection(i):c.e.isIRange(i)?u.validateRange(i):void 0;if(!m)throw(0,o.b1)();const _="string"==typeof n?new f.yN(n):void 0,v=yield k(l,u,m,{type:1,filter:{includeSourceActions:!0,include:_}},g.Ex.None,r.T.None),b=[],y=Math.min(v.validActions.length,"number"==typeof s?s:0);for(let e=0;ee.action))}finally{setTimeout((()=>v.dispose()),100)}}))}))},8674:(e,t,i)=>{"use strict";i.d(t,{S5:()=>De,dW:()=>Se,Hv:()=>Ee,o$:()=>Ne,E7:()=>xe,pY:()=>ye,Eb:()=>ke,VQ:()=>Le});var n=i(1050),r=i(9579),o=i(5976),s=i(5924),a=i(6830),l=i(6007),c=i(9102),h=i(1922),d=i(5396),u=i(7301),g=i(7615),f=i(2065),p=i(5321),m=i(4741),_=i(187),v=i(6014),b=i(5606),y=i(1847),w=function(e,t){return function(i,n){t(i,n,e)}};class C extends m.aU{constructor(e,t){super(e.command?e.command.id:e.title,e.title.replace(/\r\n|\r|\n/g," "),void 0,!e.disabled,t),this.action=e}}let x=class extends o.JT{constructor(e,t,i,n,r){super(),this._editor=e,this._delegate=t,this._contextMenuService=i,this._languageFeaturesService=r,this._visible=!1,this._showingActions=this._register(new o.XK),this._keybindingResolver=new S({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return r=this,o=void 0,a=function*(){const r=n.includeDisabledActions?t.allActions:t.validActions;if(!r.length)return void(this._visible=!1);if(!this._editor.getDomNode())throw this._visible=!1,(0,u.F0)();this._visible=!0,this._showingActions.value=t;const o=this.getMenuActions(e,r,t.documentation),s=_.L.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},a=this._keybindingResolver.getResolver(),l=this._editor.getOption(115);this._contextMenuService.showContextMenu({domForShadowRoot:l?this._editor.getDomNode():void 0,getAnchor:()=>s,getActions:()=>o,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:e=>e instanceof C?a(e.action):void 0})},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{l(a.next(e))}catch(e){t(e)}}function n(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var r;t.done?e(t.value):(r=t.value,r instanceof s?r:new s((function(e){e(r)}))).then(i,n)}l((a=a.apply(r,o||[])).next())}));var r,o,s,a}getMenuActions(e,t,i){var n,r;const o=e=>new C(e.action,(()=>this._delegate.onSelectCodeAction(e))),s=t.map(o),a=[...i],l=this._editor.getModel();if(l&&s.length)for(const i of this._languageFeaturesService.codeActionProvider.all(l))i._getAdditionalMenuItems&&a.push(...i._getAdditionalMenuItems({trigger:e.type,only:null===(r=null===(n=e.filter)||void 0===n?void 0:n.include)||void 0===r?void 0:r.value},t.map((e=>e.action))));return a.length&&s.push(new m.Z0,...a.map((e=>o(new d.bA({title:e.title,command:e},void 0))))),s}_toCoords(e){if(!this._editor.hasModel())return{x:0,y:0};this._editor.revealPosition(e,1),this._editor.render();const t=this._editor.getScrolledVisiblePosition(e),i=(0,p.i)(this._editor.getDomNode());return{x:i.left+t.left,y:i.top+t.top+t.height}}};x=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([w(2,b.i),w(3,y.d),w(4,h.p)],x);class S{constructor(e){this._keybindingProvider=e}getResolver(){const e=new r.o((()=>this._keybindingProvider.getKeybindings().filter((e=>S.codeActionCommands.indexOf(e.command)>=0)).filter((e=>e.resolvedKeybinding)).map((e=>{let t=e.commandArgs;return e.command===d.uH?t={kind:v.yN.SourceOrganizeImports.value}:e.command===d.TM&&(t={kind:v.yN.SourceFixAll.value}),Object.assign({resolvedKeybinding:e.resolvedKeybinding},v.wZ.fromUser(t,{kind:v.yN.None,apply:"never"}))}))));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return null==i?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new v.yN(e.kind);return t.filter((e=>e.kind.contains(i))).filter((t=>!t.preferred||e.isPreferred)).reduceRight(((e,t)=>e?e.kind.contains(t.kind)?t:e:t),void 0)}}S.codeActionCommands=[d.Bb,d.RB,d.MN,d.uH,d.TM];var k=i(7974),L=i(553),N=i(3046),E=i(4669),D=i(3379),A=i.n(D),T=i(7795),I=i.n(T),M=i(569),O=i.n(M),R=i(3565),P=i.n(R),F=i(9216),B=i.n(F),W=i(4589),V=i.n(W),z=i(6941),H={};H.styleTagTransform=V(),H.setAttributes=P(),H.insert=O().bind(null,"head"),H.domAPI=I(),H.insertStyleElement=B(),A()(z.Z,H),z.Z&&z.Z.locals&&z.Z.locals;var j,U=i(9616),$=i(3580),K=i(3910),q=i(7781);!function(e){e.Hidden={type:0},e.Showing=class{constructor(e,t,i,n){this.actions=e,this.trigger=t,this.editorPosition=i,this.widgetPosition=n,this.type=1}}}(j||(j={}));let G=class e extends o.JT{constructor(e,t,i,n){super(),this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new E.Q5),this.onClick=this._onClick.event,this._state=j.Hidden,this._domNode=document.createElement("div"),this._domNode.className=N.lA.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent((e=>{const t=this._editor.getModel();(1!==this.state.type||!t||this.state.editorPosition.lineNumber>=t.getLineCount())&&this.hide()}))),L.o.ignoreTarget(this._domNode),this._register(p.GQ(this._domNode,(e=>{if(1!==this.state.type)return;this._editor.focus(),e.preventDefault();const{top:t,height:i}=p.i(this._domNode),n=this._editor.getOption(59);let r=Math.floor(n/3);null!==this.state.widgetPosition.position&&this.state.widgetPosition.position.lineNumber{if(1!=(1&e.buttons))return;this.hide();const t=new k.Z;t.startMonitoring(e.target,e.buttons,k.e,(()=>{}),(()=>{t.dispose()}))}))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(57)&&!this._editor.getOption(57).enabled&&this.hide()}))),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return 1===this._state.type?this._state.widgetPosition:null}update(t,i,n){if(t.validActions.length<=0)return this.hide();const r=this._editor.getOptions();if(!r.get(57).enabled)return this.hide();const o=this._editor.getModel();if(!o)return this.hide();const{lineNumber:s,column:a}=o.validatePosition(n),l=o.getOptions().tabSize,c=r.get(44),h=o.getLineContent(s),d=(0,U.q)(h,l),u=e=>e>2&&this._editor.getTopForLineNumber(e)===this._editor.getTopForLineNumber(e-1);let g=s;if(!(c.spaceWidth*d>22))if(s>1&&!u(s-1))g-=1;else if(u(s+1)){if(a*c.spaceWidth<22)return this.hide()}else g+=1;this.state=new j.Showing(t,i,n,{position:{lineNumber:g,column:1},preference:e._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=j.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(1===this.state.type&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...N.lA.lightBulb.classNamesArray),this._domNode.classList.add(...N.lA.lightbulbAutofix.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(e)return void(this.title=$.N("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",e.getLabel()))}this._domNode.classList.remove(...N.lA.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...N.lA.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);this.title=e?$.N("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):$.N("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};var Y,Z;G._posPref=[0],G=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(Y=3,Z=y.d,function(e,t){Z(e,t,Y)})],G),(0,q.Ic)(((e,t)=>{var i;const n=null===(i=e.getColor(K.cvW))||void 0===i?void 0:i.transparent(.7),r=e.getColor(K.Fu1);r&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${N.lA.lightBulb.cssSelector} {\n\t\t\tcolor: ${r};\n\t\t\tbackground-color: ${n};\n\t\t}`);const o=e.getColor(K.sKV);o&&t.addRule(`\n\t\t.monaco-editor .contentWidgets ${N.lA.lightbulbAutofix.cssSelector} {\n\t\t\tcolor: ${o};\n\t\t\tbackground-color: ${n};\n\t\t}`)}));var Q,X=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let J=class extends o.JT{constructor(e,t,i,n,s){super(),this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new o.XK),Q.set(this,!1),this._codeActionWidget=new r.o((()=>this._register(s.createInstance(x,this._editor,{onSelectCodeAction:e=>X(this,void 0,void 0,(function*(){this.delegate.applyCodeAction(e,!0)}))})))),this._lightBulbWidget=new r.o((()=>{const e=this._register(s.createInstance(G,this._editor,t,i));return this._register(e.onClick((e=>this.showCodeActionList(e.trigger,e.actions,e,{includeDisabledActions:!1})))),e}))}dispose(){(function(e,t,i,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?r.call(e,i):r?r.value=i:t.set(e,i)})(this,Q,!0,"f"),super.dispose()}update(e){var t,i,n,r,o;return X(this,void 0,void 0,(function*(){if(1!==e.type)return void(null===(t=this._lightBulbWidget.rawValue)||void 0===t||t.hide());let s;try{s=yield e.actions}catch(e){return void(0,u.dL)(e)}if(!function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)}(this,Q,"f"))if(this._lightBulbWidget.getValue().update(s,e.trigger,e.position),1===e.trigger.type){if(null===(i=e.trigger.filter)||void 0===i?void 0:i.include){const t=this.tryGetValidActionToApply(e.trigger,s);if(t){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(t,!1)}finally{s.dispose()}return}if(e.trigger.context){const t=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,s);if(t&&t.action.disabled)return null===(n=g.O.get(this._editor))||void 0===n||n.showMessage(t.action.disabled,e.trigger.context.position),void s.dispose()}}const t=!!(null===(r=e.trigger.filter)||void 0===r?void 0:r.include);if(e.trigger.context&&(!s.allActions.length||!t&&!s.validActions.length))return null===(o=g.O.get(this._editor))||void 0===o||o.showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=s,void s.dispose();this._activeCodeActions.value=s,this._codeActionWidget.getValue().show(e.trigger,s,e.position,{includeDisabledActions:t})}else this._codeActionWidget.getValue().isVisible?s.dispose():this._activeCodeActions.value=s}))}getInvalidActionThatWouldHaveBeenApplied(e,t){if(t.allActions.length)return"first"===e.autoApply&&0===t.validActions.length||"ifSingle"===e.autoApply&&1===t.allActions.length?t.allActions.find((({action:e})=>e.disabled)):void 0}tryGetValidActionToApply(e,t){if(t.validActions.length)return"first"===e.autoApply&&t.validActions.length>0||"ifSingle"===e.autoApply&&1===t.validActions.length?t.validActions[0]:void 0}showCodeActionList(e,t,i,n){return X(this,void 0,void 0,(function*(){this._codeActionWidget.getValue().show(e,t,i,n)}))}};Q=new WeakMap,J=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(4,f.TG)],J);var ee,te=i(4565),ie=i(8819),ne=i(5673),re=i(9422),oe=i(535),se=i(829),ae=i(5393),le=i(5935),ce=i(4314),he=function(e,t,i,n){if("a"===i&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===i?n:"a"===i?n.call(e):n?n.value:t.get(e)};const de=new ie.uy("supportedCodeAction","");class ue extends o.JT{constructor(e,t,i,n=250){super(),this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new ae._F),this._register(this._markerService.onMarkerChanged((e=>this._onMarkerChanges(e)))),this._register(this._editor.onDidChangeCursorPosition((()=>this._onCursorChange())))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();t&&e.some((e=>(0,le.Xy)(e,t.uri)))&&this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet((()=>{this.trigger({type:2})}),this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(ce.e.intersectRanges(n,e))return ce.e.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&2===e.type){const{lineNumber:e,column:n}=i.getPosition(),r=t.getLineContent(e);if(0===r.length)return;if(1===n){if(/\s/.test(r[0]))return}else if(n===t.getLineMaxColumn(e)){if(/\s/.test(r[r.length-1]))return}else if(/\s/.test(r[n-2])&&/\s/.test(r[n-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i)return void this._signalChange(void 0);const n=this._getRangeOfMarker(t),r=n?n.getStartPosition():t.getStartPosition(),o={trigger:e,selection:t,position:r};return this._signalChange(o),o}}var ge;!function(e){e.Empty={type:0},e.Triggered=class{constructor(e,t,i,n){this.trigger=e,this.rangeOrSelection=t,this.position=i,this._cancellablePromise=n,this.type=1,this.actions=n.catch((e=>{if((0,u.n2)(e))return fe;throw e}))}cancel(){this._cancellablePromise.cancel()}}}(ge||(ge={}));const fe={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class pe extends o.JT{constructor(e,t,i,n,r){super(),this._editor=e,this._registry=t,this._markerService=i,this._progressService=r,this._codeActionOracle=this._register(new o.XK),this._state=ge.Empty,this._onDidChangeState=this._register(new E.Q5),this.onDidChangeState=this._onDidChangeState.event,ee.set(this,!1),this._supportedCodeActions=de.bindTo(n),this._register(this._editor.onDidChangeModel((()=>this._update()))),this._register(this._editor.onDidChangeModelLanguage((()=>this._update()))),this._register(this._registry.onDidChange((()=>this._update()))),this._update()}dispose(){he(this,ee,"f")||(function(e,t,i,n,r){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===n?r.call(e,i):r?r.value=i:t.set(e,i)}(this,ee,!0,"f"),super.dispose(),this.setState(ge.Empty,!0))}_update(){if(he(this,ee,"f"))return;this._codeActionOracle.value=void 0,this.setState(ge.Empty);const e=this._editor.getModel();if(e&&this._registry.has(e)&&!this._editor.getOption(81)){const t=[];for(const i of this._registry.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new ue(this._editor,this._markerService,(t=>{var i;if(!t)return void this.setState(ge.Empty);const n=(0,ae.PG)((i=>(0,d.aI)(this._registry,e,t.selection,t.trigger,oe.Ex.None,i)));1===t.trigger.type&&(null===(i=this._progressService)||void 0===i||i.showWhile(n,250)),this.setState(new ge.Triggered(t.trigger,t.selection,t.position,n))}),void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(1===this._state.type&&this._state.cancel(),this._state=e,t||he(this,ee,"f")||this._onDidChangeState.fire(e))}}ee=new WeakMap;var me=function(e,t){return function(i,n){t(i,n,e)}},_e=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function ve(e){return ie.Ao.regex(de.keys()[0],new RegExp("(\\s|^)"+(0,s.ec)(e.value)+"\\b"))}const be={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:$.N("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:$.N("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[$.N("args.schema.apply.first","Always apply the first returned code action."),$.N("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),$.N("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:$.N("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let ye=class e extends o.JT{constructor(e,t,i,n,o,s){super(),this._instantiationService=o,this._editor=e,this._model=this._register(new pe(this._editor,s.codeActionProvider,t,i,n)),this._register(this._model.onDidChangeState((e=>this.update(e)))),this._ui=new r.o((()=>this._register(new J(e,xe.Id,De.Id,{applyCodeAction:(e,t)=>_e(this,void 0,void 0,(function*(){try{yield this._applyCodeAction(e)}finally{t&&this._trigger({type:2,filter:{}})}}))},this._instantiationService))))}static get(t){return t.getContribution(e.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){var n;if(!this._editor.hasModel())return;null===(n=g.O.get(this._editor))||void 0===n||n.closeMessage();const r=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:r}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(we,e,this._editor)}};function we(e,t,i){return _e(this,void 0,void 0,(function*(){const r=e.get(l.vu),o=e.get(te.Hy),s=e.get(se.b),a=e.get(re.lT);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:t.action.title,codeActionKind:t.action.kind,codeActionIsPreferred:!!t.action.isPreferred}),yield t.resolve(n.T.None),t.action.edit&&(yield r.apply(l.fo.convert(t.action.edit),{editor:i,label:t.action.title})),t.action.command)try{yield o.executeCommand(t.action.command.id,...t.action.command.arguments||[])}catch(e){const t=function(e){return"string"==typeof e?e:e instanceof Error&&"string"==typeof e.message?e.message:void 0}(e);a.error("string"==typeof t?t:$.N("applyCodeActionFailed","An unknown error occurred while applying the code action"))}}))}function Ce(e,t,i,n){if(e.hasModel()){const r=ye.get(e);r&&r.manualTriggerAtCurrentPosition(t,i,n)}}ye.ID="editor.contrib.quickFixController",ye=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([me(1,ne.lT),me(2,ie.i6),me(3,oe.ek),me(4,f.TG),me(5,h.p)],ye);class xe extends a.R6{constructor(){super({id:xe.Id,label:$.N("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:ie.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),kbOpts:{kbExpr:c.u.editorTextFocus,primary:2132,weight:100}})}run(e,t){return Ce(t,$.N("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}xe.Id="editor.action.quickFix";class Se extends a._l{constructor(){super({id:d.RB,precondition:ie.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:be}]}})}runEditorCommand(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Empty,apply:"ifSingle"});return Ce(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?$.N("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):$.N("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?$.N("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):$.N("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class ke extends a.R6{constructor(){super({id:d.Bb,label:$.N("refactor.label","Refactor..."),alias:"Refactor...",precondition:ie.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),kbOpts:{kbExpr:c.u.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:ie.Ao.and(c.u.writable,ve(v.yN.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:be}]}})}run(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Refactor,apply:"never"});return Ce(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?$.N("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):$.N("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?$.N("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):$.N("editor.action.refactor.noneMessage","No refactorings available"),{include:v.yN.Refactor.contains(n.kind)?n.kind:v.yN.None,onlyIncludePreferredActions:n.preferred},n.apply)}}class Le extends a.R6{constructor(){super({id:d.MN,label:$.N("source.label","Source Action..."),alias:"Source Action...",precondition:ie.Ao.and(c.u.writable,c.u.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:ie.Ao.and(c.u.writable,ve(v.yN.Source))},description:{description:"Source Action...",args:[{name:"args",schema:be}]}})}run(e,t,i){const n=v.wZ.fromUser(i,{kind:v.yN.Source,apply:"never"});return Ce(t,"string"==typeof(null==i?void 0:i.kind)?n.preferred?$.N("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):$.N("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?$.N("editor.action.source.noneMessage.preferred","No preferred source actions available"):$.N("editor.action.source.noneMessage","No source actions available"),{include:v.yN.Source.contains(n.kind)?n.kind:v.yN.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Ne extends a.R6{constructor(){super({id:d.uH,label:$.N("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:ie.Ao.and(c.u.writable,ve(v.yN.SourceOrganizeImports)),kbOpts:{kbExpr:c.u.editorTextFocus,primary:1581,weight:100}})}run(e,t){return Ce(t,$.N("editor.action.organize.noneMessage","No organize imports action available"),{include:v.yN.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class Ee extends a.R6{constructor(){super({id:d.TM,label:$.N("fixAll.label","Fix All"),alias:"Fix All",precondition:ie.Ao.and(c.u.writable,ve(v.yN.SourceFixAll))})}run(e,t){return Ce(t,$.N("fixAll.noneMessage","No fix all action available"),{include:v.yN.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class De extends a.R6{constructor(){super({id:De.Id,label:$.N("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:ie.Ao.and(c.u.writable,ve(v.yN.QuickFix)),kbOpts:{kbExpr:c.u.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return Ce(t,$.N("editor.action.autoFix.noneMessage","No auto fixes available"),{include:v.yN.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}De.Id="editor.action.autoFix"},9575:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),r=i(8674);(0,n._K)(r.pY.ID,r.pY),(0,n.Qr)(r.E7),(0,n.Qr)(r.Eb),(0,n.Qr)(r.VQ),(0,n.Qr)(r.o$),(0,n.Qr)(r.S5),(0,n.Qr)(r.Hv),(0,n.fK)(new r.dW)},6014:(e,t,i)=>{"use strict";i.d(t,{EU:()=>r,Yl:()=>o,wZ:()=>a,yN:()=>n});class n{constructor(e){this.value=e}equals(e){return this.value===e.value}contains(e){return this.equals(e)||""===this.value||e.value.startsWith(this.value+n.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new n(this.value+n.sep+e)}}function r(e,t){return!(e.include&&!e.include.intersects(t)||e.excludes&&e.excludes.some((i=>s(t,i,e.include)))||!e.includeSourceActions&&n.Source.contains(t))}function o(e,t){const i=t.kind?new n(t.kind):void 0;return!(!(!e.include||i&&e.include.contains(i))||e.excludes&&i&&e.excludes.some((t=>s(i,t,e.include)))||!e.includeSourceActions&&i&&n.Source.contains(i)||e.onlyIncludePreferredActions&&!t.isPreferred)}function s(e,t,i){return!(!t.contains(e)||i&&t.contains(i))}n.sep=".",n.None=new n("@@none@@"),n.Empty=new n(""),n.QuickFix=new n("quickfix"),n.Refactor=new n("refactor"),n.Source=new n("source"),n.SourceOrganizeImports=n.Source.append("organizeImports"),n.SourceFixAll=n.Source.append("fixAll");class a{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return e&&"object"==typeof e?new a(a.getKindFromUser(e,t.kind),a.getApplyFromUser(e,t.apply),a.getPreferredUser(e)):new a(t.kind,t.apply,!1)}static getApplyFromUser(e,t){switch("string"==typeof e.apply?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return"string"==typeof e.kind?new n(e.kind):t}static getPreferredUser(e){return"boolean"==typeof e.preferred&&e.preferred}}},2980:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CodeLensContribution:()=>ne});var n=i(5321),r=i(5393),o=i(7301),s=i(9954),a=i(5976),l=i(3407),c=i(6830),h=i(4141),d=i(9102),u=i(1050),g=i(8401),f=i(666),p=i(3733),m=i(4565),_=i(1922),v=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class b{constructor(){this.lenses=[],this._disposables=new a.SL}dispose(){this._disposables.dispose()}get isDisposed(){return this._disposables.isDisposed}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function y(e,t,i){return v(this,void 0,void 0,(function*(){const n=e.ordered(t),r=new Map,s=new b,a=n.map(((e,n)=>v(this,void 0,void 0,(function*(){r.set(e,n);try{const n=yield Promise.resolve(e.provideCodeLenses(t,i));n&&s.add(n,e)}catch(e){(0,o.Cp)(e)}}))));return yield Promise.all(a),s.lenses=s.lenses.sort(((e,t)=>e.symbol.range.startLineNumbert.symbol.range.startLineNumber?1:r.get(e.provider)r.get(t.provider)?1:e.symbol.range.startColumnt.symbol.range.startColumn?1:0)),s}))}m.P0.registerCommand("_executeCodeLensProvider",(function(e,...t){let[i,n]=t;(0,g.p_)(f.o.isUri(i)),(0,g.p_)("number"==typeof n||!n);const{codeLensProvider:r}=e.get(_.p),s=e.get(p.q).getModel(i);if(!s)throw(0,o.b1)();const l=[],c=new a.SL;return y(r,s,u.T.None).then((e=>{c.add(e);let t=[];for(const i of e.lenses)null==n||Boolean(i.symbol.command)?l.push(i.symbol):n-- >0&&i.provider.resolveCodeLens&&t.push(Promise.resolve(i.provider.resolveCodeLens(s,i.symbol,u.T.None)).then((e=>l.push(e||i.symbol))));return Promise.all(t)})).then((()=>l)).finally((()=>{setTimeout((()=>c.dispose()),100)}))}));var w=i(8289),C=i(3702),x=i(4314),S=i(5026),k=i(2065),L=i(6904);const N=(0,k.yh)("ICodeLensCache");class E{constructor(e,t){this.lineCount=e,this.data=t}}let D=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new C.z6(20,.75),(0,r.To)((()=>e.remove("codelens/cache",1)));const t="codelens/cache2",i=e.get(t,1,"{}");this._deserialize(i),(0,w.I)(e.onWillSaveState)((i=>{i.reason===L.fk.SHUTDOWN&&e.store(t,this._serialize(),1,1)}))}put(e,t){const i=t.lenses.map((e=>{var t;return{range:e.symbol.range,command:e.symbol.command&&{id:"",title:null===(t=e.symbol.command)||void 0===t?void 0:t.title}}})),n=new b;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const r=new E(e.getLineCount(),n);this._cache.set(e.uri.toString(),r)}get(e){const t=this._cache.get(e.uri.toString());return t&&t.lineCount===e.getLineCount()?t.data:void 0}delete(e){this._cache.delete(e.uri.toString())}_serialize(){const e=Object.create(null);for(const[t,i]of this._cache){const n=new Set;for(const e of i.data.lenses)n.add(e.symbol.range.startLineNumber);e[t]={lineCount:i.lineCount,lines:[...n.values()]}}return JSON.stringify(e)}_deserialize(e){try{const t=JSON.parse(e);for(const e in t){const i=t[e],n=[];for(const e of i.lines)n.push({range:new x.e(e,1,e,11)});const r=new b;r.add({lenses:n,dispose(){}},this._fakeProvider),this._cache.set(e,new E(i.lineCount,r))}}catch(e){}}};var A,T;D=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(A=0,T=L.Uy,function(e,t){T(e,t,A)})],D),(0,S.z)(N,D);var I=i(6811),M=i(3379),O=i.n(M),R=i(7795),P=i.n(R),F=i(569),B=i.n(F),W=i(3565),V=i.n(W),z=i(9216),H=i.n(z),j=i(4589),U=i.n(j),$=i(36),K={};K.styleTagTransform=U(),K.setAttributes=V(),K.insert=B().bind(null,"head"),K.domAPI=P(),K.insertStyleElement=H(),O()($.Z,K),$.Z&&$.Z.locals&&$.Z.locals;var q=i(3084);class G{constructor(e,t,i){this.afterColumn=1073741824,this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){void 0===this._lastHeight?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}isVisible(){return 0!==this._lastHeight&&this.domNode.hasAttribute("monaco-visible-view-zone")}}class Y{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id="codelens.widget-"+Y._idPool++,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],r=!1;for(let t=0;t{e.symbol.command&&l.push(e.symbol),n.addDecoration({range:e.symbol.range,options:q.qx.EMPTY},(e=>this._decorationIds[t]=e)),a=a?x.e.plusRange(a,e.symbol.range):x.e.lift(e.symbol.range)})),this._viewZone=new G(a.startLineNumber-1,o,s),this._viewZoneId=r.addZone(this._viewZone),l.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(l,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new Y(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],t&&t.removeZone(this._viewZoneId),this._contentWidget&&(this._editor.removeContentWidget(this._contentWidget),this._contentWidget=void 0),this._isDisposed=!0}isDisposed(){return this._isDisposed}isValid(){return this._decorationIds.some(((e,t)=>{const i=this._editor.getModel().getDecorationRange(e),n=this._data[t].symbol;return!(!i||x.e.isEmpty(n.range)!==i.isEmpty())}))}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach(((e,i)=>{t.addDecoration({range:e.symbol.range,options:q.qx.EMPTY},(e=>this._decorationIds[i]=e))}))}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.isVisible())return null;for(let t=0;tthis._resolveCodeLensesInViewport()),this._resolveCodeLensesDebounce.default()),this._disposables.add(this._editor.onDidChangeModel((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>this._onModelChange()))),this._disposables.add(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(44)||e.hasChanged(16)||e.hasChanged(15))&&this._updateLensStyle(),e.hasChanged(14)&&this._onModelChange()}))),this._disposables.add(t.codeLensProvider.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+(0,s.vp)(this._editor.getId()).toString(16),this._styleElement=n.dS(n.OO(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),null===(e=this._currentCodeLensModel)||void 0===e||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e,t=this._editor.getOption(16);return!t||t<5?(t=.9*this._editor.getOption(46)|0,e=this._editor.getOption(59)):e=t*Math.max(1.3,this._editor.getOption(59)/this._editor.getOption(46))|0,{codeLensHeight:e,fontSize:t}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(44),r=`--codelens-font-family${this._styleClassName}`,o=`--codelens-font-features${this._styleClassName}`;let s=`\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(.5*t)}px; font-feature-settings: var(${o}) }\n\t\t.monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; }\n\t\t`;i&&(s+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${r}), ${h.hL.fontFamily}}`),this._styleElement.textContent=s,this._editor.getContainerDomNode().style.setProperty(r,null!=i?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(o,n.fontFeatureSettings),this._editor.changeViewZones((t=>{for(let i of this._lenses)i.updateHeight(e,t)}))}_localDispose(){var e,t,i;null===(e=this._getCodeLensModelPromise)||void 0===e||e.cancel(),this._getCodeLensModelPromise=void 0,null===(t=this._resolveCodeLensesPromise)||void 0===t||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),null===(i=this._currentCodeLensModel)||void 0===i||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e)return;if(!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!this._languageFeaturesService.codeLensProvider.has(e))return void(t&&this._localToDispose.add((0,r.Vg)((()=>{const i=this._codeLensCache.get(e);t===i&&(this._codeLensCache.delete(e),this._onModelChange())}),3e4)));for(const t of this._languageFeaturesService.codeLensProvider.all(e))if("function"==typeof t.onDidChange){let e=t.onDidChange((()=>i.schedule()));this._localToDispose.add(e)}const i=new r.pY((()=>{var t;const n=Date.now();null===(t=this._getCodeLensModelPromise)||void 0===t||t.cancel(),this._getCodeLensModelPromise=(0,r.PG)((t=>y(this._languageFeaturesService.codeLensProvider,e,t))),this._getCodeLensModelPromise.then((t=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=t,this._codeLensCache.put(e,t);const r=this._provideCodeLensDebounce.update(e,Date.now()-n);i.delay=r,this._renderCodeLensSymbols(t),this._resolveCodeLensesInViewportSoon()}),o.dL)}),this._provideCodeLensDebounce.get(e));this._localToDispose.add(i),this._localToDispose.add((0,a.OF)((()=>this._resolveCodeLensesScheduler.cancel()))),this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{let i=[],n=-1;this._lenses.forEach((e=>{e.isValid()&&n!==e.getLineNumber()?(e.update(t),n=e.getLineNumber()):i.push(e)}));let r=new Z;i.forEach((e=>{e.dispose(r,t),this._lenses.splice(this._lenses.indexOf(e),1)})),r.commit(e)}))})),i.schedule()}))),this._localToDispose.add(this._editor.onDidFocusEditorWidget((()=>{i.schedule()}))),this._localToDispose.add(this._editor.onDidScrollChange((e=>{e.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add(this._editor.onDidLayoutChange((()=>{this._resolveCodeLensesInViewportSoon()}))),this._localToDispose.add((0,a.OF)((()=>{if(this._editor.getModel()){const e=l.Z.capture(this._editor);this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{this._disposeAllLenses(e,t)}))})),e.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)}))),this._localToDispose.add(this._editor.onMouseDown((e=>{if(9!==e.target.type)return;let t=e.target.element;if("SPAN"===(null==t?void 0:t.tagName)&&(t=t.parentElement),"A"===(null==t?void 0:t.tagName))for(const e of this._lenses){let i=e.getCommand(t);if(i){this._commandService.executeCommand(i.id,...i.arguments||[]).catch((e=>this._notificationService.error(e)));break}}}))),i.schedule()}_disposeAllLenses(e,t){const i=new Z;for(const e of this._lenses)e.dispose(i,t);e&&i.commit(e),this._lenses.length=0}_renderCodeLensSymbols(e){if(!this._editor.hasModel())return;let t,i=this._editor.getModel().getLineCount(),n=[];for(let r of e.lenses){let e=r.symbol.range.startLineNumber;e<1||e>i||(t&&t[t.length-1].symbol.range.startLineNumber===e?t.push(r):(t=[r],n.push(t)))}const r=l.Z.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations((e=>{this._editor.changeViewZones((t=>{const i=new Z;let r=0,s=0;for(;sthis._resolveCodeLensesInViewportSoon()))),r++,s++)}for(;rthis._resolveCodeLensesInViewportSoon()))),s++;i.commit(e)}))})),r.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;null===(e=this._resolveCodeLensesPromise)||void 0===e||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach((e=>{const r=e.computeIfNecessary(t);r&&(i.push(r),n.push(e))})),0===i.length)return;const s=Date.now(),a=(0,r.PG)((e=>{const r=i.map(((i,r)=>{const s=new Array(i.length),a=i.map(((i,n)=>i.symbol.command||"function"!=typeof i.provider.resolveCodeLens?(s[n]=i.symbol,Promise.resolve(void 0)):Promise.resolve(i.provider.resolveCodeLens(t,i.symbol,e)).then((e=>{s[n]=e}),o.Cp)));return Promise.all(a).then((()=>{e.isCancellationRequested||n[r].isDisposed()||n[r].updateCommands(s)}))}));return Promise.all(r)}));this._resolveCodeLensesPromise=a,this._resolveCodeLensesPromise.then((()=>{const e=this._resolveCodeLensesDebounce.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=e,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}),(e=>{(0,o.dL)(e),a===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)}))}getModel(){return this._currentCodeLensModel}};ne.ID="css.editor.codeLens",ne=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([ie(1,_.p),ie(2,te.A),ie(3,m.Hy),ie(4,J.lT),ie(5,N)],ne),(0,c._K)(ne.ID,ne),(0,c.Qr)(class extends c.R6{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:d.u.hasCodeLensProvider,label:(0,X.N)("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return i=this,n=void 0,o=function*(){if(!t.hasModel())return;const i=e.get(ee.eJ),n=e.get(m.Hy),r=e.get(J.lT),o=t.getSelection().positionLineNumber,s=t.getContribution(ne.ID);if(!s)return;const a=s.getModel();if(!a)return;const l=[];for(const e of a.lenses)e.symbol.command&&e.symbol.range.startLineNumber===o&&l.push({label:e.symbol.command.title,command:e.symbol.command});if(0===l.length)return;const c=yield i.pick(l,{canPickMany:!1});if(c){if(a.isDisposed)return yield n.executeCommand(this.id);try{yield n.executeCommand(c.command.id,...c.command.arguments||[])}catch(e){r.error(e)}}},new((r=void 0)||(r=Promise))((function(e,t){function s(e){try{l(o.next(e))}catch(e){t(e)}}function a(e){try{l(o.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(s,a)}l((o=o.apply(i,n||[])).next())}));var i,n,r,o}})},1085:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ColorContribution:()=>le});var n=i(5976),r=i(6830),o=i(4314),s=i(5393),a=i(1264),l=i(7301),c=i(4013),h=i(5924),d=i(9994),u=i(3084),g=i(8191),f=i(1922),p=i(1050),m=i(666),_=i(3733),v=i(4565);function b(e,t,i,n){return Promise.resolve(i.provideColorPresentations(e,t,n))}v.P0.registerCommand("_executeDocumentColorProvider",(function(e,...t){const[i]=t;if(!(i instanceof m.o))throw(0,l.b1)();const{colorProvider:n}=e.get(f.p),r=e.get(_.q).getModel(i);if(!r)throw(0,l.b1)();const o=[],s=n.ordered(r).reverse().map((e=>Promise.resolve(e.provideDocumentColors(r,p.T.None)).then((e=>{if(Array.isArray(e))for(let t of e)o.push({range:t.range,color:[t.color.red,t.color.green,t.color.blue,t.color.alpha]})}))));return Promise.all(s).then((()=>o))})),v.P0.registerCommand("_executeColorPresentationProvider",(function(e,...t){const[i,n]=t,{uri:r,range:s}=n;if(!(r instanceof m.o&&Array.isArray(i)&&4===i.length&&o.e.isIRange(s)))throw(0,l.b1)();const[a,c,h,d]=i,{colorProvider:u}=e.get(f.p),g=e.get(_.q).getModel(r);if(!g)throw(0,l.b1)();const v={range:s,color:{red:a,green:c,blue:h,alpha:d}},b=[],y=u.ordered(g).reverse().map((e=>Promise.resolve(e.provideColorPresentations(g,v,p.T.None)).then((e=>{Array.isArray(e)&&b.push(...e)}))));return Promise.all(y).then((()=>b))}));var y=i(3108),w=function(e,t){return function(i,n){t(i,n,e)}};const C=Object.create({});let x=class e extends n.JT{constructor(t,i,r,o){super(),this._editor=t,this._configurationService=i,this._languageFeaturesService=r,this._localToDispose=this._register(new n.SL),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=new Set,this._ruleFactory=new d.t7(this._editor),this._colorDecorationClassRefs=this._register(new n.SL),this._debounceInformation=o.for(r.colorProvider,"Document Colors",{min:e.RECOMPUTE_TIME}),this._register(t.onDidChangeModel((()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()}))),this._register(t.onDidChangeModelLanguage((()=>this.onModelChanged()))),this._register(r.colorProvider.onDidChange((()=>this.onModelChanged()))),this._register(t.onDidChangeConfiguration((()=>{let e=this._isEnabled;this._isEnabled=this.isEnabled(),e!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())}))),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageId(),i=this._configurationService.getValue(t);if(i&&"object"==typeof i){const e=i.colorDecorators;if(e&&void 0!==e.enable&&!e.enable)return e.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();e&&this._languageFeaturesService.colorProvider.has(e)&&(this._localToDispose.add(this._editor.onDidChangeModelContent((()=>{this._timeoutTimer||(this._timeoutTimer=new s._F,this._timeoutTimer.cancelAndSet((()=>{this._timeoutTimer=null,this.beginCompute()}),this._debounceInformation.get(e)))}))),this.beginCompute())}beginCompute(){this._computePromise=(0,s.PG)((e=>{return t=this,i=void 0,r=function*(){const t=this._editor.getModel();if(!t)return Promise.resolve([]);const i=new c.G(!1),n=yield function(e,t,i){const n=[],r=e.ordered(t).reverse().map((e=>Promise.resolve(e.provideDocumentColors(t,i)).then((t=>{if(Array.isArray(t))for(let i of t)n.push({colorInfo:i,provider:e})}))));return Promise.all(r).then((()=>n))}(this._languageFeaturesService.colorProvider,t,e);return this._debounceInformation.update(t,i.elapsed()),n},new((n=void 0)||(n=Promise))((function(e,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((r=r.apply(t,i||[])).next())}));var t,i,n,r})),this._computePromise.then((e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null}),l.dL)}stop(){this._timeoutTimer&&(this._timeoutTimer.cancel(),this._timeoutTimer=null),this._computePromise&&(this._computePromise.cancel(),this._computePromise=null),this._localToDispose.clear()}updateDecorations(e){const t=e.map((e=>({range:{startLineNumber:e.colorInfo.range.startLineNumber,startColumn:e.colorInfo.range.startColumn,endLineNumber:e.colorInfo.range.endLineNumber,endColumn:e.colorInfo.range.endColumn},options:u.qx.EMPTY})));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach(((t,i)=>this._colorDatas.set(t,e[i])))}updateColorDecorators(e){this._colorDecorationClassRefs.clear();let t=[];for(let i=0;ithis._colorDatas.has(e.id)));return 0===i.length?null:this._colorDatas.get(i[0].id)}isColorDecorationId(e){return this._colorDecoratorIds.has(e)}};x.ID="editor.contrib.colorDetector",x.RECOMPUTE_TIME=1e3,x=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([w(1,y.Ui),w(2,f.p),w(3,g.A)],x),(0,r._K)(x.ID,x);var S=i(4669);class k{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new S.Q5,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new S.Q5,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new S.Q5,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}get color(){return this._color}set color(e){this._color.equals(e)||(this._color=e,this._onDidChangeColor.fire(e))}get presentation(){return this.colorPresentations[this.presentationIndex]}get colorPresentations(){return this._colorPresentations}set colorPresentations(e){this._colorPresentations=e,this.presentationIndex>e.length-1&&(this.presentationIndex=0),this._onDidChangePresentation.fire(this.presentation)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let e=0;e{this.backgroundColor=e.getColor($.yJx)||a.Il.white}))),this._register(N.nm(this.pickedColorNode,N.tw.CLICK,(()=>this.model.selectNextColorPresentation()))),this._register(N.nm(r,N.tw.CLICK,(()=>{this.model.color=this.model.originalColor,this.model.flushColor()}))),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this._register(t.onDidChangePresentation(this.onDidChangePresentation,this)),this.pickedColorNode.style.backgroundColor=a.Il.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter()),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=a.Il.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:"",this.pickedColorNode.prepend(q(".codicon.codicon-color-mode"))}}class Y extends n.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this.domNode=q(".colorpicker-body"),N.R3(e,this.domNode),this.saturationBox=new Z(this.domNode,this.model,this.pixelRatio),this._register(this.saturationBox),this._register(this.saturationBox.onDidChange(this.onDidSaturationValueChange,this)),this._register(this.saturationBox.onColorFlushed(this.flushColor,this)),this.opacityStrip=new X(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new J(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new a.Il(new a.tx(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new a.Il(new a.tx(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=360*(1-e);this.model.color=new a.Il(new a.tx(360===i?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class Z extends n.JT{constructor(e,t,i){super(),this.model=t,this.pixelRatio=i,this._onDidChange=new S.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=q(".saturation-wrap"),N.R3(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",N.R3(this.domNode,this.canvas),this.selection=q(".saturation-selection"),N.R3(this.domNode,this.selection),this.layout(),this._register(N.u0(this.domNode,(e=>this.onMouseDown(e)))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new E.Z);const t=N.i(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,E.e,(e=>this.onDidChangePosition(e.posx-t.left,e.posy-t.top)),(()=>null));const i=N.q6(document,(()=>{this._onColorFlushed.fire(),i.dispose(),this.monitor&&(this.monitor.stopMonitoring(!0),this.monitor=null)}),!0)}onDidChangePosition(e,t){const i=Math.max(0,Math.min(1,e/this.width)),n=Math.max(0,Math.min(1,1-t/this.height));this.paintSelection(i,n),this._onDidChange.fire({s:i,v:n})}layout(){this.width=this.domNode.offsetWidth,this.height=this.domNode.offsetHeight,this.canvas.width=this.width*this.pixelRatio,this.canvas.height=this.height*this.pixelRatio,this.paint();const e=this.model.color.hsva;this.paintSelection(e.s,e.v)}paint(){const e=this.model.color.hsva,t=new a.Il(new a.tx(e.h,1,1,1)),i=this.canvas.getContext("2d"),n=i.createLinearGradient(0,0,this.canvas.width,0);n.addColorStop(0,"rgba(255, 255, 255, 1)"),n.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),n.addColorStop(1,"rgba(255, 255, 255, 0)");const r=i.createLinearGradient(0,0,0,this.canvas.height);r.addColorStop(0,"rgba(0, 0, 0, 0)"),r.addColorStop(1,"rgba(0, 0, 0, 1)"),i.rect(0,0,this.canvas.width,this.canvas.height),i.fillStyle=a.Il.Format.CSS.format(t),i.fill(),i.fillStyle=n,i.fill(),i.fillStyle=r,i.fill()}paintSelection(e,t){this.selection.style.left=e*this.width+"px",this.selection.style.top=this.height-t*this.height+"px"}onDidChangeColor(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class Q extends n.JT{constructor(e,t){super(),this.model=t,this._onDidChange=new S.Q5,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new S.Q5,this.onColorFlushed=this._onColorFlushed.event,this.domNode=N.R3(e,q(".strip")),this.overlay=N.R3(this.domNode,q(".overlay")),this.slider=N.R3(this.domNode,q(".slider")),this.slider.style.top="0px",this._register(N.u0(this.domNode,(e=>this.onMouseDown(e)))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new E.Z),i=N.i(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,E.e,(e=>this.onDidChangeTop(e.posy-i.top)),(()=>null));const n=N.q6(document,(()=>{this._onColorFlushed.fire(),n.dispose(),t.stopMonitoring(!0),this.domNode.classList.remove("grabbing")}),!0)}onDidChangeTop(e){const t=Math.max(0,Math.min(1,1-e/this.height));this.updateSliderPosition(t),this._onDidChange.fire(t)}updateSliderPosition(e){this.slider.style.top=(1-e)*this.height+"px"}}class X extends Q{constructor(e,t){super(e,t),this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,r=new a.Il(new a.VS(t,i,n,1)),o=new a.Il(new a.VS(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${r} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class J extends Q{constructor(e,t){super(e,t),this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class ee extends D.${constructor(e,t,i,n){super(),this.model=t,this.pixelRatio=i,this._register(L.PixelRatio.onDidChange((()=>this.layout())));const r=q(".colorpicker-widget");e.appendChild(r);const o=new G(r,this.model,n);this.body=new Y(r,this.model,this.pixelRatio),this._register(o),this._register(this.body)}layout(){this.body.layout()}}var te=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ie{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let ne=class{constructor(e,t){this._editor=e,this._themeService=t,this.hoverOrdinal=1}computeSync(e,t){return[]}computeAsync(e,t,i){return s.Aq.fromPromise(this._computeAsync(e,t,i))}_computeAsync(e,t,i){return te(this,void 0,void 0,(function*(){if(!this._editor.hasModel())return[];const e=x.get(this._editor);if(!e)return[];for(const i of t){if(!e.isColorDecorationId(i.id))continue;const t=e.getColorData(i.range.getStartPosition());if(t)return[yield this._createColorHover(this._editor.getModel(),t.colorInfo,t.provider)]}return[]}))}_createColorHover(e,t,i){return te(this,void 0,void 0,(function*(){const n=e.getValueInRange(t.range),{red:r,green:s,blue:l,alpha:c}=t.color,h=new a.VS(Math.round(255*r),Math.round(255*s),Math.round(255*l),c),d=new a.Il(h),u=yield b(e,t,i,p.T.None),g=new k(d,[],0);return g.colorPresentations=u||[],g.guessColorPresentation(d,n),new ie(this,o.e.lift(t.range),g,i)}))}renderHoverParts(e,t){if(0===t.length||!this._editor.hasModel())return n.JT.None;const i=new n.SL,r=t[0],s=this._editor.getModel(),a=r.model,l=i.add(new ee(e.fragment,a,this._editor.getOption(129),this._themeService));e.setColorPicker(l);let c=new o.e(r.range.startLineNumber,r.range.startColumn,r.range.endLineNumber,r.range.endColumn);const h=()=>{let t,i;if(a.presentation.textEdit){t=[a.presentation.textEdit],i=new o.e(a.presentation.textEdit.range.startLineNumber,a.presentation.textEdit.range.startColumn,a.presentation.textEdit.range.endLineNumber,a.presentation.textEdit.range.endColumn);const e=this._editor.getModel()._setTrackedRange(null,i,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t),i=this._editor.getModel()._getTrackedRange(e)||i}else t=[{range:c,text:a.presentation.label,forceMoveMarkers:!1}],i=c.setEndPosition(c.endLineNumber,c.startColumn+a.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",t);a.presentation.additionalTextEdits&&(t=[...a.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",t),e.hide()),this._editor.pushUndoStop(),c=i},d=e=>b(s,{range:c,color:{red:e.rgba.r/255,green:e.rgba.g/255,blue:e.rgba.b/255,alpha:e.rgba.a}},r.provider,p.T.None).then((e=>{a.colorPresentations=e||[]}));return i.add(a.onColorFlushed((e=>{d(e).then(h)}))),i.add(a.onDidChangeColor(d)),i}};var re,oe;ne=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(re=1,oe=K.XE,function(e,t){oe(e,t,re)})],ne);var se=i(7804),ae=i(6520);class le extends n.JT{constructor(e){super(),this._editor=e,this._register(e.onMouseDown((e=>this.onMouseDown(e))))}dispose(){super.dispose()}onMouseDown(e){const t=e.target;if(6!==t.type)return;if(!t.detail.injectedText)return;if(t.detail.injectedText.options.attachedData!==C)return;if(!t.range)return;const i=this._editor.getContribution(se.ModesHoverController.ID);if(i&&!i.isColorPickerVisible()){const e=new o.e(t.range.startLineNumber,t.range.startColumn+1,t.range.endLineNumber,t.range.endColumn+1);i.showContentHover(e,1,!1)}}}le.ID="editor.contrib.colorContribution",(0,r._K)(le.ID,le),ae.Ae.register(ne)},3365:(e,t,i)=>{"use strict";i.r(t);var n=i(2258),r=i(6830),o=i(4314),s=i(9102),a=i(9381),l=i(9386),c=i(187),h=i(3860);class d{constructor(e,t,i){this.languageConfigurationService=i,this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length;if(i+n>e.length)return!1;for(let r=0;r=65&&n<=90&&n+32===o||o>=65&&o<=90&&o+32===n))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,r,s){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,h=e.endColumn,u=r.getLineContent(a),g=r.getLineContent(c);let f,p=u.lastIndexOf(t,l-1+t.length),m=g.indexOf(i,h-1-i.length);if(-1!==p&&-1!==m)if(a===c)u.substring(p+t.length,m).indexOf(i)>=0&&(p=-1,m=-1);else{const e=u.substring(p+t.length),n=g.substring(0,m);(e.indexOf(i)>=0||n.indexOf(i)>=0)&&(p=-1,m=-1)}-1!==p&&-1!==m?(n&&p+t.length0&&32===g.charCodeAt(m-1)&&(i=" "+i,m-=1),f=d._createRemoveBlockCommentOperations(new o.e(a,p+t.length+1,c,m+1),t,i)):(f=d._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=1===f.length?i:null);for(const e of f)s.addTrackedEditOperation(e.range,e.text)}static _createRemoveBlockCommentOperations(e,t,i){let n=[];return o.e.isEmpty(e)?n.push(l.h.delete(new o.e(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(l.h.delete(new o.e(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(l.h.delete(new o.e(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){let r=[];return o.e.isEmpty(e)?r.push(l.h.replace(new o.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(r.push(l.h.insert(new c.L(e.startLineNumber,e.startColumn),t+(n?" ":""))),r.push(l.h.insert(new c.L(e.endLineNumber,e.endColumn),(n?" ":"")+i))),r}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const r=e.getLanguageIdAtPosition(i,n),o=this.languageConfigurationService.getLanguageConfiguration(r).comments;o&&o.blockCommentStartToken&&o.blockCommentEndToken&&this._createOperationsForBlockComment(this._selection,o.blockCommentStartToken,o.blockCommentEndToken,this._insertSpace,e,t)}computeCursorState(e,t){const i=t.getInverseEditOperations();if(2===i.length){const e=i[0],t=i[1];return new h.Y(e.range.endLineNumber,e.range.endColumn,t.range.startLineNumber,t.range.startColumn)}{const e=i[0].range,t=this._usedEndToken?-this._usedEndToken.length-1:0;return new h.Y(e.endLineNumber,e.endColumn+t,e.endLineNumber,e.endColumn+t)}}}var u=i(5924);class g{constructor(e,t,i,n,r,o,s){this.languageConfigurationService=e,this._selection=t,this._tabSize=i,this._type=n,this._insertSpace=r,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=o,this._ignoreFirstLine=s||!1}static _gatherPreflightCommentStrings(e,t,i,n){e.tokenizeIfCheap(t);const r=e.getLanguageIdAtPosition(t,1),o=n.getLanguageConfiguration(r).comments,s=o?o.lineCommentToken:null;if(!s)return null;let a=[];for(let e=0,n=i-t+1;es?r-1:r}}}var f=i(3580),p=i(4144);class m extends r.R6{constructor(e,t){super(t),this._type=e}run(e,t){const i=e.get(a.c_);if(!t.hasModel())return;const n=[],r=t.getModel().getOptions(),s=t.getOption(19),l=t.getSelections().map(((e,t)=>({selection:e,index:t,ignoreFirstLine:!1})));l.sort(((e,t)=>o.e.compareRangesUsingStarts(e.selection,t.selection)));let c=l[0];for(let e=1;e{"use strict";i.r(t),i.d(t,{ContextMenuController:()=>m});var n=i(5321),r=i(6033),o=i(4741),s=i(5976),a=i(1432),l=i(6830),c=i(9102),h=i(3580),d=i(4144),u=i(8819),g=i(5606),f=i(1847),p=function(e,t){return function(i,n){t(i,n,e)}};let m=class e{constructor(e,t,i,r,o,a){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=r,this._keybindingService=o,this._menuService=a,this._toDispose=new s.SL,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu((e=>this._onContextMenu(e)))),this._toDispose.add(this._editor.onMouseWheel((e=>{if(this._contextMenuIsBeingShownCount>0){const t=this._contextViewService.getContextViewElement(),i=e.srcElement;i.shadowRoot&&n.Ay(t)===i.shadowRoot||this._contextViewService.hideContextView()}}))),this._toDispose.add(this._editor.onKeyDown((e=>{58===e.keyCode&&(e.preventDefault(),e.stopPropagation(),this.showContextMenu())})))}static get(t){return t.getContribution(e.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20))return this._editor.focus(),void(e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position));if(12===e.target.type)return;if(6===e.target.type&&e.target.detail.injectedText)return;if(e.event.preventDefault(),e.event.stopPropagation(),6!==e.target.type&&7!==e.target.type&&1!==e.target.type)return;if(this._editor.focus(),e.target.position){let t=!1;for(const i of this._editor.getSelections())if(i.containsPosition(e.target.position)){t=!0;break}t||this._editor.setPosition(e.target.position)}let t=null;1!==e.target.type&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20))return;if(!this._editor.hasModel())return;if(!this._contextMenuService)return void this._editor.focus();const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?d.eH.SimpleEditorContext:d.eH.EditorContext);t.length>0&&this._doShowContextMenu(t,e)}_getMenuActions(e,t){const i=[],n=this._menuService.createMenu(t,this._contextKeyService),r=n.getActions({arg:e.uri});n.dispose();for(let t of r){const[,n]=t;let r=0;for(const t of n)if(t instanceof d.NZ){const n=this._getMenuActions(e,t.item.submenu);n.length>0&&(i.push(new o.wY(t.id,t.label,n)),r++)}else i.push(t),r++;r&&i.push(new o.Z0)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(53);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const e=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),i=n.i(this._editor.getDomNode()),r=i.left+e.left,o=i.top+e.top+e.height;t={x:r,y:o}}const o=this._editor.getOption(115)&&!a.gn;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:o?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:e=>{const t=this._keybindingFor(e);if(t)return new r.g(e,e,{label:!0,keybinding:t.getLabel(),isMenu:!0});const i=e;return"function"==typeof i.getActionViewItem?i.getActionViewItem():new r.g(e,e,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:e=>this._keybindingFor(e),onHide:e=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};m.ID="editor.contrib.contextmenu",m=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([p(1,g.i),p(2,g.u),p(3,u.i6),p(4,f.d),p(5,d.co)],m);class _ extends l.R6{constructor(){super({id:"editor.action.showContextMenu",label:h.N("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:c.u.textInputFocus,primary:1092,weight:100}})}run(e,t){var i;null===(i=m.get(t))||void 0===i||i.showContextMenu()}}(0,l._K)(m.ID,m),(0,l.Qr)(_)},1895:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CursorRedo:()=>d,CursorUndo:()=>h,CursorUndoRedoController:()=>c});var n=i(5976),r=i(6830),o=i(9102),s=i(3580);class a{constructor(e){this.selections=e}equals(e){const t=this.selections.length;if(t!==e.selections.length)return!1;for(let i=0;i{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeModelContent((e=>{this._undoStack=[],this._redoStack=[]}))),this._register(e.onDidChangeCursorSelection((t=>{if(this._isCursorUndoRedo)return;if(!t.oldSelections)return;if(t.oldModelVersionId!==t.modelVersionId)return;const i=new a(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new l(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())})))}static get(e){return e.getContribution(c.ID)}cursorUndo(){this._editor.hasModel()&&0!==this._undoStack.length&&(this._redoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){this._editor.hasModel()&&0!==this._redoStack.length&&(this._undoStack.push(new l(new a(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._redoStack.pop()))}_applyState(e){this._isCursorUndoRedo=!0,this._editor.setSelections(e.cursorState.selections),this._editor.setScrollPosition({scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),this._isCursorUndoRedo=!1}}c.ID="editor.contrib.cursorUndoRedoController";class h extends r.R6{constructor(){super({id:"cursorUndo",label:s.N("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:o.u.textInputFocus,primary:2099,weight:100}})}run(e,t,i){var n;null===(n=c.get(t))||void 0===n||n.cursorUndo()}}class d extends r.R6{constructor(){super({id:"cursorRedo",label:s.N("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){var n;null===(n=c.get(t))||void 0===n||n.cursorRedo()}}(0,r._K)(c.ID,c),(0,r.Qr)(h),(0,r.Qr)(d)},756:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DragAndDropController:()=>L});var n=i(5976),r=i(1432),o=i(3379),s=i.n(o),a=i(7795),l=i.n(a),c=i(569),h=i.n(c),d=i(3565),u=i.n(d),g=i(9216),f=i.n(g),p=i(4589),m=i.n(p),_=i(9344),v={};v.styleTagTransform=m(),v.setAttributes=u(),v.insert=h().bind(null,"head"),v.domAPI=l(),v.insertStyleElement=f(),s()(_.Z,v),_.Z&&_.Z.locals&&_.Z.locals;var b=i(6830),y=i(187),w=i(4314),C=i(3860),x=i(3084);class S{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let i=e.getValueInRange(this.selection);this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new w.e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),!this.selection.containsPosition(this.targetPosition)||this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition))?this.copy?this.targetSelection=new C.Y(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 C.Y(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.lineNumberthis._onEditorMouseDown(e)))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._register(this._editor.onMouseDrag((e=>this._onEditorMouseDrag(e)))),this._register(this._editor.onMouseDrop((e=>this._onEditorMouseDrop(e)))),this._register(this._editor.onMouseDropCanceled((()=>this._onEditorMouseDropCanceled()))),this._register(this._editor.onKeyDown((e=>this.onEditorKeyDown(e)))),this._register(this._editor.onKeyUp((e=>this.onEditorKeyUp(e)))),this._register(this._editor.onDidBlurEditorWidget((()=>this.onEditorBlur()))),this._register(this._editor.onDidBlurEditorText((()=>this.onEditorBlur()))),this._dndDecorationIds=[],this._mouseDown=!1,this._modifierPressed=!1,this._dragSelection=null}onEditorBlur(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1}onEditorKeyDown(e){this._editor.getOption(31)&&!this._editor.getOption(18)&&(k(e)&&(this._modifierPressed=!0),this._mouseDown&&k(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){this._editor.getOption(31)&&!this._editor.getOption(18)&&(k(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===L.TRIGGER_KEY_VALUE&&this._editor.updateOptions({mouseStyle:"default"}))}_onEditorMouseDown(e){this._mouseDown=!0}_onEditorMouseUp(e){this._mouseDown=!1,this._editor.updateOptions({mouseStyle:"text"})}_onEditorMouseDrag(e){let t=e.target;if(null===this._dragSelection){let e=(this._editor.getSelections()||[]).filter((e=>t.position&&e.containsPosition(t.position)));if(1!==e.length)return;this._dragSelection=e[0]}k(e.event)?this._editor.updateOptions({mouseStyle:"copy"}):this._editor.updateOptions({mouseStyle:"default"}),t.position&&(this._dragSelection.containsPosition(t.position)?this._removeDecoration():this.showAt(t.position))}_onEditorMouseDropCanceled(){this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}_onEditorMouseDrop(e){if(e.target&&(this._hitContent(e.target)||this._hitMargin(e.target))&&e.target.position){let t=new y.L(e.target.position.lineNumber,e.target.position.column);if(null===this._dragSelection){let i=null;if(e.event.shiftKey){let e=this._editor.getSelection();if(e){const{selectionStartLineNumber:n,selectionStartColumn:r}=e;i=[new C.Y(n,r,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map((e=>e.containsPosition(t)?new C.Y(t.lineNumber,t.column,t.lineNumber,t.column):e));this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(k(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(L.ID,new S(this._dragSelection,t,k(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new w.e(e.lineNumber,e.column,e.lineNumber,e.column),options:L._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return 6===e.type||7===e.type}_hitMargin(e){return 2===e.type||3===e.type||4===e.type}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}L.ID="editor.contrib.dragAndDrop",L.TRIGGER_KEY_VALUE=r.dz?6:5,L._DECORATION_OPTIONS=x.qx.register({description:"dnd-target",className:"dnd-target"}),(0,b._K)(L.ID,L)},6917:(e,t,i)=>{"use strict";i.r(t);var n=i(1050),r=i(8401),o=i(666),s=i(8216),a=i(335),l=i(4565);l.P0.registerCommand("_executeDocumentSymbolProvider",(function(e,...t){return i=this,l=void 0,h=function*(){const[i]=t;(0,r.p_)(o.o.isUri(i));const l=e.get(a.Je),c=e.get(s.S),h=yield c.createModelReference(i);try{return(yield l.getOrCreate(h.object.textEditorModel,n.T.None)).getTopLevelSymbols()}finally{h.dispose()}},new((c=void 0)||(c=Promise))((function(e,t){function n(e){try{o(h.next(e))}catch(e){t(e)}}function r(e){try{o(h.throw(e))}catch(e){t(e)}}function o(t){var i;t.done?e(t.value):(i=t.value,i instanceof c?i:new c((function(e){e(i)}))).then(n,r)}o((h=h.apply(i,l||[])).next())}));var i,l,c,h}))},335:(e,t,i)=>{"use strict";i.d(t,{Je:()=>w});var n=i(9488),r=i(1050),o=i(7301),s=i(3725),a=i(3702),l=i(187),c=i(4314),h=i(8191),d=i(2065),u=i(5026),g=i(3733),f=i(5976),p=i(1922),m=function(e,t){return function(i,n){t(i,n,e)}};class _{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;"string"==typeof e?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,void 0!==t.children.get(i)&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let e=0;void 0!==t.children.get(n);e++)n=`${i}_${e}`;return n}static empty(e){return 0===e.children.size}}class v extends _{constructor(e,t,i){super(),this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class b extends _{constructor(e,t,i,n){super(),this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class y extends _{constructor(e){super(),this.uri=e,this.id="root",this.parent=void 0,this._groups=new Map,this.children=new Map,this.id="root",this.parent=void 0}static create(e,t,i){const s=new r.A(i),a=new y(t.uri),l=e.ordered(t),c=l.map(((e,i)=>{var n;let r=_.findId(`provider_${i}`,a),l=new b(r,a,null!==(n=e.displayName)&&void 0!==n?n:"Unknown Outline Provider",i);return Promise.resolve(e.provideDocumentSymbols(t,s.token)).then((e=>{for(const t of e||[])y._makeOutlineElement(t,l);return l}),(e=>((0,o.Cp)(e),l))).then((e=>{_.empty(e)?e.remove():a._groups.set(r,e)}))})),h=e.onDidChange((()=>{const i=e.ordered(t);(0,n.fS)(i,l)||s.cancel()}));return Promise.all(c).then((()=>s.token.isCancellationRequested&&!i.isCancellationRequested?y.create(e,t,i):a._compact())).finally((()=>{h.dispose()}))}static _makeOutlineElement(e,t){let i=_.findId(e,t),n=new v(i,t,e);if(e.children)for(const t of e.children)y._makeOutlineElement(t,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)0===i.children.size?this._groups.delete(t):e+=1;if(1!==e)this.children=this._groups;else{let e=s.$.first(this._groups.values());for(let[,t]of e.children)t.parent=this,this.children.set(t.id,t)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof v?e.push(t.symbol):e.push(...s.$.map(t.children.values(),(e=>e.symbol)));return e.sort(((e,t)=>c.e.compareRangesUsingStarts(e.range,t.range)))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return y._flattenDocumentSymbols(t,e,""),t.sort(((e,t)=>l.L.compare(c.e.getStartPosition(e.range),c.e.getStartPosition(t.range))||l.L.compare(c.e.getEndPosition(t.range),c.e.getEndPosition(e.range))))}static _flattenDocumentSymbols(e,t,i){for(const n of t)e.push({kind:n.kind,tags:n.tags,name:n.name,detail:n.detail,containerName:n.containerName||i,range:n.range,selectionRange:n.selectionRange,children:void 0}),n.children&&y._flattenDocumentSymbols(e,n.children,n.name)}}const w=(0,d.yh)("IOutlineModelService");let C=class{constructor(e,t,i){this._languageFeaturesService=e,this._disposables=new f.SL,this._cache=new a.z6(10,.7),this._debounceInformation=t.for(e.documentSymbolProvider,"DocumentSymbols",{min:350}),this._disposables.add(i.onModelRemoved((e=>{this._cache.delete(e.id)})))}dispose(){this._disposables.dispose()}getOrCreate(e,t){return i=this,o=void 0,a=function*(){const i=this._languageFeaturesService.documentSymbolProvider,o=i.ordered(e);let s=this._cache.get(e.id);if(!s||s.versionId!==e.getVersionId()||!(0,n.fS)(s.provider,o)){let t=new r.A;s={versionId:e.getVersionId(),provider:o,promiseCnt:0,source:t,promise:y.create(i,e,t.token),model:void 0},this._cache.set(e.id,s);const n=Date.now();s.promise.then((t=>{s.model=t,this._debounceInformation.update(e,Date.now()-n)})).catch((t=>{this._cache.delete(e.id)}))}if(s.model)return s.model;s.promiseCnt+=1;const a=t.onCancellationRequested((()=>{0==--s.promiseCnt&&(s.source.cancel(),this._cache.delete(e.id))}));try{return yield s.promise}finally{a.dispose()}},new((s=void 0)||(s=Promise))((function(e,t){function n(e){try{l(a.next(e))}catch(e){t(e)}}function r(e){try{l(a.throw(e))}catch(e){t(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof s?i:new s((function(e){e(i)}))).then(n,r)}l((a=a.apply(i,o||[])).next())}));var i,o,s,a}};C=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([m(0,p.p),m(1,h.A),m(2,g.q)],C),(0,u.z)(w,C,!0)},6467:(e,t,i)=>{"use strict";i.d(t,{yy:()=>m,Dl:()=>_,YQ:()=>v});var n=i(5924),r=i(4314),o=i(1050),s=i(5976),a=i(6830),l=i(8819),c=i(1741),h=i(2065),d=i(5026),u=i(3580);const g=(0,h.yh)("IEditorCancelService"),f=new l.uy("cancellableOperation",!1,(0,u.N)("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));(0,d.z)(g,class{constructor(){this._tokens=new WeakMap}add(e,t){let i,n=this._tokens.get(e);return n||(n=e.invokeWithinContext((e=>({key:f.bindTo(e.get(l.i6)),tokens:new c.S}))),this._tokens.set(e,n)),n.key.set(!0),i=n.tokens.push(t),()=>{i&&(i(),n.key.set(!n.tokens.isEmpty()),i=void 0)}}cancel(e){const t=this._tokens.get(e);if(!t)return;const i=t.tokens.pop();i&&(i.cancel(),t.key.set(!t.tokens.isEmpty()))}},!0);class p extends o.A{constructor(e,t){super(t),this.editor=e,this._unregister=e.invokeWithinContext((t=>t.get(g).add(e,this)))}dispose(){this._unregister(),super.dispose()}}(0,a.fK)(new class extends a._l{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:f})}runEditorCommand(e,t){e.get(g).cancel(t)}});class m{constructor(e,t){if(this.flags=t,0!=(1&this.flags)){const t=e.getModel();this.modelVersionId=t?n.WU("{0}#{1}",t.uri.toString(),t.getVersionId()):null}else this.modelVersionId=null;0!=(4&this.flags)?this.position=e.getPosition():this.position=null,0!=(2&this.flags)?this.selection=e.getSelection():this.selection=null,0!=(8&this.flags)?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof m))return!1;const t=e;return this.modelVersionId===t.modelVersionId&&this.scrollLeft===t.scrollLeft&&this.scrollTop===t.scrollTop&&!(!this.position&&t.position||this.position&&!t.position||this.position&&t.position&&!this.position.equals(t.position))&&!(!this.selection&&t.selection||this.selection&&!t.selection||this.selection&&t.selection&&!this.selection.equalsRange(t.selection))}validate(e){return this._equals(new m(e,this.flags))}}class _ extends p{constructor(e,t,i,n){super(e,n),this._listener=new s.SL,4&t&&this._listener.add(e.onDidChangeCursorPosition((e=>{i&&r.e.containsPosition(i,e.position)||this.cancel()}))),2&t&&this._listener.add(e.onDidChangeCursorSelection((e=>{i&&r.e.containsRange(i,e.selection)||this.cancel()}))),8&t&&this._listener.add(e.onDidScrollChange((e=>this.cancel()))),1&t&&(this._listener.add(e.onDidChangeModel((e=>this.cancel()))),this._listener.add(e.onDidChangeModelContent((e=>this.cancel()))))}dispose(){this._listener.dispose(),super.dispose()}}class v extends o.A{constructor(e,t){super(t),this._listener=e.onDidChangeContent((()=>this.cancel()))}dispose(){this._listener.dispose(),super.dispose()}}},3450:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CommonFindController:()=>ut,FindController:()=>gt,MatchFindAction:()=>vt,NextMatchFindAction:()=>bt,NextSelectionMatchFindAction:()=>Ct,PreviousMatchFindAction:()=>yt,PreviousSelectionMatchFindAction:()=>xt,SelectionMatchFindAction:()=>wt,StartFindAction:()=>ft,StartFindReplaceAction:()=>St,StartFindWithArgsAction:()=>mt,StartFindWithSelectionAction:()=>_t,getSelectionSearchString:()=>dt});var n=i(5393),r=i(5976),o=i(5924),s=i(6830),a=i(9102),l=i(9488),c=i(1329),h=i(187),d=i(4314),u=i(3860),g=i(7277),f=i(4973),p=i(3084),m=i(3910),_=i(7781);class v{constructor(e){this._editor=e,this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null,this._startPosition=this._editor.getPosition()}dispose(){this._editor.deltaDecorations(this._allDecorations(),[]),this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}reset(){this._decorations=[],this._overviewRulerApproximateDecorations=[],this._findScopeDecorationIds=[],this._rangeHighlightDecorationId=null,this._highlightedDecorationId=null}getCount(){return this._decorations.length}getFindScope(){return this._findScopeDecorationIds[0]?this._editor.getModel().getDecorationRange(this._findScopeDecorationIds[0]):null}getFindScopes(){if(this._findScopeDecorationIds.length){const e=this._findScopeDecorationIds.map((e=>this._editor.getModel().getDecorationRange(e))).filter((e=>!!e));if(e.length)return e}return null}getStartPosition(){return this._startPosition}setStartPosition(e){this._startPosition=e,this.setCurrentFindMatch(null)}_getDecorationIndex(e){const t=this._decorations.indexOf(e);return t>=0?t+1:1}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const e of t){const t=e.options;if(t===v._FIND_MATCH_DECORATION||t===v._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(e.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,r=this._decorations.length;n{if(null!==this._highlightedDecorationId&&(e.changeDecorationOptions(this._highlightedDecorationId,v._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),null!==t&&(this._highlightedDecorationId=t,e.changeDecorationOptions(this._highlightedDecorationId,v._CURRENT_FIND_MATCH_DECORATION)),null!==this._rangeHighlightDecorationId&&(e.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),null!==t){let i=this._editor.getModel().getDecorationRange(t);if(i.startLineNumber!==i.endLineNumber&&1===i.endColumn){let e=i.endLineNumber-1,t=this._editor.getModel().getLineMaxColumn(e);i=new d.e(i.startLineNumber,i.startColumn,e,t)}this._rangeHighlightDecorationId=e.addDecoration(i,v._RANGE_HIGHLIGHT_DECORATION)}})),i}set(e,t){this._editor.changeDecorations((i=>{let n=v._FIND_MATCH_DECORATION,r=[];if(e.length>1e3){n=v._FIND_MATCH_NO_OVERVIEW_DECORATION;const t=this._editor.getModel().getLineCount(),i=this._editor.getLayoutInfo().height/t,o=Math.max(2,Math.ceil(3/i));let s=e[0].range.startLineNumber,a=e[0].range.endLineNumber;for(let t=1,i=e.length;t=i.startLineNumber?i.endLineNumber>a&&(a=i.endLineNumber):(r.push({range:new d.e(s,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),s=i.startLineNumber,a=i.endLineNumber)}r.push({range:new d.e(s,1,a,1),options:v._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=new Array(e.length);for(let t=0,i=e.length;ti.removeDecoration(e))),this._findScopeDecorationIds=[]),(null==t?void 0:t.length)&&(this._findScopeDecorationIds=t.map((e=>i.addDecoration(e,v._FIND_SCOPE_DECORATION))))}))}matchBeforePosition(e){if(0===this._decorations.length)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(n&&!(n.endLineNumber>e.lineNumber)){if(n.endLineNumbere.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(0===this._decorations.length)return null;for(let t=0,i=this._decorations.length;te.lineNumber)return n;if(!(n.startColumn0){let e=[];for(let t=0;td.e.compareRangesUsingStarts(e.range,t.range)));let i=[],n=e[0];for(let t=1;t0?t[0].toUpperCase()+t.substr(1):e[0][0].toUpperCase()!==e[0][0]&&t.length>0?t[0].toLowerCase()+t.substr(1):t}return t}function w(e,t,i){return-1!==e[0].indexOf(i)&&-1!==t.indexOf(i)&&e[0].split(i).length===t.split(i).length}function C(e,t,i){const n=t.split(i),r=e[0].split(i);let o="";return n.forEach(((e,t)=>{o+=y([r[t]],e)+i})),o.slice(0,-1)}class x{constructor(e){this.staticValue=e,this.kind=0}}class S{constructor(e){this.pieces=e,this.kind=1}}class k{constructor(e){e&&0!==e.length?1===e.length&&null!==e[0].staticValue?this._state=new x(e[0].staticValue):this._state=new S(e):this._state=new x("")}static fromStaticValue(e){return new k([L.staticValue(e)])}get hasReplacementPatterns(){return 1===this._state.kind}buildReplaceString(e,t){if(0===this._state.kind)return t?y(e,this._state.staticValue):this._state.staticValue;let i="";for(let t=0,n=this._state.pieces.length;t0){let e=[],t=n.caseOps.length,i=0;for(let o=0,s=r.length;o=t){e.push(r.slice(o));break}switch(n.caseOps[i]){case"U":e.push(r[o].toUpperCase());break;case"u":e.push(r[o].toUpperCase()),i++;break;case"L":e.push(r[o].toLowerCase());break;case"l":e.push(r[o].toLowerCase()),i++;break;default:e.push(r[o])}}r=e.join("")}i+=r}return i}static _substitute(e,t){if(null===t)return"";if(0===e)return t[0];let i="";for(;e>0;){if(ethis.research(!1)),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition((e=>{3!==e.reason&&5!==e.reason&&6!==e.reason||this._decorations.setStartPosition(this._editor.getPosition())}))),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent((e=>{this._ignoreModelContentChanged||(e.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())}))),this._toDispose.add(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,(0,r.B9)(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){!this._isDisposed&&this._editor.hasModel()&&(e.searchString||e.isReplaceRevealed||e.isRegex||e.wholeWord||e.matchCase||e.searchScope)&&(this._editor.getModel().isTooLargeForSyncing()?(this._startSearchingTimer.cancel(),this._startSearchingTimer.setIfNotSet((()=>{e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor)}),240)):e.searchScope?this.research(e.moveCursor,this._state.searchScope):this.research(e.moveCursor))}static _getSearchRange(e,t){return t||e.getFullModelRange()}research(e,t){let i=null;void 0!==t?null!==t&&(i=Array.isArray(t)?t:[t]):i=this._decorations.getFindScopes(),null!==i&&(i=i.map((e=>{if(e.startLineNumber!==e.endLineNumber){let t=e.endLineNumber;return 1===e.endColumn&&(t-=1),new d.e(e.startLineNumber,1,t,this._editor.getModel().getLineMaxColumn(t))}return e})));let n=this._findMatches(i,!1,q);this._decorations.set(n,i);const r=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(r);if(0===o&&n.length>0){const e=(0,l.lG)(n.map((e=>e.range)),(e=>d.e.compareRangesUsingStarts(e,r)>=0));o=e>0?e-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,r=this._editor.getModel();return t||1===n?(1===i?i=r.getLineCount():i--,n=r.getLineMaxColumn(i)):n--,new h.L(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const t=this._decorations.matchAfterPosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,r=this._editor.getModel();return t||n===r.getLineMaxColumn(i)?(i===r.getLineCount()?i=1:i++,n=1):n++,new h.L(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const t=this._decorations.matchBeforePosition(e);return void(t&&this._setCurrentFindMatch(t))}if(this._decorations.getCount()=r)break;let o=e.charCodeAt(n);if(36===o){i.emitUnchanged(n-1),i.emitStatic("$",n+1);continue}if(48===o||38===o){i.emitUnchanged(n-1),i.emitMatchIndex(0,n+1,t),t.length=0;continue}if(49<=o&&o<=57){let s=o-48;if(n+1=r)break;let o=e.charCodeAt(n);switch(o){case 92:i.emitUnchanged(n-1),i.emitStatic("\\",n+1);break;case 110:i.emitUnchanged(n-1),i.emitStatic("\n",n+1);break;case 116:i.emitUnchanged(n-1),i.emitStatic("\t",n+1);break;case 117:case 85:case 108:case 76:i.emitUnchanged(n-1),i.emitStatic("",n+1),t.push(String.fromCharCode(o))}}}return i.finalize()}(this._state.replaceString):k.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),r=new c.T4(t,n);this._executeEditorCommand("replace",r),this._decorations.setStartPosition(new h.L(t.startLineNumber,t.startColumn+n.length)),this.research(!0)}else this._decorations.setStartPosition(this._editor.getPosition()),this._setCurrentFindMatch(i.range)}_findMatches(e,t,i){const n=(e||[null]).map((e=>G._getSearchRange(this._editor.getModel(),e)));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();null===e&&this._state.matchesCount>=q?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const e=new g.bc(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(117):null).parseSearchRequest();if(!e)return;let t=e.regex;if(!t.multiline){let e="mu";t.ignoreCase&&(e+="i"),t.global&&(e+="g"),t=new RegExp(t.source,e)}const i=this._editor.getModel(),n=i.getValue(1),r=i.getFullModelRange(),o=this._getReplacePattern();let s;const a=this._state.preserveCase;s=o.hasReplacementPatterns||a?n.replace(t,(function(){return o.buildReplaceString(arguments,a)})):n.replace(t,o.buildReplaceString(null,a));let l=new c.hP(r,s,this._editor.getSelection());this._executeEditorCommand("replaceAll",l)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let e=0,r=i.length;ee.range)),n);this._executeEditorCommand("replaceAll",r)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),t=this._findMatches(e,!1,1073741824).map((e=>new u.Y(e.range.startLineNumber,e.range.startColumn,e.range.endLineNumber,e.range.endColumn))),i=this._editor.getSelection();for(let e=0,n=t.length;ethis._hide()),2e3)),this._isVisible=!1,this._editor=e,this._state=t,this._keybindingService=i,this._domNode=document.createElement("div"),this._domNode.className="findOptionsWidget",this._domNode.style.display="none",this._domNode.style.top="10px",this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const o=r.getColorTheme().getColor(m.PRb),s=r.getColorTheme().getColor(m.Pvw),a=r.getColorTheme().getColor(m.XEs);this.caseSensitive=this._register(new Z.vk({appendTitle:this._keybindingLabelFor(V),isChecked:this._state.matchCase,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange((()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)}))),this.wholeWords=this._register(new Z.n3({appendTitle:this._keybindingLabelFor(z),isChecked:this._state.wholeWord,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange((()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)}))),this.regex=this._register(new Z.am({appendTitle:this._keybindingLabelFor(H),isChecked:this._state.isRegex,inputActiveOptionBorder:o,inputActiveOptionForeground:s,inputActiveOptionBackground:a})),this._domNode.appendChild(this.regex.domNode),this._register(this.regex.onChange((()=>{this._state.change({isRegex:this.regex.checked},!1)}))),this._editor.addOverlayWidget(this),this._register(this._state.onFindReplaceStateChange((e=>{let t=!1;e.isRegex&&(this.regex.checked=this._state.isRegex,t=!0),e.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,t=!0),e.matchCase&&(this.caseSensitive.checked=this._state.matchCase,t=!0),!this._state.isRevealed&&t&&this._revealTemporarily()}))),this._register(Y.j_(this._domNode,(e=>this._onMouseOut()))),this._register(Y.nm(this._domNode,"mouseover",(e=>this._onMouseOver()))),this._applyTheme(r.getColorTheme()),this._register(r.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return X.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){this._hideSoon.schedule()}_onMouseOver(){this._hideSoon.cancel()}_show(){this._isVisible||(this._isVisible=!0,this._domNode.style.display="block")}_hide(){this._isVisible&&(this._isVisible=!1,this._domNode.style.display="none")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.PRb),inputActiveOptionForeground:e.getColor(m.Pvw),inputActiveOptionBackground:e.getColor(m.XEs)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}X.ID="editor.contrib.findOptionsWidget",(0,_.Ic)(((e,t)=>{const i=e.getColor(m.D0T);i&&t.addRule(`.monaco-editor .findOptionsWidget { background-color: ${i}; }`);const n=e.getColor(m.Hfx);n&&t.addRule(`.monaco-editor .findOptionsWidget { color: ${n}; }`);const r=e.getColor(m.rh);r&&t.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${r}; }`);const o=e.getColor(m.lRK);o&&t.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${o}; }`)}));var J=i(4669);function ee(e,t){return 1===e||2!==e&&t}class te extends r.JT{constructor(){super(),this._onFindReplaceStateChange=this._register(new J.Q5),this.onFindReplaceStateChange=this._onFindReplaceStateChange.event,this._searchString="",this._replaceString="",this._isRevealed=!1,this._isReplaceRevealed=!1,this._isRegex=!1,this._isRegexOverride=0,this._wholeWord=!1,this._wholeWordOverride=0,this._matchCase=!1,this._matchCaseOverride=0,this._preserveCase=!1,this._preserveCaseOverride=0,this._searchScope=null,this._matchesPosition=0,this._matchesCount=0,this._currentMatch=null,this._loop=!0,this._isSearching=!1,this._filters=null}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return ee(this._isRegexOverride,this._isRegex)}get wholeWord(){return ee(this._wholeWordOverride,this._wholeWord)}get matchCase(){return ee(this._matchCaseOverride,this._matchCase)}get preserveCase(){return ee(this._preserveCaseOverride,this._preserveCase)}get actualIsRegex(){return this._isRegex}get actualWholeWord(){return this._wholeWord}get actualMatchCase(){return this._matchCase}get actualPreserveCase(){return this._preserveCase}get searchScope(){return this._searchScope}get matchesPosition(){return this._matchesPosition}get matchesCount(){return this._matchesCount}get currentMatch(){return this._currentMatch}changeMatchInfo(e,t,i){let n={moveCursor:!1,updateHistory:!1,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},r=!1;0===t&&(e=0),e>t&&(e=t),this._matchesPosition!==e&&(this._matchesPosition=e,n.matchesPosition=!0,r=!0),this._matchesCount!==t&&(this._matchesCount=t,n.matchesCount=!0,r=!0),void 0!==i&&(d.e.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,r=!0)),r&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let r={moveCursor:t,updateHistory:i,searchString:!1,replaceString:!1,isRevealed:!1,isReplaceRevealed:!1,isRegex:!1,wholeWord:!1,matchCase:!1,preserveCase:!1,searchScope:!1,matchesPosition:!1,matchesCount:!1,currentMatch:!1,loop:!1,isSearching:!1,filters:!1},o=!1;const s=this.isRegex,a=this.wholeWord,l=this.matchCase,c=this.preserveCase;void 0!==e.searchString&&this._searchString!==e.searchString&&(this._searchString=e.searchString,r.searchString=!0,o=!0),void 0!==e.replaceString&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,r.replaceString=!0,o=!0),void 0!==e.isRevealed&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,r.isRevealed=!0,o=!0),void 0!==e.isReplaceRevealed&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,r.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.preserveCase&&(this._preserveCase=e.preserveCase),void 0!==e.searchScope&&((null===(n=e.searchScope)||void 0===n?void 0:n.every((e=>{var t;return null===(t=this._searchScope)||void 0===t?void 0:t.some((t=>!d.e.equalsRange(t,e)))})))||(this._searchScope=e.searchScope,r.searchScope=!0,o=!0)),void 0!==e.loop&&this._loop!==e.loop&&(this._loop=e.loop,r.loop=!0,o=!0),void 0!==e.isSearching&&this._isSearching!==e.isSearching&&(this._isSearching=e.isSearching,r.isSearching=!0,o=!0),void 0!==e.filters&&(this._filters?this._filters.update(e.filters):this._filters=e.filters,r.filters=!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,this._preserveCaseOverride=void 0!==e.preserveCaseOverride?e.preserveCaseOverride:0,s!==this.isRegex&&(o=!0,r.isRegex=!0),a!==this.wholeWord&&(o=!0,r.wholeWord=!0),l!==this.matchCase&&(o=!0,r.matchCase=!0),c!==this.preserveCase&&(o=!0,r.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(r)}canNavigateBack(){return this.canNavigateInLoop()||1!==this.matchesPosition}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition=q}}var ie=i(1588),ne=i(5087),re=i(3878),oe=i(3046),se=i(7301),ae=i(1432),le=i(3379),ce=i.n(le),he=i(7795),de=i.n(he),ue=i(569),ge=i.n(ue),fe=i(3565),pe=i.n(fe),me=i(9216),_e=i.n(me),ve=i(4589),be=i.n(ve),ye=i(1486),we={};we.styleTagTransform=be(),we.setAttributes=pe(),we.insert=ge().bind(null,"head"),we.domAPI=de(),we.insertStyleElement=_e(),ce()(ye.Z,we),ye.Z&&ye.Z.locals&&ye.Z.locals;var Ce=i(3580),xe=i(3728);function Se(e){var t,i;return"Up"===(null===(t=e.lookupKeybinding("history.showPrevious"))||void 0===t?void 0:t.getElectronAccelerator())&&"Down"===(null===(i=e.lookupKeybinding("history.showNext"))||void 0===i?void 0:i.getElectronAccelerator())}var ke=i(9554);const Le=(0,ke.q5)("find-selection",oe.lA.selection,Ce.N("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),Ne=(0,ke.q5)("find-collapsed",oe.lA.chevronRight,Ce.N("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),Ee=(0,ke.q5)("find-expanded",oe.lA.chevronDown,Ce.N("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),De=(0,ke.q5)("find-replace",oe.lA.replace,Ce.N("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),Ae=(0,ke.q5)("find-replace-all",oe.lA.replaceAll,Ce.N("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Te=(0,ke.q5)("find-previous-match",oe.lA.arrowUp,Ce.N("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),Ie=(0,ke.q5)("find-next-match",oe.lA.arrowDown,Ce.N("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Me=Ce.N("label.find","Find"),Oe=Ce.N("placeholder.find","Find"),Re=Ce.N("label.previousMatchButton","Previous Match"),Pe=Ce.N("label.nextMatchButton","Next Match"),Fe=Ce.N("label.toggleSelectionFind","Find in Selection"),Be=Ce.N("label.closeButton","Close"),We=Ce.N("label.replace","Replace"),Ve=Ce.N("placeholder.replace","Replace"),ze=Ce.N("label.replaceButton","Replace"),He=Ce.N("label.replaceAllButton","Replace All"),je=Ce.N("label.toggleReplaceButton","Toggle Replace"),Ue=Ce.N("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",q),$e=Ce.N("label.matchesLocation","{0} of {1}"),Ke=Ce.N("label.noResults","No results"),qe=419;let Ge=69;const Ye="ctrlEnterReplaceAll.windows.donotask",Ze=ae.dz?256:2048;class Qe{constructor(e){this.afterLineNumber=e,this.heightInPx=33,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function Xe(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionStart>0&&e.stopPropagation()}function Je(e,t,i){const n=!!t.match(/\n/);i&&n&&i.selectionEndthis._updateHistoryDelayer.cancel()))),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration((e=>{if(e.hasChanged(81)&&(this._codeEditor.getOption(81)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),e.hasChanged(131)&&this._tryUpdateWidgetWidth(),e.hasChanged(2)&&this.updateAccessibilitySupport(),e.hasChanged(35)){const e=this._codeEditor.getOption(35).addExtraSpaceOnTop;e&&!this._viewZone&&(this._viewZone=new Qe(0),this._showViewZone()),!e&&this._viewZone&&this._removeViewZone()}}))),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection((()=>{this._isVisible&&this._updateToggleSelectionFindButton()}))),this._register(this._codeEditor.onDidFocusEditorWidget((()=>{return e=this,t=void 0,n=function*(){if(this._isVisible){let e=yield this._controller.getGlobalBufferTerm();e&&e!==this._state.searchString&&(this._state.change({searchString:e},!1),this._findInput.select())}},new((i=void 0)||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}));var e,t,i,n}))),this._findInputFocused=A.bindTo(a),this._findFocusTracker=this._register(Y.go(this._findInput.inputBox.inputElement)),this._register(this._findFocusTracker.onDidFocus((()=>{this._findInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._findFocusTracker.onDidBlur((()=>{this._findInputFocused.set(!1)}))),this._replaceInputFocused=T.bindTo(a),this._replaceFocusTracker=this._register(Y.go(this._replaceInput.inputBox.inputElement)),this._register(this._replaceFocusTracker.onDidFocus((()=>{this._replaceInputFocused.set(!0),this._updateSearchScope()}))),this._register(this._replaceFocusTracker.onDidBlur((()=>{this._replaceInputFocused.set(!1)}))),this._codeEditor.addOverlayWidget(this),this._codeEditor.getOption(35).addExtraSpaceOnTop&&(this._viewZone=new Qe(0)),this._applyTheme(l.getColorTheme()),this._register(l.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel((()=>{this._isVisible&&(this._viewZoneId=void 0)}))),this._register(this._codeEditor.onDidScrollChange((e=>{e.scrollTopChanged?this._layoutViewZone():setTimeout((()=>{this._layoutViewZone()}),0)})))}getId(){return et.ID}getDomNode(){return this._domNode}getPosition(){return this._isVisible?{preference:0}:null}_onStateChanged(e){if(e.searchString){try{this._ignoreChangeEvent=!0,this._findInput.setValue(this._state.searchString)}finally{this._ignoreChangeEvent=!1}this._updateButtons()}if(e.replaceString&&(this._replaceInput.inputBox.value=this._state.replaceString),e.isRevealed&&(this._state.isRevealed?this._reveal():this._hide(!0)),e.isReplaceRevealed&&(this._state.isReplaceRevealed?this._codeEditor.getOption(81)||this._isReplaceVisible||(this._isReplaceVisible=!0,this._replaceInput.width=Y.w(this._findInput.domNode),this._updateButtons(),this._replaceInput.inputBox.layout()):this._isReplaceVisible&&(this._isReplaceVisible=!1,this._updateButtons())),(e.isRevealed||e.isReplaceRevealed)&&(this._state.isRevealed||this._state.isReplaceRevealed)&&this._tryUpdateHeight()&&this._showViewZone(),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.preserveCase&&this._replaceInput.setPreserveCase(this._state.preserveCase),e.searchScope&&(this._state.searchScope?this._toggleSelectionFind.checked=!0:this._toggleSelectionFind.checked=!1,this._updateToggleSelectionFindButton()),e.searchString||e.matchesCount||e.matchesPosition){let e=this._state.searchString.length>0&&0===this._state.matchesCount;this._domNode.classList.toggle("no-results",e),this._updateMatchesCount(),this._updateButtons()}(e.searchString||e.currentMatch)&&this._layoutViewZone(),e.updateHistory&&this._delayedUpdateHistory(),e.loop&&this._updateButtons()}_delayedUpdateHistory(){this._updateHistoryDelayer.trigger(this._updateHistory.bind(this)).then(void 0,se.dL)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){let e;if(this._matchesCount.style.minWidth=Ge+"px",this._state.matchesCount>=q?this._matchesCount.title=Ue:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild),this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=q&&(t+="+");let i=String(this._state.matchesPosition);"0"===i&&(i="?"),e=o.WU($e,i,t)}else e=Ke;this._matchesCount.appendChild(document.createTextNode(e)),(0,ie.Z9)(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),Ge=Math.max(Ge,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===Ke)return""===i?Ce.N("ariaSearchNoResultEmpty","{0} found",e):Ce.N("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=Ce.N("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),r=this._codeEditor.getModel();return r&&t.startLineNumber<=r.getLineCount()&&t.startLineNumber>=1?`${r.getLineContent(t.startLineNumber)}, ${n}`:n}return Ce.N("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=!!e&&(e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn),i=this._toggleSelectionFind.checked;this._isVisible&&(i||t)?this._toggleSelectionFind.enable():this._toggleSelectionFind.disable()}_updateButtons(){this._findInput.setEnabled(this._isVisible),this._replaceInput.setEnabled(this._isVisible&&this._isReplaceVisible),this._updateToggleSelectionFindButton(),this._closeBtn.setEnabled(this._isVisible);let e=this._state.searchString.length>0,t=!!this._state.matchesCount;this._prevBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateBack()),this._nextBtn.setEnabled(this._isVisible&&e&&t&&this._state.canNavigateForward()),this._replaceBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._replaceAllBtn.setEnabled(this._isVisible&&this._isReplaceVisible&&e),this._domNode.classList.toggle("replaceToggled",this._isReplaceVisible),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible);let i=!this._codeEditor.getOption(81);this._toggleReplaceBtn.setEnabled(this._isVisible&&i)}_reveal(){if(this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],!this._isVisible){this._isVisible=!0;const e=this._codeEditor.getSelection();switch(this._codeEditor.getOption(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":{const t=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=t;break}}this._tryUpdateWidgetWidth(),this._updateButtons(),this._revealTimeouts.push(setTimeout((()=>{this._domNode.classList.add("visible"),this._domNode.setAttribute("aria-hidden","false")}),0)),this._revealTimeouts.push(setTimeout((()=>{this._findInput.validate()}),200)),this._codeEditor.layoutOverlayWidget(this);let t=!0;if(this._codeEditor.getOption(35).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Y.i(i),r=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(r?r.left:0),s=r?r.top:0;if(this._viewZone&&se.startLineNumber&&(t=!1);const i=Y.xQ(this._domNode).left;o>i&&(t=!1);const r=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(r?r.left:0)>i&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach((e=>{clearTimeout(e)})),this._revealTimeouts=[],this._isVisible&&(this._isVisible=!1,this._updateButtons(),this._domNode.classList.remove("visible"),this._domNode.setAttribute("aria-hidden","true"),this._findInput.clearMessage(),e&&this._codeEditor.focus(),this._codeEditor.layoutOverlayWidget(this),this._removeViewZone())}_layoutViewZone(e){if(!this._codeEditor.getOption(35).addExtraSpaceOnTop)return void this._removeViewZone();if(!this._isVisible)return;const t=this._viewZone;void 0===this._viewZoneId&&t&&this._codeEditor.changeViewZones((i=>{t.heightInPx=this._getHeight(),this._viewZoneId=i.addZone(t),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+t.heightInPx)}))}_showViewZone(e=!0){if(!this._isVisible)return;if(!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;void 0===this._viewZone&&(this._viewZone=new Qe(0));const t=this._viewZone;this._codeEditor.changeViewZones((i=>{if(void 0!==this._viewZoneId){const n=this._getHeight();if(n===t.heightInPx)return;let r=n-t.heightInPx;return t.heightInPx=n,i.layoutZone(this._viewZoneId),void(e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+r))}{let n=this._getHeight();if(n-=this._codeEditor.getOption(75).top,n<=0)return;t.heightInPx=n,this._viewZoneId=i.addZone(t),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+n)}}))}_removeViewZone(){this._codeEditor.changeViewZones((e=>{void 0!==this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))}))}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(m.PRb),inputActiveOptionBackground:e.getColor(m.XEs),inputActiveOptionForeground:e.getColor(m.Pvw),inputBackground:e.getColor(m.sEe),inputForeground:e.getColor(m.zJb),inputBorder:e.getColor(m.dt_),inputValidationInfoBackground:e.getColor(m._lC),inputValidationInfoForeground:e.getColor(m.YI3),inputValidationInfoBorder:e.getColor(m.EPQ),inputValidationWarningBackground:e.getColor(m.RV_),inputValidationWarningForeground:e.getColor(m.SUG),inputValidationWarningBorder:e.getColor(m.C3g),inputValidationErrorBackground:e.getColor(m.paE),inputValidationErrorForeground:e.getColor(m._t9),inputValidationErrorBorder:e.getColor(m.OZR)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible)return;if(!Y.Uw(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0)return void this._domNode.classList.add("hiddenEditor");this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const t=e.width,i=e.minimap.minimapWidth;let n=!1,r=!1,o=!1;if(this._resized&&Y.w(this._domNode)>qe)return this._domNode.style.maxWidth=t-28-i-15+"px",void(this._replaceInput.width=Y.w(this._findInput.domNode));if(447+i>=t&&(r=!0),447+i-Ge>=t&&(o=!0),447+i-Ge>=t+50&&(n=!0),this._domNode.classList.toggle("collapsed-find-widget",n),this._domNode.classList.toggle("narrow-find-widget",o),this._domNode.classList.toggle("reduced-find-widget",r),o||n||(this._domNode.style.maxWidth=t-28-i-15+"px"),this._resized){this._findInput.inputBox.layout();let e=this._findInput.inputBox.element.clientWidth;e>0&&(this._replaceInput.width=e)}else this._isReplaceVisible&&(this._replaceInput.width=Y.w(this._findInput.domNode))}_getHeight(){let e=0;return e+=4,e+=this._findInput.inputBox.height+2,this._isReplaceVisible&&(e+=4,e+=this._replaceInput.inputBox.height+2),e+=4,e}_tryUpdateHeight(){const e=this._getHeight();return(null===this._cachedHeight||this._cachedHeight!==e)&&(this._cachedHeight=e,this._domNode.style.height=`${e}px`,!0)}focusFindInput(){this._findInput.select(),this._findInput.focus()}focusReplaceInput(){this._replaceInput.select(),this._replaceInput.focus()}highlightFindOptions(){this._findInput.highlightFindOptions()}_updateSearchScope(){if(this._codeEditor.hasModel()&&this._toggleSelectionFind.checked){let e=this._codeEditor.getSelections();e.map((e=>{1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1)));const t=this._state.currentMatch;return e.startLineNumber===e.endLineNumber||d.e.equalsRange(e,t)?null:e})).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){return e.equals(3|Ze)?(this._keybindingService.dispatchEvent(e,e.target)||this._findInput.inputBox.insertAtCursor("\n"),void e.preventDefault()):e.equals(2)?(this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Xe(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):e.equals(18)?Je(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea")):void 0}_onReplaceInputKeyDown(e){return e.equals(3|Ze)?(this._keybindingService.dispatchEvent(e,e.target)||(ae.ED&&ae.tY&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(Ce.N("ctrlEnter.keybindingChanged","Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.")),this._ctrlEnterReplaceAllWarningPrompted=!0,this._storageService.store(Ye,!0,0,0)),this._replaceInput.inputBox.insertAtCursor("\n")),void e.preventDefault()):e.equals(2)?(this._findInput.focusOnCaseSensitive(),void e.preventDefault()):e.equals(1026)?(this._findInput.focus(),void e.preventDefault()):e.equals(2066)?(this._codeEditor.focus(),void e.preventDefault()):e.equals(16)?Xe(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):e.equals(18)?Je(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea")):void 0}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new xe.Yb(null,this._contextViewProvider,{width:221,label:Me,placeholder:Oe,appendCaseSensitiveLabel:this._keybindingLabelFor(V),appendWholeWordsLabel:this._keybindingLabelFor(z),appendRegexLabel:this._keybindingLabelFor(H),validation:e=>{if(0===e.length||!this._findInput.getRegex())return null;try{return new RegExp(e,"gu"),null}catch(e){return{content:e.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Se(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown((e=>this._onFindInputKeyDown(e)))),this._register(this._findInput.inputBox.onDidChange((()=>{this._ignoreChangeEvent||this._state.change({searchString:this._findInput.getValue()},!0)}))),this._register(this._findInput.onDidOptionChange((()=>{this._state.change({isRegex:this._findInput.getRegex(),wholeWord:this._findInput.getWholeWords(),matchCase:this._findInput.getCaseSensitive()},!0)}))),this._register(this._findInput.onCaseSensitiveKeyDown((e=>{e.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),e.preventDefault())}))),this._register(this._findInput.onRegexKeyDown((e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),e.preventDefault())}))),this._register(this._findInput.inputBox.onDidHeightChange((e=>{this._tryUpdateHeight()&&this._showViewZone()}))),ae.IJ&&this._register(this._findInput.onMouseDown((e=>this._onFindInputMouseDown(e)))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new tt({label:Re+this._keybindingLabelFor(B),icon:Te,onTrigger:()=>{this._codeEditor.getAction(B).run().then(void 0,se.dL)}})),this._nextBtn=this._register(new tt({label:Pe+this._keybindingLabelFor(F),icon:Ie,onTrigger:()=>{this._codeEditor.getAction(F).run().then(void 0,se.dL)}}));let e=document.createElement("div");e.className="find-part",e.appendChild(this._findInput.domNode);const t=document.createElement("div");t.className="find-actions",e.appendChild(t),t.appendChild(this._matchesCount),t.appendChild(this._prevBtn.domNode),t.appendChild(this._nextBtn.domNode),this._toggleSelectionFind=this._register(new ne.X({icon:Le,title:Fe+this._keybindingLabelFor(j),isChecked:!1})),this._register(this._toggleSelectionFind.onChange((()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let e=this._codeEditor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}else this._state.change({searchScope:null},!0)}))),t.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new tt({label:Be+this._keybindingLabelFor(W),icon:ke.s_,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:e=>{e.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),e.preventDefault())}})),t.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new xe.Nq(null,void 0,{label:We,placeholder:Ve,appendPreserveCaseLabel:this._keybindingLabelFor(U),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>Se(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown((e=>this._onReplaceInputKeyDown(e)))),this._register(this._replaceInput.inputBox.onDidChange((()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)}))),this._register(this._replaceInput.inputBox.onDidHeightChange((e=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()}))),this._register(this._replaceInput.onDidOptionChange((()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)}))),this._register(this._replaceInput.onPreserveCaseKeyDown((e=>{e.equals(2)&&(this._prevBtn.isEnabled()?this._prevBtn.focus():this._nextBtn.isEnabled()?this._nextBtn.focus():this._toggleSelectionFind.enabled?this._toggleSelectionFind.focus():this._closeBtn.isEnabled()&&this._closeBtn.focus(),e.preventDefault())}))),this._replaceBtn=this._register(new tt({label:ze+this._keybindingLabelFor($),icon:De,onTrigger:()=>{this._controller.replace()},onKeyDown:e=>{e.equals(1026)&&(this._closeBtn.focus(),e.preventDefault())}})),this._replaceAllBtn=this._register(new tt({label:He+this._keybindingLabelFor(K),icon:Ae,onTrigger:()=>{this._controller.replaceAll()}}));let i=document.createElement("div");i.className="replace-part",i.appendChild(this._replaceInput.domNode);const n=document.createElement("div");n.className="replace-actions",i.appendChild(n),n.appendChild(this._replaceBtn.domNode),n.appendChild(this._replaceAllBtn.domNode),this._toggleReplaceBtn=this._register(new tt({label:je,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=Y.w(this._findInput.domNode),this._replaceInput.inputBox.layout()),this._showViewZone()}})),this._toggleReplaceBtn.setExpanded(this._isReplaceVisible),this._domNode=document.createElement("div"),this._domNode.className="editor-widget find-widget",this._domNode.setAttribute("aria-hidden","true"),this._domNode.style.width="419px",this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(e),this._domNode.appendChild(i),this._resizeSash=new re.g(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let r=qe;this._register(this._resizeSash.onDidStart((()=>{r=Y.w(this._domNode)}))),this._register(this._resizeSash.onDidChange((e=>{this._resized=!0;let t=r+e.startX-e.currentX;t(parseFloat(Y.Dx(this._domNode).maxWidth)||0)||(this._domNode.style.width=`${t}px`,this._isReplaceVisible&&(this._replaceInput.width=Y.w(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())}))),this._register(this._resizeSash.onDidReset((()=>{const e=Y.w(this._domNode);if(e{this._opts.onTrigger(),e.preventDefault()})),this.onkeydown(this._domNode,(e=>{if(e.equals(10)||e.equals(3))return this._opts.onTrigger(),void e.preventDefault();this._opts.onKeyDown&&this._opts.onKeyDown(e)}))}get domNode(){return this._domNode}isEnabled(){return this._domNode.tabIndex>=0}focus(){this._domNode.focus()}setEnabled(e){this._domNode.classList.toggle("disabled",!e),this._domNode.setAttribute("aria-disabled",String(!e)),this._domNode.tabIndex=e?0:-1}setExpanded(e){this._domNode.setAttribute("aria-expanded",String(!!e)),e?(this._domNode.classList.remove(..._.kS.asClassNameArray(Ne)),this._domNode.classList.add(..._.kS.asClassNameArray(Ee))):(this._domNode.classList.remove(..._.kS.asClassNameArray(Ee)),this._domNode.classList.add(..._.kS.asClassNameArray(Ne)))}}(0,_.Ic)(((e,t)=>{const i=(e,i)=>{i&&t.addRule(`.monaco-editor ${e} { background-color: ${i}; }`)};i(".findMatch",e.getColor(m.MUv)),i(".currentFindMatch",e.getColor(m.nyM)),i(".findScope",e.getColor(m.jUe)),i(".find-widget",e.getColor(m.D0T));const n=e.getColor(m.rh);n&&t.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const r=e.getColor(m.EiJ);r&&t.addRule(`.monaco-editor .findMatch { border: 1px ${"hc"===e.type?"dotted":"solid"} ${r}; box-sizing: border-box; }`);const o=e.getColor(m.pnM);o&&t.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${o}; padding: 1px; box-sizing: border-box; }`);const s=e.getColor(m.gkn);s&&t.addRule(`.monaco-editor .findScope { border: 1px ${"hc"===e.type?"dashed":"solid"} ${s}; }`);const a=e.getColor(m.lRK);a&&t.addRule(`.monaco-editor .find-widget { border: 1px solid ${a}; }`);const l=e.getColor(m.Hfx);l&&t.addRule(`.monaco-editor .find-widget { color: ${l}; }`);const c=e.getColor(m.Ido);c&&t.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${c}; }`);const h=e.getColor(m.Ng6);if(h)t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${h}; }`);else{const i=e.getColor(m.D1_);i&&t.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${i}; }`)}const d=e.getColor(m.lUq);d&&t.addRule(`\n\t\t.monaco-editor .find-widget .button:not(.disabled):hover,\n\t\t.monaco-editor .find-widget .codicon-find-selection:hover {\n\t\t\tbackground-color: ${d} !important;\n\t\t}\n\t`);const u=e.getColor(m.R80);u&&t.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${u}; }`)}));var it=i(4144),nt=i(4972),rt=i(5606),ot=i(1847),st=i(9422),at=i(6904),lt=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},ct=function(e,t){return function(i,n){t(i,n,e)}},ht=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function dt(e,t="single",i=!1){if(!e.hasModel())return null;const n=e.getSelection();if("single"===t&&n.startLineNumber===n.endLineNumber||"multiple"===t)if(n.isEmpty()){const t=e.getConfiguredWordAtPosition(n.getStartPosition());if(t&&!1===i)return t.word}else if(e.getModel().getValueLengthInRange(n)<524288)return e.getModel().getValueInRange(n);return null}let ut=class e extends r.JT{constructor(e,t,i,r){super(),this._editor=e,this._findWidgetVisible=D.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=r,this._updateHistoryDelayer=new n.vp(500),this._state=this._register(new te),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange((e=>this._onStateChanged(e)))),this._model=null,this._register(this._editor.onDidChangeModel((()=>{let e=this._editor.getModel()&&this._state.isRevealed;this.disposeModel(),this._state.change({searchScope:null,matchCase:this._storageService.getBoolean("editor.matchCase",1,!1),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,!1),isRegex:this._storageService.getBoolean("editor.isRegex",1,!1),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,!1)},!1),e&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})})))}get editor(){return this._editor}static get(t){return t.getContribution(e.ID)}dispose(){this.disposeModel(),super.dispose()}disposeModel(){this._model&&(this._model.dispose(),this._model=null)}_onStateChanged(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)}saveQueryState(e){e.isRegex&&this._storageService.store("editor.isRegex",this._state.actualIsRegex,1,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}loadQueryState(){this._state.change({matchCase:this._storageService.getBoolean("editor.matchCase",1,this._state.matchCase),wholeWord:this._storageService.getBoolean("editor.wholeWord",1,this._state.wholeWord),isRegex:this._storageService.getBoolean("editor.isRegex",1,this._state.isRegex),preserveCase:this._storageService.getBoolean("editor.preserveCase",1,this._state.preserveCase)},!1)}isFindInputFocused(){return!!A.getValue(this._contextKeyService)}getState(){return this._state}closeFindWidget(){this._state.change({isRevealed:!1,searchScope:null},!1),this._editor.focus()}toggleCaseSensitive(){this._state.change({matchCase:!this._state.matchCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleWholeWords(){this._state.change({wholeWord:!this._state.wholeWord},!1),this._state.isRevealed||this.highlightFindOptions()}toggleRegex(){this._state.change({isRegex:!this._state.isRegex},!1),this._state.isRevealed||this.highlightFindOptions()}togglePreserveCase(){this._state.change({preserveCase:!this._state.preserveCase},!1),this._state.isRevealed||this.highlightFindOptions()}toggleSearchScope(){if(this._state.searchScope)this._state.change({searchScope:null},!0);else if(this._editor.hasModel()){let e=this._editor.getSelections();e.map((e=>(1===e.endColumn&&e.endLineNumber>e.startLineNumber&&(e=e.setEndPosition(e.endLineNumber-1,this._editor.getModel().getLineMaxColumn(e.endLineNumber-1))),e.isEmpty()?null:e))).filter((e=>!!e)),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=o.ec(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e,t){return ht(this,void 0,void 0,(function*(){if(this.disposeModel(),!this._editor.hasModel())return;let i=Object.assign(Object.assign({},t),{isRevealed:!0});if("single"===e.seedSearchStringFromSelection){let t=dt(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);t&&(this._state.isRegex?i.searchString=o.ec(t):i.searchString=t)}else if("multiple"===e.seedSearchStringFromSelection&&!e.updateSearchScope){let t=dt(this._editor,e.seedSearchStringFromSelection);t&&(i.searchString=t)}if(!i.searchString&&e.seedSearchStringFromGlobalClipboard){let e=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;e&&(i.searchString=e)}if(e.forceRevealReplace||i.isReplaceRevealed?i.isReplaceRevealed=!0:this._findWidgetVisible.get()||(i.isReplaceRevealed=!1),e.updateSearchScope){let e=this._editor.getSelections();e.some((e=>!e.isEmpty()))&&(i.searchScope=e)}i.loop=e.loop,this._state.change(i,!1),this._model||(this._model=new G(this._editor,this._state))}))}start(e,t){return this._start(e,t)}moveToNextMatch(){return!!this._model&&(this._model.moveToNextMatch(),!0)}moveToPrevMatch(){return!!this._model&&(this._model.moveToPrevMatch(),!0)}replace(){return!!this._model&&(this._model.replace(),!0)}replaceAll(){return!!this._model&&(this._model.replaceAll(),!0)}selectAllMatches(){return!!this._model&&(this._model.selectAllMatches(),this._editor.focus(),!0)}getGlobalBufferTerm(){return ht(this,void 0,void 0,(function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""}))}setGlobalBufferTerm(e){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};ut.ID="editor.contrib.findController",ut=lt([ct(1,E.i6),ct(2,at.Uy),ct(3,nt.p)],ut);let gt=class extends ut{constructor(e,t,i,n,r,o,s,a){super(e,i,s,a),this._contextViewService=t,this._keybindingService=n,this._themeService=r,this._notificationService=o,this._widget=null,this._findOptionsWidget=null}_start(e,t){const i=Object.create(null,{_start:{get:()=>super._start}});return ht(this,void 0,void 0,(function*(){this._widget||this._createFindWidget();const n=this._editor.getSelection();let r=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":r=!0;break;case"never":r=!1;break;case"multiline":r=!!n&&n.startLineNumber!==n.endLineNumber}e.updateSearchScope=e.updateSearchScope||r,yield i._start.call(this,e,t),this._widget&&(2===e.shouldFocus?this._widget.focusReplaceInput():1===e.shouldFocus&&this._widget.focusFindInput())}))}highlightFindOptions(e=!1){this._widget||this._createFindWidget(),this._state.isRevealed&&!e?this._widget.highlightFindOptions():this._findOptionsWidget.highlightFindOptions()}_createFindWidget(){this._widget=this._register(new et(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new X(this._editor,this._state,this._keybindingService,this._themeService))}};gt=lt([ct(1,rt.u),ct(2,E.i6),ct(3,ot.d),ct(4,_.XE),ct(5,st.lT),ct(6,at.Uy),ct(7,nt.p)],gt);const ft=(0,s.rn)(new s.jY({id:"actions.find",label:Ce.N("startFindAction","Find"),alias:"Find",precondition:E.Ao.or(a.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:it.eH.MenubarEditMenu,group:"3_find",title:Ce.N({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));ft.addImplementation(0,((e,t,i)=>{const n=ut.get(t);return!!n&&n.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:t.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop})}));const pt={description:"Open a new In-Editor Find Widget.",args:[{name:"Open a new In-Editor Find Widget args",schema:{properties:{searchString:{type:"string"},replaceString:{type:"string"},regex:{type:"boolean"},regexOverride:{type:"number",description:Ce.N("actions.find.isRegexOverride",'Overrides "Use Regular Expression" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},wholeWord:{type:"boolean"},wholeWordOverride:{type:"number",description:Ce.N("actions.find.wholeWordOverride",'Overrides "Match Whole Word" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},matchCase:{type:"boolean"},matchCaseOverride:{type:"number",description:Ce.N("actions.find.matchCaseOverride",'Overrides "Math Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},preserveCase:{type:"boolean"},preserveCaseOverride:{type:"number",description:Ce.N("actions.find.preserveCaseOverride",'Overrides "Preserve Case" flag.\nThe flag will not be saved for the future.\n0: Do Nothing\n1: True\n2: False')},findInSelection:{type:"boolean"}}}}]};class mt extends s.R6{constructor(){super({id:"editor.actions.findWithArgs",label:Ce.N("startFindWithArgsAction","Find With Arguments"),alias:"Find With Arguments",precondition:void 0,kbOpts:{kbExpr:null,primary:0,weight:100},description:pt})}run(e,t,i){return ht(this,void 0,void 0,(function*(){const e=ut.get(t);if(e){const n=i?{searchString:i.searchString,replaceString:i.replaceString,isReplaceRevealed:void 0!==i.replaceString,isRegex:i.isRegex,wholeWord:i.matchWholeWord,matchCase:i.isCaseSensitive,preserveCase:i.preserveCase}:{};yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:1,shouldAnimate:!0,updateSearchScope:(null==i?void 0:i.findInSelection)||!1,loop:t.getOption(35).loop},n),e.setGlobalBufferTerm(e.getState().searchString)}}))}}class _t extends s.R6{constructor(){super({id:"actions.findWithSelection",label:Ce.N("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return ht(this,void 0,void 0,(function*(){const e=ut.get(t);e&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),e.setGlobalBufferTerm(e.getState().searchString))}))}}class vt extends s.R6{run(e,t){return ht(this,void 0,void 0,(function*(){const e=ut.get(t);e&&!this._run(e)&&(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:0===e.getState().searchString.length&&"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(e))}))}}class bt extends vt{constructor(){super({id:F,label:Ce.N("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:a.u.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:E.Ao.and(a.u.focus,A),primary:3,weight:100}]})}_run(e){return!!e.moveToNextMatch()&&(e.editor.pushUndoStop(),!0)}}class yt extends vt{constructor(){super({id:B,label:Ce.N("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:a.u.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:E.Ao.and(a.u.focus,A),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class wt extends s.R6{run(e,t){return ht(this,void 0,void 0,(function*(){const e=ut.get(t);if(!e)return;const i="selection"===t.getOption(35).seedSearchStringFromSelection;let n=null;"never"!==t.getOption(35).seedSearchStringFromSelection&&(n=dt(t,"single",i)),n&&e.setSearchString(n),this._run(e)||(yield e.start({forceRevealReplace:!1,seedSearchStringFromSelection:"never"!==t.getOption(35).seedSearchStringFromSelection?"single":"none",seedSearchStringFromNonEmptySelection:i,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(e))}))}}class Ct extends wt{constructor(){super({id:"editor.action.nextSelectionMatchFindAction",label:Ce.N("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:a.u.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class xt extends wt{constructor(){super({id:"editor.action.previousSelectionMatchFindAction",label:Ce.N("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:a.u.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const St=(0,s.rn)(new s.jY({id:"editor.action.startFindReplaceAction",label:Ce.N("startReplace","Replace"),alias:"Replace",precondition:E.Ao.or(a.u.focus,E.Ao.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:it.eH.MenubarEditMenu,group:"3_find",title:Ce.N({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));St.addImplementation(0,((e,t,i)=>{if(!t.hasModel()||t.getOption(81))return!1;const n=ut.get(t);if(!n)return!1;const r=t.getSelection(),o=n.isFindInputFocused(),s=!r.isEmpty()&&r.startLineNumber===r.endLineNumber&&"never"!==t.getOption(35).seedSearchStringFromSelection&&!o,a=o||s?2:1;return n.start({forceRevealReplace:!0,seedSearchStringFromSelection:s?"single":"none",seedSearchStringFromNonEmptySelection:"selection"===t.getOption(35).seedSearchStringFromSelection,seedSearchStringFromGlobalClipboard:"never"!==t.getOption(35).seedSearchStringFromSelection,shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop})})),(0,s._K)(ut.ID,gt),(0,s.Qr)(mt),(0,s.Qr)(_t),(0,s.Qr)(bt),(0,s.Qr)(yt),(0,s.Qr)(Ct),(0,s.Qr)(xt);const kt=s._l.bindToContribution(ut.get);(0,s.fK)(new kt({id:W,precondition:D,handler:e=>e.closeFindWidget(),kbOpts:{weight:105,kbExpr:E.Ao.and(a.u.focus,E.Ao.not("isComposing")),primary:9,secondary:[1033]}})),(0,s.fK)(new kt({id:V,precondition:void 0,handler:e=>e.toggleCaseSensitive(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:I.primary,mac:I.mac,win:I.win,linux:I.linux}})),(0,s.fK)(new kt({id:z,precondition:void 0,handler:e=>e.toggleWholeWords(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:M.primary,mac:M.mac,win:M.win,linux:M.linux}})),(0,s.fK)(new kt({id:H,precondition:void 0,handler:e=>e.toggleRegex(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:O.primary,mac:O.mac,win:O.win,linux:O.linux}})),(0,s.fK)(new kt({id:j,precondition:void 0,handler:e=>e.toggleSearchScope(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:R.primary,mac:R.mac,win:R.win,linux:R.linux}})),(0,s.fK)(new kt({id:U,precondition:void 0,handler:e=>e.togglePreserveCase(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:P.primary,mac:P.mac,win:P.win,linux:P.linux}})),(0,s.fK)(new kt({id:$,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:3094}})),(0,s.fK)(new kt({id:$,precondition:D,handler:e=>e.replace(),kbOpts:{weight:105,kbExpr:E.Ao.and(a.u.focus,T),primary:3}})),(0,s.fK)(new kt({id:K,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:2563}})),(0,s.fK)(new kt({id:K,precondition:D,handler:e=>e.replaceAll(),kbOpts:{weight:105,kbExpr:E.Ao.and(a.u.focus,T),primary:void 0,mac:{primary:2051}}})),(0,s.fK)(new kt({id:"editor.action.selectAllMatches",precondition:D,handler:e=>e.selectAllMatches(),kbOpts:{weight:105,kbExpr:a.u.focus,primary:515}}))},8423:(e,t,i)=>{"use strict";i.r(t),i.d(t,{FoldingController:()=>_e,editorFoldForeground:()=>Ce,foldBackgroundBackground:()=>we});var n=i(5393),r=i(7301),o=i(2258),s=i(5976),a=i(5924),l=i(8401),c=i(3379),h=i.n(c),d=i(7795),u=i.n(d),g=i(569),f=i.n(g),p=i(3565),m=i.n(p),_=i(9216),v=i.n(_),b=i(4589),y=i.n(b),w=i(2873),C={};C.styleTagTransform=y(),C.setAttributes=m(),C.insert=f().bind(null,"head"),C.domAPI=u(),C.insertStyleElement=v(),h()(w.Z,C),w.Z&&w.Z.locals&&w.Z.locals;var x=i(3407),S=i(6830),k=i(9102),L=i(6887),N=i(9381),E=i(4669);const D=16777215,A=4278190080;class T{constructor(e,t,i){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=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(t,i)=>{let n=e[e.length-1];return this.getStartLineNumber(n)<=t&&this.getEndLineNumber(n)>=i};for(let i=0,n=this._startIndexes.length;iD||r>D)throw new Error("startLineNumber or endLineNumber must not exceed 16777215");for(;e.length>0&&!t(n,r);)e.pop();let o=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=n+((255&o)<<24),this._endIndexes[i]=r+((65280&o)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&D}getEndLineNumber(e){return this._endIndexes[e]&D}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return 0!=(this._collapseStates[t]&1<>>24)+((this._endIndexes[e]&A)>>>16);return 65535===t?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(0===i)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}toString(){let e=[];for(let t=0;t=this.endLineNumber}containsLine(e){return this.startLineNumber<=e&&e<=this.endLineNumber}}class M{constructor(e,t){this._updateEventEmitter=new E.Q5,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new T(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort(((e,t)=>e.regionIndex-t.regionIndex));const t={};this._decorationProvider.changeDecorations((i=>{let n=0,r=-1,o=-1;const s=e=>{for(;no&&(o=e),n++}};for(let i of e){let e=i.regionIndex,n=this._editorDecorationIds[e];if(n&&!t[n]){t[n]=!0,s(e);let i=!this._regions.isCollapsed(e);this._regions.setCollapsed(e,i),r=Math.max(r,this._regions.getEndLineNumber(e))}}s(this._regions.length)})),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=-1,r=(r,o)=>{const s=e.getStartLineNumber(r),a=e.getEndLineNumber(r);o||(o=e.isCollapsed(r)),o&&((e,i)=>{for(let n of t)if(en&&(n=a)},o=0,s=()=>{for(;o=t))break;r(a,i===t),a++}}l=s()}for(;a0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let e=this.getRegionAtLine(i.startLineNumber);e&&!e.isCollapsed&&t.push(e)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),r=1;for(;n>=0;){let e=this._regions.toRegion(n);t&&!t(e,r)||i.push(e),r++,n=e.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,r=e?e.endLineNumber:Number.MAX_VALUE;if(t&&2===t.length){const e=[];for(let o=n,s=this._regions.length;o0&&!n.containedBy(e[e.length-1]);)e.pop();e.push(n),t(n,e.length)&&i.push(n)}}else for(let e=n,o=this._regions.length;e0)for(let o of n){let n=e.getRegionAtLine(o);if(n&&(n.isCollapsed!==t&&r.push(n),i>1)){let o=e.getRegionsInside(n,((e,n)=>e.isCollapsed!==t&&ne.isCollapsed!==t&&ne.isCollapsed!==t&&n<=i));r.push(...n)}e.toggleCollapseState(r)}function P(e,t,i){let n=[];for(let t of i){const i=e.getAllRegionsAtLine(t,void 0);i.length>0&&n.push(i[0])}let r=e.getRegionsInside(null,(e=>n.every((t=>!t.containedBy(e)&&!e.containedBy(t)))&&e.isCollapsed!==t));e.toggleCollapseState(r)}function F(e,t,i){let n=e.textModel,r=e.regions,o=[];for(let e=r.length-1;e>=0;e--)if(i!==r.isCollapsed(e)){let i=r.getStartLineNumber(e);t.test(n.getLineContent(i))&&o.push(r.toRegion(e))}e.toggleCollapseState(o)}function B(e,t,i){let n=e.regions,r=[];for(let e=n.length-1;e>=0;e--)i!==n.isCollapsed(e)&&t===n.getType(e)&&r.push(n.toRegion(e));e.toggleCollapseState(r)}var W=i(9488),V=i(4314),z=i(3795);class H{constructor(e){this._updateEventEmitter=new E.Q5,this._hasLineChanges=!1,this._foldingModel=e,this._foldingModelListener=e.onDidChange((e=>this.updateHiddenRanges())),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}notifyChangeModelContent(e){this._hiddenRanges.length&&!this._hasLineChanges&&(this._hasLineChanges=e.changes.some((e=>e.range.endLineNumber!==e.range.startLineNumber||0!==(0,z.Q)(e.text)[0])))}updateHiddenRanges(){let e=!1,t=[],i=0,n=0,r=Number.MAX_VALUE,o=-1,s=this._foldingModel.regions;for(;i({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber})))}applyHiddenRanges(e){this._hiddenRanges=e,this._hasLineChanges=!1,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return null!==j(this._hiddenRanges,e)}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,r=e=>(n&&function(e,t){return e>=t.startLineNumber&&e<=t.endLineNumber}(e,n)||(n=j(this._hiddenRanges,e)),n?n.startLineNumber-1:null);for(let n=0,o=e.length;n0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function j(e,t){let i=(0,W.lG)(e,(e=>t=0&&e[i].endLineNumber>=t?e[i]:null}var U=i(9616);class ${constructor(e,t,i){this.editorModel=e,this.languageConfigurationService=t,this.maxFoldingRegions=i,this.id="indent"}dispose(){}compute(e,t){let i=this.languageConfigurationService.getLanguageConfiguration(this.editorModel.getLanguageId()).foldingRules,n=i&&!!i.offSide,r=i&&i.markers;return Promise.resolve(function(e,t,i,n,r){const o=e.getOptions().tabSize;let s,a=new K(n=null!=n?n:5e3,r);i&&(s=new RegExp(`(${i.start.source})|(?:${i.end.source})`));let l=[],c=e.getLineCount()+1;l.push({indent:-1,endAbove:c,line:c});for(let i=e.getLineCount();i>0;i--){let n,r=e.getLineContent(i),c=(0,U.q)(r,o),h=l[l.length-1];if(-1!==c){if(s&&(n=r.match(s))){if(!n[1]){l.push({indent:-2,endAbove:i,line:i});continue}{let e=l.length-1;for(;e>0&&-2!==l[e].indent;)e--;if(e>0){l.length=e+1,h=l[e],a.insertFirst(i,h.line,c),h.line=i,h.indent=c,h.endAbove=i;continue}}}if(h.indent>c){do{l.pop(),h=l[l.length-1]}while(h.indent>c);let e=h.endAbove-1;e-i>=1&&a.insertFirst(i,e,c)}h.indent===c?h.endAbove=i:l.push({indent:c,endAbove:i,line:i})}else t&&(h.endAbove=i)}return a.toIndentRanges(e)}(this.editorModel,n,r,this.maxFoldingRegions,t))}}class K{constructor(e,t){this._notifyTooManyRegions=t,this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>D||t>D)return;let n=this._length;this._startIndexes[n]=e,this._endIndexes[n]=t,this._length++,i<1e3&&(this._indentOccurrences[i]=(this._indentOccurrences[i]||0)+1)}toIndentRanges(e){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=this._length-1,n=0;i>=0;i--,n++)e[n]=this._startIndexes[i],t[n]=this._endIndexes[i];return new T(e,t)}{this._notifyTooManyRegions&&this._notifyTooManyRegions(this._foldingRangesLimit);let t=0,i=this._indentOccurrences.length;for(let e=0;ethis._foldingRangesLimit){i=e;break}t+=n}}const n=e.getOptions().tabSize;let r=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit);for(let s=this._length-1,a=0;s>=0;s--){let l=this._startIndexes[s],c=e.getLineContent(l),h=(0,U.q)(c,n);(hPromise.resolve(e.provideFoldingRanges(t,q,i)).then((e=>{if(!i.isCancellationRequested&&Array.isArray(e)){Array.isArray(n)||(n=[]);let i=t.getLineCount();for(let t of e)t.start>0&&t.end>t.start&&t.end<=i&&n.push({start:t.start,end:t.end,rank:o,kind:t.kind})}}),r.Cp)));return Promise.all(o).then((e=>n))}(this.providers,this.editorModel,e).then((e=>e?Q(e,this.limit,t):null))}dispose(){var e;null===(e=this.disposables)||void 0===e||e.dispose()}}class Z{constructor(e,t){this._notifyTooManyRegions=t,this._startIndexes=[],this._endIndexes=[],this._nestingLevels=[],this._nestingLevelCounts=[],this._types=[],this._length=0,this._foldingRangesLimit=e}add(e,t,i,n){if(e>D||t>D)return;let r=this._length;this._startIndexes[r]=e,this._endIndexes[r]=t,this._nestingLevels[r]=n,this._types[r]=i,this._length++,n<30&&(this._nestingLevelCounts[n]=(this._nestingLevelCounts[n]||0)+1)}toIndentRanges(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;ithis._foldingRangesLimit){t=i;break}e+=n}}let i=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),r=[];for(let o=0,s=0;o{let i=e.start-t.start;return 0===i&&(i=e.rank-t.rank),i})),o=new Z(t,i),s=[];for(let e of r)if(n){if(e.start>n.start)if(e.end<=n.end)s.push(n),n=e,o.add(e.start,e.end,e.kind&&e.kind.value,s.length);else{if(e.start>n.end){do{n=s.pop()}while(n&&e.start>n.end);n&&s.push(n),n=e}o.add(e.start,e.end,e.kind&&e.kind.value,s.length)}}else n=e,o.add(e.start,e.end,e.kind&&e.kind.value,s.length);return o.toIndentRanges()}const X="init";class J{constructor(e,t,i,n){if(this.editorModel=e,this.id=X,t.length){let r=t=>({range:{startLineNumber:t.startLineNumber,startColumn:0,endLineNumber:t.endLineNumber,endColumn:e.getLineLength(t.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(r)),this.timeout=setTimeout(i,n)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),"number"==typeof this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let e of this.decorationIds){let i=this.editorModel.getDecorationRange(e);i&&t.push({start:i.startLineNumber,end:i.endLineNumber,rank:1})}return Promise.resolve(Q(t,Number.MAX_VALUE))}}var ee=i(3580),te=i(8819),ie=i(3910),ne=i(7781),re=i(3046),oe=i(3084),se=i(9554);const ae=(0,se.q5)("folding-expanded",re.lA.chevronDown,(0,ee.N)("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),le=(0,se.q5)("folding-collapsed",re.lA.chevronRight,(0,ee.N)("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class ce{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?ce.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?ce.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:ce.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?ce.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:ce.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}ce.COLLAPSED_VISUAL_DECORATION=oe.qx.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:ne.kS.asClassName(le)}),ce.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=oe.qx.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:ne.kS.asClassName(le)}),ce.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=oe.qx.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:ne.kS.asClassName(ae)}),ce.EXPANDED_VISUAL_DECORATION=oe.qx.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+ne.kS.asClassName(ae)}),ce.HIDDEN_RANGE_DECORATION=oe.qx.register({description:"folding-hidden-range-decoration",stickiness:1});var he=i(9422),de=i(4603),ue=i(8191),ge=i(4013),fe=i(1922),pe=function(e,t){return function(i,n){t(i,n,e)}};const me=new te.uy("foldingEnabled",!1);let _e=class e extends s.JT{constructor(e,t,i,n,r,o){super(),this.contextKeyService=t,this.languageConfigurationService=i,this.languageFeaturesService=o,this._tooManyRegionsNotified=!1,this.localToDispose=this._register(new s.SL),this.editor=e;const a=this.editor.getOptions();this._isEnabled=a.get(37),this._useFoldingProviders="indentation"!==a.get(38),this._unfoldOnClickAfterEndOfLine=a.get(42),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=a.get(40),this._maxFoldingRegions=a.get(41),this.updateDebounceInfo=r.for(o.foldingRangeProvider,"Folding",{min:200}),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new ce(e),this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===a.get(99),this.foldingDecorationProvider.showFoldingHighlights=a.get(39),this.foldingEnabled=me.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._notifyTooManyRegions=e=>{this._tooManyRegionsNotified||(n.notify({severity:de.Z.Warning,sticky:!0,message:ee.N("maximum fold ranges","The number of foldable regions is limited to a maximum of {0}. Increase configuration option ['Folding Maximum Regions'](command:workbench.action.openSettings?[\"editor.foldingMaximumRegions\"]) to enable more.",e)}),this._tooManyRegionsNotified=!0)},this._register(this.editor.onDidChangeModel((()=>this.onModelChanged()))),this._register(this.editor.onDidChangeConfiguration((e=>{if(e.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),e.hasChanged(41)&&(this._maxFoldingRegions=this.editor.getOptions().get(41),this._tooManyRegionsNotified=!1,this.onModelChanged()),e.hasChanged(99)||e.hasChanged(39)){const e=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls="mouseover"===e.get(99),this.foldingDecorationProvider.showFoldingHighlights=e.get(39),this.triggerFoldingModelChanged()}e.hasChanged(38)&&(this._useFoldingProviders="indentation"!==this.editor.getOptions().get(38),this.onFoldingStrategyChanged()),e.hasChanged(42)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(42)),e.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))}))),this.onModelChanged()}static get(t){return t.getContribution(e.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel)return;if(!e||e.lineCount!==t.getLineCount())return;if(this._currentModelHasFoldedImports=!!e.foldedImports,!e.collapsedRegions)return;e.provider!==G&&e.provider!==X||(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const e=this.getFoldingModel();e&&e.then((e=>{if(e){this._restoringViewState=!0;try{e.applyMemento(i)}finally{this._restoringViewState=!1}}})).then(void 0,r.dL)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();this._isEnabled&&e&&!e.isTooLargeForTokenization()&&(this._currentModelHasFoldedImports=!1,this.foldingModel=new M(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new H(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange((e=>this.onHiddenRangesChanges(e)))),this.updateScheduler=new n.vp(this.updateDebounceInfo.get(e)),this.cursorChangedScheduler=new n.pY((()=>this.revealCursor()),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(this.languageFeaturesService.foldingRangeProvider.onDidChange((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration((()=>this.onFoldingStrategyChanged()))),this.localToDispose.add(this.editor.onDidChangeModelContent((e=>this.onDidChangeModelContent(e)))),this.localToDispose.add(this.editor.onDidChangeCursorPosition((()=>this.onCursorPositionChanged()))),this.localToDispose.add(this.editor.onMouseDown((e=>this.onEditorMouseDown(e)))),this.localToDispose.add(this.editor.onMouseUp((e=>this.onEditorMouseUp(e)))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.triggerFoldingModelChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.triggerFoldingModelChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new $(e,this.languageConfigurationService,this._maxFoldingRegions),this._useFoldingProviders&&this.foldingModel){let t=this.languageFeaturesService.foldingRangeProvider.ordered(this.foldingModel.textModel);if(0===t.length&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new J(e,this.foldingStateMemento.collapsedRegions,(()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()}),3e4);t.length>0&&(this.rangeProvider=new Y(e,t,(()=>this.triggerFoldingModelChanged()),this._maxFoldingRegions))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onDidChangeModelContent(e){var t;null===(t=this.hiddenRangeModel)||void 0===t||t.notifyChangeModelContent(e),this.triggerFoldingModelChanged()}triggerFoldingModelChanged(){this.updateScheduler&&(this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.foldingModelPromise=this.updateScheduler.trigger((()=>{const e=this.foldingModel;if(!e)return null;const t=new ge.G(!0),i=this.getRangeProvider(e.textModel);let r=this.foldingRegionPromise=(0,n.PG)((e=>i.compute(e,this._notifyTooManyRegions)));return r.then((i=>{if(i&&r===this.foldingRegionPromise){let n;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const e=i.setCollapsedAllOfType(L.AD.Imports.value,!0);e&&(n=x.Z.capture(this.editor),this._currentModelHasFoldedImports=e)}let r=this.editor.getSelections(),o=r?r.map((e=>e.startLineNumber)):[];e.update(i,o),n&&n.restore(this.editor);const s=this.updateDebounceInfo.update(e.textModel,t.elapsed());this.updateScheduler&&(this.updateScheduler.defaultDelay=s)}return e}))})).then(void 0,(e=>((0,r.dL)(e),null))))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let e=this.editor.getSelections();e&&this.hiddenRangeModel.adjustSelections(e)&&this.editor.setSelections(e)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();e&&e.then((e=>{if(e){let t=this.editor.getSelections();if(t&&t.length>0){let i=[];for(let n of t){let t=n.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(t)&&i.push(...e.getAllRegionsAtLine(t,(e=>e.isCollapsed&&t>e.startLineNumber)))}i.length&&(e.toggleCollapseState(i),this.reveal(t[0].getPosition()))}}})).then(void 0,r.dL)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range)return;if(!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:{const t=e.target.detail,n=e.target.element.offsetLeft;if(t.offsetX-n<5)return;i=!0;break}case 7:if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return;case 6:if(this.hiddenRangeModel.hasRanges()){let e=this.editor.getModel();if(e&&t.startColumn===e.getLineMaxColumn(t.startLineNumber))break}return;default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,o=e.target.range;if(o&&o.startLineNumber===i){if(n){if(4!==e.target.type)return}else{let e=this.editor.getModel();if(!e||o.startColumn!==e.getLineMaxColumn(i))return}t.then((t=>{if(t){let r=t.getRegionAtLine(i);if(r&&r.startLineNumber===i){let o=r.isCollapsed;if(n||o){let n=[];if(e.event.altKey){let e=e=>!e.containedBy(r)&&!r.containedBy(e),i=t.getRegionsInside(null,e);for(const e of i)e.isCollapsed&&n.push(e);0===n.length&&(n=i)}else{let i=e.event.middleButton||e.event.shiftKey;if(i)for(const e of t.getRegionsInside(r))e.isCollapsed===o&&n.push(e);!o&&i&&0!==n.length||n.push(r)}t.toggleCollapseState(n),this.reveal({lineNumber:i,column:1})}}}})).then(void 0,r.dL)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};_e.ID="editor.contrib.folding",_e=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([pe(1,te.i6),pe(2,N.c_),pe(3,he.lT),pe(4,ue.A),pe(5,fe.p)],_e);class ve extends S.R6{runEditorCommand(e,t,i){const n=e.get(N.c_),r=_e.get(t);if(!r)return;const o=r.getFoldingModel();return o?(this.reportTelemetry(e,t),o.then((e=>{if(e){this.invoke(r,e,t,i,n);const o=t.getSelection();o&&r.reveal(o.getStartPosition())}}))):void 0}getSelectedLines(e){let t=e.getSelections();return t?t.map((e=>e.startLineNumber)):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map((e=>e+1)):this.getSelectedLines(t)}run(e,t){}}function be(e){if(!l.o8(e)){if(!l.Kn(e))return!1;const t=e;if(!l.o8(t.levels)&&!l.hj(t.levels))return!1;if(!l.o8(t.direction)&&!l.HD(t.direction))return!1;if(!(l.o8(t.selectionLines)||l.kJ(t.selectionLines)&&t.selectionLines.every(l.hj)))return!1}return!0}class ye extends ve{getFoldingLevel(){return parseInt(this.id.substr(ye.ID_PREFIX.length))}invoke(e,t,i){!function(e,t,i,n){let r=e.getRegionsInside(null,((e,i)=>i===t&&true!==e.isCollapsed&&!n.some((t=>e.containsLine(t)))));e.toggleCollapseState(r)}(t,this.getFoldingLevel(),0,this.getSelectedLines(i))}}ye.ID_PREFIX="editor.foldLevel",ye.ID=e=>ye.ID_PREFIX+e,(0,S._K)(_e.ID,_e),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.unfold",label:ee.N("unfoldAction.label","Unfold"),alias:"Unfold",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:3161,mac:{primary:2649},weight:100},description:{description:"Unfold the content in the editor",args:[{name:"Unfold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t* 'levels': Number of levels to unfold. If not set, defaults to 1.\n\t\t\t\t\t\t* 'direction': If 'up', unfold given number of levels up otherwise unfolds down.\n\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the unfold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t",constraint:be,schema:{type:"object",properties:{levels:{type:"number",default:1},direction:{type:"string",enum:["up","down"],default:"down"},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let r=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&"up"===n.direction?R(t,!1,r,o):O(t,!1,r,o)}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.unfoldRecursively",label:ee.N("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2137),weight:100}})}invoke(e,t,i,n){O(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.fold",label:ee.N("foldAction.label","Fold"),alias:"Fold",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:3159,mac:{primary:2647},weight:100},description:{description:"Fold the content in the editor",args:[{name:"Fold editor argument",description:"Property-value pairs that can be passed through this argument:\n\t\t\t\t\t\t\t* 'levels': Number of levels to fold.\n\t\t\t\t\t\t\t* 'direction': If 'up', folds given number of levels up otherwise folds down.\n\t\t\t\t\t\t\t* 'selectionLines': The start lines (0-based) of the editor selections to apply the fold action to. If not set, the active selection(s) will be used.\n\t\t\t\t\t\t\tIf no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead.\n\t\t\t\t\t\t",constraint:be,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let r=this.getLineNumbers(n,i);const o=n&&n.levels,s=n&&n.direction;"number"!=typeof o&&"string"!=typeof s?function(e,t,i){let n=[];for(let t of i){let i=e.getAllRegionsAtLine(t,(e=>true!==e.isCollapsed));i.length>0&&n.push(i[0])}e.toggleCollapseState(n)}(t,0,r):"up"===s?R(t,!0,o||1,r):O(t,!0,o||1,r)}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.foldRecursively",label:ee.N("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2135),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);O(t,!0,Number.MAX_VALUE,n)}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.foldAll",label:ee.N("foldAllAction.label","Fold All"),alias:"Fold All",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2069),weight:100}})}invoke(e,t,i){O(t,!0)}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.unfoldAll",label:ee.N("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2088),weight:100}})}invoke(e,t,i){O(t,!1)}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.foldAllBlockComments",label:ee.N("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2133),weight:100}})}invoke(e,t,i,n,r){if(t.regions.hasTypes())B(t,L.AD.Comment.value,!0);else{const e=i.getModel();if(!e)return;const n=r.getLanguageConfiguration(e.getLanguageId()).comments;n&&n.blockCommentStartToken&&F(t,new RegExp("^\\s*"+(0,a.ec)(n.blockCommentStartToken)),!0)}}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.foldAllMarkerRegions",label:ee.N("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2077),weight:100}})}invoke(e,t,i,n,r){if(t.regions.hasTypes())B(t,L.AD.Region.value,!0);else{const e=i.getModel();if(!e)return;const n=r.getLanguageConfiguration(e.getLanguageId()).foldingRules;n&&n.markers&&n.markers.start&&F(t,new RegExp(n.markers.start),!0)}}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:ee.N("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2078),weight:100}})}invoke(e,t,i,n,r){if(t.regions.hasTypes())B(t,L.AD.Region.value,!1);else{const e=i.getModel();if(!e)return;const n=r.getLanguageConfiguration(e.getLanguageId()).foldingRules;n&&n.markers&&n.markers.start&&F(t,new RegExp(n.markers.start),!1)}}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.foldAllExcept",label:ee.N("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2131),weight:100}})}invoke(e,t,i){P(t,!0,this.getSelectedLines(i))}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.unfoldAllExcept",label:ee.N("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2129),weight:100}})}invoke(e,t,i){P(t,!1,this.getSelectedLines(i))}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.toggleFold",label:ee.N("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,primary:(0,o.gx)(2089,2090),weight:100}})}invoke(e,t,i){!function(e,t,i){let n=[];for(let t of i){let i=e.getRegionAtLine(t);if(i){i.isCollapsed;n.push(i),0}}e.toggleCollapseState(n)}(t,0,this.getSelectedLines(i))}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.gotoParentFold",label:ee.N("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let e=function(e,t){let i=null,n=t.getRegionAtLine(e);if(null!==n&&(i=n.startLineNumber,e===i)){let e=n.parentIndex;i=-1!==e?t.regions.getStartLineNumber(e):null}return i}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.gotoPreviousFold",label:ee.N("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){if(e!==i.startLineNumber)return i.startLineNumber;{let e=i.parentIndex,n=0;for(-1!==e&&(n=t.regions.getStartLineNumber(i.parentIndex));null!==i;){if(!(i.regionIndex>0))return null;if(i=t.regions.toRegion(i.regionIndex-1),i.startLineNumber<=n)return null;if(i.parentIndex===e)return i.startLineNumber}}}else if(t.regions.length>0)for(i=t.regions.toRegion(t.regions.length-1);null!==i;){if(i.startLineNumber0?t.regions.toRegion(i.regionIndex-1):null}return null}(n[0],t);null!==e&&i.setSelection({startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:1})}}}),(0,S.Qr)(class extends ve{constructor(){super({id:"editor.gotoNextFold",label:ee.N("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:me,kbOpts:{kbExpr:k.u.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let e=function(e,t){let i=t.getRegionAtLine(e);if(null!==i&&i.startLineNumber===e){let e=i.parentIndex,n=0;if(-1!==e)n=t.regions.getEndLineNumber(i.parentIndex);else{if(0===t.regions.length)return null;n=t.regions.getEndLineNumber(t.regions.length-1)}for(;null!==i;){if(!(i.regionIndex=n)return null;if(i.parentIndex===e)return i.startLineNumber}}else if(t.regions.length>0)for(i=t.regions.toRegion(0);null!==i;){if(i.startLineNumber>e)return i.startLineNumber;i=i.regionIndex{const i=e.getColor(we);i&&t.addRule(`.monaco-editor .folded-background { background-color: ${i}; }`);const n=e.getColor(Ce);n&&t.addRule(`\n\t\t.monaco-editor .cldr${ne.kS.asCSSSelector(ae)},\n\t\t.monaco-editor .cldr${ne.kS.asCSSSelector(le)} {\n\t\t\tcolor: ${n} !important;\n\t\t}\n\t\t`)}))},4125:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),r=i(2334),o=i(3580);class s extends n.R6{constructor(){super({id:"editor.action.fontZoomIn",label:o.N("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()+1)}}class a extends n.R6{constructor(){super({id:"editor.action.fontZoomOut",label:o.N("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){r.C.setZoomLevel(r.C.getZoomLevel()-1)}}class l extends n.R6{constructor(){super({id:"editor.action.fontZoomReset",label:o.N("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){r.C.setZoomLevel(0)}}(0,n.Qr)(s),(0,n.Qr)(a),(0,n.Qr)(l)},8823:(e,t,i)=>{"use strict";i.d(t,{xC:()=>N,Zg:()=>k,x$:()=>E,Qq:()=>A,Qs:()=>I});var n=i(1588),r=i(9488),o=i(1050),s=i(7301),a=i(3725),l=i(1741),c=i(8401),h=i(666),d=i(6467),u=i(5520),g=i(187),f=i(4314),p=i(3860),m=i(4319),_=i(8216),v=i(5120),b=i(3580),y=i(4565);class w{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return"string"==typeof e?e.toLowerCase():e._lower}}var C=i(2065),x=i(1922),S=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function k(e){if(!(e=e.filter((e=>e.range))).length)return;let{range:t}=e[0];for(let i=1;ie.provideDocumentRangeFormattingEdits(t,t.getFullModelRange(),i,n)})}return n}class N{static setFormatterSelector(e){return{dispose:N._selectors.unshift(e)}}static select(e,t,i){return S(this,void 0,void 0,(function*(){if(0===e.length)return;const n=a.$.first(N._selectors);return n?yield n(e,t,i):void 0}))}}function E(e,t,i,n,r,o){return S(this,void 0,void 0,(function*(){const s=e.get(C.TG),{documentRangeFormattingEditProvider:a}=e.get(x.p),l=(0,u.CL)(t)?t.getModel():t,c=a.ordered(l),h=yield N.select(c,l,n);h&&(r.report(h),yield s.invokeFunction(D,h,t,i,o))}))}function D(e,t,i,n,o){return S(this,void 0,void 0,(function*(){const s=e.get(m.p);let a,l;(0,u.CL)(i)?(a=i.getModel(),l=new d.Dl(i,5,void 0,o)):(a=i,l=new d.YQ(i,o));let c=[],h=0;for(let e of(0,r._2)(n).sort(f.e.compareRangesUsingStarts))h>0&&f.e.areIntersectingOrTouching(c[h-1],e)?c[h-1]=f.e.fromPositions(c[h-1].getStartPosition(),e.getEndPosition()):h=c.push(e);const g=e=>S(this,void 0,void 0,(function*(){return(yield t.provideDocumentRangeFormattingEdits(a,e,a.getFormattingOptions(),l.token))||[]})),_=(e,t)=>{if(!e.length||!t.length)return!1;const i=e.reduce(((e,t)=>f.e.plusRange(e,t.range)),e[0].range);if(!t.some((e=>f.e.intersectRanges(i,e.range))))return!1;for(let i of e)for(let e of t)if(f.e.intersectRanges(i.range,e.range))return!0;return!1},b=[],y=[];try{for(let e of c){if(l.token.isCancellationRequested)return!0;y.push(yield g(e))}for(let e=0;e({text:e.text,range:f.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(f.e.areIntersectingOrTouching(i,t))return[new p.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function A(e,t,i,n,r){return S(this,void 0,void 0,(function*(){const o=e.get(C.TG),s=e.get(x.p),a=(0,u.CL)(t)?t.getModel():t,l=L(s.documentFormattingEditProvider,s.documentRangeFormattingEditProvider,a),c=yield N.select(l,a,i);c&&(n.report(c),yield o.invokeFunction(T,c,t,i,r))}))}function T(e,t,i,n,r){return S(this,void 0,void 0,(function*(){const o=e.get(m.p);let s,a,l;(0,u.CL)(i)?(s=i.getModel(),a=new d.Dl(i,5,void 0,r)):(s=i,a=new d.YQ(i,r));try{const e=yield t.provideDocumentFormattingEdits(s,s.getFormattingOptions(),a.token);if(l=yield o.computeMoreMinimalEdits(s.uri,e),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||0===l.length)return!1;if((0,u.CL)(i))v.V.execute(i,l,2!==n),2!==n&&(k(l),i.revealPositionInCenterIfOutsideViewport(i.getPosition(),1));else{const[{range:e}]=l,t=new p.Y(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn);s.pushEditOperations([t],l.map((e=>({text:e.text,range:f.e.lift(e.range),forceMoveMarkers:!0}))),(e=>{for(const{range:i}of e)if(f.e.areIntersectingOrTouching(i,t))return[new p.Y(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn)];return null}))}return!0}))}function I(e,t,i,n,r,o,a){const l=t.onTypeFormattingEditProvider.ordered(i);return 0===l.length||l[0].autoFormatTriggerCharacters.indexOf(r)<0?Promise.resolve(void 0):Promise.resolve(l[0].provideOnTypeFormattingEdits(i,n,r,o,a)).catch(s.Cp).then((t=>e.computeMoreMinimalEdits(i.uri,t)))}N._selectors=new l.S,y.P0.registerCommand("_executeFormatRangeProvider",(function(e,...t){return S(this,void 0,void 0,(function*(){const[i,n,a]=t;(0,c.p_)(h.o.isUri(i)),(0,c.p_)(f.e.isIRange(n));const l=e.get(_.S),d=e.get(m.p),u=e.get(x.p),g=yield l.createModelReference(i);try{return function(e,t,i,n,o,a){return S(this,void 0,void 0,(function*(){const l=t.documentRangeFormattingEditProvider.ordered(i);for(const t of l){let l=yield Promise.resolve(t.provideDocumentRangeFormattingEdits(i,n,o,a)).catch(s.Cp);if((0,r.Of)(l))return yield e.computeMoreMinimalEdits(i.uri,l)}}))}(d,u,g.object.textEditorModel,f.e.lift(n),a,o.T.None)}finally{g.dispose()}}))})),y.P0.registerCommand("_executeFormatDocumentProvider",(function(e,...t){return S(this,void 0,void 0,(function*(){const[i,n]=t;(0,c.p_)(h.o.isUri(i));const a=e.get(_.S),l=e.get(m.p),d=e.get(x.p),u=yield a.createModelReference(i);try{return function(e,t,i,n,o){return S(this,void 0,void 0,(function*(){const a=L(t.documentFormattingEditProvider,t.documentRangeFormattingEditProvider,i);for(const t of a){let a=yield Promise.resolve(t.provideDocumentFormattingEdits(i,n,o)).catch(s.Cp);if((0,r.Of)(a))return yield e.computeMoreMinimalEdits(i.uri,a)}}))}(l,d,u.object.textEditorModel,n,o.T.None)}finally{u.dispose()}}))})),y.P0.registerCommand("_executeFormatOnTypeProvider",(function(e,...t){return S(this,void 0,void 0,(function*(){const[i,n,r,s]=t;(0,c.p_)(h.o.isUri(i)),(0,c.p_)(g.L.isIPosition(n)),(0,c.p_)("string"==typeof r);const a=e.get(_.S),l=e.get(m.p),d=e.get(x.p),u=yield a.createModelReference(i);try{return I(l,d,u.object.textEditorModel,g.L.lift(n),r,s,o.T.None)}finally{u.dispose()}}))}))},1097:(e,t,i)=>{"use strict";i.r(t);var n=i(9488),r=i(1050),o=i(7301),s=i(2258),a=i(5976),l=i(6830),c=i(1640),h=i(4906),d=i(4314),u=i(9102),g=i(4319),f=i(1922),p=i(8823),m=i(5120),_=i(3580),v=i(4565),b=i(8819),y=i(2065),w=i(535),C=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},x=function(e,t){return function(i,n){t(i,n,e)}},S=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let k=class{constructor(e,t,i){this._editor=e,this._languageFeaturesService=t,this._workerService=i,this._disposables=new a.SL,this._sessionDisposables=new a.SL,this._disposables.add(t.onTypeFormattingEditProvider.onDidChange(this._update,this)),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(49)&&this._update()})))}dispose(){this._disposables.dispose(),this._sessionDisposables.dispose()}_update(){if(this._sessionDisposables.clear(),!this._editor.getOption(49))return;if(!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=this._languageFeaturesService.onTypeFormattingEditProvider.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new h.q;for(let e of t.autoFormatTriggerCharacters)i.add(e.charCodeAt(0));this._sessionDisposables.add(this._editor.onDidType((e=>{let t=e.charCodeAt(e.length-1);i.has(t)&&this._trigger(String.fromCharCode(t))})))}_trigger(e){if(!this._editor.hasModel())return;if(this._editor.getSelections().length>1||!this._editor.getSelection().isEmpty())return;const t=this._editor.getModel(),i=this._editor.getPosition(),o=new r.A,s=this._editor.onDidChangeModelContent((e=>{if(e.isFlush)return o.cancel(),void s.dispose();for(let t=0,n=e.changes.length;t{o.token.isCancellationRequested||(0,n.Of)(e)&&(m.V.execute(this._editor,e,!0),(0,p.Zg)(e))})).finally((()=>{s.dispose()}))}};k.ID="editor.contrib.autoFormat",k=C([x(1,f.p),x(2,g.p)],k);let L=class{constructor(e,t,i){this.editor=e,this._languageFeaturesService=t,this._instantiationService=i,this._callOnDispose=new a.SL,this._callOnModel=new a.SL,this._callOnDispose.add(e.onDidChangeConfiguration((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModel((()=>this._update()))),this._callOnDispose.add(e.onDidChangeModelLanguage((()=>this._update()))),this._callOnDispose.add(t.documentRangeFormattingEditProvider.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(48)&&this.editor.hasModel()&&this._languageFeaturesService.documentRangeFormattingEditProvider.has(this.editor.getModel())&&this._callOnModel.add(this.editor.onDidPaste((({range:e})=>this._trigger(e))))}_trigger(e){this.editor.hasModel()&&(this.editor.getSelections().length>1||this._instantiationService.invokeFunction(p.x$,this.editor,e,2,w.Ex.None,r.T.None).catch(o.dL))}};L.ID="editor.contrib.formatOnPaste",L=C([x(1,f.p),x(2,y.TG)],L);class N extends l.R6{constructor(){super({id:"editor.action.formatDocument",label:_.N("formatDocument.label","Format Document"),alias:"Format Document",precondition:b.Ao.and(u.u.notInCompositeEditor,u.u.writable,u.u.hasDocumentFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return S(this,void 0,void 0,(function*(){if(t.hasModel()){const i=e.get(y.TG),n=e.get(w.ek);yield n.showWhile(i.invokeFunction(p.Qq,t,1,w.Ex.None,r.T.None),250)}}))}}class E extends l.R6{constructor(){super({id:"editor.action.formatSelection",label:_.N("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:b.Ao.and(u.u.writable,u.u.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:u.u.editorTextFocus,primary:(0,s.gx)(2089,2084),weight:100},contextMenuOpts:{when:u.u.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return S(this,void 0,void 0,(function*(){if(!t.hasModel())return;const i=e.get(y.TG),n=t.getModel(),o=t.getSelections().map((e=>e.isEmpty()?new d.e(e.startLineNumber,1,e.startLineNumber,n.getLineMaxColumn(e.startLineNumber)):e)),s=e.get(w.ek);yield s.showWhile(i.invokeFunction(p.x$,t,o,1,w.Ex.None,r.T.None),250)}))}}(0,l._K)(k.ID,k),(0,l._K)(L.ID,L),(0,l.Qr)(N),(0,l.Qr)(E),v.P0.registerCommand("editor.action.format",(e=>S(void 0,void 0,void 0,(function*(){const t=e.get(c.$).getFocusedCodeEditor();if(!t||!t.hasModel())return;const i=e.get(v.Hy);t.getSelection().isEmpty()?yield i.executeCommand("editor.action.formatDocument"):yield i.executeCommand("editor.action.formatSelection")}))))},5120:(e,t,i)=>{"use strict";i.d(t,{V:()=>o});var n=i(9386),r=i(4314);class o{static _handleEolEdits(e,t){let i,n=[];for(let e of t)"number"==typeof e.eol&&(i=e.eol),e.range&&"string"==typeof e.text&&n.push(e);return"number"==typeof i&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const s=o._handleEolEdits(e,t);1===s.length&&o._isFullModelReplaceEdit(e,s[0])?e.executeEdits("formatEditsCommand",s.map((e=>n.h.replace(r.e.lift(e.range),e.text)))):e.executeEdits("formatEditsCommand",s.map((e=>n.h.replaceMove(r.e.lift(e.range),e.text)))),i&&e.pushUndoStop()}}},9683:(e,t,i)=>{"use strict";i.r(t),i.d(t,{MarkerController:()=>_e,NextMarkerAction:()=>be});var n=i(3046),r=i(5976),o=i(6830),s=i(1640),a=i(187),l=i(4314),c=i(9102),h=i(9488),d=i(4669),u=i(1741),g=i(5924),f=i(666),p=i(5026),m=i(2065),_=i(5673),v=i(3108),b=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},y=function(e,t){return function(i,n){t(i,n,e)}};class w{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let C=class{constructor(e,t,i){this._markerService=t,this._configService=i,this._onDidChange=new d.Q5,this.onDidChange=this._onDidChange.event,this._dispoables=new r.SL,this._markers=[],this._nextIdx=-1,f.o.isUri(e)?this._resourceFilter=t=>t.toString()===e.toString():e&&(this._resourceFilter=e);const n=this._configService.getValue("problems.sortOrder"),o=(e,t)=>{let i=(0,g.qu)(e.resource.toString(),t.resource.toString());return 0===i&&(i="position"===n?l.e.compareRangesUsingStarts(e,t)||_.ZL.compare(e.severity,t.severity):_.ZL.compare(e.severity,t.severity)||l.e.compareRangesUsingStarts(e,t)),i},s=()=>{this._markers=this._markerService.read({resource:f.o.isUri(e)?e:void 0,severities:_.ZL.Error|_.ZL.Warning|_.ZL.Info}),"function"==typeof e&&(this._markers=this._markers.filter((e=>this._resourceFilter(e.resource)))),this._markers.sort(o)};s(),this._dispoables.add(t.onMarkerChanged((e=>{this._resourceFilter&&!e.some((e=>this._resourceFilter(e)))||(s(),this._nextIdx=-1,this._onDidChange.fire())})))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e||!(!this._resourceFilter||!e)&&this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new w(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,r=this._markers.findIndex((t=>t.resource.toString()===e.uri.toString()));r<0&&(r=(0,h.ry)(this._markers,{resource:e.uri},((e,t)=>(0,g.qu)(e.resource.toString(),t.resource.toString()))),r<0&&(r=~r));for(let i=r;it.resource.toString()===e.toString()));if(!(i<0))for(;i{const i=e.getColor(ee.JpG);if(i){const e=n.lA.error.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extensions-viewlet > .extensions ${e} {\n\t\t\t\tcolor: ${i};\n\t\t\t}\n\t\t`)}const r=e.getColor(ee.BOY);if(r){const e=n.lA.warning.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.extension-editor ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.preferences-editor ${e} {\n\t\t\t\tcolor: ${r};\n\t\t\t}\n\t\t`)}const o=e.getColor(ee.OLZ);if(o){const e=n.lA.info.cssSelector;t.addRule(`\n\t\t\t.monaco-editor .zone-widget ${e},\n\t\t\t.markers-panel .marker-icon${e},\n\t\t\t.extensions-viewlet > .extensions ${e},\n\t\t\t.text-search-provider-messages .providerMessage ${e},\n\t\t\t.extension-editor ${e} {\n\t\t\t\tcolor: ${o};\n\t\t\t}\n\t\t`)}}));var ie=function(e,t){return function(i,n){t(i,n,e)}};class ne{constructor(e,t,i,n,o){this._openerService=n,this._labelService=o,this._lines=0,this._longestLineLength=0,this._relatedDiagnostics=new WeakMap,this._disposables=new r.SL,this._editor=t;const s=document.createElement("div");s.className="descriptioncontainer",this._messageBlock=document.createElement("div"),this._messageBlock.classList.add("message"),this._messageBlock.setAttribute("aria-live","assertive"),this._messageBlock.setAttribute("role","alert"),s.appendChild(this._messageBlock),this._relatedBlock=document.createElement("div"),s.appendChild(this._relatedBlock),this._disposables.add(D.mu(this._relatedBlock,"click",(e=>{e.preventDefault();const t=this._relatedDiagnostics.get(e.target);t&&i(t)}))),this._scrollable=new A.NB(s,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:6,verticalScrollbarSize:6}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll((e=>{s.style.left=`-${e.scrollLeft}px`,s.style.top=`-${e.scrollTop}px`}))),this._disposables.add(this._scrollable)}dispose(){(0,r.B9)(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:r}=e;let o=((null==t?void 0:t.length)||0)+"()".length;r&&(o+="string"==typeof r?r.length:r.value.length);const s=(0,g.uq)(i);this._lines=s.length,this._longestLineLength=0;for(const e of s)this._longestLineLength=Math.max(e.length+o,this._longestLineLength);D.PO(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let a=this._messageBlock;for(const e of s)a=document.createElement("div"),a.innerText=e,""===e&&(a.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(a);if(t||r){const e=document.createElement("span");if(e.classList.add("details"),a.appendChild(e),t){const i=document.createElement("span");i.innerText=t,i.classList.add("source"),e.appendChild(i)}if(r)if("string"==typeof r){const t=document.createElement("span");t.innerText=`(${r})`,t.classList.add("code"),e.appendChild(t)}else this._codeLink=D.$("a.code-link"),this._codeLink.setAttribute("href",`${r.target.toString()}`),this._codeLink.onclick=e=>{this._openerService.open(r.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()},D.R3(this._codeLink,D.$("span")).innerText=r.value,e.appendChild(this._codeLink)}if(D.PO(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),(0,h.Of)(n)){const e=this._relatedBlock.appendChild(document.createElement("div"));e.style.paddingTop=`${Math.floor(.66*this._editor.getOption(59))}px`,this._lines+=1;for(const t of n){let i=document.createElement("div"),n=document.createElement("a");n.classList.add("filename"),n.innerText=`${(0,I.p)(t.resource)}(${t.startLineNumber}, ${t.startColumn}): `,n.title=this._labelService.getUriLabel(t.resource),this._relatedDiagnostics.set(n,t);let r=document.createElement("span");r.innerText=t.message,i.appendChild(n),i.appendChild(r),this._lines+=1,e.appendChild(i)}}const l=this._editor.getOption(44),c=Math.ceil(l.typicalFullwidthCharacterWidth*this._longestLineLength*.75),d=l.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:c,scrollHeight:d})}layout(e,t){this._scrollable.getDomNode().style.height=`${e}px`,this._scrollable.getDomNode().style.width=`${t}px`,this._scrollable.setScrollDimensions({width:t,height:e})}getHeightInLines(){return Math.min(17,this._lines)}getAriaLabel(e){let t="";switch(e.severity){case _.ZL.Error:t=k.N("Error","Error");break;case _.ZL.Warning:t=k.N("Warning","Warning");break;case _.ZL.Info:t=k.N("Info","Info");break;case _.ZL.Hint:t=k.N("Hint","Hint")}let i=k.N("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let re=class e extends Y.vk{constructor(e,t,i,n,o,s,a){super(e,{showArrow:!0,showFrame:!0,isAccessible:!0,frameWidth:1},o),this._themeService=t,this._openerService=i,this._menuService=n,this._contextKeyService=s,this._labelService=a,this._callOnDispose=new r.SL,this._onDidSelectRelatedInformation=new d.Q5,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=_.ZL.Warning,this._backgroundColor=T.Il.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(fe);let t=le,i=ce;this._severity===_.ZL.Warning?(t=he,i=de):this._severity===_.ZL.Info&&(t=ue,i=ge);const n=e.getColor(t),r=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:r,primaryHeadingColor:e.getColor(Y.IH),secondaryHeadingColor:e.getColor(Y.R7)})}_applyStyles(){this._parentContainer&&(this._parentContainer.style.backgroundColor=this._backgroundColor?this._backgroundColor.toString():""),super._applyStyles()}dispose(){this._callOnDispose.dispose(),super.dispose()}_fillHead(t){super._fillHead(t),this._disposables.add(this._actionbarWidget.actionRunner.onBeforeRun((e=>this.editor.focus())));const i=[],n=this._menuService.createMenu(e.TitleMenu,this._contextKeyService);(0,Z.vr)(n,void 0,i),this._actionbarWidget.push(i,{label:!1,icon:!0,index:0}),n.dispose()}_fillTitleIcon(e){this._icon=D.R3(e,D.$(""))}_fillBody(e){this._parentContainer=e,e.classList.add("marker-widget"),this._parentContainer.tabIndex=0,this._parentContainer.setAttribute("role","tooltip"),this._container=document.createElement("div"),e.appendChild(this._container),this._message=new ne(this._container,this.editor,(e=>this._onDidSelectRelatedInformation.fire(e)),this._openerService,this._labelService),this._disposables.add(this._message)}show(){throw new Error("call showAtMarker")}showAtMarker(e,t,i){this._container.classList.remove("stale"),this._message.update(e),this._severity=e.severity,this._applyTheme(this._themeService.getColorTheme());let n=l.e.lift(e);const r=this.editor.getPosition();let o=r&&n.containsPosition(r)?r:n.getStartPosition();super.show(o,this.computeRequiredHeight());const s=this.editor.getModel();if(s){const e=i>1?k.N("problems","{0} of {1} problems",t,i):k.N("change","{0} of {1} problem",t,i);this.setTitle((0,M.EZ)(s.uri),e)}this._icon.className=`codicon ${G.className(_.ZL.toSeverity(this._severity))}`,this.editor.revealPositionNearTop(o,0),this.editor.focus()}updateMarker(e){this._container.classList.remove("stale"),this._message.update(e)}showStale(){this._container.classList.add("stale"),this._relayout()}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._heightInPixel=e,this._message.layout(e,t),this._container.style.height=`${e}px`}_onWidth(e){this._message.layout(this._heightInPixel,e)}_relayout(){super._relayout(this.computeRequiredHeight())}computeRequiredHeight(){return 3+this._message.getHeightInLines()}};re.TitleMenu=new L.eH("gotoErrorTitleMenu"),re=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([ie(1,te.XE),ie(2,X.v4),ie(3,L.co),ie(4,m.TG),ie(5,N.i6),ie(6,Q.e)],re);let oe=(0,ee.kwl)(ee.lXJ,ee.b6y),se=(0,ee.kwl)(ee.uoC,ee.pW3),ae=(0,ee.kwl)(ee.c63,ee.T83);const le=(0,ee.P6G)("editorMarkerNavigationError.background",{dark:oe,light:oe,hc:ee.lRK},k.N("editorMarkerNavigationError","Editor marker navigation widget error color.")),ce=(0,ee.P6G)("editorMarkerNavigationError.headerBackground",{dark:(0,ee.ZnX)(le,.1),light:(0,ee.ZnX)(le,.1),hc:null},k.N("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),he=(0,ee.P6G)("editorMarkerNavigationWarning.background",{dark:se,light:se,hc:ee.lRK},k.N("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),de=(0,ee.P6G)("editorMarkerNavigationWarning.headerBackground",{dark:(0,ee.ZnX)(he,.1),light:(0,ee.ZnX)(he,.1),hc:"#0C141F"},k.N("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),ue=(0,ee.P6G)("editorMarkerNavigationInfo.background",{dark:ae,light:ae,hc:ee.lRK},k.N("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),ge=(0,ee.P6G)("editorMarkerNavigationInfo.headerBackground",{dark:(0,ee.ZnX)(ue,.1),light:(0,ee.ZnX)(ue,.1),hc:null},k.N("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),fe=(0,ee.P6G)("editorMarkerNavigation.background",{dark:ee.cvW,light:ee.cvW,hc:ee.cvW},k.N("editorMarkerNavigationBackground","Editor marker navigation widget background."));var pe=function(e,t){return function(i,n){t(i,n,e)}},me=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let _e=class e{constructor(e,t,i,n,o){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=o,this._sessionDispoables=new r.SL,this._editor=e,this._widgetVisible=we.bindTo(this._contextKeyService)}static get(t){return t.getContribution(e.ID)}dispose(){this._cleanUp(),this._sessionDispoables.dispose()}_cleanUp(){this._widgetVisible.reset(),this._sessionDispoables.clear(),this._widget=void 0,this._model=void 0}_getOrCreateModel(e){if(this._model&&this._model.matches(e))return this._model;let t=!1;return this._model&&(t=!0,this._cleanUp()),this._model=this._markerNavigationService.getMarkerList(e),t&&this._model.move(!0,this._editor.getModel(),this._editor.getPosition()),this._widget=this._instantiationService.createInstance(re,this._editor),this._widget.onDidClose((()=>this.close()),this,this._sessionDispoables),this._widgetVisible.set(!0),this._sessionDispoables.add(this._model),this._sessionDispoables.add(this._widget),this._sessionDispoables.add(this._editor.onDidChangeCursorPosition((e=>{var t,i,n;(null===(t=this._model)||void 0===t?void 0:t.selected)&&l.e.containsPosition(null===(i=this._model)||void 0===i?void 0:i.selected.marker,e.position)||null===(n=this._model)||void 0===n||n.resetIndex()}))),this._sessionDispoables.add(this._model.onDidChange((()=>{if(!this._widget||!this._widget.position||!this._model)return;const e=this._model.find(this._editor.getModel().uri,this._widget.position);e?this._widget.updateMarker(e.marker):this._widget.showStale()}))),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation((e=>{this._editorService.openCodeEditor({resource:e.resource,options:{pinned:!0,revealIfOpened:!0,selection:l.e.lift(e).collapseToStart()}},this._editor),this.close(!1)}))),this._sessionDispoables.add(this._editor.onDidChangeModel((()=>this._cleanUp()))),this._model}close(e=!0){this._cleanUp(),e&&this._editor.focus()}showAtMarker(e){if(this._editor.hasModel()){const t=this._getOrCreateModel(this._editor.getModel().uri);t.resetIndex(),t.move(!0,this._editor.getModel(),new a.L(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(t,i){var n,r;return me(this,void 0,void 0,(function*(){if(this._editor.hasModel()){const o=this._getOrCreateModel(i?void 0:this._editor.getModel().uri);if(o.move(t,this._editor.getModel(),this._editor.getPosition()),!o.selected)return;if(o.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const s=yield this._editorService.openCodeEditor({resource:o.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:o.selected.marker}},this._editor);s&&(null===(n=e.get(s))||void 0===n||n.close(),null===(r=e.get(s))||void 0===r||r.nagivate(t,i))}else this._widget.showAtMarker(o.selected.marker,o.selected.index,o.selected.total)}}))}};_e.ID="editor.contrib.markerController",_e=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([pe(1,x),pe(2,N.i6),pe(3,s.$),pe(4,m.TG)],_e);class ve extends o.R6{constructor(e,t,i){super(i),this._next=e,this._multiFile=t}run(e,t){var i;return me(this,void 0,void 0,(function*(){t.hasModel()&&(null===(i=_e.get(t))||void 0===i||i.nagivate(this._next,this._multiFile))}))}}class be extends ve{constructor(){super(!0,!1,{id:be.ID,label:be.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:578,weight:100},menuOpts:{menuId:re.TitleMenu,title:be.LABEL,icon:(0,E.q5)("marker-navigation-next",n.lA.arrowDown,k.N("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}be.ID="editor.action.marker.next",be.LABEL=k.N("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class ye extends ve{constructor(){super(!1,!1,{id:ye.ID,label:ye.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:1602,weight:100},menuOpts:{menuId:re.TitleMenu,title:ye.LABEL,icon:(0,E.q5)("marker-navigation-previous",n.lA.arrowUp,k.N("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}ye.ID="editor.action.marker.prev",ye.LABEL=k.N("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)"),(0,o._K)(_e.ID,_e),(0,o.Qr)(be),(0,o.Qr)(ye),(0,o.Qr)(class extends ve{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:k.N("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:66,weight:100},menuOpts:{menuId:L.eH.MenubarGoMenu,title:k.N({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}),(0,o.Qr)(class extends ve{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:k.N("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:c.u.focus,primary:1090,weight:100},menuOpts:{menuId:L.eH.MenubarGoMenu,title:k.N({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}});const we=new N.uy("markersNavigationVisible",!1),Ce=o._l.bindToContribution(_e.get);(0,o.fK)(new Ce({id:"closeMarkersNavigation",precondition:we,handler:e=>e.close(),kbOpts:{weight:150,kbExpr:c.u.focus,primary:9,secondary:[1033]}}))},628:(e,t,i)=>{"use strict";i.r(t),i.d(t,{DefinitionAction:()=>ne,SymbolNavigationAction:()=>ie,SymbolNavigationAnchor:()=>te});var n=i(6268),r=i(1588),o=i(5393),s=i(2258),a=i(1432),l=i(8401),c=i(666),h=i(6467),d=i(5520),u=i(6830),g=i(1640),f=i(4527),p=i(187),m=i(4314),_=i(9102),v=i(6887),b=i(5600),y=i(1293),w=i(4669),C=i(5976),x=i(5935),S=i(3580),k=i(8819),L=i(5026),N=i(2065),E=i(1847),D=i(9989),A=i(9422),T=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},I=function(e,t){return function(i,n){t(i,n,e)}};const M=new k.uy("hasSymbols",!1,(0,S.N)("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),O=(0,N.yh)("ISymbolNavigationService");let R=class{constructor(e,t,i,n){this._editorService=t,this._notificationService=i,this._keybindingService=n,this._currentModel=void 0,this._currentIdx=-1,this._ignoreEditorChange=!1,this._ctxHasSymbols=M.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),null===(e=this._currentState)||void 0===e||e.dispose(),null===(t=this._currentMessage)||void 0===t||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1)return void this.reset();this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new P(this._editorService),n=i.onDidChange((e=>{if(this._ignoreEditorChange)return;const i=this._editorService.getActiveCodeEditor();if(!i)return;const n=i.getModel(),r=i.getPosition();if(!n||!r)return;let o=!1,s=!1;for(const e of t.references)if((0,x.Xy)(e.uri,n.uri))o=!0,s=s||m.e.containsPosition(e.range,r);else if(o)break;o&&s||this.reset()}));this._currentState=(0,C.F8)(i,n)}revealNext(e){if(!this._currentModel)return Promise.resolve();this._currentIdx+=1,this._currentIdx%=this._currentModel.references.length;const t=this._currentModel.references[this._currentIdx];return this._showMessage(),this._ignoreEditorChange=!0,this._editorService.openCodeEditor({resource:t.uri,options:{selection:m.e.collapseToStart(t.range),selectionRevealType:3}},e).finally((()=>{this._ignoreEditorChange=!1}))}_showMessage(){var e;null===(e=this._currentMessage)||void 0===e||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?(0,S.N)("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):(0,S.N)("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};R=T([I(0,k.i6),I(1,g.$),I(2,A.lT),I(3,E.d)],R),(0,L.z)(O,R,!0),(0,u.fK)(new class extends u._l{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:M,kbOpts:{weight:100,primary:70}})}runEditorCommand(e,t){return e.get(O).revealNext(t)}}),D.W.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:M,primary:9,handler(e){e.get(O).reset()}});let P=class{constructor(e){this._listener=new Map,this._disposables=new C.SL,this._onDidChange=new w.Q5,this.onDidChange=this._onDidChange.event,this._disposables.add(e.onCodeEditorRemove(this._onDidRemoveEditor,this)),this._disposables.add(e.onCodeEditorAdd(this._onDidAddEditor,this)),e.listCodeEditors().forEach(this._onDidAddEditor,this)}dispose(){this._disposables.dispose(),this._onDidChange.dispose(),(0,C.B9)(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,(0,C.F8)(e.onDidChangeCursorPosition((t=>this._onDidChange.fire({editor:e}))),e.onDidChangeModelContent((t=>this._onDidChange.fire({editor:e})))))}_onDidRemoveEditor(e){var t;null===(t=this._listener.get(e))||void 0===t||t.dispose(),this._listener.delete(e)}};P=T([I(0,g.$)],P);var F,B,W,V,z,H,j,U,$=i(7615),K=i(9670),q=i(4144),G=i(4565),Y=i(535),Z=i(184),Q=i(1922),X=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};q.BH.appendMenuItem(q.eH.EditorContext,{submenu:q.eH.EditorContextPeek,title:S.N("peek.submenu","Peek"),group:"navigation",order:100});const J=new Set;function ee(e){const t=new e;return(0,u.QG)(t),J.add(t.id),t}class te{constructor(e,t){this.model=e,this.position=t}static is(e){return!(!e||"object"!=typeof e)&&(e instanceof te||!(!p.L.isIPosition(e.position)||!e.model))}}class ie extends u.R6{constructor(e,t){super(t),this.configuration=e}run(e,t,i){if(!t.hasModel())return Promise.resolve(void 0);const n=e.get(A.lT),s=e.get(g.$),a=e.get(Y.ek),l=e.get(O),c=e.get(Q.p),d=t.getModel(),u=t.getPosition(),f=te.is(i)?i:new te(d,u),p=new h.Dl(t,5),m=(0,o.eP)(this._getLocationModel(c,f.model,f.position,p.token),p.token).then((e=>X(this,void 0,void 0,(function*(){var i;if(!e||p.token.isCancellationRequested)return;let n;if((0,r.Z9)(e.ariaMessage),e.referenceAt(d.uri,u)){const e=this._getAlternativeCommand(t);e!==this.id&&J.has(e)&&(n=t.getAction(e))}const o=e.references.length;if(0===o){if(!this.configuration.muteMessage){const e=d.getWordAtPosition(u);null===(i=$.O.get(t))||void 0===i||i.showMessage(this._getNoResultFoundMessage(e),u)}}else{if(1!==o||!n)return this._onResult(s,l,t,e);n.run()}}))),(e=>{n.error(e)})).finally((()=>{p.dispose()}));return a.showWhile(m,250),m}_onResult(e,t,i,n){return X(this,void 0,void 0,(function*(){const r=this._getGoToPreference(i);if(i instanceof f.H||!(this.configuration.openInPeek||"peek"===r&&n.references.length>1)){const o=n.firstReference(),s=n.references.length>1&&"gotoAndPeek"===r,a=yield this._openReference(i,e,o,this.configuration.openToSide,!s);s&&a?this._openInPeek(a,n):n.dispose(),"goto"===r&&t.put(o)}else this._openInPeek(i,n)}))}_openReference(e,t,i,n,r){return X(this,void 0,void 0,(function*(){let o;if((0,v.vx)(i)&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const s=yield t.openCodeEditor({resource:i.uri,options:{selection:m.e.collapseToStart(o),selectionRevealType:3,selectionSource:"code.jump"}},e,n);if(s){if(r){const e=s.getModel(),t=s.deltaDecorations([],[{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout((()=>{s.getModel()===e&&s.deltaDecorations(t,[])}),350)}return s}}))}_openInPeek(e,t){const i=b.J.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),(0,o.PG)((e=>Promise.resolve(t))),this.configuration.openInPeek):t.dispose()}}class ne extends ie{_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(yield(0,Z.nD)(e.definitionProvider,t,i,n),S.N("def.title","Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?S.N("noResultWord","No definition found for '{0}'",e.word):S.N("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleDefinitions}}const re=a.$L&&!n.isStandalone?2118:70;ee(((F=class e extends ne{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:S.N("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:k.Ao.and(_.u.hasDefinitionProvider,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:re,weight:100},contextMenuOpts:{group:"navigation",order:1.1}}),G.P0.registerCommandAlias("editor.action.goToDeclaration",e.id)}}).id="editor.action.revealDefinition",F)),ee(((B=class e extends ne{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:e.id,label:S.N("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:k.Ao.and(_.u.hasDefinitionProvider,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:(0,s.gx)(2089,re),weight:100}}),G.P0.registerCommandAlias("editor.action.openDeclarationToTheSide",e.id)}}).id="editor.action.revealDefinitionAside",B)),ee(((W=class e extends ne{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.id,label:S.N("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:k.Ao.and(_.u.hasDefinitionProvider,K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:q.eH.EditorContextPeek,group:"peek",order:2}}),G.P0.registerCommandAlias("editor.action.previewDeclaration",e.id)}}).id="editor.action.peekDefinition",W));class oe extends ie{_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(yield(0,Z.zq)(e.declarationProvider,t,i,n),S.N("decl.title","Declarations"))}))}_getNoResultFoundMessage(e){return e&&e.word?S.N("decl.noResultWord","No declaration found for '{0}'",e.word):S.N("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(51).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(51).multipleDeclarations}}ee(((V=class e extends oe{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.id,label:S.N("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:k.Ao.and(_.u.hasDeclarationProvider,_.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?S.N("decl.noResultWord","No declaration found for '{0}'",e.word):S.N("decl.generic.noResults","No declaration found")}}).id="editor.action.revealDeclaration",V)),ee(class extends oe{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:S.N("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:k.Ao.and(_.u.hasDeclarationProvider,K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:q.eH.EditorContextPeek,group:"peek",order:3}})}});class se extends ie{_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(yield(0,Z.L3)(e.typeDefinitionProvider,t,i,n),S.N("typedef.title","Type Definitions"))}))}_getNoResultFoundMessage(e){return e&&e.word?S.N("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):S.N("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(51).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(51).multipleTypeDefinitions}}ee(((z=class e extends se{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:S.N("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:k.Ao.and(_.u.hasTypeDefinitionProvider,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}}).ID="editor.action.goToTypeDefinition",z)),ee(((H=class e extends se{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:S.N("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:k.Ao.and(_.u.hasTypeDefinitionProvider,K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:q.eH.EditorContextPeek,group:"peek",order:4}})}}).ID="editor.action.peekTypeDefinition",H));class ae extends ie{_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(yield(0,Z.f4)(e.implementationProvider,t,i,n),S.N("impl.title","Implementations"))}))}_getNoResultFoundMessage(e){return e&&e.word?S.N("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):S.N("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(51).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(51).multipleImplementations}}ee(((j=class e extends ae{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:e.ID,label:S.N("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:k.Ao.and(_.u.hasImplementationProvider,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}}).ID="editor.action.goToImplementation",j)),ee(((U=class e extends ae{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:e.ID,label:S.N("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:k.Ao.and(_.u.hasImplementationProvider,K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:q.eH.EditorContextPeek,group:"peek",order:5}})}}).ID="editor.action.peekImplementation",U));class le extends ie{_getNoResultFoundMessage(e){return e?S.N("references.no","No references found for '{0}'",e.word):S.N("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(51).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(51).multipleReferences}}ee(class extends le{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:S.N("goToReferences.label","Go to References"),alias:"Go to References",precondition:k.Ao.and(_.u.hasReferenceProvider,K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:_.u.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(yield(0,Z.aA)(e.referenceProvider,t,i,!0,n),S.N("ref.title","References"))}))}}),ee(class extends le{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:S.N("references.action.label","Peek References"),alias:"Peek References",precondition:k.Ao.and(_.u.hasReferenceProvider,K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:q.eH.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(yield(0,Z.aA)(e.referenceProvider,t,i,!1,n),S.N("ref.title","References"))}))}});class ce extends ie{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:S.N("label.generic","Go to Any Symbol"),alias:"Go to Any Symbol",precondition:k.Ao.and(K.Jy.notInPeekEditor,_.u.isInWalkThroughSnippet.toNegated())}),this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i,n){return X(this,void 0,void 0,(function*(){return new y.oQ(this._references,S.N("generic.title","Locations"))}))}_getNoResultFoundMessage(e){return e&&S.N("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return null!==(t=this._gotoMultipleBehaviour)&&void 0!==t?t:e.getOption(51).multipleReferences}_getAlternativeCommand(){return""}}G.P0.registerCommand({id:"editor.action.goToLocations",description:{description:"Go to locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:c.o},{name:"position",description:"The position at which to start",constraint:p.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"},{name:"noResultsMessage",description:"Human readable message that shows when locations is empty."}]},handler:(e,t,i,n,r,o,s)=>X(void 0,void 0,void 0,(function*(){(0,l.p_)(c.o.isUri(t)),(0,l.p_)(p.L.isIPosition(i)),(0,l.p_)(Array.isArray(n)),(0,l.p_)(void 0===r||"string"==typeof r),(0,l.p_)(void 0===s||"boolean"==typeof s);const a=e.get(g.$),h=yield a.openCodeEditor({resource:t},a.getFocusedCodeEditor());if((0,d.CL)(h))return h.setPosition(i),h.revealPositionInCenterIfOutsideViewport(i,0),h.invokeWithinContext((e=>{const t=new class extends ce{_getNoResultFoundMessage(e){return o||super._getNoResultFoundMessage(e)}}({muteMessage:!Boolean(o),openInPeek:Boolean(s),openToSide:!1},n,r);e.get(N.TG).invokeFunction(t.run.bind(t),h)}))}))}),G.P0.registerCommand({id:"editor.action.peekLocations",description:{description:"Peek locations from a position in a file",args:[{name:"uri",description:"The text document in which to start",constraint:c.o},{name:"position",description:"The position at which to start",constraint:p.L.isIPosition},{name:"locations",description:"An array of locations.",constraint:Array},{name:"multiple",description:"Define what to do when having multiple results, either `peek`, `gotoAndPeek`, or `goto"}]},handler:(e,t,i,n,r)=>X(void 0,void 0,void 0,(function*(){e.get(G.Hy).executeCommand("editor.action.goToLocations",t,i,n,r,void 0,!0)}))}),G.P0.registerCommand({id:"editor.action.findReferences",handler:(e,t,i)=>{(0,l.p_)(c.o.isUri(t)),(0,l.p_)(p.L.isIPosition(i));const n=e.get(Q.p),r=e.get(g.$);return r.openCodeEditor({resource:t},r.getFocusedCodeEditor()).then((e=>{if(!(0,d.CL)(e)||!e.hasModel())return;const t=b.J.get(e);if(!t)return;const r=(0,o.PG)((t=>(0,Z.aA)(n.referenceProvider,e.getModel(),p.L.lift(i),!1,t).then((e=>new y.oQ(e,S.N("ref.title","References")))))),s=new m.e(i.lineNumber,i.column,i.lineNumber,i.column);return Promise.resolve(t.toggleWidget(s,r,!1))}))}}),G.P0.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations"),q.BH.appendMenuItems([{id:q.eH.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:S.N({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:q.eH.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:S.N({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:q.eH.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:S.N({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:q.eH.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:S.N({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:q.eH.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:S.N({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}])},184:(e,t,i)=>{"use strict";i.d(t,{L3:()=>g,aA:()=>f,f4:()=>u,nD:()=>h,zq:()=>d});var n=i(1050),r=i(7301),o=i(6830),s=i(1293),a=i(1922),l=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};function c(e,t,i,n){const o=i.ordered(e).map((i=>Promise.resolve(n(i,e,t)).then(void 0,(e=>{(0,r.Cp)(e)}))));return Promise.all(o).then((e=>{const t=[];for(let i of e)Array.isArray(i)?t.push(...i):i&&t.push(i);return t}))}function h(e,t,i,n){return c(t,i,e,((e,t,i)=>e.provideDefinition(t,i,n)))}function d(e,t,i,n){return c(t,i,e,((e,t,i)=>e.provideDeclaration(t,i,n)))}function u(e,t,i,n){return c(t,i,e,((e,t,i)=>e.provideImplementation(t,i,n)))}function g(e,t,i,n){return c(t,i,e,((e,t,i)=>e.provideTypeDefinition(t,i,n)))}function f(e,t,i,n,r){return c(t,i,e,((e,t,i)=>l(this,void 0,void 0,(function*(){const o=yield e.provideReferences(t,i,{includeDeclaration:!0},r);if(!n||!o||2!==o.length)return o;const s=yield e.provideReferences(t,i,{includeDeclaration:!1},r);return s&&1===s.length?s:o}))))}function p(e){return l(this,void 0,void 0,(function*(){const t=yield e(),i=new s.oQ(t,""),n=i.references.map((e=>e.link));return i.dispose(),n}))}(0,o.sb)("_executeDefinitionProvider",((e,t,i)=>{const r=h(e.get(a.p).definitionProvider,t,i,n.T.None);return p((()=>r))})),(0,o.sb)("_executeTypeDefinitionProvider",((e,t,i)=>{const r=g(e.get(a.p).typeDefinitionProvider,t,i,n.T.None);return p((()=>r))})),(0,o.sb)("_executeDeclarationProvider",((e,t,i)=>{const r=d(e.get(a.p).declarationProvider,t,i,n.T.None);return p((()=>r))})),(0,o.sb)("_executeReferenceProvider",((e,t,i)=>{const r=f(e.get(a.p).referenceProvider,t,i,!1,n.T.None);return p((()=>r))})),(0,o.sb)("_executeImplementationProvider",((e,t,i)=>{const r=u(e.get(a.p).implementationProvider,t,i,n.T.None);return p((()=>r))}))},2005:(e,t,i)=>{"use strict";i.d(t,{yN:()=>d});var n=i(4669),r=i(5976),o=i(1432);function s(e,t){return!!e[t]}class a{constructor(e,t){this.target=e.target,this.hasTriggerModifier=s(e.event,t.triggerModifier),this.hasSideBySideModifier=s(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class l{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=s(e,t.triggerModifier)}}class c{constructor(e,t,i,n){this.triggerKey=e,this.triggerModifier=t,this.triggerSideBySideKey=i,this.triggerSideBySideModifier=n}equals(e){return this.triggerKey===e.triggerKey&&this.triggerModifier===e.triggerModifier&&this.triggerSideBySideKey===e.triggerSideBySideKey&&this.triggerSideBySideModifier===e.triggerSideBySideModifier}}function h(e){return"altKey"===e?o.dz?new c(57,"metaKey",6,"altKey"):new c(5,"ctrlKey",6,"altKey"):o.dz?new c(6,"altKey",57,"metaKey"):new c(6,"altKey",5,"ctrlKey")}class d extends r.JT{constructor(e){super(),this._onMouseMoveOrRelevantKeyDown=this._register(new n.Q5),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new n.Q5),this.onExecute=this._onExecute.event,this._onCancel=this._register(new n.Q5),this.onCancel=this._onCancel.event,this._editor=e,this._opts=h(this._editor.getOption(70)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration((e=>{if(e.hasChanged(70)){const e=h(this._editor.getOption(70));if(this._opts.equals(e))return;this._opts=e,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}}))),this._register(this._editor.onMouseMove((e=>this._onEditorMouseMove(new a(e,this._opts))))),this._register(this._editor.onMouseDown((e=>this._onEditorMouseDown(new a(e,this._opts))))),this._register(this._editor.onMouseUp((e=>this._onEditorMouseUp(new a(e,this._opts))))),this._register(this._editor.onKeyDown((e=>this._onEditorKeyDown(new l(e,this._opts))))),this._register(this._editor.onKeyUp((e=>this._onEditorKeyUp(new l(e,this._opts))))),this._register(this._editor.onMouseDrag((()=>this._resetHandler()))),this._register(this._editor.onDidChangeCursorSelection((e=>this._onDidChangeCursorSelection(e)))),this._register(this._editor.onDidChangeModel((e=>this._resetHandler()))),this._register(this._editor.onDidChangeModelContent((()=>this._resetHandler()))),this._register(this._editor.onDidScrollChange((e=>{(e.scrollTopChanged||e.scrollLeftChanged)&&this._resetHandler()})))}_onDidChangeCursorSelection(e){e.selection&&e.selection.startColumn!==e.selection.endColumn&&this._resetHandler()}_onEditorMouseMove(e){this._lastMouseMoveEvent=e,this._onMouseMoveOrRelevantKeyDown.fire([e,null])}_onEditorMouseDown(e){this._hasTriggerKeyOnMouseDown=e.hasTriggerModifier,this._lineNumberOnMouseDown=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;this._hasTriggerKeyOnMouseDown&&this._lineNumberOnMouseDown&&this._lineNumberOnMouseDown===t&&this._onExecute.fire(e)}_onEditorKeyDown(e){this._lastMouseMoveEvent&&(e.keyCodeIsTriggerKey||e.keyCodeIsSideBySideKey&&e.hasTriggerModifier)?this._onMouseMoveOrRelevantKeyDown.fire([this._lastMouseMoveEvent,e]):e.hasTriggerModifier&&this._onCancel.fire()}_onEditorKeyUp(e){e.keyCodeIsTriggerKey&&this._onCancel.fire()}_resetHandler(){this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._onCancel.fire()}}},1250:(e,t,i)=>{"use strict";i.r(t),i.d(t,{GotoDefinitionAtPositionEditorContribution:()=>B});var n=i(5393),r=i(7301),o=i(9365),s=i(5976),a=i(8401),l=i(3379),c=i.n(l),h=i(7795),d=i.n(h),u=i(569),g=i.n(u),f=i(3565),p=i.n(f),m=i(9216),_=i.n(m),v=i(4589),b=i.n(v),y=i(7723),w={};w.styleTagTransform=b(),w.setAttributes=p(),w.insert=g().bind(null,"head"),w.domAPI=d(),w.insertStyleElement=_(),c()(y.Z,w),y.Z&&y.Z.locals&&y.Z.locals;var C=i(6467),x=i(6830),S=i(187),k=i(4314),L=i(2042),N=i(8216),E=i(2005),D=i(9670),A=i(3580),T=i(8819),I=i(3910),M=i(7781),O=i(628),R=i(184),P=i(1922),F=function(e,t){return function(i,n){t(i,n,e)}};let B=class e{constructor(e,t,i,n){this.textModelResolverService=t,this.languageService=i,this.languageFeaturesService=n,this.toUnhook=new s.SL,this.toUnhookForKeyboard=new s.SL,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let o=new E.yN(e);this.toUnhook.add(o),this.toUnhook.add(o.onMouseMoveOrRelevantKeyDown((([e,t])=>{this.startFindDefinitionFromMouse(e,(0,a.f6)(t))}))),this.toUnhook.add(o.onExecute((e=>{this.isEnabled(e)&&this.gotoDefinition(e.target.position,e.hasSideBySideModifier).then((()=>{this.removeLinkDecorations()}),(e=>{this.removeLinkDecorations(),(0,r.dL)(e)}))}))),this.toUnhook.add(o.onCancel((()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null})))}static get(t){return t.getContribution(e.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then((()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition((()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()}))),this.toUnhookForKeyboard.add(this.editor.onKeyDown((e=>{e&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())})))}))}startFindDefinitionFromMouse(e,t){if(9===e.target.type&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t))return this.currentWordAtPosition=null,void this.removeLinkDecorations();const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?null===(t=this.editor.getModel())||void 0===t?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let s=new C.yy(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=(0,n.PG)((t=>this.findDefinition(e,t))),this.previousPromise.then((t=>{if(t&&t.length&&s.validate(this.editor))if(t.length>1)this.addDecoration(new k.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),(new o.W5).appendText(A.N("multipleResults","Click to show {0} definitions.",t.length)));else{let n=t[0];if(!n.uri)return;this.textModelResolverService.createModelReference(n.uri).then((t=>{if(!t.object||!t.object.textEditorModel)return void t.dispose();const{object:{textEditorModel:r}}=t,{startLineNumber:s}=n.range;if(s<1||s>r.getLineCount())return void t.dispose();const a=this.getPreviewValue(r,s,n);let l;l=n.originSelectionRange?k.e.lift(n.originSelectionRange):new k.e(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const c=this.languageService.guessLanguageIdByFilepathOrFirstLine(r.uri);this.addDecoration(l,(new o.W5).appendCodeblock(c||"",a)),t.dispose()}))}else this.removeLinkDecorations()})).then(void 0,r.dL)}getPreviewValue(t,i,n){let r=n.targetSelectionRange?n.range:this.getPreviewRangeBasedOnBrackets(t,i);return r.endLineNumber-r.startLineNumber>=e.MAX_SOURCE_PREVIEW_LINES&&(r=this.getPreviewRangeBasedOnIndentation(t,i)),this.stripIndentationFromPreviewRange(t,i,r)}stripIndentationFromPreviewRange(e,t,i){let n=e.getLineFirstNonWhitespaceColumn(t);for(let r=t+1;rn)return new k.e(i,1,n+1,1);s=t.bracketPairs.findNextBracket(new S.L(a,l))}return new k.e(i,1,n+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&6===e.target.type&&(e.hasTriggerModifier||!!t&&t.keyCodeIsTriggerKey)&&this.languageFeaturesService.definitionProvider.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?(0,R.nD)(this.languageFeaturesService.definitionProvider,i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext((e=>{const i=!t&&this.editor.getOption(78)&&!this.isInPeekEditor(e);return new O.DefinitionAction({openToSide:t,openInPeek:i,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,this.editor)}))}isInPeekEditor(e){const t=e.get(T.i6);return D.Jy.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};B.ID="editor.contrib.gotodefinitionatposition",B.MAX_SOURCE_PREVIEW_LINES=8,B=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([F(1,N.S),F(2,L.O),F(3,P.p)],B),(0,x._K)(B.ID,B),(0,M.Ic)(((e,t)=>{const i=e.getColor(I._Yy);i&&t.addRule(`.monaco-editor .goto-definition-link { color: ${i} !important; }`)}))},5600:(e,t,i)=>{"use strict";i.d(t,{J:()=>Ce});var n=i(5393),r=i(7301),o=i(2258),s=i(5976),a=i(1640),l=i(187),c=i(4314),h=i(9670),d=i(3580),u=i(4565),g=i(3108),f=i(8819),p=i(2065),m=i(9989),_=i(8803),v=i(9422),b=i(6904),y=i(1293),w=i(5321),C=i(3048),x=i(1264),S=i(4669),k=i(6663),L=i(5935),N=i(3379),E=i.n(N),D=i(7795),A=i.n(D),T=i(569),I=i.n(T),M=i(3565),O=i.n(M),R=i(9216),P=i.n(R),F=i(4589),B=i.n(F),W=i(9603),V={};V.styleTagTransform=B(),V.setAttributes=O(),V.insert=I().bind(null,"head"),V.domAPI=A(),V.insertStyleElement=P(),E()(W.Z,V),W.Z&&W.Z.locals&&W.Z.locals;var z=i(4527),H=i(3084),j=i(9381),U=i(8801),$=i(2042),K=i(8216),q=i(596),G=i(4650),Y=i(2750),Z=i(5392),Q=i(8843),X=i(1847),J=i(4349),ee=i(8810),te=i(7781),ie=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},ne=function(e,t){return function(i,n){t(i,n,e)}};let re=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof y.oQ||e instanceof y.F2}getChildren(e){if(e instanceof y.oQ)return e.groups;if(e instanceof y.F2)return e.resolve(this._resolverService).then((e=>e.children));throw new Error("bad tree")}};re=ie([ne(0,K.S)],re);class oe{getHeight(){return 23}getTemplateId(e){return e instanceof y.F2?ce.id:de.id}}let se=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof y.WX){const i=null===(t=e.parent.getPreview(e))||void 0===t?void 0:t.preview(e.range);if(i)return i.value}return(0,L.EZ)(e.uri)}};se=ie([ne(0,X.d)],se);class ae{getId(e){return e instanceof y.WX?e.id:e.uri}}let le=class extends s.JT{constructor(e,t,i){super(),this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new Y.g(n,{supportHighlights:!0})),this.badge=new q.Z(w.R3(n,w.$(".count"))),this._register((0,ee.WZ)(this.badge,i)),e.appendChild(n)}set(e,t){let i=(0,L.XX)(e.uri);this.file.setLabel((0,Q.p)(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat((0,d.N)("referencesCount","{0} references",n)):this.badge.setTitleFormat((0,d.N)("referenceCount","{0} reference",n))}};le=ie([ne(1,J.e),ne(2,te.XE)],le);let ce=class e{constructor(t){this._instantiationService=t,this.templateId=e.id}renderTemplate(e){return this._instantiationService.createInstance(le,e)}renderElement(e,t,i){i.set(e.element,(0,Z.mB)(e.filterData))}disposeTemplate(e){e.dispose()}};ce.id="FileReferencesRenderer",ce=ie([ne(0,p.TG)],ce);class he{constructor(e){this.label=new G.q(e)}set(e,t){var i;const n=null===(i=e.parent.getPreview(e))||void 0===i?void 0:i.preview(e.range);if(n&&n.value){const{value:e,highlight:i}=n;t&&!Z.CL.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(e,(0,Z.mB)(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(e,[i]))}else this.label.set(`${(0,L.EZ)(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`)}}class de{constructor(){this.templateId=de.id}renderTemplate(e){return new he(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}de.id="OneReferenceRenderer";class ue{getWidgetAriaLabel(){return(0,d.N)("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var ge=i(4862),fe=function(e,t){return function(i,n){t(i,n,e)}},pe=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class me{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new s.SL,this._callOnModelChange=new s.SL,this._callOnDispose.add(this._editor.onDidChangeModel((()=>this._onModelChanged()))),this._onModelChanged()}dispose(){this._callOnModelChange.dispose(),this._callOnDispose.dispose(),this.removeDecorations()}_onModelChanged(){this._callOnModelChange.clear();const e=this._editor.getModel();if(e)for(let t of this._model.references)if(t.uri.toString()===e.uri.toString())return void this._addDecorations(t.parent)}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations((()=>this._onDecorationChanged())));const t=[],i=[];for(let n=0,r=e.children.length;n{e.equals(9)&&(this._keybindingService.dispatchEvent(e,e.target),e.stopPropagation())}),!0)),this._tree=this._instantiationService.createInstance(_e,"ReferencesWidget",this._treeContainer,new oe,[this._instantiationService.createInstance(ce),this._instantiationService.createInstance(de)],this._instantiationService.createInstance(re),t),this._splitView.addView({onDidChange:S.ju.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:e=>{this._preview.layout({height:this._dim.height,width:e})}},C.M.Distribute),this._splitView.addView({onDidChange:S.ju.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:e=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${e}px`,this._tree.layout(this._dim.height,e)}},C.M.Distribute),this._disposables.add(this._splitView.onDidSashChange((()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)}),void 0));let i=(e,t)=>{e instanceof y.WX&&("show"===t&&this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:t,source:"tree"}))};this._tree.onDidOpen((e=>{e.sideBySide?i(e.element,"side"):e.editorOptions.pinned?i(e.element,"goto"):i(e.element,"show")})),w.Cp(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new w.Ro(t,e),this.layoutData.heightInLines=this._viewZone?this._viewZone.heightInLines:this.layoutData.heightInLines,this._splitView.layout(t),this._splitView.resizeView(0,t*this.layoutData.ratio)}setSelection(e){return this._revealReference(e,!0).then((()=>{this._model&&(this._tree.setSelection([e]),this._tree.setFocus([e]))}))}setModel(e){return this._disposeOnNewModel.clear(),this._model=e,this._model?this._onNewModel():Promise.resolve()}_onNewModel(){return this._model?this._model.isEmpty?(this.setTitle(""),this._messageContainer.innerText=d.N("noResults","No results"),w.$Z(this._messageContainer),Promise.resolve(void 0)):(w.Cp(this._messageContainer),this._decorationsManager=new me(this._preview,this._model),this._disposeOnNewModel.add(this._decorationsManager),this._disposeOnNewModel.add(this._model.onDidChangeReferenceRange((e=>this._tree.rerender(e)))),this._disposeOnNewModel.add(this._preview.onMouseDown((e=>{const{event:t,target:i}=e;if(2!==t.detail)return;const n=this._getFocusedReference();n&&this._onDidSelectReference.fire({element:{uri:n.uri,range:i.range},kind:t.ctrlKey||t.metaKey||t.altKey?"side":"open",source:"editor"})}))),this.container.classList.add("results-loaded"),w.$Z(this._treeContainer),w.$Z(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(1===this._model.groups.length?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();return e instanceof y.WX?e:e instanceof y.F2&&e.children.length>0?e.children[0]:void 0}revealReference(e){return pe(this,void 0,void 0,(function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})}))}_revealReference(e,t){return pe(this,void 0,void 0,(function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==k.lg.inMemory?this.setTitle((0,L.Hx)(e.uri),this._uriLabel.getUriLabel((0,L.XX)(e.uri))):this.setTitle(d.N("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent||(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent)),this._tree.reveal(e);const n=yield i;if(!this._model)return void n.dispose();(0,s.B9)(this._previewModelReference);const r=n.object;if(r){const t=this._preview.getModel()===r.textEditorModel?0:1,i=c.e.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(r.textEditorModel),this._preview.setSelection(i),this._preview.revealRangeInCenter(i,t)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()}))}};ve=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([fe(3,te.XE),fe(4,K.S),fe(5,p.TG),fe(6,h.Fw),fe(7,J.e),fe(8,ge.tJ),fe(9,X.d),fe(10,$.O),fe(11,j.c_)],ve);var be=function(e,t){return function(i,n){t(i,n,e)}},ye=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const we=new f.uy("referenceSearchVisible",!1,d.N("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Ce=class e{constructor(e,t,i,n,r,o,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=r,this._instantiationService=o,this._storageService=a,this._configurationService=l,this._disposables=new s.SL,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=we.bindTo(i)}static get(t){return t.getContribution(e.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),null===(e=this._widget)||void 0===e||e.dispose(),null===(t=this._model)||void 0===t||t.dispose(),this._widget=void 0,this._model=void 0}toggleWidget(e,t,i){let n;if(this._widget&&(n=this._widget.position),this.closeWidget(),n&&e.containsPosition(n))return;this._peekMode=i,this._referenceSearchVisible.set(!0),this._disposables.add(this._editor.onDidChangeModelLanguage((()=>{this.closeWidget()}))),this._disposables.add(this._editor.onDidChangeModel((()=>{this._ignoreModelChangeEvent||this.closeWidget()})));const r="peekViewLayout",o=class{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch(e){}return{ratio:t||.7,heightInLines:i||18}}}.fromJSON(this._storageService.get(r,0,"{}"));this._widget=this._instantiationService.createInstance(ve,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(d.N("labelLoading","Loading...")),this._widget.show(e),this._disposables.add(this._widget.onDidClose((()=>{t.cancel(),this._widget&&(this._storageService.store(r,JSON.stringify(this._widget.layoutData),0,1),this._widget=void 0),this.closeWidget()}))),this._disposables.add(this._widget.onDidSelectReference((e=>{let{element:t,kind:n}=e;if(t)switch(n){case"open":"editor"===e.source&&this._configurationService.getValue("editor.stablePeek")||this.openReference(t,!1,!1);break;case"side":this.openReference(t,!0,!1);break;case"goto":i?this._gotoReference(t):this.openReference(t,!1,!0)}})));const s=++this._requestIdPool;t.then((t=>{var i;if(s===this._requestIdPool&&this._widget)return null===(i=this._model)||void 0===i||i.dispose(),this._model=t,this._widget.setModel(this._model).then((()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(d.N("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let t=this._editor.getModel().uri,i=new l.L(e.startLineNumber,e.startColumn),n=this._model.nearestReference(t,i);if(n)return this._widget.setSelection(n).then((()=>{this._widget&&"editor"===this._editor.getOption(77)&&this._widget.focusOnPreviewEditor()}))}}));t.dispose()}),(e=>{this._notificationService.error(e)}))}changeFocusBetweenPreviewAndReferences(){this._widget&&(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return ye(this,void 0,void 0,(function*(){if(!this._editor.hasModel()||!this._model||!this._widget)return;const t=this._widget.position;if(!t)return;const i=this._model.nearestReference(this._editor.getModel().uri,t);if(!i)return;const n=this._model.nextOrPreviousReference(i,e),r=this._editor.hasTextFocus(),o=this._widget.isPreviewEditorFocused();yield this._widget.setSelection(n),yield this._gotoReference(n),r?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()}))}revealReference(e){return ye(this,void 0,void 0,(function*(){this._editor.hasModel()&&this._model&&this._widget&&(yield this._widget.revealReference(e))}))}closeWidget(e=!0){var t,i;null===(t=this._widget)||void 0===t||t.dispose(),null===(i=this._model)||void 0===i||i.dispose(),this._referenceSearchVisible.reset(),this._disposables.clear(),this._widget=void 0,this._model=void 0,e&&this._editor.focus(),this._requestIdPool+=1}_gotoReference(t){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const i=c.e.lift(t.range).collapseToStart();return this._editorService.openCodeEditor({resource:t.uri,options:{selection:i,selectionSource:"code.jump"}},this._editor).then((t=>{var r;if(this._ignoreModelChangeEvent=!1,t&&this._widget)if(this._editor===t)this._widget.show(i),this._widget.focusOnReferenceTree();else{const o=e.get(t),s=this._model.clone();this.closeWidget(),t.focus(),null==o||o.toggleWidget(i,(0,n.PG)((e=>Promise.resolve(s))),null!==(r=this._peekMode)&&void 0!==r&&r)}else this.closeWidget()}),(e=>{this._ignoreModelChangeEvent=!1,(0,r.dL)(e)}))}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:r}=e;this._editorService.openCodeEditor({resource:n,options:{selection:r,selectionSource:"code.jump",pinned:i}},this._editor,t)}};function xe(e,t){const i=(0,h.rc)(e);if(!i)return;const n=Ce.get(i);n&&t(n)}Ce.ID="editor.contrib.referencesController",Ce=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([be(2,f.i6),be(3,a.$),be(4,v.lT),be(5,p.TG),be(6,b.Uy),be(7,g.Ui)],Ce),m.W.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:(0,o.gx)(2089,60),when:f.Ao.or(we,h.Jy.inPeekEditor),handler(e){xe(e,(e=>{e.changeFocusBetweenPreviewAndReferences()}))}}),m.W.registerCommandAndKeybindingRule({id:"goToNextReference",weight:90,primary:62,secondary:[70],when:f.Ao.or(we,h.Jy.inPeekEditor),handler(e){xe(e,(e=>{e.goToNextOrPreviousReference(!0)}))}}),m.W.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:90,primary:1086,secondary:[1094],when:f.Ao.or(we,h.Jy.inPeekEditor),handler(e){xe(e,(e=>{e.goToNextOrPreviousReference(!1)}))}}),u.P0.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference"),u.P0.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference"),u.P0.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch"),u.P0.registerCommand("closeReferenceSearch",(e=>xe(e,(e=>e.closeWidget())))),m.W.registerKeybindingRule({id:"closeReferenceSearch",weight:-1,primary:9,secondary:[1033],when:f.Ao.and(h.Jy.inPeekEditor,f.Ao.not("config.editor.stablePeek"))}),m.W.registerKeybindingRule({id:"closeReferenceSearch",weight:250,primary:9,secondary:[1033],when:f.Ao.and(we,f.Ao.not("config.editor.stablePeek"))}),m.W.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:f.Ao.and(we,_.CQ,_.PS.negate(),_.uJ.negate()),handler(e){var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof y.WX&&xe(e,(e=>e.revealReference(i[0])))}}),m.W.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:f.Ao.and(we,_.CQ,_.PS.negate(),_.uJ.negate()),handler(e){var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof y.WX&&xe(e,(e=>e.openReference(i[0],!0,!0)))}}),u.P0.registerCommand("openReference",(e=>{var t;const i=null===(t=e.get(_.Lw).lastFocusedList)||void 0===t?void 0:t.getFocus();Array.isArray(i)&&i[0]instanceof y.WX&&xe(e,(e=>e.openReference(i[0],!1,!0)))}))},1293:(e,t,i)=>{"use strict";i.d(t,{F2:()=>f,WX:()=>u,oQ:()=>p});var n=i(7301),r=i(4669),o=i(4742),s=i(5976),a=i(3702),l=i(5935),c=i(5924),h=i(4314),d=i(3580);class u{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=o.a.nextId()}get uri(){return this.link.uri}get range(){var e,t;return null!==(t=null!==(e=this._range)&&void 0!==e?e:this.link.targetSelectionRange)&&void 0!==t?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=null===(e=this.parent.getPreview(this))||void 0===e?void 0:e.preview(this.range);return t?(0,d.N)({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):(0,d.N)("aria.oneReference","symbol in {0} on line {1} at column {2}",(0,l.EZ)(this.uri),this.range.startLineNumber,this.range.startColumn)}}class g{constructor(e){this._modelReference=e}dispose(){this._modelReference.dispose()}preview(e,t=8){const i=this._modelReference.object.textEditorModel;if(!i)return;const{startLineNumber:n,startColumn:r,endLineNumber:o,endColumn:s}=e,a=i.getWordUntilPosition({lineNumber:n,column:r-t}),l=new h.e(n,a.startColumn,n,r),c=new h.e(o,s,o,1073741824),d=i.getValueInRange(l).replace(/^\s+/,""),u=i.getValueInRange(e);return{value:d+u+i.getValueInRange(c).replace(/\s+$/,""),highlight:{start:d.length,end:d.length+u.length}}}}class f{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new a.Y9}dispose(){(0,s.B9)(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return 1===e?(0,d.N)("aria.fileReferences.1","1 symbol in {0}, full path {1}",(0,l.EZ)(this.uri),this.uri.fsPath):(0,d.N)("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,(0,l.EZ)(this.uri),this.uri.fsPath)}resolve(e){return t=this,i=void 0,o=function*(){if(0!==this._previews.size)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new g(i))}catch(e){(0,n.dL)(e)}return this},new((r=void 0)||(r=Promise))((function(e,n){function s(e){try{l(o.next(e))}catch(e){n(e)}}function a(e){try{l(o.throw(e))}catch(e){n(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof r?i:new r((function(e){e(i)}))).then(s,a)}l((o=o.apply(t,i||[])).next())}));var t,i,r,o}}class p{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new r.Q5,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;let n;e.sort(p._compareReferences);for(let t of e)if(n&&l.SF.isEqual(n.uri,t.uri,!0)||(n=new f(this,t.uri),this.groups.push(n)),0===n.children.length||0!==p._compareReferences(t,n.children[n.children.length-1])){const e=new u(i===t,n,t,(e=>this._onDidChangeReferenceRange.fire(e)));this.references.push(e),n.children.push(e)}}dispose(){(0,s.B9)(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new p(this._links,this._title)}get title(){return this._title}get isEmpty(){return 0===this.groups.length}get ariaMessage(){return this.isEmpty?(0,d.N)("aria.result.0","No results found"):1===this.references.length?(0,d.N)("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):1===this.groups.length?(0,d.N)("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):(0,d.N)("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),r=i.children.length,o=i.parent.groups.length;return 1===o||t&&n+10?(n=t?(n+1)%r:(n+r-1)%r,i.children[n]):(n=i.parent.groups.indexOf(i),t?(n=(n+1)%o,i.parent.groups[n].children[0]):(n=(n+o-1)%o,i.parent.groups[n].children[i.parent.groups[n].children.length-1]))}nearestReference(e,t){const i=this.references.map(((i,n)=>({idx:n,prefixLen:c.Mh(i.uri.toString(),e.toString()),offsetDist:100*Math.abs(i.range.startLineNumber-t.lineNumber)+Math.abs(i.range.startColumn-t.column)}))).sort(((e,t)=>e.prefixLen>t.prefixLen?-1:e.prefixLent.offsetDist?1:0))[0];if(i)return this.references[i.idx]}referenceAt(e,t){for(const i of this.references)if(i.uri.toString()===e.toString()&&h.e.containsPosition(i.range,t))return i}firstReference(){for(const e of this.references)if(e.isProviderFirst)return e;return this.references[0]}static _compareReferences(e,t){return l.SF.compare(e.uri,t.uri)||h.e.compareRangesUsingStarts(e.range,t.range)}}},1095:(e,t,i)=>{"use strict";i.d(t,{R8:()=>c});var n=i(5393),r=i(1050),o=i(7301),s=i(6830),a=i(1922);class l{constructor(e,t,i){this.provider=e,this.hover=t,this.ordinal=i}}function c(e,t,i,r){const s=e.ordered(t).map(((e,n)=>function(e,t,i,n,r){return s=this,a=void 0,h=function*(){try{const o=yield Promise.resolve(e.provideHover(i,n,r));if(o&&function(e){const t=void 0!==e.range,i=void 0!==e.contents&&e.contents&&e.contents.length>0;return t&&i}(o))return new l(e,o,t)}catch(e){(0,o.Cp)(e)}},new((c=void 0)||(c=Promise))((function(e,t){function i(e){try{r(h.next(e))}catch(e){t(e)}}function n(e){try{r(h.throw(e))}catch(e){t(e)}}function r(t){var r;t.done?e(t.value):(r=t.value,r instanceof c?r:new c((function(e){e(r)}))).then(i,n)}r((h=h.apply(s,a||[])).next())}));var s,a,c,h}(e,n,t,i,r)));return n.Aq.fromPromises(s).coalesce()}(0,s.sb)("_executeHoverProvider",((e,t,i)=>function(e,t,i,n){return c(e,t,i,n).map((e=>e.hover)).toPromise()}(e.get(a.p).hoverProvider,t,i,r.T.None)))},7804:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ModesHoverController:()=>Se});var n=i(2258),r=i(5976),o=i(6830),s=i(4314),a=i(9102),l=i(2042),c=i(1250),h=i(5321),d=i(9069),u=i(433),g=i(3379),f=i.n(g),p=i(7795),m=i.n(p),_=i(569),v=i.n(_),b=i(3565),y=i.n(b),w=i(9216),C=i.n(w),x=i(4589),S=i.n(x),k=i(223),L={};L.styleTagTransform=S(),L.setAttributes=y(),L.insert=v().bind(null,"head"),L.domAPI=m(),L.insertStyleElement=C(),f()(k.Z,L),k.Z&&k.Z.locals&&k.Z.locals;const N=h.$;class E extends r.JT{constructor(){super(),this.containerDomNode=document.createElement("div"),this.containerDomNode.className="monaco-hover",this.containerDomNode.tabIndex=0,this.containerDomNode.setAttribute("role","tooltip"),this.contentsDomNode=document.createElement("div"),this.contentsDomNode.className="monaco-hover-content",this.scrollbar=this._register(new u.s$(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this.scrollbar.getDomNode())}onContentsChanged(){this.scrollbar.scanDomNode()}}class D extends r.JT{constructor(e,t,i){super(),this.actionContainer=h.R3(e,N("div.action-container")),this.actionContainer.setAttribute("tabindex","0"),this.action=h.R3(this.actionContainer,N("a.action")),this.action.setAttribute("role","button"),t.iconClass&&h.R3(this.action,N(`span.icon.${t.iconClass}`)),h.R3(this.action,N("span")).textContent=i?`${t.label} (${i})`:t.label,this._register(h.nm(this.actionContainer,h.tw.CLICK,(e=>{e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer)}))),this._register(h.nm(this.actionContainer,h.tw.KEY_UP,(e=>{new d.y(e).equals(3)&&(e.stopPropagation(),e.preventDefault(),t.run(this.actionContainer))}))),this.setEnabled(!0)}static render(e,t,i){return new D(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}var A=i(9488),T=i(187),I=i(3084),M=i(6887),O=i(5393),R=i(7301),P=i(4669);class F{constructor(e,t,i){this.value=e,this.isComplete=t,this.hasLoadingMessage=i}}class B extends r.JT{constructor(e,t){super(),this._editor=e,this._computer=t,this._onResult=this._register(new P.Q5),this.onResult=this._onResult.event,this._firstWaitScheduler=this._register(new O.pY((()=>this._triggerAsyncComputation()),0)),this._secondWaitScheduler=this._register(new O.pY((()=>this._triggerSyncComputation()),0)),this._loadingMessageScheduler=this._register(new O.pY((()=>this._triggerLoadingMessage()),0)),this._state=0,this._asyncIterable=null,this._asyncIterableDone=!1,this._result=[]}dispose(){this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),super.dispose()}get _hoverTime(){return this._editor.getOption(53).delay}get _firstWaitTime(){return this._hoverTime/2}get _secondWaitTime(){return this._hoverTime-this._firstWaitTime}get _loadingMessageTime(){return 3*this._hoverTime}_setState(e,t=!0){this._state=e,t&&this._fireResult()}_triggerAsyncComputation(){this._setState(2),this._secondWaitScheduler.schedule(this._secondWaitTime),this._computer.computeAsync?(this._asyncIterableDone=!1,this._asyncIterable=(0,O.zS)((e=>this._computer.computeAsync(e))),(()=>{var e,t,i,n;e=this,t=void 0,n=function*(){var e,t;try{try{for(var i,n=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,r){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,r,(t=e[i](t)).done,t.value)}))}}}(this._asyncIterable);!(i=yield n.next()).done;){const e=i.value;e&&(this._result.push(e),this._fireResult())}}catch(t){e={error:t}}finally{try{i&&!i.done&&(t=n.return)&&(yield t.call(n))}finally{if(e)throw e.error}}this._asyncIterableDone=!0,3!==this._state&&4!==this._state||this._setState(0)}catch(e){(0,R.dL)(e)}},new((i=void 0)||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))})()):this._asyncIterableDone=!0}_triggerSyncComputation(){this._computer.computeSync&&(this._result=this._result.concat(this._computer.computeSync())),this._setState(this._asyncIterableDone?0:3)}_triggerLoadingMessage(){3===this._state&&this._setState(4)}_fireResult(){if(1===this._state||2===this._state)return;const e=0===this._state,t=4===this._state;this._onResult.fire(new F(this._result.slice(0),e,t))}start(e){if(0===e)0===this._state&&(this._setState(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()}}cancel(){this._firstWaitScheduler.cancel(),this._secondWaitScheduler.cancel(),this._loadingMessageScheduler.cancel(),this._asyncIterable&&(this._asyncIterable.cancel(),this._asyncIterable=null),this._result=[],this._setState(0,!1)}}var W=i(6520),V=i(8819),z=i(2065),H=i(1847),j=i(5621),U=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},$=function(e,t){return function(i,n){t(i,n,e)}};const K=h.$;let q=class e extends r.JT{constructor(e,t,i){super(),this._editor=e,this._instantiationService=t,this._keybindingService=i,this._widget=this._register(this._instantiationService.createInstance(Z,this._editor)),this._decorationsChangerListener=this._register(new G(this._editor)),this._messages=[],this._messagesAreComplete=!1,this._participants=[];for(const e of W.Ae.getAll())this._participants.push(this._instantiationService.createInstance(e,this._editor));this._participants.sort(((e,t)=>e.hoverOrdinal-t.hoverOrdinal)),this._computer=new X(this._editor,this._participants),this._hoverOperation=this._register(new B(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value,e.isComplete,e.hasLoadingMessage)}))),this._register(this._decorationsChangerListener.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(h.mu(this._widget.getDomNode(),"keydown",(e=>{e.equals(9)&&this.hide()}))),this._register(M.RW.onDidChange((()=>{this._widget.position&&this._computer.anchor&&this._messages.length>0&&(this._widget.clear(),this._renderMessages(this._computer.anchor,this._messages))})))}_onModelDecorationsChanged(){this._widget.position&&(this._hoverOperation.cancel(),this._widget.isColorPickerVisible||this._hoverOperation.start(0))}maybeShowAt(e){const t=[];for(const i of this._participants)if(i.suggestHoverAnchor){const n=i.suggestHoverAnchor(e);n&&t.push(n)}const i=e.target;if(6===i.type&&t.push(new W.Qj(0,i.range)),7===i.type){const e=this._editor.getOption(44).typicalHalfwidthCharacterWidth/2;!i.detail.isAfterLines&&"number"==typeof i.detail.horizontalDistanceToText&&i.detail.horizontalDistanceToTextt.priority-e.priority)),this._startShowingAt(t[0],0,!1),!0)}startShowingAtRange(e,t,i){this._startShowingAt(new W.Qj(0,e),t,i)}_startShowingAt(e,t,i){if(!this._computer.anchor||!this._computer.anchor.equals(e)){if(this._hoverOperation.cancel(),this._widget.position)if(this._computer.anchor&&e.canAdoptVisibleHover(this._computer.anchor,this._widget.position)){const t=this._messages.filter((t=>t.isValidForHoverAnchor(e)));if(0===t.length)this.hide();else{if(t.length===this._messages.length&&this._messagesAreComplete)return;this._renderMessages(e,t)}}else this.hide();this._computer.anchor=e,this._computer.shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._computer.anchor=null,this._hoverOperation.cancel(),this._widget.hide()}isColorPickerVisible(){return this._widget.isColorPickerVisible}_addLoadingMessage(e){if(this._computer.anchor)for(const t of this._participants)if(t.createLoadingMessage){const i=t.createLoadingMessage(this._computer.anchor);if(i)return e.slice(0).concat([i])}return e}_withResult(e,t,i){this._messages=i?this._addLoadingMessage(e):e,this._messagesAreComplete=t,this._computer.anchor&&this._messages.length>0?this._renderMessages(this._computer.anchor,this._messages):t&&this.hide()}_renderMessages(t,i){let n=1073741824,o=i[0].range,a=null;for(const e of i)n=Math.min(n,e.range.startColumn),o=s.e.plusRange(o,e.range),e.forceShowAtRange&&(a=e.range);const l=new r.SL,c=l.add(new Q(this._keybindingService)),h=document.createDocumentFragment();let d=null;const u={fragment:h,statusBar:c,setColorPicker:e=>d=e,onContentsChanged:()=>this._widget.onContentsChanged(),hide:()=>this.hide()};for(const e of this._participants){const t=i.filter((t=>t.owner===e));t.length>0&&l.add(e.renderHoverParts(u,t))}if(c.hasContent&&h.appendChild(c.hoverElement),h.hasChildNodes()){if(o){const t=this._decorationsChangerListener.deltaDecorations([],[{range:o,options:e._DECORATION_OPTIONS}]);l.add((0,r.OF)((()=>{this._decorationsChangerListener.deltaDecorations(t,[])})))}this._widget.showAt(h,new Y(d,a?a.getStartPosition():new T.L(t.range.startLineNumber,n),a||o,this._editor.getOption(53).above,this._computer.shouldFocus,l))}else l.dispose()}};q._DECORATION_OPTIONS=I.qx.register({description:"content-hover-highlight",className:"hoverHighlight"}),q=U([$(1,z.TG),$(2,H.d)],q);class G extends r.JT{constructor(e){super(),this._editor=e,this._onDidChangeModelDecorations=this._register(new P.Q5),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._isChangingDecorations=!1,this._register(this._editor.onDidChangeModelDecorations((e=>{this._isChangingDecorations||this._onDidChangeModelDecorations.fire(e)})))}deltaDecorations(e,t){try{return this._isChangingDecorations=!0,this._editor.deltaDecorations(e,t)}finally{this._isChangingDecorations=!1}}}class Y{constructor(e,t,i,n,r,o){this.colorPicker=e,this.showAtPosition=t,this.showAtRange=i,this.preferAbove=n,this.stoleFocus=r,this.disposables=o}}let Z=class e extends r.JT{constructor(e,t){super(),this._editor=e,this._contextKeyService=t,this.allowEditorOverflow=!0,this._hoverVisibleKey=a.u.hoverVisible.bindTo(this._contextKeyService),this._hover=this._register(new E),this._visibleData=null,this._register(this._editor.onDidLayoutChange((()=>this._layout()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(44)&&this._updateFont()}))),this._setVisibleData(null),this._layout(),this._editor.addContentWidget(this)}get position(){var e,t;return null!==(t=null===(e=this._visibleData)||void 0===e?void 0:e.showAtPosition)&&void 0!==t?t:null}get isColorPickerVisible(){var e;return Boolean(null===(e=this._visibleData)||void 0===e?void 0:e.colorPicker)}dispose(){this._editor.removeContentWidget(this),this._visibleData&&this._visibleData.disposables.dispose(),super.dispose()}getId(){return e.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){if(!this._visibleData)return null;let e=this._visibleData.preferAbove;return!e&&this._contextKeyService.getContextKeyValue(j._y.Visible.key)&&(e=!0),{position:this._visibleData.showAtPosition,range:this._visibleData.showAtRange,preference:e?[1,2]:[2,1]}}_setVisibleData(e){this._visibleData&&this._visibleData.disposables.dispose(),this._visibleData=e,this._hoverVisibleKey.set(!!this._visibleData),this._hover.containerDomNode.classList.toggle("hidden",!this._visibleData)}_layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(44);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=""+i/t,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(.66*this._editor.getLayoutInfo().width,500)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}showAt(e,t){this._setVisibleData(t),this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._hover.contentsDomNode.style.paddingBottom="",this._updateFont(),this._editor.layoutContentWidget(this),this.onContentsChanged(),this._editor.render(),this._editor.layoutContentWidget(this),this.onContentsChanged(),t.stoleFocus&&this._hover.containerDomNode.focus(),t.colorPicker&&t.colorPicker.layout()}hide(){if(this._visibleData){const e=this._visibleData.stoleFocus;this._setVisibleData(null),this._editor.layoutContentWidget(this),e&&this._editor.focus()}}onContentsChanged(){this._hover.onContentsChanged();const e=this._hover.scrollbar.getScrollDimensions();if(e.scrollWidth>e.width){const e=`${this._hover.scrollbar.options.horizontalScrollbarSize}px`;this._hover.contentsDomNode.style.paddingBottom!==e&&(this._hover.contentsDomNode.style.paddingBottom=e,this._editor.layoutContentWidget(this),this._hover.onContentsChanged())}}clear(){this._hover.contentsDomNode.textContent=""}};Z.ID="editor.contrib.contentHoverWidget",Z=U([$(1,V.i6)],Z);let Q=class extends r.JT{constructor(e){super(),this._keybindingService=e,this._hasContent=!1,this.hoverElement=K("div.hover-row.status-bar"),this.actionsElement=h.R3(this.hoverElement,K("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(D.render(this.actionsElement,e,i))}append(e){const t=h.R3(this.actionsElement,e);return this._hasContent=!0,t}};Q=U([$(0,H.d)],Q);class X{constructor(e,t){this._editor=e,this._participants=t,this._anchor=null,this._shouldFocus=!1}get anchor(){return this._anchor}set anchor(e){this._anchor=e}get shouldFocus(){return this._shouldFocus}set shouldFocus(e){this._shouldFocus=e}static _getLineDecorations(e,t){if(1!==t.type)return[];const i=e.getModel(),n=t.range.startLineNumber,r=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter((e=>{if(e.options.isWholeLine)return!0;const i=e.range.startLineNumber===n?e.range.startColumn:1,o=e.range.endLineNumber===n?e.range.endColumn:r;if(e.options.showIfCollapsed){if(i>t.range.startColumn+1||t.range.endColumn-1>o)return!1}else if(i>t.range.startColumn||t.range.endColumn>o)return!1;return!0}))}computeAsync(e){const t=this._anchor;if(!this._editor.hasModel()||!t)return O.Aq.EMPTY;const i=X._getLineDecorations(this._editor,t);return O.Aq.merge(this._participants.map((n=>n.computeAsync?n.computeAsync(t,i,e):O.Aq.EMPTY)))}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=X._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return(0,A.kX)(t)}}var J=i(9365),ee=i(498),te=i(988);const ie=h.$;class ne extends r.JT{constructor(e,t,i=te.SW){super(),this._renderDisposeables=this._register(new r.SL),this._editor=e,this._isVisible=!1,this._messages=[],this._hover=this._register(new E),this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._markdownRenderer=this._register(new ee.$({editor:this._editor},t,i)),this._computer=new re(this._editor),this._hoverOperation=this._register(new B(this._editor,this._computer)),this._register(this._hoverOperation.onResult((e=>{this._withResult(e.value)}))),this._register(this._editor.onDidChangeModelDecorations((()=>this._onModelDecorationsChanged()))),this._register(this._editor.onDidChangeConfiguration((e=>{e.hasChanged(44)&&this._updateFont()}))),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return ne.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach((e=>this._editor.applyFontInfo(e)))}_onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._hoverOperation.start(0))}startShowingAt(e){this._computer.lineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._computer.lineNumber=e,this._hoverOperation.start(0))}hide(){this._computer.lineNumber=-1,this._hoverOperation.cancel(),this._isVisible&&(this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible))}_withResult(e){this._messages=e,this._messages.length>0?this._renderMessages(this._computer.lineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const e of t){const t=ie("div.hover-row.markdown-hover"),n=h.R3(t,ie("div.hover-contents")),r=this._renderDisposeables.add(this._markdownRenderer.render(e.value));n.appendChild(r.element),i.appendChild(t)}this._updateContents(i),this._showAt(e)}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}_showAt(e){this._isVisible||(this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible));const t=this._editor.getLayoutInfo(),i=this._editor.getTopForLineNumber(e),n=this._editor.getScrollTop(),r=this._editor.getOption(59),o=i-n-(this._hover.containerDomNode.clientHeight-r)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(o),0)}px`}}ne.ID="editor.contrib.modesGlyphHoverWidget";class re{constructor(e){this._editor=e,this._lineNumber=-1}get lineNumber(){return this._lineNumber}set lineNumber(e){this._lineNumber=e}computeSync(){const e=e=>({value:e}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const t=n.options.glyphMarginHoverMessage;t&&!(0,J.CP)(t)&&i.push(...(0,A._2)(t).map(e))}return i}}var oe=i(3580),se=i(3910),ae=i(7781),le=i(2374),ce=i(5935),he=i(6357),de=i(5396),ue=i(8674),ge=i(6014),fe=i(9683),pe=i(5673),me=i(535),_e=i(1922),ve=function(e,t){return function(i,n){t(i,n,e)}};const be=h.$;class ye{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const we={type:1,filter:{include:ge.yN.QuickFix}};let Ce=class{constructor(e,t,i,n){this._editor=e,this._markerDecorationsService=t,this._openerService=i,this._languageFeaturesService=n,this.hoverOrdinal=5,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,r=i.getLineMaxColumn(n),o=[];for(const a of t){const t=a.range.startLineNumber===n?a.range.startColumn:1,l=a.range.endLineNumber===n?a.range.endColumn:r,c=this._markerDecorationsService.getMarker(i.uri,a);if(!c)continue;const h=new s.e(e.range.startLineNumber,t,e.range.startLineNumber,l);o.push(new ye(this,h,c))}return o}renderHoverParts(e,t){if(!t.length)return r.JT.None;const i=new r.SL;t.forEach((t=>e.fragment.appendChild(this.renderMarkerHover(t,i))));const n=1===t.length?t[0]:t.sort(((e,t)=>pe.ZL.compare(e.marker.severity,t.marker.severity)))[0];return this.renderMarkerStatusbar(e,n,i),i}renderMarkerHover(e,t){const i=be("div.hover-row"),n=h.R3(i,be("div.marker.hover-contents")),{source:r,message:o,code:s,relatedInformation:a}=e.marker;this._editor.applyFontInfo(n);const l=h.R3(n,be("span"));if(l.style.whiteSpace="pre-wrap",l.innerText=o,r||s)if(s&&"string"!=typeof s){const e=be("span");r&&(h.R3(e,be("span")).innerText=r);const i=h.R3(e,be("a.code-link"));i.setAttribute("href",s.target.toString()),t.add(h.nm(i,"click",(e=>{this._openerService.open(s.target,{allowCommands:!0}),e.preventDefault(),e.stopPropagation()}))),h.R3(i,be("span")).innerText=s.value;const o=h.R3(n,e);o.style.opacity="0.6",o.style.paddingLeft="6px"}else{const e=h.R3(n,be("span"));e.style.opacity="0.6",e.style.paddingLeft="6px",e.innerText=r&&s?`${r}(${s})`:r||`(${s})`}if((0,A.Of)(a))for(const{message:e,resource:i,startLineNumber:r,startColumn:o}of a){const s=h.R3(n,be("div"));s.style.marginTop="8px";const a=h.R3(s,be("a"));a.innerText=`${(0,ce.EZ)(i)}(${r}, ${o}): `,a.style.cursor="pointer",t.add(h.nm(a,"click",(e=>{e.stopPropagation(),e.preventDefault(),this._openerService&&this._openerService.open(i,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:r,startColumn:o}}}).catch(R.dL)})));const l=h.R3(s,be("span"));l.innerText=e,this._editor.applyFontInfo(l)}return i}renderMarkerStatusbar(e,t,i){if(t.marker.severity!==pe.ZL.Error&&t.marker.severity!==pe.ZL.Warning&&t.marker.severity!==pe.ZL.Info||e.statusBar.addAction({label:oe.N("view problem","View Problem"),commandId:fe.NextMarkerAction.ID,run:()=>{var i;e.hide(),null===(i=fe.MarkerController.get(this._editor))||void 0===i||i.showAtMarker(t.marker),this._editor.focus()}}),!this._editor.getOption(81)){const n=e.statusBar.append(be("div"));this.recentMarkerCodeActionsInfo&&(pe.H0.makeKey(this.recentMarkerCodeActionsInfo.marker)===pe.H0.makeKey(t.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=oe.N("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const o=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?r.JT.None:i.add((0,O.Vg)((()=>n.textContent=oe.N("checkingForQuickFixes","Checking for quick fixes...")),200));n.textContent||(n.textContent=String.fromCharCode(160));const s=this.getCodeActions(t.marker);i.add((0,r.OF)((()=>s.cancel()))),s.then((s=>{if(o.dispose(),this.recentMarkerCodeActionsInfo={marker:t.marker,hasCodeActions:s.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions)return s.dispose(),void(n.textContent=oe.N("noQuickFixes","No quick fixes available"));n.style.display="none";let a=!1;i.add((0,r.OF)((()=>{a||s.dispose()}))),e.statusBar.addAction({label:oe.N("quick fixes","Quick Fix..."),commandId:ue.E7.Id,run:t=>{a=!0;const i=ue.pY.get(this._editor),n=h.i(t);e.hide(),null==i||i.showCodeActions(we,s,{x:n.left+6,y:n.top+n.height+6})}})}),R.dL)}}getCodeActions(e){return(0,O.PG)((t=>(0,de.aI)(this._languageFeaturesService.codeActionProvider,this._editor.getModel(),new s.e(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),we,me.Ex.None,t)))}};Ce=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([ve(1,he.i),ve(2,te.v4),ve(3,_e.p)],Ce),(0,ae.Ic)(((e,t)=>{const i=e.getColor(se.url);i&&t.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${i}; }`);const n=e.getColor(se.sgC);n&&t.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${n}; }`)}));var xe=function(e,t){return function(i,n){t(i,n,e)}};let Se=class e{constructor(e,t,i,n,o){this._editor=e,this._instantiationService=t,this._openerService=i,this._languageService=n,this._toUnhook=new r.SL,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration((e=>{e.hasChanged(53)&&(this._unhookEvents(),this._hookEvents())}))}static get(t){return t.getContribution(e.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(53);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown((e=>this._onEditorMouseDown(e)))),this._toUnhook.add(this._editor.onMouseUp((e=>this._onEditorMouseUp(e)))),this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))):(this._toUnhook.add(this._editor.onMouseMove((e=>this._onEditorMouseMove(e)))),this._toUnhook.add(this._editor.onKeyDown((e=>this._onKeyDown(e))))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange((e=>this._onEditorScrollChanged(e))))}_unhookEvents(){this._toUnhook.clear()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target;9!==t.type||t.detail!==Z.ID?12===t.type&&t.detail===ne.ID||(12!==t.type&&(this._hoverClicked=!1),this._hideWidgets()):this._hoverClicked=!0}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,i,n,r,o;const s=e.target;if((!this._isMouseDown||!this._hoverClicked)&&(!this._isHoverSticky||9!==s.type||s.detail!==Z.ID)&&(!this._isHoverSticky||(null===(i=null===(t=e.event.browserEvent.view)||void 0===t?void 0:t.getSelection())||void 0===i?void 0:i.isCollapsed))&&(this._isHoverSticky||9!==s.type||s.detail!==Z.ID||!(null===(n=this._contentWidget)||void 0===n?void 0:n.isColorPickerVisible()))&&(!this._isHoverSticky||12!==s.type||s.detail!==ne.ID)){if(this._isHoverEnabled)return this._getOrCreateContentWidget().maybeShowAt(e)?void(null===(r=this._glyphWidget)||void 0===r||r.hide()):2===s.type&&s.position?(null===(o=this._contentWidget)||void 0===o||o.hide(),this._glyphWidget||(this._glyphWidget=new ne(this._editor,this._languageService,this._openerService)),void this._glyphWidget.startShowingAt(s.position.lineNumber)):void this._hideWidgets();this._hideWidgets()}}_onKeyDown(e){5!==e.keyCode&&6!==e.keyCode&&57!==e.keyCode&&4!==e.keyCode&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,null===(t=this._glyphWidget)||void 0===t||t.hide(),null===(i=this._contentWidget)||void 0===i||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(q,this._editor)),this._contentWidget}isColorPickerVisible(){var e;return(null===(e=this._contentWidget)||void 0===e?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),null===(e=this._glyphWidget)||void 0===e||e.dispose(),null===(t=this._contentWidget)||void 0===t||t.dispose()}};Se.ID="editor.contrib.hover",Se=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([xe(1,z.TG),xe(2,te.v4),xe(3,l.O),xe(4,V.i6)],Se);class ke extends o.R6{constructor(){super({id:"editor.action.showHover",label:oe.N({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:void 0,kbOpts:{kbExpr:a.u.editorTextFocus,primary:(0,n.gx)(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;let i=Se.get(t);if(!i)return;const n=t.getPosition(),r=new s.e(n.lineNumber,n.column,n.lineNumber,n.column),o=2===t.getOption(2);i.showContentHover(r,1,o)}}class Le extends o.R6{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:oe.N({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){const i=Se.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const r=new s.e(n.lineNumber,n.column,n.lineNumber,n.column),o=c.GotoDefinitionAtPositionEditorContribution.get(t);o&&o.startFindDefinitionFromCursor(n).then((()=>{i.showContentHover(r,1,!0)}))}}(0,o._K)(Se.ID,Se),(0,o.Qr)(ke),(0,o.Qr)(Le),W.Ae.register(le.D5),W.Ae.register(Ce),(0,ae.Ic)(((e,t)=>{const i=e.getColor(se.ptc);i&&t.addRule(`.monaco-editor .hoverHighlight { background-color: ${i}; }`);const n=e.getColor(se.yJx);n&&t.addRule(`.monaco-editor .monaco-hover { background-color: ${n}; }`);const r=e.getColor(se.CNo);r&&(t.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${r}; }`),t.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${r.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${r.transparent(.5)}; }`),t.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${r.transparent(.5)}; }`));const o=e.getColor(se.url);o&&t.addRule(`.monaco-editor .monaco-hover a { color: ${o}; }`);const s=e.getColor(se.sgC);s&&t.addRule(`.monaco-editor .monaco-hover a:hover { color: ${s}; }`);const a=e.getColor(se.Sbf);a&&t.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=e.getColor(se.LoV);l&&t.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const c=e.getColor(se.SwI);c&&t.addRule(`.monaco-editor .monaco-hover code { background-color: ${c}; }`)}))},6520:(e,t,i)=>{"use strict";i.d(t,{Ae:()=>o,Qj:()=>n,YM:()=>r});class n{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return 1===e.type&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return 1===e.type&&t.lineNumber===this.range.startLineNumber}}class r{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return 2===e.type&&this.owner===e.owner}canAdoptVisibleHover(e,t){return 2===e.type&&this.owner===e.owner}}const o=new class{constructor(){this._participants=[]}register(e){this._participants.push(e)}getAll(){return this._participants}}},2374:(e,t,i)=>{"use strict";i.d(t,{D5:()=>y,c:()=>w,hU:()=>b});var n=i(5321),r=i(9488),o=i(5393),s=i(9365),a=i(5976),l=i(498),c=i(187),h=i(4314),d=i(2042),u=i(1095),g=i(3580),f=i(3108),p=i(988),m=i(1922),_=function(e,t){return function(i,n){t(i,n,e)}};const v=n.$;class b{constructor(e,t,i,n){this.owner=e,this.range=t,this.contents=i,this.ordinal=n}isValidForHoverAnchor(e){return 1===e.type&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let y=class{constructor(e,t,i,n,r){this._editor=e,this._languageService=t,this._openerService=i,this._configurationService=n,this._languageFeaturesService=r,this.hoverOrdinal=2}createLoadingMessage(e){return new b(this,e.range,[(new s.W5).appendText(g.N("modesContentHover.loading","Loading..."))],2e3)}computeSync(e,t){if(!this._editor.hasModel()||1!==e.type)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,o=i.getLineMaxColumn(n),a=[];let l=1e3;const c=i.getLineLength(n),d=i.getLanguageIdAtPosition(e.range.startLineNumber,e.range.startColumn),u=this._configurationService.getValue("editor.maxTokenizationLineLength",{overrideIdentifier:d});"number"==typeof u&&c>=u&&a.push(new b(this,e.range,[{value:g.N("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}],l++));for(const i of t){const t=i.range.startLineNumber===n?i.range.startColumn:1,c=i.range.endLineNumber===n?i.range.endColumn:o,d=i.options.hoverMessage;if(!d||(0,s.CP)(d))continue;const u=new h.e(e.range.startLineNumber,t,e.range.startLineNumber,c);a.push(new b(this,u,(0,r._2)(d),l++))}return a}computeAsync(e,t,i){if(!this._editor.hasModel()||1!==e.type)return o.Aq.EMPTY;const n=this._editor.getModel();if(!this._languageFeaturesService.hoverProvider.has(n))return o.Aq.EMPTY;const r=new c.L(e.range.startLineNumber,e.range.startColumn);return(0,u.R8)(this._languageFeaturesService.hoverProvider,n,r,i).filter((e=>!(0,s.CP)(e.hover.contents))).map((t=>{const i=t.hover.range?h.e.lift(t.hover.range):e.range;return new b(this,i,t.hover.contents,t.ordinal)}))}renderHoverParts(e,t){return w(e,t,this._editor,this._languageService,this._openerService)}};function w(e,t,i,r,o){t.sort(((e,t)=>e.ordinal-t.ordinal));const c=new a.SL;for(const a of t)for(const t of a.contents){if((0,s.CP)(t))continue;const a=v("div.hover-row.markdown-hover"),h=n.R3(a,v("div.hover-contents")),d=c.add(new l.$({editor:i},r,o));c.add(d.onDidRenderAsync((()=>{h.className="hover-contents code-hover-contents",e.onContentsChanged()})));const u=c.add(d.render(t));h.appendChild(u.element),e.fragment.appendChild(a)}return c}y=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([_(1,d.O),_(2,p.v4),_(3,f.Ui),_(4,m.p)],y)},6353:(e,t,i)=>{"use strict";i.r(t);var n=i(5393),r=i(7301),o=i(6467),s=i(6830),a=i(4314),l=i(3860),c=i(9102),h=i(3084),d=i(4319),u=i(8625),g=i(3580),f=i(7781);class p{constructor(e,t,i){this._editRange=e,this._originalSelection=t,this._text=i}getEditOperations(e,t){t.addTrackedEditOperation(this._editRange,this._text)}computeCursorState(e,t){const i=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new l.Y(i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn),i.endLineNumber,Math.min(this._originalSelection.positionColumn,i.endColumn)):new l.Y(i.endLineNumber,i.endColumn-this._text.length,i.endLineNumber,i.endColumn)}}let m=class e{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(t){return t.getContribution(e.ID)}dispose(){}run(t,i){this.currentRequest&&this.currentRequest.cancel();const s=this.editor.getSelection(),c=this.editor.getModel();if(!c||!s)return;let h=s;if(h.startLineNumber!==h.endLineNumber)return;const d=new o.yy(this.editor,5),u=c.uri;return this.editorWorkerService.canNavigateValueSet(u)?(this.currentRequest=(0,n.PG)((e=>this.editorWorkerService.navigateValueSet(u,h,i))),this.currentRequest.then((i=>{if(!i||!i.range||!i.value)return;if(!d.validate(this.editor))return;let o=a.e.lift(i.range),s=i.range,c=i.value.length-(h.endColumn-h.startColumn);s={startLineNumber:s.startLineNumber,startColumn:s.startColumn,endLineNumber:s.endLineNumber,endColumn:s.startColumn+i.value.length},c>1&&(h=new l.Y(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn+c-1));const u=new p(o,h,i.value);this.editor.pushUndoStop(),this.editor.executeCommand(t,u),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:s,options:e.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=(0,n.Vs)(350),this.decorationRemover.then((()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[]))).catch(r.dL)})).catch(r.dL)):Promise.resolve(void 0)}};var _,v;m.ID="editor.contrib.inPlaceReplaceController",m.DECORATION=h.qx.register({description:"in-place-replace",className:"valueSetReplacement"}),m=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(_=1,v=d.p,function(e,t){v(e,t,_)})],m);class b extends s.R6{constructor(){super({id:"editor.action.inPlaceReplace.up",label:g.N("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:c.u.writable,kbOpts:{kbExpr:c.u.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=m.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class y extends s.R6{constructor(){super({id:"editor.action.inPlaceReplace.down",label:g.N("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:c.u.writable,kbOpts:{kbExpr:c.u.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=m.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}(0,s._K)(m.ID,m),(0,s.Qr)(b),(0,s.Qr)(y),(0,f.Ic)(((e,t)=>{const i=e.getColor(u.Dl);i&&t.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${i}; }`)}))},8279:(e,t,i)=>{"use strict";function n(e,t){let i=0;for(let n=0;nr,Y:()=>n})},4602:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AutoIndentOnPaste:()=>N,AutoIndentOnPasteCommand:()=>L,ChangeIndentationSizeAction:()=>y,DetectIndentation:()=>x,IndentUsingSpaces:()=>C,IndentUsingTabs:()=>w,IndentationToSpacesAction:()=>v,IndentationToSpacesCommand:()=>D,IndentationToTabsAction:()=>b,IndentationToTabsCommand:()=>A,ReindentLinesAction:()=>S,ReindentSelectedLinesAction:()=>k,getReindentEditOperations:()=>_});var n=i(5976),r=i(5924),o=i(6830),s=i(291),a=i(9386),l=i(4314),c=i(3860),h=i(9102),d=i(9381),u=i(3733),g=i(8279),f=i(3580),p=i(1157),m=i(3158);function _(e,t,i,n,o){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return[];const l=t.getLanguageConfiguration(e.getLanguageId()).indentationRules;if(!l)return[];for(n=Math.min(n,e.getLineCount());i<=n&&l.unIndentedLinePattern;){let t=e.getLineContent(i);if(!l.unIndentedLinePattern.test(t))break;i++}if(i>n-1)return[];const{tabSize:h,indentSize:d,insertSpaces:u}=e.getOptions(),g=(e,t)=>(t=t||1,s.U.shiftIndent(e,e.length+t,h,d,u)),f=(e,t)=>(t=t||1,s.U.unshiftIndent(e,e.length+t,h,d,u));let p,_=[],v=e.getLineContent(i),b=v;if(null!=o){p=o;let e=r.V8(v);b=p+v.substring(e.length),l.decreaseIndentPattern&&l.decreaseIndentPattern.test(b)&&(p=f(p),b=p+v.substring(e.length)),v!==b&&_.push(a.h.replaceMove(new c.Y(i,1,i,e.length+1),(0,m.x)(p,d,u)))}else p=r.V8(v);let y=p;l.increaseIndentPattern&&l.increaseIndentPattern.test(b)?(y=g(y),p=g(p)):l.indentNextLinePattern&&l.indentNextLinePattern.test(b)&&(y=g(y));for(let t=++i;t<=n;t++){let i=e.getLineContent(t),n=r.V8(i),o=y+i.substring(n.length);l.decreaseIndentPattern&&l.decreaseIndentPattern.test(o)&&(y=f(y),p=f(p)),n!==y&&_.push(a.h.replaceMove(new c.Y(t,1,t,n.length+1),(0,m.x)(y,d,u))),l.unIndentedLinePattern&&l.unIndentedLinePattern.test(i)||(l.increaseIndentPattern&&l.increaseIndentPattern.test(o)?(p=g(p),y=p):y=l.indentNextLinePattern&&l.indentNextLinePattern.test(o)?g(y):p)}return _}class v extends o.R6{constructor(){super({id:v.ID,label:f.N("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),r=t.getSelection();if(!r)return;const o=new D(r,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}v.ID="editor.action.indentationToSpaces";class b extends o.R6{constructor(){super({id:b.ID,label:f.N("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:h.u.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),r=t.getSelection();if(!r)return;const o=new A(r,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}b.ID="editor.action.indentationToTabs";class y extends o.R6{constructor(e,t){super(t),this.insertSpaces=e}run(e,t){const i=e.get(p.eJ),n=e.get(u.q);let r=t.getModel();if(!r)return;const o=n.getCreationOptions(r.getLanguageId(),r.uri,r.isForSimpleWidget),s=[1,2,3,4,5,6,7,8].map((e=>({id:e.toString(),label:e.toString(),description:e===o.tabSize?f.N("configuredTabSize","Configured Tab Size"):void 0}))),a=Math.min(r.getOptions().tabSize-1,7);setTimeout((()=>{i.pick(s,{placeHolder:f.N({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:s[a]}).then((e=>{e&&r&&!r.isDisposed()&&r.updateOptions({tabSize:parseInt(e.label,10),insertSpaces:this.insertSpaces})}))}),50)}}class w extends y{constructor(){super(!1,{id:w.ID,label:f.N("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}w.ID="editor.action.indentUsingTabs";class C extends y{constructor(){super(!0,{id:C.ID,label:f.N("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}C.ID="editor.action.indentUsingSpaces";class x extends o.R6{constructor(){super({id:x.ID,label:f.N("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(u.q);let n=t.getModel();if(!n)return;const r=i.getCreationOptions(n.getLanguageId(),n.uri,n.isForSimpleWidget);n.detectIndentation(r.insertSpaces,r.tabSize)}}x.ID="editor.action.detectIndentation";class S extends o.R6{constructor(){super({id:"editor.action.reindentlines",label:f.N("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:h.u.writable})}run(e,t){const i=e.get(d.c_);let n=t.getModel();if(!n)return;let r=_(n,i,1,n.getLineCount());r.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,r),t.pushUndoStop())}}class k extends o.R6{constructor(){super({id:"editor.action.reindentselectedlines",label:f.N("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:h.u.writable})}run(e,t){const i=e.get(d.c_);let n=t.getModel();if(!n)return;let r=t.getSelections();if(null===r)return;let o=[];for(let e of r){let t=e.startLineNumber,r=e.endLineNumber;if(t!==r&&1===e.endColumn&&r--,1===t){if(t===r)continue}else t--;let s=_(n,i,t,r);o.push(...s)}o.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop())}}class L{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let t of e)t.range&&"string"==typeof t.text&&this._edits.push(t)}getEditOperations(e,t){for(let e of this._edits)t.addEditOperation(l.e.lift(e.range),e.text);let i=!1;Array.isArray(this._edits)&&1===this._edits.length&&this._initialSelection.isEmpty()&&(this._edits[0].range.startColumn===this._initialSelection.endColumn&&this._edits[0].range.startLineNumber===this._initialSelection.endLineNumber?(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!0)):this._edits[0].range.endColumn===this._initialSelection.startColumn&&this._edits[0].range.endLineNumber===this._initialSelection.startLineNumber&&(i=!0,this._selectionId=t.trackSelection(this._initialSelection,!1))),i||(this._selectionId=t.trackSelection(this._initialSelection))}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class N{constructor(e){this.callOnDispose=new n.SL,this.callOnModel=new n.SL,this.editor=e,this.callOnDispose.add(e.onDidChangeConfiguration((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModel((()=>this.update()))),this.callOnDispose.add(e.onDidChangeModelLanguage((()=>this.update())))}update(){this.callOnModel.clear(),this.editor.getOption(9)<4||this.editor.getOption(48)||this.editor.hasModel()&&this.callOnModel.add(this.editor.onDidPaste((({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(null===t||t.length>1)return;const i=this.editor.getModel();if(!i)return;if(!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:o,indentSize:a,insertSpaces:c}=i.getOptions();let h=[],u={shiftIndent:e=>s.U.shiftIndent(e,e.length+1,o,a,c),unshiftIndent:e=>s.U.unshiftIndent(e,e.length+1,o,a,c)},f=e.startLineNumber;for(;f<=e.endLineNumber&&this.shouldIgnoreLine(i,f);)f++;if(f>e.endLineNumber)return;let p=i.getLineContent(f);if(!/\S/.test(p.substring(0,e.startColumn-1))){const e=d.zu.getGoodIndentForLine(n,i,i.getLanguageId(),f,u);if(null!==e){let t=r.V8(p),n=g.Y(e,o);if(n!==g.Y(t,o)){let e=g.J(n,o,c);h.push({range:new l.e(f,1,f,t.length+1),text:e}),p=e+p.substr(t.length)}else{let e=d.zu.getIndentMetadata(i,f);if(0===e||8===e)return}}}const m=f;for(;fi.getLineTokens(e),getLanguageId:()=>i.getLanguageId(),getLanguageIdAtPosition:(e,t)=>i.getLanguageIdAtPosition(e,t),getLineContent:e=>e===m?p:i.getLineContent(e)},s=d.zu.getGoodIndentForLine(n,t,i.getLanguageId(),f+1,u);if(null!==s){let t=g.Y(s,o),n=g.Y(r.V8(i.getLineContent(f+1)),o);if(t!==n){let s=t-n;for(let t=f+1;t<=e.endLineNumber;t++){let e=i.getLineContent(t),n=r.V8(e),a=g.Y(n,o)+s,d=g.J(a,o,c);d!==n&&h.push({range:new l.e(t,1,t,n.length+1),text:d})}}}}if(h.length>0){this.editor.pushUndoStop();let e=new L(h,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",e),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(0===i)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let e=n.findTokenIndexAtOffset(i);if(e>=0&&1===n.getStandardTokenType(e))return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}function E(e,t,i,n){if(1===e.getLineCount()&&1===e.getLineMaxColumn(1))return;let r="";for(let e=0;e{"use strict";i.r(t);var n=i(6830),r=i(6520),o=i(5393),s=i(1050),a=i(7301),l=i(5976),c=i(3702),h=i(8401),d=i(666),u=i(9994),g=i(4141),f=i(4314),p=i(6887),m=i(4973),_=i(3084),v=i(8191),b=i(1922),y=i(8216),w=i(2005),C=i(187),x=i(6663),S=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class k{constructor(e,t){this.range=e,this.direction=t}}class L{constructor(e,t,i){this.hint=e,this.anchor=t,this.provider=i,this._isResolved=!1}with(e){const t=new L(this.hint,e.anchor,this.provider);return t._isResolved=this._isResolved,t._currentResolve=this._currentResolve,t}resolve(e){return S(this,void 0,void 0,(function*(){if("function"==typeof this.provider.resolveInlayHint){if(this._currentResolve){if(yield this._currentResolve,e.isCancellationRequested)return;return this.resolve(e)}this._isResolved||(this._currentResolve=this._doResolve(e).finally((()=>this._currentResolve=void 0))),yield this._currentResolve}}))}_doResolve(e){var t,i;return S(this,void 0,void 0,(function*(){try{const n=yield Promise.resolve(this.provider.resolveInlayHint(this.hint,e));this.hint.tooltip=null!==(t=null==n?void 0:n.tooltip)&&void 0!==t?t:this.hint.tooltip,this.hint.label=null!==(i=null==n?void 0:n.label)&&void 0!==i?i:this.hint.label,this._isResolved=!0}catch(e){(0,a.Cp)(e),this._isResolved=!1}}))}}class N{constructor(e,t,i){this._disposables=new l.SL,this.ranges=e,this.provider=new Set;const n=[];for(const[e,r]of t){this._disposables.add(e),this.provider.add(r);for(const t of e.hints){let e=i.validatePosition(t.position),o="before";const s=N._getRangeAtPosition(i,e);let a;s.getStartPosition().isBefore(e)?(a=f.e.fromPositions(s.getStartPosition(),e),o="after"):(a=f.e.fromPositions(e,s.getEndPosition()),o="before"),n.push(new L(t,new k(a,o),r))}}this.items=n.sort(((e,t)=>C.L.compare(e.hint.position,t.hint.position)))}static create(e,t,i,n){return S(this,void 0,void 0,(function*(){const r=[],o=e.ordered(t).reverse().map((e=>i.map((i=>S(this,void 0,void 0,(function*(){try{const o=yield e.provideInlayHints(t,i,n);(null==o?void 0:o.hints.length)&&r.push([o,e])}catch(e){(0,a.Cp)(e)}}))))));if(yield Promise.all(o.flat()),n.isCancellationRequested||t.isDisposed())throw new a.FU;return new N(i,r,t)}))}dispose(){this._disposables.dispose()}static _getRangeAtPosition(e,t){const i=t.lineNumber,n=e.getWordAtPosition(t);if(n)return new f.e(i,n.startColumn,i,n.endColumn);e.tokenizeIfCheap(i);const r=e.getLineTokens(i),o=t.column-1,s=r.findTokenIndexAtOffset(o);let a=r.getStartOffset(s),l=r.getEndOffset(s);return l-a==1&&(a===o&&s>1?(a=r.getStartOffset(s-1),l=r.getEndOffset(s-1)):l===o&&s(0,I.vr)(e)?e.command.id:"")));for(const e of n.Uc.getEditorActions())e instanceof A.SymbolNavigationAction&&p.has(e.id)&&g.push(new D.aU(e.id,e.label,void 0,!0,(()=>B(this,void 0,void 0,(function*(){const i=yield a.createModelReference(u.uri);try{yield h.invokeFunction(e.run.bind(e),t,new A.SymbolNavigationAnchor(i.object.textEditorModel,f.e.getStartPosition(u.range)))}finally{i.dispose()}})))));if(r.part.command){const{command:e}=r.part;g.push(new D.Z0),g.push(new D.aU(e.id,e.title,void 0,!0,(()=>B(this,void 0,void 0,(function*(){var t;try{yield c.executeCommand(e.id,...null!==(t=e.arguments)&&void 0!==t?t:[])}catch(e){d.notify({severity:F.zb.Error,source:r.item.provider.displayName,message:e})}})))))}const m=t.getOption(115);l.showContextMenu({domForShadowRoot:m&&null!==(o=t.getDomNode())&&void 0!==o?o:void 0,getAnchor:()=>{const e=E.i(i);return{x:e.left,y:e.top+e.height+8}},getActions:()=>g,onHide:()=>{t.focus()},autoSelectFirstItem:!0})}))}function V(e,t,i,n){return B(this,void 0,void 0,(function*(){const r=e.get(y.S),o=yield r.createModelReference(n.uri);yield i.invokeWithinContext((e=>B(this,void 0,void 0,(function*(){const r=t.hasSideBySideModifier,s=e.get(O.i6),a=T.Jy.inPeekEditor.getValue(s),l=!r&&i.getOption(78)&&!a;return new A.DefinitionAction({openToSide:r,openInPeek:l,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(e,i,{model:o.object.textEditorModel,position:f.e.getStartPosition(n.range)})})))),o.dispose()}))}var z=i(5026),H=i(3910),j=i(7781),U=function(e,t){return function(i,n){t(i,n,e)}},$=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class K{constructor(){this._entries=new c.z6(50)}get(e){const t=K._key(e);return this._entries.get(t)}set(e,t){const i=K._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}const q=(0,P.yh)("IInlayHintsCache");(0,z.z)(q,K,!0);class G{constructor(e,t){this.item=e,this.index=t}get part(){const e=this.item.hint.label;return"string"==typeof e?{label:e}:e[this.index]}}class Y{constructor(e,t){this.part=e,this.hasTriggerModifier=t}}let Z=class e{constructor(e,t,i,n,r,o,s){this._editor=e,this._languageFeaturesService=t,this._inlayHintsCache=n,this._commandService=r,this._notificationService=o,this._instaService=s,this._disposables=new l.SL,this._sessionDisposables=new l.SL,this._decorationsMetadata=new Map,this._ruleFactory=new u.t7(this._editor),this._debounceInfo=i.for(t.inlayHintsProvider,"InlayHint",{min:25}),this._disposables.add(t.inlayHintsProvider.onDidChange((()=>this._update()))),this._disposables.add(e.onDidChangeModel((()=>this._update()))),this._disposables.add(e.onDidChangeModelLanguage((()=>this._update()))),this._disposables.add(e.onDidChangeConfiguration((e=>{e.hasChanged(127)&&this._update()}))),this._update()}static get(t){var i;return null!==(i=t.getContribution(e.ID))&&void 0!==i?i:void 0}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(127).enabled)return;const e=this._editor.getModel();if(!e||!this._languageFeaturesService.inlayHintsProvider.has(e))return;const t=this._inlayHintsCache.get(e);let i;t&&this._updateHintsDecorators([e.getFullModelRange()],t),this._sessionDisposables.add((0,l.OF)((()=>{e.isDisposed()||this._cacheHintsForFastRestore(e)})));let n=new Set;const r=new o.pY((()=>$(this,void 0,void 0,(function*(){const t=Date.now();null==i||i.dispose(!0),i=new s.A;const o=e.onWillDispose((()=>null==i?void 0:i.cancel()));try{const s=i.token,a=yield N.create(this._languageFeaturesService.inlayHintsProvider,e,this._getHintsRanges(),s);if(r.delay=this._debounceInfo.update(e,Date.now()-t),s.isCancellationRequested)return void a.dispose();for(const e of a.provider)"function"!=typeof e.onDidChangeInlayHints||n.has(e)||(n.add(e),this._sessionDisposables.add(e.onDidChangeInlayHints((()=>{r.isScheduled()||r.schedule()}))));this._sessionDisposables.add(a),this._updateHintsDecorators(a.ranges,a.items),this._cacheHintsForFastRestore(e)}catch(e){(0,a.dL)(e)}finally{i.dispose(),o.dispose()}}))),this._debounceInfo.get(e));this._sessionDisposables.add(r),this._sessionDisposables.add((0,l.OF)((()=>null==i?void 0:i.dispose(!0)))),r.schedule(0),this._sessionDisposables.add(this._editor.onDidScrollChange((e=>{!e.scrollTopChanged&&r.isScheduled()||r.schedule()}))),this._sessionDisposables.add(this._editor.onDidChangeModelContent((e=>{const t=Math.max(r.delay,1250);r.schedule(t)}))),this._sessionDisposables.add(this._installLinkGesture()),this._sessionDisposables.add(this._installDblClickGesture()),this._sessionDisposables.add(this._installContextMenu())}_installLinkGesture(){const e=new l.SL,t=e.add(new w.yN(this._editor)),i=new l.SL;return e.add(i),e.add(t.onMouseMoveOrRelevantKeyDown((e=>{const[t]=e,n=this._getInlayHintLabelPart(t),r=this._editor.getModel();if(!n||!r)return void i.clear();const o=new s.A;i.add((0,l.OF)((()=>o.dispose(!0)))),n.item.resolve(o.token),this._activeInlayHintPart=n.part.command||n.part.location?new Y(n,t.hasTriggerModifier):void 0;const a=n.item.hint.position.lineNumber,c=new f.e(a,1,a,r.getLineMaxColumn(a)),h=new Set;for(const e of this._decorationsMetadata.values())c.containsRange(e.item.anchor.range)&&h.add(e.item);this._updateHintsDecorators([c],Array.from(h)),i.add((0,l.OF)((()=>{this._activeInlayHintPart=void 0,this._updateHintsDecorators([c],Array.from(h))})))}))),e.add(t.onCancel((()=>i.clear()))),e.add(t.onExecute((e=>$(this,void 0,void 0,(function*(){const t=this._getInlayHintLabelPart(e);if(t){const i=t.part;i.location?this._instaService.invokeFunction(V,e,this._editor,i.location):p.mY.is(i.command)&&(yield this._invokeCommand(i.command,t.item))}}))))),e}_installDblClickGesture(){return this._editor.onMouseUp((e=>$(this,void 0,void 0,(function*(){if(2!==e.event.detail)return;const t=this._getInlayHintLabelPart(e);t&&(e.event.preventDefault(),yield t.item.resolve(s.T.None),t.item.hint.command&&(yield this._invokeCommand(t.item.hint.command,t.item)))}))))}_installContextMenu(){return this._editor.onContextMenu((e=>$(this,void 0,void 0,(function*(){if(!(e.event.target instanceof HTMLElement))return;const t=this._getInlayHintLabelPart(e);t&&(yield this._instaService.invokeFunction(W,this._editor,e.event.target,t))}))))}_getInlayHintLabelPart(e){var t;if(6!==e.target.type)return;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof _.HS&&(null==i?void 0:i.attachedData)instanceof G?i.attachedData:void 0}_invokeCommand(e,t){var i;return $(this,void 0,void 0,(function*(){try{yield this._commandService.executeCommand(e.id,...null!==(i=e.arguments)&&void 0!==i?i:[])}catch(e){this._notificationService.notify({severity:F.zb.Error,source:t.provider.displayName,message:e})}}))}_cacheHintsForFastRestore(e){const t=new Map;for(const[i,n]of this._decorationsMetadata){if(t.has(n.item))continue;let r=n.item;const o=e.getDecorationRange(i);if(o){const e=new k(o,n.item.anchor.direction);r=n.item.with({anchor:e})}t.set(n.item,r)}this._inlayHintsCache.set(e,Array.from(t.values()))}_getHintsRanges(){const e=this._editor.getModel(),t=this._editor.getVisibleRangesPlusViewportAboveBelow(),i=[];for(const n of t.sort(f.e.compareRangesUsingStarts)){const t=e.validateRange(new f.e(n.startLineNumber-30,n.startColumn,n.endLineNumber+30,n.endColumn));0!==i.length&&f.e.areIntersectingOrTouching(i[i.length-1],t)?i[i.length-1]=f.e.plusRange(i[i.length-1],t):i.push(t)}return i}_updateHintsDecorators(t,i){var n,r;const o=[],s=(e,t,i,n,r)=>{o.push({item:e,classNameRef:t,decoration:{range:e.anchor.range,options:{description:"InlayHint",showIfCollapsed:e.anchor.range.isEmpty(),collapseOnReplaceEdit:!e.anchor.range.isEmpty(),stickiness:0,[e.anchor.direction]:{content:i,inlineClassNameAffectsLetterSpacing:!0,inlineClassName:t.className,cursorStops:n,attachedData:r}}}})},a=(e,t)=>{const i=this._ruleFactory.createClassNameRef({width:(l/3|0)+"px",display:"inline-block"});s(e,i," ",t?m.RM.Right:m.RM.None)},{fontSize:l,fontFamily:c}=this._getLayoutInfo(),h="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(h,c);for(const t of i){t.hint.paddingLeft&&a(t,!1);const i="string"==typeof t.hint.label?[{label:t.hint.label}]:t.hint.label;for(let e=0;ee._MAX_DECORATORS)break}const d=[];for(const e of t)for(const{id:t}of null!==(r=this._editor.getDecorationsInRange(e))&&void 0!==r?r:[]){const e=this._decorationsMetadata.get(t);e&&(d.push(t),e.classNameRef.dispose(),this._decorationsMetadata.delete(t))}const u=this._editor.deltaDecorations(d,o.map((e=>e.decoration)));for(let e=0;et)&&(i=.9*t|0),{fontSize:i,fontFamily:e.fontFamily||this._editor.getOption(43)}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorationsMetadata.keys()),[]);for(let e of this._decorationsMetadata.values())e.classNameRef.dispose();this._decorationsMetadata.clear()}};Z.ID="editor.contrib.InlayHints",Z._MAX_DECORATORS=1500,Z=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([U(1,b.p),U(2,v.A),U(3,q),U(4,M.Hy),U(5,F.lT),U(6,P.TG)],Z),M.P0.registerCommand("_executeInlayHintProvider",((e,...t)=>$(void 0,void 0,void 0,(function*(){const[i,n]=t;(0,h.p_)(d.o.isUri(i)),(0,h.p_)(f.e.isIRange(n));const{inlayHintsProvider:r}=e.get(b.p),o=yield e.get(y.S).createModelReference(i);try{const e=yield N.create(r,o.object.textEditorModel,[f.e.lift(n)],s.T.None),t=e.items.map((e=>e.hint));return setTimeout((()=>e.dispose()),0),t}finally{o.dispose()}}))));var Q=i(9365),X=i(2042),J=i(1095),ee=i(2374),te=i(3108),ie=i(988),ne=i(3580),re=i(1432),oe=function(e,t){return function(i,n){t(i,n,e)}},se=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class ae extends r.YM{constructor(e,t){super(10,t,e.item.anchor.range),this.part=e}}let le=class extends ee.D5{constructor(e,t,i,n,r,o){super(e,t,i,n,o),this._resolverService=r,this.hoverOrdinal=6}suggestHoverAnchor(e){var t;if(!Z.get(this._editor))return null;if(6!==e.target.type)return null;const i=null===(t=e.target.detail.injectedText)||void 0===t?void 0:t.options;return i instanceof _.HS&&i.attachedData instanceof G?new ae(i.attachedData,this):null}computeSync(){return[]}computeAsync(e,t,i){return e instanceof ae?new o.Aq((t=>se(this,void 0,void 0,(function*(){var n,r;const{part:o}=e;if(yield o.item.resolve(i),i.isCancellationRequested)return;let s,a;if("string"==typeof o.item.hint.tooltip?s=(new Q.W5).appendText(o.item.hint.tooltip):o.item.hint.tooltip&&(s=o.item.hint.tooltip),s&&t.emitOne(new ee.hU(this,e.range,[s],0)),"string"==typeof o.part.tooltip?a=(new Q.W5).appendText(o.part.tooltip):o.part.tooltip&&(a=o.part.tooltip),a&&t.emitOne(new ee.hU(this,e.range,[a],1)),o.part.location||o.part.command){let i;const n="altKey"===this._editor.getOption(70)?re.dz?(0,ne.N)("links.navigate.kb.meta.mac","cmd + click"):(0,ne.N)("links.navigate.kb.meta","ctrl + click"):re.dz?(0,ne.N)("links.navigate.kb.alt.mac","option + click"):(0,ne.N)("links.navigate.kb.alt","alt + click");o.part.location&&o.part.command?i=(new Q.W5).appendText((0,ne.N)("hint.defAndCommand","Go to Definition ({0}), right click for more",n)):o.part.location?i=(new Q.W5).appendText((0,ne.N)("hint.def","Go to Definition ({0})",n)):o.part.command&&(i=new Q.W5(`[${(0,ne.N)("hint.cmd","Execute Command")}](${l=o.part.command,d.o.from({scheme:x.lg.command,path:l.id,query:l.arguments&&encodeURIComponent(JSON.stringify(l.arguments))}).toString()} "${o.part.command.title}") (${n})`,{isTrusted:!0})),i&&t.emitOne(new ee.hU(this,e.range,[i],1e4))}var l;const c=yield this._resolveInlayHintLabelPartHover(o,i);try{for(var h,u=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(i){t[i]=e[i]&&function(t){return new Promise((function(n,r){!function(e,t,i,n){Promise.resolve(n).then((function(t){e({value:t,done:i})}),t)}(n,r,(t=e[i](t)).done,t.value)}))}}}(c);!(h=yield u.next()).done;){let e=h.value;t.emitOne(e)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=u.return)&&(yield r.call(u))}finally{if(n)throw n.error}}})))):o.Aq.EMPTY}_resolveInlayHintLabelPartHover(e,t){return se(this,void 0,void 0,(function*(){if(!e.part.location)return o.Aq.EMPTY;const{uri:i,range:n}=e.part.location,r=yield this._resolverService.createModelReference(i);try{const i=r.object.textEditorModel;return this._languageFeaturesService.hoverProvider.has(i)?(0,J.R8)(this._languageFeaturesService.hoverProvider,i,new C.L(n.startLineNumber,n.startColumn),t).filter((e=>!(0,Q.CP)(e.hover.contents))).map((t=>new ee.hU(this,e.item.anchor.range,t.hover.contents,2+t.ordinal))):o.Aq.EMPTY}finally{r.dispose()}}))}};le=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([oe(1,X.O),oe(2,ie.v4),oe(3,te.Ui),oe(4,y.S),oe(5,b.p)],le),(0,n._K)(Z.ID,Z),r.Ae.register(le)},1580:(e,t,i)=>{"use strict";i.r(t);var n=i(6830),r=i(6520),o=i(4669),s=i(5976),a=i(5924),l=i(7988),c=i(9102);const h="editor.action.inlineSuggest.commit";var d=i(187),u=i(6887),g=i(5393),f=i(1050),p=i(7301),m=i(9317),_=i(9386),v=i(4314);class b{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(0===this.parts.length)return"";const t=this.parts[this.parts.length-1];return function(e,t){const i=new y(e),n=t.map((e=>{const t=v.e.lift(e.range);return{startOffset:i.getOffset(t.getStartPosition()),endOffset:i.getOffset(t.getEndPosition()),text:e.text}}));n.sort(((e,t)=>t.startOffset-e.startOffset));for(const t of n)e=e.substring(0,t.startOffset)+t.text+e.substring(t.endOffset);return e}(e.substr(0,t.column-1),this.parts.map((e=>({range:{startLineNumber:1,endLineNumber:1,startColumn:e.column,endColumn:e.column},text:e.lines.join("\n")})))).substring(this.parts[0].column-1)}}class y{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t{e.hasChanged(106)&&void 0===this._expanded&&this.onDidChangeEmitter.fire()})))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}var x=i(4565),S=i(2484);function k(e,t,i,n,r=0){if(e.range.startLineNumber!==e.range.endLineNumber)return;const o=t.getLineContent(e.range.startLineNumber),s=a.V8(o).length;if(e.range.startColumn-1<=s){const t=a.V8(e.text).length,i=o.substring(e.range.startColumn-1,s),n=v.e.fromPositions(e.range.getStartPosition().delta(0,i.length),e.range.getEndPosition()),r=e.text.startsWith(i)?e.text.substring(i.length):e.text.substring(t);e={range:n,text:r,command:e.command}}const l=t.getValueInRange(e.range),c=function(e,t){if((null==L?void 0:L.originalValue)===e&&(null==L?void 0:L.newValue)===t)return null==L?void 0:L.changes;{const i=function(e,t){if(e.length>5e3||t.length>5e3)return;function i(e){let t=0;for(let i=0,n=e.length;it&&(t=n)}return t}const n=Math.max(i(e),i(t));function r(e){if(e<0)throw new Error("unexpected");return n+e+1}function o(e){let t=0,i=0;const n=new Int32Array(e.length);for(let o=0,s=e.length;os},{getElements:()=>a}).ComputeDiff(!1).changes}(e,t);return L={originalValue:e,newValue:t,changes:i},i}}(l,e.text);if(!c)return;const h=e.range.startLineNumber,d=new Array;if("prefix"===i){const e=c.filter((e=>0===e.originalLength));if(e.length>1||1===e.length&&e[0].originalStart!==l.length)return}const u=e.text.length-r;for(const t of c){const r=e.range.startColumn+t.originalStart+t.originalLength;if("subwordSmart"===i&&n&&n.lineNumber===e.range.startLineNumber&&r0)return;if(0===t.modifiedLength)continue;const o=t.modifiedStart+t.modifiedLength,s=Math.max(t.modifiedStart,Math.min(o,u)),l=e.text.substring(t.modifiedStart,s),c=e.text.substring(s,Math.max(t.modifiedStart,o));if(l.length>0){const e=a.uq(l);d.push(new w(r,e,!1))}if(c.length>0){const e=a.uq(c);d.push(new w(r,e,!0))}}return new b(h,d,0)}let L;var N=i(9381),E=i(5382),D=i(5035),A=i(3883),T=i(1761),I=i(6735);class M{constructor(e){this.lines=e}getLineCount(){return this.lines.length}getLineLength(e){return this.lines[e-1].getLineContent().length}getLineTokens(e){return this.lines[e-1]}}var O=i(1922),R=i(8191),P=function(e,t){return function(i,n){t(i,n,e)}},F=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let B=class extends s.JT{constructor(e,t,i,n,r,a){super(),this.editor=e,this.cache=t,this.commandService=i,this.languageConfigurationService=n,this.languageFeaturesService=r,this.debounceService=a,this.onDidChangeEmitter=new o.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new s.XK),this.active=!1,this.disposed=!1,this.debounceValue=this.debounceService.for(this.languageFeaturesService.inlineCompletionsProvider,"InlineCompletionsDebounce",{min:50,max:200}),this._register(i.onDidExecuteCommand((t=>{new Set([m.CoreEditingCommands.Tab.id,m.CoreEditingCommands.DeleteLeft.id,m.CoreEditingCommands.DeleteRight.id,h,"acceptSelectedSuggestion"]).has(t.commandId)&&e.hasTextFocus()&&this.handleUserInput()}))),this._register(this.editor.onDidType((e=>{this.handleUserInput()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.session&&!this.session.isValid&&this.hide()}))),this._register((0,s.OF)((()=>{this.disposed=!0}))),this._register(this.editor.onDidBlurEditorWidget((()=>{this.hide()})))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout((()=>{this.disposed||this.startSessionIfTriggered()}),0)}get session(){return this.completionSession.value}get ghostText(){var e;return null===(e=this.session)||void 0===e?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;null===(t=this.session)||void 0===t||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&(null===(t=this.session)||void 0===t||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){this.editor.getOption(55).enabled&&(this.session&&this.session.isValid||this.trigger(u.bw.Automatic))}trigger(e){this.completionSession.value?e===u.bw.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext():(this.completionSession.value=new W(this.editor,this.editor.getPosition(),(()=>this.active),this.commandService,this.cache,e,this.languageConfigurationService,this.languageFeaturesService.inlineCompletionsProvider,this.debounceValue),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange((()=>{this.onDidChangeEmitter.fire()}))))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;null===(e=this.session)||void 0===e||e.commitCurrentCompletion()}showNext(){var e;null===(e=this.session)||void 0===e||e.showNextInlineCompletion()}showPrevious(){var e;null===(e=this.session)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return F(this,void 0,void 0,(function*(){const t=yield null===(e=this.session)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};B=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([P(2,x.Hy),P(3,N.c_),P(4,O.p),P(5,R.A)],B);class W extends C{constructor(e,t,i,n,r,o,a,l,c){let h;super(e),this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=r,this.initialTriggerKind=o,this.languageConfigurationService=a,this.registry=l,this.debounce=c,this.minReservedLineCount=0,this.updateOperation=this._register(new s.XK),this.updateSoon=this._register(new g.pY((()=>{let e=this.initialTriggerKind;return this.initialTriggerKind=u.bw.Automatic,this.update(e)}),50)),this.currentlySelectedCompletionId=void 0,this._register(this.onDidChange((()=>{const e=this.currentCompletion;if(e&&e.sourceInlineCompletion!==h){h=e.sourceInlineCompletion;const t=e.sourceProvider;t.handleItemDidShow&&t.handleItemDidShow(e.sourceInlineCompletions,h)}}))),this._register((0,s.OF)((()=>{this.cache.clear()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.cache.value&&this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeModelContent((e=>{this.scheduleAutomaticUpdate()}))),this._register(this.registry.onDidChange((()=>{this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}))),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value)return 0;if(0===this.cache.value.completions.length)return 0;const e=this.cache.value.completions.findIndex((e=>e.semanticId===this.currentlySelectedCompletionId));return-1===e?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return F(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}showPreviousInlineCompletion(){var e;return F(this,void 0,void 0,(function*(){yield this.ensureUpdateWithExplicitContext();const t=(null===(e=this.cache.value)||void 0===e?void 0:e.completions)||[];if(t.length>0){const e=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[e].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()}))}ensureUpdateWithExplicitContext(){var e;return F(this,void 0,void 0,(function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===u.bw.Explicit?yield this.updateOperation.value.promise:yield this.update(u.bw.Explicit):(null===(e=this.cache.value)||void 0===e?void 0:e.triggerKind)!==u.bw.Explicit&&(yield this.update(u.bw.Explicit))}))}hasMultipleInlineCompletions(){var e;return F(this,void 0,void 0,(function*(){return yield this.ensureUpdateWithExplicitContext(),((null===(e=this.cache.value)||void 0===e?void 0:e.completions.length)||0)>1}))}get ghostText(){const e=this.currentCompletion,t=this.editor.getOptions().get(55).mode;return e?k(e,this.editor.getModel(),t,this.editor.getPosition()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule(this.debounce.get(this.editor.getModel()))}update(e){return F(this,void 0,void 0,(function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=new Date,n=(0,g.PG)((n=>F(this,void 0,void 0,(function*(){let r;try{r=yield j(this.registry,t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},n,this.languageConfigurationService);const o=new Date;this.debounce.update(this.editor.getModel(),o.getTime()-i.getTime())}catch(e){return void(0,p.dL)(e)}n.isCancellationRequested||(this.cache.setValue(this.editor,r,e),this.onDidChangeEmitter.fire())})))),r=new V(n,e);this.updateOperation.value=r,yield n,this.updateOperation.value===r&&this.updateOperation.clear()}))}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[_.h.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally((()=>{null==t||t.dispose()})).then(void 0,p.Cp):null==t||t.dispose(),this.onDidChangeEmitter.fire()}}class V{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class z extends s.JT{constructor(e,t,i,n){super(),this.triggerKind=n;const r=e.deltaDecorations([],t.items.map((e=>({range:e.range,options:{description:"inline-completion-tracking-range"}}))));this._register((0,s.OF)((()=>{e.deltaDecorations(r,[])}))),this.completions=t.items.map(((e,t)=>new H(e,r[t]))),this._register(e.onDidChangeModelContent((()=>{let t=!1;const n=e.getModel();for(const e of this.completions){const i=n.getDecorationRange(e.decorationId);i?e.synchronizedRange.equalsRange(i)||(t=!0,e.synchronizedRange=i):(0,p.dL)(new Error("Decoration has no range"))}t&&i()}))),this._register(t)}}class H{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function j(e,t,i,n,r=f.T.None,o){return F(this,void 0,void 0,(function*(){const s=function(e,t){const i=t.getWordAtPosition(e),n=t.getLineMaxColumn(e.lineNumber);return i?new v.e(e.lineNumber,i.startColumn,e.lineNumber,n):v.e.fromPositions(e,e.with(void 0,n))}(t,i),a=e.all(i),l=yield Promise.all(a.map((e=>F(this,void 0,void 0,(function*(){const o=yield Promise.resolve(e.provideInlineCompletions(i,t,n,r)).catch(p.Cp);return{completions:o,provider:e,dispose:()=>{o&&e.freeInlineCompletions(o)}}}))))),c=new Map;for(const e of l){const t=e.completions;if(t)for(const n of t.items){const r=n.range?v.e.lift(n.range):s;if(r.startLineNumber!==r.endLineNumber)continue;const a=o&&n.completeBracketPairs?U(n.text,r.getStartPosition(),i,o):n.text,l={text:a,range:r,command:n.command,sourceProvider:e.provider,sourceInlineCompletions:t,sourceInlineCompletion:n};c.set(JSON.stringify({text:a,range:n.range}),l)}}return{items:[...c.values()],dispose:()=>{for(const e of l)e.dispose()}}}))}function U(e,t,i,n){const r=i.getLineContent(t.lineNumber).substring(0,t.column-1)+e,o=i.tokenizeLineWithEdit(t,r.length-(t.column-1),e),s=null==o?void 0:o.sliceAndInflate(t.column-1,r.length,0);if(!s)return e;console.log(s);const a=function(e,t){const i=new T.FE,n=new E.Z(i,(e=>t.getLanguageConfiguration(e))),r=new I.xH(new M([e]),n),o=(0,A.w)(r,[],void 0,!0);let s="";const a=e.getLineContent();return function e(t,i){if(2===t.kind)if(e(t.openingBracket,i),i=(0,D.Ii)(i,t.openingBracket.length),t.child&&(e(t.child,i),i=(0,D.Ii)(i,t.child.length)),t.closingBracket)e(t.closingBracket,i),i=(0,D.Ii)(i,t.closingBracket.length);else{const e=n.getSingleLanguageBracketTokens(t.openingBracket.languageId).findClosingTokenText(t.openingBracket.bracketIds);s+=e}else if(3===t.kind);else if(0===t.kind||1===t.kind)s+=a.substring((0,D.F_)(i),(0,D.F_)((0,D.Ii)(i,t.length)));else if(4===t.kind)for(const n of t.children)e(n,i),i=(0,D.Ii)(i,n.length)}(o,D.xl),s}(s,n);return a}function $(e,t){if(!t)return t;const i=e.getValueInRange(t.range),n=(0,a.Mh)(i,t.text),r=e.getOffsetAt(t.range.getStartPosition())+n,o=e.getPositionAt(r),s=i.substr(n),l=(0,a.P1)(s,t.text),c=e.getPositionAt(Math.max(r,e.getOffsetAt(t.range.getEndPosition())-l));return{range:v.e.fromPositions(o,c),text:t.text.substr(n,t.text.length-n-l)}}var K=i(9488),q=i(5084),G=i(4070),Y=i(7016);class Z extends s.JT{constructor(e,t){super(),this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentSuggestItemInfo=void 0,this.onDidChangeEmitter=new o.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new g.pY((()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())}),100)),this._register(e.onKeyDown((e=>{e.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))}))),this._register(e.onKeyUp((e=>{e.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))})));const i=Y.SuggestController.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(e,t,n)=>{const r=this.editor.getModel(),o=$(r,this.suggestControllerPreselector());if(!o)return-1;const s=d.L.lift(t),a=n.map(((e,t)=>{const n=Q(i,s,e,this.isShiftKeyPressed),a=$(r,null==n?void 0:n.normalizedInlineCompletion);var l,c;if(a)return{index:t,valid:(l=o.range,(c=a.range).startLineNumber===l.startLineNumber&&c.startColumn===l.startColumn&&(c.endLineNumbere&&e.valid)),l=(0,K.Dc)(a,(0,K.tT)((e=>e.prefixLength),K.fv));return l?l.index:-1}}));let e=!1;const t=()=>{e||(e=!0,this._register(i.widget.value.onDidShow((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))),this._register(i.widget.value.onDidHide((()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)}))),this._register(i.widget.value.onDidFocus((()=>{this.isSuggestWidgetVisible=!0,this.update(!0)}))))};this._register(o.ju.once(i.model.onDidTrigger)((e=>{t()})))}this.update(this._isActive)}get state(){if(this._isActive)return{selectedItem:this._currentSuggestItemInfo}}update(e){const t=this.getSuggestItemInfo();let i=!1;var n,r;(n=this._currentSuggestItemInfo)===(r=t)||!(!n||!r)&&n.completionItemKind===r.completionItemKind&&n.isSnippetText===r.isSnippetText&&function(e,t){return e===t||!(!e||!t)&&e.range.equalsRange(t.range)&&e.text===t.text&&e.command===t.command}(n.normalizedInlineCompletion,r.normalizedInlineCompletion)||(this._currentSuggestItemInfo=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getSuggestItemInfo(){const e=Y.SuggestController.get(this.editor);if(!e)return;if(!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();return t?Q(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed):void 0}stopForceRenderingAbove(){const e=Y.SuggestController.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=Y.SuggestController.get(this.editor);e&&e.forceRenderingAbove()}}function Q(e,t,i,n){if(Array.isArray(i.completion.additionalTextEdits)&&i.completion.additionalTextEdits.length>0)return{completionItemKind:i.completion.kind,isSnippetText:!1,normalizedInlineCompletion:{range:v.e.fromPositions(t,t),text:""}};let{insertText:r}=i.completion,o=!1;if(4&i.completion.insertTextRules){const i=(new q.Yj).parse(r),n=e.editor.getModel();if(i.children.length>100)return;G.l.adjustWhitespace(n,t,i,!0,!0),r=i.toString(),o=!0}const s=e.getOverwriteInfo(i,n);return{isSnippetText:o,completionItemKind:i.completion.kind,normalizedInlineCompletion:{text:r,range:v.e.fromPositions(t.delta(0,-s.overwriteBefore),t.delta(0,Math.max(s.overwriteAfter,0)))}}}var X=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let J=class extends C{constructor(e,t,i){super(e),this.cache=t,this.languageFeaturesService=i,this.suggestionInlineCompletionSource=this._register(new Z(this.editor,(()=>{var e,t;return null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()}))),this.updateOperation=this._register(new s.XK),this.updateCacheSoon=this._register(new g.pY((()=>this.updateCache()),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange((()=>{this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const e=this.ghostText;e&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,e.parts.map((e=>e.lines.length-1)).reduce(((e,t)=>e+t),0))),this.minReservedLineCount>=1?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()}))),this._register(this.cache.onDidChange((()=>{this.onDidChangeEmitter.fire()}))),this._register(this.editor.onDidChangeCursorPosition((e=>{this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire()}))),this._register((0,s.OF)((()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove())))}get isActive(){return void 0!==this.suggestionInlineCompletionSource.state}isSuggestionPreviewEnabled(){return this.editor.getOption(106).preview}updateCache(){return X(this,void 0,void 0,(function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItem)return;const t={text:e.selectedItem.normalizedInlineCompletion.text,range:e.selectedItem.normalizedInlineCompletion.range,isSnippetText:e.selectedItem.isSnippetText,completionKind:e.selectedItem.completionItemKind},i=this.editor.getPosition(),n=(0,g.PG)((e=>X(this,void 0,void 0,(function*(){let n;try{n=yield j(this.languageFeaturesService.inlineCompletionsProvider,i,this.editor.getModel(),{triggerKind:u.bw.Automatic,selectedSuggestionInfo:t},e)}catch(e){return void(0,p.dL)(e)}e.isCancellationRequested||(this.cache.setValue(this.editor,n,u.bw.Automatic),this.onDidChangeEmitter.fire())})))),r=new V(n,u.bw.Automatic);this.updateOperation.value=r,yield n,this.updateOperation.value===r&&this.updateOperation.clear()}))}get ghostText(){var e,t,i;const n=this.isSuggestionPreviewEnabled(),r=$(this.editor.getModel(),null===(t=null===(e=this.cache.value)||void 0===e?void 0:e.completions[0])||void 0===t?void 0:t.toLiveInlineCompletion()),o=this.suggestionInlineCompletionSource.state,s=$(this.editor.getModel(),null===(i=null==o?void 0:o.selectedItem)||void 0===i?void 0:i.normalizedInlineCompletion),a=r&&s&&r.text.startsWith(s.text)&&r.range.equalsRange(s.range);if(!n&&!a)return;const l=a?r:s||r,c=a?l.text.length-s.text.length:0;return this.toGhostText(l,c)}toGhostText(e,t){const i=this.editor.getOptions().get(106).previewMode;return e?k(e,this.editor.getModel(),i,this.editor.getPosition(),t)||new b(e.range.endLineNumber,[],this.minReservedLineCount):void 0}};var ee,te;J=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([(ee=2,te=O.p,function(e,t){te(e,t,ee)})],J);var ie=i(2065);class ne extends s.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new o.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new s.XK)}get targetModel(){var e;return null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object}setTargetModel(e){var t,i,n;(null===(t=this.currentModelRef.value)||void 0===t?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?(i=e,n=e.onDidChange((()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})),{object:i,dispose:()=>null==n?void 0:n.dispose()}):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=null===(t=null===(e=this.currentModelRef.value)||void 0===e?void 0:e.object)||void 0===t?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;null===(t=this.targetModel)||void 0===t||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let re=class extends ne{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.sharedCache=this._register(new oe),this.suggestWidgetAdapterModel=this._register(this.instantiationService.createInstance(J,this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(this.instantiationService.createInstance(B,this.editor,this.sharedCache)),this._register(this.suggestWidgetAdapterModel.onDidChange((()=>{this.updateModel()}))),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=null===(t=this.activeInlineCompletionsModel)||void 0===t?void 0:t.ghostText;return!!i&&i.parts.some((t=>e.containsPosition(new d.L(i.lineNumber,t.column))))}triggerInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.trigger(u.bw.Explicit)}commitInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.hide()}showNextInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showNext()}showPreviousInlineCompletion(){var e;null===(e=this.activeInlineCompletionsModel)||void 0===e||e.showPrevious()}hasMultipleInlineCompletions(){var e,t,i,n,r;return t=this,i=void 0,r=function*(){const t=yield null===(e=this.activeInlineCompletionsModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t},new((n=void 0)||(n=Promise))((function(e,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(t){var i;t.done?e(t.value):(i=t.value,i instanceof n?i:new n((function(e){e(i)}))).then(s,a)}l((r=r.apply(t,i||[])).next())}))}};re=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([function(e,t){return function(i,n){t(i,n,e)}}(1,ie.TG)],re);class oe extends s.JT{constructor(){super(...arguments),this.onDidChangeEmitter=new o.Q5,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new s.XK)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new z(e,t,(()=>this.onDidChangeEmitter.fire()),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var se=i(5321),ae=i(3379),le=i.n(ae),ce=i(7795),he=i.n(ce),de=i(569),ue=i.n(de),ge=i(3565),fe=i.n(ge),pe=i(9216),me=i.n(pe),_e=i(4589),ve=i.n(_e),be=i(3305),ye={};ye.styleTagTransform=ve(),ye.setAttributes=fe(),ye.insert=ue().bind(null,"head"),ye.domAPI=he(),ye.insertStyleElement=me(),le()(be.Z,ye),be.Z&&be.Z.locals&&be.Z.locals;var we,Ce=i(2136),xe=i(4141),Se=i(7378),ke=i(72),Le=i(2042),Ne=i(8625),Ee=i(2550),De=i(7736),Ae=i(7781),Te=function(e,t){return function(i,n){t(i,n,e)}};const Ie=null===(we=window.trustedTypes)||void 0===we?void 0:we.createPolicy("editorGhostText",{createHTML:e=>e});let Me=class extends s.JT{constructor(e,t,i,n){super(),this.editor=e,this.model=t,this.instantiationService=i,this.languageService=n,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(Oe,this.editor)),this.additionalLinesWidget=this._register(new Re(this.editor,this.languageService.languageIdCodec)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration((e=>{(e.hasChanged(29)||e.hasChanged(105)||e.hasChanged(88)||e.hasChanged(83)||e.hasChanged(45)||e.hasChanged(44)||e.hasChanged(59))&&this.update()}))),this._register((0,s.OF)((()=>{var e;this.disposed=!0,this.update(),null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0}))),this._register(t.onDidChange((()=>{this.update()}))),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed)return this.partsWidget.clear(),void this.additionalLinesWidget.clear();const i=new Array,n=new Array;function r(e,t){if(n.length>0){const i=n[n.length-1];t&&i.decorations.push(new Ee.Kp(i.content.length+1,i.content.length+1+e[0].length,t,0)),i.content+=e[0],e=e.slice(1)}for(const i of e)n.push({content:i,decorations:t?[new Ee.Kp(1,i.length+1,t,0)]:[]})}const o=this.editor.getModel().getLineContent(t.lineNumber);let s;this.editor.getModel().getLineTokens(t.lineNumber);let a=0;for(const e of t.parts){let t=e.lines;void 0===s?(i.push({column:e.column,text:t[0],preview:e.preview}),t=t.slice(1)):r([o.substring(a,e.column-1)],void 0),t.length>0&&(r(t,"ghost-text"),void 0===s&&e.column<=o.length&&(s=e.column)),a=e.column-1}void 0!==s&&r([o.substring(a)],void 0),this.partsWidget.setParts(t.lineNumber,i,void 0!==s?{column:s,length:o.length+1-s}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),t.parts.some((e=>e.lines.length<0))?this.viewMoreContentWidget=this.renderViewMoreLines(new d.L(t.lineNumber,this.editor.getModel().getLineMaxColumn(t.lineNumber)),"",0):(null===(e=this.viewMoreContentWidget)||void 0===e||e.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(e,t,i){const n=this.editor.getOption(44),r=document.createElement("div");r.className="suggest-preview-additional-widget",(0,Ce.N)(r,n);const o=document.createElement("span");o.className="content-spacer",o.append(t),r.append(o);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("⏎ "),r.append(a);const l=new s.SL,c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines…`),l.add(se.mu(c,"mousedown",(e=>{var t;null===(t=this.model)||void 0===t||t.setExpanded(!0),e.preventDefault(),this.editor.focus()}))),r.append(c),new Pe(this.editor,e,r,l)}};Me=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([Te(2,ie.TG),Te(3,Le.O)],Me);class Oe{constructor(e){this.editor=e,this.decorationIds=[],this.disposableStore=new s.SL}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(e,t,i){if(this.disposableStore.clear(),!this.editor.getModel())return;const n=new Array;i&&n.push({range:v.e.fromPositions(new d.L(e,i.column),new d.L(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}}),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,t.map((t=>({range:v.e.fromPositions(new d.L(e,t.column)),options:{description:"ghost-text",after:{content:t.text,inlineClassName:t.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}}))).concat(n))}}class Re{constructor(e,t){this.editor=e,this.languageIdCodec=t,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}dispose(){this.clear()}clear(){this.editor.changeViewZones((e=>{this._viewZoneId&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0)}))}updateLines(e,t,i){const n=this.editor.getModel();if(!n)return;const{tabSize:r}=n.getOptions();this.editor.changeViewZones((n=>{this._viewZoneId&&(n.removeZone(this._viewZoneId),this._viewZoneId=void 0);const o=Math.max(t.length,i);if(o>0){const i=document.createElement("div");!function(e,t,i,n,r){const o=n.get(29),s=n.get(105),l=n.get(83),c=n.get(45),h=n.get(44),d=n.get(59),u=(0,ke.l$)(1e4);u.appendASCIIString('
');for(let e=0,n=i.length;e');const f=a.$i(g),p=a.Ut(g),m=Se.A.createEmpty(g,r);(0,De.d1)(new De.IJ(h.isMonospace&&!o,h.canUseHalfwidthRightwardsArrow,g,!1,f,p,0,m,n.decorations,t,0,h.spaceWidth,h.middotWidth,h.wsmiddotWidth,s,"none",l,c!==xe.n0.OFF,null),u),u.appendASCIIString("
")}u.appendASCIIString(""),(0,Ce.N)(e,h);const g=u.build(),f=Ie?Ie.createHTML(g):g;e.innerHTML=f}(i,r,t,this.editor.getOptions(),this.languageIdCodec),this._viewZoneId=n.addZone({afterLineNumber:e,heightInLines:o,domNode:i,afterColumnAffinity:1})}}))}}class Pe extends s.JT{constructor(e,t,i,n){super(),this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register((0,s.OF)((()=>{this.editor.removeContentWidget(this)}))),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}(0,Ae.Ic)(((e,t)=>{const i=e.getColor(Ne.N5);i&&(t.addRule(`.monaco-editor .ghost-text-decoration { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${i.toString()} !important; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { color: ${i.toString()} !important; }`));const n=e.getColor(Ne.IO);n&&(t.addRule(`.monaco-editor .ghost-text-decoration { background-color: ${n.toString()}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { background-color: ${n.toString()}; }`),t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { background-color: ${n.toString()}; }`));const r=e.getColor(Ne.x3);r&&(t.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 1px solid ${r}; }`),t.addRule(`.monaco-editor .ghost-text-decoration { border: 1px solid ${r}; }`),t.addRule(`.monaco-editor .ghost-text-decoration-preview { border: 1px solid ${r}; }`))}));var Fe=i(3580),Be=i(8819),We=i(9989),Ve=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s},ze=function(e,t){return function(i,n){t(i,n,e)}},He=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};let je=class e extends s.JT{constructor(e,t){super(),this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new s.XK),this.activeModelDidChangeEmitter=this._register(new o.Q5),this._register(this.editor.onDidChangeModel((()=>{this.updateModelController()}))),this._register(this.editor.onDidChangeConfiguration((e=>{e.hasChanged(106)&&this.updateModelController(),e.hasChanged(55)&&this.updateModelController()}))),this.updateModelController()}static get(t){return t.getContribution(e.ID)}get activeModel(){var e;return null===(e=this.activeController.value)||void 0===e?void 0:e.model}updateModelController(){const e=this.editor.getOption(106),t=this.editor.getOption(55);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance($e,this.editor):void 0,this.activeModelDidChangeEmitter.fire()}shouldShowHoverAt(e){var t;return(null===(t=this.activeModel)||void 0===t?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return(null===(i=null===(t=this.activeController.value)||void 0===t?void 0:t.widget)||void 0===i?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),null===(e=this.activeModel)||void 0===e||e.triggerInlineCompletion()}commit(){var e;null===(e=this.activeModel)||void 0===e||e.commitInlineCompletion()}hide(){var e;null===(e=this.activeModel)||void 0===e||e.hideInlineCompletion()}showNextInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;null===(e=this.activeModel)||void 0===e||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return He(this,void 0,void 0,(function*(){const t=yield null===(e=this.activeModel)||void 0===e?void 0:e.hasMultipleInlineCompletions();return void 0!==t&&t}))}};je.inlineSuggestionVisible=new Be.uy("inlineSuggestionVisible",!1,Fe.N("inlineSuggestionVisible","Whether an inline suggestion is visible")),je.inlineSuggestionHasIndentation=new Be.uy("inlineSuggestionHasIndentation",!1,Fe.N("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace")),je.inlineSuggestionHasIndentationLessThanTabSize=new Be.uy("inlineSuggestionHasIndentationLessThanTabSize",!0,Fe.N("inlineSuggestionHasIndentationLessThanTabSize","Whether the inline suggestion starts with whitespace that is less than what would be inserted by tab")),je.ID="editor.contrib.ghostTextController",je=Ve([ze(1,ie.TG)],je);class Ue{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=je.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=je.inlineSuggestionHasIndentation.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentationLessThanTabSize=je.inlineSuggestionHasIndentationLessThanTabSize.bindTo(this.contextKeyService)}}let $e=class extends s.JT{constructor(e,t,i){super(),this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new Ue(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(re,this.editor)),this.widget=this._register(this.instantiationService.createInstance(Me,this.editor,this.model)),this._register((0,s.OF)((()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1),this.contextKeys.inlineCompletionSuggestsIndentationLessThanTabSize.set(!0)}))),this._register(this.model.onDidChange((()=>{this.updateContextKeys()}))),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(void 0!==(null===(e=this.model.activeInlineCompletionsModel)||void 0===e?void 0:e.ghostText));let t=!1,i=!0;const n=this.model.inlineCompletionsModel.ghostText;if(this.model.activeInlineCompletionsModel&&n&&n.parts.length>0){const{column:e,lines:r}=n.parts[0],o=r[0];if(e<=this.editor.getModel().getLineIndentColumn(n.lineNumber)){let e=(0,a.LC)(o);-1===e&&(e=o.length-1),t=e>0;const n=this.editor.getModel().getOptions().tabSize;i=l.i.visibleColumnFromColumn(o,e+1,n)=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let rt=class{constructor(e,t,i,n,r,o,s){this._editor=e,this._commandService=t,this._menuService=i,this._contextKeyService=n,this._languageService=r,this._openerService=o,this.accessibilityService=s,this.hoverOrdinal=3}suggestHoverAnchor(e){const t=je.get(this._editor);if(!t)return null;const i=e.target;if(8===i.type){const e=i.detail;if(t.shouldShowHoverAtViewZone(e.viewZoneId))return new r.YM(1e3,this,v.e.fromPositions(e.positionBefore||e.position,e.positionBefore||e.position))}return 7===i.type&&t.shouldShowHoverAt(i.range)||6===i.type&&i.detail.mightBeForeignElement&&t.shouldShowHoverAt(i.range)?new r.YM(1e3,this,i.range):null}computeSync(e,t){const i=je.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new nt(this,e.range,i)]:[]}renderHoverParts(e,t){const i=new s.SL,n=t[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(e,n,i);const r=i.add(this._menuService.createMenu(et.eH.InlineCompletionsActions,this._contextKeyService)),o=e.statusBar.addAction({label:Fe.N("showNextInlineSuggestion","Next"),commandId:Ge.ID,run:()=>this._commandService.executeCommand(Ge.ID)}),a=e.statusBar.addAction({label:Fe.N("showPreviousInlineSuggestion","Previous"),commandId:Ye.ID,run:()=>this._commandService.executeCommand(Ye.ID)});e.statusBar.addAction({label:Fe.N("acceptInlineSuggestion","Accept"),commandId:qe.id,run:()=>this._commandService.executeCommand(qe.id)});const l=[o,a];for(const e of l)e.setEnabled(!1);n.hasMultipleSuggestions().then((e=>{for(const t of l)t.setEnabled(e)}));for(const[t,i]of r.getActions())for(const t of i)t instanceof et.U8&&e.statusBar.addAction({label:t.label,commandId:t.item.id,run:()=>this._commandService.executeCommand(t.item.id)});return i}renderScreenReaderText(e,t,i){var n,r;const o=se.$,s=o("div.hover-row.markdown-hover"),a=se.R3(s,o("div.hover-contents")),l=i.add(new Xe.$({editor:this._editor},this._languageService,this._openerService)),c=null===(r=null===(n=t.controller.activeModel)||void 0===n?void 0:n.inlineCompletionsModel)||void 0===r?void 0:r.ghostText;if(c){const t=this._editor.getModel().getLineContent(c.lineNumber);(t=>{i.add(l.onDidRenderAsync((()=>{a.className="hover-contents code-hover-contents",e.onContentsChanged()})));const n=Fe.N("inlineSuggestionFollows","Suggestion:"),r=i.add(l.render((new Qe.W5).appendText(n).appendCodeblock("text",t)));a.replaceChildren(r.element)})(c.renderForScreenReader(t))}e.fragment.appendChild(s)}};rt=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([it(1,x.Hy),it(2,et.co),it(3,Be.i6),it(4,Le.O),it(5,tt.v4),it(6,Je.F)],rt),(0,n._K)(je.ID,je),(0,n.Qr)(Ze),(0,n.Qr)(Ge),(0,n.Qr)(Ye),r.Ae.register(rt)},1660:(e,t,i)=>{"use strict";i.r(t),i.d(t,{ExpandLineSelectionAction:()=>a});var n=i(6830),r=i(8108),o=i(9102),s=i(3580);class a extends n.R6{constructor(){super({id:"expandLineSelection",label:s.N("expandLineSelection","Expand Line Selection"),alias:"Expand Line Selection",precondition:void 0,kbOpts:{weight:0,kbExpr:o.u.textInputFocus,primary:2090}})}run(e,t,i){if(i=i||{},!t.hasModel())return;const n=t._getViewModel();n.model.pushStackElement(),n.setCursorStates(i.source,3,r.P.expandLineSelection(n,n.getCursorStates())),n.revealPrimaryCursor(i.source,!0)}}(0,n.Qr)(a)},5766:(e,t,i)=>{"use strict";i.r(t),i.d(t,{AbstractCaseAction:()=>j,AbstractDeleteAllToBoundaryAction:()=>B,AbstractSortLinesAction:()=>E,DeleteAllLeftAction:()=>W,DeleteAllRightAction:()=>V,DeleteDuplicateLinesAction:()=>T,DeleteLinesAction:()=>M,DuplicateSelectionAction:()=>L,IndentLinesAction:()=>O,InsertLineAfterAction:()=>F,InsertLineBeforeAction:()=>P,JoinLinesAction:()=>z,LowerCaseAction:()=>$,SnakeCaseAction:()=>G,SortLinesAscendingAction:()=>D,SortLinesDescendingAction:()=>A,TitleCaseAction:()=>q,TransposeAction:()=>H,TrimTrailingWhitespaceAction:()=>I,UpperCaseAction:()=>U});var n=i(2258),r=i(9317),o=i(6830),s=i(1329),a=i(5924),l=i(9386),c=i(4314);class h{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){const i=function(e,t){t.sort(((e,t)=>e.lineNumber===t.lineNumber?e.column-t.column:e.lineNumber-t.lineNumber));for(let e=t.length-2;e>=0;e--)t[e].lineNumber===t[e+1].lineNumber&&t.splice(e,1);const i=[];let n=0,r=0;const o=t.length;for(let s=1,h=e.getLineCount();s<=h;s++){const h=e.getLineContent(s),d=h.length+1;let u=0;if(re.getLineTokens(t),getLanguageId:()=>e.getLanguageId(),getLanguageIdAtPosition:(t,i)=>e.getLanguageIdAtPosition(t,i),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&1===e.getLineMaxColumn(n.startLineNumber)){let i=n.startLineNumber,r=this._isMovingDown?i+1:i-1;1===e.getLineMaxColumn(r)?t.addEditOperation(new c.e(1,1,1,1),null):(t.addEditOperation(new c.e(i,1,i,1),e.getLineContent(r)),t.addEditOperation(new c.e(r,1,r,e.getLineMaxColumn(r)),null)),n=new g.Y(r,1,r,1)}else{let i,o;if(this._isMovingDown){i=n.endLineNumber+1,o=e.getLineContent(i),t.addEditOperation(new c.e(i-1,e.getLineMaxColumn(i-1),i,e.getLineMaxColumn(i)),null);let d=o;if(this.shouldAutoIndent(e,n)){let u=this.matchEnterRule(e,l,r,i,n.startLineNumber-1);if(null!==u){let t=a.V8(e.getLineContent(i)),n=u+b.Y(t,r),l=b.J(n,r,s);d=l+this.trimLeft(o)}else{h.getLineContent=t=>t===n.startLineNumber?e.getLineContent(i):e.getLineContent(t);let t=v.zu.getGoodIndentForLine(this._autoIndent,h,e.getLanguageIdAtPosition(i,1),n.startLineNumber,l);if(null!==t){let n=a.V8(e.getLineContent(i)),l=b.Y(t,r);if(l!==b.Y(n,r)){let e=b.J(l,r,s);d=e+this.trimLeft(o)}}}t.addEditOperation(new c.e(n.startLineNumber,1,n.startLineNumber,1),d+"\n");let g=this.matchEnterRuleMovingDown(e,l,r,n.startLineNumber,i,d);if(null!==g)0!==g&&this.getIndentEditsOfMovingBlock(e,t,n,r,s,g);else{h.getLineContent=t=>t===n.startLineNumber?d:t>=n.startLineNumber+1&&t<=n.endLineNumber+1?e.getLineContent(t-1):e.getLineContent(t);let o=v.zu.getGoodIndentForLine(this._autoIndent,h,e.getLanguageIdAtPosition(i,1),n.startLineNumber+1,l);if(null!==o){const i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(o,r),c=b.Y(i,r);if(l!==c){const i=l-c;this.getIndentEditsOfMovingBlock(e,t,n,r,s,i)}}}}else t.addEditOperation(new c.e(n.startLineNumber,1,n.startLineNumber,1),d+"\n")}else if(i=n.startLineNumber-1,o=e.getLineContent(i),t.addEditOperation(new c.e(i,1,i+1,1),null),t.addEditOperation(new c.e(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),"\n"+o),this.shouldAutoIndent(e,n)){h.getLineContent=t=>t===i?e.getLineContent(n.startLineNumber):e.getLineContent(t);let o=this.matchEnterRule(e,l,r,n.startLineNumber,n.startLineNumber-2);if(null!==o)0!==o&&this.getIndentEditsOfMovingBlock(e,t,n,r,s,o);else{let o=v.zu.getGoodIndentForLine(this._autoIndent,h,e.getLanguageIdAtPosition(n.startLineNumber,1),i,l);if(null!==o){let i=a.V8(e.getLineContent(n.startLineNumber)),l=b.Y(o,r),c=b.Y(i,r);if(l!==c){let i=l-c;this.getIndentEditsOfMovingBlock(e,t,n,r,s,i)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>m.U.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>m.U.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,r){if(r){let o=r.indentation;r.indentAction===_.wU.None||r.indentAction===_.wU.Indent?o=r.indentation+r.appendText:r.indentAction===_.wU.IndentOutdent?o=r.indentation:r.indentAction===_.wU.Outdent&&(o=t.unshiftIndent(r.indentation)+r.appendText);let s=e.getLineContent(n);if(this.trimLeft(s).indexOf(this.trimLeft(o))>=0){let r=a.V8(e.getLineContent(n)),s=a.V8(o),l=v.zu.getIndentMetadata(e,n);return null!==l&&2&l&&(s=t.unshiftIndent(s)),b.Y(s,i)-b.Y(r,i)}}return null}matchEnterRuleMovingDown(e,t,i,n,r,o){if(a.ow(o)>=0){let o=e.getLineMaxColumn(r),s=v.zu.getEnterAction(this._autoIndent,e,new c.e(r,o,r,o));return this.parseEnterResult(e,t,i,n,s)}{let r=n-1;for(;r>=1;){let t=e.getLineContent(r);if(a.ow(t)>=0)break;r--}if(r<1||n>e.getLineCount())return null;let o=e.getLineMaxColumn(r),s=v.zu.getEnterAction(this._autoIndent,e,new c.e(r,o,r,o));return this.parseEnterResult(e,t,i,n,s)}}matchEnterRule(e,t,i,n,r,o){let s=r;for(;s>=1;){let t;if(t=s===r&&void 0!==o?o:e.getLineContent(s),a.ow(t)>=0)break;s--}if(s<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(s),h=v.zu.getEnterAction(this._autoIndent,e,new c.e(s,l,s,l));return this.parseEnterResult(e,t,i,n,h)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4)return!1;if(!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1);return i===e.getLanguageIdAtPosition(t.endLineNumber,1)&&null!==v.zu.getIndentRulesSupport(i)}getIndentEditsOfMovingBlock(e,t,i,n,r,o){for(let s=i.startLineNumber;s<=i.endLineNumber;s++){let l=e.getLineContent(s),h=a.V8(l),d=b.Y(h,n)+o,u=b.J(d,n,r);u!==h&&(t.addEditOperation(new c.e(s,1,s,h.length+1),u),s===i.endLineNumber&&i.endColumn<=h.length+1&&""===u&&(this._moveEndLineSelectionShrink=!0))}}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),this._moveEndLineSelectionShrink&&i.startLineNumber=r)return null;let o=[];for(let t=n;t<=r;t++)o.push(e.getLineContent(t));let s=o.slice(0);return s.sort(w.getCollator().compare),!0===i&&(s=s.reverse()),{startLineNumber:n,endLineNumber:r,before:o,after:s}}w._COLLATOR=null;var x=i(3580),S=i(4144);class k extends o.R6{constructor(e,t){super(t),this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map(((e,t)=>({selection:e,index:t,ignore:!1})));i.sort(((e,t)=>c.e.compareRangesUsingStarts(e.selection,t.selection)));let n=i[0];for(let e=1;enew u.L(e.positionLineNumber,e.positionColumn))));let r=t.getSelection();if(null===r)return;let o=new h(r,n);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}I.ID="editor.action.trimTrailingWhitespace";class M extends o.R6{constructor(){super({id:"editor.action.deleteLines",label:x.N("lines.delete","Delete Line"),alias:"Delete Line",precondition:f.u.writable,kbOpts:{kbExpr:f.u.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(1===n.getLineCount()&&1===n.getLineMaxColumn(1))return;let r=0,o=[],s=[];for(let e=0,t=i.length;e1&&(a-=1,h=n.getLineMaxColumn(a)),o.push(l.h.replace(new g.Y(a,h,c,d),"")),s.push(new g.Y(a-r,t.positionColumn,a-r,t.positionColumn)),r+=t.endLineNumber-t.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,s),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map((e=>{let t=e.endLineNumber;return e.startLineNumbere.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber));let i=[],n=t[0];for(let e=1;e=t[e].startLineNumber?n.endLineNumber=t[e].endLineNumber:(i.push(n),n=t[e]);return i.push(n),i}}class O extends o.R6{constructor(){super({id:"editor.action.indentLines",label:x.N("lines.indent","Indent Line"),alias:"Indent Line",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class R extends o.R6{constructor(){super({id:"editor.action.outdentLines",label:x.N("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:2135,weight:100}})}run(e,t){r.CoreEditingCommands.Outdent.runEditorCommand(e,t,null)}}class P extends o.R6{constructor(){super({id:"editor.action.insertLineBefore",label:x.N("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class F extends o.R6{constructor(){super({id:"editor.action.insertLineAfter",label:x.N("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();i&&(t.pushUndoStop(),t.executeCommands(this.id,d.u.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class B extends o.R6{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),r=[];for(let e=0,t=n.length-1;el.h.replace(e,"")));t.pushUndoStop(),t.executeEdits(this.id,s,o),t.pushUndoStop()}}class W extends B{constructor(){super({id:"deleteAllLeft",label:x.N("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:f.u.writable,kbOpts:{kbExpr:f.u.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],r=0;return t.forEach((t=>{let o;if(1===t.endColumn&&r>0){let e=t.startLineNumber-r;o=new g.Y(e,t.startColumn,e,t.startColumn)}else o=new g.Y(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn);r+=t.endLineNumber-t.startLineNumber,t.intersectRanges(e)?i=o:n.push(o)})),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(null===t)return[];let i=t,n=e.getModel();return null===n?[]:(i.sort(c.e.compareRangesUsingStarts),i=i.map((e=>{if(e.isEmpty()){if(1===e.startColumn){let t=Math.max(1,e.startLineNumber-1),i=1===e.startLineNumber?1:n.getLineContent(t).length+1;return new c.e(t,i,e.startLineNumber,1)}return new c.e(e.startLineNumber,1,e.startLineNumber,e.startColumn)}return new c.e(e.startLineNumber,1,e.endLineNumber,e.endColumn)})),i)}}class V extends B{constructor(){super({id:"deleteAllRight",label:x.N("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:f.u.writable,kbOpts:{kbExpr:f.u.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let r=0,o=t.length,s=0;r{if(e.isEmpty()){const i=t.getLineMaxColumn(e.startLineNumber);return e.startColumn===i?new c.e(e.startLineNumber,e.startColumn,e.startLineNumber+1,1):new c.e(e.startLineNumber,e.startColumn,e.startLineNumber,i)}return e}));return n.sort(c.e.compareRangesUsingStarts),n}}class z extends o.R6{constructor(){super({id:"editor.action.joinLines",label:x.N("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getSelection();if(null===n)return;i.sort(c.e.compareRangesUsingStarts);let r=[],o=i.reduce(((e,t)=>e.isEmpty()?e.endLineNumber===t.startLineNumber?(n.equalsSelection(e)&&(n=t),t):t.startLineNumber>e.endLineNumber+1?(r.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn):t.startLineNumber>e.endLineNumber?(r.push(e),t):new g.Y(e.startLineNumber,e.startColumn,t.endLineNumber,t.endColumn)));r.push(o);let s=t.getModel();if(null===s)return;let a=[],h=[],d=n,u=0;for(let e=0,t=r.length;e=1){let e=!0;""===v&&(e=!1),!e||" "!==v.charAt(v.length-1)&&"\t"!==v.charAt(v.length-1)||(e=!1,v=v.replace(/[\s\uFEFF\xA0]+$/g," "));let n=t.substr(i-1);v+=(e?" ":"")+n,m=e?n.length+1:n.length}else m=0}let b=new c.e(f,p,t,i);if(!b.isEmpty()){let e;o.isEmpty()?(a.push(l.h.replace(b,v)),e=new g.Y(b.startLineNumber-u,v.length-m+1,f-u,v.length-m+1)):o.startLineNumber===o.endLineNumber?(a.push(l.h.replace(b,v)),e=new g.Y(o.startLineNumber-u,o.startColumn,o.endLineNumber-u,o.endColumn)):(a.push(l.h.replace(b,v)),e=new g.Y(o.startLineNumber-u,o.startColumn,o.startLineNumber-u,v.length-_)),null!==c.e.intersectRanges(b,n)?d=e:h.push(e)}u+=b.endLineNumber-b.startLineNumber}h.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,a,h),t.pushUndoStop()}}class H extends o.R6{constructor(){super({id:"editor.action.transpose",label:x.N("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:f.u.writable})}run(e,t){let i=t.getSelections();if(null===i)return;let n=t.getModel();if(null===n)return;let r=[];for(let e=0,t=i.length;e=a){if(o.lineNumber===n.getLineCount())continue;let e=new c.e(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t=n.getValueInRange(e).split("").reverse().join("");r.push(new s.T4(new g.Y(o.lineNumber,Math.max(1,o.column-1),o.lineNumber+1,1),t))}else{let e=new c.e(o.lineNumber,Math.max(1,o.column-1),o.lineNumber,o.column+1),t=n.getValueInRange(e).split("").reverse().join("");r.push(new s.hP(e,t,new g.Y(o.lineNumber,o.column+1,o.lineNumber,o.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,r),t.pushUndoStop()}}class j extends o.R6{run(e,t){const i=t.getSelections();if(null===i)return;const n=t.getModel();if(null===n)return;const r=t.getOption(117),o=[];for(const e of i)if(e.isEmpty()){const i=e.getStartPosition(),s=t.getConfiguredWordAtPosition(i);if(!s)continue;const a=new c.e(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn),h=n.getValueInRange(a);o.push(l.h.replace(a,this._modifyText(h,r)))}else{const t=n.getValueInRange(e);o.push(l.h.replace(e,this._modifyText(t,r)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class U extends j{constructor(){super({id:"editor.action.transformToUppercase",label:x.N("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:f.u.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class $ extends j{constructor(){super({id:"editor.action.transformToLowercase",label:x.N("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:f.u.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class K{constructor(e,t){this._pattern=e,this._flags=t,this._actual=null,this._evaluated=!1}get(){if(!this._evaluated){this._evaluated=!0;try{this._actual=new RegExp(this._pattern,this._flags)}catch(e){}}return this._actual}isSupported(){return null!==this.get()}}class q extends j{constructor(){super({id:"editor.action.transformToTitlecase",label:x.N("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:f.u.writable})}_modifyText(e,t){const i=q.titleBoundary.get();return i?e.toLocaleLowerCase().replace(i,(e=>e.toLocaleUpperCase())):e}}q.titleBoundary=new K("(^|[^\\p{L}\\p{N}']|((^|\\P{L})'))\\p{L}","gmu");class G extends j{constructor(){super({id:"editor.action.transformToSnakecase",label:x.N("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:f.u.writable})}_modifyText(e,t){const i=G.caseBoundary.get(),n=G.singleLetters.get();return i&&n?e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase():e}}G.caseBoundary=new K("(\\p{Ll})(\\p{Lu})","gmu"),G.singleLetters=new K("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu"),(0,o.Qr)(class extends k{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:x.N("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:x.N({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}),(0,o.Qr)(class extends k{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:x.N("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:x.N({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}),(0,o.Qr)(L),(0,o.Qr)(class extends N{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:x.N("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:x.N({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}),(0,o.Qr)(class extends N{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:x.N("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:f.u.writable,kbOpts:{kbExpr:f.u.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:S.eH.MenubarSelectionMenu,group:"2_line",title:x.N({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}),(0,o.Qr)(D),(0,o.Qr)(A),(0,o.Qr)(T),(0,o.Qr)(I),(0,o.Qr)(M),(0,o.Qr)(O),(0,o.Qr)(R),(0,o.Qr)(P),(0,o.Qr)(F),(0,o.Qr)(W),(0,o.Qr)(V),(0,o.Qr)(z),(0,o.Qr)(H),(0,o.Qr)(U),(0,o.Qr)($),G.caseBoundary.isSupported()&&G.singleLetters.isSupported()&&(0,o.Qr)(G),q.titleBoundary.isSupported()&&(0,o.Qr)(q)},76:(e,t,i)=>{"use strict";i.r(t),i.d(t,{CONTEXT_ONTYPE_RENAME_INPUT_VISIBLE:()=>E,LinkedEditingAction:()=>T,LinkedEditingContribution:()=>A,editorLinkedEditingBackground:()=>O});var n=i(9488),r=i(5393),o=i(1050),s=i(1264),a=i(7301),l=i(4669),c=i(5976),h=i(5924),d=i(666),u=i(6830),g=i(1640),f=i(187),p=i(4314),m=i(9102),_=i(3084),v=i(9381),b=i(3580),y=i(8819),w=i(3910),C=i(7781),x=i(1922),S=i(8191),k=i(4013),L=function(e,t){return function(i,n){t(i,n,e)}},N=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const E=new y.uy("LinkedEditingInputVisible",!1),D="linked-editing-decoration";let A=class e extends c.JT{constructor(e,t,i,n,r){super(),this.languageConfigurationService=n,this._localToDispose=this._register(new c.SL),this._editor=e,this._providers=i.linkedEditingRangeProvider,this._enabled=!1,this._visibleContextKey=E.bindTo(t),this._debounceInformation=r.for(this._providers,"Linked Editing",{min:200}),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new c.SL),this._rangeUpdateTriggerPromise=null,this._rangeSyncTriggerPromise=null,this._currentRequest=null,this._currentRequestPosition=null,this._currentRequestModelVersion=null,this._register(this._editor.onDidChangeModel((()=>this.reinitialize(!0)))),this._register(this._editor.onDidChangeConfiguration((e=>{(e.hasChanged(62)||e.hasChanged(82))&&this.reinitialize(!1)}))),this._register(this._providers.onDidChange((()=>this.reinitialize(!1)))),this._register(this._editor.onDidChangeModelLanguage((()=>this.reinitialize(!0)))),this.reinitialize(!0)}static get(t){return t.getContribution(e.ID)}reinitialize(e){const t=this._editor.getModel(),i=null!==t&&(this._editor.getOption(62)||this._editor.getOption(82))&&this._providers.has(t);if(i===this._enabled&&!e)return;if(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||null===t)return;this._localToDispose.add(l.ju.runAndSubscribe(t.onDidChangeLanguageConfiguration,(()=>{this._languageWordPattern=this.languageConfigurationService.getLanguageConfiguration(t.getLanguageId()).getWordDefinition()})));const n=new r.vp(this._debounceInformation.get(t)),o=()=>{var e;this._rangeUpdateTriggerPromise=n.trigger((()=>this.updateRanges()),null!==(e=this._debounceDuration)&&void 0!==e?e:this._debounceInformation.get(t))},s=new r.vp(0),a=e=>{this._rangeSyncTriggerPromise=s.trigger((()=>this._syncRanges(e)))};this._localToDispose.add(this._editor.onDidChangeCursorPosition((()=>{o()}))),this._localToDispose.add(this._editor.onDidChangeModelContent((e=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const i=t.getDecorationRange(this._currentDecorations[0]);if(i&&e.changes.every((e=>i.intersectRanges(e.range))))return void a(this._currentDecorations)}o()}))),this._localToDispose.add({dispose:()=>{n.dispose(),s.dispose()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||0===e.length)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const e=n.match(this._currentWordPattern);if((e?e[0].length:0)!==n.length)return this.clearRanges()}let r=[];for(let i=1,o=e.length;i1)return void this.clearRanges();const n=this._editor.getModel(),o=n.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===o){if(i.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const e=n.getDecorationRange(this._currentDecorations[0]);if(e&&e.containsPosition(i))return}}this._currentRequestPosition=i,this._currentRequestModelVersion=o;const s=(0,r.PG)((t=>N(this,void 0,void 0,(function*(){try{const r=new k.G(!1),a=yield M(this._providers,n,i,t);if(this._debounceInformation.update(n,r.elapsed()),s!==this._currentRequest)return;if(this._currentRequest=null,o!==n.getVersionId())return;let l=[];(null==a?void 0:a.ranges)&&(l=a.ranges),this._currentWordPattern=(null==a?void 0:a.wordPattern)||this._languageWordPattern;let c=!1;for(let e=0,t=l.length;e({range:t,options:e.DECORATION})));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,h)}catch(e){(0,a.n2)(e)||(0,a.dL)(e),this._currentRequest!==s&&this._currentRequest||this.clearRanges()}}))));return this._currentRequest=s,s}))}};A.ID="editor.contrib.linkedEditing",A.DECORATION=_.qx.register({description:"linked-editing",stickiness:0,className:D}),A=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([L(1,y.i6),L(2,x.p),L(3,v.c_),L(4,S.A)],A);class T extends u.R6{constructor(){super({id:"editor.action.linkedEditing",label:b.N("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:y.Ao.and(m.u.writable,m.u.hasRenameProvider),kbOpts:{kbExpr:m.u.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(g.$),[n,r]=Array.isArray(t)&&t||[void 0,void 0];return d.o.isUri(n)&&f.L.isIPosition(r)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then((e=>{e&&(e.setPosition(r),e.invokeWithinContext((t=>(this.reportTelemetry(t,e),this.run(t,e)))))}),a.dL):super.runCommand(e,t)}run(e,t){const i=A.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const I=u._l.bindToContribution(A.get);function M(e,t,i,o){const s=e.ordered(t);return(0,r.Ps)(s.map((e=>()=>N(this,void 0,void 0,(function*(){try{return yield e.provideLinkedEditingRanges(t,i,o)}catch(e){return void(0,a.Cp)(e)}})))),(e=>!!e&&n.Of(null==e?void 0:e.ranges)))}(0,u.fK)(new I({id:"cancelLinkedEditingInput",precondition:E,handler:e=>e.clearRanges(),kbOpts:{kbExpr:m.u.editorTextFocus,weight:199,primary:9,secondary:[1033]}}));const O=(0,w.P6G)("editor.linkedEditingBackground",{dark:s.Il.fromHex("#f00").transparent(.3),light:s.Il.fromHex("#f00").transparent(.3),hc:s.Il.fromHex("#f00").transparent(.3)},b.N("editorLinkedEditingBackground","Background color when the editor auto renames on type."));(0,C.Ic)(((e,t)=>{const i=e.getColor(O);i&&t.addRule(`.monaco-editor .${D} { background: ${i}; border-left-color: ${i}; }`)})),(0,u.sb)("_executeLinkedEditingProvider",((e,t,i)=>{const{linkedEditingRangeProvider:n}=e.get(x.p);return M(n,t,i,o.T.None)})),(0,u._K)(A.ID,A),(0,u.Qr)(T)},6471:(e,t,i)=>{"use strict";i.r(t),i.d(t,{LinkDetector:()=>q});var n=i(5393),r=i(1050),o=i(7301),s=i(9365),a=i(5976),l=i(6663),c=i(1432),h=i(5935),d=i(4013),u=i(666),g=i(3379),f=i.n(g),p=i(7795),m=i.n(p),_=i(569),v=i.n(_),b=i(3565),y=i.n(b),w=i(9216),C=i.n(w),x=i(4589),S=i.n(x),k=i(5706),L={};L.styleTagTransform=S(),L.setAttributes=y(),L.insert=v().bind(null,"head"),L.domAPI=m(),L.insertStyleElement=C(),f()(k.Z,L),k.Z&&k.Z.locals&&k.Z.locals;var N=i(6830),E=i(3084),D=i(8191),A=i(1922),T=i(2005),I=i(9488),M=i(8401),O=i(4314),R=i(3733),P=i(4565),F=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class B{constructor(e,t){this._link=e,this._provider=t}toJSON(){return{range:this.range,url:this.url,tooltip:this.tooltip}}get range(){return this._link.range}get url(){return this._link.url}get tooltip(){return this._link.tooltip}resolve(e){return F(this,void 0,void 0,(function*(){return this._link.url?this._link.url:"function"==typeof this._provider.resolveLink?Promise.resolve(this._provider.resolveLink(this._link,e)).then((t=>(this._link=t||this._link,this._link.url?this.resolve(e):Promise.reject(new Error("missing"))))):Promise.reject(new Error("missing"))}))}}class W{constructor(e){this._disposables=new a.SL;let t=[];for(const[i,n]of e){const e=i.links.map((e=>new B(e,n)));t=W._union(t,e),(0,a.Wf)(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i,n,r,o,s=[];for(i=0,r=0,n=e.length,o=t.length;iPromise.resolve(e.provideLinks(t,i)).then((t=>{t&&(n[r]=[t,e])}),o.Cp)));return Promise.all(r).then((()=>{const e=new W((0,I.kX)(n));return i.isCancellationRequested?(e.dispose(),new W([])):e}))}P.P0.registerCommand("_executeLinkProvider",((e,...t)=>F(void 0,void 0,void 0,(function*(){let[i,n]=t;(0,M.p_)(i instanceof u.o),"number"!=typeof n&&(n=0);const{linkProvider:o}=e.get(A.p),s=e.get(R.q).getModel(i);if(!s)return[];const a=yield V(o,s,r.T.None);if(!a)return[];for(let e=0;ethis.computeLinksNow()),1e3)),this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null;const s=this._register(new T.yN(e));this._register(s.onMouseMoveOrRelevantKeyDown((([e,t])=>{this._onEditorMouseMove(e,t)}))),this._register(s.onExecute((e=>{this.onEditorMouseUp(e)}))),this._register(s.onCancel((e=>{this.cleanUpActiveLinkDecoration()}))),this._register(e.onDidChangeConfiguration((e=>{e.hasChanged(63)&&(this.updateDecorations([]),this.stop(),this.computeLinks.schedule(0))}))),this._register(e.onDidChangeModelContent((e=>{this.editor.hasModel()&&this.computeLinks.schedule(this.debounceInformation.get(this.editor.getModel()))}))),this._register(e.onDidChangeModel((e=>{this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.computeLinks.schedule(0)}))),this._register(e.onDidChangeModelLanguage((e=>{this.stop(),this.computeLinks.schedule(0)}))),this._register(this.providers.onDidChange((e=>{this.stop(),this.computeLinks.schedule(0)}))),this.computeLinks.schedule(0)}static get(t){return t.getContribution(e.ID)}computeLinksNow(){return e=this,t=void 0,r=function*(){if(!this.editor.hasModel()||!this.editor.getOption(63))return;const e=this.editor.getModel();if(this.providers.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=(0,n.PG)((t=>V(this.providers,e,t)));try{const t=new d.G(!1);if(this.activeLinksList=yield this.computePromise,this.debounceInformation.update(e,t.elapsed()),e.isDisposed())return;this.updateDecorations(this.activeLinksList.links)}catch(e){(0,o.dL)(e)}finally{this.computePromise=null}}},new((i=void 0)||(i=Promise))((function(n,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}));var e,t,i,r}updateDecorations(e){const t="altKey"===this.editor.getOption(70),i=[],n=Object.keys(this.currentOccurrences);for(const e of n){const t=this.currentOccurrences[e];i.push(t.decorationId)}const r=[];if(e)for(const i of e)r.push(Y.decoration(i,t));const o=this.editor.deltaDecorations(i,r);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let t=0,i=o.length;t{t.activate(e,i),this.activeLinkDecorationId=t.decorationId}))}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e="altKey"===this.editor.getOption(70);if(this.activeLinkDecorationId){const t=this.currentOccurrences[this.activeLinkDecorationId];t&&this.editor.changeDecorations((i=>{t.deactivate(i,e)})),this.activeLinkDecorationId=null}}onEditorMouseUp(e){if(!this.isEnabled(e))return;const t=this.getLinkOccurrence(e.target.position);t&&this.openLinkOccurrence(t,e.hasSideBySideModifier,!0)}openLinkOccurrence(e,t,i=!1){if(!this.openerService)return;const{link:n}=e;n.resolve(r.T.None).then((e=>{if("string"==typeof e&&this.editor.hasModel()){const t=this.editor.getModel().uri;if(t.scheme===l.lg.file&&e.startsWith(`${l.lg.file}:`)){const i=u.o.parse(e);if(i.scheme===l.lg.file){const n=h.z_(i);let r=null;n.startsWith("/./")?r=`.${n.substr(1)}`:n.startsWith("//./")&&(r=`.${n.substr(2)}`),r&&(e=h.Vo(t,r))}}}return this.openerService.open(e,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})}),(e=>{const t=e instanceof Error?e.message:e;"invalid"===t?this.notificationService.warn(z.N("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):"missing"===t?this.notificationService.warn(z.N("missing.url","Failed to open this link because its target is missing.")):(0,o.dL)(e)}))}getLinkOccurrence(e){if(!this.editor.hasModel()||!e)return null;const t=this.editor.getModel().getDecorationsInRange({startLineNumber:e.lineNumber,startColumn:e.column,endLineNumber:e.lineNumber,endColumn:e.column},0,!0);for(const e of t){const t=this.currentOccurrences[e.id];if(t)return t}return null}isEnabled(e,t){return Boolean(6===e.target.type&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.computeLinks.cancel(),this.activeLinksList&&(null===(e=this.activeLinksList)||void 0===e||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){super.dispose(),this.stop()}};q.ID="editor.linkDetector",q=function(e,t,i,n){var r,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(o<3?r(s):o>3?r(t,i,s):r(t,i))||s);return o>3&&s&&Object.defineProperty(t,i,s),s}([K(1,j.v4),K(2,H.lT),K(3,A.p),K(4,D.A)],q);const G={general:E.qx.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:E.qx.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class Y{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:Y._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?G.active:G.general);return n.hoverMessage=function(e,t){const i=e.url&&/^command:/i.test(e.url.toString()),n=e.tooltip?e.tooltip:i?z.N("links.navigate.executeCmd","Execute command"):z.N("links.navigate.follow","Follow link"),r=t?c.dz?z.N("links.navigate.kb.meta.mac","cmd + click"):z.N("links.navigate.kb.meta","ctrl + click"):c.dz?z.N("links.navigate.kb.alt.mac","option + click"):z.N("links.navigate.kb.alt","alt + click");if(e.url){let t="";if(/^command:/i.test(e.url.toString())){const i=e.url.toString().match(/^command:([^?#]+)/);if(i){const e=i[1];t=` "${z.N("tooltip.explanation","Execute command {0}",e)}"`}}return new s.W5("",!0).appendMarkdown(`[${n}](${e.url.toString(!0).replace(/ /g,"%20")}${t}) (${r})`)}return(new s.W5).appendText(`${n} (${r})`)}(e,t),n}activate(e,t){e.changeDecorationOptions(this.decorationId,Y._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,Y._getOptions(this.link,t,!1))}}class Z extends N.R6{constructor(){super({id:"editor.action.openLink",label:z.N("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){const i=q.get(t);if(!i)return;if(!t.hasModel())return;const n=t.getSelections();for(const e of n){const t=i.getLinkOccurrence(e.getEndPosition());t&&i.openLinkOccurrence(t,!1)}}}(0,N._K)(q.ID,q),(0,N.Qr)(Z),(0,$.Ic)(((e,t)=>{const i=e.getColor(U._Yy);i&&t.addRule(`.monaco-editor .detected-link-active { color: ${i} !important; }`)}))},498:(e,t,i)=>{"use strict";i.d(t,{$:()=>Te});var n=i(5321),r=Object.hasOwnProperty,o=Object.setPrototypeOf,s=Object.isFrozen,a=Object.getPrototypeOf,l=Object.getOwnPropertyDescriptor,c=Object.freeze,h=Object.seal,d=Object.create,u="undefined"!=typeof Reflect&&Reflect,g=u.apply,f=u.construct;g||(g=function(e,t,i){return e.apply(t,i)}),c||(c=function(e){return e}),h||(h=function(e){return e}),f||(f=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t1?i-1:0),r=1;r/gm),j=h(/^data-[\-\w.\u00B7-\uFFFF]/),U=h(/^aria-[\-\w]+$/),$=h(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),K=h(/^(?:\w+script|data):/i),q=h(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function Y(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:Z(),i=function(t){return e(t)};if(i.version="2.3.1",i.removed=[],!t||!t.document||9!==t.document.nodeType)return i.isSupported=!1,i;var n=t.document,r=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,l=t.Element,h=t.NodeFilter,d=t.NamedNodeMap,u=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,g=t.Text,f=t.Comment,p=t.DOMParser,L=t.trustedTypes,X=l.prototype,J=D(X,"cloneNode"),ee=D(X,"nextSibling"),te=D(X,"childNodes"),ie=D(X,"parentNode");if("function"==typeof s){var ne=r.createElement("template");ne.content&&ne.content.ownerDocument&&(r=ne.content.ownerDocument)}var re=Q(L,n),oe=re&&Fe?re.createHTML(""):"",se=r,ae=se.implementation,le=se.createNodeIterator,ce=se.createDocumentFragment,he=se.getElementsByTagName,de=n.importNode,ue={};try{ue=E(r).documentMode?r.documentMode:{}}catch(e){}var ge={};i.isSupported="function"==typeof ie&&ae&&void 0!==ae.createHTMLDocument&&9!==ue;var fe=z,pe=H,me=j,_e=U,ve=K,be=q,ye=$,we=null,Ce=N({},[].concat(Y(A),Y(T),Y(I),Y(O),Y(P))),xe=null,Se=N({},[].concat(Y(F),Y(B),Y(W),Y(V))),ke=null,Le=null,Ne=!0,Ee=!0,De=!1,Ae=!1,Te=!1,Ie=!1,Me=!1,Oe=!1,Re=!1,Pe=!0,Fe=!1,Be=!0,We=!0,Ve=!1,ze={},He=null,je=N({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),Ue=null,$e=N({},["audio","video","img","source","image","track"]),Ke=null,qe=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ge="http://www.w3.org/1998/Math/MathML",Ye="http://www.w3.org/2000/svg",Ze="http://www.w3.org/1999/xhtml",Qe=Ze,Xe=!1,Je=null,et=r.createElement("form"),tt=function(e){Je&&Je===e||(e&&"object"===(void 0===e?"undefined":G(e))||(e={}),e=E(e),we="ALLOWED_TAGS"in e?N({},e.ALLOWED_TAGS):Ce,xe="ALLOWED_ATTR"in e?N({},e.ALLOWED_ATTR):Se,Ke="ADD_URI_SAFE_ATTR"in e?N(E(qe),e.ADD_URI_SAFE_ATTR):qe,Ue="ADD_DATA_URI_TAGS"in e?N(E($e),e.ADD_DATA_URI_TAGS):$e,He="FORBID_CONTENTS"in e?N({},e.FORBID_CONTENTS):je,ke="FORBID_TAGS"in e?N({},e.FORBID_TAGS):{},Le="FORBID_ATTR"in e?N({},e.FORBID_ATTR):{},ze="USE_PROFILES"in e&&e.USE_PROFILES,Ne=!1!==e.ALLOW_ARIA_ATTR,Ee=!1!==e.ALLOW_DATA_ATTR,De=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ae=e.SAFE_FOR_TEMPLATES||!1,Te=e.WHOLE_DOCUMENT||!1,Oe=e.RETURN_DOM||!1,Re=e.RETURN_DOM_FRAGMENT||!1,Pe=!1!==e.RETURN_DOM_IMPORT,Fe=e.RETURN_TRUSTED_TYPE||!1,Me=e.FORCE_BODY||!1,Be=!1!==e.SANITIZE_DOM,We=!1!==e.KEEP_CONTENT,Ve=e.IN_PLACE||!1,ye=e.ALLOWED_URI_REGEXP||ye,Qe=e.NAMESPACE||Ze,Ae&&(Ee=!1),Re&&(Oe=!0),ze&&(we=N({},[].concat(Y(P))),xe=[],!0===ze.html&&(N(we,A),N(xe,F)),!0===ze.svg&&(N(we,T),N(xe,B),N(xe,V)),!0===ze.svgFilters&&(N(we,I),N(xe,B),N(xe,V)),!0===ze.mathMl&&(N(we,O),N(xe,W),N(xe,V))),e.ADD_TAGS&&(we===Ce&&(we=E(we)),N(we,e.ADD_TAGS)),e.ADD_ATTR&&(xe===Se&&(xe=E(xe)),N(xe,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&N(Ke,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(He===je&&(He=E(He)),N(He,e.FORBID_CONTENTS)),We&&(we["#text"]=!0),Te&&N(we,["html","head","body"]),we.table&&(N(we,["tbody"]),delete ke.tbody),c&&c(e),Je=e)},it=N({},["mi","mo","mn","ms","mtext"]),nt=N({},["foreignobject","desc","title","annotation-xml"]),rt=N({},T);N(rt,I),N(rt,M);var ot=N({},O);N(ot,R);var st=function(e){var t=ie(e);t&&t.tagName||(t={namespaceURI:Ze,tagName:"template"});var i=b(e.tagName),n=b(t.tagName);if(e.namespaceURI===Ye)return t.namespaceURI===Ze?"svg"===i:t.namespaceURI===Ge?"svg"===i&&("annotation-xml"===n||it[n]):Boolean(rt[i]);if(e.namespaceURI===Ge)return t.namespaceURI===Ze?"math"===i:t.namespaceURI===Ye?"math"===i&&nt[n]:Boolean(ot[i]);if(e.namespaceURI===Ze){if(t.namespaceURI===Ye&&!nt[n])return!1;if(t.namespaceURI===Ge&&!it[n])return!1;var r=N({},["title","style","font","a","script"]);return!ot[i]&&(r[i]||!rt[i])}return!1},at=function(e){v(i.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},lt=function(e,t){try{v(i.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){v(i.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!xe[e])if(Oe||Re)try{at(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},ct=function(e){var t=void 0,i=void 0;if(Me)e=""+e;else{var n=y(e,/^[\r\n\t ]+/);i=n&&n[0]}var o=re?re.createHTML(e):e;if(Qe===Ze)try{t=(new p).parseFromString(o,"text/html")}catch(e){}if(!t||!t.documentElement){t=ae.createDocument(Qe,"template",null);try{t.documentElement.innerHTML=Xe?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&i&&s.insertBefore(r.createTextNode(i),s.childNodes[0]||null),Qe===Ze?he.call(t,Te?"html":"body")[0]:Te?t.documentElement:s},ht=function(e){return le.call(e.ownerDocument||e,e,h.SHOW_ELEMENT|h.SHOW_COMMENT|h.SHOW_TEXT,null,!1)},dt=function(e){return!(e instanceof g||e instanceof f||"string"==typeof e.nodeName&&"string"==typeof e.textContent&&"function"==typeof e.removeChild&&e.attributes instanceof u&&"function"==typeof e.removeAttribute&&"function"==typeof e.setAttribute&&"string"==typeof e.namespaceURI&&"function"==typeof e.insertBefore)},ut=function(e){return"object"===(void 0===a?"undefined":G(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":G(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},gt=function(e,t,n){ge[e]&&m(ge[e],(function(e){e.call(i,t,n,Je)}))},ft=function(e){var t=void 0;if(gt("beforeSanitizeElements",e,null),dt(e))return at(e),!0;if(y(e.nodeName,/[\u0080-\uFFFF]/))return at(e),!0;var n=b(e.nodeName);if(gt("uponSanitizeElement",e,{tagName:n,allowedTags:we}),!ut(e.firstElementChild)&&(!ut(e.content)||!ut(e.content.firstElementChild))&&S(/<[/\w]/g,e.innerHTML)&&S(/<[/\w]/g,e.textContent))return at(e),!0;if("select"===n&&S(/