ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(n,c,p){"use strict";var h=n("../lib/oop"),g=n("./text_highlight_rules").TextHighlightRules,d=function(){var r=this.createKeywordMapper({"support.function":"avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",keyword:"select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|then|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant|distinct|is|in","constant.language":"true|false","storage.type":"int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer"},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:r,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};h.inherits(d,g),c.SqlHighlightRules=d}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(n,c,p){"use strict";var h=n("../../lib/oop"),g=n("../../range").Range,d=n("./fold_mode").FoldMode,f=c.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};h.inherits(f,d),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,i){var r=e.getLine(i);if(this.singleLineBlockCommentRe.test(r)&&!this.startRegionRe.test(r)&&!this.tripleStarBlockCommentRe.test(r))return"";var a=this._getFoldWidgetBase(e,t,i);return!a&&this.startRegionRe.test(r)?"start":a},this.getFoldWidgetRange=function(e,t,i,r){var o,a=e.getLine(i);if(this.startRegionRe.test(a))return this.getCommentRegionBlock(e,a,i);if(o=a.match(this.foldingStartMarker)){var s=o.index;if(o[1])return this.openingBracketBlock(e,o[1],i,s);var l=e.getCommentFoldRange(i,s+o[0].length,1);return l&&!l.isMultiLine()&&(r?l=this.getSectionRange(e,i):"all"!=t&&(l=null)),l}return"markbegin"!==t&&(o=a.match(this.foldingStopMarker))?(s=o.index+o[0].length,o[1]?this.closingBracketBlock(e,o[1],i,s):e.getCommentFoldRange(i,s,-1)):void 0},this.getSectionRange=function(e,t){for(var i=e.getLine(t),r=i.search(/\S/),a=t,s=i.length,l=t+=1,o=e.getLength();++t<o;){var m=(i=e.getLine(t)).search(/\S/);if(-1!==m){if(r>m)break;var u=this.getFoldWidgetRange(e,"all",t);if(u){if(u.start.row<=a)break;if(u.isMultiLine())t=u.end.row;else if(r==m)break}l=t}}return new g(a,s,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,i){for(var r=t.search(/\s*$/),a=e.getLength(),s=i,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,o=1;++i<a;){t=e.getLine(i);var m=l.exec(t);if(m&&(m[1]?o--:o++,!o))break}if(i>s)return new g(s,r,i,t.length)}}.call(f.prototype)}),ace.define("ace/mode/folding/sql",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle"],function(n,c,p){"use strict";var h=n("../../lib/oop"),g=n("./cstyle").FoldMode,d=c.FoldMode=function(){};h.inherits(d,g),function(){}.call(d.prototype)}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules","ace/mode/folding/sql"],function(n,c,p){"use strict";var h=n("../lib/oop"),g=n("./text").Mode,d=n("./sql_highlight_rules").SqlHighlightRules,f=n("./folding/sql").FoldMode,e=function(){this.HighlightRules=d,this.foldingRules=new f,this.$behaviour=this.$defaultBehaviour};h.inherits(e,g),function(){this.lineCommentStart="--",this.blockComment={start:"/*",end:"*/"},this.$id="ace/mode/sql",this.snippetFileId="ace/snippets/sql"}.call(e.prototype),c.Mode=e}),ace.require(["ace/mode/sql"],function(n){"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=n)});