Skip to content
Browse files

apex execute anonymous functionality

  • Loading branch information...
1 parent 5cfb8a7 commit 52912532bf875e9e9a9b3cbc3c0852a099e41960 Joe Ferraro committed Aug 26, 2012
View
8 Default.sublime-commands
@@ -20,8 +20,12 @@
"command": "compile_project"
},
{
- "caption": "Run Apex Tests",
- "command": "run_apex_unit_tests"
+ "caption": "MavensMate: Run Apex Tests",
+ "command": "run_apex_unit_tests"
+ },
+ {
+ "caption": "MavensMate: Execute Apex",
+ "command": "execute_anonymous"
},
{
"caption": "MavensMate: New Apex Class",
View
4 Main.sublime-menu
@@ -60,6 +60,10 @@
"command": "run_apex_unit_tests"
},
{
+ "caption": "Execute Apex",
+ "command": "execute_anonymous"
+ },
+ {
"id": "compile_active",
"caption": "Compile Active File",
"command": "compile_active_file"
View
7 commands/execute_anonymous.rb
@@ -0,0 +1,7 @@
+#!/usr/bin/env ruby -W0
+require File.dirname(File.dirname(__FILE__)) + "/constants.rb"
+include Constants
+require SUPPORT + "/environment.rb"
+require CONTROLLERS_ROOT + "/execute_controller.rb"
+ENV["MM_CURRENT_PROJECT_DIRECTORY"] = ARGV[0]
+dispatch :controller => "execute", :action => "index"
View
26 mavensmate.py
@@ -116,6 +116,12 @@ def run (self, dirs):
thread.start()
handle_threads(threads, printer, handle_result, 0)
+class ExecuteAnonymousCommand(sublime_plugin.ApplicationCommand):
+ def run(command):
+ start_local_server()
+ temp_file_name = generate_ui("execute_anonymous", mm_project_directory())
+ launch_mavens_mate_window(temp_file_name)
+
#displays edit project dialog
class EditProjectCommand(sublime_plugin.ApplicationCommand):
def run(command):
@@ -183,7 +189,7 @@ def run(self, files):
if sublime.ok_cancel_dialog("Are you sure you want to delete the selected files from Salesforce?", "Delete"):
printer = PanelPrinter.get(self.window.id())
printer.show()
- printer.write('Deleting Selected Metadata\n')
+ printer.write('\nDeleting Selected Metadata\n')
file_string = ','.join(files)
temp = tempfile.NamedTemporaryFile(delete=False, prefix="mm")
try:
@@ -333,6 +339,8 @@ def run(self):
msg_string = msg_string.replace(":null", "None")
msg_string = msg_string.replace("namespace\"None", "namespace\":None")
msg_string = msg_string.replace("\\n", "\\\n")
+ msg_string = msg_string.replace("problem\"None", "problem\":None")
+ msg_string = msg_string.replace("id\"None", "id\":None")
print "result is: " + msg_string
res = None
try:
@@ -370,7 +378,8 @@ def print_result_message(res, printer):
if isinstance(res, str):
clear_marked_line_numbers()
printer.write('\n[OPERATION FAILED]:' + res + '\n')
- elif 'check_deploy_status_response' in res and res['check_deploy_status_response']['result']['success'] == False:
+ elif 'check_deploy_status_response' in res and res['check_deploy_status_response']['result']['success'] == False and 'messages' in res['check_deploy_status_response']['result']:
+ #here we're parsing a response from the metadata endpoint
res = res['check_deploy_status_response']['result']
line_col = ""
msg = None
@@ -400,7 +409,18 @@ def print_result_message(res, printer):
elif failures != None:
for f in failures:
printer.write('\n[DEPLOYMENT FAILED]: ' + f['name'] + ', ' + f['method_name'] + ': ' + f['message'] + '\n')
-
+ elif 'check_deploy_status_response' in res and res['check_deploy_status_response']['result']['success'] == False and 'messages' not in res['check_deploy_status_response']['result']:
+ #here we're parsing a response from the apex endpoint
+ res = res['check_deploy_status_response']['result']
+ line_col = ""
+ if 'line' in res:
+ line_col = ' (Line: '+res['line']
+ mark_line_numbers([int(float(res['line']))])
+ if 'column' in res:
+ line_col += ', Column: '+res['column']
+ if len(line_col) > 0:
+ line_col += ')'
+ printer.write('\n[COMPILE FAILED]: ' + res['problem'] + line_col + '\n')
elif 'check_deploy_status_response' in res and res['check_deploy_status_response']['result']['success'] == True:
clear_marked_line_numbers()
printer.write('\n[Deployed Successfully]' + '\n')
View
12 support/app/controllers/execute_controller.rb
@@ -0,0 +1,12 @@
+# encoding: utf-8
+require SUPPORT + '/lib/mavensmate.rb'
+
+class ExecuteController < ApplicationController
+
+ layout "base", :only => [:index]
+
+ def index
+ render "_index"
+ end
+
+end
View
325 support/app/views/execute/_index.html.erb
@@ -0,0 +1,325 @@
+<link href="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/css/multiselect.css" rel="stylesheet" type="text/css"/>
+<link href="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/css/progress.css" rel="stylesheet" type="text/css"/>
+<script src="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/js/multi-select.js" type="text/javascript"></script>
+<script src="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/js/buttons.js" type="text/javascript"></script>
+<script src="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/js/modal.js" type="text/javascript"></script>
+<script src="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/js/ace.js" type="text/javascript"></script>
+<script src="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/js/mode-java.js" type="text/javascript"></script>
+<style>
+ #editor {
+ position:absolute;
+ top:0;
+ bottom:0;
+ left: 0;
+ right:0;
+ }
+ .results_hidden {
+ display:none;
+ }
+ #mm_logger {
+ display:none;
+ height:200px;
+ overflow-y:auto;
+ padding:10px;
+ border:1px solid #f2f2f2;
+ }
+
+ table.code {
+ display:none;
+ }
+
+ table.code td {
+ padding:0px;
+ }
+
+ table.code {
+ border: 1px solid #CCC;
+ width: 100%;
+ border-collapse: collapse;
+ font: 95%/105% "Consolas", Monaco, "Courier New", Courier, "Bitstream Vera Sans Mono", monospace;
+ }
+
+ table.code thead .line_numbers, table.code thead {
+ background: #DDD;
+ }
+
+ table.code td.covered {
+ background: #DFD;
+ }
+
+ table.code td.not_covered {
+ background: #fdd;
+ }
+
+ table.code tr td.line_numbers {
+ text-align: right;
+ vertical-align: top;
+ background: #EEE;
+ color: #555;
+ font-size: 90%;
+ padding: 2px;
+ padding-top: 0;
+ width: 35px;
+ border-right: 1px solid #CCC;
+ border-bottom: 1px solid #DDD;
+ vertical-align:middle;
+ }
+
+ table.code td {
+ vertical-align:middle;
+ border-top: 1px dotted #b5b5b5;
+ }
+
+ .block-message-custom {
+ background-image: none;
+ background-color: #F2F2F2;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ padding: 14px;
+ border-color: #CCC;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ }
+
+ .alert-message .btn {
+ font-weight:normal;
+ }
+
+ /*.container {
+ width: 100%;
+ margin-left: 12px;
+ } */
+
+ h4 {
+ background: none repeat scroll 0 0 #777777;
+ border: none;
+ font-weight:normal;
+ border-radius: 4px 4px 0 0;
+ color: #FFFFFF;
+ margin: 0;
+ padding: 3px;
+ text-align: center;
+ line-height:1.3;
+
+ background-color:#222;background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(top, #333333, #222222);background-image:-ms-linear-gradient(top, #333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(top, #333333, #222222);background-image:-o-linear-gradient(top, #333333, #222222);background-image:linear-gradient(top, #333333, #222222);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+
+
+
+
+ }
+
+ .ms-selectable, .ms-selection {
+ width:292px;
+ }
+
+ .ms-container {
+ background: none !important;
+ }
+
+ .ms-selectable {
+ margin-right:10px !important;
+ margin-bottom: 10px !important;
+ }
+
+ table.test_result {
+ border-top:none;
+ }
+ table.test_result th, table.test_result td {
+ padding:5px;
+ line-height:1;
+ }
+
+ embed.hidden {
+ position: absolute;
+ left: -10000px;
+ }
+
+ .gutter-mark {
+ background:red;
+ }
+
+</style>
+<div class="content" id="content1">
+ <div class="alert-message error" style="display:none;">
+ <p><strong id="error_message"></strong></p>
+ </div>
+ <div class="alert-message success" style="display:none;">
+ <p><strong>Success!</strong> You're operation completed sucessfully</p>
+ </div>
+
+ <ul class="tabs">
+ <li class="active"><a href="#tests_content">Apex Code</a></li>
+ <li class="results_hidden"><a href="#log" id="a_result">Log</a></li>
+ </ul>
+
+ <div class="pill-content">
+ <div class="active" id="tests_content">
+ <div id="editor_wrapper" style="position:relative;">
+ <div id="editor"></div>
+ </div>
+ <form class="form" style="margin:0px;padding-top:10px;">
+ <fieldset style="margin:0px;padding:0px;">
+ <div class="clearfix">
+ <label for="category" style="width:110px;margin-right:10px;">Log Category</label>
+ <select id="category">
+ <option>Db</option>
+ <option>Workflow</option>
+ <option>Validation</option>
+ <option>Callout</option>
+ <option value="Apex_code" selected="true">Apex Code</option>
+ <option value="Apex_profiling">Apex Profiling</option>
+ <option>All</option>
+ </select>
+ </div>
+ </fieldset>
+ <fieldset style="margin:0px;padding:0px;">
+ <div class="clearfix" id="levelwrapper">
+ <label for="level" style="width:110px;margin-right:10px;">Log Level</label>
+ <select id="level">
+ <option value="ERROR">ERROR</option>
+ <option value="WARN">WARN</option>
+ <option value="INFO">INFO</option>
+ <option value="DEBUG" selected="true">DEBUG</option>
+ <option value="FINE">FINE</option>
+ <option value="FINER">FINER</option>
+ <option value="FINEST">FINEST</option>
+ </select>
+ </div>
+ </fieldset>
+ </form>
+ </div>
+
+ <div id="log">
+ <div id="log_coverage_wrapper" style="-webkit-border-radius: 4px 4px 4px 4px;overflow-y:auto;padding:10px;position:relative;">
+
+ </div>
+ </div>
+ </div>
+</div>
+
+<form class="form-stacked" id="action_buttons" style="padding-left:12px;">
+ <fieldset style="padding-top:0px;position:relative;">
+ <div class="actions">
+ <input type="button" class="btn primary" value="Execute" onclick="execute_apex()" id="btnExecuteApex">
+ &nbsp;
+ <button type="reset" class="btn" onclick="window.close();">Cancel</button>
+ </div>
+ <img src="<%=ENV['TM_BUNDLE_SUPPORT']%>/resource/images/big_loading.gif" style="position:absolute;top:13px;right:25px;width:36px;display:none;" id="running_tests_indicator"/>
+ </fieldset>
+</form>
+
+
+<script>
+
+var editor;
+var line;
+
+function showBlanket() { $('#running_tests_indicator').fadeIn(); }
+
+function hideBlanket() { $('#running_tests_indicator').hide(); }
+
+function showSuccessMessage() {
+ $(".alert-message.error").hide()
+ $(".alert-message.success").show()
+ resize_height()
+}
+
+function showErrorMessage(message) {
+ $(".alert-message.error").show()
+ $("#error_message").html(message)
+ $(".alert-message.success").hide()
+ resize_height()
+}
+
+function execute_apex() {
+ $.ajax({
+ type: "POST",
+ url: "http://127.0.0.1:7777/execute",
+ dataType: "html",
+ data: {
+ body: editor.getValue(),
+ mm_current_project_directory: '<%= ENV['MM_CURRENT_PROJECT_DIRECTORY'] %>',
+ level: $("#level").val(),
+ category: $("#category").val()
+ },
+ beforeSend: function() { showBlanket(); $("#btnExecuteApex").hide(); editor.getSession().clearAnnotations(); editor.setReadOnly(true); },
+ complete: function(data){
+ var response = JSON.parse(data.responseText)
+ console.log(response)
+ //editor.getSession().removeGutterDecoration(line, 'gutter-mark');
+ try {
+ if (response["execute_anonymous_response"]["result"]["success"] == true) {
+ debug_log = response["log"]["debugging_info"]["debug_log"]
+ console.log(debug_log)
+ debug_log = debug_log.replace(/\n/g, "<br />");
+ $("#log_coverage_wrapper").html(debug_log)
+ $(".results_hidden").show();
+ $("#a_result").click();
+
+ } else {
+ result = response["execute_anonymous_response"]["result"]
+ var error_message = result["compile_problem"]
+ var exception_message = result["exception_message"]
+ message = error_message
+ if (exception_message != null && exception_message != "") {
+ message += "<br/><br/>" + exception_message
+ }
+ line = (parseInt(result["line"]) == -1) ? 0 : (parseInt(result["line"]) - 1)
+ var column = (parseInt(result["column"]) == -1) ? 0 : (parseInt(result["column"]) - 1)
+ editor.getSession().setAnnotations([{
+ row: line,
+ column: column,
+ text: message,
+ type: "error" // also warning and information
+ }]);
+ //var Range = require("ace/range").Range;
+ //var gd = editor.getSession().addGutterDecoration(line, 'gutter-mark');
+ //var marker = editor.getSession().addMarker(r,"ace_active_line","background");
+ }
+ } catch(e) {
+ console.log(e)
+ $("#log_coverage_wrapper").html(response)
+ $(".results_hidden").show();
+ $("#a_result").click();
+ }
+
+ hideBlanket();
+ $("#btnExecuteApex").show();
+ editor.setReadOnly(false);
+ }
+ });
+}
+
+function resize() {
+ window.resizeTo(575, 625);
+}
+
+function resize_height() {
+ window.resizeTo(window.width, document.getElementById('content1').offsetHeight+180);
+}
+
+function resize_editor() {
+ $("#editor_wrapper").css("width", $(window).width() - 25)
+ $("#editor_wrapper").css("height", $(window).height() - 275)
+}
+
+$(function(){
+ $('.tabs').tabs()
+ editor = ace.edit("editor");
+ var JavaMode = require("ace/mode/java").Mode;
+ editor.getSession().setMode(new JavaMode());
+
+ resize()
+ resize_editor()
+ editor.resize()
+ editor.focus()
+ window.moveTo((screen.width-675)/2,(screen.height-document.getElementById('content1').offsetHeight-400)/2)
+});
+
+$("#log_coverage_wrapper").height($(window).height() - 175)
+$(window).resize(function() {
+ $("#log_coverage_wrapper").height($(window).height() - 175)
+ resize_editor()
+});
+
+</script>
View
31 support/lib/client.rb
@@ -159,25 +159,46 @@ def retrieve(options={})
end
def compile_apex(options={})
+ res = {}
self.aclient = get_apex_client
- puts self.aclient.wsdl.soap_actions
+ #puts self.aclient.wsdl.soap_actions
if options[:type] == "ApexClass"
response = self.aclient.request :compile_classes do |soap|
soap.header = { "ins0:SessionHeader" => { "ins0:sessionId" => self.sid } }
soap.body = "<CompileClassesRequest>#{options[:body]}</CompileClassesRequest>"
end
+ res[:check_deploy_status_response] = response.to_hash[:compile_classes_response]
else
response = self.aclient.request :compile_triggers do |soap|
soap.header = { "ins0:SessionHeader" => { "ins0:sessionId" => self.sid } }
soap.body = "<CompileTriggersRequest>#{options[:body]}</CompileTriggersRequest>"
end
+ res[:check_deploy_status_response] = response.to_hash[:compile_triggers_response]
end
- require 'pp'
- pp response.header
- pp response.to_hash
+ #require 'pp'
+ #pp response.header
+ #pp response.to_hash
#response_body = response.to_hash
#response_body[:log] = response.header
- #return response_body
+ return res
+ end
+
+ def execute_apex(options={})
+ res = {}
+ self.aclient = get_apex_client
+ response = self.aclient.request :execute_anonymous do |soap|
+ soap.header = {
+ "ins0:SessionHeader" => { "ins0:sessionId" => self.sid },
+ "ins0:DebuggingHeader" => { "ins0:categories" => { "ins0:category" => options[:category], "ins0:level" => options[:level] } }
+ }
+ soap.body = "<apexcode>#{options[:body]}</apexcode>"
+ end
+ #require 'pp'
+ #pp response.header
+ #pp response.to_hash
+ response_body = response.to_hash
+ response_body[:log] = response.header
+ return response_body
end
def run_tests(tests=[], debug_options)
View
24 support/lib/local_server.rb
@@ -28,6 +28,7 @@ def start_test
server.mount('/test', ApexUnitTestServlet)
server.mount('/metadata/index', MetadataIndexServlet)
server.mount('/deploy', DeployServlet)
+ server.mount('/execute', ExecuteApexServlet)
server.start
end
@@ -50,6 +51,7 @@ def start
server.mount('/test', ApexUnitTestServlet)
server.mount('/metadata/index', MetadataIndexServlet)
server.mount('/deploy', DeployServlet)
+ server.mount('/execute', ExecuteApexServlet)
server.start
end
@@ -62,6 +64,28 @@ def stop
end
end
+ class ExecuteApexServlet < WEBrick::HTTPServlet::AbstractServlet
+ def do_POST(req, resp)
+ begin
+ ENV["MM_CURRENT_PROJECT_DIRECTORY"] = req.query["mm_current_project_directory"]
+ resp['Content-Type'] = 'json'
+ options = {
+ :level => req.query["level"],
+ :category => req.query["category"],
+ :body => req.query["body"]
+ }
+ result = MavensMate.execute_apex(options)
+ resp.body = result.to_json
+ rescue Exception => e
+ result = {
+ :success => false,
+ :message => e.message + e.backtrace.join("\n")
+ }
+ resp.body = result.to_json
+ end
+ end
+ end
+
class ApexUnitTestServlet < WEBrick::HTTPServlet::AbstractServlet
def do_POST(req, resp)
ENV["MM_CURRENT_PROJECT_DIRECTORY"] = req.query["mm_current_project_directory"]
View
43 support/lib/mavensmate.rb
@@ -180,8 +180,6 @@ def self.checkout_project(params)
#creates new metadata (ApexClass, ApexTrigger, ApexPage, ApexComponent)
def self.new_metadata(options={})
- #meta_type, api_name, object_api_name
- #validate [:internet, :mm_project]
begin
object_name = options[:object_api_name] || ""
apex_class_type = options[:apex_class_type] || "base"
@@ -222,13 +220,31 @@ def self.new_metadata(options={})
#compiles selected file(s) or active file
def self.save(active_file=false)
- #validate [:internet, :mm_project]
result = nil
begin
- #puts '<div id="mm_logger">'
- #compiling_what = (!active_file) ? "Selected Metadata" : File.basename(ENV['TM_FILEPATH'])
-
client = MavensMate::Client.new
+ if ENV["TM_FILEPATH"].end_with?("trigger") or ENV["TM_FILEPATH"].end_with?("cls")
+ options = {}
+ file = File.open(ENV["TM_FILEPATH"], "rb")
+ file_body = file.read
+ file.close
+ if ENV["TM_FILEPATH"].end_with?("trigger")
+ options = {:type => "ApexTrigger", :body => file_body }
+ else
+ options = {:type => "ApexClass", :body => file_body }
+ end
+ begin
+ result = client.compile_apex(options)
+ puts result.to_json
+ return
+ rescue Exception => e
+ #res = { :success => false, :message => e.message + "\n" + e.backtrace.join("\n")}
+ #puts res.to_json
+ #return
+ #exception is OK here, let's assume we need to do a straight deploy call
+ end
+ end
+
files_to_save = get_metadata_hash(active_file)
#if client.has_server_conflict(files_to_save)
@@ -243,16 +259,24 @@ def self.save(active_file=false)
zip_file = MavensMate::FileFactory.put_tmp_metadata(files_to_save)
result = client.deploy({:zip_file => zip_file, :deploy_options => "<rollbackOnError>true</rollbackOnError>"})
puts result.to_json
- #puts "</div>"
rescue Exception => e
- res = { :success => false, :message => e.message }
+ res = { :success => false, :message => e.message+ "\n" + e.backtrace.join("\n") }
puts res.to_json
- #alert e.message
end
# if ! result[:check_deploy_status_response][:result][:success]
# TextMate.exit_show_html(dispatch :controller => "deploy", :action => "show_compile_result", :result => result)
# end
end
+
+ def self.execute_apex(options)
+ begin
+ client = MavensMate::Client.new
+ result = client.execute_apex(options)
+ return result
+ rescue Exception => e
+ return { :success => false, :message => e.message }
+ end
+ end
#refreshes the selected file from the server // TODO:selected *files*
def self.refresh_selected_file
@@ -460,7 +484,6 @@ def self.deploy_to_server(params)
end
def self.diff(params)
- #validate [:internet, :mm_project]
hash = params[:package]
deploy = true
tmp_dir = Dir.tmpdir
View
11 support/resource/js/ace.js
11 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
1 support/resource/js/mode-java.js
@@ -0,0 +1 @@
+define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/tokenizer","ace/mode/java_highlight_rules"],function(a,b,c){var d=a("../lib/oop"),e=a("./javascript").Mode,f=a("../tokenizer").Tokenizer,g=a("./java_highlight_rules").JavaHighlightRules,h=function(){e.call(this),this.$tokenizer=new f((new g).getRules())};d.inherits(h,e),function(){this.createWorker=function(a){return null}}.call(h.prototype),b.Mode=h}),define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(a,b,c){var d=a("../lib/oop"),e=a("./text").Mode,f=a("../tokenizer").Tokenizer,g=a("./javascript_highlight_rules").JavaScriptHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("../range").Range,j=a("../worker/worker_client").WorkerClient,k=a("./behaviour/cstyle").CstyleBehaviour,l=a("./folding/cstyle").FoldMode,m=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k,this.foldingRules=new l};d.inherits(m,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=/^(\s*)\/\//;for(var g=c;g<=d;g++)if(!f.test(b.getLine(g))){e=!1;break}if(e){var h=new i(0,0,0,0);for(var g=c;g<=d;g++){var j=b.getLine(g),k=j.match(f);h.start.row=g,h.end.row=g,h.end.column=k[0].length,b.replace(h,k[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"||a=="regex_allowed"){var h=b.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start"||a=="regex_allowed")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new j(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return b.attachToDocument(a.getDocument()),b.on("jslint",function(b){var c=[];for(var d=0;d<b.data.length;d++){var e=b.data[d];e&&c.push({row:e.line-1,column:e.character-1,text:e.reason,type:"warning",lint:e})}a.setAnnotations(c)}),b.on("narcissus",function(b){a.setAnnotations([b.data])}),b.on("terminate",function(){a.clearAnnotations()}),b}}.call(m.prototype),b.Mode=m}),define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/unicode","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("../lib/oop"),e=a("../lib/lang"),f=a("../unicode"),g=a("./doc_comment_highlight_rules").DocCommentHighlightRules,h=a("./text_highlight_rules").TextHighlightRules,i=function(){var a=e.arrayToMap("Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document".split("|")),b=e.arrayToMap("break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|const|yield|import|get|set".split("|")),c="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield",d=e.arrayToMap("__parent__|__count__|escape|unescape|with|__proto__".split("|")),h=e.arrayToMap("const|let|var|function".split("|")),i=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),j=e.arrayToMap("class|enum|extends|super|export|implements|private|public|interface|package|protected|static".split("|")),k="["+f.packages.L+"\\$_]["+f.packages.L+f.packages.Mn+f.packages.Mc+f.packages.Nd+f.packages.Pc+"\\$_]*\\b",l="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)";this.$rules={start:[{token:"comment",regex:/\/\/.*$/},g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0[xX][0-9a-fA-F]+\b/},{token:"constant.numeric",regex:/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator","text"],regex:"("+k+")(\\.)(prototype)(\\.)("+k+")(\\s*)(=)(\\s*)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+k+")(\\.)("+k+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+k+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+k+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"constant.language.boolean",regex:/(?:true|false)\b/},{token:"keyword",regex:"(?:"+c+")\\b",next:"regex_allowed"},{token:["punctuation.operator","support.function"],regex:/(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:opzzzz|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:["punctuation.operator","support.function.dom"],regex:/(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:["punctuation.operator","support.constant"],regex:/(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/},{token:function(c){return a.hasOwnProperty(c)?"variable.language":d.hasOwnProperty(c)?"invalid.deprecated":h.hasOwnProperty(c)?"storage.type":b.hasOwnProperty(c)?"keyword":i.hasOwnProperty(c)?"constant.language":j.hasOwnProperty(c)?"invalid.illegal":c=="debugger"?"invalid.deprecated":"identifier"},regex:k},{token:"keyword.operator",regex:/!|\$|%|&|\*|\-\-|\-|\+\+|\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=|\b(?:in|instanceof|new|delete|typeof|void)/,next:"regex_allowed"},{token:"punctuation.operator",regex:/\?|\:|\,|\;|\./,next:"regex_allowed"},{token:"paren.lparen",regex:/[\[({]/,next:"regex_allowed"},{token:"paren.rparen",regex:/[\])}]/},{token:"keyword.operator",regex:/\/=?/,next:"regex_allowed"},{token:"comment",regex:/^#!.*$/},{token:"text",regex:/\s+/}],regex_allowed:[g.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment_regex_allowed"},{token:"comment",regex:"\\/\\/.*$"},{token:"string.regexp",regex:"\\/",next:"regex",merge:!0},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/\\w*",next:"start",merge:!0},{token:"string.regexp",regex:"[^\\\\/\\[]+",merge:!0},{token:"string.regexp.charachterclass",regex:"\\[",next:"regex_character_class",merge:!0},{token:"empty",regex:"",next:"start"}],regex_character_class:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp.charachterclass",regex:"]",next:"regex",merge:!0},{token:"string.regexp.charachterclass",regex:"[^\\\\\\]]+",merge:!0},{token:"empty",regex:"",next:"start"}],function_arguments:[{token:"variable.parameter",regex:k},{token:"punctuation.operator",regex:"[, ]+",merge:!0},{token:"punctuation.operator",regex:"$",merge:!0},{token:"empty",regex:"",next:"start"}],comment_regex_allowed:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"regex_allowed"},{token:"comment",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?\\*\\/",merge:!0,next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"constant.language.escape",regex:l},{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]},this.embedRules(g,"doc-",[g.getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),f.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},f.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}},b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour"],function(a,b,c){var d=a("../../lib/oop"),e=a("../behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return null;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}")return e.end.column++,e}}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")")return e.end.column++,e}}),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="["){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"["+g+"]",selection:!1}:{text:"[]",selection:[1,1]}}if(e=="]"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="]"){var k=d.$findOpeningBracket("]",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="["){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=="]")return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'||e=="'"){var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(h!=="")return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if(k=="\\")return null;var l=d.getTokens(g.start.row),m=0,n,o=-1;for(var p=0;p<l.length;p++){n=l[p],n.type=="string"?o=-1:o<0&&(o=n.value.indexOf(f));if(n.value.length+m>g.start.column)break;m+=l[p].value.length}if(!n||o<0&&n.type!=="comment"&&(n.type!=="string"||g.start.column!==n.value.length+m-1&&n.value.lastIndexOf(f)===n.value.length-1))return{text:f+f,selection:[1,1]};if(n&&n.type==="string"){var q=j.substring(i.column,i.column+1);if(q==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&(f=='"'||f=="'")){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"')return e.end.column++,e}})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(){};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c){var d=a.getLine(c),f=d.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length);return h.end.column-=2,h}if(b!=="markbeginend")return;var f=d.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;if(f[2]){var h=a.getCommentFoldRange(c,g);return h.end.column-=2,h}var i={row:c,column:g},j=a.$findOpeningBracket(f[1],i);if(!j)return;return j.column++,i.column--,e.fromPoints(j,i)}}}.call(g.prototype)}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":b=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/\S/,f=a.getLine(b),g=f.search(e);if(g==-1)return;var h=c||f.length,i=a.getLength(),j=b,k=b;while(++b<i){var l=a.getLine(b).search(e);if(l==-1)continue;if(l<=g)break;k=b}if(k>j){var m=a.getLine(k).length;return new d(j,h,k,m)}},this.openingBracketBlock=function(a,b,c,e,f){var g={row:c,column:e+1},h=a.$findClosingBracket(b,g,f);if(!h)return;var i=a.foldWidgets[h.row];return i==null&&(i=this.getFoldWidget(a,h.row)),i=="start"&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),d.fromPoints(g,h)}}).call(e.prototype)}),define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("../lib/oop"),e=a("../lib/lang"),f=a("./doc_comment_highlight_rules").DocCommentHighlightRules,g=a("./text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("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".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("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".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},f.getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{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"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},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"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[f.getEndRule("start")])};d.inherits(h,g),b.JavaHighlightRules=h})
View
1 support/resource/js/theme-twilight.js
@@ -0,0 +1 @@
+define("ace/theme/twilight",["require","exports","module","ace/lib/dom"],function(a,b,c){b.isDark=!0,b.cssClass="ace-twilight",b.cssText=".ace-twilight .ace_editor { border: 2px solid rgb(159, 159, 159);}.ace-twilight .ace_editor.ace_focus { border: 2px solid #327fbd;}.ace-twilight .ace_gutter { background: #232323; color: #E2E2E2;}.ace-twilight .ace_print_margin { width: 1px; background: #232323;}.ace-twilight .ace_scroller { background-color: #141414;}.ace-twilight .ace_text-layer { color: #F8F8F8;}.ace-twilight .ace_cursor { border-left: 2px solid #A7A7A7;}.ace-twilight .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid #A7A7A7;}.ace-twilight .ace_marker-layer .ace_selection { background: rgba(221, 240, 255, 0.20);}.ace-twilight.multiselect .ace_selection.start { box-shadow: 0 0 3px 0px #141414; border-radius: 2px;}.ace-twilight .ace_marker-layer .ace_step { background: rgb(102, 82, 0);}.ace-twilight .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgba(255, 255, 255, 0.25);}.ace-twilight .ace_marker-layer .ace_active_line { background: rgba(255, 255, 255, 0.031);}.ace-twilight .ace_gutter_active_line { background-color: rgba(255, 255, 255, 0.031);}.ace-twilight .ace_marker-layer .ace_selected_word { border: 1px solid rgba(221, 240, 255, 0.20);}.ace-twilight .ace_invisible { color: rgba(255, 255, 255, 0.25);}.ace-twilight .ace_keyword, .ace-twilight .ace_meta { color:#CDA869;}.ace-twilight .ace_constant, .ace-twilight .ace_constant.ace_other { color:#CF6A4C;}.ace-twilight .ace_constant.ace_character, { color:#CF6A4C;}.ace-twilight .ace_constant.ace_character.ace_escape, { color:#CF6A4C;}.ace-twilight .ace_invalid.ace_illegal { color:#F8F8F8;background-color:rgba(86, 45, 86, 0.75);}.ace-twilight .ace_invalid.ace_deprecated { text-decoration:underline;font-style:italic;color:#D2A8A1;}.ace-twilight .ace_support { color:#9B859D;}.ace-twilight .ace_support.ace_constant { color:#CF6A4C;}.ace-twilight .ace_fold { background-color: #AC885B; border-color: #F8F8F8;}.ace-twilight .ace_support.ace_function { color:#DAD085;}.ace-twilight .ace_storage { color:#F9EE98;}.ace-twilight .ace_variable { color:#AC885B;}.ace-twilight .ace_string { color:#8F9D6A;}.ace-twilight .ace_string.ace_regexp { color:#E9C062;}.ace-twilight .ace_comment { font-style:italic;color:#5F5A60;}.ace-twilight .ace_variable { color:#7587A6;}.ace-twilight .ace_xml_pe { color:#494949;}.ace-twilight .ace_meta.ace_tag { color:#AC885B;}.ace-twilight .ace_entity.ace_name.ace_function { color:#AC885B;}.ace-twilight .ace_markup.ace_underline { text-decoration:underline;}.ace-twilight .ace_markup.ace_heading { color:#CF6A4C;}.ace-twilight .ace_markup.ace_list { color:#F9EE98;}.ace-twilight .ace_indent-guide { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERH5zzBz5sz/AA5EBAYqeZXWAAAAAElFTkSuQmCC) right repeat-y;}";var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)})

0 comments on commit 5291253

Please sign in to comment.
Something went wrong with that request. Please try again.