(this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[69975],{69975(e,n,o){e=o.nmd(e),ace.define("ace/ext/code_lens",["require","exports","module","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/editor","ace/config"],(function(e,n,o){"use strict";var t=e("../lib/event"),r=e("../lib/lang"),i=e("../lib/dom");function s(e,n){if(e&n.CHANGE_LINES||e&n.CHANGE_FULL||e&n.CHANGE_SCROLL||e&n.CHANGE_TEXT){var o=n.session,t=n.session.lineWidgets,r=n.$textLayer,s=r.$lenses;if(t){var a=n.$textLayer.$lines.cells,c=n.layerConfig,l=n.$padding;s||(s=r.$lenses=[]);for(var d=0,u=0;u<a.length;u++){var f=a[u].row,g=t[f],p=g&&g.lenses;if(p&&p.length){var v=s[d];v||(v=s[d]=i.buildDom(["div",{class:"ace_codeLens"}],n.container)),v.style.height=c.lineHeight+"px",d++;for(var L=0;L<p.length;L++){var h=v.childNodes[2*L];h||(0!=L&&v.appendChild(i.createTextNode(" | ")),h=i.buildDom(["a"],v)),h.textContent=p[L].title,h.lensCommand=p[L]}for(;v.childNodes.length>2*L-1;)v.lastChild.remove();var m=n.$cursorLayer.getPixelPosition({row:f,column:0},!0).top-c.lineHeight*g.rowsAbove-c.offset;v.style.top=m+"px";var C=n.gutterWidth,$=o.getLine(f).search(/\S|$/);-1==$&&($=0),C+=$*c.characterWidth,v.style.paddingLeft=l+C+"px"}}for(;d<s.length;)s.pop().remove()}else s&&function(e){var n=e.$textLayer,o=n.$lenses;o&&o.forEach((function(e){e.remove()})),n.$lenses=null}(n)}}function a(e){e.codeLensProviders=[],e.renderer.on("afterRender",s),e.$codeLensClickHandler||(e.$codeLensClickHandler=function(n){var o=n.target.lensCommand;o&&(e.execCommand(o.id,o.arguments),e._emit("codeLensClick",n))},t.addListener(e.container,"click",e.$codeLensClickHandler,e)),e.$updateLenses=function(){var o=e.session;if(o){var t=e.codeLensProviders.length,r=[];e.codeLensProviders.forEach((function(i){i.provideCodeLenses(o,(function(i,s){i||(s.forEach((function(e){r.push(e)})),0==--t&&function(){var t=o.selection.cursor,i=o.documentToScreenRow(t),s=o.getScrollTop(),a=n.setLenses(o,r),c=o.$undoManager&&o.$undoManager.$lastDelta;if(c&&"remove"==c.action&&c.lines.length>1)return;var l=o.documentToScreenRow(t),d=e.renderer.layerConfig.lineHeight,u=o.getScrollTop()+(l-i)*d;0==a&&s<d/4&&s>-d/4&&(u=-d);o.setScrollTop(u)}())}))}))}};var o=r.delayedCall(e.$updateLenses);e.$updateLensesOnInput=function(){o.delay(250)},e.on("input",e.$updateLensesOnInput)}n.setLenses=function(e,n){var o=Number.MAX_VALUE;return function(e){if(e.lineWidgets){var n=e.widgetManager;e.lineWidgets.forEach((function(e){e&&e.lenses&&n.removeLineWidget(e)}))}}(e),n&&n.forEach((function(n){var t=n.start.row,r=n.start.column,i=e.lineWidgets&&e.lineWidgets[t];i&&i.lenses||(i=e.widgetManager.$registerLineWidget({rowCount:1,rowsAbove:1,row:t,column:r,lenses:[]})),i.lenses.push(n.command),t<o&&(o=t)})),e._emit("changeFold",{data:{start:{row:o}}}),o},n.registerCodeLensProvider=function(e,n){e.setOption("enableCodeLens",!0),e.codeLensProviders.push(n),e.$updateLensesOnInput()},n.clear=function(e){n.setLenses(e,null)};var c=e("../editor").Editor;e("../config").defineOptions(c.prototype,"editor",{enableCodeLens:{set:function(e){var n;e?a(this):((n=this).off("input",n.$updateLensesOnInput),n.renderer.off("afterRender",s),n.$codeLensClickHandler&&n.container.removeEventListener("click",n.$codeLensClickHandler))}}}),i.importCssString("\n.ace_codeLens {\n    position: absolute;\n    color: #aaa;\n    font-size: 88%;\n    background: inherit;\n    width: 100%;\n    display: flex;\n    align-items: flex-end;\n    pointer-events: none;\n}\n.ace_codeLens > a {\n    cursor: pointer;\n    pointer-events: auto;\n}\n.ace_codeLens > a:hover {\n    color: #0000ff;\n    text-decoration: underline;\n}\n.ace_dark > .ace_codeLens > a:hover {\n    color: #4e94ce;\n}\n","codelense.css",!1)})),ace.require(["ace/ext/code_lens"],(function(n){e&&(e.exports=n)}))}}]);