
ber-security.graylog.graylog-plugin-correlation-count.6.0.0.source-code.0cd2349b7f4b6f7013e195c8145d2917.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of graylog-plugin-correlation-count Show documentation
Show all versions of graylog-plugin-correlation-count Show documentation
Graylog ${project.artifactId} plugin.
(()=>{var Z=(d,x)=>()=>(x||d((x={exports:{}}).exports,x),x.exports);var J=Z((j,X)=>{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(d,x,V){"use strict";var $=d("./lib/dom"),T=d("./lib/oop"),R=d("./lib/event_emitter").EventEmitter,b=d("./lib/lang"),m=d("./range").Range,g=d("./range_list").RangeList,w=d("./keyboard/hash_handler").HashHandler,L=d("./tokenizer").Tokenizer,_=d("./clipboard"),N={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,i,t){var n=e.session.getTextRange();return t?n.replace(/\n\r?([ \t]*\S)/g,`
`+t+"$1"):n},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return _.getText&&_.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var i=e.session.$mode||{};return i.blockComment&&i.blockComment.start||""},BLOCK_COMMENT_END:function(e){var i=e.session.$mode||{};return i.blockComment&&i.blockComment.end||""},LINE_COMMENT:function(e){var i=e.session.$mode||{};return i.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"})};N.SELECTED_TEXT=N.SELECTION;function E(e){var i=new Date().toLocaleString("en-us",e);return i.length==1?"0"+i:i}var O=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=N}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function i(o){return o=o.substr(1),/^\d+$/.test(o)?[{tabstopId:parseInt(o,10)}]:[{text:o}]}function t(o){return"(?:[^\\\\"+o+"]|\\\\.)"}var n={regex:"/("+t("/")+"+)/",onMatch:function(o,l,p){var a=p[0];return a.fmtString=!0,a.guard=o.slice(1,-1),a.flag="",""},next:"formatString"};return e.$tokenizer=new L({start:[{regex:/\\./,onMatch:function(o,l,p){var a=o[1];return(a=="}"&&p.length||"`$\\".indexOf(a)!=-1)&&(o=a),[o]}},{regex:/}/,onMatch:function(o,l,p){return[p.length?p.shift():o]}},{regex:/\$(?:\d+|\w+)/,onMatch:i},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(o,l,p){var a=i(o.substr(1));return p.unshift(a[0]),a},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+t("\\|")+"*\\|",onMatch:function(o,l,p){var a=o.slice(1,-1).replace(/\\[,|\\]|,/g,function(c){return c.length==2?c[1]:"\0"}).split("\0").map(function(c){return{value:c}});return p[0].choices=a,[a[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(o,l,p){return p.length&&p[0].expectElse?(p[0].expectElse=!1,p[0].ifEnd={elseEnd:p[0]},[p[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(o,l,p){var a=o[1];return a=="}"&&p.length||"`$\\".indexOf(a)!=-1?o=a:a=="n"?o=`
`:a=="t"?o=" ":"ulULE".indexOf(a)!=-1&&(o={changeCase:a,local:a>"a"}),[o]}},{regex:"/\\w*}",onMatch:function(o,l,p){var a=p.shift();return a&&(a.flag=o.slice(1,-1)),this.next=a&&a.tabstopId?"start":"",[a||o]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(o,l,p){return[{text:o.slice(1)}]}},{regex:/\${\w+/,onMatch:function(o,l,p){var a={text:o.slice(2)};return p.unshift(a),[a]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(o,l,p){var a=p.shift();return this.next=a&&a.tabstopId?"start":"",[a||o]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(o,l,p){var a=p[0];return a.formatFunction=o.slice(2,-1),[p.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(o,l,p){o[1]=="+"&&(p[0].ifEnd=p[0]),o[1]=="?"&&(p[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(i,t){return this.getTokenizer().getLineTokens(i,t).tokens.map(function(n){return n.value||n})},e.prototype.getVariableValue=function(i,t,n){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var o=this.variables[t];return typeof o=="function"&&(o=this.variables[t](i,t,n)),o==null?"":o},e.prototype.tmStrFormat=function(i,t,n){if(!t.fmt)return i;var o=t.flag||"",l=t.guard;l=new RegExp(l,o.replace(/[^gim]/g,""));var p=typeof t.fmt=="string"?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,a=this,c=i.replace(l,function(){var r=a.variables.__;a.variables.__=[].slice.call(arguments);for(var u=a.resolveVariables(p,n),v="E",f=0;f=0&&c.splice(r,1)}}i.content?l(i):Array.isArray(i)&&i.forEach(l)},e.prototype.parseSnippetFile=function(i){i=i.replace(/\r/g,"");for(var t=[],n={},o=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,l;l=o.exec(i);){if(l[1])try{n=JSON.parse(l[1]),t.push(n)}catch{}if(l[4])n.content=l[4].replace(/^\t/gm,""),t.push(n),n={};else{var p=l[2],a=l[3];if(p=="regex"){var c=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=c.exec(a)[1],n.trigger=c.exec(a)[1],n.endTrigger=c.exec(a)[1],n.endGuard=c.exec(a)[1]}else p=="snippet"?(n.tabTrigger=a.match(/^\S*/)[0],n.name||(n.name=a)):p&&(n[p]=a)}}return t},e.prototype.getSnippetByName=function(i,t){var n=this.snippetNameMap,o;return this.getActiveScopes(t).some(function(l){var p=n[l];return p&&(o=p[i]),!!o},this),o},e}();T.implement(O.prototype,R);var k=function(e,i,t){t===void 0&&(t={});var n=e.getCursorPosition(),o=e.session.getLine(n.row),l=e.session.getTabString(),p=o.match(/^\s*/)[0];n.column1?(z=H[H.length-1].length,A+=H.length-1):z+=C.length,U+=C}else C&&(C.start?C.end={row:A,column:z}:C.start={row:A,column:z})}),{text:U,tabstops:c,tokens:a}},F=function(){function e(i){if(this.index=0,this.ranges=[],this.tabstops=[],i.tabstopManager)return i.tabstopManager;i.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=b.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(i)}return e.prototype.attach=function(i){this.$openTabstops=null,this.selectedTabstop=null,this.editor=i,this.session=i.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)},e.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},e.prototype.onChange=function(i){for(var t=i.action[0]=="r",n=this.selectedTabstop||{},o=n.parents||{},l=this.tabstops.slice(),p=0;p2&&(this.tabstops.length&&a.push(a.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,a))},e.prototype.addTabstopMarkers=function(i){var t=this.session;i.forEach(function(n){n.markerId||(n.markerId=t.addMarker(n,"ace_snippet-marker","text"))})},e.prototype.removeTabstopMarkers=function(i){var t=this.session;i.forEach(function(n){t.removeMarker(n.markerId),n.markerId=null})},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var i=this.selectedTabstop.snippetId;this.selectedTabstop.index===0&&i--,this.tabstops.forEach(function(t){t.snippetId===i?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)},this)}},e.prototype.removeRange=function(i){var t=i.tabstop.indexOf(i);t!=-1&&i.tabstop.splice(t,1),t=this.ranges.indexOf(i),t!=-1&&this.ranges.splice(t,1),t=i.tabstop.rangeList.ranges.indexOf(i),t!=-1&&i.tabstop.splice(t,1),this.session.removeMarker(i.markerId),i.tabstop.length||(t=this.tabstops.indexOf(i.tabstop),t!=-1&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();F.prototype.keyboardHandler=new w,F.prototype.keyboardHandler.bindKeys({Tab:function(e){x.snippetManager&&x.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var I=function(e,i){e.row==0&&(e.column+=i.column),e.row+=i.row},h=function(e,i){e.row==i.row&&(e.column-=i.column),e.row-=i.row};$.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),x.snippetManager=new O;var s=d("./editor").Editor;(function(){this.insertSnippet=function(e,i){return x.snippetManager.insertSnippet(this,e,i)},this.expandSnippet=function(e){return x.snippetManager.expandWithTab(this,e)}}).call(s.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","ace/lib/useragent"],function(d,x,V){"use strict";var $=d("../virtual_renderer").VirtualRenderer,T=d("../editor").Editor,R=d("../range").Range,b=d("../lib/event"),m=d("../lib/lang"),g=d("../lib/dom"),w=d("../config").nls,L=d("./../lib/useragent"),_=function(I){return"suggest-aria-id:".concat(I)},N=L.isSafari?"menu":"listbox",E=L.isSafari?"menuitem":"option",O=L.isSafari?"aria-current":"aria-selected",k=function(I){var h=new $(I);h.$maxLines=4;var s=new T(h);return s.setHighlightActiveLine(!1),s.setShowPrintMargin(!1),s.renderer.setShowGutter(!1),s.renderer.setHighlightGutterLine(!1),s.$mouseHandler.$focusTimeout=0,s.$highlightTagPending=!0,s},F=function(){function I(h){var s=g.createElement("div"),e=k(s);h&&h.appendChild(s),s.style.display="none",e.renderer.content.style.cursor="default",e.renderer.setStyle("ace_autocomplete"),e.renderer.$textLayer.element.setAttribute("role",N),e.renderer.$textLayer.element.setAttribute("aria-roledescription",w("Autocomplete suggestions")),e.renderer.$textLayer.element.setAttribute("aria-label",w("Autocomplete suggestions")),e.renderer.textarea.setAttribute("aria-hidden","true"),e.setOption("displayIndentGuides",!1),e.setOption("dragDelay",150);var i=function(){};e.focus=i,e.$isFocused=!0,e.renderer.$cursorLayer.restartTimer=i,e.renderer.$cursorLayer.element.style.opacity="0",e.renderer.$maxLines=8,e.renderer.$keepTextAreaAtCursor=!1,e.setHighlightActiveLine(!1),e.session.highlight(""),e.session.$searchHighlight.clazz="ace_highlight-marker",e.on("mousedown",function(c){var r=c.getDocumentPosition();e.selection.moveToPosition(r),o.start.row=o.end.row=r.row,c.stop()});var t,n=new R(-1,0,-1,1/0),o=new R(-1,0,-1,1/0);o.id=e.session.addMarker(o,"ace_active-line","fullLine"),e.setSelectOnHover=function(c){c?n.id&&(e.session.removeMarker(n.id),n.id=null):n.id=e.session.addMarker(n,"ace_line-hover","fullLine")},e.setSelectOnHover(!1),e.on("mousemove",function(c){if(!t){t=c;return}if(!(t.x==c.x&&t.y==c.y)){t=c,t.scrollTop=e.renderer.scrollTop,e.isMouseOver=!0;var r=t.getDocumentPosition().row;n.start.row!=r&&(n.id||e.setRow(r),p(r))}}),e.renderer.on("beforeRender",function(){if(t&&n.start.row!=-1){t.$pos=null;var c=t.getDocumentPosition().row;n.id||e.setRow(c),p(c,!0)}}),e.renderer.on("afterRender",function(){var c=e.getRow(),r=e.renderer.$textLayer,u=r.element.childNodes[c-r.config.firstRow],v=document.activeElement;if(u!==e.selectedNode&&e.selectedNode&&(g.removeCssClass(e.selectedNode,"ace_selected"),v.removeAttribute("aria-activedescendant"),e.selectedNode.removeAttribute(O),e.selectedNode.removeAttribute("id")),e.selectedNode=u,u){g.addCssClass(u,"ace_selected");var f=_(c);u.id=f,r.element.setAttribute("aria-activedescendant",f),v.setAttribute("aria-activedescendant",f),u.setAttribute("role",E),u.setAttribute("aria-roledescription",w("item")),u.setAttribute("aria-label",e.getData(c).caption||e.getData(c).value),u.setAttribute("aria-setsize",e.data.length),u.setAttribute("aria-posinset",c+1),u.setAttribute("aria-describedby","doc-tooltip"),u.setAttribute(O,"true")}});var l=function(){p(-1)},p=function(c,r){c!==n.start.row&&(n.start.row=n.end.row=c,r||e.session._emit("changeBackMarker"),e._emit("changeHoverMarker"))};e.getHoveredRow=function(){return n.start.row},b.addListener(e.container,"mouseout",function(){e.isMouseOver=!1,l()}),e.on("hide",l),e.on("changeSelection",l),e.session.doc.getLength=function(){return e.data.length},e.session.doc.getLine=function(c){var r=e.data[c];return typeof r=="string"?r:r&&r.value||""};var a=e.session.bgTokenizer;return a.$tokenizeRow=function(c){var r=e.data[c],u=[];if(!r)return u;typeof r=="string"&&(r={value:r});var v=r.caption||r.value||r.name;function f(C,H){C&&u.push({type:(r.className||"")+(H||""),value:C})}for(var y=v.toLowerCase(),S=(e.filterText||"").toLowerCase(),M=0,D=0,A=0;A<=S.length;A++)if(A!=D&&(r.matchMask&1<=D?u="bottom":u="top"),u==="top"?(A.bottom=c.top-this.$borderSize,A.top=A.bottom-D):u==="bottom"&&(A.top=c.top+r+this.$borderSize,A.bottom=A.top+D);var C=A.top>=0&&A.bottom<=y;if(!v&&!C)return!1;C?M.$maxPixelHeight=null:u==="top"?M.$maxPixelHeight=U:M.$maxPixelHeight=z,u==="top"?(f.style.top="",f.style.bottom=y-A.bottom+"px",e.isTopdown=!1):(f.style.top=A.top+"px",f.style.bottom="",e.isTopdown=!0),f.style.display="";var H=c.left;return H+f.offsetWidth>S&&(H=S-f.offsetWidth),f.style.left=H+"px",f.style.right="",e.isOpen||(e.isOpen=!0,this._signal("show"),t=null),e.anchorPos=c,e.anchor=u,!0},e.show=function(c,r,u){this.tryShow(c,r,u?"bottom":void 0,!0)},e.goTo=function(c){var r=this.getRow(),u=this.session.getLength()-1;switch(c){case"up":r=r<=0?u:r-1;break;case"down":r=r>=u?-1:r+1;break;case"start":r=0;break;case"end":r=u;break}this.setRow(r)},e.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},e.$imageSize=0,e.$borderSize=1,e}return I}();g.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 {
margin-left: 0.9em;
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;
}
.ace_autocomplete.ace_loading:after {
content: "";
position: absolute;
top: 0px;
height: 2px;
width: 8%;
background: blue;
z-index: 100;
animation: ace_progress 3s infinite linear;
animation-delay: 300ms;
transform: translateX(-100%) scaleX(1);
}
@keyframes ace_progress {
0% { transform: translateX(-100%) scaleX(1) }
50% { transform: translateX(625%) scaleX(2) }
100% { transform: translateX(1500%) scaleX(3) }
}
@media (prefers-reduced-motion) {
.ace_autocomplete.ace_loading:after {
transform: translateX(625%) scaleX(2);
animation: none;
}
}
`,"autocompletion.css",!1),x.AcePopup=F,x.$singleLineEditor=k,x.getAriaId=_});ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(d,x,V){"use strict";var $=function(){function T(R){this.editor=R,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return T.prototype.setScreenReaderContent=function(R){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(),g=this.popup.renderer.$textLayer,w=g.element.childNodes[m-g.config.firstRow];if(w){for(var L="doc-tooltip ",_=0;_=0&&b.test(T[g]);g--)m.push(T[g]);return m.reverse().join("")},x.retrieveFollowingIdentifier=function(T,R,b){b=b||$;for(var m=[],g=R;g0)for(var e=this.popup.getFirstVisibleRow();e<=this.popup.getLastVisibleRow();e++){var i=this.popup.getData(e);i&&(!s||i.hideInlinePreview)&&this.$seen(i)}},h.prototype.$onPopupShow=function(s){this.$onPopupChange(s),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},h.prototype.observeLayoutChanges=function(){if(!(this.$elements||!this.editor)){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var s=this.editor.container.parentNode,e=[];s;)e.push(s),s.addEventListener("scroll",this.onLayoutChange,{passive:!0}),s=s.parentNode;this.$elements=e}},h.prototype.unObserveLayoutChanges=function(){var s=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach(function(e){e.removeEventListener("scroll",s.onLayoutChange,{passive:!0})}),this.$elements=null},h.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},h.prototype.$updatePopupPosition=function(){var s=this.editor,e=s.renderer,i=e.layerConfig.lineHeight,t=e.$cursorLayer.getPixelPosition(this.base,!0);t.left-=this.popup.getTextLeftOffset();var n=s.container.getBoundingClientRect();t.top+=n.top-e.layerConfig.offset,t.left+=n.left-s.renderer.scrollLeft,t.left+=e.gutterWidth;var o={top:t.top,left:t.left};e.$ghostText&&e.$ghostTextWidget&&this.base.row===e.$ghostText.position.row&&(o.top+=e.$ghostTextWidget.el.offsetHeight);var l=s.container.getBoundingClientRect().bottom-i,p=lthis.filterText&&s.lastIndexOf(this.filterText,0)===0)var e=this.filtered;else var e=this.all;this.filterText=s,e=this.filterCompletions(e,this.filterText),e=e.sort(function(t,n){return n.exactMatch-t.exactMatch||n.$score-t.$score||(t.caption||t.value).localeCompare(n.caption||n.value)});var i=null;e=e.filter(function(t){var n=t.snippet||t.caption||t.value;return n===i?!1:(i=n,!0)}),this.filtered=e},h.prototype.filterCompletions=function(s,e){var i=[],t=e.toUpperCase(),n=e.toLowerCase();e:for(var o=0,l;l=s[o];o++){var p=!this.ignoreCaption&&l.caption||l.value||l.snippet;if(p){var a=-1,c=0,r=0,u,v;if(this.exactMatch){if(e!==p.substr(0,e.length))continue e}else{var f=p.toLowerCase().indexOf(n);if(f>-1)r=f;else for(var y=0;y=0&&(M<0||S0&&(a===-1&&(r+=10),r+=v,c=c|1<",b.escapeHTML(t.caption),"","
",b.escapeHTML(L(t.snippet))].join(""))},id:"snippetCompleter"},N=[_,g,w];x.setCompleters=function(t){N.length=0,t&&N.push.apply(N,t)},x.addCompleter=function(t){N.push(t)},x.textCompleter=g,x.keyWordCompleter=w,x.snippetCompleter=_;var E={name:"expandSnippet",exec:function(t){return $.expandWithTab(t)},bindKey:"Tab"},O=function(t,n){k(n.session.$mode)},k=function(t){typeof t=="string"&&(t=R.$modes[t]),t&&($.files||($.files={}),F(t.$id,t.snippetFileId),t.modes&&t.modes.forEach(k))},F=function(t,n){!n||!t||$.files[t]||($.files[t]={},R.loadModule(n,function(o){o&&($.files[t]=o,!o.snippets&&o.snippetText&&(o.snippets=$.parseSnippetFile(o.snippetText)),$.register(o.snippets||[],o.scope),o.includeScopes&&($.snippetMap[o.scope].includeScopes=o.includeScopes,o.includeScopes.forEach(function(l){k("ace/mode/"+l)})))}))},I=function(t){var n=t.editor,o=n.completer&&n.completer.activated;if(t.command.name==="backspace")o&&!m.getCompletionPrefix(n)&&n.completer.detach();else if(t.command.name==="insertstring"&&!o){h=t;var l=t.editor.$liveAutocompletionDelay;l?s.delay(l):e(t)}},h,s=b.delayedCall(function(){e(h)},0),e=function(t){var n=t.editor,o=m.getCompletionPrefix(n),l=m.triggerAutocomplete(n);if(o&&o.length>=n.$liveAutocompletionThreshold||l){var p=T.for(n);p.autoShown=!0,p.showPopup(n)}},i=d("../editor").Editor;d("../config").defineOptions(i.prototype,"editor",{enableBasicAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:N),this.commands.addCommand(T.startCommand)):this.commands.removeCommand(T.startCommand)},value:!1},enableLiveAutocompletion:{set:function(t){t?(this.completers||(this.completers=Array.isArray(t)?t:N),this.commands.on("afterExec",I)):this.commands.off("afterExec",I)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(t){t?(this.commands.addCommand(E),this.on("changeMode",O),O(null,this)):(this.commands.removeCommand(E),this.off("changeMode",O))},value:!1}})});(function(){ace.require(["ace/ext/language_tools"],function(d){typeof X=="object"&&typeof j=="object"&&X&&(X.exports=d)})})()});J();})();
//# sourceMappingURL=0cd2349b7f4b6f7013e195c8145d2917.js.map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy