All Downloads are FREE. Search and download functionalities are using the official Maven repository.

web-interface.assets.1255d548-2679.2ea8b20315560758a922.js Maven / Gradle / Ivy

There is a newer version: 6.1.4
Show newest version
(()=>{(self.webpackChunkgraylog_web_interface=self.webpackChunkgraylog_web_interface||[]).push([["1255d548-2679"],{fdJGtgle:(V,X,j)=>{V=j.nmd(V),ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(x,M,U){"use strict";var k=x("./lib/dom"),C=x("./lib/oop"),S=x("./lib/event_emitter").EventEmitter,T=x("./lib/lang"),m=x("./range").Range,b=x("./range_list").RangeList,R=x("./keyboard/hash_handler").HashHandler,$=x("./tokenizer").Tokenizer,A=x("./clipboard"),O={CURRENT_WORD:function(o){return o.session.getTextRange(o.session.getWordRange())},SELECTION:function(o,t,e){var r=o.session.getTextRange();return e?r.replace(/\n\r?([ \t]*\S)/g,`
`+e+"$1"):r},CURRENT_LINE:function(o){return o.session.getLine(o.getCursorPosition().row)},PREV_LINE:function(o){return o.session.getLine(o.getCursorPosition().row-1)},LINE_INDEX:function(o){return o.getCursorPosition().row},LINE_NUMBER:function(o){return o.getCursorPosition().row+1},SOFT_TABS:function(o){return o.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(o){return o.session.getTabSize()},CLIPBOARD:function(o){return A.getText&&A.getText()},FILENAME:function(o){return/[^/\\]*$/.exec(this.FILEPATH(o))[0]},FILENAME_BASE:function(o){return/[^/\\]*$/.exec(this.FILEPATH(o))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(o){return this.FILEPATH(o).replace(/[^/\\]*$/,"")},FILEPATH:function(o){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(o){var t=o.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(o){var t=o.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(o){var t=o.session.$mode||{};return t.lineCommentStart||""},CURRENT_YEAR:E.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:E.bind(null,{year:"2-digit"}),CURRENT_MONTH:E.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:E.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:E.bind(null,{month:"short"}),CURRENT_DATE:E.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:E.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:E.bind(null,{weekday:"short"}),CURRENT_HOUR:E.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:E.bind(null,{minute:"2-digit"}),CURRENT_SECOND:E.bind(null,{second:"2-digit"})};O.SELECTED_TEXT=O.SELECTION;function E(o){var t=new Date().toLocaleString("en-us",o);return t.length==1?"0"+t:t}var L=function(){function o(){this.snippetMap={},this.snippetNameMap={},this.variables=O}return o.prototype.getTokenizer=function(){return o.$tokenizer||this.createTokenizer()},o.prototype.createTokenizer=function(){function t(i){return i=i.substr(1),/^\d+$/.test(i)?[{tabstopId:parseInt(i,10)}]:[{text:i}]}function e(i){return"(?:[^\\\\"+i+"]|\\\\.)"}var r={regex:"/("+e("/")+"+)/",onMatch:function(i,n,l){var s=l[0];return s.fmtString=!0,s.guard=i.slice(1,-1),s.flag="",""},next:"formatString"};return o.$tokenizer=new $({start:[{regex:/\\./,onMatch:function(i,n,l){var s=i[1];return(s=="}"&&l.length||"`$\\".indexOf(s)!=-1)&&(i=s),[i]}},{regex:/}/,onMatch:function(i,n,l){return[l.length?l.shift():i]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(i,n,l){var s=t(i.substr(1));return l.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+e("\\|")+"*\\|",onMatch:function(i,n,l){var s=i.slice(1,-1).replace(/\\[,|\\]|,/g,function(f){return f.length==2?f[1]:"\0"}).split("\0").map(function(f){return{value:f}});return l[0].choices=s,[s[0]]},next:"start"},r,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(i,n,l){return l.length&&l[0].expectElse?(l[0].expectElse=!1,l[0].ifEnd={elseEnd:l[0]},[l[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(i,n,l){var s=i[1];return s=="}"&&l.length||"`$\\".indexOf(s)!=-1?i=s:s=="n"?i=`
`:s=="t"?i="	":"ulULE".indexOf(s)!=-1&&(i={changeCase:s,local:s>"a"}),[i]}},{regex:"/\\w*}",onMatch:function(i,n,l){var s=l.shift();return s&&(s.flag=i.slice(1,-1)),this.next=s&&s.tabstopId?"start":"",[s||i]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(i,n,l){return[{text:i.slice(1)}]}},{regex:/\${\w+/,onMatch:function(i,n,l){var s={text:i.slice(2)};return l.unshift(s),[s]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(i,n,l){var s=l.shift();return this.next=s&&s.tabstopId?"start":"",[s||i]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(i,n,l){var s=l[0];return s.formatFunction=i.slice(2,-1),[l.shift()]},next:"formatString"},r,{regex:/:[\?\-+]?/,onMatch:function(i,n,l){i[1]=="+"&&(l[0].ifEnd=l[0]),i[1]=="?"&&(l[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),o.$tokenizer},o.prototype.tokenizeTmSnippet=function(t,e){return this.getTokenizer().getLineTokens(t,e).tokens.map(function(r){return r.value||r})},o.prototype.getVariableValue=function(t,e,r){if(/^\d+$/.test(e))return(this.variables.__||{})[e]||"";if(/^[A-Z]\d+$/.test(e))return(this.variables[e[0]+"__"]||{})[e.substr(1)]||"";if(e=e.replace(/^TM_/,""),!this.variables.hasOwnProperty(e))return"";var i=this.variables[e];return typeof i=="function"&&(i=this.variables[e](t,e,r)),i==null?"":i},o.prototype.tmStrFormat=function(t,e,r){if(!e.fmt)return t;var i=e.flag||"",n=e.guard;n=new RegExp(n,i.replace(/[^gim]/g,""));var l=typeof e.fmt=="string"?this.tokenizeTmSnippet(e.fmt,"formatString"):e.fmt,s=this,f=t.replace(n,function(){var p=s.variables.__;s.variables.__=[].slice.call(arguments);for(var g=s.resolveVariables(l,r),d="E",y=0;y=0&&f.splice(p,1)}}t.content?n(t):Array.isArray(t)&&t.forEach(n)},o.prototype.parseSnippetFile=function(t){t=t.replace(/\r/g,"");for(var e=[],r={},i=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,n;n=i.exec(t);){if(n[1])try{r=JSON.parse(n[1]),e.push(r)}catch{}if(n[4])r.content=n[4].replace(/^\t/gm,""),e.push(r),r={};else{var l=n[2],s=n[3];if(l=="regex"){var f=/\/((?:[^\/\\]|\\.)*)|$/g;r.guard=f.exec(s)[1],r.trigger=f.exec(s)[1],r.endTrigger=f.exec(s)[1],r.endGuard=f.exec(s)[1]}else l=="snippet"?(r.tabTrigger=s.match(/^\S*/)[0],r.name||(r.name=s)):l&&(r[l]=s)}}return e},o.prototype.getSnippetByName=function(t,e){var r=this.snippetNameMap,i;return this.getActiveScopes(e).some(function(n){var l=r[n];return l&&(i=l[t]),!!i},this),i},o}();C.implement(L.prototype,S);var N=function(o,t,e){e===void 0&&(e={});var r=o.getCursorPosition(),i=o.session.getLine(r.row),n=o.session.getTabString(),l=i.match(/^\s*/)[0];r.column1?(B=D[D.length-1].length,F+=D.length-1):B+=_.length,K+=_}else _&&(_.start?_.end={row:F,column:B}:_.start={row:F,column:B})}),{text:K,tabstops:f,tokens:s}},h=function(){function o(t){if(this.index=0,this.ranges=[],this.tabstops=[],t.tabstopManager)return t.tabstopManager;t.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=T.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(t)}return o.prototype.attach=function(t){this.$openTabstops=null,this.selectedTabstop=null,this.editor=t,this.session=t.session,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},o.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},o.prototype.onChange=function(t){for(var e=t.action[0]=="r",r=this.selectedTabstop||{},i=r.parents||{},n=this.tabstops.slice(),l=0;l2&&(this.tabstops.length&&s.push(s.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,s))},o.prototype.addTabstopMarkers=function(t){var e=this.session;t.forEach(function(r){r.markerId||(r.markerId=e.addMarker(r,"ace_snippet-marker","text"))})},o.prototype.removeTabstopMarkers=function(t){var e=this.session;t.forEach(function(r){e.removeMarker(r.markerId),r.markerId=null})},o.prototype.removeRange=function(t){var e=t.tabstop.indexOf(t);e!=-1&&t.tabstop.splice(e,1),e=this.ranges.indexOf(t),e!=-1&&this.ranges.splice(e,1),e=t.tabstop.rangeList.ranges.indexOf(t),e!=-1&&t.tabstop.splice(e,1),this.session.removeMarker(t.markerId),t.tabstop.length||(e=this.tabstops.indexOf(t.tabstop),e!=-1&&this.tabstops.splice(e,1),this.tabstops.length||this.detach())},o}();h.prototype.keyboardHandler=new R,h.prototype.keyboardHandler.bindKeys({Tab:function(o){M.snippetManager&&M.snippetManager.expandWithTab(o)||(o.tabstopManager.tabNext(1),o.renderer.scrollCursorIntoView())},"Shift-Tab":function(o){o.tabstopManager.tabNext(-1),o.renderer.scrollCursorIntoView()},Esc:function(o){o.tabstopManager.detach()}});var u=function(o,t){o.row==0&&(o.column+=t.column),o.row+=t.row},a=function(o,t){o.row==t.row&&(o.column-=t.column),o.row-=t.row};k.importCssString(`
.ace_snippet-marker {
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    background: rgba(194, 193, 208, 0.09);
    border: 1px dotted rgba(211, 208, 235, 0.62);
    position: absolute;
}`,"snippets.css",!1),M.snippetManager=new L;var c=x("./editor").Editor;(function(){this.insertSnippet=function(o,t){return M.snippetManager.insertSnippet(this,o,t)},this.expandSnippet=function(o){return M.snippetManager.expandWithTab(this,o)}}).call(c.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/config"],function(x,M,U){"use strict";var k=x("../virtual_renderer").VirtualRenderer,C=x("../editor").Editor,S=x("../range").Range,T=x("../lib/event"),m=x("../lib/lang"),b=x("../lib/dom"),R=x("../config").nls,$=function(E){return"suggest-aria-id:".concat(E)},A=function(E){var L=new k(E);L.$maxLines=4;var N=new C(L);return N.setHighlightActiveLine(!1),N.setShowPrintMargin(!1),N.renderer.setShowGutter(!1),N.renderer.setHighlightGutterLine(!1),N.$mouseHandler.$focusTimeout=0,N.$highlightTagPending=!0,N},O=function(){function E(L){var N=b.createElement("div"),h=new A(N);L&&L.appendChild(N),N.style.display="none",h.renderer.content.style.cursor="default",h.renderer.setStyle("ace_autocomplete"),h.renderer.$textLayer.element.setAttribute("role","listbox"),h.renderer.$textLayer.element.setAttribute("aria-label",R("Autocomplete suggestions")),h.renderer.textarea.setAttribute("aria-hidden","true"),h.setOption("displayIndentGuides",!1),h.setOption("dragDelay",150);var u=function(){};h.focus=u,h.$isFocused=!0,h.renderer.$cursorLayer.restartTimer=u,h.renderer.$cursorLayer.element.style.opacity=0,h.renderer.$maxLines=8,h.renderer.$keepTextAreaAtCursor=!1,h.setHighlightActiveLine(!1),h.session.highlight(""),h.session.$searchHighlight.clazz="ace_highlight-marker",h.on("mousedown",function(i){var n=i.getDocumentPosition();h.selection.moveToPosition(n),o.start.row=o.end.row=n.row,i.stop()});var a,c=new S(-1,0,-1,1/0),o=new S(-1,0,-1,1/0);o.id=h.session.addMarker(o,"ace_active-line","fullLine"),h.setSelectOnHover=function(i){i?c.id&&(h.session.removeMarker(c.id),c.id=null):c.id=h.session.addMarker(c,"ace_line-hover","fullLine")},h.setSelectOnHover(!1),h.on("mousemove",function(i){if(!a){a=i;return}if(!(a.x==i.x&&a.y==i.y)){a=i,a.scrollTop=h.renderer.scrollTop,h.isMouseOver=!0;var n=a.getDocumentPosition().row;c.start.row!=n&&(c.id||h.setRow(n),e(n))}}),h.renderer.on("beforeRender",function(){if(a&&c.start.row!=-1){a.$pos=null;var i=a.getDocumentPosition().row;c.id||h.setRow(i),e(i,!0)}}),h.renderer.on("afterRender",function(){var i=h.getRow(),n=h.renderer.$textLayer,l=n.element.childNodes[i-n.config.firstRow],s=document.activeElement;if(l!==n.selectedNode&&n.selectedNode&&(b.removeCssClass(n.selectedNode,"ace_selected"),s.removeAttribute("aria-activedescendant"),n.selectedNode.removeAttribute("id")),n.selectedNode=l,l){b.addCssClass(l,"ace_selected");var f=$(i);l.id=f,n.element.setAttribute("aria-activedescendant",f),s.setAttribute("aria-activedescendant",f),l.setAttribute("role","option"),l.setAttribute("aria-label",h.getData(i).value),l.setAttribute("aria-setsize",h.data.length),l.setAttribute("aria-posinset",i+1),l.setAttribute("aria-describedby","doc-tooltip")}});var t=function(){e(-1)},e=function(i,n){i!==c.start.row&&(c.start.row=c.end.row=i,n||h.session._emit("changeBackMarker"),h._emit("changeHoverMarker"))};h.getHoveredRow=function(){return c.start.row},T.addListener(h.container,"mouseout",function(){h.isMouseOver=!1,t()}),h.on("hide",t),h.on("changeSelection",t),h.session.doc.getLength=function(){return h.data.length},h.session.doc.getLine=function(i){var n=h.data[i];return typeof n=="string"?n:n&&n.value||""};var r=h.session.bgTokenizer;return r.$tokenizeRow=function(i){var n=h.data[i],l=[];if(!n)return l;typeof n=="string"&&(n={value:n});var s=n.caption||n.value||n.name;function f(H,F){H&&l.push({type:(n.className||"")+(F||""),value:H})}for(var p=s.toLowerCase(),g=(h.filterText||"").toLowerCase(),d=0,y=0,v=0;v<=g.length;v++)if(v!=y&&(n.matchMask&1<=y?l="bottom":l="top"),l==="top"?(v.bottom=i.top-this.$borderSize,v.top=v.bottom-y):l==="bottom"&&(v.top=i.top+n+this.$borderSize,v.bottom=v.top+y);var H=v.top>=0&&v.bottom<=p;if(!s&&!H)return!1;H?d.$maxPixelHeight=null:l==="top"?d.$maxPixelHeight=I:d.$maxPixelHeight=w,l==="top"?(f.style.top="",f.style.bottom=p-v.bottom+"px",h.isTopdown=!1):(f.style.top=v.top+"px",f.style.bottom="",h.isTopdown=!0),f.style.display="";var F=i.left;return F+f.offsetWidth>g&&(F=g-f.offsetWidth),f.style.left=F+"px",f.style.right="",h.isOpen||(h.isOpen=!0,this._signal("show"),a=null),h.anchorPos=i,h.anchor=l,!0},h.show=function(i,n,l){this.tryShow(i,n,l?"bottom":void 0,!0)},h.goTo=function(i){var n=this.getRow(),l=this.session.getLength()-1;switch(i){case"up":n=n<=0?l:n-1;break;case"down":n=n>=l?-1:n+1;break;case"start":n=0;break;case"end":n=l;break}this.setRow(n)},h.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},h.$imageSize=0,h.$borderSize=1,h}return E}();b.importCssString(`
.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
    background-color: #CAD6FA;
    z-index: 1;
}
.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {
    background-color: #3a674e;
}
.ace_editor.ace_autocomplete .ace_line-hover {
    border: 1px solid #abbffe;
    margin-top: -1px;
    background: rgba(233,233,253,0.4);
    position: absolute;
    z-index: 2;
}
.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {
    border: 1px solid rgba(109, 150, 13, 0.8);
    background: rgba(58, 103, 78, 0.62);
}
.ace_completion-meta {
    opacity: 0.5;
    margin-left: 0.9em;
}
.ace_completion-message {
    color: blue;
}
.ace_editor.ace_autocomplete .ace_completion-highlight{
    color: #2d69c7;
}
.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{
    color: #93ca12;
}
.ace_editor.ace_autocomplete {
    width: 300px;
    z-index: 200000;
    border: 1px lightgray solid;
    position: fixed;
    box-shadow: 2px 3px 5px rgba(0,0,0,.2);
    line-height: 1.4;
    background: #fefefe;
    color: #111;
}
.ace_dark.ace_editor.ace_autocomplete {
    border: 1px #484747 solid;
    box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);
    line-height: 1.4;
    background: #25282c;
    color: #c1c1c1;
}
.ace_autocomplete .ace_text-layer  {
    width: calc(100% - 8px);
}
.ace_autocomplete .ace_line {
    display: flex;
    align-items: center;
}
.ace_autocomplete .ace_line > * {
    min-width: 0;
    flex: 0 0 auto;
}
.ace_autocomplete .ace_line .ace_ {
    flex: 0 1 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.ace_autocomplete .ace_completion-spacer {
    flex: 1;
}
`,"autocompletion.css",!1),M.AcePopup=O,M.$singleLineEditor=A,M.getAriaId=$}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(x,M,U){"use strict";var k=function(){function C(S){this.editor=S,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return C.prototype.setScreenReaderContent=function(S){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",(function(){var m=this.popup.getRow(),b=this.popup.renderer.$textLayer,R=b.element.childNodes[m-b.config.firstRow];if(R){for(var $="doc-tooltip ",A=0;A=0&&T.test(C[b]);b--)m.push(C[b]);return m.reverse().join("")},M.retrieveFollowingIdentifier=function(C,S,T){T=T||k;for(var m=[],b=S;b=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},u.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var a=this.editor.container.parentNode,c=[];a;)c.push(a),a.addEventListener("scroll",this.onLayoutChange,{passive:!0}),a=a.parentNode;this.$elements=c}},u.prototype.unObserveLayoutChanges=function(){var a=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(c){c.removeEventListener("scroll",a.onLayoutChange,{passive:!0})}),this.$elements=null},u.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},u.prototype.$updatePopupPosition=function(){var a=this.editor,c=a.renderer,o=c.layerConfig.lineHeight,t=c.$cursorLayer.getPixelPosition(this.base,!0);t.left-=this.popup.getTextLeftOffset();var e=a.container.getBoundingClientRect();t.top+=e.top-c.layerConfig.offset,t.left+=e.left-a.renderer.scrollLeft,t.left+=c.gutterWidth;var r={top:t.top,left:t.left};c.$ghostText&&c.$ghostTextWidget&&this.base.row===c.$ghostText.position.row&&(r.top+=c.$ghostTextWidget.el.offsetHeight),!this.popup.tryShow(r,o,"bottom")&&(this.popup.tryShow(t,o,"top")||this.popup.show(t,o))},u.prototype.openPopup=function(a,c,o){this.popup||this.$init(),this.inlineEnabled&&!this.inlineRenderer&&this.$initInline(),this.popup.autoSelect=this.autoSelect,this.popup.setSelectOnHover(this.setSelectOnHover);var t=this.popup.data[this.popup.getRow()];this.popup.setData(this.completions.filtered,this.completions.filterText),this.editor.textInput.setAriaOptions&&this.editor.textInput.setAriaOptions({activeDescendant:T(this.popup.getRow()),inline:this.inlineEnabled}),a.keyBinding.addKeyboardHandler(this.keyboardHandler);var e=this.popup.data.indexOf(t);e&&this.stickySelection?this.popup.setRow(this.autoSelect?e:-1):this.popup.setRow(this.autoSelect?0:-1),o?o&&!c&&this.detach():(this.popup.setTheme(a.getTheme()),this.popup.setFontSize(a.getFontSize()),this.$updatePopupPosition(),this.tooltipNode&&this.updateDocTooltip()),this.changeTimer.cancel(),this.observeLayoutChanges()},u.prototype.detach=function(){this.editor&&(this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.off("changeSelection",this.changeListener),this.editor.off("blur",this.blurListener),this.editor.off("mousedown",this.mousedownListener),this.editor.off("mousewheel",this.mousewheelListener)),this.changeTimer.cancel(),this.hideDocTooltip(),this.completionProvider&&this.completionProvider.detach(),this.popup&&this.popup.isOpen&&this.popup.hide(),this.base&&this.base.detach(),this.activated=!1,this.completionProvider=this.completions=this.base=null,this.unObserveLayoutChanges()},u.prototype.changeListener=function(a){var c=this.editor.selection.lead;(c.row!=this.base.row||c.columnthis.filterText&&a.lastIndexOf(this.filterText,0)===0)var c=this.filtered;else var c=this.all;this.filterText=a,c=this.filterCompletions(c,this.filterText),c=c.sort(function(t,e){return e.exactMatch-t.exactMatch||e.$score-t.$score||(t.caption||t.value).localeCompare(e.caption||e.value)});var o=null;c=c.filter(function(t){var e=t.snippet||t.caption||t.value;return e===o?!1:(o=e,!0)}),this.filtered=c},u.prototype.filterCompletions=function(a,c){var o=[],t=c.toUpperCase(),e=c.toLowerCase();e:for(var r=0,i;i=a[r];r++){var n=!this.ignoreCaption&&i.caption||i.value||i.snippet;if(n){var l=-1,s=0,f=0,p,g;if(this.exactMatch){if(c!==n.substr(0,c.length))continue e}else{var d=n.toLowerCase().indexOf(e);if(d>-1)f=d;else for(var y=0;y=0&&(w<0||v0&&(l===-1&&(f+=10),f+=g,s=s|1<",T.escapeHTML(e.caption),"","
",T.escapeHTML($(e.snippet))].join(""))},id:"snippetCompleter"},O=[A,b,R];M.setCompleters=function(e){O.length=0,e&&O.push.apply(O,e)},M.addCompleter=function(e){O.push(e)},M.textCompleter=b,M.keyWordCompleter=R,M.snippetCompleter=A;var E={name:"expandSnippet",exec:function(e){return k.expandWithTab(e)},bindKey:"Tab"},L=function(e,r){N(r.session.$mode)},N=function(e){typeof e=="string"&&(e=S.$modes[e]),e&&(k.files||(k.files={}),h(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(N))},h=function(e,r){!r||!e||k.files[e]||(k.files[e]={},S.loadModule(r,function(i){i&&(k.files[e]=i,!i.snippets&&i.snippetText&&(i.snippets=k.parseSnippetFile(i.snippetText)),k.register(i.snippets||[],i.scope),i.includeScopes&&(k.snippetMap[i.scope].includeScopes=i.includeScopes,i.includeScopes.forEach(function(n){N("ace/mode/"+n)})))}))},u=function(e){var r=e.editor,i=r.completer&&r.completer.activated;if(e.command.name==="backspace")i&&!m.getCompletionPrefix(r)&&r.completer.detach();else if(e.command.name==="insertstring"&&!i){a=e;var n=e.editor.$liveAutocompletionDelay;n?c.delay(n):o(e)}},a,c=T.delayedCall(function(){o(a)},0),o=function(e){var r=e.editor,i=m.getCompletionPrefix(r),n=m.triggerAutocomplete(r);if(i&&i.length>=r.$liveAutocompletionThreshold||n){var l=C.for(r);l.autoShown=!0,l.showPopup(r)}},t=x("../editor").Editor;x("../config").defineOptions(t.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:O),this.commands.addCommand(C.startCommand)):this.commands.removeCommand(C.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:O),this.commands.on("afterExec",u)):this.commands.off("afterExec",u)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(E),this.on("changeMode",L),L(null,this)):(this.commands.removeCommand(E),this.off("changeMode",L))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(x){V&&(V.exports=x)})}()}}]);})(); //# sourceMappingURL=1255d548-2679.2ea8b20315560758a922.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy