mode-drools-35c088fd.js 11 KB

1
  1. import{g as v}from"./index-3157015c.js";function _(c,k){for(var e=0;e<k.length;e++){const t=k[e];if(typeof t!="string"&&!Array.isArray(t)){for(const l in t)if(l!=="default"&&!(l in c)){const a=Object.getOwnPropertyDescriptor(t,l);a&&Object.defineProperty(c,l,a.get?a:{enumerable:!0,get:()=>t[l]})}}}return Object.freeze(Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}))}var b={exports:{}};(function(c,k){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,l){var a=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@\\w+(?=\\s|$)"},o.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};a.inherits(o,i),o.getTagRule=function(r){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},o.getStartRule=function(r){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:r}},o.getEndRule=function(r){return{token:"comment.doc",regex:"\\*\\/",next:r}},t.DocCommentHighlightRules=o}),ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(e,t,l){var a=e("../lib/oop"),i=e("./doc_comment_highlight_rules").DocCommentHighlightRules,o=e("./text_highlight_rules").TextHighlightRules,r=function(){var n="abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var",s="null|Infinity|NaN|undefined",p="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",d=this.createKeywordMapper({"variable.language":"this",keyword:n,"constant.language":s,"support.function":p},"identifier");this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},i.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/},{token:"constant.numeric",regex:/[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{regex:"(open(?:\\s+))?module(?=\\s*\\w)",token:"keyword",next:[{regex:"{",token:"paren.lparen",next:[{regex:"}",token:"paren.rparen",next:"start"},{regex:"\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b",token:"keyword"}]},{token:"text",regex:"\\s+"},{token:"identifier",regex:"\\w+"},{token:"punctuation.operator",regex:"."},{token:"text",regex:"\\s+"},{regex:"",next:"start"}]},{token:d,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\||\\^|\\*|\\/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?|\\:|\\*=|\\/=|%=|\\+=|\\-=|&=|\\|=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}]},this.embedRules(i,"doc-",[i.getEndRule("start")]),this.normalizeRules()};a.inherits(r,o),t.JavaHighlightRules=r}),ace.define("ace/mode/drools_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/java_highlight_rules","ace/mode/doc_comment_highlight_rules"],function(e,t,l){var a=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,o=e("./java_highlight_rules").JavaHighlightRules,r=e("./doc_comment_highlight_rules").DocCommentHighlightRules,n="[a-zA-Z\\$_¡-￿][a-zA-Z\\d\\$_¡-￿]*",s="[a-zA-Z\\$_¡-￿][\\.a-zA-Z\\d\\$_¡-￿]*",p=function(){var d="date|effective|expires|lock|on|active|no|loop|auto|focus|activation|group|agenda|ruleflow|duration|timer|calendars|refract|direct|dialect|salience|enabled|attributes|extends|template|function|contains|matches|eval|excludes|soundslike|memberof|not|in|or|and|exists|forall|over|from|entry|point|accumulate|acc|collect|action|reverse|result|end|init|instanceof|extends|super|boolean|char|byte|short|int|long|float|double|this|void|class|new|case|final|if|else|for|while|do|default|try|catch|finally|switch|synchronized|return|throw|break|continue|assert|modify|static|public|protected|private|abstract|native|transient|volatile|strictfp|throws|interface|enum|implements|type|window|trait|no-loop|str",m="AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object",h=this.createKeywordMapper({"variable.language":"this",keyword:d,"constant.language":"null","support.class":m,"support.function":"retract|update|modify|insert"},"identifier"),x=function(){return[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"}]},u=function(E){return[{token:"comment",regex:"\\/\\/.*$"},r.getStartRule("doc-start"),{token:"comment",regex:"\\/\\*",next:E},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"}]},f=function(E){return[{token:"comment.block",regex:"\\*\\/",next:E},{defaultToken:"comment.block"}]},g=function(){return[{token:h,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]};this.$rules={start:[].concat(u("block.comment"),[{token:"entity.name.type",regex:"@[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:["keyword","text","entity.name.type"],regex:"(package)(\\s+)("+s+")"},{token:["keyword","text","keyword","text","entity.name.type"],regex:"(import)(\\s+)(function)(\\s+)("+s+")"},{token:["keyword","text","entity.name.type"],regex:"(import)(\\s+)("+s+")"},{token:["keyword","text","entity.name.type","text","variable"],regex:"(global)(\\s+)("+s+")(\\s+)("+n+")"},{token:["keyword","text","keyword","text","entity.name.type"],regex:"(declare)(\\s+)(trait)(\\s+)("+n+")"},{token:["keyword","text","entity.name.type"],regex:"(declare)(\\s+)("+n+")"},{token:["keyword","text","entity.name.type"],regex:"(extends)(\\s+)("+s+")"},{token:["keyword","text"],regex:"(rule)(\\s+)",next:"asset.name"}],x(),[{token:["variable.other","text","text"],regex:"("+n+")(\\s*)(:)"},{token:["keyword","text"],regex:"(query)(\\s+)",next:"asset.name"},{token:["keyword","text"],regex:"(when)(\\s*)"},{token:["keyword","text"],regex:"(then)(\\s*)",next:"java-start"},{token:"paren.lparen",regex:/[\[({]/},{token:"paren.rparen",regex:/[\])}]/}],g()),"block.comment":f("start"),"asset.name":[{token:"entity.name",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"entity.name",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"entity.name",regex:n},{regex:"",token:"empty",next:"start"}]},this.embedRules(r,"doc-",[r.getEndRule("start")]),this.embedRules(o,"java-",[{token:"support.function",regex:"\\b(insert|modify|retract|update)\\b"},{token:"keyword",regex:"\\bend\\b",next:"start"}])};a.inherits(p,i),t.DroolsHighlightRules=p}),ace.define("ace/mode/folding/drools",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"],function(e,t,l){var a=e("../../lib/oop"),i=e("../../range").Range,o=e("./fold_mode").FoldMode,r=e("../../token_iterator").TokenIterator,n=t.FoldMode=function(){};a.inherits(n,o),function(){this.foldingStartMarker=/\b(rule|declare|query|when|then)\b/,this.foldingStopMarker=/\bend\b/,this.getFoldWidgetRange=function(s,p,d){var m=s.getLine(d),h=m.match(this.foldingStartMarker);if(h&&(h.index,h[1])){var x={row:d,column:m.length},u=new r(s,x.row,x.column),f="end",g=u.getCurrentToken();for(g.value=="when"&&(f="then");g;){if(g.value==f)return i.fromPoints(x,{row:u.getCurrentTokenRow(),column:u.getCurrentTokenColumn()});g=u.stepForward()}}}}.call(n.prototype)}),ace.define("ace/mode/drools",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/drools_highlight_rules","ace/mode/folding/drools"],function(e,t,l){var a=e("../lib/oop"),i=e("./text").Mode,o=e("./drools_highlight_rules").DroolsHighlightRules,r=e("./folding/drools").FoldMode,n=function(){this.HighlightRules=o,this.foldingRules=new r,this.$behaviour=this.$defaultBehaviour};a.inherits(n,i),function(){this.lineCommentStart="//",this.$id="ace/mode/drools",this.snippetFileId="ace/snippets/drools"}.call(n.prototype),t.Mode=n}),function(){ace.require(["ace/mode/drools"],function(e){c&&(c.exports=e)})}()})(b);var y=b.exports;const w=v(y),C=_({__proto__:null,default:w},[y]);export{C as m};