openc3-cosmos-tool-cmdsender 5.13.0 → 5.14.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,41 +0,0 @@
1
- (self["webpackChunk_openc3_cosmos_tool_cmdsender"]=self["webpackChunk_openc3_cosmos_tool_cmdsender"]||[]).push([[398],{5343:(e,t,n)=>{e=n.nmd(e),ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text_highlight_rules").TextHighlightRules,r=t.constantOtherSymbol={token:"constant.other.symbol.ruby",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"};t.qString={token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},t.qqString={token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},t.tString={token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"};var s=t.constantNumericHex={token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},a=t.constantNumericBinary={token:"constant.numeric",regex:/\b(0[bB][01](?:[01]|_(?=[01]))*)\b/},l=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[dD](?:[1-9](?:[\d]|_(?=[\d]))*|0))\b/},c=t.constantNumericDecimal={token:"constant.numeric",regex:/\b(0[oO]?(?:[1-7](?:[0-7]|_(?=[0-7]))*|0))\b/},h=t.constantNumericRational={token:"constant.numeric",regex:/\b([\d]+(?:[./][\d]+)?ri?)\b/},u=t.constantNumericComplex={token:"constant.numeric",regex:/\b([\d]i)\b/},d=t.constantNumericFloat={token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?i?\\b"},p=t.instanceVariable={token:"variable.instance",regex:"@{1,2}[a-zA-Z_\\d]+"},g=function(){var e="abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many|p|warn|refine|using|module_function|extend|alias_method|private_class_method|remove_method|undef_method",t="alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield|__ENCODING__|prepend",n="true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING|RUBY_PATCHLEVEL|RUBY_REVISION|RUBY_COPYRIGHT|RUBY_ENGINE|RUBY_ENGINE_VERSION|RUBY_DESCRIPTION",i="$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger|self",o=this.$keywords=this.createKeywordMapper({keyword:t,"constant.language":n,"variable.language":i,"support.function":e,"invalid.deprecated":"debugger"},"identifier"),g="\\\\(?:n(?:[1-7][0-7]{0,2}|0)|[nsrtvfbae'\"\\\\]|c(?:\\\\M-)?.|M-(?:\\\\C-|\\\\c)?.|C-(?:\\\\M-)?.|[0-7]{3}|x[\\da-fA-F]{2}|u[\\da-fA-F]{4}|u{[\\da-fA-F]{1,6}(?:\\s[\\da-fA-F]{1,6})*})",f={"(":")","[":"]","{":"}","<":">","^":"^","|":"|","%":"%"};this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment.multiline",regex:"^=begin(?=$|\\s.*$)",next:"comment"},{token:"string.regexp",regex:/[/](?=.*\/)/,next:"regex"},[{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(")/,push:[{token:"constant.language.escape",regex:g},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/"/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/`/,push:[{token:"constant.language.escape",regex:g},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/`/,next:"pop"},{defaultToken:"string"}]},{token:["constant.other.symbol.ruby","string.start"],regex:/(:)?(')/,push:[{token:"constant.language.escape",regex:/\\['\\]/},{token:"string.end",regex:/'/,next:"pop"},{defaultToken:"string"}]},{token:"string.start",regex:/%[qwx]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var i=e[e.length-1];return n.unshift(i,t),this.next="qStateWithoutInterpolation",this.token}},{token:"string.start",regex:/%[QWX]?([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var i=e[e.length-1];return n.unshift(i,t),this.next="qStateWithInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[si]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var i=e[e.length-1];return n.unshift(i,t),this.next="sStateWithoutInterpolation",this.token}},{token:"constant.other.symbol.ruby",regex:/%[SI]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var i=e[e.length-1];return n.unshift(i,t),this.next="sStateWithInterpolation",this.token}},{token:"string.regexp",regex:/%[r]([(\[<{^|%])/,onMatch:function(e,t,n){n.length&&(n=[]);var i=e[e.length-1];return n.unshift(i,t),this.next="rState",this.token}}],{token:"punctuation",regex:"::"},p,{token:"variable.global",regex:"[$][a-zA-Z_\\d]+"},{token:"support.class",regex:"[A-Z][a-zA-Z_\\d]*"},{token:["punctuation.operator","support.function"],regex:/(\.)([a-zA-Z_\d]+)(?=\()/},{token:["punctuation.operator","identifier"],regex:/(\.)([a-zA-Z_][a-zA-Z_\d]*)/},{token:"string.character",regex:"\\B\\?(?:"+g+"|\\S)"},{token:"punctuation.operator",regex:/\?(?=.+:)/},h,u,r,s,d,a,l,c,{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:o,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"punctuation.separator.key-value",regex:"=>"},{stateName:"heredoc",onMatch:function(e,t,n){var i="-"==e[2]||"~"==e[2]?"indentedHeredoc":"heredoc",o=e.split(this.splitRegex);return n.push(i,o[3]),[{type:"constant",value:o[1]},{type:"string",value:o[2]},{type:"support.class",value:o[3]},{type:"string",value:o[4]}]},regex:"(<<[-~]?)(['\"`]?)([\\w]+)(['\"`]?)",rules:{heredoc:[{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}],indentedHeredoc:[{token:"string",regex:"^ +"},{onMatch:function(e,t,n){return e===n[1]?(n.shift(),n.shift(),this.next=n[0]||"start","support.class"):(this.next="","string")},regex:".*$",next:"start"}]}},{regex:"$",token:"empty",next:function(e,t){return"heredoc"===t[0]||"indentedHeredoc"===t[0]?t[0]:e}},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|/|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\||\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]",onMatch:function(e,t,n){return this.next="","}"==e&&n.length>1&&"start"!=n[1]&&(n.shift(),this.next=n.shift()),this.token}},{token:"text",regex:"\\s+"},{token:"punctuation.operator",regex:/[?:,;.]/}],comment:[{token:"comment.multiline",regex:"^=end(?=$|\\s.*$)",next:"start"},{token:"comment",regex:".+"}],qStateWithInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:g},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===f[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],qStateWithoutInterpolation:[{token:"string.start",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"string"}},{token:"constant.language.escape",regex:/\\['\\]/},{token:"constant.language.escape",regex:/\\./},{token:"string.end",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===f[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","string")}},{defaultToken:"string"}],sStateWithoutInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===f[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],sStateWithInterpolation:[{token:"constant.other.symbol.ruby",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.other.symbol.ruby"}},{token:"constant.language.escape",regex:g},{token:"constant.language.escape",regex:/\\./},{token:"paren.start",regex:/#{/,push:"start"},{token:"constant.other.symbol.ruby",regex:/[)\]>}^|%]/,onMatch:function(e,t,n){return n.length&&e===f[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.other.symbol.ruby")}},{defaultToken:"constant.other.symbol.ruby"}],rState:[{token:"string.regexp",regex:/[(\[<{]/,onMatch:function(e,t,n){return n.length&&e===n[0]?(n.unshift(e,t),this.token):"constant.language.escape"}},{token:"paren.start",regex:/#{/,push:"start"},{token:"string.regexp",regex:/\//},{token:"string.regexp",regex:/[)\]>}^|%][imxouesn]*/,onMatch:function(e,t,n){return n.length&&e[0]===f[n[0]]?(n.shift(),this.next=n.shift(),this.token):(this.next="","constant.language.escape")}},{include:"regex"},{defaultToken:"string.regexp"}],regex:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"constant.language.escape",regex:/\\[AGbBzZ]/},{token:"constant.language.escape",regex:/\\g<[a-zA-Z0-9]*>/},{token:["constant.language.escape","regexp.keyword","constant.language.escape"],regex:/(\\p{\^?)(Alnum|Alpha|Blank|Cntrl|Digit|Graph|Lower|Print|Punct|Space|Upper|XDigit|Word|ASCII|Any|Assigned|Arabic|Armenian|Balinese|Bengali|Bopomofo|Braille|Buginese|Buhid|Canadian_Aboriginal|Carian|Cham|Cherokee|Common|Coptic|Cuneiform|Cypriot|Cyrillic|Deseret|Devanagari|Ethiopic|Georgian|Glagolitic|Gothic|Greek|Gujarati|Gurmukhi|Han|Hangul|Hanunoo|Hebrew|Hiragana|Inherited|Kannada|Katakana|Kayah_Li|Kharoshthi|Khmer|Lao|Latin|Lepcha|Limbu|Linear_B|Lycian|Lydian|Malayalam|Mongolian|Myanmar|New_Tai_Lue|Nko|Ogham|Ol_Chiki|Old_Italic|Old_Persian|Oriya|Osmanya|Phags_Pa|Phoenician|Rejang|Runic|Saurashtra|Shavian|Sinhala|Sundanese|Syloti_Nagri|Syriac|Tagalog|Tagbanwa|Tai_Le|Tamil|Telugu|Thaana|Thai|Tibetan|Tifinagh|Ugaritic|Vai|Yi|Ll|Lm|Lt|Lu|Lo|Mn|Mc|Me|Nd|Nl|Pc|Pd|Ps|Pe|Pi|Pf|Po|No|Sm|Sc|Sk|So|Zs|Zl|Zp|Cc|Cf|Cn|Co|Cs|N|L|M|P|S|Z|C)(})/},{token:["constant.language.escape","invalid","constant.language.escape"],regex:/(\\p{\^?)([^/]*)(})/},{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:/[/][imxouesn]*/,next:"start"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?(?:[:=!>]|<'?[a-zA-Z]*'?>|<[=!])|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"regexp.keyword",regex:/\[\[:(?:alnum|alpha|blank|cntrl|digit|graph|lower|print|punct|space|upper|xdigit|word|ascii):\]\]/},{token:"constant.language.escape",regex:/\[\^?/,push:"regex_character_class"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.keyword",regex:/\\[wWdDhHsS]/},{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:/&?&?\[\^?/,push:"regex_character_class"},{token:"constant.language.escape",regex:"]",next:"pop"},{token:"constant.language.escape",regex:"-"},{defaultToken:"string.regexp.characterclass"}]},this.normalizeRules()};i.inherits(g,o),t.RubyHighlightRules=g})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range,o=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t),o=n.match(/^(\s*\})/);if(!o)return 0;var r=o[1].length,s=e.findMatchingBracket({row:t,column:r});if(!s||s.row==t)return 0;var a=this.$getIndent(e.getLine(s.row));e.replace(new i(t,0,t,r-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(o.prototype),t.MatchingBraceOutdent=o})),ace.define("ace/mode/folding/ruby",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"],(function(e,t,n){"use strict";var i=e("../../lib/oop"),o=e("./fold_mode").FoldMode,r=e("../../range").Range,s=e("../../token_iterator").TokenIterator,a=t.FoldMode=function(){};i.inherits(a,o),function(){this.indentKeywords={class:1,def:1,module:1,do:1,unless:1,if:1,while:1,for:1,until:1,begin:1,else:0,elsif:0,rescue:0,ensure:0,when:0,end:-1,case:1,"=begin":1,"=end":-1},this.foldingStartMarker=/(?:\s|^)(def|do|while|class|unless|module|if|for|until|begin|else|elsif|case|rescue|ensure|when)\b|({\s*$)|(=begin)/,this.foldingStopMarker=/(=end(?=$|\s.*$))|(^\s*})|\b(end)\b/,this.getFoldWidget=function(e,t,n){var i=e.getLine(n),o=this.foldingStartMarker.test(i),r=this.foldingStopMarker.test(i);if(o&&!r){var s=i.match(this.foldingStartMarker);if(s[1]){if("if"==s[1]||"else"==s[1]||"while"==s[1]||"until"==s[1]||"unless"==s[1]){if("else"==s[1]&&!1===/^\s*else\s*$/.test(i))return;if(!1===/^\s*(?:if|else|while|until|unless)\s*/.test(i))return}if("when"==s[1]&&!0===/\sthen\s/.test(i))return;if("keyword"===e.getTokenAt(n,s.index+2).type)return"start"}else{if(!s[3])return"start";if("comment.multiline"===e.getTokenAt(n,s.index+1).type)return"start"}}if("markbeginend"!=t||!r||o&&r)return"";s=i.match(this.foldingStopMarker);if("end"===s[3]){if("keyword"===e.getTokenAt(n,s.index+1).type)return"end"}else{if(!s[1])return"end";if("comment.multiline"===e.getTokenAt(n,s.index+1).type)return"end"}},this.getFoldWidgetRange=function(e,t,n){var i=e.doc.getLine(n),o=this.foldingStartMarker.exec(i);if(o)return o[1]||o[3]?this.rubyBlock(e,n,o.index+2):this.openingBracketBlock(e,"{",n,o.index);o=this.foldingStopMarker.exec(i);return o?"end"===o[3]&&"keyword"===e.getTokenAt(n,o.index+1).type||"=end"===o[1]&&"comment.multiline"===e.getTokenAt(n,o.index+1).type?this.rubyBlock(e,n,o.index+1):this.closingBracketBlock(e,"}",n,o.index+o[0].length):void 0},this.rubyBlock=function(e,t,n,i){var o=new s(e,t,n),a=o.getCurrentToken();if(a&&("keyword"==a.type||"comment.multiline"==a.type)){var l=a.value,c=e.getLine(t);switch(a.value){case"if":case"unless":case"while":case"until":var h=new RegExp("^\\s*"+a.value);if(!h.test(c))return;var u=this.indentKeywords[l];break;case"when":if(/\sthen\s/.test(c))return;case"elsif":case"rescue":case"ensure":u=1;break;case"else":h=new RegExp("^\\s*"+a.value+"\\s*$");if(!h.test(c))return;u=1;break;default:u=this.indentKeywords[l]}var d=[l];if(u){var p=-1===u?e.getLine(t-1).length:e.getLine(t).length,g=t,f=[];if(f.push(o.getCurrentTokenRange()),o.step=-1===u?o.stepBackward:o.stepForward,"comment.multiline"==a.type){while(a=o.step())if("comment.multiline"===a.type)if(1==u){if(p=6,"=end"==a.value)break}else if("=begin"==a.value)break}else while(a=o.step()){var m=!1;if("keyword"===a.type){var v=u*this.indentKeywords[a.value];switch(c=e.getLine(o.getCurrentTokenRow()),a.value){case"do":for(var y=o.$tokenIndex-1;y>=0;y--){var w=o.$rowTokens[y];if(w&&("while"==w.value||"until"==w.value||"for"==w.value)){v=0;break}}break;case"else":h=new RegExp("^\\s*"+a.value+"\\s*$");h.test(c)&&"case"!=l||(v=0,m=!0);break;case"if":case"unless":case"while":case"until":h=new RegExp("^\\s*"+a.value);h.test(c)||(v=0,m=!0);break;case"when":(/\sthen\s/.test(c)||"case"==l)&&(v=0,m=!0)}if(v>0)d.unshift(a.value);else if(v<=0&&!1===m){if(d.shift(),!d.length){if(("while"==l||"until"==l||"for"==l)&&"do"!=a.value)break;if("do"==a.value&&-1==u&&0!=v)break;if("do"!=a.value)break}0===v&&d.unshift(a.value)}}}if(!a)return null;if(i)return f.push(o.getCurrentTokenRange()),f;t=o.getCurrentTokenRow();if(-1===u){if("comment.multiline"===a.type)var b=6;else b=e.getLine(t).length;return new r(t,b,g-1,p)}return new r(g,p,t-1,e.getLine(t-1).length)}}}}.call(a.prototype)})),ace.define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/folding/ruby"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("./text").Mode,r=e("./ruby_highlight_rules").RubyHighlightRules,s=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("../range").Range,l=e("./folding/ruby").FoldMode,c=function(){this.HighlightRules=r,this.$outdent=new s,this.$behaviour=this.$defaultBehaviour,this.foldingRules=new l,this.indentKeywords=this.foldingRules.indentKeywords};i.inherits(c,o),function(){this.lineCommentStart="#",this.getNextLineIndent=function(e,t,n){var i=this.$getIndent(t),o=this.getTokenizer().getLineTokens(t,e),r=o.tokens;if(r.length&&"comment"==r[r.length-1].type)return i;if("start"==e){var s=t.match(/^.*[\{\(\[]\s*$/),a=t.match(/^\s*(class|def|module)\s.*$/),l=t.match(/.*do(\s*|\s+\|.*\|\s*)$/),c=t.match(/^\s*(if|else|when|elsif|unless|while|for|begin|rescue|ensure)\s*/);(s||a||l||c)&&(i+=n)}return i},this.checkOutdent=function(e,t,n){return/^\s+(end|else|rescue|ensure)$/.test(t+n)||this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){var i=t.getLine(n);if(/}/.test(i))return this.$outdent.autoOutdent(t,n);var o=this.$getIndent(i),r=t.getLine(n-1),s=this.$getIndent(r),l=t.getTabString();s.length<=o.length&&o.slice(-l.length)==l&&t.remove(new a(n,o.length-l.length,n,o.length))},this.getMatching=function(e,t,n){if(void 0==t){var i=e.selection.lead;n=i.column,t=i.row}var o=e.getTokenAt(t,n);if(o&&o.value in this.indentKeywords)return this.foldingRules.rubyBlock(e,t,n,!0)},this.$id="ace/mode/ruby",this.snippetFileId="ace/snippets/ruby"}.call(c.prototype),t.Mode=c})),function(){ace.require(["ace/mode/ruby"],(function(t){e&&(e.exports=t)}))}()},419:(e,t,n)=>{e=n.nmd(e),ace.define("ace/theme/twilight-css",["require","exports","module"],(function(e,t,n){n.exports=".ace-twilight .ace_gutter {\n background: #232323;\n color: #E2E2E2\n}\n\n.ace-twilight .ace_print-margin {\n width: 1px;\n background: #232323\n}\n\n.ace-twilight {\n background-color: #141414;\n color: #F8F8F8\n}\n\n.ace-twilight .ace_cursor {\n color: #A7A7A7\n}\n\n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #141414;\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_marker-layer .ace_active-line {\n background: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_gutter-active-line {\n background-color: rgba(255, 255, 255, 0.031)\n}\n\n.ace-twilight .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(221, 240, 255, 0.20)\n}\n\n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25)\n}\n\n.ace-twilight .ace_keyword,\n.ace-twilight .ace_meta {\n color: #CDA869\n}\n\n.ace-twilight .ace_constant,\n.ace-twilight .ace_constant.ace_character,\n.ace-twilight .ace_constant.ace_character.ace_escape,\n.ace-twilight .ace_constant.ace_other,\n.ace-twilight .ace_heading,\n.ace-twilight .ace_markup.ace_heading,\n.ace-twilight .ace_support.ace_constant {\n color: #CF6A4C\n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color: #F8F8F8;\n background-color: rgba(86, 45, 86, 0.75)\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration: underline;\n font-style: italic;\n color: #D2A8A1\n}\n\n.ace-twilight .ace_support {\n color: #9B859D\n}\n\n.ace-twilight .ace_fold {\n background-color: #AC885B;\n border-color: #F8F8F8\n}\n\n.ace-twilight .ace_support.ace_function {\n color: #DAD085\n}\n\n.ace-twilight .ace_list,\n.ace-twilight .ace_markup.ace_list,\n.ace-twilight .ace_storage {\n color: #F9EE98\n}\n\n.ace-twilight .ace_entity.ace_name.ace_function,\n.ace-twilight .ace_meta.ace_tag {\n color: #AC885B\n}\n\n.ace-twilight .ace_string {\n color: #8F9D6A\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color: #E9C062\n}\n\n.ace-twilight .ace_comment {\n font-style: italic;\n color: #5F5A60\n}\n\n.ace-twilight .ace_variable {\n color: #7587A6\n}\n\n.ace-twilight .ace_xml-pe {\n color: #494949\n}\n\n.ace-twilight .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWMQERFpYLC1tf0PAAgOAnPnhxyiAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-twilight .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/twilight",["require","exports","module","ace/theme/twilight-css","ace/lib/dom"],(function(e,t,n){t.isDark=!0,t.cssClass="ace-twilight",t.cssText=e("./twilight-css");var i=e("../lib/dom");i.importCssString(t.cssText,t.cssClass,!1)})),function(){ace.require(["ace/theme/twilight"],(function(t){e&&(e.exports=t)}))}()},5095:(e,t,n)=>{e=n.nmd(e),function(){var e="ace",t=function(){return this}();if(t||"undefined"==typeof window||(t=window),e||"undefined"===typeof requirejs){var n=function(e,t,i){"string"===typeof e?(2==arguments.length&&(i=t),n.modules[e]||(n.payloads[e]=i,n.modules[e]=null)):n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};n.modules={},n.payloads={};var i=function(e,t,n){if("string"===typeof t){var i=s(e,t);if(void 0!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var r=[],a=0,l=t.length;a<l;++a){var c=s(e,t[a]);if(void 0==c&&o.original)return;r.push(c)}return n&&n.apply(null,r)||!0}},o=function(e,t){var n=i("",e,t);return void 0==n&&o.original?o.original.apply(this,arguments):n},r=function(e,t){if(-1!==t.indexOf("!")){var n=t.split("!");return r(e,n[0])+"!"+r(e,n[1])}if("."==t.charAt(0)){var i=e.split("/").slice(0,-1).join("/");t=i+"/"+t;while(-1!==t.indexOf(".")&&o!=t){var o=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},s=function(e,t){t=r(e,t);var o=n.modules[t];if(!o){if(o=n.payloads[t],"function"===typeof o){var s={},a={id:t,uri:"",exports:s,packaged:!0},l=function(e,n){return i(t,e,n)},c=o(l,s,a);s=c||a.exports,n.modules[t]=s,delete n.payloads[t]}o=n.modules[t]=s||o}return o};a(e)}function a(e){var i=t;e&&(t[e]||(t[e]={}),i=t[e]),i.define&&i.define.packaged||(n.original=i.define,i.define=n,i.define.packaged=!0),i.require&&i.require.packaged||(o.original=i.require,i.require=o,i.require.packaged=!0)}}(),ace.define("ace/lib/es6-shim",["require","exports","module"],(function(e,t,n){function i(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||i(String.prototype,"startsWith",(function(e,t){return t=t||0,this.lastIndexOf(e,t)===t})),String.prototype.endsWith||i(String.prototype,"endsWith",(function(e,t){var n=this;(void 0===t||t>n.length)&&(t=n.length),t-=e.length;var i=n.indexOf(e,t);return-1!==i&&i===t})),String.prototype.repeat||i(String.prototype,"repeat",(function(e){var t="",n=this;while(e>0)1&e&&(t+=n),(e>>=1)&&(n+=n);return t})),String.prototype.includes||i(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(void 0===e||null===e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),n=1;n<arguments.length;n++){var i=arguments[n];void 0!==i&&null!==i&&Object.keys(i).forEach((function(e){t[e]=i[e]}))}return t}),Object.values||(Object.values=function(e){return Object.keys(e).map((function(t){return e[t]}))}),Array.prototype.find||i(Array.prototype,"find",(function(e){for(var t=this.length,n=arguments[1],i=0;i<t;i++){var o=this[i];if(e.call(n,o,i,this))return o}})),Array.prototype.findIndex||i(Array.prototype,"findIndex",(function(e){for(var t=this.length,n=arguments[1],i=0;i<t;i++){var o=this[i];if(e.call(n,o,i,this))return i}})),Array.prototype.includes||i(Array.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Array.prototype.fill||i(Array.prototype,"fill",(function(e){var t=this,n=t.length>>>0,i=arguments[1],o=i>>0,r=o<0?Math.max(n+o,0):Math.min(o,n),s=arguments[2],a=void 0===s?n:s>>0,l=a<0?Math.max(n+a,0):Math.min(a,n);while(r<l)t[r]=e,r++;return t})),Array.of||i(Array,"of",(function(){return Array.prototype.slice.call(arguments)}))})),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],(function(e,t,n){"use strict";e("./es6-shim")})),ace.define("ace/lib/deep_copy",["require","exports","module"],(function(e,t,n){t.deepCopy=function e(t){if("object"!==typeof t||!t)return t;var n;if(Array.isArray(t)){n=[];for(var i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(var i in n={},t)n[i]=e(t[i]);return n}})),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";t.last=function(e){return e[e.length-1]},t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0)1&t&&(n+=e),(t>>=1)&&(e+=e);return n};var i=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n<i;n++)e[n]&&"object"==typeof e[n]?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=e("./deep_copy").deepCopy,t.arrayToMap=function(e){for(var t={},n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return(""+e).replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,(function(e){n.push({offset:arguments[arguments.length-2],length:e.length})})),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},i=function(e){return i.cancel(),t=setTimeout(n,e||0),i};return i.schedule=i,i.call=function(){return this.cancel(),e(),i},i.cancel=function(){return clearTimeout(t),t=null,i},i.isPending=function(){return t},i},t.delayedCall=function(e,t){var n=null,i=function(){n=null,e()},o=function(e){null==n&&(n=setTimeout(i,e||t))};return o.delay=function(e){n&&clearTimeout(n),n=setTimeout(i,e||t)},o.schedule=o,o.call=function(){this.cancel(),e()},o.cancel=function(){n&&clearTimeout(n),n=null},o.isPending=function(){return n},o},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&e.codePointAt(t)>65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,n){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var i="object"==typeof navigator?navigator:{},o=(/mac|win|linux/i.exec(i.platform)||["other"])[0].toLowerCase(),r=i.userAgent||"",s=i.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==s||s.indexOf("MSAppHost")>=0?parseFloat((r.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((r.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=r.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window["opera"]),t.isWebKit=parseFloat(r.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(r.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(r.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(r.split(" Edge/")[1])||void 0,t.isAIR=r.indexOf("AdobeAIR")>=0,t.isAndroid=r.indexOf("Android")>=0,t.isChromeOS=r.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window["MSStream"],t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i,o=e("./useragent"),r="http://www.w3.org/1999/xhtml";t.buildDom=function e(t,n,i){if("string"==typeof t&&t){var o=document.createTextNode(t);return n&&n.appendChild(o),o}if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var r=[],s=0;s<t.length;s++){var a=e(t[s],n,i);a&&r.push(a)}return r}var l=document.createElement(t[0]),c=t[1],h=1;c&&"object"==typeof c&&!Array.isArray(c)&&(h=2);for(s=h;s<t.length;s++)e(t[s],l,i);return 2==h&&Object.keys(c).forEach((function(e){var t=c[e];"class"===e?l.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?l[e]=t:"ref"===e?i&&(i[t]=l):"style"===e?"string"==typeof t&&(l.style.cssText=t):null!=t&&l.setAttribute(e,t)})),n&&n.appendChild(l),l},t.getDocumentHead=function(e){return e||(e=document),e.head||e.getElementsByTagName("head")[0]||e.documentElement},t.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||r,e):document.createElement(e)},t.removeChildren=function(e){e.innerHTML=""},t.createTextNode=function(e,t){var n=t?t.ownerDocument:document;return n.createTextNode(e)},t.createFragment=function(e){var t=e?e.ownerDocument:document;return t.createDocumentFragment()},t.hasCssClass=function(e,t){var n=(e.className+"").split(/\s+/g);return-1!==n.indexOf(t)},t.addCssClass=function(e,n){t.hasCssClass(e,n)||(e.className+=" "+n)},t.removeCssClass=function(e,t){var n=e.className.split(/\s+/g);while(1){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},t.toggleCssClass=function(e,t){var n=e.className.split(/\s+/g),i=!0;while(1){var o=n.indexOf(t);if(-1==o)break;i=!1,n.splice(o,1)}return i&&n.push(t),e.className=n.join(" "),i},t.setCssClass=function(e,n,i){i?t.addCssClass(e,n):t.removeCssClass(e,n)},t.hasCssString=function(e,t){var n,i=0;if(t=t||document,n=t.querySelectorAll("style"))while(i<n.length)if(n[i++].id===e)return!0},t.removeElementById=function(e,t){t=t||document,t.getElementById(e)&&t.getElementById(e).remove()};var s=[];function a(){var e=s;s=null,e&&e.forEach((function(e){l(e[0],e[1])}))}function l(e,n,o){if("undefined"!=typeof document){if(s)if(o)a();else if(!1===o)return s.push([e,n]);if(!i){var r=o;o&&o.getRootNode?(r=o.getRootNode(),r&&r!=o||(r=document)):r=document;var l=r.ownerDocument||r;if(n&&t.hasCssString(n,r))return null;n&&(e+="\n/*# sourceURL=ace/css/"+n+" */");var c=t.createElement("style");c.appendChild(l.createTextNode(e)),n&&(c.id=n),r==l&&(r=t.getDocumentHead(l)),r.insertBefore(c,r.firstChild)}}}if(t.useStrictCSP=function(e){i=e,0==e?a():s||(s=[])},t.importCssString=l,t.importCssStylsheet=function(e,n){t.buildDom(["link",{rel:"stylesheet",href:e}],t.getDocumentHead(n))},t.scrollbarWidth=function(e){var n=t.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var i=t.createElement("ace_outer"),o=i.style;o.position="absolute",o.left="-10000px",o.overflow="hidden",o.width="200px",o.minWidth="0px",o.height="150px",o.display="block",i.appendChild(n);var r=e&&e.documentElement||document&&document.documentElement;if(!r)return 0;r.appendChild(i);var s=n.offsetWidth;o.overflow="scroll";var a=n.offsetWidth;return s===a&&(a=i.clientWidth),r.removeChild(i),s-a},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!o.isWin||"undefined"!==typeof window&&window.devicePixelRatio>=1.5,o.isChromeOS&&(t.HI_DPI=!1),"undefined"!==typeof document){var c=document.createElement("div");t.HI_DPI&&void 0!==c.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),o.isEdge||"undefined"===typeof c.style.animationName||(t.HAS_CSS_ANIMATION=!0),c=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:t.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,n){
2
- /*
3
- * based on code from:
4
- *
5
- * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved.
6
- * Available via the MIT or new BSD license.
7
- * see: http://github.com/jrburke/requirejs for details
8
- */
9
- "use strict";var i=e("./dom");t.get=function(e,t){var n=new XMLHttpRequest;n.open("GET",e,!0),n.onreadystatechange=function(){4===n.readyState&&t(n.responseText)},n.send(null)},t.loadScript=function(e,t){var n=i.getDocumentHead(),o=document.createElement("script");o.src=e,n.appendChild(o),o.onload=o.onreadystatechange=function(e,n){!n&&o.readyState&&"loaded"!=o.readyState&&"complete"!=o.readyState||(o=o.onload=o.onreadystatechange=null,n||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,n){"use strict";var i={},o=function(){this.propagationStopped=!0},r=function(){this.defaultPrevented=!0};i._emit=i._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var n=this._eventRegistry[e]||[],i=this._defaultHandlers[e];if(n.length||i){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=o),t.preventDefault||(t.preventDefault=r),n=n.slice();for(var s=0;s<n.length;s++)if(n[s](t,this),t.propagationStopped)break;return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(n){n=n.slice();for(var i=0;i<n.length;i++)n[i](t,this)}},i.once=function(e,t){var n=this;if(this.on(e,(function i(){n.off(e,i),t.apply(null,arguments)})),!t)return new Promise((function(e){t=e}))},i.setDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n||(n=this._defaultHandlers={_disabled_:{}}),n[e]){var i=n[e],o=n._disabled_[e];o||(n._disabled_[e]=o=[]),o.push(i);var r=o.indexOf(t);-1!=r&&o.splice(r,1)}n[e]=t},i.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(n){var i=n._disabled_[e];if(n[e]==t)i&&this.setDefaultHandler(e,i.pop());else if(i){var o=i.indexOf(t);-1!=o&&i.splice(o,1)}}},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return i||(i=this._eventRegistry[e]=[]),-1==i.indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};var n=this._eventRegistry[e];if(n){var i=n.indexOf(t);-1!==i&&n.splice(i,1)}},i.removeAllListeners=function(e){e||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[e]=void 0),this._defaultHandlers&&(this._defaultHandlers[e]=void 0)},t.EventEmitter=i})),ace.define("ace/lib/report_error",["require","exports","module"],(function(e,t,n){t.reportError=function(e,t){var n=new Error(e);n["data"]=t,"object"==typeof console&&console.error&&console.error(n),setTimeout((function(){throw n}))}})),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error"],(function(e,t,n){var i,o=e("./oop"),r=e("./event_emitter").EventEmitter,s=e("./report_error").reportError,a={setOptions:function(e){Object.keys(e).forEach((function(t){this.setOption(t,e[t])}),this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(t=e,e=Object.keys(t));else{var n=this.$options;e=Object.keys(n).filter((function(e){return!n[e].hidden}))}return e.forEach((function(e){t[e]=this.getOption(e)}),this),t},setOption:function(e,t){if(this["$"+e]!==t){var n=this.$options[e];if(!n)return l('misspelled option "'+e+'"');if(n.forwardTo)return this[n.forwardTo]&&this[n.forwardTo].setOption(e,t);n.handlesSet||(this["$"+e]=t),n&&n.set&&n.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:l('misspelled option "'+e+'"')}};function l(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var c=function(){function e(){this.$defaultOptions={}}return e.prototype.defineOptions=function(e,t,n){return e.$options||(this.$defaultOptions[t]=e.$options={}),Object.keys(n).forEach((function(t){var i=n[t];"string"==typeof i&&(i={forwardTo:i}),i.name||(i.name=t),e.$options[i.name]=i,"initialValue"in i&&(e["$"+i.name]=i.initialValue)})),o.implement(e,a),this},e.prototype.resetOptions=function(e){Object.keys(e.$options).forEach((function(t){var n=e.$options[t];"value"in n&&e.setOption(t,n.value)}))},e.prototype.setDefaultValue=function(e,t,n){if(!e){for(e in this.$defaultOptions)if(this.$defaultOptions[e][t])break;if(!this.$defaultOptions[e][t])return!1}var i=this.$defaultOptions[e]||(this.$defaultOptions[e]={});i[t]&&(i.forwardTo?this.setDefaultValue(i.forwardTo,t,n):i[t].value=n)},e.prototype.setDefaultValues=function(e,t){Object.keys(t).forEach((function(n){this.setDefaultValue(e,n,t[n])}),this)},e.prototype.setMessages=function(e){i=e},e.prototype.nls=function(e,t){i&&!i[e]&&l("No message found for '"+e+"' in the provided messages, falling back to default English message.");var n=i&&i[e]||e;return t&&(n=n.replace(/\$(\$|[\d]+)/g,(function(e,n){return"$"==n?"$":t[n]}))),n},e}();c.prototype.warn=l,c.prototype.reportError=s,o.implement(c.prototype,r),t.AppConfig=c})),ace.define("ace/theme/textmate-css",["require","exports","module"],(function(e,t,n){n.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'})),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],(function(e,t,n){"use strict";t.isDark=!1,t.cssClass="ace-tm",t.cssText=e("./textmate-css"),t.$id="ace/theme/textmate";var i=e("../lib/dom");i.importCssString(t.cssText,t.cssClass,!1)})),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],(function(e,t,n){var i=e("./lib/lang"),o=e("./lib/net"),r=e("./lib/dom"),s=e("./lib/app_config").AppConfig;n.exports=t=new s;var a={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};t.get=function(e){if(!a.hasOwnProperty(e))throw new Error("Unknown config key: "+e);return a[e]},t.set=function(e,t){if(a.hasOwnProperty(e))a[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&r.useStrictCSP(t)},t.all=function(){return i.copyObject(a)},t.$modes={},t.moduleUrl=function(e,t){if(a.$moduleUrls[e])return a.$moduleUrls[e];var n=e.split("/");t=t||n[n.length-2]||"";var i="snippets"==t?"/":"-",o=n[n.length-1];if("worker"==t&&"-"==i){var r=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g");o=o.replace(r,"")}(!o||o==t)&&n.length>1&&(o=n[n.length-2]);var s=a[t+"Path"];return null==s?s=a.basePath:"/"==i&&(t=i=""),s&&"/"!=s.slice(-1)&&(s+="/"),s+t+i+o+this.get("suffix")},t.setModuleUrl=function(e,t){return a.$moduleUrls[e]=t};var l,c=function(t,n){return"ace/theme/textmate"===t||"./theme/textmate"===t?n(null,e("./theme/textmate")):l?l(t,n):void console.error("loader is not configured")};t.setLoader=function(e){l=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(e,n){var i;if(Array.isArray(e))var r=e[0],s=e[1];else if("string"==typeof e)s=e;var a=function(e){if(e&&!t.$loading[s])return n&&n(e);if(t.$loading[s]||(t.$loading[s]=[]),t.$loading[s].push(n),!(t.$loading[s].length>1)){var i=function(){c(s,(function(e,n){n&&(t.$loaded[s]=n),t._emit("load.module",{name:s,module:n});var i=t.$loading[s];t.$loading[s]=null,i.forEach((function(e){e&&e(n)}))}))};if(!t.get("packaged"))return i();o.loadScript(t.moduleUrl(s,r),i),h()}};if(t.dynamicModules[s])t.dynamicModules[s]().then((function(e){e.default?a(e.default):a(e)}));else{try{i=this.$require(s)}catch(l){}a(i||t.$loaded[s])}},t.$require=function(e){if("function"==typeof n["require"]){var t="require";return n[t](e)}},t.setModuleLoader=function(e,n){t.dynamicModules[e]=n};var h=function(){a.basePath||a.workerPath||a.modePath||a.themePath||Object.keys(a.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),h=function(){})};t.version="1.32.1"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,i){"use strict";e("./lib/fixoldbrowsers");var o=e("./config");o.setLoader((function(t,n){e([t],(function(e){n(null,e)}))}));var r=function(){return this||"undefined"!=typeof window&&window}();function s(t){if(r&&r.document){o.set("packaged",t||e.packaged||i.packaged||r.define&&n.amdD.packaged);var s={},l="",c=document.currentScript||document._currentScript,h=c&&c.ownerDocument||document;c&&c.src&&(l=c.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var u=h.getElementsByTagName("script"),d=0;d<u.length;d++){var p=u[d],g=p.src||p.getAttribute("src");if(g){for(var f=p.attributes,m=0,v=f.length;m<v;m++){var y=f[m];0===y.name.indexOf("data-ace-")&&(s[a(y.name.replace(/^data-ace-/,""))]=y.value)}var w=g.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);w&&(l=w[1])}}for(var b in l&&(s.base=s.base||l,s.packaged=!0),s.basePath=s.base,s.workerPath=s.workerPath||s.base,s.modePath=s.modePath||s.base,s.themePath=s.themePath||s.base,delete s.base,s)"undefined"!==typeof s[b]&&o.set(b,s[b])}}function a(e){return e.replace(/-(.)/g,(function(e,t){return t.toUpperCase()}))}i.exports=function(t){o.init=s,o.$require=e,t.require=e,t.define=n.amdD},s(!0)})),ace.define("ace/range",["require","exports","module"],(function(e,t,n){"use strict";var i=function(){function e(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}}return e.prototype.isEqual=function(e){return this.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},e.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,n=e.end,i=e.start;return t=this.compare(n.row,n.column),1==t?(t=this.compare(i.row,i.column),1==t?2:0==t?1:0):-1==t?-2:(t=this.compare(i.row,i.column),-1==t?-1:1==t?42:0)},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:t<this.start.column?-1:t>this.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,n){if(this.end.row>n)var i={row:n+1,column:0};else if(this.end.row<t)i={row:t,column:0};if(this.start.row>n)var o={row:n+1,column:0};else if(this.start.row<t)o={row:t,column:0};return e.fromPoints(o||this.start,i||this.end)},e.prototype.extend=function(t,n){var i=this.compare(t,n);if(0==i)return this;if(-1==i)var o={row:t,column:n};else var r={row:t,column:n};return e.fromPoints(o||this.start,r||this.end)},e.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},e.prototype.isMultiLine=function(){return this.start.row!==this.end.row},e.prototype.clone=function(){return e.fromPoints(this.start,this.end)},e.prototype.collapseRows=function(){return 0==this.end.column?new e(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new e(this.start.row,0,this.end.row,0)},e.prototype.toScreenRange=function(t){var n=t.documentToScreenPosition(this.start),i=t.documentToScreenPosition(this.end);return new e(n.row,n.column,i.row,i.column)},e.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t},e}();i.fromPoints=function(e,t){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i})),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],(function(e,t,n){
10
- /*! @license
11
- ==========================================================================
12
- SproutCore -- JavaScript Application Framework
13
- copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors.
14
-
15
- Permission is hereby granted, free of charge, to any person obtaining a
16
- copy of this software and associated documentation files (the "Software"),
17
- to deal in the Software without restriction, including without limitation
18
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
19
- and/or sell copies of the Software, and to permit persons to whom the
20
- Software is furnished to do so, subject to the following conditions:
21
-
22
- The above copyright notice and this permission notice shall be included in
23
- all copies or substantial portions of the Software.
24
-
25
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
30
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
31
- DEALINGS IN THE SOFTWARE.
32
-
33
- SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc.
34
-
35
- For more information about SproutCore, visit http://www.sproutcore.com
36
-
37
-
38
- ==========================================================================
39
- @license */
40
- "use strict";var i=e("./oop"),o=function(){var e,t,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(t in n.PRINTABLE_KEYS[173]="-",n.FUNCTION_KEYS)e=n.FUNCTION_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);for(t in n.PRINTABLE_KEYS)e=n.PRINTABLE_KEYS[t].toLowerCase(),n[e]=parseInt(t,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n["return"],n.escape=n.esc,n.del=n["delete"],function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)n.KEY_MODS[t]=e.filter((function(e){return t&n.KEY_MODS[e]})).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(t,o),t.default=t,t.keyCodeToString=function(e){var t=o[e];return"string"!=typeof t&&(t=String.fromCharCode(e)),t.toLowerCase()}})),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i,o=e("./keys"),r=e("./useragent"),s=null,a=0;function l(){i=!1;try{document.createComment("").addEventListener("test",(function(){}),{get passive(){return i={passive:!1},!0}})}catch(e){}}function c(){return void 0==i&&l(),i}function h(e,t,n){this.elem=e,this.type=t,this.callback=n}h.prototype.destroy=function(){d(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=t.addListener=function(e,t,n,i){e.addEventListener(t,n,c()),i&&i.$toDestroy.push(new h(e,t,n))},d=t.removeListener=function(e,t,n){e.removeEventListener(t,n,c())};t.stopEvent=function(e){return t.stopPropagation(e),t.preventDefault(e),!1},t.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},t.preventDefault=function(e){e.preventDefault&&e.preventDefault()},t.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||r.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},t.capture=function(e,t,n){var i=e&&e.ownerDocument||document;function o(e){t&&t(e),n&&n(e),d(i,"mousemove",t),d(i,"mouseup",o),d(i,"dragstart",o)}return u(i,"mousemove",t),u(i,"mouseup",o),u(i,"dragstart",o),o},t.addMouseWheelListener=function(e,t,n){u(e,"wheel",(function(e){var n=.15,i=e.deltaX||0,o=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=i*n,e.wheelY=o*n;break;case e.DOM_DELTA_LINE:var r=15;e.wheelX=i*r,e.wheelY=o*r;break;case e.DOM_DELTA_PAGE:var s=150;e.wheelX=i*s,e.wheelY=o*s;break}t(e)}),n)},t.addMultiMouseDownListener=function(e,n,i,o,s){var a,l,c,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(e){if(0!==t.getButton(e)?h=0:e.detail>1?(h++,h>4&&(h=1)):h=1,r.isIE){var s=Math.abs(e.clientX-a)>5||Math.abs(e.clientY-l)>5;c&&!s||(h=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),n[h-1]||600),1==h&&(a=e.clientX,l=e.clientY)}if(e._clicks=h,i[o]("mousedown",e),h>4)h=0;else if(h>1)return i[o](d[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){u(e,"mousedown",p,s)}))};var p=function(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)};function g(e,t,n){var i=p(t);if(!r.isMac&&s){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(i|=8),s.altGr){if(3==(3&i))return;s.altGr=0}if(18===n||17===n){var l="location"in t?t.location:t.keyLocation;if(17===n&&1===l)1==s[n]&&(a=t.timeStamp);else if(18===n&&3===i&&2===l){var c=t.timeStamp-a;c<50&&(s.altGr=!0)}}}if(n in o.MODIFIER_KEYS&&(n=-1),!i&&13===n){l="location"in t?t.location:t.keyLocation;if(3===l&&(e(t,i,-n),t.defaultPrevented))return}if(r.isChromeOS&&8&i){if(e(t,i,n),t.defaultPrevented)return;i&=-9}return!!(i||n in o.FUNCTION_KEYS||n in o.PRINTABLE_KEYS)&&e(t,i,n)}function f(){s=Object.create(null)}if(t.getModifierString=function(e){return o.KEY_MODS[p(e)]},t.addCommandKeyListener=function(e,n,i){var o=null;u(e,"keydown",(function(e){s[e.keyCode]=(s[e.keyCode]||0)+1;var t=g(n,e,e.keyCode);return o=e.defaultPrevented,t}),i),u(e,"keypress",(function(e){o&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),o=null)}),i),u(e,"keyup",(function(e){s[e.keyCode]=null}),i),s||(f(),u(window,"focus",f))},"object"==typeof window&&window.postMessage&&!r.isOldIE){var m=1;t.nextTick=function(e,n){n=n||window;var i="zero-timeout-message-"+m++,o=function(r){r.data==i&&(t.stopPropagation(r),d(n,"message",o),e())};u(n,"message",o),n.postMessage(i,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,n){return setTimeout((function n(){t.$idleBlocked?setTimeout(n,100):e()}),n)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window["mozRequestAnimationFrame"]||window["webkitRequestAnimationFrame"]||window["msRequestAnimationFrame"]||window["oRequestAnimationFrame"]),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,n){"use strict";var i;n.exports={lineMode:!1,pasteCancelled:function(){return!!(i&&i>Date.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i,o=e("../lib/event"),r=e("../config").nls,s=e("../lib/useragent"),a=e("../lib/dom"),l=e("../lib/lang"),c=e("../clipboard"),h=s.isChrome<18,u=s.isIE,d=s.isChrome>63,p=400,g=e("../lib/keys"),f=g.KEY_MODS,m=s.isIOS,v=m?/\s/:/\n/,y=s.isMobile;i=function(e,t){var n=a.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck","false"),n.style.opacity="0",e.insertBefore(n,e.firstChild);var i=!1,w=!1,b=!1,$=!1,x="";y||(n.style.fontSize="1px");var C=!1,S=!1,A="",k=0,L=0,_=0,R=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,M=0;try{var E=document.activeElement===n}catch(ne){}this.setNumberOfExtraLines=function(e){R=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,M=e<0?0:e},this.setAriaOptions=function(e){if(e.activeDescendant?(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-autocomplete",e.inline?"both":"list"),n.setAttribute("aria-activedescendant",e.activeDescendant)):(n.setAttribute("aria-haspopup","false"),n.setAttribute("aria-autocomplete","both"),n.removeAttribute("aria-activedescendant")),e.role&&n.setAttribute("role",e.role),e.setLabel&&(n.setAttribute("aria-roledescription",r("editor")),t.session)){var i=t.session.selection.cursor.row;n.setAttribute("aria-label",r("Cursor at row $0",[i+1]))}},this.setAriaOptions({role:"textbox"}),o.addListener(n,"blur",(function(e){S||(t.onBlur(e),E=!1)}),t),o.addListener(n,"focus",(function(e){if(!S){if(E=!0,s.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),s.isEdge?setTimeout(O):O()}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),x||d||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var e=n.style.top;n.style.position="fixed",n.style.top="0px";try{var i=0!=n.getBoundingClientRect().top}catch(ne){return}var o=[];if(i){var r=n.parentElement;while(r&&1==r.nodeType)o.push(r),r.setAttribute("ace_nocontext","true"),r=!r.parentElement&&r.getRootNode?r.getRootNode()["host"]:r.parentElement}n.focus({preventScroll:!0}),i&&o.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){n.style.position="","0px"==n.style.top&&(n.style.top=e)}),0)},this.blur=function(){n.blur()},this.isFocused=function(){return E},t.on("beforeEndOperation",(function(){var e=t.curOp,i=e&&e.command&&e.command.name;if("insertstring"!=i){var o=i&&(e.docChanged||e.selectionChanged);b&&o&&(A=n.value="",Y()),O()}}));var I=function(e,n){for(var i=n,o=1;o<=e-R&&o<2*M+1;o++)i+=t.session.getLine(e-o).length+1;return i},O=m?function(e){if(E&&(!i||e)&&!$){e||(e="");var o="\n ab"+e+"cde fg\n";o!=n.value&&(n.value=A=o);var r=4,s=4+(e.length||(t.selection.isEmpty()?0:1));k==r&&L==s||n.setSelectionRange(r,s),k=r,L=s}}:function(){if(!b&&!$&&(E||W)){b=!0;var e=0,i=0,o="";if(t.session){var r=t.selection,s=r.getRange(),a=r.cursor.row;a===T+1?(R=T+1,T=R+2*M):a===R-1?(T=R-1,R=T-2*M):(a<R-1||a>T+1)&&(R=a>M?a-M:0,T=a>M?a+M:2*M);for(var l=[],c=R;c<=T;c++)l.push(t.session.getLine(c));if(o=l.join("\n"),e=I(s.start.row,s.start.column),i=I(s.end.row,s.end.column),s.start.row<R){var h=t.session.getLine(R-1);e=s.start.row<R-1?0:e,i+=h.length+1,o=h+"\n"+o}else if(s.end.row>T){var u=t.session.getLine(T+1);i=s.end.row>T+1?u.length:s.end.column,i+=o.length+1,o=o+"\n"+u}else y&&a>0&&(o="\n"+o,i+=1,e+=1);o.length>p&&(e<p&&i<p?o=o.slice(0,p):(o="\n",e==i?e=i=0:(e=0,i=1)));var d=o+"\n\n";d!=A&&(n.value=A=d,k=L=d.length)}if(W&&(k=n.selectionStart,L=n.selectionEnd),L!=i||k!=e||n.selectionEnd!=L)try{n.setSelectionRange(e,i),k=e,L=i}catch(ne){}b=!1}};this.resetSelection=O,E&&t.onFocus();var F=function(e){return 0===e.selectionStart&&e.selectionEnd>=A.length&&e.value===A&&A&&e.selectionEnd!==L},D=function(e){b||(i?i=!1:F(n)?(t.selectAll(),O()):y&&n.selectionStart!=k&&O())},N=null;this.setInputHandler=function(e){N=e},this.getInputHandler=function(){return N};var W=!1,B=function(e,i){if(W&&(W=!1),w)return O(),e&&t.onPaste(e),w=!1,"";var o=n.selectionStart,r=n.selectionEnd,a=k,l=A.length-L,c=e,h=e.length-o,u=e.length-r,d=0;while(a>0&&A[d]==e[d])d++,a--;c=c.slice(d),d=1;while(l>0&&A.length-d>k-1&&A[A.length-d]==e[e.length-d])d++,l--;h-=d-1,u-=d-1;var p=c.length-d+1;if(p<0&&(a=-p,p=0),c=c.slice(0,p),!i&&!c&&!h&&!a&&!l&&!u)return"";$=!0;var g=!1;return s.isAndroid&&". "==c&&(c=" ",g=!0),c&&!a&&!l&&!h&&!u||C?t.onTextInput(c):t.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:h,restoreEnd:u}),$=!1,A=e,k=o,L=r,_=u,g?"\n":c},H=function(e){if(b)return K();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var i=n.value,o=B(i,!0);(i.length>p+100||v.test(o)||y&&k<1&&k==L)&&O()},P=function(e,t,n){var i=e.clipboardData||window["clipboardData"];if(i&&!h){var o=u||n?"Text":"text/plain";try{return t?!1!==i.setData(o,t):i.getData(o)}catch(e){if(!n)return P(e,t,!0)}}},z=function(e,r){var s=t.getCopyText();if(!s)return o.preventDefault(e);P(e,s)?(m&&(O(s),i=s,setTimeout((function(){i=!1}),10)),r?t.onCut():t.onCopy(),o.preventDefault(e)):(i=!0,n.value=s,n.select(),setTimeout((function(){i=!1,O(),r?t.onCut():t.onCopy()})))},U=function(e){z(e,!0)},V=function(e){z(e,!1)},j=function(e){var i=P(e);c.pasteCancelled()||("string"==typeof i?(i&&t.onPaste(i,e),s.isIE&&setTimeout(O),o.preventDefault(e)):(n.value="",w=!0))};o.addCommandKeyListener(n,t.onCommandKey.bind(t),t),o.addListener(n,"select",D,t),o.addListener(n,"input",H,t),o.addListener(n,"cut",U,t),o.addListener(n,"copy",V,t),o.addListener(n,"paste",j,t),"oncut"in n&&"oncopy"in n&&"onpaste"in n||o.addListener(e,"keydown",(function(e){if((!s.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:V(e);break;case 86:j(e);break;case 88:U(e);break}}),t);var G=function(e){if(!b&&t.onCompositionStart&&!t.$readOnly&&(b={},!C)){e.data&&(b.useTextareaForIME=!1),setTimeout(K,0),t._signal("compositionStart"),t.on("mousedown",q);var i=t.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,t.onCompositionStart(b),b.useTextareaForIME?(A=n.value="",k=0,L=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}},K=function(){if(b&&t.onCompositionUpdate&&!t.$readOnly){if(C)return q();if(b.useTextareaForIME)t.onCompositionUpdate(n.value);else{var e=n.value;B(e),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+L-b.selectionStart+_)}}},Y=function(e){t.onCompositionEnd&&!t.$readOnly&&(b=!1,t.onCompositionEnd(),t.off("mousedown",q),e&&H())};function q(){S=!0,n.blur(),n.focus(),S=!1}var Q,Z=l.delayedCall(K,50).schedule.bind(null,null);function X(e){27==e.keyCode&&n.value.length<n.selectionStart&&(b||(A=n.value),k=L=-1,O()),Z()}function J(){clearTimeout(Q),Q=setTimeout((function(){x&&(n.style.cssText=x,x=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}o.addListener(n,"compositionstart",G,t),o.addListener(n,"compositionupdate",K,t),o.addListener(n,"keyup",X,t),o.addListener(n,"keydown",Z,t),o.addListener(n,"compositionend",Y,t),this.getElement=function(){return n},this.setCommandMode=function(e){C=e,n.readOnly=!1},this.setReadOnly=function(e){C||(n.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){W=!0,O(),t._emit("nativecontextmenu",{target:t,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,i){x||(x=n.style.cssText),n.style.cssText=(i?"z-index:100000;":"")+(s.isIE?"opacity:0.1;":"")+"text-indent: -"+(k+L)*t.renderer.characterWidth*.5+"px;";var r=t.container.getBoundingClientRect(),l=a.computedStyle(t.container),c=r.top+(parseInt(l.borderTopWidth)||0),h=r.left+(parseInt(r.borderLeftWidth)||0),u=r.bottom-c-n.clientHeight-2,d=function(e){a.translate(n,e.clientX-h-2,Math.min(e.clientY-c-2,u))};d(e),"mousedown"==e.type&&(t.renderer.$isMousePressed=!0,clearTimeout(Q),s.isWin&&o.capture(t.container,d,J))},this.onContextMenuClose=J;var ee=function(e){t.textInput.onContextMenu(e),J()};function te(e,t,n){var o=null,r=!1;n.addEventListener("keydown",(function(e){o&&clearTimeout(o),r=!0}),!0),n.addEventListener("keyup",(function(e){o=setTimeout((function(){r=!1}),100)}),!0);var s=function(e){if(document.activeElement===n&&!(r||b||t.$mouseHandler.isMousePressed)&&!i){var o=n.selectionStart,s=n.selectionEnd,a=null,l=0;if(0==o?a=g.up:1==o?a=g.home:s>L&&"\n"==A[s]?a=g.end:o<k&&" "==A[o-1]?(a=g.left,l=f.option):o<k||o==k&&L!=k&&o==s?a=g.left:s>L&&A.slice(0,s).split("\n").length>2?a=g.down:s>L&&" "==A[s-1]?(a=g.right,l=f.option):(s>L||s==L&&L!=k&&o==s)&&(a=g.right),o!==s&&(l|=f.shift),a){var c=t.onCommandKey({},l,a);if(!c&&t.commands){a=g.keyCodeToString(a);var h=t.commands.findKeyCommand(l,a);h&&t.execCommand(h)}k=o,L=s,O("")}}};document.addEventListener("selectionchange",s),t.on("destroy",(function(){document.removeEventListener("selectionchange",s)}))}o.addListener(n,"mouseup",ee,t),o.addListener(n,"mousedown",(function(e){e.preventDefault(),J()}),t),o.addListener(t.renderer.scroller,"contextmenu",ee,t),o.addListener(n,"contextmenu",ee,t),m&&te(e,t,n),this.destroy=function(){n.parentElement&&n.parentElement.removeChild(n)}},t.TextInput=i,t.$setUserAgentForTests=function(e,t){y=e,m=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/useragent"),o=0,r=550,s=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach((function(t){e[t]=this[t]}),this),e["selectByLines"]=this.extendSelectionBy.bind(e,"getLineRange"),e["selectByWords"]=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var o=this.editor,r=e.getButton();if(0!==r){var s=o.getSelectionRange(),a=s.isEmpty();return(a||1==r)&&o.selection.moveToPosition(n),void(2==r&&(o.textInput.onContextMenu(e.domEvent),i.isMozilla||e.preventDefault()))}return this.mousedownEvent.time=Date.now(),!t||o.isFocused()||(o.focus(),!this.$focusTimeout||this.$clickSelection||o.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):t||n.selection.moveToPosition(e),t||this.select(),n.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)e=this.$clickSelection.end;else if(1==i)e=this.$clickSelection.start;else{var o=l(this.$clickSelection,n);n=o.cursor,e=o.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),o=n.selection[e](i.row,i.column);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(o.start),s=this.$clickSelection.comparePoint(o.end);if(-1==r&&s<=0)t=this.$clickSelection.end,o.end.row==i.row&&o.end.column==i.column||(i=o.start);else if(1==s&&r>=0)t=this.$clickSelection.start,o.start.row==i.row&&o.start.column==i.column||(i=o.end);else if(-1==r&&1==s)i=o.end,t=o.start;else{var a=l(this.$clickSelection,i);i=a.cursor,t=a.anchor}n.selection.setSelectionAnchor(t.row,t.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(e>o||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),n=this.editor,i=n.session,o=i.getBracketRange(t);o?(o.isEmpty()&&(o.start.column--,o.end.column++),this.setState("select")):(o=n.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=o,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(t.row,t.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=e.domEvent.timeStamp,o=i-n.t,s=o?e.wheelX/o:n.vx,a=o?e.wheelY/o:n.vy;o<r&&(s=(s+n.vx)/2,a=(a+n.vy)/2);var l=Math.abs(s/a),c=!1;if(l>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(c=!0),l<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(c=!0),c)n.allowed=i;else if(i-n.allowed<r){var h=Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(a)<=1.5*Math.abs(n.vy);h?(c=!0,n.allowed=i):n.allowed=0}return n.t=i,n.vx=s,n.vy=a,c?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function a(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}function l(e,t){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else var n=t.column-4;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,t.DefaultHandlers=s})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget,n=t.scrollHeight>t.clientHeight;n||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/dom"),s=(e("./lib/event"),e("./range").Range),a=e("./lib/scroll").preventParentScroll,l="ace_tooltip",c=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=r.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){r.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=l+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),h=function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,n,i;this.popups.sort((function(e,t){return t.priority-e.priority}));var r=[];try{for(var s=o(this.popups),a=s.next();!a.done;a=s.next()){var l=a.value,c=!0;try{for(var h=(n=void 0,o(r)),u=h.next();!u.done;u=h.next()){var d=u.value;if(this.doPopupsOverlap(d,l)){c=!1;break}}}catch(p){n={error:p}}finally{try{u&&!u.done&&(i=h.return)&&i.call(h)}finally{if(n)throw n.error}}c?r.push(l):l.hide()}}catch(g){e={error:g}}finally{try{a&&!a.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var n=e.getElement().getBoundingClientRect(),i=t.getElement().getBoundingClientRect();return n.left<i.right&&n.right>i.left&&n.top<i.bottom&&n.bottom>i.top},e}(),u=new h;t.popupManager=u,t.Tooltip=c;var d=function(e){function t(t){void 0===t&&(t=document.body);var n=e.call(this,t)||this;n.timeout=void 0,n.lastT=0,n.idleTime=350,n.lastEvent=void 0,n.onMouseOut=n.onMouseOut.bind(n),n.onMouseMove=n.onMouseMove.bind(n),n.waitForHover=n.waitForHover.bind(n),n.hide=n.hide.bind(n);var i=n.getElement();return i.style.whiteSpace="pre-wrap",i.style.pointerEvents="auto",i.addEventListener("mouseout",n.onMouseOut),i.tabIndex=-1,i.addEventListener("blur",function(){i.contains(document.activeElement)||this.hide()}.bind(n)),i.addEventListener("wheel",a),n}return i(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n=t.$mouseHandler.isMousePressed;if(this.isOpen){var i=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(i.row,i.column)&&!n&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||n||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),i=t.session.getLine(n.row);if(n.column==i.length){var o=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),r=t.session.documentToScreenPosition(n.row,n.column);if(r.column!=o.column||r.row!=o.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,n,i){var o=10;if((!i||i==this.lastEvent)&&(!this.isOpen||document.activeElement!=this.getElement())){var r=e.renderer;this.isOpen||(u.addPopup(this),this.$registerCloseEvents(),this.setTheme(r.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=s.fromPoints(t.start,t.end);var a=r.textToScreenCoordinates(t.start.row,t.start.column),l=r.scroller.getBoundingClientRect();a.pageX<l.left&&(a.pageX=l.left);var c=this.getElement();c.innerHTML="",c.appendChild(n),c.style.maxHeight="",c.style.display="block";var h=c.clientHeight,d=c.clientWidth,p=window.innerHeight-a.pageY-r.lineHeight,g=!0;a.pageY-h<0&&a.pageY<p&&(g=!1),c.style.maxHeight=(g?a.pageY:p)-o+"px",c.style.top=g?"":a.pageY+r.lineHeight+"px",c.style.bottom=g?window.innerHeight-a.pageY+"px":"",c.style.left=Math.min(a.pageX,window.innerWidth-d-o)+"px"}},t.prototype.addMarker=function(e,t){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=t,this.marker=t&&t.addMarker(e,"ace_highlight-marker","text")},t.prototype.hide=function(e){(e||document.activeElement!=this.getElement())&&(e&&e.target&&("keydown"!=e.type||e.ctrlKey||e.metaKey)&&this.$element.contains(e.target)||(this.lastEvent=null,this.timeout&&clearTimeout(this.timeout),this.timeout=null,this.addMarker(null),this.isOpen&&(this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,u.removePopup(this))))},t.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},t.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},t.prototype.onMouseOut=function(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||e.relatedTarget.classList.contains("ace_content")||this.hide())},t}(c);t.HoverTooltip=d})),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("../lib/dom"),s=e("../lib/event"),a=e("../tooltip").Tooltip,l=e("../config").nls;function c(e){var t,n,i=e.editor,o=i.renderer.$gutterLayer,a=new h(i);function l(){var t=n.getDocumentPosition().row,r=i.session.getLength();if(t==r){var s=i.renderer.pixelToScreenCoordinates(0,n.y).row,l=n.$pos;if(s>i.session.documentToScreenRow(l.row,l.column))return c()}if(a.showTooltip(t),a.isOpen)if(i.on("mousewheel",c),e.$tooltipFollowsMouse)u(n);else{var h=n.getGutterRow(),d=o.$lines.get(h);if(d){var p=d.element.querySelector(".ace_gutter_annotation"),g=p.getBoundingClientRect(),f=a.getElement().style;f.left=g.right+"px",f.top=g.bottom+"px"}else u(n)}}function c(){t&&(t=clearTimeout(t)),a.isOpen&&(a.hideTooltip(),i.off("mousewheel",c))}function u(e){a.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(i.isFocused()&&0==t.getButton()){var n=o.getRegion(t);if("foldWidgets"!=n){var r=t.getDocumentPosition().row,s=i.session.selection;if(t.getShiftKey())s.selectTo(r,0);else{if(2==t.domEvent.detail)return i.selectAll(),t.preventDefault();e.$clickSelection=i.selection.getLineRange(r)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}}})),e.editor.setDefaultHandler("guttermousemove",(function(i){var o=i.domEvent.target||i.domEvent.srcElement;if(r.hasCssClass(o,"ace_fold-widget"))return c();a.isOpen&&e.$tooltipFollowsMouse&&u(i),n=i,t||(t=setTimeout((function(){t=null,n&&!e.isMousePressed?l():c()}),50))})),s.addListener(i.renderer.$gutter,"mouseout",(function(e){n=null,a.isOpen&&!t&&(t=setTimeout((function(){t=null,c()}),50))}),i),i.on("changeSession",c),i.on("input",c)}t.GutterHandler=c;var h=function(e){function t(t){var n=e.call(this,t.container)||this;return n.editor=t,n}return i(t,e),t.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();e+=15,t+=15,e+o>n&&(e-=e+o-n),t+r>i&&(t-=20+r),a.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:l("error"),plural:l("errors")},warning:{singular:l("warning"),plural:l("warnings")},info:{singular:l("information message"),plural:l("information messages")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var n,i=this.editor.renderer.$gutterLayer,o=i.$annotations[e];n=o?{text:Array.from(o.text),type:Array.from(o.type)}:{text:[],type:[]};var r=i.session.getFoldLine(e);if(r&&i.$showFoldedAnnotations){for(var s,a={error:[],warning:[],info:[]},l=e+1;l<=r.end.row;l++)if(i.$annotations[l])for(var c=0;c<i.$annotations[l].text.length;c++){var h=i.$annotations[l].type[c];a[h].push(i.$annotations[l].text[c]),"error"!==h?"warning"!==h||(s="warning_fold"):s="error_fold"}if("error_fold"===s||"warning_fold"===s){var u="".concat(t.annotationsToSummaryString(a)," in folded code.");n.text.push(u),n.type.push(s)}}if(0===n.text.length)return this.hide();var d={error:[],warning:[],info:[]},p=i.$useSvgGutterIcons?"ace_icon_svg":"ace_icon";for(l=0;l<n.text.length;l++){var g="<span class='ace_".concat(n.type[l]," ").concat(p,"' aria-label='").concat(t.annotationLabels[n.type[l].replace("_fold","")].singular,"' role=img> </span> ").concat(n.text[l]);d[n.type[l].replace("_fold","")].push(g)}var f=[].concat(d.error,d.warning,d.info).join("<br>");this.setHtml(f),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},t.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},t.annotationsToSummaryString=function(e){var n,i,r=[],s=["error","warning","info"];try{for(var a=o(s),l=a.next();!l.done;l=a.next()){var c=l.value;if(e[c].length){var h=1===e[c].length?t.annotationLabels[c].singular:t.annotationLabels[c].plural;r.push("".concat(e[c].length," ").concat(h))}}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return r.join(", ")},t}(a);t.GutterTooltip=h})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row,t=this.editor.session.documentToScreenRow(e,0),n=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return t-n},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor,t=e.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var n=this.getDocumentPosition();this.$inSelection=t.contains(n.row,n.column)}return this.$inSelection},e.prototype.getButton=function(){return i.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=r})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/event"),r=e("../lib/useragent"),s=200,a=200,l=5;function c(e){var t=e.editor,n=i.createElement("div");n.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",n.textContent=" ";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var u,d,p,g,f,m,v,y,w,b,$,x=t.container,C=0;function S(e,n){var i=Date.now(),o=!n||e.row!=n.row,r=!n||e.column!=n.column;if(!b||o||r)t.moveCursorToPosition(e),b=i,$={x:d,y:p};else{var s=h($.x,$.y,d,p);s>l?b=null:i-b>=a&&(t.renderer.scrollCursorIntoView(),b=null)}}function A(e,n){var i=Date.now(),o=t.renderer.layerConfig.lineHeight,r=t.renderer.layerConfig.characterWidth,a=t.renderer.scroller.getBoundingClientRect(),l={x:{left:d-a.left,right:a.right-d},y:{top:p-a.top,bottom:a.bottom-p}},c=Math.min(l.x.left,l.x.right),h=Math.min(l.y.top,l.y.bottom),u={row:e.row,column:e.column};c/r<=2&&(u.column+=l.x.left<l.x.right?-3:2),h/o<=1&&(u.row+=l.y.top<l.y.bottom?-1:1);var g=e.row!=u.row,f=e.column!=u.column,m=!n||e.row!=n.row;g||f&&!m?w?i-w>=s&&t.renderer.scrollCursorIntoView(u):w=i:w=null}function k(){var e=m;m=t.renderer.screenToTextCoordinates(d,p),S(m,e),A(m,e)}function L(){f=t.selection.toOrientedRange(),u=t.session.addMarker(f,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),k(),g=setInterval(k,20),C=0,o.addListener(document,"mousemove",T)}function _(){clearInterval(g),t.session.removeMarker(u),u=null,t.selection.fromOrientedRange(f),t.isFocused()&&!y&&t.$resetCursorStyle(),f=null,m=null,C=0,w=null,b=null,o.removeListener(document,"mousemove",T)}this.onDragStart=function(e){if(this.cancelDrag||!x.draggable){var i=this;return setTimeout((function(){i.startSelect(),i.captureMouse(e)}),0),e.preventDefault()}f=t.getSelectionRange();var o=e.dataTransfer;o.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(n),o.setDragImage&&o.setDragImage(n,0,0),setTimeout((function(){t.container.removeChild(n)})),o.clearData(),o.setData("Text",t.session.getTextRange()),y=!0,this.setState("drag")},this.onDragEnd=function(e){if(x.draggable=!1,y=!1,this.setState(null),!t.getReadOnly()){var n=e.dataTransfer.dropEffect;v||"move"!=n||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&M(e.dataTransfer))return d=e.clientX,p=e.clientY,u||L(),C++,e.dataTransfer.dropEffect=v=E(e),o.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&M(e.dataTransfer))return d=e.clientX,p=e.clientY,u||(L(),C++),null!==R&&(R=null),e.dataTransfer.dropEffect=v=E(e),o.preventDefault(e)},this.onDragLeave=function(e){if(C--,C<=0&&u)return _(),v=null,o.preventDefault(e)},this.onDrop=function(e){if(m){var n=e.dataTransfer;if(y)switch(v){case"move":f=f.contains(m.row,m.column)?{start:m,end:m}:t.moveText(f,m);break;case"copy":f=t.moveText(f,m,!0);break}else{var i=n.getData("Text");f={start:m,end:t.session.insert(m,i)},t.focus(),v=null}return _(),o.preventDefault(e)}},o.addListener(x,"dragstart",this.onDragStart.bind(e),t),o.addListener(x,"dragend",this.onDragEnd.bind(e),t),o.addListener(x,"dragenter",this.onDragEnter.bind(e),t),o.addListener(x,"dragover",this.onDragOver.bind(e),t),o.addListener(x,"dragleave",this.onDragLeave.bind(e),t),o.addListener(x,"drop",this.onDrop.bind(e),t);var R=null;function T(){null==R&&(R=setTimeout((function(){null!=R&&u&&_()}),20))}function M(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function E(e){var t=["copy","copymove","all","uninitialized"],n=["move","copymove","linkmove","all","uninitialized"],i=r.isMac?e.altKey:e.ctrlKey,o="uninitialized";try{o=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var s="none";return i&&t.indexOf(o)>=0?s="copy":n.indexOf(o)>=0?s="move":t.indexOf(o)>=0&&(s="copy"),s}}function h(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}(function(){this.dragWait=function(){var e=Date.now()-this.mousedownEvent.time;e>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var e=this.editor.container;e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor,t=e.container;t.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var n=r.isWin?"default":"move";e.renderer.setCursorStyle(n),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;if(r.isIE&&"dragReady"==this.state){var n=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>3&&t.dragDrop()}if("dragWait"===this.state){n=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);n>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,n=e.inSelection(),i=e.getButton(),o=e.domEvent.detail||1;if(1===o&&0===i&&n){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=e.domEvent.target||e.domEvent.srcElement;if("unselectable"in s&&(s.unselectable="on"),t.getDragDelay()){if(r.isWebKit){this.cancelDrag=!0;var a=t.container;a.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(c.prototype),t.DragdropHandler=c})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./mouse_event").MouseEvent,o=e("../lib/event"),r=e("../lib/dom");t.addTouchListeners=function(e,t){var n,s,a,l,c,h,u,d,p,g="scroll",f=0,m=0,v=0,y=0;function w(){var e=window.navigator&&window.navigator.clipboard,n=!1,i=function(){var i=t.getCopyText(),o=t.session.getUndoManager().hasUndo();p.replaceChild(r.buildDom(n?["span",!i&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],i&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],i&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],e&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild)},o=function(o){var r=o.target.getAttribute("action");if("more"==r||!n)return n=!n,i();"paste"==r?e.readText().then((function(e){t.execCommand(r,e)})):r&&("cut"!=r&&"copy"!=r||(e?e.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(r)),p.firstChild.style.display="none",n=!1,"openCommandPalette"!=r&&t.focus()};p=r.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){g="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),o(e)},onclick:o},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)}function b(){p||w();var e=t.selection.cursor,n=t.renderer.textToScreenCoordinates(e.row,e.column),i=t.renderer.textToScreenCoordinates(0,0).pageX,o=t.renderer.scrollLeft,r=t.container.getBoundingClientRect();p.style.top=n.pageY-r.top-3+"px",n.pageX-r.left<r.width-70?(p.style.left="",p.style.right="10px"):(p.style.right="",p.style.left=i+o-r.left+"px"),p.style.display="",p.firstChild.style.display="none",t.on("input",$)}function $(e){p&&(p.style.display="none"),t.off("input",$)}function x(){c=null,clearTimeout(c);var e=t.selection.getRange(),n=e.contains(u.row,u.column);!e.isEmpty()&&n||(t.selection.moveToPosition(u),t.selection.selectWord()),g="wait",b()}function C(){c=null,clearTimeout(c),t.selection.moveToPosition(u);var e=m>=2?t.selection.getLineRange(u.row):t.session.getBracketRange(u);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),g="wait"}function S(){f+=60,h=setInterval((function(){f--<=0&&(clearInterval(h),h=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),f<20&&(v*=.9),f<20&&(y*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*v,10*y),e==t.session.getScrollTop()&&(f=0)}),10)}o.addListener(e,"contextmenu",(function(e){if(d){var n=t.textInput.getElement();n.focus()}}),t),o.addListener(e,"touchstart",(function(e){var o=e.touches;if(c||o.length>1)return clearTimeout(c),c=null,a=-1,void(g="zoom");d=t.$mouseHandler.isMousePressed=!0;var r=t.renderer.layerConfig.lineHeight,h=t.renderer.layerConfig.lineHeight,p=e.timeStamp;l=p;var w=o[0],b=w.clientX,$=w.clientY;Math.abs(n-b)+Math.abs(s-$)>r&&(a=-1),n=e.clientX=b,s=e.clientY=$,v=y=0;var S=new i(e,t);if(u=S.getDocumentPosition(),p-a<500&&1==o.length&&!f)m++,e.preventDefault(),e.button=0,C();else{m=0;var A=t.selection.cursor,k=t.selection.isEmpty()?A:t.selection.anchor,L=t.renderer.$cursorLayer.getPixelPosition(A,!0),_=t.renderer.$cursorLayer.getPixelPosition(k,!0),R=t.renderer.scroller.getBoundingClientRect(),T=t.renderer.layerConfig.offset,M=t.renderer.scrollLeft,E=function(e,t){return e/=h,t=t/r-.75,e*e+t*t};if(e.clientX<R.left)return void(g="zoom");var I=E(e.clientX-R.left-L.left+M,e.clientY-R.top-L.top+T),O=E(e.clientX-R.left-_.left+M,e.clientY-R.top-_.top+T);I<3.5&&O<3.5&&(g=I>O?"cursor":"anchor"),g=O<3.5?"anchor":I<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=p}),t),o.addListener(e,"touchend",(function(e){d=t.$mouseHandler.isMousePressed=!1,h&&clearInterval(h),"zoom"==g?(g="",f=0):c?(t.selection.moveToPosition(u),f=0,b()):"scroll"==g?(S(),$()):b(),clearTimeout(c),c=null}),t),o.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var o=e.touches;if(!(o.length>1||"zoom"==g)){var r=o[0],a=n-r.clientX,h=s-r.clientY;if("wait"==g){if(!(a*a+h*h>4))return e.preventDefault();g="cursor"}n=r.clientX,s=r.clientY,e.clientX=r.clientX,e.clientY=r.clientY;var u=e.timeStamp,d=u-l;if(l=u,"scroll"==g){var p=new i(e,t);p.speed=1,p.wheelX=a,p.wheelY=h,10*Math.abs(a)<Math.abs(h)&&(a=0),10*Math.abs(h)<Math.abs(a)&&(h=0),0!=d&&(v=a/d,y=h/d),t._emit("mousewheel",p),p.propagationStopped||(v=y=0)}else{var f=new i(e,t),m=f.getDocumentPosition();"cursor"==g?t.selection.moveCursorToPosition(m):"anchor"==g&&t.selection.setSelectionAnchor(m.row,m.column),t.renderer.scrollCursorIntoView(m),e.preventDefault()}}}),t)}})),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/event"),o=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,a=e("./mouse_event").MouseEvent,l=e("./dragdrop_handler").DragdropHandler,c=e("./touch_handler").addTouchListeners,h=e("../config"),u=function(){function e(e){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var t=this;this.editor=e,new r(this),new s(this),new l(this);var n=function(t){var n=!document.hasFocus||!document.hasFocus()||!e.isFocused()&&document.activeElement==(e.textInput&&e.textInput.getElement());n&&window.focus(),e.focus(),setTimeout((function(){e.isFocused()||e.focus()}))},a=e.renderer.getMouseEventTarget();i.addListener(a,"click",this.onMouseEvent.bind(this,"click"),e),i.addListener(a,"mousemove",this.onMouseMove.bind(this,"mousemove"),e),i.addMultiMouseDownListener([a,e.renderer.scrollBarV&&e.renderer.scrollBarV.inner,e.renderer.scrollBarH&&e.renderer.scrollBarH.inner,e.textInput&&e.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",e),i.addMouseWheelListener(e.container,this.onMouseWheel.bind(this,"mousewheel"),e),c(e.container,e);var h=e.renderer.$gutter;i.addListener(h,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),e),i.addListener(h,"click",this.onMouseEvent.bind(this,"gutterclick"),e),i.addListener(h,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),e),i.addListener(h,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),e),i.addListener(a,"mousedown",n,e),i.addListener(h,"mousedown",n,e),o.isIE&&e.renderer.scrollBarV&&(i.addListener(e.renderer.scrollBarV.element,"mousedown",n,e),i.addListener(e.renderer.scrollBarH.element,"mousedown",n,e)),e.on("mousemove",(function(n){if(!t.state&&!t.$dragDelay&&t.$dragEnabled){var i=e.renderer.screenToTextCoordinates(n.x,n.y),o=e.session.selection.getRange(),r=e.renderer;!o.isEmpty()&&o.insideStart(i.row,i.column)?r.setCursorStyle("default"):r.setCursorStyle("")}}),e)}return e.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new a(t,this.editor))},e.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new a(t,this.editor))},e.prototype.onMouseWheel=function(e,t){var n=new a(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},e.prototype.setState=function(e){this.state=e},e.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;var n=this.editor,r=this.editor.renderer;r.$isMousePressed=!0;var s=this,l=function(e){if(e){if(o.isWebKit&&!e.which&&s.releaseMouse)return s.releaseMouse();s.x=e.clientX,s.y=e.clientY,t&&t(e),s.mouseEvent=new a(e,s.editor),s.$mouseMoved=!0}},c=function(e){n.off("beforeEndOperation",u),clearInterval(d),n.session&&h(),s[s.state+"End"]&&s[s.state+"End"](e),s.state="",s.isMousePressed=r.$isMousePressed=!1,r.$keepTextAreaAtCursor&&r.$moveTextAreaToCursor(),s.$onCaptureMouseMove=s.releaseMouse=null,e&&s.onMouseEvent("mouseup",e),n.endOperation()},h=function(){s[s.state]&&s[s.state](),s.$mouseMoved=!1};if(o.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout((function(){c(e)}));var u=function(e){s.releaseMouse&&n.curOp.command.name&&n.curOp.selectionChanged&&(s[s.state+"End"]&&s[s.state+"End"](),s.state="",s.releaseMouse())};n.on("beforeEndOperation",u),n.startOperation({command:{name:"mouse"}}),s.$onCaptureMouseMove=l,s.releaseMouse=i.capture(this.editor.container,l,c);var d=setInterval(h,20)},e.prototype.cancelContextMenu=function(){var e=function(t){t&&t.domEvent&&"contextmenu"!=t.domEvent.type||(this.editor.off("nativecontextmenu",e),t&&t.domEvent&&i.stopEvent(t.domEvent))}.bind(this);setTimeout(e,10),this.editor.on("nativecontextmenu",e)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e}();u.prototype.releaseMouse=null,h.defineOptions(u.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:o.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=u})),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(){function e(e){e.on("click",(function(t){var n=t.getDocumentPosition(),o=e.session,r=o.getFoldAt(n.row,n.column,1);r&&(t.getAccelKey()?o.removeFold(r):o.expandFold(r),t.stop());var s=t.domEvent&&t.domEvent.target;s&&i.hasCssClass(s,"ace_inline_button")&&i.hasCssClass(s,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),e.renderer.scrollCursorIntoView())})),e.on("gutterclick",(function(t){var n=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==n){var i=t.getDocumentPosition().row,o=e.session;o.foldWidgets&&o.foldWidgets[i]&&e.session.onFoldWidgetClick(i,t),e.isFocused()||e.focus(),t.stop()}})),e.on("gutterdblclick",(function(t){var n=e.renderer.$gutterLayer.getRegion(t);if("foldWidgets"==n){var i=t.getDocumentPosition().row,o=e.session,r=o.getParentFoldRangeData(i,!0),s=r.range||r.firstRange;if(s){i=s.start.row;var a=o.getFoldAt(i,o.getLine(i).length,1);a?o.removeFold(a):(o.addFold("...",s),e.renderer.scrollCursorIntoView({row:s.start.row,column:0}))}t.stop()}}))}return e}();t.FoldHandler=o})),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],(function(e,t,n){"use strict";var i=e("../lib/keys"),o=e("../lib/event"),r=function(){function e(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}return e.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},e.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){while(t[t.length-1]&&t[t.length-1]!=this.$defaultHandler)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},e.prototype.addKeyboardHandler=function(e,t){if(e){"function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e);var n=this.$handlers.indexOf(e);-1!=n&&this.$handlers.splice(n,1),void 0==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor)}},e.prototype.removeKeyboardHandler=function(e){var t=this.$handlers.indexOf(e);return-1!=t&&(this.$handlers.splice(t,1),e.detach&&e.detach(this.$editor),!0)},e.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},e.prototype.getStatusText=function(){var e=this.$data,t=e.editor;return this.$handlers.map((function(n){return n.getStatusText&&n.getStatusText(t,e)||""})).filter(Boolean).join(" ")},e.prototype.$callKeyboardHandlers=function(e,t,n,i){for(var r,s=!1,a=this.$editor.commands,l=this.$handlers.length;l--;)if(r=this.$handlers[l].handleKeyboard(this.$data,e,t,n,i),r&&r.command&&(s="null"==r.command||a.exec(r.command,this.$editor,r.args,i),s&&i&&-1!=e&&1!=r["passEvent"]&&1!=r.command["passEvent"]&&o.stopEvent(i),s))break;return s||-1!=e||(r={command:"insertstring"},s=a.exec("insertstring",this.$editor,t)),s&&this.$editor._signal&&this.$editor._signal("keyboardActivity",r),s},e.prototype.onCommandKey=function(e,t,n){var o=i.keyCodeToString(n);return this.$callKeyboardHandlers(t,o,n,e)},e.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},e}();t.KeyBinding=r})),ace.define("ace/lib/bidiutil",["require","exports","module"],(function(e,t,n){"use strict";var i=0,o=0,r=!1,s=!1,a=!1,l=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],c=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h=0,u=1,d=0,p=1,g=2,f=3,m=4,v=5,y=6,w=7,b=8,$=9,x=10,C=11,S=12,A=13,k=14,L=15,_=16,R=17,T=18,M=[T,T,T,T,T,T,T,T,T,y,v,y,b,v,T,T,T,T,T,T,T,T,T,T,T,T,T,T,v,v,v,y,b,m,m,C,C,C,m,m,m,m,m,x,$,x,$,$,g,g,g,g,g,g,g,g,g,g,$,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,m,m,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,d,m,m,m,m,T,T,T,T,T,T,v,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,T,$,m,C,C,C,C,m,m,m,m,d,m,m,T,m,m,C,C,g,g,m,d,m,m,m,g,d,m,m,m,m,m],E=[b,b,b,b,b,b,b,b,b,b,b,T,T,T,d,p,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b,v,A,k,L,_,R,$,C,C,C,C,C,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,$,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,b];function I(e,t,n,h){var u=i?c:l,d=null,p=null,g=null,f=0,m=null,w=null,$=-1,x=null,C=null,S=[];if(!h)for(x=0,h=[];x<n;x++)h[x]=D(e[x]);for(o=i,r=!1,!1,s=!1,a=!1,C=0;C<n;C++){if(d=f,S[C]=p=F(e,h,S,C),f=u[d][p],m=240&f,f&=15,t[C]=g=u[f][5],m>0)if(16==m){for(x=$;x<C;x++)t[x]=1;$=-1}else $=-1;if(w=u[f][6],w)-1==$&&($=C);else if($>-1){for(x=$;x<C;x++)t[x]=g;$=-1}h[C]==v&&(t[C]=0),o|=g}if(a)for(x=0;x<n;x++)if(h[x]==y){t[x]=i;for(var A=x-1;A>=0;A--){if(h[A]!=b)break;t[A]=i}}}function O(e,t,n){if(!(o<e))if(1!=e||i!=u||s){var r,a,l,c,h=n.length,d=0;while(d<h){if(t[d]>=e){r=d+1;while(r<h&&t[r]>=e)r++;for(a=d,l=r-1;a<l;a++,l--)c=n[a],n[a]=n[l],n[l]=c;d=r}d++}}else n.reverse()}function F(e,t,n,o){var l,c,h,u,M=t[o];switch(M){case d:case p:r=!1;case m:case f:return M;case g:return r?f:g;case w:return r=!0,!0,p;case b:return m;case $:return o<1||o+1>=t.length||(l=n[o-1])!=g&&l!=f||(c=t[o+1])!=g&&c!=f?m:(r&&(c=f),c==l?c:m);case x:return l=o>0?n[o-1]:v,l==g&&o+1<t.length&&t[o+1]==g?g:m;case C:if(o>0&&n[o-1]==g)return g;if(r)return m;u=o+1,h=t.length;while(u<h&&t[u]==C)u++;return u<h&&t[u]==g?g:m;case S:h=t.length,u=o+1;while(u<h&&t[u]==S)u++;if(u<h){var E=e[o],I=E>=1425&&E<=2303||64286==E;if(l=t[u],I&&(l==p||l==w))return p}return o<1||(l=t[o-1])==v?m:n[o-1];case v:return r=!1,s=!0,i;case y:return a=!0,m;case A:case k:case _:case R:case L:r=!1;case T:return m}}function D(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?t>191?d:M[t]:5==n?/[\u0591-\u05f4]/.test(e)?p:d:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?S:/[\u0660-\u0669\u066b-\u066c]/.test(e)?f:1642==t?C:/[\u06f0-\u06f9]/.test(e)?g:w:32==n&&t<=8287?E[255&t]:254==n&&t>=65136?w:m}t.L=d,t.R=p,t.EN=g,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,n,o){if(e.length<2)return{};var r=e.split(""),s=new Array(r.length),a=new Array(r.length),l=[];i=o?u:h,I(r,l,r.length,n);for(var c=0;c<s.length;s[c]=c,c++);O(2,l,s),O(1,l,s);for(c=0;c<s.length-1;c++)n[c]===f?l[c]=t.AN:l[c]===p&&(n[c]>w&&n[c]<A||n[c]===m||n[c]===T)?l[c]=t.ON_R:c>0&&"ل"===r[c-1]&&/\u0622|\u0623|\u0625|\u0627/.test(r[c])&&(l[c-1]=l[c]=t.R_H,c++);r[r.length-1]===t.DOT&&(l[r.length-1]=t.B),"‫"===r[0]&&(l[0]=t.RLE);for(c=0;c<s.length;c++)a[c]=l[s[c]];return{logicalFromVisual:s,bidiLevels:a}},t.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=D(e.charAt(i)),n||t[i]!=p&&t[i]!=w&&t[i]!=f||(n=!0);return n},t.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}})),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],(function(e,t,n){"use strict";var i=e("./lib/bidiutil"),o=e("./lib/lang"),r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,s=function(){function e(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=i,this.charWidths=[],this.EOL="¬",this.showInvisibles=!0,this.isRtlDir=!1,this.$isRtl=!1,this.line="",this.wrapIndent=0,this.EOF="¶",this.RLE="‫",this.contentWidth=0,this.fontMetrics=null,this.rtlLineOffset=0,this.wrapOffset=0,this.isMoveLeftOperation=!1,this.seenBidi=r.test(e.getValue())}return e.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},e.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&r.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},e.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n=this.session.$getRowCacheIndex(t,this.currentRow);n>=0&&(e=this.session.$docRowCache[n])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length){var n,i=this.session.$getRowCacheIndex(t,this.currentRow);while(this.currentRow-e>0){if(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1),n!==i)break;i=n,e++}}else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var n=e===this.session.getLength()-1,r=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[e];s&&(void 0===t&&(t=this.getSplitIndex()),t>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=t<s.length?this.line.substring(s[t-1],s[t]):this.line.substring(s[s.length-1])):this.line=this.line.substring(0,s[t]),t==s.length&&(this.line+=this.showInvisibles?r:i.DOT))}else this.line+=this.showInvisibles?r:i.DOT;var a,l=this.session,c=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,(function(e,t){return"\t"===e||l.isFullWidth(e.charCodeAt(0))?(a="\t"===e?l.getScreenTabSize(t+c):2,c+=a-1,o.stringRepeat(i.DOT,a)):e})),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==i.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},e.prototype.updateBidiMap=function(){var e=[];i.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=i.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},e.prototype.markAsDirty=function(){this.currentRow=null},e.prototype.updateCharacterWidths=function(e){if(this.characterWidth!==e.$characterSize.width){this.fontMetrics=e;var t=this.characterWidth=e.$characterSize.width,n=e.$measureCharWidth("ה");this.charWidths[i.L]=this.charWidths[i.EN]=this.charWidths[i.ON_R]=t,this.charWidths[i.R]=this.charWidths[i.AN]=n,this.charWidths[i.R_H]=.45*n,this.charWidths[i.B]=this.charWidths[i.RLE]=0,this.currentRow=null}},e.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},e.prototype.setEolChar=function(e){this.EOL=e},e.prototype.setContentWidth=function(e){this.contentWidth=e},e.prototype.isRtlLine=function(e){return!!this.$isRtl||(void 0!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},e.prototype.setRtlDirection=function(e,t){for(var n=e.getCursorPosition(),i=e.selection.getSelectionAnchor().row;i<=n.row;i++)t||e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE?t&&e.session.getLine(i).charAt(0)!==e.session.$bidiHandler.RLE&&e.session.doc.insert({column:0,row:i},e.session.$bidiHandler.RLE):e.session.doc.removeInLine(i,0,1)},e.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=e>t?this.session.getOverwrite()?e:e-1:t,o=i.getVisualFromLogicalIdx(n,this.bidiMap),r=this.bidiMap.bidiLevels,s=0;!this.session.getOverwrite()&&e<=t&&r[o]%2!==0&&o++;for(var a=0;a<o;a++)s+=this.charWidths[r[a]];return!this.session.getOverwrite()&&e>t&&r[o]%2===0&&(s+=this.charWidths[r[o]]),this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(s+=this.rtlLineOffset),s},e.prototype.getSelections=function(e,t){var n,i=this.bidiMap,o=i.bidiLevels,r=[],s=0,a=Math.min(e,t)-this.wrapIndent,l=Math.max(e,t)-this.wrapIndent,c=!1,h=!1,u=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,p=0;p<o.length;p++)d=i.logicalFromVisual[p],n=o[p],c=d>=a&&d<l,c&&!h?u=s:!c&&h&&r.push({left:u,width:s-u}),s+=this.charWidths[n],h=c;if(c&&p===o.length&&r.push({left:u,width:s-u}),this.isRtlDir)for(var g=0;g<r.length;g++)r[g].left+=this.rtlLineOffset;return r},e.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,n=(e=Math.max(e,0),0),i=0,o=this.bidiMap.bidiLevels,r=this.charWidths[o[i]];this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);while(e>n+r/2){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return i>0&&o[i-1]%2!==0&&o[i]%2===0?(e<n&&i--,t=this.bidiMap.logicalFromVisual[i]):i>0&&o[i-1]%2===0&&o[i]%2!==0?t=1+(e>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===o.length-1&&0===r&&o[i-1]%2===0||!this.isRtlDir&&0===i&&o[i]%2!==0?t=1+this.bidiMap.logicalFromVisual[i]:(i>0&&o[i-1]%2!==0&&0!==r&&i--,t=this.bidiMap.logicalFromVisual[i]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=s})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var n=t?e.end:e.start,i=t?e.start:e.end;this.$setSelection(n.row,n.column,i.row,i.column)},e.prototype.$setSelection=function(e,t,n,i){if(!this.$silent){var o=this.$isEmpty,r=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if("undefined"==typeof t){var n=e||this.lead;e=n.row,t=n.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var n,i="number"==typeof e?e:this.lead.row,o=this.session.getFoldLine(i);return o?(i=o.start.row,n=o.end.row):n=i,!0===t?new s(i,0,n,this.session.getLine(n).length):new s(i,0,n+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var n=this.session.getTabSize();t=this.lead;this.wouldMoveIntoSoftTab(t,n,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,n):this.moveCursorBy(0,1)}},e.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),i=this.session.screenToDocumentPosition(n,0),o=this.session.getDisplayLine(e,null,i.row,i.column),r=o.match(/^\s*/);r[0].length==t||this.session.$useEmacsStyleLineStart||(i.column+=r[0].length),this.moveCursorToPosition(i)},e.prototype.moveCursorLineEnd=function(){var e=this.lead,t=this.session.getDocumentLastRowColumnPosition(e.row,e.column);if(this.lead.column==t.column){var n=this.session.getLine(t.row);if(t.column==n.length){var i=n.search(/\s+$/);i>0&&(t.column=i)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var o=this.session.getFoldAt(e,t,1);if(o)this.moveCursorTo(o.end.row,o.end.column);else{if(this.session.nonTokenRe.exec(i)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(t)),t>=n.length)return this.moveCursorTo(e,n.length),this.moveCursorRight(),void(e<this.doc.getLength()-1&&this.moveCursorWordRight());this.session.tokenRe.exec(i)&&(t+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},e.prototype.moveCursorLongWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))this.moveCursorTo(e.start.row,e.start.column);else{var i=this.session.getFoldStringAt(t,n,-1);null==i&&(i=this.doc.getLine(t).substring(0,n));var r=o.stringReverse(i);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(r)&&(n-=this.session.nonTokenRe.lastIndex,r=r.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0)return this.moveCursorTo(t,0),this.moveCursorLeft(),void(t>0&&this.moveCursorWordLeft());this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,n)}},e.prototype.$shortWordEndIndex=function(e){var t,n=0,i=/\s/,o=this.session.tokenRe;if(o.lastIndex=0,this.session.tokenRe.exec(e))n=this.session.tokenRe.lastIndex;else{while((t=e[n])&&i.test(t))n++;if(n<1){o.lastIndex=0;while((t=e[n])&&!o.test(t))if(o.lastIndex=0,n++,i.test(t)){if(n>2){n--;break}while((t=e[n])&&i.test(t))n++;if(n>2)break}}}return o.lastIndex=0,n},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=this.session.getFoldAt(e,t,1);if(o)return this.moveCursorTo(o.end.row,o.end.column);if(t==n.length){var r=this.doc.getLength();do{e++,i=this.doc.getLine(e)}while(e<r&&/^\s*$/.test(i));/^\s+/.test(i)||(i=""),t=0}var s=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+s)},e.prototype.moveCursorShortWordLeft=function(){var e,t=this.lead.row,n=this.lead.column;if(e=this.session.getFoldAt(t,n,-1))return this.moveCursorTo(e.start.row,e.start.column);var i=this.session.getLine(t).substring(0,n);if(0===n){do{t--,i=this.doc.getLine(t)}while(t>0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var r=o.stringReverse(i),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,n-s)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var o=this.session.lineWidgets[this.lead.row];e<0?e-=o.rowsAbove||0:e>0&&(e+=o.rowCount-(o.rowsAbove||0))}var r=this.session.screenToDocumentPosition(i.row+e,i.column,n);0!==e&&0===t&&r.row===this.lead.row&&(r.column,this.lead.column),this.moveCursorTo(r.row,r.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1);i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0;var o=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(o.charAt(t))&&o.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,n){var i=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(i.row,i.column,n)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(i){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else{e=this.getRange();e.isBackwards=this.isBackwards()}return e},e.prototype.fromJSON=function(e){if(void 0==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var n=s.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();a.prototype.setSelectionAnchor=a.prototype.setAnchor,a.prototype.getSelectionAnchor=a.prototype.getAnchor,a.prototype.setSelectionRange=a.prototype.setRange,i.implement(a.prototype,r),t.Selection=a})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,n){"use strict";var i=e("./lib/report_error").reportError,o=2e3,r=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[t],i=[],o=0,r=this.matchMappings[t]={defaultToken:"text"},s="g",a=[],l=0;l<n.length;l++){var c=n[l];if(c.defaultToken&&(r.defaultToken=c.defaultToken),c.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),c.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=c.regex){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var h=c.regex,u=new RegExp("(?:("+h+")|(.))").exec("a").length-2;Array.isArray(c.token)?1==c.token.length||1==u?c.token=c.token[0]:u-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:u-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):"function"!=typeof c.token||c.onMatch||(c.onMatch=u>1?this.$applyToken:c.token),u>1&&(/\\\d/.test(c.regex)?h=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+o+1)})):(u=1,h=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),r[o]=l,o+=u,i.push(h),c.onMatch||(c.onMatch=null)}}i.length||(r[0]=0,i.push("$")),a.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,s)}),this),this.regExps[t]=new RegExp("("+i.join(")|(")+")|($)",s)}}return e.prototype.$setMaxTokenCount=function(e){o=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),n=this.token.apply(this,t);if("string"===typeof n)return[{type:n,value:e}];for(var i=[],o=0,r=n.length;o<r;o++)t[o]&&(i[i.length]={type:n[o],value:t[o]});return i},e.prototype.$arrayTokens=function(e){if(!e)return[];var t=this.splitRegex.exec(e);if(!t)return"text";for(var n=[],i=this.tokenArray,o=0,r=i.length;o<r;o++)t[o+1]&&(n[n.length]={type:i[o],value:t[o+1]});return n},e.prototype.removeCapturingGroups=function(e){var t=e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,(function(e,t){return t?"(?:":e}));return t},e.prototype.createSplitterRegexp=function(e,t){if(-1!=e.indexOf("(?=")){var n=0,i=!1,o={};e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,(function(e,t,r,s,a,l){return i?i="]"!=a:a?i=!0:s?(n==o.stack&&(o.end=l+1,o.stack=-1),n--):r&&(n++,1!=r.length&&(o.stack=n,o.start=l)),e})),null!=o.end&&/^\)*$/.test(e.substr(o.end))&&(e=e.substring(0,o.start)+e.substr(o.end))}return"^"!=e.charAt(0)&&(e="^"+e),"$"!=e.charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},e.prototype.getLineTokens=function(e,t){if(t&&"string"!=typeof t){var n=t.slice(0);t=n[0],"#tmp"===t&&(n.shift(),t=n.shift())}else n=[];var i=t||"start",r=this.states[i];r||(i="start",r=this.states[i]);var s=this.matchMappings[i],a=this.regExps[i];a.lastIndex=0;var l,c=[],h=0,u=0,d={type:null,value:""};while(l=a.exec(e)){var p=s.defaultToken,g=null,f=l[0],m=a.lastIndex;if(m-f.length>h){var v=e.substring(h,m-f.length);d.type==p?d.value+=v:(d.type&&c.push(d),d={type:p,value:v})}for(var y=0;y<l.length-2;y++)if(void 0!==l[y+1]){g=r[s[y]],p=g.onMatch?g.onMatch(f,i,n,e):g.token,g.next&&(i="string"==typeof g.next?g.next:g.next(i,n),r=this.states[i],r||(this.reportError("state doesn't exist",i),i="start",r=this.states[i]),s=this.matchMappings[i],h=m,a=this.regExps[i],a.lastIndex=m),g.consumeLineEnd&&(h=m);break}if(f)if("string"===typeof p)g&&!1===g.merge||d.type!==p?(d.type&&c.push(d),d={type:p,value:f}):d.value+=f;else if(p){d.type&&c.push(d),d={type:null,value:""};for(y=0;y<p.length;y++)c.push(p[y])}if(h==e.length)break;if(h=m,u++>o){u>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});while(h<e.length)d.type&&c.push(d),d={value:e.substring(h,h+=500),type:"overflow"};i="start",n=[];break}}return d.type&&c.push(d),n.length>1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},e}();r.prototype.reportError=i,t.Tokenizer=r})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,n){"use strict";var i,o=e("../lib/deep_copy").deepCopy;i=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},function(){this.addRules=function(e,t){if(t)for(var n in e){for(var i=e[n],o=0;o<i.length;o++){var r=i[o];(r.next||r.onMatch)&&("string"==typeof r.next&&0!==r.next.indexOf(t)&&(r.next=t+r.next),r.nextState&&0!==r.nextState.indexOf(t)&&(r.nextState=t+r.nextState))}this.$rules[t+n]=i}else for(var n in e)this.$rules[n]=e[n]},this.getRules=function(){return this.$rules},this.embedRules=function(e,t,n,i,r){var s="function"==typeof e?(new e).getRules():e;if(i)for(var a=0;a<i.length;a++)i[a]=t+i[a];else for(var l in i=[],s)i.push(t+l);if(this.addRules(s,t),n){var c=Array.prototype[r?"push":"unshift"];for(a=0;a<i.length;a++)c.apply(this.$rules[i[a]],o(n))}this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};var e=function(e,t){return("start"!=e||t.length)&&t.unshift(this.nextState,e),this.nextState},t=function(e,t){return t.shift(),t.shift()||"start"};this.normalizeRules=function(){var n=0,i=this.$rules;function o(r){var s=i[r];s["processed"]=!0;for(var a=0;a<s.length;a++){var l=s[a],c=null;Array.isArray(l)&&(c=l,l={}),!l.regex&&l.start&&(l.regex=l.start,l.next||(l.next=[]),l.next.push({defaultToken:l.token},{token:l.token+".end",regex:l.end||l.start,next:"pop"}),l.token=l.token+".start",l.push=!0);var h=l.next||l.push;if(h&&Array.isArray(h)){var u=l.stateName;u||(u=l.token,"string"!=typeof u&&(u=u[0]||""),i[u]&&(u+=n++)),i[u]=h,l.next=u,o(u)}else"pop"==h&&(l.next=t);if(l.push&&(l.nextState=l.next||l.push,l.next=e,delete l.push),l.rules)for(var d in l.rules)i[d]?i[d].push&&i[d].push.apply(i[d],l.rules[d]):i[d]=l.rules[d];var p="string"==typeof l?l:l.include;if(p&&("$self"===p&&(p="start"),c=Array.isArray(p)?p.map((function(e){return i[e]})):i[p]),c){var g=[a,1].concat(c);l.noEscape&&(g=g.filter((function(e){return!e.next}))),s.splice.apply(s,g),a--}l.keywordMap&&(l.token=this.createKeywordMapper(l.keywordMap,l.defaultToken||"text",l.caseInsensitive),delete l.defaultToken)}}Object.keys(i).forEach(o,this)},this.createKeywordMapper=function(e,t,n,i){var o=Object.create(null);return this.$keywordList=[],Object.keys(e).forEach((function(t){for(var r=e[t],s=r.split(i||"|"),a=s.length;a--;){var l=s[a];this.$keywordList.push(l),n&&(l=l.toLowerCase()),o[l]=t}}),this),e=null,n?function(e){return o[e.toLowerCase()]||t}:function(e){return o[e]||t}},this.getKeywords=function(){return this.$keywords}}.call(i.prototype),t.TextHighlightRules=i})),ace.define("ace/mode/behaviour",["require","exports","module"],(function(e,t,n){"use strict";var i;i=function(){this.$behaviours={}},function(){this.add=function(e,t,n){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[e]:this.$behaviours[e]={}}this.$behaviours[e][t]=n},this.addBehaviours=function(e){for(var t in e)for(var n in e[t])this.add(t,n,e[t][n])},this.remove=function(e){this.$behaviours&&this.$behaviours[e]&&delete this.$behaviours[e]},this.inherit=function(e,t){if("function"===typeof e)var n=(new e).getBehaviours(t);else n=e.getBehaviours(t);this.addBehaviours(n)},this.getBehaviours=function(e){if(e){for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}return this.$behaviours}}.call(i.prototype),t.Behaviour=i})),ace.define("ace/token_iterator",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range,o=function(){function e(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);var i=e.getTokenAt(t,n);this.$tokenIndex=i?i.index:-1}return e.prototype.stepBackward=function(){this.$tokenIndex-=1;while(this.$tokenIndex<0){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},e.prototype.stepForward=function(){var e;this.$tokenIndex+=1;while(this.$tokenIndex>=this.$rowTokens.length){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;n=0;while(t>0)t-=1,n+=e[t].value.length;return n},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=o})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,n){"use strict";var i,o,r=e("../../lib/oop"),s=e("../behaviour").Behaviour,a=e("../../token_iterator").TokenIterator,l=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],h=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},d={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,u.rangeCount!=e.multiSelect.rangeCount&&(u={rangeCount:e.multiSelect.rangeCount})),u[t])return i=u[t];i=u[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},g=function(e,t,n,i){var o=e.end.row-e.start.row;return{text:n+t+i,selection:[0,e.start.column+1,o,e.end.column+(o?0:1)]}};o=function(e){e=e||{},this.add("braces","insertion",(function(t,n,r,s,a){var c=r.getCursorPosition(),h=s.doc.getLine(c.row);if("{"==a){p(r);var u=r.getSelectionRange(),d=s.doc.getTextRange(u);if(""!==d&&"{"!==d&&r.getWrapBehavioursEnabled())return g(u,d,"{","}");if(o.isSaneInsertion(r,s))return/[\]\}\)]/.test(h[c.column])||r.inMultiSelectMode||e.braces?(o.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(o.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==a){p(r);var f=h.substring(c.column,c.column+1);if("}"==f){var m=s.$findOpeningBracket("}",{column:c.column+1,row:c.row});if(null!==m&&o.isAutoInsertedClosing(c,h,a))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==a||"\r\n"==a){p(r);var v="";o.isMaybeInsertedClosing(c,h)&&(v=l.stringRepeat("}",i.maybeInsertedBrackets),o.clearMaybeInsertedClosing());f=h.substring(c.column,c.column+1);if("}"===f){var y=s.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!y)return null;var w=this.$getIndent(s.getLine(y.row))}else{if(!v)return void o.clearMaybeInsertedClosing();w=this.$getIndent(h)}var b=w+s.getTabString();return{text:"\n"+b+"\n"+w+v,selection:[1,b.length,1,b.length]}}o.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,n,o,r){var s=o.doc.getTextRange(r);if(!r.isMultiLine()&&"{"==s){p(n);var a=o.doc.getLine(r.start.row),l=a.substring(r.end.column,r.end.column+1);if("}"==l)return r.end.column++,r;i.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,n,i,r){if("("==r){p(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return g(s,a,"(",")");if(o.isSaneInsertion(n,i))return o.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row),h=c.substring(l.column,l.column+1);if(")"==h){var u=i.$findOpeningBracket(")",{column:l.column+1,row:l.row});if(null!==u&&o.isAutoInsertedClosing(l,c,r))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("parens","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"("==r){p(n);var s=i.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if(")"==a)return o.end.column++,o}})),this.add("brackets","insertion",(function(e,t,n,i,r){if("["==r){p(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&n.getWrapBehavioursEnabled())return g(s,a,"[","]");if(o.isSaneInsertion(n,i))return o.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){p(n);var l=n.getCursorPosition(),c=i.doc.getLine(l.row),h=c.substring(l.column,l.column+1);if("]"==h){var u=i.$findOpeningBracket("]",{column:l.column+1,row:l.row});if(null!==u&&o.isAutoInsertedClosing(l,c,r))return o.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}})),this.add("brackets","deletion",(function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"["==r){p(n);var s=i.doc.getLine(o.start.row),a=s.substring(o.start.column+1,o.start.column+2);if("]"==a)return o.end.column++,o}})),this.add("string_dquotes","insertion",(function(e,t,n,i,o){var r=i.$mode.$quotes||d;if(1==o.length&&r[o]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(o))return;p(n);var s=o,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&r[l])&&n.getWrapBehavioursEnabled())return g(a,l,s,s);if(!l){var c=n.getCursorPosition(),h=i.doc.getLine(c.row),u=h.substring(c.column-1,c.column),f=h.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==u&&m&&/escape/.test(m.type))return null;var y,w=m&&/string|escape/.test(m.type),b=!v||/string|escape/.test(v.type);if(f==s)y=w!==b,y&&/string\.end/.test(v.type)&&(y=!1);else{if(w&&!b)return null;if(w&&b)return null;var $=i.$mode.tokenRe;$.lastIndex=0;var x=$.test(u);$.lastIndex=0;var C=$.test(f),S=i.$mode.$pairQuotesAfter,A=S&&S[s]&&S[s].test(u);if(!A&&x||C)return null;if(f&&!/[\s;,.})\]\\]/.test(f))return null;var k=h[c.column-2];if(u==s&&(k==s||$.test(k)))return null;y=!0}return{text:y?s+s:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,n,i,o){var r=i.$mode.$quotes||d,s=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(s)){p(n);var a=i.doc.getLine(o.start.row),l=a.substring(o.start.column+1,o.start.column+2);if(l==s)return o.end.column++,o}})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,n,i,o){if("doc-start"===e&&("\n"===o||"\r\n"===o)&&n.selection.isEmpty()){var r=n.getCursorPosition(),s=i.doc.getLine(r.row),a=i.doc.getLine(r.row+1),l=this.$getIndent(s);if(/\s*\*/.test(a))return/^\s*\*/.test(s)?{text:o+l+"* ",selection:[1,3+l.length,1,3+l.length]}:{text:o+l+" * ",selection:[1,3+l.length,1,3+l.length]};if(/\/\*\*/.test(s.substring(0,r.column)))return{text:o+l+" * "+o+" "+l+"*/",selection:[1,4+l.length,1,4+l.length]}}}))},o.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new a(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;var o=new a(t,n.row,n.column+1);if(!this.$matchTokenType(o.getCurrentToken()||"text",c))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",h)},o["$matchTokenType"]=function(e,t){return t.indexOf(e.type||e)>-1},o["recordAutoInsert"]=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this["isAutoInsertedClosing"](o,r,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=o.row,i.autoInsertedLineEnd=n+r.substr(o.column),i.autoInsertedBrackets++},o["recordMaybeInsert"]=function(e,t,n){var o=e.getCursorPosition(),r=t.doc.getLine(o.row);this["isMaybeInsertedClosing"](o,r)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=o.row,i.maybeInsertedLineStart=r.substr(0,o.column)+n,i.maybeInsertedLineEnd=r.substr(o.column),i.maybeInsertedBrackets++},o["isAutoInsertedClosing"]=function(e,t,n){return i.autoInsertedBrackets>0&&e.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&t.substr(e.column)===i.autoInsertedLineEnd},o["isMaybeInsertedClosing"]=function(e,t){return i.maybeInsertedBrackets>0&&e.row===i.maybeInsertedRow&&t.substr(e.column)===i.maybeInsertedLineEnd&&t.substr(0,e.column)==i.maybeInsertedLineStart},o["popAutoInsertedClosing"]=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},o["clearMaybeInsertedClosing"]=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(o,s),t.CstyleBehaviour=o})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],o=0,r=[],s=0;s<i.length;s+=2)r.push(o+=i[s]),i[s+1]&&r.push(45,o+=i[s+1]);t.wordChars=String.fromCharCode.apply(null,r)})),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i,o=e("../config"),r=e("../tokenizer").Tokenizer,s=e("./text_highlight_rules").TextHighlightRules,a=e("./behaviour/cstyle").CstyleBehaviour,l=e("../unicode"),c=e("../lib/lang"),h=e("../token_iterator").TokenIterator,u=e("../range").Range;i=function(){this.HighlightRules=s},function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+l.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+l.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new r(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,n,i){var o=t.doc,r=!0,s=!0,a=1/0,l=t.getTabSize(),h=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))f=this.lineCommentStart.map(c.escapeRegExp).join("|"),p=this.lineCommentStart[0];else f=c.escapeRegExp(this.lineCommentStart),p=this.lineCommentStart;f=new RegExp("^(\\s*)(?:"+f+") ?"),h=t.getUseSoftTabs();y=function(e,t){var n=e.match(f);if(n){var i=n[1].length,r=n[0].length;d(e,i,r)||" "!=n[0][r-1]||r--,o.removeInLine(t,i,r)}};var u=p+" ",d=(v=function(e,t){r&&!/\S/.test(e)||(d(e,a,a)?o.insertInLine({row:t,column:a},u):o.insertInLine({row:t,column:a},p))},w=function(e,t){return f.test(e)},function(e,t,n){var i=0;while(t--&&" "==e.charAt(t))i++;if(i%l!=0)return!1;i=0;while(" "==e.charAt(n++))i++;return l>2?i%l!=l-1:i%l==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,g=this.blockComment.end,f=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),m=new RegExp("(?:"+c.escapeRegExp(g)+")\\s*$"),v=function(e,t){w(e,t)||r&&!/\S/.test(e)||(o.insertInLine({row:t,column:e.length},g),o.insertInLine({row:t,column:a},p))},y=function(e,t){var n;(n=e.match(m))&&o.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(f))&&o.removeInLine(t,n[1].length,n[0].length)},w=function(e,n){if(f.test(e))return!0;for(var i=t.getTokens(n),o=0;o<i.length;o++)if("comment"===i[o].type)return!0}}function b(e){for(var t=n;t<=i;t++)e(o.getLine(t),t)}var $=1/0;b((function(e,t){var n=e.search(/\S/);-1!==n?(n<a&&(a=n),s&&!w(e,t)&&(s=!1)):$>e.length&&($=e.length)})),a==1/0&&(a=$,r=!1,s=!1),h&&a%l!=0&&(a=Math.floor(a/l)*l),b(s?y:v)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=new h(t,i.row,i.column),l=a.getCurrentToken(),c=(t.selection,t.selection.toOrientedRange());if(l&&/comment/.test(l.type)){var d,p;while(l&&/comment/.test(l.type)){var g=l.value.indexOf(o.start);if(-1!=g){var f=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+g;d=new u(f,m,f,m+o.start.length);break}l=a.stepBackward()}a=new h(t,i.row,i.column),l=a.getCurrentToken();while(l&&/comment/.test(l.type)){g=l.value.indexOf(o.end);if(-1!=g){f=a.getCurrentTokenRow(),m=a.getCurrentTokenColumn()+g;p=new u(f,m,f,m+o.end.length);break}l=a.stepForward()}p&&t.remove(p),d&&(t.remove(d),r=d.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);c.start.row==r&&(c.start.column+=s),c.end.row==r&&(c.end.column+=s),t.selection.fromOrientedRange(c)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var n=e[t],i=n.prototype.$id,r=o.$modes[i];r||(o.$modes[i]=r=new n),o.$modes[t]||(o.$modes[t]=r),this.$embeds.push(t),this.$modes[t]=r}var s=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],a=function(e){(function(t){var n=s[e],i=t[n];t[s[e]]=function(){return this.$delegator(n,arguments,i)}})(l)},l=this;for(t=0;t<s.length;t++)a(t)},this.$delegator=function(e,t,n){var i=t[0]||"start";if("string"!=typeof i){if(Array.isArray(i[2])){var o=i[2][i[2].length-1],r=this.$modes[o];if(r)return r[e].apply(r,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var s=0;s<this.$embeds.length;s++)if(this.$modes[this.$embeds[s]]){var a=i.split(this.$embeds[s]);if(!a[0]&&a[1]){t[0]=a[1];r=this.$modes[this.$embeds[s]];return r[e].apply(r,t)}}var l=n.apply(this,t);return n?l:void 0},this.transformAction=function(e,t,n,i,o){if(this.$behaviour){var r=this.$behaviour.getBehaviours();for(var s in r)if(r[s][t]){var a=r[s][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer["rules"],n=[];for(var i in t)for(var o=t[i],r=0,s=o.length;r<s;r++)if("string"===typeof o[r].token)/keyword|support|storage/.test(o[r].token)&&n.push(o[r].regex);else if("object"===typeof o[r].token)for(var a=0,l=o[r].token.length;a<l;a++)if(/keyword|support|storage/.test(o[r].token[a])){i=o[r].regex.match(/\(.+?\)/g)[a];n.push(i.substr(1,i.length-2))}this.completionKeywords=n}return e?n.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,t,n,i){var o=this.$keywordList||this.$createKeywordList();return o.map((function(e){return{name:e,value:e,score:0,meta:"keyword"}}))},this.$id="ace/mode/text"}.call(i.prototype),t.Mode=i})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,n){"use strict";t.applyDelta=function(e,t,n){var i=t.start.row,o=t.start.column,r=e[i]||"";switch(t.action){case"insert":var s=t.lines;if(1===s.length)e[i]=r.substring(0,o)+t.lines[0]+r.substring(o);else{var a=[i,1].concat(t.lines);e.splice.apply(e,a),e[i]=r.substring(0,o)+e[i],e[i+t.lines.length-1]+=r.substring(o)}break;case"remove":var l=t.end.column,c=t.end.row;i===c?e[i]=r.substring(0,o)+r.substring(l):e.splice(i,c-i+1,r.substring(0,o)+e[c].substring(l));break}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(){function e(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if((e.start.row!=e.end.row||e.start.row==this.row)&&!(e.start.row>this.row)){var t=a(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,n){var i;if(i=n?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=i.row||this.column!=i.column){var o={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:o,value:i})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},e}();function s(e,t,n){var i=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&i}function a(e,t,n){var i="insert"==e.action,o=(i?1:-1)*(e.end.row-e.start.row),r=(i?1:-1)*(e.end.column-e.start.column),a=e.start,l=i?a:e.end;return s(t,a,n)?{row:t.row,column:t.column}:s(l,t,!n)?{row:t.row+o,column:t.column+(t.row==l.row?r:0)}:{row:a.row,column:a.column}}r.prototype.$insertRight=!1,i.implement(r.prototype,o),t.Anchor=r})),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./apply_delta").applyDelta,r=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,a=e("./anchor").Anchor,l=function(){function e(e){this.$lines=[""],0===e.length?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)}return e.prototype.setValue=function(e){var t=this.getLength()-1;this.remove(new s(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e||"")},e.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},e.prototype.createAnchor=function(e,t){return new a(this,e,t)},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},e.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},e.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},e.prototype.getNewLineMode=function(){return this.$newLineMode},e.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},e.prototype.getLine=function(e){return this.$lines[e]||""},e.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},e.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},e.prototype.getLength=function(){return this.$lines.length},e.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},e.prototype.getLinesForRange=function(e){var t;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}return t},e.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},e.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},e.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},e.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},e.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),i=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[t]},!0),this.clonePos(i)},e.prototype.clippedPos=function(e,t){var n=this.getLength();void 0===e?e=n:e<0?e=0:e>=n&&(e=n-1,t=void 0);var i=this.getLine(e);return void 0==t&&(t=i.length),t=Math.min(Math.max(t,0),i.length),{row:e,column:t}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());var n=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},e.prototype.insertMergedLines=function(e,t){var n=this.clippedPos(e.row,e.column),i={row:n.row+t.length-1,column:(1==t.length?n.column:0)+t[t.length-1].length};return this.applyDelta({start:n,end:i,action:"insert",lines:t}),this.clonePos(i)},e.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},e.prototype.removeInLine=function(e,t,n){var i=this.clippedPos(e,t),o=this.clippedPos(e,n);return this.applyDelta({start:i,end:o,action:"remove",lines:this.getLinesForRange({start:i,end:o})},!0),this.clonePos(i)},e.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var n=t==this.getLength()-1&&e>0,i=t<this.getLength()-1,o=n?e-1:e,r=n?this.getLine(o).length:0,a=i?t+1:t,l=i?0:this.getLine(a).length,c=new s(o,r,a,l),h=this.$lines.slice(e,t+1);return this.applyDelta({start:c.start,end:c.end,action:"remove",lines:this.getLinesForRange(c)}),h},e.prototype.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof s||(e=s.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),n=t?this.insert(e.start,t):e.start,n);var n},e.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},e.prototype.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var n="insert"==e.action;(n?e.lines.length<=1&&!e.lines[0]:!s.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row<t&&e.end.row<t||"insert"==e.action&&e.start.row<=t)&&this.applyDelta(e)},e.prototype.$splitAndapplyLargeDelta=function(e,t){for(var n=e.lines,i=n.length-t+1,o=e.start.row,r=e.start.column,s=0,a=0;s<i;s=a){a+=t-1;var l=n.slice(s,a);l.push(""),this.applyDelta({start:this.pos(o+s,r),end:this.pos(o+a,r=0),action:e.action,lines:l},!0)}e.lines=n.slice(s),e.start.row=o+s,e.start.column=r,this.applyDelta(e,!0)},e.prototype.revertDelta=function(e){this.$safeApplyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:"insert"==e.action?"remove":"insert",lines:e.lines.slice()})},e.prototype.indexToPosition=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,o=t||0,r=n.length;o<r;o++)if(e-=n[o].length+i,e<0)return{row:o,column:e+n[o].length+i};return{row:r-1,column:e+n[r-1].length+i}},e.prototype.positionToIndex=function(e,t){for(var n=this.$lines||this.getAllLines(),i=this.getNewLineCharacter().length,o=0,r=Math.min(e.row,n.length),s=t||0;s<r;++s)o+=n[s].length+i;return o+e.column},e.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},e}();l.prototype.$autoNewLine="",l.prototype.$newLineMode="auto",i.implement(l.prototype,r),t.Document=l})),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,r=function(){function e(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var n=this;this.$worker=function(){if(n.running){var e=new Date,t=n.currentLine,i=-1,o=n.doc,r=t;while(n.lines[t])t++;var s=o.getLength(),a=0;n.running=!1;while(t<s){n.$tokenizeRow(t),i=t;do{t++}while(n.lines[t]);if(a++,a%5===0&&new Date-e>20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=t,-1==i&&(i=t),r<=i&&n.fireUpdateEvent(r,i)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var n={first:e,last:t};this._signal("update",{data:n})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,n+1,null),this.states.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],i=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!==i.state+""?(this.states[e]=i.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=i.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();i.implement(r.prototype,o),t.BackgroundTokenizer=r})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./range").Range,r=function(){function e(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,n,r){if(this.regExp)for(var s=r.firstRow,a=r.lastRow,l={},c=s;c<=a;c++){var h=this.cache[c];null==h&&(h=i.getMatchOffsets(n.getLine(c),this.regExp),h.length>this.MAX_RANGES&&(h=h.slice(0,this.MAX_RANGES)),h=h.map((function(e){return new o(c,e.offset,c,e.offset+e.length)})),this.cache[c]=h.length?h:"");for(var u=h.length;u--;){var d=h[u].toScreenRange(n),p=d.toString();l[p]||(l[p]=!0,t.drawSingleLineMarker(e,d,this.clazz,r))}}},e}();r.prototype.MAX_RANGES=500,t.SearchHighlight=r})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,n){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var i=this.$undoStack.length;i>this.$undoDepth-1&&this.$undoStack.splice(0,i-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var o=n[i][0];if(o.id<=e)break;o.id<t&&(o.ignore=!0)}this.lastDeltas=null},e.prototype.getSelection=function(e,t){for(var n=this.selections,i=n.length;i--;){var o=n[i];if(o.rev<e)return t&&(o=n[i+1]),o}},e.prototype.getRevision=function(){return this.$rev},e.prototype.getDeltas=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=null,o=0,r=n.length;r--;){var s=n[r][0];if(s.id<t&&!i&&(i=r+1),s.id<=e){o=r+1;break}}return n.slice(o,i)},e.prototype.getChangedRanges=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.getChangedLines=function(e,t){null==t&&(t=this.$rev+1)},e.prototype.undo=function(e,t){this.lastDeltas=null;var n=this.$undoStack;if(o(n,n.length)){e||(e=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var i=n.pop(),r=null;return i&&(r=e.undoChanges(i,t),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,r}},e.prototype.redo=function(e,t){if(this.lastDeltas=null,e||(e=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);y(this.$redoStack,n),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach((function(e){e[0].id=++this.$maxRev}),this)}var i=this.$redoStack.pop(),o=null;return i&&(o=e.redoChanges(i,t),this.$undoStack.push(i),this.$syncRev()),this.$fromUndo=!1,o},e.prototype.$syncRev=function(){var e=this.$undoStack,t=e[e.length-1],n=t&&t[0].id||0;this.$redoStackBaseRev=n,this.$rev=n},e.prototype.reset=function(){this.lastDeltas=null,this.$lastDelta=null,this.$undoStack=[],this.$redoStack=[],this.$rev=0,this.mark=0,this.$redoStackBaseRev=this.$rev,this.selections=[]},e.prototype.canUndo=function(){return this.$undoStack.length>0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){void 0==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?c(e):c(this.$undoStack)+"\n---\n"+c(this.$redoStack)},e}();function o(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){while(n<t-1){var o=d(e[n],e[n+1]);e[n]=o[0],e[n+1]=o[1],n++}return!0}}}i.prototype.hasUndo=i.prototype.canUndo,i.prototype.hasRedo=i.prototype.canRedo,i.prototype.isClean=i.prototype.isAtBookmark,i.prototype.markClean=i.prototype.bookmark;var r=e("./range").Range,s=r.comparePoints;r.comparePoints;function a(e){return{row:e.row,column:e.column}}function l(e){return{start:a(e.start),end:a(e.end),action:e.action,lines:e.lines.slice()}}function c(e){if(e=e||this,Array.isArray(e))return e.map(c).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(h).join("\n"):h(e.value)),e.start&&(t+=h(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function h(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function u(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(s(t.start,e.end)>=0)g(t,e,-1);else{if(!(s(t.start,e.start)<=0))return null;g(e,t,1)}else if(n&&!i)if(s(t.start,e.end)>=0)g(t,e,-1);else{if(!(s(t.end,e.start)<=0))return null;g(e,t,-1)}else if(!n&&i)if(s(t.start,e.start)>=0)g(t,e,1);else{if(!(s(t.start,e.start)<=0))return null;g(e,t,1)}else if(!n&&!i)if(s(t.start,e.start)>=0)g(t,e,1);else{if(!(s(t.end,e.start)<=0))return null;g(e,t,-1)}return[t,e]}function d(e,t){for(var n=e.length;n--;)for(var i=0;i<t.length;i++)if(!u(e[n],t[i])){while(n<e.length){while(i--)u(t[i],e[n]);i=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}function p(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)s(e.start,t.start)<0?g(t,e,1):g(e,t,1);else if(n&&!i)s(e.start,t.end)>=0?g(e,t,-1):(s(e.start,t.start)<=0||g(e,r.fromPoints(t.start,e.start),-1),g(t,e,1));else if(!n&&i)s(t.start,e.end)>=0?g(t,e,-1):(s(t.start,e.start)<=0||g(t,r.fromPoints(e.start,t.start),-1),g(e,t,1));else if(!n&&!i)if(s(t.start,e.end)>=0)g(t,e,-1);else{var o,a;if(!(s(t.end,e.start)<=0))return s(e.start,t.start)<0&&(o=e,e=m(e,t.start)),s(e.end,t.end)>0&&(a=m(e,t.end)),f(t.end,e.start,e.end,-1),a&&!o&&(e.lines=a.lines,e.start=a.start,e.end=a.end,a=e),[t,o,a].filter(Boolean);g(e,t,-1)}return[t,e]}function g(e,t,n){f(e.start,t.start,t.end,n),f(e.end,t.start,t.end,n)}function f(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function m(e,t){var n=e.lines,i=e.end;e.end=a(t);var o=e.end.row-e.start.row,r=n.splice(o,n.length),s=o?t.column:t.column-e.start.column;n.push(r[0].substring(0,s)),r[0]=r[0].substr(s);var l={start:a(t),end:i,lines:r,action:e.action};return l}function v(e,t){t=l(t);for(var n=e.length;n--;){for(var i=e[n],o=0;o<i.length;o++){var r=i[o],s=p(r,t);t=s[0],2!=s.length&&(s[2]?(i.splice(o+1,1,s[1],s[2]),o++):s[1]||(i.splice(o,1),o--))}i.length||e.splice(n,1)}return e}function y(e,t){for(var n=0;n<t.length;n++)for(var i=t[n],o=0;o<i.length;o++)v(e,i[o])}t.UndoManager=i})),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../range").Range,o=function(){function e(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];var n=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach((function(e){e.setFoldLine(this)}),this)}return e.prototype.shiftRow=function(e){this.start.row+=e,this.end.row+=e,this.folds.forEach((function(t){t.start.row+=e,t.end.row+=e}))},e.prototype.addFold=function(e){if(e.sameRow){if(e.start.row<this.startRow||e.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,n){var i,o,r,s=0,a=this.folds,l=!0;null==t&&(t=this.end.row,n=this.end.column);for(var c=0;c<a.length;c++){if(i=a[c],o=i.range.compareStart(t,n),-1==o)return void e(null,t,n,s,l);if(r=e(null,i.start.row,i.start.column,s,l),r=!r&&e(i.placeholder,i.start.row,i.start.column,s),r||0===o)return;l=!i.sameRow,s=i.end.column}e(null,t,n,s,l)},e.prototype.getNextFoldTo=function(e,t){for(var n,i,o=0;o<this.folds.length;o++){if(n=this.folds[o],i=n.range.compareEnd(e,t),-1==i)return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},e.prototype.addRemoveChars=function(e,t,n){var i,o,r=this.getNextFoldTo(e,t);if(r)if(i=r.fold,"inside"==r.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){o=this.folds;var s=o.indexOf(i);for(0===s&&(this.start.column+=n),s;s<o.length;s++){if(i=o[s],i.start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},e.prototype.split=function(t,n){var i=this.getNextFoldTo(t,n);if(!i||"inside"==i.kind)return null;var o=i.fold,r=this.folds,s=this.foldData,a=r.indexOf(o),l=r[a-1];this.end.row=l.end.row,this.end.column=l.end.column,r=r.splice(a,r.length-a);var c=new e(s,r);return s.splice(s.indexOf(this)+1,0,c),c},e.prototype.merge=function(e){for(var t=e.folds,n=0;n<t.length;n++)this.addFold(t[n]);var i=this.foldData;i.splice(i.indexOf(e),1)},e.prototype.toString=function(){var e=[this.range.toString()+": ["];return this.folds.forEach((function(t){e.push(" "+t.toString())})),e.push("]"),e.join("\n")},e.prototype.idxToPosition=function(e){for(var t=0,n=0;n<this.folds.length;n++){var i=this.folds[n];if(e-=i.start.column-t,e<0)return{row:i.start.row,column:i.start.column+e};if(e-=i.placeholder.length,e<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}},e}();t.FoldLine=o})),ace.define("ace/range_list",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("./range").Range,o=i.comparePoints,r=function(){function e(){this.ranges=[],this.$bias=1}return e.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,r=n||0;r<i.length;r++){var s=i[r],a=o(e,s.end);if(!(a>0)){var l=o(e,s.start);return 0===a?t&&0!==l?-r-2:r:l>0||0===l&&!t?r:-r-1}}return-r-1},e.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t);n<0&&(n=-n-1);var i=this.pointIndex(e.end,t,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,e)},e.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){var e=[],t=this.ranges;t=t.sort((function(e,t){return o(e.start,t.start)}));for(var n,i=t[0],r=1;r<t.length;r++){n=i,i=t[r];var s=o(n.end,i.start);s<0||(0!=s||n.isEmpty()||i.isEmpty())&&(o(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),t.splice(r,1),e.push(i),i=n,r--)}return this.ranges=t,e},e.prototype.contains=function(e,t){return this.pointIndex({row:e,column:t})>=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];var i=this.pointIndex({row:e,column:0});i<0&&(i=-i-1);var o=this.pointIndex({row:t,column:0},i);o<0&&(o=-o-1);for(var r=[],s=i;s<o;s++)r.push(n[s]);return r},e.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},e.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},e.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},e.prototype.$onChange=function(e){for(var t=e.start,n=e.end,i=t.row,o=n.row,r=this.ranges,s=0,a=r.length;s<a;s++){var l=r[s];if(l.end.row>=i)break}if("insert"==e.action)for(var c=o-i,h=-t.column+n.column;s<a;s++){l=r[s];if(l.start.row>i)break;if(l.start.row==i&&l.start.column>=t.column&&(l.start.column==t.column&&this.$bias<=0||(l.start.column+=h,l.start.row+=c)),l.end.row==i&&l.end.column>=t.column){if(l.end.column==t.column&&this.$bias<0)continue;l.end.column==t.column&&h>0&&s<a-1&&l.end.column>l.start.column&&l.end.column==r[s+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=c}}else for(c=i-o,h=t.column-n.column;s<a;s++){l=r[s];if(l.start.row>o)break;l.end.row<o&&(i<l.end.row||i==l.end.row&&t.column<l.end.column)?(l.end.row=i,l.end.column=t.column):l.end.row==o?l.end.column<=n.column?(c||l.end.column>t.column)&&(l.end.column=t.column,l.end.row=t.row):(l.end.column+=h,l.end.row+=c):l.end.row>o&&(l.end.row+=c),l.start.row<o&&(i<l.start.row||i==l.start.row&&t.column<l.start.column)?(l.start.row=i,l.start.column=t.column):l.start.row==o?l.start.column<=n.column?(c||l.start.column>t.column)&&(l.start.column=t.column,l.start.row=t.row):(l.start.column+=h,l.start.row+=c):l.start.row>o&&(l.start.row+=c)}if(0!=c&&s<a)for(;s<a;s++){l=r[s];l.start.row+=c,l.end.row+=c}},e}();r.prototype.comparePoints=o,t.RangeList=r})),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("../range_list").RangeList,r=function(e){function t(t,n){var i=e.call(this)||this;return i.foldLine=null,i.placeholder=n,i.range=t,i.start=t.start,i.end=t.end,i.sameRow=t.start.row==t.end.row,i.subFolds=i.ranges=[],i}return i(t,e),t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach((function(t){t.setFoldLine(e)}))},t.prototype.clone=function(){var e=this.range.clone(),n=new t(e,this.placeholder);return this.subFolds.forEach((function(e){n.subFolds.push(e.clone())})),n.collapseChildren=this.collapseChildren,n},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){a(e,this.start);for(var t=e.start.row,n=e.start.column,i=0,o=-1;i<this.subFolds.length;i++)if(o=this.subFolds[i].range.compare(t,n),1!=o)break;var r=this.subFolds[i],s=0;if(0==o){if(r.range.containsRange(e))return r.addSubFold(e);s=1}t=e.range.end.row,n=e.range.end.column;var l=i;for(o=-1;l<this.subFolds.length;l++)if(o=this.subFolds[l].range.compare(t,n),1!=o)break;0==o&&l++;for(var c=this.subFolds.splice(i,l-i,e),h=0==o?c.length-1:c.length,u=s;u<h;u++)e.addSubFold(c[u]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return c(e,this.start)},t}(o);function s(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function a(e,t){s(e.start,t),s(e.end,t)}function l(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}function c(e,t){l(e.start,t),l(e.end,t)}t.Fold=r})),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("./fold_line").FoldLine,r=e("./fold").Fold,s=e("../token_iterator").TokenIterator,a=e("../mouse/mouse_event").MouseEvent;function l(){this.getFoldAt=function(e,t,n){var i=this.getFoldLine(e);if(!i)return null;for(var o=i.folds,r=0;r<o.length;r++){var s=o[r].range;if(s.contains(e,t)){if(1==n&&s.isEnd(e,t)&&!s.isEmpty())continue;if(-1==n&&s.isStart(e,t)&&!s.isEmpty())continue;return o[r]}}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,o=[];t.column+=1,n.column-=1;for(var r=0;r<i.length;r++){var s=i[r].range.compareRange(e);if(2!=s){if(-2==s)break;for(var a=i[r].folds,l=0;l<a.length;l++){var c=a[l];if(s=c.range.compareRange(e),-2==s)break;if(2!=s){if(42==s)break;o.push(c)}}}}return t.column-=1,n.column+=1,o},this.getFoldsInRangeList=function(e){if(Array.isArray(e)){var t=[];e.forEach((function(e){t=t.concat(this.getFoldsInRange(e))}),this)}else t=this.getFoldsInRange(e);return t},this.getAllFolds=function(){for(var e=[],t=this.$foldData,n=0;n<t.length;n++)for(var i=0;i<t[n].folds.length;i++)e.push(t[n].folds[i]);return e},this.getFoldStringAt=function(e,t,n,i){if(i=i||this.getFoldLine(e),!i)return null;for(var o,r,s={end:{column:0}},a=0;a<i.folds.length;a++){r=i.folds[a];var l=r.range.compareEnd(e,t);if(-1==l){o=this.getLine(r.start.row).substring(s.end.column,r.start.column);break}if(0===l)return null;s=r}return o||(o=this.getLine(r.start.row).substring(s.end.column)),-1==n?o.substring(0,t-s.end.column):1==n?o.substring(t-s.end.column):o},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0),i;i<n.length;i++){var o=n[i];if(o.start.row<=e&&o.end.row>=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(t&&(i=n.indexOf(t)),-1==i&&(i=0),i;i<n.length;i++){var o=n[i];if(o.end.row>=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;o<n.length;o++){var r=n[o],s=r.end.row,a=r.start.row;if(s>=t){a<t&&(a>=e?i-=t-a:i=0);break}s>=e&&(i-=a>=e?s-a:s-e+1)}return i},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var n,i=this.$foldData,s=!1;e instanceof r?n=e:(n=new r(t,e),n.collapseChildren=t.collapseChildren),this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,h=n.end.column,u=this.getFoldAt(a,l,1),d=this.getFoldAt(c,h,-1);if(u&&d==u)return u.addSubFold(n);u&&!u.range.isStart(a,l)&&this.removeFold(u),d&&!d.range.isEnd(c,h)&&this.removeFold(d);var p=this.getFoldsInRange(n.range);p.length>0&&(this.removeFolds(p),n.collapseChildren||p.forEach((function(e){n.addSubFold(e)})));for(var g=0;g<i.length;g++){var f=i[g];if(c==f.start.row){f.addFold(n),s=!0;break}if(a==f.end.row){if(f.addFold(n),s=!0,!n.sameRow){var m=i[g+1];if(m&&m.start.row==c){f.merge(m);break}}break}if(c<=f.start.row)break}return s||(f=this.$addFoldLine(new o(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(f.start.row,f.start.row):this.$updateRowLengthCache(f.start.row,f.start.row),this.$modified=!0,this._signal("changeFold",{data:n,action:"add"}),n},this.addFolds=function(e){e.forEach((function(e){this.addFold(e)}),this)},this.removeFold=function(e){var t=e.foldLine,n=t.start.row,i=t.end.row,o=this.$foldData,r=t.folds;if(1==r.length)o.splice(o.indexOf(t),1);else if(t.range.isEnd(e.end.row,e.end.column))r.pop(),t.end.row=r[r.length-1].end.row,t.end.column=r[r.length-1].end.column;else if(t.range.isStart(e.start.row,e.start.column))r.shift(),t.start.row=r[0].start.row,t.start.column=r[0].start.column;else if(e.sameRow)r.splice(r.indexOf(e),1);else{var s=t.split(e.start.row,e.start.column);r=s.folds,r.shift(),s.start.row=r[0].start.row,s.start.column=r[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(n,i):this.$updateRowLengthCache(n,i)),this.$modified=!0,this._signal("changeFold",{data:e,action:"remove"})},this.removeFolds=function(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);t.forEach((function(e){this.removeFold(e)}),this),this.$modified=!0},this.expandFold=function(e){this.removeFold(e),e.subFolds.forEach((function(t){e.restoreRange(t),this.addFold(t)}),this),e.collapseChildren>0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var n,o;if(null==e)n=new i(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new i(e,0,e,this.getLine(e).length);else if("row"in e)n=i.fromPoints(e,e);else{if(Array.isArray(e))return o=[],e.forEach((function(e){o=o.concat(this.unfold(e))}),this),o;n=e}o=this.getFoldsInRangeList(n);var r=o;while(1==o.length&&i.comparePoints(o[0].start,n.start)<0&&i.comparePoints(o[0].end,n.end)>0)this.expandFolds(o),o=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(o):this.expandFolds(o),r.length)return r},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var n=this.getFoldLine(e,t);return n?n.end.row:e},this.getRowFoldStart=function(e,t){var n=this.getFoldLine(e,t);return n?n.start.row:e},this.getFoldDisplayLine=function(e,t,n,i,o){null==i&&(i=e.start.row),null==o&&(o=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var r=this.doc,s="";return e.walk((function(e,t,n,a){if(!(t<i)){if(t==i){if(n<o)return;a=Math.max(o,a)}s+=null!=e?e:r.getLine(t).substring(a,n)}}),t,n),s},this.getDisplayLine=function(e,t,n,i){var o,r=this.getFoldLine(e);return r?this.getFoldDisplayLine(r,e,t,n,i):(o=this.doc.getLine(e),o.substring(i||0,t||o.length))},this.$cloneFoldData=function(){var e=[];return e=this.$foldData.map((function(t){var n=t.folds.map((function(e){return e.clone()}));return new o(e,n)})),e},this.toggleFold=function(e){var t,n,i=this.selection,o=i.getRange();if(o.isEmpty()){var r=o.start;if(t=this.getFoldAt(r.row,r.column),t)return void this.expandFold(t);(n=this.findMatchingBracket(r))?1==o.comparePoint(n)?o.end=n:(o.start=n,o.start.column++,o.end.column--):(n=this.findMatchingBracket({row:r.row,column:r.column+1}))?(1==o.comparePoint(n)?o.end=n:o.start=n,o.start.column++):o=this.getCommentFoldRange(r.row,r.column)||o}else{var s=this.getFoldsInRange(o);if(e&&s.length)return void this.expandFolds(s);1==s.length&&(t=s[0])}if(t||(t=this.getFoldAt(o.start.row,o.start.column)),t&&t.range.toString()==o.toString())this.expandFold(t);else{var a="...";if(!o.isMultiLine()){if(a=this.getTextRange(o),a.length<4)return;a=a.trim().substring(0,2)+".."}this.addFold(a,o)}},this.getCommentFoldRange=function(e,t,n){var o=new s(this,e,t),r=o.getCurrentToken(),a=r&&r.type;if(r&&/^comment|string/.test(a)){a=a.match(/comment|string/)[0],"comment"==a&&(a+="|doc-start|\\.doc");var l=new RegExp(a),c=new i;if(1!=n){do{r=o.stepBackward()}while(r&&l.test(r.type)&&!/^comment.end/.test(r.type));r=o.stepForward()}if(c.start.row=o.getCurrentTokenRow(),c.start.column=o.getCurrentTokenColumn()+(/^comment.start/.test(r.type)?r.value.length:2),o=new s(this,e,t),-1!=n){var h=-1;do{if(r=o.stepForward(),-1==h){var u=this.getState(o.$row);l.test(u)||(h=o.$row)}else if(o.$row>h)break}while(r&&l.test(r.type)&&!/^comment.start/.test(r.type));r=o.stepBackward()}else r=o.getCurrentToken();return c.end.row=o.getCurrentTokenRow(),c.end.column=o.getCurrentTokenColumn(),/^comment.end/.test(r.type)||(c.end.column+=r.value.length-2),c}},this.foldAll=function(e,t,n,i){void 0==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength(),e=e||0;for(var r=e;r<t;r++)if(null==o[r]&&(o[r]=this.getFoldWidget(r)),"start"==o[r]&&(!i||i(r))){var s=this.getFoldWidgetRange(r);s&&s.isMultiLine()&&s.end.row<=t&&s.start.row>=e&&(r=s.end.row,s.collapseChildren=n,this.addFold("...",s))}}},this.foldToLevel=function(e){this.foldAll();while(e-- >0)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var n=e.getTokens(t),i=0;i<n.length;i++){var o=n[i];if("text"!=o.type||!/^\s+$/.test(o.value))return!!/comment/.test(o.type)}}))},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(e){if(!this.$foldStyles[e])throw new Error("invalid fold style: "+e+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=e){this.$foldStyle=e,"manual"==e&&this.unfold();var t=this.$foldMode;this.$setFolding(null),this.$setFolding(t)}},this.$setFolding=function(e){this.$foldMode!=e&&(this.$foldMode=e,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),e&&"manual"!=this.$foldStyle?(this.foldWidgets=[],this.getFoldWidget=e.getFoldWidget.bind(e,this,this.$foldStyle),this.getFoldWidgetRange=e.getFoldWidgetRange.bind(e,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.$tokenizerUpdateFoldWidgets=this.tokenizerUpdateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets),this.on("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets)):this.foldWidgets=null)},this.getParentFoldRangeData=function(e,t){var n=this.foldWidgets;if(!n||t&&n[e])return{};var i,o=e-1;while(o>=0){var r=n[o];if(null==r&&(r=n[o]=this.getFoldWidget(o)),"start"==r){var s=this.getFoldWidgetRange(o);if(i||(i=s),s&&s.end.row>=e)break}o--}return{range:-1!==o&&s,firstRange:i}},this.onFoldWidgetClick=function(e,t){t instanceof a&&(t=t.domEvent);var n={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey},i=this.$toggleFoldWidget(e,n);if(!i){var o=t.target||t.srcElement;o&&/ace_fold-widget/.test(o.className)&&(o.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),o="end"===n?-1:1,r=this.getFoldAt(e,-1===o?0:i.length,o);if(r)return t.children||t.all?this.removeFold(r):this.expandFold(r),r;var s=this.getFoldWidgetRange(e,!0);if(s&&!s.isMultiLine()&&(r=this.getFoldAt(s.start.row,s.start.column,1),r&&s.isEqual(r.range)))return this.removeFold(r),r;if(t.siblings){var a=this.getParentFoldRangeData(e);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,t.all?1e4:0)}else t.children?(c=s?s.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):s&&(t.all&&(s.collapseChildren=1e4),this.addFold("...",s));return s}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var n=this.$toggleFoldWidget(t,{});if(!n){var i=this.getParentFoldRangeData(t,!0);if(n=i.range||i.firstRange,n){t=n.start.row;var o=this.getFoldAt(t,this.getLine(t).length,1);o?this.removeFold(o):this.addFold("...",n)}}},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;if(0===n)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,n+1,null);else{var i=Array(n+1);i.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}t.Folding=l})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,n){"use strict";var i=e("../token_iterator").TokenIterator,o=e("../range").Range;function r(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var n=t||this.getLine(e.row).charAt(e.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],e):this.$findOpeningBracket(i[2],e):null},this.getBracketRange=function(e){var t,n=this.getLine(e.row),i=!0,r=n.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),i=!1),!s)return null;if(s[1]){var a=this.$findClosingBracket(s[1],e);if(!a)return null;t=o.fromPoints(e,a),i||(t.end.column++,t.start.column--),t.cursor=t.end}else{a=this.$findOpeningBracket(s[2],e);if(!a)return null;t=o.fromPoints(a,e),i||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,r=!t&&n.charAt(e.column-1),s=r&&r.match(i);if(s||(r=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(i)),!s)return null;var a=new o(e.row,e.column-1,e.row,e.column),l=s[1]?this.$findClosingBracket(s[1],e):this.$findOpeningBracket(s[2],e);if(!l)return[a];var c=new o(l.row,l.column,l.row,l.column+1);return[a,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));var l=t.column-s.getCurrentTokenColumn()-2,c=a.value;while(1){while(l>=0){var h=c.charAt(l);if(h==o){if(r-=1,0==r)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else h==e&&(r+=1);l-=1}do{a=s.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;c=a.value,l=c.length-1}return null}},this.$findClosingBracket=function(e,t,n){var o=this.$brackets[e],r=1,s=new i(this,t.row,t.column),a=s.getCurrentToken();if(a||(a=s.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));var l=t.column-s.getCurrentTokenColumn();while(1){var c=a.value,h=c.length;while(l<h){var u=c.charAt(l);if(u==o){if(r-=1,0==r)return{row:s.getCurrentTokenRow(),column:l+s.getCurrentTokenColumn()}}else u==e&&(r+=1);l+=1}do{a=s.stepForward()}while(a&&!n.test(a.type));if(null==a)break;l=0}return null}},this.getMatchingTags=function(e){var t=new i(this,e.row,e.column),n=this.$findTagName(t);if(n){var o=t.stepBackward();return"<"===o.value?this.$findClosingTag(t,n):this.$findOpeningTag(t,n)}},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,i=!1;if(t&&-1===t.type.indexOf("tag-name"))do{t=i?e.stepBackward():e.stepForward(),t&&("/>"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0))}while(t&&!n);return t},this.$findClosingTag=function(e,t){var n,i=t.value,r=t.value,s=0,a=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var l=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(n=t,t=e.stepForward(),t){if(">"===t.value&&!c){var h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(-1!==t.type.indexOf("tag-name")){if(i=t.value,r===i)if("<"===n.value)s++;else if("</"===n.value&&(s--,s<0)){e.stepBackward();var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2);t=e.stepForward();var d=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t=e.stepForward(),!t||">"!==t.value)return;var p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else if(r===i&&"/>"===t.value&&(s--,s<0))u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=u,p=d,h=new o(l.end.row,l.end.column,l.end.row,l.end.column+1)}}while(t&&s>=0);if(a&&h&&u&&p&&l&&d)return{openTag:new o(a.start.row,a.start.column,h.end.row,h.end.column),closeTag:new o(u.start.row,u.start.column,p.end.row,p.end.column),openTagName:l,closeTagName:d}},this.$findOpeningTag=function(e,t){var n=e.getCurrentToken(),i=t.value,r=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+2,c=new o(s,a,s,l);e.stepForward();var h=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(t=e.stepForward(),t&&">"===t.value){var u=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=n,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=a+t.value.length,n=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(i===t.value)if("<"===n.value){if(r++,r>0){var d=new o(s,a,s,l),p=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var g=new o(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===n.value&&r--}else if("/>"===t.value){var f=0,m=n;while(m){if(-1!==m.type.indexOf("tag-name")&&m.value===i){r--;break}if("<"===m.value)break;m=e.stepBackward(),f++}for(var v=0;v<f;v++)e.stepForward()}}while(n&&r<=0);return p&&g&&c&&u&&d&&h?{openTag:new o(p.start.row,p.start.column,g.end.row,g.end.column),closeTag:new o(c.start.row,c.start.column,u.end.row,u.end.column),openTagName:d,closeTagName:h}:void 0}}}t.BracketMatch=r})),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./bidihandler").BidiHandler,s=e("./config"),a=e("./lib/event_emitter").EventEmitter,l=e("./selection").Selection,c=e("./mode/text").Mode,h=e("./range").Range,u=e("./document").Document,d=e("./background_tokenizer").BackgroundTokenizer,p=e("./search_highlight").SearchHighlight,g=e("./undomanager").UndoManager,f=function(){function e(t,n){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++e.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new d((new c).getTokenizer(),this);var i=this;this.bgTokenizer.on("update",(function(e){i._signal("tokenizerUpdate",e)})),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof t&&t.getLine||(t=new u(t)),this.setDocument(t),this.selection=new l(this),this.$bidiHandler=new r(this),s.resetOptions(this),this.setMode(n),s._signal("session",this),this.destroyed=!1}return e.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),this.doc=e,e.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},e.prototype.getDocument=function(){return this.doc},e.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,n=this.$getRowCacheIndex(this.$docRowCache,e)+1;t>n&&(this.$docRowCache.splice(n,t),this.$screenRowCache.splice(n,t))},e.prototype.$getRowCacheIndex=function(e,t){var n=0,i=e.length-1;while(n<=i){var o=n+i>>1,r=e[o];if(t>r)n=o+1;else{if(!(t<r))return o;i=o-1}}return n-1},e.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},e.prototype.onChangeFold=function(e){var t=e.data;this.$resetRowCache(t.start.row)},e.prototype.onChange=function(e){this.$modified=!0,this.$bidiHandler.onChange(e),this.$resetRowCache(e.start.row);var t=this.$updateInternalDataOnChange(e);!this.$fromUndo&&this.$undoManager&&(t&&t.length&&(this.$undoManager.add({action:"removeFolds",folds:t},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(e,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(e),this._signal("change",e)},e.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},e.fromJSON=function(t){"string"==typeof t&&(t=JSON.parse(t));var n=new g;n.$undoStack=t.history.undo,n.$redoStack=t.history.redo,n.mark=t.history.mark,n.$rev=t.history.rev;var i=new e(t.value);return t.folds.forEach((function(e){i.addFold("...",h.fromPoints(e.start,e.end))})),i.setAnnotations(t.annotations),i.setBreakpoints(t.breakpoints),i.setMode(t.mode),i.setScrollLeft(t.scrollLeft),i.setScrollTop(t.scrollTop),i.setUndoManager(n),i.selection.fromJSON(t.selection),i},e.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map((function(e){return e.range})),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},e.prototype.toString=function(){return this.doc.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.getState=function(e){return this.bgTokenizer.getState(e)},e.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},e.prototype.getTokenAt=function(e,t){var n,i=this.bgTokenizer.getTokens(e),o=0;if(null==t){var r=i.length-1;o=this.getLine(e).length}else for(r=0;r<i.length;r++)if(o+=i[r].value.length,o>=t)break;return n=i[r],n?(n.index=r,n.start=o-n.value.length,n):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize===0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},e.prototype.setBreakpoint=function(e,t){void 0===t&&(t="ace_breakpoint"),t?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},e.prototype.addMarker=function(e,t,n,i){var o=this.$markerId++,r={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:o};return i?(this.$frontMarkers[o]=r,this._signal("changeFrontMarker")):(this.$backMarkers[o]=r,this._signal("changeBackMarker")),o},e.prototype.addDynamicMarker=function(e,t){if(e.update){var n=this.$markerId++;return e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e}},e.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];if(t){var n=t.inFront?this.$frontMarkers:this.$backMarkers;delete n[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker")}},e.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},e.prototype.highlight=function(e){if(!this.$searchHighlight){var t=new p(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(t)}this.$searchHighlight.setRegexp(e)},e.prototype.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n||(n="ace_step");var o=new h(e,0,t,1/0);return o.id=this.addMarker(o,n,"fullLine",i),o},e.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},e.prototype.getAnnotations=function(){return this.$annotations||[]},e.prototype.clearAnnotations=function(){this.setAnnotations([])},e.prototype.$detectNewLine=function(e){var t=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=t?t[1]:"\n"},e.prototype.getWordRange=function(e,t){var n=this.getLine(e),i=!1;if(t>0&&(i=!!n.charAt(t-1).match(this.tokenRe)),i||(i=!!n.charAt(t).match(this.tokenRe)),i)var o=this.tokenRe;else if(/^\s+$/.test(n.slice(t-1,t+1)))o=/\s/;else o=this.nonTokenRe;var r=t;if(r>0){do{r--}while(r>=0&&n.charAt(r).match(o));r++}var s=t;while(s<n.length&&n.charAt(s).match(o))s++;return new h(e,r,e,s)},e.prototype.getAWordRange=function(e,t){var n=this.getWordRange(e,t),i=this.getLine(n.end.row);while(i.charAt(n.end.column).match(/[ \t]/))n.end.column+=1;return n},e.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},e.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},e.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},e.prototype.getUseWorker=function(){return this.$useWorker},e.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},e.prototype.setMode=function(e,t){if(e&&"object"===typeof e){if(e.getTokenizer)return this.$onChangeMode(e);var n=e,i=n.path}else i=e||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new c),this.$modes[i]&&!n)return this.$onChangeMode(this.$modes[i]),void(t&&t());this.$modeId=i,s.loadModule(["mode",i],function(e){if(this.$modeId!==i)return t&&t();this.$modes[i]&&!n?this.$onChangeMode(this.$modes[i]):e&&e.Mode&&(e=new e.Mode(n),n||(this.$modes[i]=e,e.$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},e.prototype.$onChangeMode=function(e,t){if(t||(this.$modeId=e.$id),this.$mode!==e){var n=this.$mode;this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker();var i=e.getTokenizer();if(void 0!==i.on){var o=this.onReloadTokenizer.bind(this);i.on("update",o)}this.bgTokenizer.setTokenizer(i),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=e.tokenRe,this.nonTokenRe=e.nonTokenRe,t||(e.attachToSession&&e.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(e.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:n,mode:e}))}},e.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},e.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},e.prototype.getMode=function(){return this.$mode},e.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},e.prototype.getScrollTop=function(){return this.$scrollTop},e.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},e.prototype.getScrollLeft=function(){return this.$scrollLeft},e.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},e.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var e=0;return this.lineWidgets.forEach((function(t){t&&t.screenWidth>e&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;l<a;l++){if(l>s){if(l=r.end.row+1,l>=a)break;r=this.$foldData[o++],s=r?r.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;n<e.length;n++){var i=e[n];"insert"!=i.action&&"remove"!=i.action||this.doc.$safeApplyDelta(i)}!t&&this.$undoSelect&&(e.selectionAfter?this.selection.fromJSON(e.selectionAfter):this.selection.setRange(this.$getUndoSelection(e,!1))),this.$fromUndo=!1}},e.prototype.setUndoSelect=function(e){this.$undoSelect=e},e.prototype.$getUndoSelection=function(e,t){function n(e){return t?"insert"!==e.action:"insert"===e.action}for(var i,o,r=0;r<e.length;r++){var s=e[r];s.start&&(i?n(s)?(o=s.start,-1==i.compare(o.row,o.column)&&i.setStart(o),o=s.end,1==i.compare(o.row,o.column)&&i.setEnd(o)):(o=s.start,-1==i.compare(o.row,o.column)&&(i=h.fromPoints(s.start,s.start))):i=n(s)?h.fromPoints(s.start,s.end):h.fromPoints(s.start,s.start))}return i},e.prototype.replace=function(e,t){return this.doc.replace(e,t)},e.prototype.moveText=function(e,t,n){var i=this.getTextRange(e),o=this.getFoldsInRange(e),r=h.fromPoints(t,t);if(!n){this.remove(e);var s=e.start.row-e.end.row,a=s?-e.end.column:e.start.column-e.end.column;a&&(r.start.row==e.end.row&&r.start.column>e.end.column&&(r.start.column+=a),r.end.row==e.end.row&&r.end.column>e.end.column&&(r.end.column+=a)),s&&r.start.row>=e.end.row&&(r.start.row+=s,r.end.row+=s)}if(r.end=this.insert(r.start,i),o.length){var l=e.start,c=r.start;s=c.row-l.row,a=c.column-l.column;this.addFolds(o.map((function(e){return e=e.clone(),e.start.row==l.row&&(e.start.column+=a),e.end.row==l.row&&(e.end.column+=a),e.start.row+=s,e.end.row+=s,e})))}return r},e.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;s<i;++s)if(" "!=r.charAt(s))break;s<i&&"\t"==r.charAt(s)?(n.start.column=s,n.end.column=s+1):(n.start.column=0,n.end.column=s),this.remove(n)}},e.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){var i=this.getRowFoldStart(e+n);if(i<0)return 0;var o=i-e}else if(n>0){i=this.getRowFoldEnd(t+n);if(i>this.doc.getLength()-1)return 0;o=i-t}else{e=this.$clipRowToDocument(e),t=this.$clipRowToDocument(t);o=t-e+1}var r=new h(e,0,t,Number.MAX_VALUE),s=this.getFoldsInRange(r).map((function(e){return e=e.clone(),e.start.row+=o,e.end.row+=o,e})),a=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+o,a),s.length&&this.addFolds(s),o},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var n=this.doc.getLength();e>=n?(e=n-1,t=this.doc.getLine(n-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange;n.max<0&&(n={min:t,max:t});var i=this.$constrainWrapLimit(e,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),n&&(e=Math.min(n,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,n=e.action,i=e.start,o=e.end,r=i.row,s=o.row,a=s-r,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[t?"$wrapData":"$rowLengthCache"].splice(r,a);var c=this.$foldData;l=this.getFoldsInRange(e),this.removeFolds(l);var h=this.getFoldLine(o.row),u=0;if(h){h.addRemoveChars(o.row,o.column,i.column-o.column),h.shiftRow(-a);var d=this.getFoldLine(r);d&&d!==h&&(d.merge(h),h=d),u=c.indexOf(h)+1}for(u;u<c.length;u++){h=c[u];h.start.row>=o.row&&h.shiftRow(-a)}s=r}else{var p=Array(a);p.unshift(r,0);var g=t?this.$wrapData:this.$rowLengthCache;g.splice.apply(g,p);c=this.$foldData,h=this.getFoldLine(r),u=0;if(h){var f=h.range.compareInside(i.row,i.column);0==f?(h=h.split(i.row,i.column),h&&(h.shiftRow(a),h.addRemoveChars(s,0,o.column-i.column))):-1==f&&(h.addRemoveChars(r,0,o.column-i.column),h.shiftRow(a)),u=c.indexOf(h)+1}for(u;u<c.length;u++){h=c[u];h.start.row>=r&&h.shiftRow(a)}}else{a=Math.abs(e.start.column-e.end.column),"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a);h=this.getFoldLine(r);h&&h.addRemoveChars(r,i.column,a)}return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(r,s):this.$updateRowLengthCache(r,s),l},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var n,i,o=this.doc.getAllLines(),r=this.getTabSize(),s=this.$wrapData,a=this.$wrapLimit,l=e;t=Math.min(t,o.length-1);while(l<=t)i=this.getFoldLine(l,i),i?(n=[],i.walk(function(e,t,i,r){var s;if(null!=e){s=this.$getDisplayTokens(e,n.length),s[0]=y;for(var a=1;a<s.length;a++)s[a]=w}else s=this.$getDisplayTokens(o[t].substring(r,i),n.length);n=n.concat(s)}.bind(this),i.end.row,o[i.end.row].length+1),s[i.start.row]=this.$computeWrapSplits(n,a,r),l=i.end.row+1):(n=this.$getDisplayTokens(o[l]),s[l]=this.$computeWrapSplits(n,a,r),l++)},e.prototype.$computeWrapSplits=function(e,t,n){if(0==e.length)return[];var i=[],o=e.length,r=0,s=0,a=this.$wrapAsCode,l=this.$indentedSoftWrap,c=t<=Math.max(2*n,8)||!1===l?0:Math.floor(t/2);function h(){var t=0;if(0===c)return t;if(l)for(var i=0;i<e.length;i++){var o=e[i];if(o==$)t+=1;else{if(o!=x){if(o==C)continue;break}t+=n}}return a&&!1!==l&&(t+=n),Math.min(t,c)}function u(t){for(var n=t-r,o=r;o<t;o++){var a=e[o];12!==a&&2!==a||(n-=1)}i.length||(d=h(),i.indent=d),s+=n,i.push(s),r=t}var d=0;while(o-r>t-d){var p=r+t-d;if(e[p-1]>=$&&e[p]>=$)u(p);else if(e[p]!=y&&e[p]!=w){var g=Math.max(p-(t-(t>>2)),r-1);while(p>g&&e[p]<y)p--;if(a){while(p>g&&e[p]<y)p--;while(p>g&&e[p]==b)p--}else while(p>g&&e[p]<$)p--;p>g?u(++p):(p=r+t,e[p]==v&&p--,u(p-d))}else{for(p;p!=r-1;p--)if(e[p]==y)break;if(p>r){u(p);continue}for(p=r+t,p;p<e.length;p++)if(e[p]!=w)break;if(p==e.length)break;u(p)}}return i},e.prototype.$getDisplayTokens=function(e,t){var n,i=[];t=t||0;for(var o=0;o<e.length;o++){var r=e.charCodeAt(o);if(9==r){n=this.getScreenTabSize(i.length+t),i.push(x);for(var s=1;s<n;s++)i.push(C)}else 32==r?i.push($):r>39&&r<48||r>57&&r<64?i.push(b):r>=4352&&S(r)?i.push(m,v):i.push(m)}return i},e.prototype.$getStringScreenWidth=function(e,t,n){if(0==t)return[0,0];var i,o;for(null==t&&(t=1/0),n=n||0,o=0;o<e.length;o++)if(i=e.charCodeAt(o),9==i?n+=this.getScreenTabSize(n):i>=4352&&S(i)?n+=2:n+=1,n>t)break;return[n,o]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),n=this.$wrapData[t.row];return n.length&&n[0]<t.column?n.indent:0}return 0},e.prototype.getScreenLastRowColumn=function(e){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(t.row,t.column)},e.prototype.getDocumentLastRowColumn=function(e,t){var n=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(n)},e.prototype.getDocumentLastRowColumnPosition=function(e,t){var n=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(n,Number.MAX_VALUE/10)},e.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},e.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},e.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},e.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},e.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};var i,o,r=0,s=0,a=0,l=0,c=this.$screenRowCache,h=this.$getRowCacheIndex(c,e),u=c.length;if(u&&h>=0){a=c[h],r=this.$docRowCache[h];var d=e>c[u-1]}else d=!u;var p=this.getLength()-1,g=this.getNextFoldLine(r),f=g?g.start.row:1/0;while(a<=e){if(l=this.getRowLength(r),a+l>e||r>=p)break;a+=l,r++,r>f&&(r=g.end.row+1,g=this.getNextFoldLine(r,g),f=g?g.start.row:1/0),d&&(this.$docRowCache.push(r),this.$screenRowCache.push(a))}if(g&&g.start.row<=r)i=this.getFoldDisplayLine(g),r=g.start.row;else{if(a+l<=e||r>p)return{row:p,column:this.getLine(p).length};i=this.getLine(r),g=null}var m=0,v=Math.floor(e-a);if(this.$useWrapMode){var y=this.$wrapData[r];y&&(o=y[v],v>0&&y.length&&(m=y.indent,s=y[v-1]||y[y.length-1],i=i.substring(s)))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,r,v)&&(t=this.$bidiHandler.offsetToCol(n)),s+=this.$getStringScreenWidth(i,t-m)[1],this.$useWrapMode&&s>=o&&(s=o-1),g?g.idxToPosition(s):{row:r,column:s}},e.prototype.documentToScreenPosition=function(e,t){if("undefined"===typeof t)var n=this.$clipPositionToDocument(e.row,e.column);else n=this.$clipPositionToDocument(e,t);e=n.row,t=n.column;var i=0,o=null,r=null;r=this.getFoldAt(e,t,1),r&&(e=r.start.row,t=r.start.column);var s,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,e),h=l.length;if(h&&c>=0){a=l[c],i=this.$screenRowCache[c];var u=e>l[h-1]}else u=!h;var d=this.getNextFoldLine(a),p=d?d.start.row:1/0;while(a<e){if(a>=p){if(s=d.end.row+1,s>e)break;d=this.getNextFoldLine(s,d),p=d?d.start.row:1/0}else s=a+1;i+=this.getRowLength(a),a=s,u&&(this.$docRowCache.push(a),this.$screenRowCache.push(i))}var g="";d&&a>=p?(g=this.getFoldDisplayLine(d,e,t),o=d.start.row):(g=this.getLine(e).substring(0,t),o=e);var f=0;if(this.$useWrapMode){var m=this.$wrapData[o];if(m){var v=0;while(g.length>=m[v])i++,v++;g=g.substring(m[v-1]||0,g.length),f=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(i+=this.lineWidgets[a].rowsAbove),{row:i,column:f+this.$getStringScreenWidth(g)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode){var n=this.$wrapData.length,i=0,o=(a=0,t=this.$foldData[a++],t?t.start.row:1/0);while(i<n){var r=this.$wrapData[i];e+=r?r.length+1:1,i++,i>o&&(i=t.end.row+1,t=this.$foldData[a++],o=t?t.start.row:1/0)}}else{e=this.getLength();for(var s=this.$foldData,a=0;a<s.length;a++)t=s[a],e-=t.end.row-t.start.row}return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},e.prototype.$setFontMetrics=function(e){this.$enableVarChar&&(this.$getStringScreenWidth=function(t,n,i){if(0===n)return[0,0];var o,r;for(n||(n=1/0),i=i||0,r=0;r<t.length;r++)if(o=t.charAt(r),i+="\t"===o?this.getScreenTabSize(i):e.getCharacterWidth(o),i>n)break;return[i,r]})},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},e}();f.$uid=0,f.prototype.$modes=s.$modes,f.prototype.getValue=f.prototype.toString,f.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},f.prototype.$overwrite=!1,f.prototype.$mode=null,f.prototype.$modeId=null,f.prototype.$scrollTop=0,f.prototype.$scrollLeft=0,f.prototype.$wrapLimit=80,f.prototype.$useWrapMode=!1,f.prototype.$wrapLimitRange={min:null,max:null},f.prototype.lineWidgets=null,f.prototype.isFullWidth=S,i.implement(f.prototype,a);var m=1,v=2,y=3,w=4,b=9,$=10,x=11,C=12;function S(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(f.prototype),e("./edit_session/bracket_match").BracketMatch.call(f.prototype),s.defineOptions(f.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){e="auto"==e?"text"!=this.$mode.type:"text"!=e,e!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){e=parseInt(e),e>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=f})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,n){"use strict";var i=e("./lib/lang"),o=e("./lib/oop"),r=e("./range").Range,s=function(){function e(){this.$options={}}return e.prototype.set=function(e){return o.mixin(this.$options,e),this},e.prototype.getOptions=function(){return i.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,n=this.$matchIterator(e,t);if(!n)return!1;var i=null;return n.forEach((function(e,n,o,s){return i=new r(e,n,o,s),!(n==s&&t.start&&t.start.start&&0!=t.skipCurrent&&i.isEqual(t.start))||(i=null,!1)})),i},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,o=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),s=[],a=t.re;if(t.$isMultiLine){var l,c=a.length,h=o.length-c;e:for(var u=a.offset||0;u<=h;u++){for(var d=0;d<c;d++)if(-1==o[u+d].search(a[d]))continue e;var p=o[u],g=o[u+c-1],f=p.length-p.match(a[0])[0].length,m=g.match(a[c-1])[0].length;l&&l.end.row===u&&l.end.column>f||(s.push(l=new r(u,f,u+c-1,m)),c>2&&(u=u+c-2))}}else for(var v=0;v<o.length;v++){var y=i.getMatchOffsets(o[v],a);for(d=0;d<y.length;d++){var w=y[d];s.push(new r(v,w.offset,v,w.offset+w.length))}}if(n){var b=n.start.column,$=n.end.column;v=0,d=s.length-1;while(v<d&&s[v].start.column<b&&0==s[v].start.row)v++;var x=n.end.row-n.start.row;while(v<d&&s[d].end.column>$&&s[d].end.row==x)d--;for(s=s.slice(v,d+1),v=0,d=s.length;v<d;v++)s[v].start.row+=n.start.row,s[v].end.row+=n.start.row}return s},e.prototype.replace=function(e,t){var n=this.$options,i=this.$assembleRegExp(n);if(n.$isMultiLine)return t;if(i){var o=i.exec(e);if(!o||o[0].length!=e.length)return null;if(t=e.replace(i,t),n.preserveCase){t=t.split("");for(var r=Math.min(e.length,e.length);r--;){var s=e[r];s&&s.toLowerCase()!=s?t[r]=t[r].toUpperCase():t[r]=t[r].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var n=e.needle;if(!e.needle)return e.re=!1;e.regExp||(n=i.escapeRegExp(n));var o=e.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),e.$supportsUnicodeFlag=!0,o+="u"}catch(s){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(n=a(n,e)),e.$isMultiLine=!t&&/[\n\r]/.test(n),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(n,o);try{var r=new RegExp(n,o)}catch(s){r=!1}return e.re=r},e.prototype.$assembleMultilineRegExp=function(e,t){for(var n=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),i=[],o=0;o<n.length;o++)try{i.push(new RegExp(n[o],t))}catch(r){return!1}return i},e.prototype.$matchIterator=function(e,t){var n=this.$assembleRegExp(t);if(!n)return!1;var o=1==t.backwards,r=0!=t.skipCurrent,s=n.unicode,a=t.range,l=t.start;l||(l=a?a[o?"end":"start"]:e.selection.getRange()),l.start&&(l=l[r!=o?"end":"start"]);var c=a?a.start.row:0,h=a?a.end.row:e.getLength()-1;if(o)var u=function(e){var n=l.row;if(!p(n,l.column,e)){for(n--;n>=c;n--)if(p(n,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(n=h,c=l.row;n>=c;n--)if(p(n,Number.MAX_VALUE,e))return}};else u=function(e){var n=l.row;if(!p(n,l.column,e)){for(n+=1;n<=h;n++)if(p(n,0,e))return;if(0!=t.wrap)for(n=c,h=l.row;n<=h;n++)if(p(n,0,e))return}};if(t.$isMultiLine)var d=n.length,p=function(t,i,r){var s=o?t-d+1:t;if(!(s<0||s+d>e.getLength())){var a=e.getLine(s),l=a.search(n[0]);if(!(!o&&l<i||-1===l)){for(var c=1;c<d;c++)if(a=e.getLine(s+c),-1==a.search(n[c]))return;var h=a.match(n[d-1])[0].length;if(!(o&&h>i))return!!r(s,l,s+d-1,h)||void 0}}};else if(o)p=function(t,o,r){var a,l=e.getLine(t),c=[],h=0;n.lastIndex=0;while(a=n.exec(l)){var u=a[0].length;if(h=a.index,!u){if(h>=l.length)break;n.lastIndex=h+=i.skipEmptyMatch(l,h,s)}if(a.index+u>o)break;c.push(a.index,u)}for(var d=c.length-1;d>=0;d-=2){var p=c[d-1];u=c[d];if(r(t,p,t,p+u))return!0}};else p=function(t,o,r){var a,l,c=e.getLine(t);n.lastIndex=o;while(l=n.exec(c)){var h=l[0].length;if(a=l.index,r(t,a,t,a+h))return!0;if(!h&&(n.lastIndex=a+=i.skipEmptyMatch(c,a,s),a>=c.length))return!1}};return{forEach:u}},e}();function a(e,t){var n=i.supportsLookbehind();function o(e,i){void 0===i&&(i=!0);var o=n&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return o.test(e)||t.regExp?n&&t.$supportsUnicodeFlag?i?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var r=Array.from(e),s=r[0],a=r[r.length-1];return o(s)+e+o(a,!1)}t.Search=s})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("../lib/keys"),r=e("../lib/useragent"),s=o.KEY_MODS,a=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,n){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var n=e&&("string"===typeof e?e:e.name);e=this.commands[n],t||delete this.commands[n];var i=this.commandKeyBinding;for(var o in i){var r=i[o];if(r==e)delete i[o];else if(Array.isArray(r)){var s=r.indexOf(e);-1!=s&&(r.splice(s,1),1==r.length&&(i[o]=r[0]))}}},e.prototype.bindKey=function(e,t,n){if("object"==typeof e&&e&&(void 0==n&&(n=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var i="";if(-1!=e.indexOf(" ")){var o=e.split(/\s+/);e=o.pop(),o.forEach((function(e){var t=this.parseKeys(e),n=s[t.hashId]+t.key;i+=(i?" ":"")+n,this._addCommandToBinding(i,"chainKeys")}),this),i+=" "}var r=this.parseKeys(e),a=s[r.hashId]+r.key;this._addCommandToBinding(i+a,t,n)}),this)},e.prototype._addCommandToBinding=function(e,t,n){var i,o=this.commandKeyBinding;if(t)if(!o[e]||this.$singleCommand)o[e]=t;else{Array.isArray(o[e])?-1!=(i=o[e].indexOf(t))&&o[e].splice(i,1):o[e]=[o[e]],"number"!=typeof n&&(n=l(t));var r=o[e];for(i=0;i<r.length;i++){var s=r[i],a=l(s);if(a>n)break}r.splice(i,0,t)}else delete o[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var n=e[t];if(n){if("string"===typeof n)return this.bindKey(n,t);"function"===typeof n&&(n={exec:n}),"object"===typeof n&&(n.name||(n.name=t),this.addCommand(n))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),n=t.pop(),i=o[n];if(o.FUNCTION_KEYS[i])n=o.FUNCTION_KEYS[i].toLowerCase();else{if(!t.length)return{key:n,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:n.toUpperCase(),hashId:-1}}for(var r=0,s=t.length;s--;){var a=o.KEY_MODS[t[s]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+t[s]+" in "+e),!1;r|=a}return{key:n,hashId:r}},e.prototype.findKeyCommand=function(e,t){var n=s[e]+t;return this.commandKeyBinding[n]},e.prototype.handleKeyboard=function(e,t,n,i){if(!(i<0)){var o=s[t]+n,r=this.commandKeyBinding[o];return e.$keyChain&&(e.$keyChain+=" "+o,r=this.commandKeyBinding[e.$keyChain]||r),!r||"chainKeys"!=r&&"chainKeys"!=r[r.length-1]?(e.$keyChain&&(t&&4!=t||1!=n.length?(-1==t||i>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function l(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var c=function(e){function t(t,n){var i=e.call(this,t,n)||this;return i.$singleCommand=!0,i}return i(t,e),t}(a);c.call=function(e,t,n){a.prototype.$init.call(e,t,n,!0)},a.call=function(e,t,n){a.prototype.$init.call(e,t,n,!1)},t.HashHandler=c,t.MultiHashHandler=a})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("../lib/oop"),r=e("../keyboard/hash_handler").MultiHashHandler,s=e("../lib/event_emitter").EventEmitter,a=function(e){function t(t,n){var i=e.call(this,n,t)||this;return i.byName=i.commands,i.setDefaultHandler("exec",(function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})),i}return i(t,e),t.prototype.exec=function(e,t,n){if(Array.isArray(e)){for(var i=e.length;i--;)if(this.exec(e[i],t,n))return!0;return!1}if("string"===typeof e&&(e=this.commands[e]),!e)return!1;if(t&&t.$readOnly&&!e.readOnly)return!1;if(0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))return!1;var o={editor:t,command:e,args:n};return o.returnValue=this._emit("exec",o),this._signal("afterExec",o),!1!==o.returnValue},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(r);o.implement(a.prototype,s),t.CommandManager=a})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,n){"use strict";var i=e("../lib/lang"),o=e("../config"),r=e("../range").Range;function s(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:s("Ctrl-,","Command-,"),exec:function(e){o.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:s("Alt-E","F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:s("Alt-Shift-E","Shift-F4"),exec:function(e){o.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:s("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:s(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:s("Ctrl-L","Command-L"),exec:function(e,t){"number"!==typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:s("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:s("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:s("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:s("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:s(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:s("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:s("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:s("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:s("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:s("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:s("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:s("Ctrl-F","Command-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:s("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:s("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:s("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:s("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:s("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:s("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:s("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:s("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:s("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:s("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:s("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:s("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:s("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:s("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:s("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:s("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:s("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:s("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:s("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:s("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:s(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:s("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:s(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:s("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:s("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:s("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:s("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:s("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:s("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:s("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:s(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty(),n=t?e.selection.getLineRange():e.selection.getRange();e._emit("cut",n),n.isEmpty()||e.session.remove(n),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:s("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:s("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:s("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:s("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:s("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:s("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:s("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:s("Ctrl-H","Command-Option-F"),exec:function(e){o.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:s("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:s("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:s("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:s("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:s("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:s("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:s("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:s("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:s("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:s("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:s("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:s("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:s("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:s("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:s("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:s("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:s("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:s("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:s("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(i.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:s(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:s("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:s("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:s("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:s(null,null),exec:function(e){e.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:s("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:s("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:s(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),o=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),s=e.session.doc.getLine(n.row).length,a=e.session.doc.getTextRange(e.selection.getRange()),l=a.replace(/\n\s*/," ").length,c=e.session.doc.getLine(n.row),h=n.row+1;h<=o.row+1;h++){var u=i.stringTrimLeft(i.stringTrimRight(e.session.doc.getLine(h)));0!==u.length&&(u=" "+u),c+=u}o.row+1<e.session.doc.getLength()-1&&(c+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new r(n.row,0,o.row+2,0),c),l>0?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+l)):(s=e.session.doc.getLine(n.row).length>s?s+1:s,e.selection.moveCursorTo(n.row,s))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:s(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var s=0;s<i.length;s++)s==i.length-1&&(i[s].end.row===t&&i[s].end.column===n||o.push(new r(i[s].end.row,i[s].end.column,t,n))),0===s?0===i[s].start.row&&0===i[s].start.column||o.push(new r(0,0,i[s].start.row,i[s].start.column)):o.push(new r(i[s-1].end.row,i[s-1].end.column,i[s].start.row,i[s].start.column));e.exitMultiSelectMode(),e.clearSelection();for(s=0;s<o.length;s++)e.selection.addRange(o[s],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(e){e.selection.clearSelection(),e.navigateLineEnd(),e.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(e){e.selection.clearSelection();var t=e.getCursorPosition();e.selection.moveTo(t.row-1,Number.MAX_VALUE),e.insert("\n"),0===t.row&&e.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(e){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),e.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:s("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:s(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var a=1;a<9;a++)t.commands.push({name:"foldToLevel"+a,description:"Fold To Level "+a,level:a,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})})),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("./lib/dom"),o=function(){function e(e){this.session=e,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return e.prototype.getRowLength=function(e){var t;return t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0,this["$useWrapMode"]&&this["$wrapData"][e]?this["$wrapData"][e].length+1+t:1+t},e.prototype.$getWidgetScreenLength=function(){var e=0;return this.lineWidgets.forEach((function(t){t&&t.rowCount&&!t.hidden&&(e+=t.rowCount)})),e},e.prototype.$onChangeEditor=function(e){this.attach(e.editor)},e.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),this.editor=e,e&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},e.prototype.detach=function(e){var t=this.editor;if(t){this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach((function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))}},e.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var i=e.data,o=i.start.row,r=i.end.row,s="add"==e.action,a=o+1;a<r;a++)n[a]&&(n[a].hidden=s);n[r]&&(s?n[o]?n[r].hidden=s:n[o]=n[r]:(n[o]==n[r]&&(n[o]=void 0),n[r].hidden=s))}},e.prototype.updateOnChange=function(e){var t=this.session.lineWidgets;if(t){var n=e.start.row,i=e.end.row-n;if(0===i);else if("remove"==e.action){var o=t.splice(n+1,i);!t[n]&&o[o.length-1]&&(t[n]=o.pop()),o.forEach((function(e){e&&this.removeLineWidget(e)}),this),this.$updateRows()}else{var r=new Array(i);t[n]&&null!=t[n].column&&e.start.column>t[n].column&&n++,r.unshift(n,0),t.splice.apply(t,r),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,n){if(e){t=!1,e.row=n;while(e.$oldWidget)e.$oldWidget.row=n,e=e.$oldWidget}})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=i.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=i.createElement("div"),e.el.textContent=e.text),e.el&&(i.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&i.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var n=this.session.getFoldAt(e.row,0);if(e.$fold=n,n){var o=this.session.lineWidgets;e.row!=n.end.row||o[n.start.row]?e.hidden=!0:o[n.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(n){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else while(t){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){var t=this.session.lineWidgets,n=t&&t[e],i=[];while(n)i.push(n),n=n.$oldWidget;return i},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var o=1/0,r=0;r<n.length;r++){var s=n[r];if(s&&s.el&&s.session==this.session){if(!s._inDocument){if(this.session.lineWidgets[s.row]!=s)continue;s._inDocument=!0,t.container.appendChild(s.el)}s.h=s.el.offsetHeight,s.fixedWidth||(s.w=s.el.offsetWidth,s.screenWidth=Math.ceil(s.w/i.characterWidth));var a=s.h/i.lineHeight;s.coverLine&&(a-=this.session.getRowLineCount(s.row),a<0&&(a=0)),s.rowCount!=a&&(s.rowCount=a,s.row<o&&(o=s.row))}}o!=1/0&&(this.session._emit("changeFold",{data:{start:{row:o}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},e.prototype.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){var o=Math.min(this.firstRow,n.firstRow),r=Math.max(this.lastRow,n.lastRow,i.length);while(o>0&&!i[o])o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=o;s<=r;s++){var a=i[s];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,t.container.appendChild(a.el));var l=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:t.gutterWidth;a.fixedWidth||(c-=t.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.fixedWidth?a.el.style.right=t.scrollBar.getWidth()+"px":a.el.style.right=""}}}},e}();t.LineWidgets=o})),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],(function(e,t,n){"use strict";var i=e("../lib/keys"),o=e("../mouse/default_gutter_handler").GutterTooltip,r=function(){function e(e){this.editor=e,this.gutterLayer=e.renderer.$gutterLayer,this.element=e.renderer.$gutter,this.lines=e.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new o(this.editor)}return e.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},e.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},e.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===i["escape"]&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=i["enter"])return;e.preventDefault();var t=this.editor.getCursorPosition().row;return this.editor.isRowVisible(t)||this.editor.scrollToLine(t,!0,!0),void setTimeout(function(){var e=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(e),n=this.$findNearestAnnotation(e);if(null!==t||null!==n)return null===t&&null!==n?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):null!==t&&null===n?(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex)):Math.abs(n-e)<Math.abs(t-e)?(this.activeRowIndex=n,this.activeLane="annotation",void this.$focusAnnotation(this.activeRowIndex)):(this.activeRowIndex=t,this.activeLane="fold",void this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10)}this.$handleGutterKeyboardInteraction(e),setTimeout(function(){this.editor._signal("gutterkeydown",new s(e,this))}.bind(this),10)},e.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode!==i["tab"]){if(e.keyCode===i["escape"])return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode!==i["up"])if(e.keyCode!==i["down"]){if(e.keyCode===i["left"])return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===i["right"])return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode!==i["enter"]&&e.keyCode!==i["space"]);else switch(e.preventDefault(),this.activeLane){case"fold":if("start"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]){var t=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),e),setTimeout(function(){this.$rowIndexToRow(this.activeRowIndex)!==t&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(t),this.$focusFoldWidget(this.activeRowIndex))}.bind(this),10);break}if("end"===this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)])break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2],o=n.getBoundingClientRect(),r=this.annotationTooltip.getElement().style;r.left=o.right+"px",r.top=o.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}else switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}}else e.preventDefault()},e.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},e.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getFoldWidget(e).style.display;return t&&n},e.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),n="none"!==this.$getAnnotation(e).style.display;return t&&n},e.prototype.$getFoldWidget=function(e){var t=this.lines.get(e),n=t.element;return n.childNodes[1]},e.prototype.$getAnnotation=function(e){var t=this.lines.get(e),n=t.element;return n.childNodes[2]},e.prototype.$findNearestFoldWidget=function(e){if(this.$isFoldWidgetVisible(e))return e;var t=0;while(e-t>0||e+t<this.lines.getLength()-1){if(t++,e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;var t=0;while(e-t>0||e+t<this.lines.getLength()-1){if(t++,e-t>=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){var e=this.activeRowIndex;while(e>0)if(e--,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveFoldWidgetDown=function(){var e=this.activeRowIndex;while(e<this.lines.getLength()-1)if(e++,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveAnnotationUp=function(){var e=this.activeRowIndex;while(e>0)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){var e=this.activeRowIndex;while(e<this.lines.getLength()-1)if(e++,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$switchLane=function(e){switch(e){case"annotation":if("annotation"===this.activeLane)break;var t=this.$findNearestAnnotation(this.activeRowIndex);if(null==t)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=t,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if("fold"===this.activeLane)break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(null==n)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);break}},e.prototype.$rowIndexToRow=function(e){var t=this.lines.get(e);return t?t.row:null},e.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++){var n=this.lines.get(t);if(n.row==e)return t}return null},e}();t.GutterKeyboardHandler=r;var s=function(){function e(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}return e.prototype.getKey=function(){return i.keyCodeToString(this.domEvent.keyCode)},e.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},e.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},e.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane},e}();t.GutterKeyboardEvent=s})),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],(function(e,t,n){"use strict";var i=this&&this.__values||function(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/lang"),a=e("./lib/useragent"),l=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,h=e("./mouse/fold_handler").FoldHandler,u=e("./keyboard/keybinding").KeyBinding,d=e("./edit_session").EditSession,p=e("./search").Search,g=e("./range").Range,f=e("./lib/event_emitter").EventEmitter,m=e("./commands/command_manager").CommandManager,v=e("./commands/default_commands").commands,y=e("./config"),w=e("./token_iterator").TokenIterator,b=e("./line_widgets").LineWidgets,$=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,C=e("./clipboard"),S=e("./lib/keys"),A=function(){function e(t,n,i){this.session,this.$toDestroy=[];var o=t.getContainerElement();this.container=o,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new m(a.isMac?"mac":"win",v),"object"==typeof document&&(this.textInput=new l(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new h(this)),this.keyBinding=new u(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=s.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(n||i&&i.session||new d("")),y.resetOptions(this),i&&this.setOptions(i),y._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=s.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},e.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},e.prototype.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if(1==e&&this.curOp.command&&"mouse"==this.curOp.command.name)return;if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,n=t&&t.scrollIntoView;if(n){switch(n){case"center-animate":n="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var i=this.selection.getRange(),o=this.renderer.layerConfig;(i.start.row>=o.lastRow||i.end.row<=o.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break;default:break}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var r=this.selection.toJSON();this.curOp.selectionAfter=r,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(r),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var o=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"===typeof e&&"ace"!=e){this.$keybindingId=e;var n=this;y.loadModule(["keybinding",e],(function(i){n.$keybindingId==e&&n.keyBinding.setKeyboardHandler(i&&i.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),e&&e._signal("changeEditor",{editor:this}),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var n=e.getCursorPosition(),i=e.getKeyboardHandler(),o=i&&i.$getDirectionForHighlight&&i.$getDirectionForHighlight(e),r=t.getMatchingBracketRanges(n,o);if(!r){var s=new w(t,n.row,n.column),a=s.getCurrentToken();if(a&&/\b(?:tag-open|tag-name)/.test(a.type)){var l=t.getMatchingTags(n);l&&(r=[l.openTagName,l.closeTagName])}}if(!r&&t.$mode.getMatching&&(r=t.$mode.getMatching(e.session)),r){var c="ace_bracket";Array.isArray(r)?1==r.length&&(c="ace_error_bracket"):r=[r],2==r.length&&(0==g.comparePoints(r[0].end,r[1].start)?r=[g.fromPoints(r[0].start,r[1].end)]:0==g.comparePoints(r[0].start,r[1].end)&&(r=[g.fromPoints(r[1].start,r[0].end)])),t.$bracketHighlight={ranges:r,markerIds:r.map((function(e){return t.addMarker(e,c,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,n=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,n,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var n=new g(e.row,e.column,e.row,1/0);n.id=t.addMarker(n,"ace_active-line","screenLine"),t.$highlightLineMarker=n}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();t.$selectionMarker=t.addMarker(n,"ace_selection",i)}var o=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(o),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,o=e.getLine(t.start.row),r=o.substring(n,i);if(!(r.length>5e3)&&/[\w\d]/.test(r)){var s=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:r}),a=o.substring(n-1,i+1);if(s.test(a))return s}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),o=0;o<i.length;o++){var r=i[o];o&&i[o-1].start.row==r.start.row||(e+=this.session.getLine(r.start.row)+t)}}var s={text:e};return this._signal("copy",s),C.lineMode=!!n&&s.text,s.text},e.prototype.onCopy=function(){this.commands.exec("copy",this)},e.prototype.onCut=function(){this.commands.exec("cut",this)},e.prototype.onPaste=function(e,t){var n={text:e,event:t};this.commands.exec("paste",this,n)},e.prototype.$handlePaste=function(e){"string"==typeof e&&(e={text:e}),this._signal("paste",e);var t=e.text,n=t===C.lineMode,i=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)n?i.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(n)this.selection.rangeList.ranges.forEach((function(e){i.insert({row:e.start.row,column:0},t)}));else{var o=t.split(/\r\n|\r|\n/),r=this.selection.rangeList.ranges,s=2==o.length&&(!o[0]||!o[1]);if(o.length!=r.length||s)return this.commands.exec("insertstring",this,t);for(var a=r.length;a--;){var l=r[a];l.isEmpty()||i.remove(l),i.insert(l.start,o[a])}}},e.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},e.prototype.insert=function(e,t){var n=this.session,i=n.getMode(),o=this.getCursorPosition();if(this.getBehavioursEnabled()&&!t){var r=i.transformAction(n.getState(o.row),"insertion",this,n,e);r&&(e!==r.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),e=r.text)}if("\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&-1==e.indexOf("\n")){s=g.fromPoints(o,o);s.end.column+=e.length,this.session.remove(s)}}else{var s=this.getSelectionRange();o=this.session.remove(s),this.clearSelection()}if("\n"==e||"\r\n"==e){var a=n.getLine(o.row);if(o.column>a.search(/\S|$/)){var l=a.substr(o.column).search(/\S|$/);n.doc.removeInLine(o.row,o.column,o.column+l)}}this.clearSelection();var c=o.column,h=n.getState(o.row),u=(a=n.getLine(o.row),i.checkOutdent(h,a,e));if(n.insert(o,e),r&&r.selection&&(2==r.selection.length?this.selection.setSelectionRange(new g(o.row,c+r.selection[0],o.row,c+r.selection[1])):this.selection.setSelectionRange(new g(o.row+r.selection[0],r.selection[1],o.row+r.selection[2],r.selection[3]))),this.$enableAutoIndent){if(n.getDocument().isNewLine(e)){var d=i.getNextLineIndent(h,a.slice(0,o.column),n.getTabString());n.insert({row:o.row+1,column:0},d)}u&&i.autoOutdent(h,n,o.row)}},e.prototype.autoIndent=function(){var e,t,n=this.session,i=n.getMode();if(this.selection.isEmpty())e=0,t=n.doc.getLength()-1;else{var o=this.getSelectionRange();e=o.start.row,t=o.end.row}for(var r,s,a,l="",c="",h="",u=n.getTabString(),d=e;d<=t;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),h=i.getNextLineIndent(l,c,u)),r=n.getLine(d),s=i.$getIndent(r),h!==s&&(s.length>0&&(a=new g(d,0,d,s.length),n.remove(a)),h.length>0&&n.insert({row:d,column:0},h)),i.autoOutdent(l,n,d)},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},e.prototype.applyComposition=function(e,t){if(t.extendLeft||t.extendRight){var n=this.selection.getRange();n.start.column-=t.extendLeft,n.end.column+=t.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),e||n.isEmpty()||this.remove()}if(!e&&this.selection.isEmpty()||this.insert(e,!0),t.restoreStart||t.restoreEnd){n=this.selection.getRange();n.start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n)}},e.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(t.start.row),o=n.getMode().transformAction(i,"deletion",this,n,t);if(0===t.end.column){var r=n.getTextRange(t);if("\n"==r[r.length-1]){var s=n.getLine(t.end.row);/^\s+$/.test(s)&&(t.end.column=s.length)}}o&&(t=o)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.session.widgetManager||(this.session.widgetManager=new b(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var n,i,o=this.session.getLine(e.row);t<o.length?(n=o.charAt(t)+o.charAt(t-1),i=new g(e.row,t-1,e.row,t+1)):(n=o.charAt(t-1)+o.charAt(t-2),i=new g(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end)}}},e.prototype.toLowerCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},e.prototype.toUpperCase=function(){var e=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var t=this.getSelectionRange(),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},e.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(!(t.start.row<t.end.row)){if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n)){h=this.$getSelectedRows();return void e.indentRows(h.first,h.last,"\t")}}var i=e.getLine(t.start.row),o=t.start,r=e.getTabSize(),a=e.documentToScreenColumn(o.row,o.column);if(this.session.getUseSoftTabs())var l=r-a%r,c=s.stringRepeat(" ",l);else{l=a%r;while(" "==i[t.start.column-1]&&l)t.start.column--,l--;this.selection.setSelectionRange(t),c="\t"}return this.insert(c)}var h=this.$getSelectedRows();e.indentRows(h.first,h.last,"\t")},e.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},e.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},e.prototype.sortLines=function(){for(var e=this.$getSelectedRows(),t=this.session,n=[],i=e.first;i<=e.last;i++)n.push(t.getLine(i));n.sort((function(e,t){return e.toLowerCase()<t.toLowerCase()?-1:e.toLowerCase()>t.toLowerCase()?1:0}));var o=new g(0,0,0,0);for(i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},e.prototype.getNumberAt=function(e,t){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;var i=this.session.getLine(e);while(n.lastIndex<t){var o=n.exec(i);if(o.index<=t&&o.index+o[0].length>=t){var r={value:o[0],start:o.index,end:o.index+o[0].length};return r}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new g(t,n-1,t,n),o=this.session.getTextRange(i);if(!isNaN(parseFloat(o))&&isFinite(o)){var r=this.getNumberAt(t,n);if(r){var s=r.value.indexOf(".")>=0?r.start+r.value.indexOf(".")+1:r.end,a=r.start+r.value.length-s,l=parseFloat(r.value);l*=Math.pow(10,a),s!==r.end&&n<s?e*=Math.pow(10,r.end-n-1):e*=Math.pow(10,r.end-n),l+=e,l/=Math.pow(10,a);var c=l.toFixed(a),h=new g(t,r.start,t,r.end);this.session.replace(h,c),this.moveCursorTo(t,Math.max(r.start+1,n+c.length-r.value.length))}}else this.toggleWord()},e.prototype.toggleWord=function(){var e=this.selection.getCursor().row,t=this.selection.getCursor().column;this.selection.selectWord();var n=this.getSelectedText(),i=this.selection.getWordRange().start.column,o=n.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),r=t-i-1;r<0&&(r=0);var a=0,l=0,c=this;n.match(/[A-Za-z0-9_]+/)&&o.forEach((function(t,o){l=a+t.length,r>=a&&r<=l&&(n=t,c.selection.clearSelection(),c.moveCursorTo(e,a+i),c.selection.selectTo(e,l+i)),a=l}));for(var h,u=this.$toggleWordPairs,d=0;d<u.length;d++)for(var p=u[d],g=0;g<=1;g++){var f=+!g,m=n.match(new RegExp("^\\s?_?("+s.escapeRegExp(p[g])+")\\s?$","i"));if(m){var v=n.match(new RegExp("([_]|^|\\s)("+s.escapeRegExp(m[1])+")($|\\s)","g"));v&&(h=n.replace(new RegExp(s.escapeRegExp(p[g]),"i"),(function(e){var t=p[f];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+p[f].charAt(0).toUpperCase()+t.substr(1)),t})),this.insert(h),h="")}}},e.prototype.findLinkAt=function(e,t){var n,o,r=this.session.getLine(e),s=r.split(/((?:https?|ftp):\/\/[\S]+)/),a=t;a<0&&(a=0);var l,c=0,h=0;try{for(var u=i(s),d=u.next();!d.done;d=u.next()){var p=d.value;if(h=c+p.length,a>=c&&a<=h&&p.match(/((?:https?|ftp):\/\/[\S]+)/)){l=p.replace(/[\s:.,'";}\]]+$/,"");break}c=h}}catch(g){n={error:g}}finally{try{d&&!d.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return l},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,n=e.getRange(),i=e.isBackwards();if(n.isEmpty()){var o=n.start.row;t.duplicateLines(o,o)}else{var r=i?n.start:n.end,s=t.insert(r,t.getTextRange(n));n.start=r,n.end=s,e.setSelectionRange(n,i)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var n,i,o=this.selection;if(!o.inMultiSelectMode||this.inVirtualSelectionMode){var r=o.toOrientedRange();n=this.$getSelectedRows(r),i=this.session.$moveLines(n.first,n.last,t?0:e),t&&-1==e&&(i=0),r.moveBy(i,0),o.fromOrientedRange(r)}else{var s=o.rangeList.ranges;o.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var a=0,l=0,c=s.length,h=0;h<c;h++){var u=h;s[h].moveBy(a,0),n=this.$getSelectedRows(s[h]);var d=n.first,p=n.last;while(++h<c){l&&s[h].moveBy(l,0);var g=this.$getSelectedRows(s[h]);if(t&&g.first!=p)break;if(!t&&g.first>p+1)break;p=g.last}h--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(u=h+1);while(u<=h)s[u].moveBy(a,0),u++;t||(a=0),l+=a}o.fromOrientedRange(o.ranges[0]),o.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(o,0)})):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection());var r=n.scrollTop;n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(r)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new w(this.session,n.row,n.column),o=i.getCurrentToken(),r=0;o&&-1!==o.type.indexOf("tag-name")&&(o=i.stepBackward());var s=o||i.stepForward();if(s){var a,l,c=!1,h={},u=n.column-s.start,d={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u<s.value.length&&!c;u++)if(d[s.value[u]])switch(l=d[s.value[u]]+"."+s.type.replace("rparen","lparen"),isNaN(h[l])&&(h[l]=0),s.value[u]){case"(":case"[":case"{":h[l]++;break;case")":case"]":case"}":h[l]--,-1===h[l]&&(a="bracket",c=!0);break}}else-1!==s.type.indexOf("tag-name")&&(isNaN(h[s.value])&&(h[s.value]=0),"<"===o.value&&r>1?h[s.value]++:"</"===o.value&&h[s.value]--,-1===h[s.value]&&(a="tag",c=!0));c||(o=s,r++,s=i.stepForward(),u=0)}while(s&&!c);if(a){var p,f;if("bracket"===a)p=this.session.getBracketRange(n),p||(p=new g(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+u-1),f=p.start,(t||f.row===n.row&&Math.abs(f.column-n.column)<2)&&(p=this.session.getBracketRange(f)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;if(p=new g(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2),0===p.compare(n.row,n.column)){var m=this.session.getMatchingTags(n);m&&(m.openTag.contains(n.row,n.column)?(p=m.closeTag,f=p.start):(p=m.openTag,f=m.closeTag.start.row===n.row&&m.closeTag.start.column===n.column?p.end:p.start))}f=f||p.start}f=p&&p.cursor||f,f&&(e?p&&t?this.selection.setRange(p):p&&p.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(f.row,f.column):this.selection.moveTo(f.row,f.column))}}},e.prototype.gotoLine=function(e,t,n){this.selection.clearSelection(),this.session.unfold({row:e-1,column:t||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(e-1,t||0),this.isRowFullyVisible(e-1)||this.scrollToLine(e-1,!0,n)},e.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},e.prototype.navigateUp=function(e){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},e.prototype.navigateDown=function(e){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var t=this.selection.anchor.getPosition();return this.moveCursorToPosition(t)}this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},e.prototype.navigateLeft=function(e){if(this.selection.isEmpty()){e=e||1;while(e--)this.selection.moveCursorLeft()}else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateRight=function(e){if(this.selection.isEmpty()){e=e||1;while(e--)this.selection.moveCursorRight()}else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},e.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},e.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},e.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},e.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},e.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},e.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},e.prototype.replace=function(e,t){t&&this.$search.set(t);var n=this.$search.find(this.session),i=0;return n?(this.$tryReplace(n,e)&&(i=1),this.selection.setSelectionRange(n),this.renderer.scrollSelectionIntoView(n.start,n.end),i):i},e.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;var o=this.getSelectionRange();this.selection.moveTo(0,0);for(var r=n.length-1;r>=0;--r)this.$tryReplace(n[r],e)&&i++;return this.selection.setSelectionRange(o),i},e.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return t=this.$search.replace(n,t),null!==t?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,n){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&o.mixin(t,e);var i=this.selection.getRange();null==t.needle&&(e=this.session.getTextRange(i)||this.$search.$options.needle,e||(i=this.session.getWordRange(i.start.row,i.start.column),e=this.session.getTextRange(i)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:i});var r=this.$search.find(this.session);return t.preventScroll?r:r?(this.revealRange(r,n),r):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(n)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var o=this.$scrollAnchor;o.style.cssText="position:absolute",this.container.insertBefore(o,this.container.firstChild);var r=this.on("changeSelection",(function(){i=!0})),s=this.renderer.on("beforeRender",(function(){i&&(t=n.renderer.container.getBoundingClientRect())})),a=this.renderer.on("afterRender",(function(){if(i&&t&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var e=n.renderer,r=e.$cursorLayer.$pixelPos,s=e.layerConfig,a=r.top-s.offset;i=r.top>=0&&a+t.top<0||!(r.top<s.height&&r.top+t.top+s.lineHeight>window.innerHeight)&&null,null!=i&&(o.style.top=a+"px",o.style.left=r.left+"px",o.style.height=s.lineHeight+"px",o.scrollIntoView(i)),i=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",r),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",s))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,r.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,n){var i=this;y.loadModule("ace/ext/prompt",(function(o){o.prompt(i,e,t,n)}))},e}();A.$uid=0,A.prototype.curOp=null,A.prototype.prevOp={},A.prototype.$mergeableCommands=["backspace","del","insertstring"],A.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],o.implement(A.prototype,f),y.defineOptions(A.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){this.textInput.setReadOnly(e),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?k.attach(this):k.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var t=r.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,n={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},i=function(e){if(e.target==this.renderer.scroller&&e.keyCode===S["enter"]){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(a.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",i.bind(this)),this.commands.addCommand(n),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor")),this.renderer.$gutter.setAttribute("aria-label",x("Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new $(this)),t.addListener()):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",i.bind(this)),this.commands.removeCommand(n),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var k={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,n){return Math.max(t.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=A})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){i.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,o=Math.floor(i/this.canvasHeight),r=n.documentToScreenRow(e,0)*t.lineHeight;return r-o*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.appendChild(t)}else this.cells.push(e),this.element.appendChild(e.element)},e.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=i.createFragment(this.element),n=0;n<e.length;n++)t.appendChild(e[n].element);this.element.firstChild?this.element.insertBefore(t,this.element.firstChild):this.element.appendChild(t)}else this.cells.unshift(e),this.element.insertAdjacentElement("afterbegin",e.element)},e.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},e.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},e.prototype.createCell=function(e,t,n,o){var r=this.cellCache.pop();if(!r){var s=i.createElement("div");o&&o(s),this.element.appendChild(s),r={element:s,text:"",row:e}}return r.row=e,r},e}();t.Lines=o})),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/lang"),s=e("../lib/event_emitter").EventEmitter,a=e("./lines").Lines,l=e("../config").nls,c=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new a(this.element),this.$lines.$offsetCoefficient=1}return e.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},e.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},e.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,o=this.$annotations[i];o||(o=this.$annotations[i]={text:[],type:[]});var s=n.text,a=n.type;s=s?r.escapeHTML(s):n.html||"",-1===o.text.indexOf(s)&&(o.text.push(s),o.type.push(a));var l=n.className;l?o.className=l:"error"==a?o.className=" ace_error":"warning"==a&&" ace_error"!=o.className?o.className=" ace_warning":"info"!=a||o.className||(o.className=" ace_info")}},e.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,n=e.end.row-t;if(0===n);else if("remove"==e.action)this.$annotations.splice(t,n+1,null);else{var i=new Array(n+1);i.unshift(t,1),this.$annotations.splice.apply(this.$annotations,i)}}},e.prototype.update=function(e){this.config=e;var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();var o=t.getNextFoldLine(n),r=o?o.start.row:1/0,s=null,a=-1,l=n;while(1){if(l>r&&(l=o.end.row+1,o=t.getNextFoldLine(l,o),r=o?o.start.row:1/0),l>i){while(this.$lines.getLength()>a+1)this.$lines.pop();break}s=this.$lines.get(++a),s?s.row=l:(s=this.$lines.createCell(l,e,this.session,h),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1);var r=n?n.getWidth(t,o,e):o.toString().length*e.characterWidth,s=this.$padding||this.$computePadding();r+=s.left+s.right,r===this.gutterWidth||isNaN(r)||(this.gutterWidth=r,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",r))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var n=0;n<t.length;n++){var i=t[n];if(i.row>=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&o&&o.start.row==t[n-1].row))break;i=t[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);o>0;o--)this.$lines.shift();if(i>n)for(o=this.session.getFoldedRowCount(n+1,i);o>0;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),n>i&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,n){var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;while(1){if(o>s&&(o=r.end.row+1,r=this.session.getNextFoldLine(o,r),s=r?r.start.row:1/0),o>n)break;var a=this.$lines.createCell(o,e,this.session,h);this.$renderCell(a,e,r,o),i.push(a),o++}return i},e.prototype.$renderCell=function(e,t,n,o){var r=e.element,s=this.session,a=r.childNodes[0],c=r.childNodes[1],h=r.childNodes[2],u=h.firstChild,d=s.$firstLineNumber,p=s.$breakpoints,g=s.$decorations,f=s.gutterRenderer||this.$renderer,m=this.$showFoldWidgets&&s.foldWidgets,v=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",b=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",$=(f?f.getText(s,o):o+d).toString();if(this.$highlightGutterLine&&(o==this.$cursorRow||n&&o<this.$cursorRow&&o>=v&&this.$cursorRow<=n.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),p[o]&&(w+=p[o]),g[o]&&(w+=g[o]),this.$annotations[o]&&o!==v&&(w+=this.$annotations[o].className),m){var x=m[o];null==x&&(x=m[o]=s.getFoldWidget(o))}if(x){var C="ace_fold-widget ace_"+x,S="start"==x&&o==v&&o<n.end.row;if(S){C+=" ace_closed";for(var A="",k=!1,L=o+1;L<=n.end.row;L++)if(this.$annotations[L]){if(" ace_error"===this.$annotations[L].className){k=!0,A=" ace_error_fold";break}" ace_warning"!==this.$annotations[L].className||(k=!0,A=" ace_warning_fold")}w+=A}else C+=" ace_open";c.className!=C&&(c.className=C),i.setStyle(c.style,"height",y),i.setStyle(c.style,"display","inline-block"),c.setAttribute("role","button"),c.setAttribute("tabindex","-1");var _=s.getFoldWidgetRange(o);_?c.setAttribute("aria-label",l("Toggle code folding, rows $0 through $1",[_.start.row+1,_.end.row+1])):n?c.setAttribute("aria-label",l("Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):c.setAttribute("aria-label",l("Toggle code folding, row $0",[o+1])),S?(c.setAttribute("aria-expanded","false"),c.setAttribute("title",l("Unfold code"))):(c.setAttribute("aria-expanded","true"),c.setAttribute("title",l("Fold code")))}else c&&(i.setStyle(c.style,"display","none"),c.setAttribute("tabindex","0"),c.removeAttribute("role"),c.removeAttribute("aria-label"));return k&&this.$showFoldedAnnotations?(h.className="ace_gutter_annotation",u.className=b,u.className+=A,i.setStyle(u.style,"height",y),i.setStyle(h.style,"display","block"),i.setStyle(h.style,"height",y),h.setAttribute("aria-label",l("Read annotations row $0",[$])),h.setAttribute("tabindex","-1"),h.setAttribute("role","button")):this.$annotations[o]?(h.className="ace_gutter_annotation",u.className=b,this.$useSvgGutterIcons?u.className+=this.$annotations[o].className:r.classList.add(this.$annotations[o].className.replace(" ","")),i.setStyle(u.style,"height",y),i.setStyle(h.style,"display","block"),i.setStyle(h.style,"height",y),h.setAttribute("aria-label",l("Read annotations row $0",[$])),h.setAttribute("tabindex","-1"),h.setAttribute("role","button")):(i.setStyle(h.style,"display","none"),h.removeAttribute("aria-label"),h.removeAttribute("role"),h.setAttribute("tabindex","0")),$!==a.data&&(a.data=$),r.className!=w&&(r.className=w),i.setStyle(e.element.style,"height",this.$lines.computeLineHeight(o,t,s)+"px"),i.setStyle(e.element.style,"top",this.$lines.computeLineTop(o,t,s)+"px"),e.text=$,"none"===h.style.display&&"none"===c.style.display?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},e.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},e.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},e.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},e.prototype.setShowFoldWidgets=function(e){e?i.addCssClass(this.element,"ace_folding-enabled"):i.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},e.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},e.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=i.computedStyle(this.element.firstChild);return this.$padding={},this.$padding.left=(parseInt(e.borderLeftWidth)||0)+(parseInt(e.paddingLeft)||0)+1,this.$padding.right=(parseInt(e.borderRightWidth)||0)+(parseInt(e.paddingRight)||0),this.$padding},e.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),n=this.element.getBoundingClientRect();return e.x<t.left+n.left?"markers":this.$showFoldWidgets&&e.x>n.right-t.right?"foldWidgets":void 0},e}();function h(e){var t=document.createTextNode("");e.appendChild(t);var n=i.createElement("span");e.appendChild(n);var o=i.createElement("span");e.appendChild(o);var r=i.createElement("span");return o.appendChild(r),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,o.implement(c.prototype,s),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../range").Range,o=e("../lib/dom"),r=function(){function e(e){this.element=o.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},e.prototype.update=function(e){if(e){var t;for(var n in this.config=e,this.i=0,this.markers){var i=this.markers[n];if(i.range){var o=i.range.clipRows(e.firstRow,e.lastRow);if(!o.isEmpty())if(o=o.toScreenRange(this.session),i.renderer){var r=this.$getTop(o.start.row,e),s=this.$padding+o.start.column*e.characterWidth;i.renderer(t,o,s,r,e)}else"fullLine"==i.type?this.drawFullLineMarker(t,o,i.clazz,e):"screenLine"==i.type?this.drawScreenLineMarker(t,o,i.clazz,e):o.isMultiLine()?"text"==i.type?this.drawTextMarker(t,o,i.clazz,e):this.drawMultiLineMarker(t,o,i.clazz,e):this.drawSingleLineMarker(t,o,i.clazz+" ace_start ace_br15",e)}else i.update(t,this,this.session,e)}if(-1!=this.i)while(this.i<this.element.childElementCount)this.element.removeChild(this.element.lastChild)}},e.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},e.prototype.drawTextMarker=function(e,t,n,o,r){for(var a=this.session,l=t.start.row,c=t.end.row,h=l,u=0,d=0,p=a.getScreenLastRowColumn(h),g=new i(h,t.start.column,h,d);h<=c;h++)g.start.row=g.end.row=h,g.start.column=h==l?t.start.column:a.getRowWrapIndent(h),g.end.column=p,u=d,d=p,p=h+1<c?a.getScreenLastRowColumn(h+1):h==c?0:t.end.column,this.drawSingleLineMarker(e,g,n+(h==l?" ace_start":"")+" ace_br"+s(h==l||h==l+1&&t.start.column,u<d,d>p,h==c),o,h==c?0:1,r)},e.prototype.drawMultiLineMarker=function(e,t,n,i,o){var r=this.$padding,s=i.lineHeight,a=this.$getTop(t.start.row,i),l=r+t.start.column*i.characterWidth;if(o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var c=t.clone();c.end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,n+" ace_br1 ace_start",i,null,o)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+a+"px;left:"+l+"px;"+(o||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){c=t.clone();c.start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,n+" ace_br12",i,null,o)}else{a=this.$getTop(t.end.row,i);var h=t.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+h+"px;top:"+a+"px;left:"+r+"px;"+(o||""))}if(s=(t.end.row-t.start.row-1)*i.lineHeight,!(s<=0)){a=this.$getTop(t.start.row+1,i);var u=(t.start.column?1:0)|(t.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+s+"px;right:0;top:"+a+"px;left:"+r+"px;"+(o||""))}},e.prototype.drawSingleLineMarker=function(e,t,n,i,o,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,n,i,o,r);var s=i.lineHeight,a=(t.end.column+(o||0)-t.start.column)*i.characterWidth,l=this.$getTop(t.start.row,i),c=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+a+"px;top:"+l+"px;left:"+c+"px;"+(r||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,n,i,o,r){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding,c=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);c.forEach((function(e){this.elt(n,"height:"+s+"px;width:"+(e.width+(o||0))+"px;top:"+a+"px;left:"+(l+e.left)+"px;"+(r||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-r),this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},e.prototype.drawScreenLineMarker=function(e,t,n,i,o){var r=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(o||""))},e}();function s(e,t,n,i){return(e?1:0)|(t?2:0)|(n?4:0)|(i?8:0)}r.prototype.$padding=0,t.Marker=r})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,n){var i=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return i.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("./lines").Lines,a=e("../lib/event_emitter").EventEmitter,l=e("../config").nls,c=e("./text_util").isTextToken,h=function(){function e(e){this.dom=o,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new s(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode(),n=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],n=1;n<e+1;n++)if(this.showTabs){var i=this.dom.createElement("span");i.className="ace_invisible ace_invisible_tab",i.textContent=r.stringRepeat(this.TAB_CHAR,n),t.push(i)}else t.push(this.dom.createTextNode(r.stringRepeat(" ",n),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var o="ace_indent-guide",s=this.showSpaces?" ace_invisible ace_invisible_space":"",a=this.showSpaces?r.stringRepeat(this.SPACE_CHAR,this.tabSize):r.stringRepeat(" ",this.tabSize),l=this.showTabs?" ace_invisible ace_invisible_tab":"",c=this.showTabs?r.stringRepeat(this.TAB_CHAR,this.tabSize):a;i=this.dom.createElement("span");i.className=o+s,i.textContent=a,this.$tabStrings[" "]=i;i=this.dom.createElement("span");i.className=o+l,i.textContent=c,this.$tabStrings["\t"]=i}},e.prototype.updateLines=function(e,t,n){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var i=Math.max(t,e.firstRow),o=Math.min(n,e.lastRow),r=this.element.childNodes,s=0,a=e.firstRow;a<i;a++){var l=this.session.getFoldLine(a);if(l){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}var c=!1,h=(a=i,l=this.session.getNextFoldLine(a),l?l.start.row:1/0);while(1){if(a>h&&(a=l.end.row+1,l=this.session.getNextFoldLine(a,l),h=l?l.start.row:1/0),a>o)break;var u=r[s++];if(u){this.dom.removeChildren(u),this.$renderLine(u,a,a==h&&l),c&&(u.style.top=this.$lines.computeLineTop(a,e,this.session)+"px");var d=e.lineHeight*this.session.getRowLength(a)+"px";u.style.height!=d&&(c=!0,u.style.height=d)}a++}if(c)while(s<this.$lines.cells.length){var p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var n=e.lastRow,i=t?t.lastRow:-1;if(!t||i<e.firstRow)return this.update(e);if(n<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var o=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);o>0;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);o>0;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,n){var i=[],r=t,s=this.session.getNextFoldLine(r),a=s?s.start.row:1/0;while(1){if(r>a&&(r=s.end.row+1,s=this.session.getNextFoldLine(r,s),a=s?s.start.row:1/0),r>n)break;var l=this.$lines.createCell(r,e,this.session),c=l.element;this.dom.removeChildren(c),o.setStyle(c.style,"height",this.$lines.computeLineHeight(r,e,this.session)+"px"),o.setStyle(c.style,"top",this.$lines.computeLineTop(r,e,this.session)+"px"),this.$renderLine(c,r,r==a&&s),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",i.push(l),r++}return i},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;var t=e.firstRow,n=e.lastRow,i=this.$lines;while(i.getLength())i.pop();i.push(this.$renderLinesFragment(e,t,n))},e.prototype.$renderToken=function(e,t,n,i){var o,s=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,h=this.dom.createFragment(this.element),u=0;while(o=a.exec(i)){var d=o[1],p=o[2],g=o[3],f=o[4],m=o[5];if(s.showSpaces||!p){var v=u!=o.index?i.slice(u,o.index):"";if(u=o.index+o[0].length,v&&h.appendChild(this.dom.createTextNode(v,this.element)),d){var y=s.session.getScreenTabSize(t+o.index);h.appendChild(s.$tabStrings[y].cloneNode(!0)),t+=y-1}else if(p)if(s.showSpaces){var w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space",w.textContent=r.stringRepeat(s.SPACE_CHAR,p.length),h.appendChild(w)}else h.appendChild(this.dom.createTextNode(p,this.element));else if(g){w=this.dom.createElement("span");w.className="ace_invisible ace_invisible_space ace_invalid",w.textContent=r.stringRepeat(s.SPACE_CHAR,g.length),h.appendChild(w)}else if(f){t+=1;w=this.dom.createElement("span");w.style.width=2*s.config.characterWidth+"px",w.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",w.textContent=s.showSpaces?s.SPACE_CHAR:f,h.appendChild(w)}else if(m){t+=1;w=this.dom.createElement("span");w.style.width=2*s.config.characterWidth+"px",w.className="ace_cjk",w.textContent=m,h.appendChild(w)}}}if(h.appendChild(this.dom.createTextNode(u?i.slice(u):i,this.element)),c(n.type))e.appendChild(h);else{var b="ace_"+n.type.replace(/\./g," ace_");w=this.dom.createElement("span");"fold"==n.type&&(w.style.width=n.value.length*this.config.characterWidth+"px",w.setAttribute("title",l("Unfold code"))),w.className=b,w.appendChild(h),e.appendChild(w)}return t+i.length},e.prototype.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||i>=n)return t;if(" "==t[0]){i-=i%this.tabSize;for(var o=i/this.tabSize,r=0;r<o;r++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}if("\t"==t[0]){for(r=0;r<i;r++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}return this.$highlightIndentGuide(),t},e.prototype.$highlightIndentGuide=function(){if(this.$highlightIndentGuides&&this.displayIndentGuides){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),n=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,i=Math.floor(n/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:i,start:t.row};var o=this.session.$bracketHighlight;if(o)for(var r=this.session.$bracketHighlight.ranges,s=0;s<r.length;s++)if(t.row!==r[s].start.row){this.$highlightIndentGuideMarker.end=r[s].start.row,t.row>r[s].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(s=t.row+1;s<e.length;s++){var a=e[s],l=/^\s*/.exec(a)[0].length;if(""!==a&&(this.$highlightIndentGuideMarker.end=s,l<=n))break}}this.$renderHighlightIndentGuide()}}},e.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,t=0;t<e.length;t++){var n=e[t],i=n.element.childNodes;if(i.length>0)for(var o=0;o<i.length;o++)if(i[o].classList&&i[o].classList.contains("ace_indent-guide-active")){i[o].classList.remove("ace_indent-guide-active");break}}},e.prototype.$setIndentGuideActive=function(e,t){var n=this.session.doc.getLine(e.row);if(""!==n){var i=e.element.childNodes;if(i){var o=i[t-1];o&&o.classList&&o.classList.contains("ace_indent-guide")&&o.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var n=0;n<e.length;n++){var i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row>=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;n>=0;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}}},e.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},e.prototype.$renderWrappedLine=function(e,t,n){var i=0,o=0,s=n[0],a=0,l=this.$createLineElement();e.appendChild(l);for(var c=0;c<t.length;c++){var h=t[c],u=h.value;if(0==c&&this.displayIndentGuides){if(i=u.length,u=this.renderIndentGuide(l,u,s),!u)continue;i-=u.length}if(i+u.length<s)a=this.$renderToken(l,a,h,u),i+=u.length;else{while(i+u.length>=s)a=this.$renderToken(l,a,h,u.substring(0,s-i)),u=u.substring(s-i),i=s,l=this.$createLineElement(),e.appendChild(l),l.appendChild(this.dom.createTextNode(r.stringRepeat(" ",n.indent),this.element)),o++,a=0,s=n[o]||Number.MAX_VALUE;0!=u.length&&(i+=u.length,a=this.$renderToken(l,a,h,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var n=0,i=0;i<t.length;i++){var o=t[i],r=o.value;if(0!=i||!this.displayIndentGuides||(r=this.renderIndentGuide(e,r),r)){if(n+r.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,o,r);n=this.$renderToken(e,n,o,r)}}},e.prototype.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));var r=this.dom.createElement("span");r.className="ace_inline_button ace_keyword ace_toggle_wrap",r.textContent=o?"<hide>":"<click to see more...>",e.appendChild(r)},e.prototype.$renderLine=function(e,t,n){if(n||0==n||(n=this.session.getFoldLine(t)),n)var i=this.$getFoldLineTokens(t,n);else i=this.session.getTokens(t);var o=e;if(i.length){var r=this.session.getRowSplitData(t);if(r&&r.length){this.$renderWrappedLine(e,i,r);o=e.lastChild}else{o=e;this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o)),this.$renderSimpleLine(o,i)}}else this.$useLineGroups()&&(o=this.$createLineElement(),e.appendChild(o));if(this.showEOL&&o){n&&(t=n.end.row);var s=this.dom.createElement("span");s.className="ace_invisible ace_invisible_eol",s.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,o.appendChild(s)}},e.prototype.$getFoldLineTokens=function(e,t){var n=this.session,i=[];function o(e,t,n){var o=0,r=0;while(r+e[o].value.length<t)if(r+=e[o].value.length,o++,o==e.length)return;if(r!=t){var s=e[o].value.substring(t-r);s.length>n-t&&(s=s.substring(0,n-t)),i.push({type:e[o].type,value:s}),r=t+s.length,o+=1}while(r<n&&o<e.length){s=e[o].value;s.length+r>n?i.push({type:e[o].type,value:s.substring(0,n-r)}):i.push(e[o]),r+=s.length,o+=1}}var r=n.getTokens(e);return t.walk((function(e,t,s,a,l){null!=e?i.push({type:"fold",value:e}):(l&&(r=n.getTokens(t)),r.length&&o(r,a,s))}),t.end.row,this.session.getLine(t.end.row).length),i},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();h.prototype.EOF_CHAR="¶",h.prototype.EOL_CHAR_LF="¬",h.prototype.EOL_CHAR_CRLF="¤",h.prototype.EOL_CHAR=h.prototype.EOL_CHAR_LF,h.prototype.TAB_CHAR="—",h.prototype.SPACE_CHAR="·",h.prototype.$padding=0,h.prototype.MAX_LINE_LENGTH=1e4,h.prototype.showInvisibles=!1,h.prototype.showSpaces=!1,h.prototype.showTabs=!1,h.prototype.showEOL=!1,h.prototype.displayIndentGuides=!0,h.prototype.$highlightIndentGuides=!0,h.prototype.$tabStrings=[],h.prototype.destroy={},h.prototype.onChangeTabSize=h.prototype.$computeTabString,i.implement(h.prototype,a),t.Text=h})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=function(){function e(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)i.setStyle(t[n].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&i.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,i.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,i.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=i.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,i.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&i.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(e),i=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),o=(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:o}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.top<t.maxHeight},e.prototype.update=function(e){this.config=e;var t=this.session.$selectionMarkers,n=0,o=0;void 0!==t&&0!==t.length||(t=[{cursor:null}]);n=0;for(var r=t.length;n<r;n++){var s=this.getPixelPosition(t[n].cursor,!0);if(!((s.top>e.height+e.offset||s.top<0)&&n>1)){var a=this.cursors[o++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,s,e,t[n],this.session):this.isCursorInView(s,e)?(i.setStyle(l,"display","block"),i.translate(a,s.left,s.top),i.setStyle(l,"width",Math.round(e.characterWidth)+"px"),i.setStyle(l,"height",e.lineHeight+"px")):i.setStyle(l,"display","none")}}while(this.cursors.length>o)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=s,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();o.prototype.$padding=0,o.prototype.drawCursor=null,t.Cursor=o})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter,l=32768,c=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(c.prototype,a);var h=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,n.$scrollbarWidth=i.width=r.scrollbarWidth(t.ownerDocument),i.inner.style.width=i.element.style.width=(i.width||15)+5+"px",i.$minWidth=0,i}return i(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>l?(this.coeff=l/e,e=l):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(c);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var u=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.height=n.$scrollbarWidth,i.inner.style.height=i.element.style.height=(i.height||15)+5+"px",i}return i(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(c);t.ScrollBar=h,t.ScrollBarV=h,t.ScrollBarH=u,t.VScrollBar=h,t.HScrollBar=u})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=this&&this.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),o=e("./lib/oop"),r=e("./lib/dom"),s=e("./lib/event"),a=e("./lib/event_emitter").EventEmitter;r.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var l=function(){function e(e,t){this.element=r.createElement("div"),this.element.className="ace_sb"+t,this.inner=r.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(l.prototype,a);var c=function(e){function t(t,n){var i=e.call(this,t,"-v")||this;return i.scrollTop=0,i.scrollHeight=0,i.parent=t,i.width=i.VScrollWidth,i.renderer=n,i.inner.style.width=i.element.style.width=(i.width||15)+"px",i.$minWidth=0,i}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientY,o=function(e){i=e.clientY},r=function(){clearInterval(h)},a=t.clientY,l=this.thumbTop,c=function(){if(void 0!==i){var e=n.scrollTopFromThumbTop(l+i-a);e!==n.scrollTop&&n._emit("scroll",{data:e})}};s.capture(this.inner,o,r);var h=setInterval(c,20);return s.preventDefault(t)}var u=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(u)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return t>>=0,t<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(l);c.prototype.setInnerHeight=c.prototype.setScrollHeight;var h=function(e){function t(t,n){var i=e.call(this,t,"-h")||this;return i.scrollLeft=0,i.scrollWidth=0,i.height=i.HScrollHeight,i.inner.style.height=i.element.style.height=(i.height||12)+"px",i.renderer=n,i}return i(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===s.getButton(t)&&2!==t.detail){if(t.target===this.inner){var n=this,i=t.clientX,o=function(e){i=e.clientX},r=function(){clearInterval(h)},a=t.clientX,l=this.thumbLeft,c=function(){if(void 0!==i){var e=n.scrollLeftFromThumbLeft(l+i-a);e!==n.scrollLeft&&n._emit("scroll",{data:e})}};s.capture(this.inner,o,r);var h=setInterval(c,20);return s.preventDefault(t)}var u=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(u)}),s.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return t>>=0,t<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(l);h.prototype.setInnerWidth=h.prototype.setScrollWidth,t.ScrollBar=c,t.ScrollBarV=c,t.ScrollBarH=h,t.VScrollBar=c,t.HScrollBar=h})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,n){"use strict";var i=e("./lib/event"),o=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;if(t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=o})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,n){var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),l=e("../lib/event_emitter").EventEmitter,c=512,h="function"==typeof ResizeObserver,u=200,d=function(){function e(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",c),this.$characterSize={width:0,height:0},h?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=s.onIdle((function t(){e.checkForSizeChanges(),s.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){this.$main.textContent=r.stringRepeat(e,c);var t=this.$main.getBoundingClientRect();return t.width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(window.getComputedStyle(e)["zoom"]||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=o.buildDom([e(0,0),e(u,0),e(0,u),e(u,u)],this.el)},e.prototype.transformCoordinates=function(e,t){if(e){var n=this.$getZoom(this.el);e=s(1/n,e)}function i(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function o(e,t){return[e[0]-t[0],e[1]-t[1]]}function r(e,t){return[e[0]+t[0],e[1]+t[1]]}function s(e,t){return[e*t[0],e*t[1]]}function a(e){var t=e.getBoundingClientRect();return[t.left,t.top]}this.els||this.$initTransformMeasureNodes();var l=a(this.els[0]),c=a(this.els[1]),h=a(this.els[2]),d=a(this.els[3]),p=i(o(d,c),o(d,h),o(r(c,h),r(d,l))),g=s(1+p[0],o(c,l)),f=s(1+p[1],o(h,l));if(t){var m=t,v=p[0]*m[0]/u+p[1]*m[1]/u+1,y=r(s(m[0],g),s(m[1],f));return r(s(1/v/u,y),l)}var w=o(e,l),b=i(o(g,s(p[0],w)),o(f,s(p[1],w)),w);return s(u,b)},e}();d.prototype.$characterSize={width:0,height:0},i.implement(d.prototype,l),t.FontMetrics=d})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,n){n.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts &nbsp; instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n white-space: pre;\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,n){"use strict";var i=e("../lib/dom"),o=e("../lib/oop"),r=e("../lib/event_emitter").EventEmitter,s=function(){function e(e,t){this.canvas=i.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;if(e){this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height;var n=(e.lastRow+1)*this.lineHeight;n<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var i=this.canvas.getContext("2d");function o(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}var r=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),r){var s={info:1,warning:2,error:3};r.forEach((function(e){e.priority=s[e.type]||null})),r=r.sort(o);for(var a=this.renderer.session.$foldData,l=0;l<r.length;l++){var c=r[l].row,h=this.compensateFoldRows(c,a),u=Math.round((c-h)*this.lineHeight*this.heightRatio),d=Math.round((c-h)*this.lineHeight*this.heightRatio),p=Math.round(((c-h)*this.lineHeight+this.lineHeight)*this.heightRatio),g=p-d;if(g<this.minDecorationHeight){var f=(d+p)/2|0;f<this.halfMinDecorationHeight?f=this.halfMinDecorationHeight:f+this.halfMinDecorationHeight>this.canvasHeight&&(f=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(f-this.halfMinDecorationHeight),p=Math.round(f+this.halfMinDecorationHeight)}i.fillStyle=t[r[l].type]||null,i.fillRect(0,u,this.canvasWidth,p-d)}}var m=this.renderer.session.selection.getCursor();if(m){h=this.compensateFoldRows(m.row,a),u=Math.round((m.row-h)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,u,this.canvasWidth,2)}},e.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&t.length>0)for(var i=0;i<t.length;i++)e>t[i].start.row&&e<t[i].end.row?n+=e-t[i].start.row:e>=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n},e}();o.implement(s.prototype,r),t.Decorator=s})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent"],(function(e,t,n){"use strict";var i=e("./lib/oop"),o=e("./lib/dom"),r=e("./lib/lang"),s=e("./config"),a=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,u=e("./scrollbar").HScrollBar,d=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,g=e("./scrollbar_custom").VScrollBar,f=e("./renderloop").RenderLoop,m=e("./layer/font_metrics").FontMetrics,v=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),w=e("./layer/decorators").Decorator,b=e("./lib/useragent");o.importCssString(y,"ace_editor.css",!1);var $=function(){function e(e,t){var n=this;this.container=e||o.createElement("div"),o.addCssClass(this.container,"ace_editor"),o.HI_DPI&&o.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==s.get("useStrictCSP")&&s.set("useStrictCSP",!1),this.$gutter=o.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=o.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=o.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new a(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content);var i=this.$textLayer=new c(this.content);this.canvas=i.element,this.$markerFront=new l(this.content),this.$cursorLayer=new h(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollTop(e.data-n.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){n.$scrollAnimation||n.session.setScrollLeft(e.data-n.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!b.isIOS,this.$loop=new f(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),s.resetOptions(this),s._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),o.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,n){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRow<t&&(this.$changedLines.lastRow=t)):this.$changedLines={firstRow:e,lastRow:t},this.$changedLines.lastRow<this.layerConfig.firstRow){if(!n)return;this.$changedLines.lastRow=this.layerConfig.lastRow}this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var o=this.container;i||(i=o.clientHeight||o.scrollHeight),n||(n=o.clientWidth||o.scrollWidth);var r=this.$updateCachedSize(e,t,n,i);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(r|this.$changes,!0):this.$loop.schedule(r|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var r=0,s=this.$size,a={width:s.width,height:s.height,scrollerHeight:s.scrollerHeight,scrollerWidth:s.scrollerWidth};if(i&&(e||s.height!=i)&&(s.height=i,r|=this.CHANGE_SIZE,s.scrollerHeight=s.height,this.$horizScroll&&(s.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(s.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",r|=this.CHANGE_SCROLL),n&&(e||s.width!=n)){r|=this.CHANGE_SIZE,s.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,o.setStyle(this.scrollBarH.element.style,"left",t+"px"),o.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),s.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),o.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";o.setStyle(this.scrollBarH.element.style,"right",l),o.setStyle(this.scroller.style,"right",l),o.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(s.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(r|=this.CHANGE_FULL)}return s.$dirty=!n||!i,r&&this._signal("resize",a),r},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=o.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=o.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var n=this.$cursorLayer.$pixelPos;if(n){t&&t.markerRange&&(n=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var i=this.layerConfig,r=n.top,s=n.left;r-=i.offset;var a=t&&t.useTextareaForIME||b.isMobile?this.lineHeight:1;if(r<0||r>i.height-a)o.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;if(t)if(t.useTextareaForIME){var h=this.textarea.value;l=this.characterWidth*this.session.$getStringScreenWidth(h)[0]}else r+=this.lineHeight+2;else r+=this.lineHeight;s-=this.scrollLeft,s>this.$size.scrollerWidth-l&&(s=this.$size.scrollerWidth-l),s+=this.gutterWidth+this.margin.left,o.setStyle(e,"height",a+"px"),o.setStyle(e,"width",l+"px"),o.translate(this.textarea,Math.min(s,this.$size.scrollerWidth-l),Math.min(r,c))}}}else o.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow,n=this.session.documentToScreenRow(t,0)*e.lineHeight;return n-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},e.prototype.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;i>0&&(this.scrollTop=i,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),o.translate(this.content,-this.scrollLeft,-n.offset);var r=n.width+2*this.$padding+"px",s=n.minHeight+"px";o.setStyle(this.content.style,"width",r),o.setStyle(this.content.style,"height",s)}if(e&this.CHANGE_H_SCROLL&&(o.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(n)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=n<=2*this.lineHeight,o=!i&&e>t;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||o!=this.$vScroll){o!=this.$vScroll&&(this.$vScroll=o,this.scrollBarV.setVisible(o));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,n=t.height<=2*this.lineHeight,i=this.session.getScreenLength(),o=i*this.lineHeight,r=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-r-2*this.$padding<0),a=this.$horizScroll!==s;a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var l=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var c=t.scrollerHeight+this.lineHeight,h=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;o+=h;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,o-t.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-t.scrollerWidth+u.right)));var d=!n&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-o+h<0||this.scrollTop>u.top),p=l!==d;p&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var g,f,m=this.scrollTop%this.lineHeight,v=Math.ceil(c/this.lineHeight)-1,y=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),w=y+v,b=this.lineHeight;y=e.screenToDocumentRow(y,0);var $=e.getFoldLine(y);$&&(y=$.start.row),g=e.documentToScreenRow(y,0),f=e.getRowLength(y)*b,w=Math.min(e.screenToDocumentRow(w,0),e.getLength()-1),c=t.scrollerHeight+e.getRowLength(w)*b+f,m=this.scrollTop-g*b;var x=0;return(this.layerConfig.width!=r||a)&&(x=this.CHANGE_H_SCROLL),(a||p)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),p&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:y,firstRowScreen:g,lastRow:w,lineHeight:b,characterWidth:this.characterWidth,minHeight:c,maxHeight:o,offset:m,gutterOffset:b?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(e>n.lastRow+1)&&!(t<n.firstRow))return t===1/0?(this.$showGutter&&this.$gutterLayer.update(n),void this.$textLayer.update(n)):(this.$textLayer.updateLines(n,e,t),!0)}},e.prototype.$getLongestLine=function(){var e=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(e+=1),this.$textLayer&&e>this.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},e.prototype.scrollCursorIntoView=function(e,t,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(e),o=i.left,r=i.top,s=n&&n.top||0,a=n&&n.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+s>r?(t&&l+s>r+this.lineHeight&&(r-=t*this.$size.scrollerHeight),0===r&&(r=-this.scrollMargin.top),this.session.setScrollTop(r)):l+this.$size.scrollerHeight-a<r+this.lineHeight&&(t&&l+this.$size.scrollerHeight-a<r-this.lineHeight&&(r+=t*this.$size.scrollerHeight),this.session.setScrollTop(r+this.lineHeight+a-this.$size.scrollerHeight));var c=this.scrollLeft,h=2*this.layerConfig.characterWidth;o-h<c?(o-=h,o<this.$padding+h&&(o=-this.scrollMargin.left),this.session.setScrollLeft(o)):(o+=h,c+this.$size.scrollerWidth<o+this.characterWidth?this.session.setScrollLeft(Math.round(o+this.characterWidth-this.$size.scrollerWidth)):c<=this.$padding&&o-c<this.characterWidth&&this.session.setScrollLeft(0))}},e.prototype.getScrollTop=function(){return this.session.getScrollTop()},e.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},e.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},e.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},e.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},e.prototype.alignCursor=function(e,t){"number"==typeof e&&(e={row:e,column:0});var n=this.$cursorLayer.getPixelPosition(e),i=this.$size.scrollerHeight-this.lineHeight,o=n.top-i*(t||0);return this.session.setScrollTop(o),o},e.prototype.$calcSteps=function(e,t){var n=0,i=this.STEPS,o=[],r=function(e,t,n){return n*(Math.pow(e-1,3)+1)+t};for(n=0;n<i;++n)o.push(r(n/this.STEPS,e,t-e));return o},e.prototype.scrollToLine=function(e,t,n,i){var o=this.$cursorLayer.getPixelPosition({row:e,column:0}),r=o.top;t&&(r-=this.$size.scrollerHeight/2);var s=this.scrollTop;this.session.setScrollTop(r),!1!==n&&this.animateScrolling(s,i)},e.prototype.animateScrolling=function(e,t){var n=this.scrollTop;if(this.$animatedScroll){var i=this;if(e!=n){if(this.$scrollAnimation){var o=this.$scrollAnimation.steps;if(o.length&&(e=o[0],e==n))return}var r=i.$calcSteps(e,n);this.$scrollAnimation={from:e,to:n,steps:r},clearInterval(this.$timer),i.session.setScrollTop(r.shift()),i.session.$scrollTop=n,this.$timer=setInterval((function(){if(!i.$stopAnimation)return i.session?void(r.length?(i.session.setScrollTop(r.shift()),i.session.$scrollTop=n):null!=n?(i.session.$scrollTop=-1,i.session.setScrollTop(n),n=null):s()):clearInterval(i.$timer);s()}),10)}}function s(){i.$timer=clearInterval(i.$timer),i.$scrollAnimation=null,i.$stopAnimation=!1,t&&t()}},e.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},e.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},e.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},e.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},e.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},e.prototype.pixelToScreenCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=Math.floor((t+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(r):Math.round(r);return{row:s,column:a,side:r-a>0?1:-1,offsetX:o}},e.prototype.screenToTextCoordinates=function(e,t){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([e,t]);e=i[1]-this.gutterWidth-this.margin.left,t=i[0]}else n=this.scroller.getBoundingClientRect();var o=e+this.scrollLeft-n.left-this.$padding,r=o/this.characterWidth,s=this.$blockCursor?Math.floor(r):Math.round(r),a=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(s,0),o)},e.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(e,t),o=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,e)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth)),r=i.row*this.lineHeight;return{pageX:n.left+o-this.scrollLeft,pageY:n.top+r-this.scrollTop}},e.prototype.visualizeFocus=function(){o.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){o.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),void 0==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(o.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),o.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var n=this.session.selection.cursor,i=t||{row:n.row,column:n.column};this.removeGhostText();var o=e.split("\n");if(this.addToken(o[0],"ghost_text",i.row,i.column),this.$ghostText={text:e,position:{row:i.row,column:i.column}},o.length>1){this.$ghostTextWidget={text:o.slice(1).join("\n"),row:i.row,column:i.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var r=this.$cursorLayer.getPixelPosition(i,!0),s=this.container,a=s.getBoundingClientRect().height,l=o.length*this.lineHeight,c=l<a-r.top;if(c)return;l<a?this.scrollBy(0,(o.length-1)*this.lineHeight):this.scrollBy(0,r.top)}},e.prototype.removeGhostText=function(){if(this.$ghostText){var e=this.$ghostText.position;this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},e.prototype.addToken=function(e,t,n,i){var o=this.session;o.bgTokenizer.lines[n]=null;var r={type:t,value:e},s=o.getTokens(n);if(null!=i&&s.length)for(var a=0,l=0;l<s.length;l++){var c=s[l];if(a+=c.value.length,i<=a){var h=c.value.length-(a-i),u=c.value.slice(0,h),d=c.value.slice(h);s.splice(l,1,{type:c.type,value:u},r,{type:c.type,value:d});break}}else s.push(r);this.updateLines(n,n)},e.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},e.prototype.setTheme=function(e,t){var n=this;if(this.$themeId=e,n._dispatchEvent("themeChange",{theme:e}),e&&"string"!=typeof e)r(e);else{var i=e||this.$options.theme.initialValue;s.loadModule(["theme",i],r)}function r(i){if(n.$themeId!=e)return t&&t();if(!i||!i.cssClass)throw new Error("couldn't load module "+e+" or it didn't call define");i.$id&&(n.$themeId=i.$id),o.importCssString(i.cssText,i.cssClass,n.container),n.theme&&o.removeCssClass(n.container,n.theme.cssClass);var r="padding"in i?i.padding:"padding"in(n.theme||{})?4:n.$padding;n.$padding&&r!=n.$padding&&n.setPadding(r),n.$theme=i.cssClass,n.theme=i,o.addCssClass(n.container,i.cssClass),o.setCssClass(n.container,"ace_dark",i.isDark),n.$size&&(n.$size.width=0,n.$updateSizeAsync()),n._dispatchEvent("themeLoaded",{theme:i}),t&&t()}},e.prototype.getTheme=function(){return this.$themeId},e.prototype.setStyle=function(e,t){o.setCssClass(this.container,e,!1!==t)},e.prototype.unsetStyle=function(e){o.removeCssClass(this.container,e)},e.prototype.setCursorStyle=function(e){o.setStyle(this.scroller.style,"cursor",e)},e.prototype.setMouseCursor=function(e){o.setStyle(this.scroller.style,"cursor",e)},e.prototype.attachToShadowRoot=function(){o.importCssString(y,"ace_editor.css",this.container)},e.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},e.prototype.$updateCustomScrollbar=function(e){var t=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,!0===e?(this.scrollBarV=new g(this.container,this),this.scrollBarH=new p(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})),this.$scrollDecorator=new w(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new d(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollTop(e.data-t.scrollMargin.top)})),this.scrollBarH.addEventListener("scroll",(function(e){t.$scrollAnimation||t.session.setScrollLeft(e.data-t.scrollMargin.left)})))},e.prototype.$addResizeObserver=function(){if(window.ResizeObserver&&!this.$resizeObserver){var e=this;this.$resizeTimer=r.delayedCall((function(){e.destroyed||e.onResize()}),50),this.$resizeObserver=new window.ResizeObserver((function(t){var n=t[0].contentRect.width,i=t[0].contentRect.height;Math.abs(e.$size.width-n)>1||Math.abs(e.$size.height-i)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();$.prototype.CHANGE_CURSOR=1,$.prototype.CHANGE_MARKER=2,$.prototype.CHANGE_GUTTER=4,$.prototype.CHANGE_SCROLL=8,$.prototype.CHANGE_LINES=16,$.prototype.CHANGE_TEXT=32,$.prototype.CHANGE_SIZE=64,$.prototype.CHANGE_MARKER_BACK=128,$.prototype.CHANGE_MARKER_FRONT=256,$.prototype.CHANGE_FULL=512,$.prototype.CHANGE_H_SCROLL=1024,$.prototype.$changes=0,$.prototype.$padding=null,$.prototype.$frozen=!1,$.prototype.STEPS=8,i.implement($.prototype,v),s.defineOptions($.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){o.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!b.isMobile&&!b.isIE}}),t.VirtualRenderer=$})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,n){"use strict";var i=e("../lib/oop"),o=e("../lib/net"),r=e("../lib/event_emitter").EventEmitter,s=e("../config");function a(e){var t="importScripts('"+o.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(r){var n=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,i=new n;return i.append(t),i.getBlob("application/javascript")}}function l(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(s.get("loadWorkerFromBlob")){var t=a(e),n=window.URL||window.webkitURL,i=n.createObjectURL(t);return new Worker(i)}return new Worker(e)}var c=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){i.implement(this,r),this.$createWorkerFromOldConfig=function(t,n,i,o,r){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),s.get("packaged")||!e.toUrl)o=o||s.moduleUrl(n,"worker");else{var a=this.$normalizePath;o=o||a(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=a(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=l(o),r&&this.send("importScripts",r),this.$worker.postMessage({init:!0,tlns:c,module:n,classname:i}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var n=this.callbacks[t.id];n&&(n(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data);break}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return o.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,n){if(n){var i=this.callbackId++;this.callbacks[i]=n,t.push(i)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(n){console.error(n.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);var h=function(e,t,n){var i=null,o=!1,a=Object.create(r),l=[],h=new c({messageBuffer:l,terminate:function(){},postMessage:function(e){l.push(e),i&&(o?setTimeout(u):u())}});h.setEmitSync=function(e){o=e};var u=function(){var e=l.shift();e.command?i[e.command].apply(i,e.args):e.event&&a._signal(e.event,e.data)};return a.postMessage=function(e){h.onMessage({data:e})},a.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},a.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},s.loadModule(["worker",t],(function(e){i=new e[n](a);while(l.length)u()})),h};t.UIWorkerClient=h,t.WorkerClient=c,t.createWorker=l})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,n){"use strict";var i=e("./range").Range,o=e("./lib/event_emitter").EventEmitter,r=e("./lib/oop"),s=function(){function e(e,t,n,i,o,r){var s=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=o,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout((function(){s.onCursorChange()}))},this.$pos=n;var a=e.getUndoManager().$undoStack||e.getUndoManager()["$undostack"]||{length:-1};this.$undoStackDepth=a.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var o=this.pos;o.$insertRight=!0,o.detach(),o.markerId=n.addMarker(new i(o.row,o.column,o.row,o.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(n){var i=t.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),e.others.push(i)})),n.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(n){n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e<this.others.length;e++)this.session.removeMarker(this.others[e].markerId)}},e.prototype.onUpdate=function(e){if(this.$updating)return this.updateAnchors(e);var t=e;if(t.start.row===t.end.row&&t.start.row===this.pos.row){this.$updating=!0;var n="insert"===e.action?t.end.column-t.start.column:t.start.column-t.end.column,o=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,r=t.start.column-this.pos.column;if(this.updateAnchors(e),o&&(this.length+=n),o&&!this.session.$fromUndo)if("insert"===e.action)for(var s=this.others.length-1;s>=0;s--){var a=this.others[s],l={row:a.row,column:a.column+r};this.doc.insertMergedLines(l,e.lines)}else if("remove"===e.action)for(s=this.others.length-1;s>=0;s--){a=this.others[s],l={row:a.row,column:a.column+r};this.doc.remove(new i(l.row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,n=function(n,o){t.removeMarker(n.markerId),n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),o,null,!1)};n(this.pos,this.mainClass);for(var o=this.others.length;o--;)n(this.others[o],this.othersClass)}},e.prototype.onCursorChange=function(e){if(!this.$updating&&this.session){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e["$undostack"]).length-this.$undoStackDepth,n=0;n<t;n++)e.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},e}();r.implement(s.prototype,o),t.PlaceHolder=s})),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,n){var i=e("../lib/event"),o=e("../lib/useragent");function r(e,t){return e.row==t.row&&e.column==t.column}function s(e){var t=e.domEvent,n=t.altKey,s=t.shiftKey,a=t.ctrlKey,l=e.getAccelKey(),c=e.getButton();if(a&&o.isMac&&(c=t.button),e.editor.inMultiSelectMode&&2==c)e.editor.textInput.onContextMenu(e.domEvent);else if(a||n||l){if(0===c){var h,u=e.editor,d=u.selection,p=u.inMultiSelectMode,g=e.getDocumentPosition(),f=d.getCursor(),m=e.inSelection()||d.isEmpty()&&r(g,f),v=e.x,y=e.y,w=function(e){v=e.clientX,y=e.clientY},b=u.session,$=u.renderer.pixelToScreenCoordinates(v,y),x=$;if(u.$mouseHandler.$enableJumpToDef)a&&n||l&&n?h=s?"block":"add":n&&u.$blockSelectEnabled&&(h="block");else if(l&&!n){if(h="add",!p&&s)return}else n&&u.$blockSelectEnabled&&(h="block");if(h&&o.isMac&&t.ctrlKey&&u.$mouseHandler.cancelContextMenu(),"add"==h){if(!p&&m)return;if(!p){var C=d.toOrientedRange();u.addSelectionMarker(C)}var S=d.rangeList.rangeAtPoint(g);u.inVirtualSelectionMode=!0,s&&(S=null,C=d.ranges[0]||C,u.removeSelectionMarker(C)),u.once("mouseup",(function(){var e=d.toOrientedRange();S&&e.isEmpty()&&r(S.cursor,e.cursor)?d.substractPoint(e.cursor):(s?d.substractPoint(C.cursor):C&&(u.removeSelectionMarker(C),d.addRange(C)),d.addRange(e)),u.inVirtualSelectionMode=!1}))}else if("block"==h){var A;e.stop(),u.inVirtualSelectionMode=!0;var k=[],L=function(){var e=u.renderer.pixelToScreenCoordinates(v,y),t=b.screenToDocumentPosition(e.row,e.column,e.offsetX);r(x,e)&&r(t,d.lead)||(x=e,u.selection.moveToPosition(t),u.renderer.scrollCursorIntoView(),u.removeSelectionMarkers(k),k=d.rectangularRangeBlock(x,$),u.$mouseHandler.$clickSelection&&1==k.length&&k[0].isEmpty()&&(k[0]=u.$mouseHandler.$clickSelection.clone()),k.forEach(u.addSelectionMarker,u),u.updateSelectionMarkers())};p&&!l?d.toSingleRange():!p&&l&&(A=d.toOrientedRange(),u.addSelectionMarker(A)),s?$=b.documentToScreenPosition(d.lead):d.moveToPosition(g),x={row:-1,column:-1};var _=function(e){L(),clearInterval(T),u.removeSelectionMarkers(k),k.length||(k=[d.toOrientedRange()]),A&&(u.removeSelectionMarker(A),d.toSingleRange(A));for(var t=0;t<k.length;t++)d.addRange(k[t]);u.inVirtualSelectionMode=!1,u.$mouseHandler.$clickSelection=null},R=L;i.capture(u.container,w,_);var T=setInterval((function(){R()}),20);return e.preventDefault()}}}else 0===c&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}t.onMouseDown=s})),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],(function(e,t,n){t.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(e){e.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(e){e.selectMoreLines(1)},bindKey:{win:"Ctrl-Alt-Down",mac:"Ctrl-Alt-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorAboveSkipCurrent",description:"Add cursor above (skip current)",exec:function(e){e.selectMoreLines(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Up",mac:"Ctrl-Alt-Shift-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelowSkipCurrent",description:"Add cursor below (skip current)",exec:function(e){e.selectMoreLines(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Down",mac:"Ctrl-Alt-Shift-Down"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreBefore",description:"Select more before",exec:function(e){e.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(e){e.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(e){e.selectMore(-1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Left",mac:"Ctrl-Alt-Shift-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextAfter",description:"Select next after",exec:function(e){e.selectMore(1,!0)},bindKey:{win:"Ctrl-Alt-Shift-Right",mac:"Ctrl-Alt-Shift-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"toggleSplitSelectionIntoLines",description:"Split selection into lines",exec:function(e){e.multiSelect.rangeCount>1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var i=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new i(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,n){var i=e("./range_list").RangeList,o=e("./range").Range,r=e("./selection").Selection,s=e("./mouse/multi_select_handler").onMouseDown,a=e("./lib/event"),l=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var h=e("./search").Search,u=new h;function d(e,t,n){return u.$options.wrap=!0,u.$options.needle=t,u.$options.backwards=-1==n,u.find(e)}var p=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(p.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}e.cursor||(e.cursor=e.end);var i=this.rangeList.add(e);return this.$onAddRange(e),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var n=e.length;n--;){var i=this.ranges.indexOf(e[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),t=t||this.ranges[0],t&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],n=0;n<e.length;n++){var i=e[n],r=i.start.row,s=i.end.row;if(r===s)t.push(i.clone());else{t.push(new o(r,i.start.column,r,this.session.getLine(r).length));while(++r<s)t.push(this.getLineRange(r,!0));t.push(new o(s,0,s,i.end.column))}0!=n||this.isBackwards()||(t=t.reverse())}this.toSingleRange();for(n=t.length;n--;)this.addRange(t[n])},this.joinSelections=function(){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var e=this.rangeList.ranges,t=e[e.length-1],n=o.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(n,t.cursor==t.start)}else{var i=this.session.documentToScreenPosition(this.cursor),r=this.session.documentToScreenPosition(this.anchor),s=this.rectangularRangeBlock(i,r);s.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,n){var i=[],r=e.column<t.column;if(r)var s=e.column,a=t.column,l=e.offsetX,c=t.offsetX;else s=t.column,a=e.column,l=t.offsetX,c=e.offsetX;var h,u=e.row<t.row;if(u)var d=e.row,p=t.row;else d=t.row,p=e.row;s<0&&(s=0),d<0&&(d=0),d==p&&(n=!0);for(var g=d;g<=p;g++){var m=o.fromPoints(this.session.screenToDocumentPosition(g,s,l),this.session.screenToDocumentPosition(g,a,c));if(m.isEmpty()){if(h&&f(m.end,h))break;h=m.end}m.cursor=r?m.start:m.end,i.push(m)}if(u&&i.reverse(),!n){var v=i.length-1;while(i[v].isEmpty()&&v>0)v--;if(v>0){var y=0;while(i[y].isEmpty())y++}for(var w=v;w>=y;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}.call(r.prototype);var g=e("./editor").Editor;function f(e,t){return e.row==t.row&&e.column==t.column}function m(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",s),e.commands.addCommands(c.defaultCommands),v(e))}function v(e){if(e.textInput){var t=e.textInput.getElement(),n=!1;a.addListener(t,"keydown",(function(t){var o=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&o?n||(e.renderer.setMouseCursor("crosshair"),n=!0):n&&i()}),e),a.addListener(t,"keyup",i,e),a.addListener(t,"blur",i,e)}function i(t){n&&(e.renderer.setMouseCursor(""),n=!1)}}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,n=e.length;n--;){var i=e[n];if(i.marker){this.session.removeMarker(i.marker);var o=t.indexOf(i);-1!=o&&t.splice(o,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,n=e.editor;if(n.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?i=n.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?i=n.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(n.exitMultiSelectMode(),i=t.exec(n,e.args||{})):i=t.multiSelectAction(n,e.args||{});else{var i=t.exec(n,e.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,s=1==n||n&&n.$byLines,a=this.session,l=this.selection,c=l.rangeList,h=(o?l:c).ranges;if(!h.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var u=l._eventRegistry;l._eventRegistry={};var d=new r(a);this.inVirtualSelectionMode=!0;for(var p=h.length;p--;){if(s)while(p>0&&h[p].start.row==h[p-1].end.row)p--;d.fromOrientedRange(h[p]),d.index=p,this.selection=a.selection=d;var g=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===g||(i=g),d.toOrientedRange(h[p])}d.detach(),this.selection=a.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=u,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,n=[],i=0;i<t.length;i++)n.push(this.session.getTextRange(t[i]));var o=this.session.getDocument().getNewLineCharacter();e=n.join(o),e.length==(n.length-1)*o.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var n=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&t==this.multiSelect.anchor)return;var i=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor;i.row!=t.row||this.session.$clipPositionToDocument(i.row,i.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(e,t,n){if(t=t||{},t.needle=e||t.needle,void 0==t.needle){var i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();t.needle=this.session.getTextRange(i)}this.$search.set(t);var o=this.$search.findAll(this.session);if(!o.length)return 0;var r=this.multiSelect;n||r.toSingleRange(o[0]);for(var s=o.length;s--;)r.addRange(o[s],!0);return i&&r.rangeList.rangeAtPoint(i.start)&&r.addRange(i,!0),o.length},this.selectMoreLines=function(e,t){var n=this.selection.toOrientedRange(),i=n.cursor==n.end,r=this.session.documentToScreenPosition(n.cursor);this.selection.$desiredColumn&&(r.column=this.selection.$desiredColumn);var s=this.session.screenToDocumentPosition(r.row+e,r.column);if(n.isEmpty())l=s;else var a=this.session.documentToScreenPosition(i?n.end:n.start),l=this.session.screenToDocumentPosition(a.row+e,a.column);if(i){var c=o.fromPoints(s,l);c.cursor=c.start}else{c=o.fromPoints(l,s);c.cursor=c.end}if(c.desiredColumn=r.column,this.selection.inMultiSelectMode){if(t)var h=n.cursor}else this.selection.addRange(n);this.selection.addRange(c),h&&this.selection.substractPoint(h)},this.transposeSelections=function(e){for(var t=this.session,n=t.multiSelect,i=n.ranges,o=i.length;o--;){var r=i[o];if(r.isEmpty()){var s=t.getWordRange(r.start.row,r.start.column);r.start.row=s.start.row,r.start.column=s.start.column,r.end.row=s.end.row,r.end.column=s.end.column}}n.mergeOverlappingRanges();var a=[];for(o=i.length;o--;){r=i[o];a.unshift(t.getTextRange(r))}e<0?a.unshift(a.pop()):a.push(a.shift());for(o=i.length;o--;){r=i[o];var l=r.clone();t.replace(r,a[o]),r.start.row=l.start.row,r.start.column=l.start.column}n.fromOrientedRange(n.ranges[0])},this.selectMore=function(e,t,n){var i=this.session,o=i.multiSelect,r=o.toOrientedRange();if(!r.isEmpty()||(r=i.getWordRange(r.start.row,r.start.column),r.cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),!n)){var s=i.getTextRange(r),a=d(i,s,e);a&&(a.cursor=-1==e?a.start:a.end,this.session.unfold(a),this.multiSelect.addRange(a),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor)}},this.alignCursors=function(){var e=this.session,t=e.multiSelect,n=t.ranges,i=-1,r=n.filter((function(e){if(e.cursor.row==i)return!0;i=e.cursor.row}));if(n.length&&r.length!=n.length-1){r.forEach((function(e){t.substractPoint(e.cursor)}));var s=0,a=1/0,c=n.map((function(t){var n=t.cursor,i=e.getLine(n.row),o=i.substr(n.column).search(/\S/g);return-1==o&&(o=0),n.column>s&&(s=n.column),o<a&&(a=o),o}));n.forEach((function(t,n){var i=t.cursor,r=s-i.column,h=c[n]-a;r>h?e.insert(i,l.stringRepeat(" ",r-h)):e.remove(new o(i.row,i.column,i.row,i.column-r+h)),t.start.column=t.end.column=s,t.start.row=t.end.row=i.row,t.cursor=t.end})),t.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var h=this.selection.getRange(),u=h.start.row,d=h.end.row,p=u==d;if(p){var g,f=this.session.getLength();do{g=this.session.getLine(d)}while(/[=:]/.test(g)&&++d<f);do{g=this.session.getLine(u)}while(/[=:]/.test(g)&&--u>0);u<0&&(u=0),d>=f&&(d=f-1)}var m=this.session.removeFullLines(u,d);m=this.$reAlignText(m,p),this.session.insert({row:u,column:0},m.join("\n")+"\n"),p||(h.start.column=0,h.end.column=m[m.length-1].length),this.selection.setRange(h)}},this.$reAlignText=function(e,t){var n,i,o,r=!0,s=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==n?(n=t[1].length,i=t[2].length,o=t[3].length,t):(n+i+o!=t[1].length+t[2].length+t[3].length&&(s=!1),n!=t[1].length&&(r=!1),n>t[1].length&&(n=t[1].length),i<t[2].length&&(i=t[2].length),o>t[3].length&&(o=t[3].length),t):[e]})).map(t?c:r?s?h:c:u);function a(e){return l.stringRepeat(" ",e)}function c(e){return e[2]?a(n)+e[2]+a(i-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function h(e){return e[2]?a(n+i-e[2].length)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}function u(e){return e[2]?a(n)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(g.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var n=e.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=m,e("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function(e){m(this),e?this.on("mousedown",s):this.off("mousedown",s)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var i=e("../../range").Range,o=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){var i=e.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var o=/\S/,r=e.getLine(t),s=r.search(o);if(-1!=s){var a=n||r.length,l=e.getLength(),c=t,h=t;while(++t<l){var u=e.getLine(t).search(o);if(-1!=u){if(u<=s){var d=e.getTokenAt(t,0);if(!d||"string"!==d.type)break}h=t}}if(h>c){var p=e.getLine(h).length;return new i(c,a,h,p)}}},this.openingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o+1},a=e.$findClosingBracket(t,s,r);if(a){var l=e.foldWidgets[a.row];return null==l&&(l=e.getFoldWidget(a.row)),"start"==l&&a.row>s.row&&(a.row--,a.column=e.getLine(a.row).length),i.fromPoints(s,a)}},this.closingBracketBlock=function(e,t,n,o,r){var s={row:n,column:o},a=e.$findOpeningBracket(t,s);if(a)return a.column++,s.column--,i.fromPoints(a,s)}}).call(o.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],(function(e,t,n){"use strict";var i=e("../line_widgets").LineWidgets,o=e("../lib/dom"),r=e("../range").Range,s=e("../config").nls;function a(e,t,n){var i=0,o=e.length-1;while(i<=o){var r=i+o>>1,s=n(t,e[r]);if(s>0)i=r+1;else{if(!(s<0))return r;o=r-1}}return-(i+1)}function l(e,t,n){var i=e.getAnnotations().sort(r.comparePoints);if(i.length){var o=a(i,{row:t,column:-1},r.comparePoints);o<0&&(o=-o-1),o>=i.length?o=n>0?0:i.length-1:0===o&&n<0&&(o=i.length-1);var s=i[o];if(s&&n){if(s.row===t){do{s=i[o+=n]}while(s&&s.row===t);if(!s)return i.slice()}var l=[];t=s.row;do{l[n<0?"unshift":"push"](s),s=i[o+=n]}while(s&&s.row==t);return l.length&&l}}}t.showErrorMarker=function(e,t){var n=e.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(e));var r=e.getCursorPosition(),a=r.row,c=n.widgetManager.getWidgetsAtRow(a).filter((function(e){return"errorMarker"==e.type}))[0];c?c.destroy():a-=t;var h,u=l(n,a,t);if(u){var d=u[0];r.column=(d.pos&&"number"!=typeof d.column?d.pos.sc:d.column)||0,r.row=d.row,h=e.renderer.$gutterLayer.$annotations[r.row]}else{if(c)return;h={text:[s("Looks good!")],className:"ace_ok"}}e.session.unfold(r.row),e.selection.moveToPosition(r);var p={row:r.row,fixedWidth:!0,coverGutter:!0,el:o.createElement("div"),type:"errorMarker"},g=p.el.appendChild(o.createElement("div")),f=p.el.appendChild(o.createElement("div"));f.className="error_widget_arrow "+h.className;var m=e.renderer.$cursorLayer.getPixelPosition(r).left;f.style.left=m+e.renderer.gutterWidth-5+"px",p.el.className="error_widget_wrapper",g.className="error_widget "+h.className,g.innerHTML=h.text.join("<br>"),g.appendChild(o.createElement("div"));var v=function(e,t,n){if(0===t&&("esc"===n||"return"===n))return p.destroy(),{command:"null"}};p.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(v),n.widgetManager.removeLineWidget(p),e.off("changeSelection",p.destroy),e.off("changeSession",p.destroy),e.off("mouseup",p.destroy),e.off("change",p.destroy))},e.keyBinding.addKeyboardHandler(v),e.on("changeSelection",p.destroy),e.on("changeSession",p.destroy),e.on("mouseup",p.destroy),e.on("change",p.destroy),e.session.widgetManager.addLineWidget(p),p.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:p.el.offsetHeight})},o.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)})),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],(function(e,t,n){"use strict";e("./loader_build")(t);var i=e("./lib/dom"),o=e("./range").Range,r=e("./editor").Editor,s=e("./edit_session").EditSession,a=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),t.config=e("./config"),t.edit=function(e,n){if("string"==typeof e){var o=e;if(e=document.getElementById(o),!e)throw new Error("ace.edit can't find div #"+o)}if(e&&e.env&&e.env.editor instanceof r)return e.env.editor;var s="";if(e&&/input|textarea/i.test(e.tagName)){var a=e;s=a.value,e=i.createElement("pre"),a.parentNode.replaceChild(e,a)}else e&&(s=e.textContent,e.innerHTML="");var c=t.createEditSession(s),h=new r(new l(e),c,n),u={document:c,editor:h,onResize:h.resize.bind(h,null)};return a&&(u.textarea=a),h.on("destroy",(function(){u.editor.container.env=null})),h.container.env=h.env=u,h},t.createEditSession=function(e,t){var n=new s(e,t);return n.setUndoManager(new a),n},t.Range=o,t.Editor=r,t.EditSession=s,t.UndoManager=a,t.VirtualRenderer=l,t.version=t.config.version})),function(){ace.require(["ace/ace"],(function(t){t&&(t.config.init(!0),t.define=ace.define);var n=function(){return this}();for(var i in n||"undefined"==typeof window||(n=window),n||"undefined"==typeof self||(n=self),n.ace||(n.ace=t),t)t.hasOwnProperty(i)&&(n.ace[i]=t[i]);n.ace["default"]=n.ace,e&&(e.exports=n.ace)}))}()},131:(e,t,n)=>{var i;!function(){"use strict";var o={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function r(e){return a(c(e),arguments)}function s(e,t){return r.apply(null,[e].concat(t||[]))}function a(e,t){var n,i,s,a,l,c,h,u,d,p=1,g=e.length,f="";for(i=0;i<g;i++)if("string"===typeof e[i])f+=e[i];else if("object"===typeof e[i]){if(a=e[i],a.keys)for(n=t[p],s=0;s<a.keys.length;s++){if(void 0==n)throw new Error(r('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));n=n[a.keys[s]]}else n=a.param_no?t[a.param_no]:t[p++];if(o.not_type.test(a.type)&&o.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),o.numeric_arg.test(a.type)&&"number"!==typeof n&&isNaN(n))throw new TypeError(r("[sprintf] expecting number but found %T",n));switch(o.number.test(a.type)&&(u=n>=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase();break}o.json.test(a.type)?f+=n:(!o.number.test(a.type)||u&&!a.sign?d="":(d=u?"+":"-",n=n.toString().replace(o.sign,"")),c=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",h=a.width-(d+n).length,l=a.width&&h>0?c.repeat(h):"",f+=a.align?d+n+l:"0"===c?d+l+n:l+d+n)}return f}var l=Object.create(null);function c(e){if(l[e])return l[e];var t,n=e,i=[],r=0;while(n){if(null!==(t=o.text.exec(n)))i.push(t[0]);else if(null!==(t=o.modulo.exec(n)))i.push("%");else{if(null===(t=o.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){r|=1;var s=[],a=t[2],c=[];if(null===(c=o.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1]);while(""!==(a=a.substring(c[0].length)))if(null!==(c=o.key_access.exec(a)))s.push(c[1]);else{if(null===(c=o.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(c[1])}t[2]=s}else r|=2;if(3===r)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return l[e]=i}r,s,"undefined"!==typeof window&&(window["sprintf"]=r,window["vsprintf"]=s,i=function(){return{sprintf:r,vsprintf:s}}.call(t,n,t,e),void 0===i||(e.exports=i))}()},9887:(e,t,n)=>{"use strict";var i=n(6148),o=TypeError;e.exports=function(e,t){if(i(t,e))return e;throw new o("Incorrect invocation")}},2065:e=>{"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},4317:(e,t,n)=>{"use strict";var i,o,r,s=n(2065),a=n(9924),l=n(2150),c=n(688),h=n(5309),u=n(4678),d=n(1566),p=n(3397),g=n(2385),f=n(2470),m=n(9393),v=n(6148),y=n(7610),w=n(4584),b=n(2032),$=n(5736),x=n(7804),C=x.enforce,S=x.get,A=l.Int8Array,k=A&&A.prototype,L=l.Uint8ClampedArray,_=L&&L.prototype,R=A&&y(A),T=k&&y(k),M=Object.prototype,E=l.TypeError,I=b("toStringTag"),O=$("TYPED_ARRAY_TAG"),F="TypedArrayConstructor",D=s&&!!w&&"Opera"!==d(l.opera),N=!1,W={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},B={BigInt64Array:8,BigUint64Array:8},H=function(e){if(!h(e))return!1;var t=d(e);return"DataView"===t||u(W,t)||u(B,t)},P=function(e){var t=y(e);if(h(t)){var n=S(t);return n&&u(n,F)?n[F]:P(t)}},z=function(e){if(!h(e))return!1;var t=d(e);return u(W,t)||u(B,t)},U=function(e){if(z(e))return e;throw new E("Target is not a typed array")},V=function(e){if(c(e)&&(!w||v(R,e)))return e;throw new E(p(e)+" is not a typed array constructor")},j=function(e,t,n,i){if(a){if(n)for(var o in W){var r=l[o];if(r&&u(r.prototype,e))try{delete r.prototype[e]}catch(s){try{r.prototype[e]=t}catch(c){}}}T[e]&&!n||f(T,e,n?t:D&&k[e]||t,i)}},G=function(e,t,n){var i,o;if(a){if(w){if(n)for(i in W)if(o=l[i],o&&u(o,e))try{delete o[e]}catch(r){}if(R[e]&&!n)return;try{return f(R,e,n?t:D&&R[e]||t)}catch(r){}}for(i in W)o=l[i],!o||o[e]&&!n||f(o,e,t)}};for(i in W)o=l[i],r=o&&o.prototype,r?C(r)[F]=o:D=!1;for(i in B)o=l[i],r=o&&o.prototype,r&&(C(r)[F]=o);if((!D||!c(R)||R===Function.prototype)&&(R=function(){throw new E("Incorrect invocation")},D))for(i in W)l[i]&&w(l[i],R);if((!D||!T||T===M)&&(T=R.prototype,D))for(i in W)l[i]&&w(l[i].prototype,T);if(D&&y(_)!==T&&w(_,T),a&&!u(T,I))for(i in N=!0,m(T,I,{configurable:!0,get:function(){return h(this)?this[O]:void 0}}),W)l[i]&&g(l[i],O,i);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:N&&O,aTypedArray:U,aTypedArrayConstructor:V,exportTypedArrayMethod:j,exportTypedArrayStaticMethod:G,getTypedArrayConstructor:P,isView:H,isTypedArray:z,TypedArray:R,TypedArrayPrototype:T}},7454:(e,t,n)=>{"use strict";var i=n(2150),o=n(9668),r=n(9924),s=n(2065),a=n(453),l=n(2385),c=n(9393),h=n(9700),u=n(4694),d=n(9887),p=n(1680),g=n(7331),f=n(5992),m=n(52),v=n(9481),y=n(7610),w=n(4584),b=n(6217).f,$=n(8404),x=n(6403),C=n(7495),S=n(7804),A=a.PROPER,k=a.CONFIGURABLE,L="ArrayBuffer",_="DataView",R="prototype",T="Wrong length",M="Wrong index",E=S.getterFor(L),I=S.getterFor(_),O=S.set,F=i[L],D=F,N=D&&D[R],W=i[_],B=W&&W[R],H=Object.prototype,P=i.Array,z=i.RangeError,U=o($),V=o([].reverse),j=v.pack,G=v.unpack,K=function(e){return[255&e]},Y=function(e){return[255&e,e>>8&255]},q=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Q=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Z=function(e){return j(m(e),23,4)},X=function(e){return j(e,52,8)},J=function(e,t,n){c(e[R],t,{configurable:!0,get:function(){return n(this)[t]}})},ee=function(e,t,n,i){var o=I(e),r=f(n),s=!!i;if(r+t>o.byteLength)throw new z(M);var a=o.bytes,l=r+o.byteOffset,c=x(a,l,l+t);return s?c:V(c)},te=function(e,t,n,i,o,r){var s=I(e),a=f(n),l=i(+o),c=!!r;if(a+t>s.byteLength)throw new z(M);for(var h=s.bytes,u=a+s.byteOffset,d=0;d<t;d++)h[u+d]=l[c?d:t-d-1]};if(s){var ne=A&&F.name!==L;if(u((function(){F(1)}))&&u((function(){new F(-1)}))&&!u((function(){return new F,new F(1.5),new F(NaN),1!==F.length||ne&&!k})))ne&&k&&l(F,"name",L);else{D=function(e){return d(this,N),new F(f(e))},D[R]=N;for(var ie,oe=b(F),re=0;oe.length>re;)(ie=oe[re++])in D||l(D,ie,F[ie]);N.constructor=D}w&&y(B)!==H&&w(B,H);var se=new W(new D(2)),ae=o(B.setInt8);se.setInt8(0,2147483648),se.setInt8(1,2147483649),!se.getInt8(0)&&se.getInt8(1)||h(B,{setInt8:function(e,t){ae(this,e,t<<24>>24)},setUint8:function(e,t){ae(this,e,t<<24>>24)}},{unsafe:!0})}else D=function(e){d(this,N);var t=f(e);O(this,{type:L,bytes:U(P(t),0),byteLength:t}),r||(this.byteLength=t,this.detached=!1)},N=D[R],W=function(e,t,n){d(this,B),d(e,N);var i=E(e),o=i.byteLength,s=p(t);if(s<0||s>o)throw new z("Wrong offset");if(n=void 0===n?o-s:g(n),s+n>o)throw new z(T);O(this,{type:_,buffer:e,byteLength:n,byteOffset:s,bytes:i.bytes}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=s)},B=W[R],r&&(J(D,"byteLength",E),J(W,"buffer",I),J(W,"byteLength",I),J(W,"byteOffset",I)),h(B,{getInt8:function(e){return ee(this,1,e)[0]<<24>>24},getUint8:function(e){return ee(this,1,e)[0]},getInt16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=ee(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return Q(ee(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return Q(ee(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return G(ee(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return G(ee(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){te(this,1,e,K,t)},setUint8:function(e,t){te(this,1,e,K,t)},setInt16:function(e,t){te(this,2,e,Y,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){te(this,2,e,Y,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){te(this,4,e,q,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){te(this,4,e,q,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){te(this,4,e,Z,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){te(this,8,e,X,t,arguments.length>2&&arguments[2])}});C(D,L),C(W,_),e.exports={ArrayBuffer:D,DataView:W}},8404:(e,t,n)=>{"use strict";var i=n(298),o=n(7352),r=n(8344);e.exports=function(e){var t=i(this),n=r(t),s=arguments.length,a=o(s>1?arguments[1]:void 0,n),l=s>2?arguments[2]:void 0,c=void 0===l?n:o(l,n);while(c>a)t[a++]=e;return t}},7895:(e,t,n)=>{"use strict";var i=n(8344);e.exports=function(e,t,n){var o=0,r=arguments.length>2?n:i(t),s=new e(r);while(r>o)s[o]=t[o++];return s}},563:(e,t,n)=>{"use strict";var i=n(4162),o=n(4347),r=n(298),s=n(8344),a=function(e){var t=1===e;return function(n,a,l){var c,h,u=r(n),d=o(u),p=s(d),g=i(a,l);while(p-- >0)if(c=d[p],h=g(c,p,u),h)switch(e){case 0:return c;case 1:return p}return t?-1:void 0}};e.exports={findLast:a(0),findLastIndex:a(1)}},5909:(e,t,n)=>{"use strict";var i=n(4162),o=n(9668),r=n(4347),s=n(298),a=n(8344),l=n(1699),c=o([].push),h=function(e){var t=1===e,n=2===e,o=3===e,h=4===e,u=6===e,d=7===e,p=5===e||u;return function(g,f,m,v){for(var y,w,b=s(g),$=r(b),x=a($),C=i(f,m),S=0,A=v||l,k=t?A(g,x):n||d?A(g,0):void 0;x>S;S++)if((p||S in $)&&(y=$[S],w=C(y,S,b),e))if(t)k[S]=w;else if(w)switch(e){case 3:return!0;case 5:return y;case 6:return S;case 2:c(k,y)}else switch(e){case 4:return!1;case 7:c(k,y)}return u?-1:o||h?h:k}};e.exports={forEach:h(0),map:h(1),filter:h(2),some:h(3),every:h(4),find:h(5),findIndex:h(6),filterReject:h(7)}},6403:(e,t,n)=>{"use strict";var i=n(7352),o=n(8344),r=n(3182),s=Array,a=Math.max;e.exports=function(e,t,n){for(var l=o(e),c=i(t,l),h=i(void 0===n?l:n,l),u=s(a(h-c,0)),d=0;c<h;c++,d++)r(u,d,e[c]);return u.length=d,u}},3097:(e,t,n)=>{"use strict";var i=n(6403),o=Math.floor,r=function(e,t){var n=e.length,l=o(n/2);return n<8?s(e,t):a(e,r(i(e,0,l),t),r(i(e,l),t),t)},s=function(e,t){var n,i,o=e.length,r=1;while(r<o){i=r,n=e[r];while(i&&t(e[i-1],n)>0)e[i]=e[--i];i!==r++&&(e[i]=n)}return e},a=function(e,t,n,i){var o=t.length,r=n.length,s=0,a=0;while(s<o||a<r)e[s+a]=s<o&&a<r?i(t[s],n[a])<=0?t[s++]:n[a++]:s<o?t[s++]:n[a++];return e};e.exports=r},9120:(e,t,n)=>{"use strict";var i=n(256),o=n(1414),r=n(5309),s=n(2032),a=s("species"),l=Array;e.exports=function(e){var t;return i(e)&&(t=e.constructor,o(t)&&(t===l||i(t.prototype))?t=void 0:r(t)&&(t=t[a],null===t&&(t=void 0))),void 0===t?l:t}},1699:(e,t,n)=>{"use strict";var i=n(9120);e.exports=function(e,t){return new(i(e))(0===t?0:t)}},4501:(e,t,n)=>{"use strict";var i=n(8344);e.exports=function(e,t){for(var n=i(e),o=new t(n),r=0;r<n;r++)o[r]=e[n-r-1];return o}},7117:(e,t,n)=>{"use strict";var i=n(8344),o=n(1680),r=RangeError;e.exports=function(e,t,n,s){var a=i(e),l=o(n),c=l<0?a+l:l;if(c>=a||c<0)throw new r("Incorrect index");for(var h=new t(a),u=0;u<a;u++)h[u]=u===c?s:e[u];return h}},4418:(e,t,n)=>{"use strict";var i=n(2032),o=i("iterator"),r=!1;try{var s=0,a={next:function(){return{done:!!s++}},return:function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(l){}e.exports=function(e,t){try{if(!t&&!r)return!1}catch(l){return!1}var n=!1;try{var i={};i[o]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(l){}return n}},3182:(e,t,n)=>{"use strict";var i=n(2358),o=n(2131),r=n(7781);e.exports=function(e,t,n){var s=i(t);s in e?o.f(e,s,r(0,n)):e[s]=n}},9393:(e,t,n)=>{"use strict";var i=n(1135),o=n(2131);e.exports=function(e,t,n){return n.get&&i(n.get,t,{getter:!0}),n.set&&i(n.set,t,{setter:!0}),o.f(e,t,n)}},9700:(e,t,n)=>{"use strict";var i=n(2470);e.exports=function(e,t,n){for(var o in t)i(e,o,t[o],n);return e}},9016:(e,t,n)=>{"use strict";var i=n(1370),o=i.match(/firefox\/(\d+)/i);e.exports=!!o&&+o[1]},821:(e,t,n)=>{"use strict";var i=n(1370);e.exports=/MSIE|Trident/.test(i)},4389:(e,t,n)=>{"use strict";var i=n(1370),o=i.match(/AppleWebKit\/(\d+)\./);e.exports=!!o&&+o[1]},4162:(e,t,n)=>{"use strict";var i=n(5033),o=n(1052),r=n(6398),s=i(i.bind);e.exports=function(e,t){return o(e),void 0===t?e:r?s(e,t):function(){return e.apply(t,arguments)}}},8674:(e,t,n)=>{"use strict";var i=n(1566),o=n(5383),r=n(5268),s=n(8515),a=n(2032),l=a("iterator");e.exports=function(e){if(!r(e))return o(e,l)||o(e,"@@iterator")||s[i(e)]}},4406:(e,t,n)=>{"use strict";var i=n(8724),o=n(1052),r=n(9175),s=n(3397),a=n(8674),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(o(n))return r(i(n,e));throw new l(s(e)+" is not iterable")}},9481:e=>{"use strict";var t=Array,n=Math.abs,i=Math.pow,o=Math.floor,r=Math.log,s=Math.LN2,a=function(e,a,l){var c,h,u,d=t(l),p=8*l-a-1,g=(1<<p)-1,f=g>>1,m=23===a?i(2,-24)-i(2,-77):0,v=e<0||0===e&&1/e<0?1:0,y=0;e=n(e),e!==e||e===1/0?(h=e!==e?1:0,c=g):(c=o(r(e)/s),u=i(2,-c),e*u<1&&(c--,u*=2),e+=c+f>=1?m/u:m*i(2,1-f),e*u>=2&&(c++,u/=2),c+f>=g?(h=0,c=g):c+f>=1?(h=(e*u-1)*i(2,a),c+=f):(h=e*i(2,f-1)*i(2,a),c=0));while(a>=8)d[y++]=255&h,h/=256,a-=8;c=c<<a|h,p+=a;while(p>0)d[y++]=255&c,c/=256,p-=8;return d[--y]|=128*v,d},l=function(e,t){var n,o=e.length,r=8*o-t-1,s=(1<<r)-1,a=s>>1,l=r-7,c=o-1,h=e[c--],u=127&h;h>>=7;while(l>0)u=256*u+e[c--],l-=8;n=u&(1<<-l)-1,u>>=-l,l+=t;while(l>0)n=256*n+e[c--],l-=8;if(0===u)u=1-a;else{if(u===s)return n?NaN:h?-1/0:1/0;n+=i(2,t),u-=a}return(h?-1:1)*n*i(2,u-t)};e.exports={pack:a,unpack:l}},2407:(e,t,n)=>{"use strict";var i=n(2032),o=n(8515),r=i("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[r]===e)}},9232:(e,t,n)=>{"use strict";var i=n(1566);e.exports=function(e){var t=i(e);return"BigInt64Array"===t||"BigUint64Array"===t}},791:(e,t,n)=>{"use strict";var i=n(5309),o=Math.floor;e.exports=Number.isInteger||function(e){return!i(e)&&isFinite(e)&&o(e)===e}},9710:(e,t,n)=>{"use strict";var i=n(5309),o=n(2177),r=n(2032),s=r("match");e.exports=function(e){var t;return i(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===o(e))}},5584:(e,t,n)=>{"use strict";var i=n(1162),o=Math.abs,r=2220446049250313e-31,s=1/r,a=function(e){return e+s-s};e.exports=function(e,t,n,s){var l=+e,c=o(l),h=i(l);if(c<s)return h*a(c/s/t)*s*t;var u=(1+t/r)*c,d=u-(u-c);return d>n||d!==d?h*(1/0):h*d}},52:(e,t,n)=>{"use strict";var i=n(5584),o=1.1920928955078125e-7,r=34028234663852886e22,s=11754943508222875e-54;e.exports=Math.fround||function(e){return i(e,o,r,s)}},1162:e=>{"use strict";e.exports=Math.sign||function(e){var t=+e;return 0===t||t!==t?t:t<0?-1:1}},976:(e,t,n)=>{"use strict";var i=n(8724),o=n(4678),r=n(6148),s=n(7929),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||o(e,"flags")||!r(a,e)?t:i(s,e)}},7278:(e,t,n)=>{"use strict";var i=n(2160),o=n(9393),r=n(2032),s=n(9924),a=r("species");e.exports=function(e){var t=i(e);s&&t&&!t[a]&&o(t,a,{configurable:!0,get:function(){return this}})}},6601:(e,t,n)=>{"use strict";var i=n(1272),o=TypeError;e.exports=function(e){var t=i(e,"number");if("number"==typeof t)throw new o("Can't convert number to bigint");return BigInt(t)}},5992:(e,t,n)=>{"use strict";var i=n(1680),o=n(7331),r=RangeError;e.exports=function(e){if(void 0===e)return 0;var t=i(e),n=o(t);if(t!==n)throw new r("Wrong length or index");return n}},2066:(e,t,n)=>{"use strict";var i=n(6949),o=RangeError;e.exports=function(e,t){var n=i(e);if(n%t)throw new o("Wrong offset");return n}},6949:(e,t,n)=>{"use strict";var i=n(1680),o=RangeError;e.exports=function(e){var t=i(e);if(t<0)throw new o("The argument can't be less than 0");return t}},3164:e=>{"use strict";var t=Math.round;e.exports=function(e){var n=t(e);return n<0?0:n>255?255:255&n}},9082:(e,t,n)=>{"use strict";var i=n(5532),o=n(2150),r=n(8724),s=n(9924),a=n(8087),l=n(4317),c=n(7454),h=n(9887),u=n(7781),d=n(2385),p=n(791),g=n(7331),f=n(5992),m=n(2066),v=n(3164),y=n(2358),w=n(4678),b=n(1566),$=n(5309),x=n(7935),C=n(8536),S=n(6148),A=n(4584),k=n(6217).f,L=n(6897),_=n(5909).forEach,R=n(7278),T=n(9393),M=n(2131),E=n(7537),I=n(7804),O=n(5086),F=I.get,D=I.set,N=I.enforce,W=M.f,B=E.f,H=o.RangeError,P=c.ArrayBuffer,z=P.prototype,U=c.DataView,V=l.NATIVE_ARRAY_BUFFER_VIEWS,j=l.TYPED_ARRAY_TAG,G=l.TypedArray,K=l.TypedArrayPrototype,Y=l.aTypedArrayConstructor,q=l.isTypedArray,Q="BYTES_PER_ELEMENT",Z="Wrong length",X=function(e,t){Y(e);var n=0,i=t.length,o=new e(i);while(i>n)o[n]=t[n++];return o},J=function(e,t){T(e,t,{configurable:!0,get:function(){return F(this)[t]}})},ee=function(e){var t;return S(z,e)||"ArrayBuffer"===(t=b(e))||"SharedArrayBuffer"===t},te=function(e,t){return q(e)&&!x(t)&&t in e&&p(+t)&&t>=0},ne=function(e,t){return t=y(t),te(e,t)?u(2,e[t]):B(e,t)},ie=function(e,t,n){return t=y(t),!(te(e,t)&&$(n)&&w(n,"value"))||w(n,"get")||w(n,"set")||n.configurable||w(n,"writable")&&!n.writable||w(n,"enumerable")&&!n.enumerable?W(e,t,n):(e[t]=n.value,e)};s?(V||(E.f=ne,M.f=ie,J(K,"buffer"),J(K,"byteOffset"),J(K,"byteLength"),J(K,"length")),i({target:"Object",stat:!0,forced:!V},{getOwnPropertyDescriptor:ne,defineProperty:ie}),e.exports=function(e,t,n){var s=e.match(/\d+/)[0]/8,l=e+(n?"Clamped":"")+"Array",c="get"+e,u="set"+e,p=o[l],y=p,w=y&&y.prototype,b={},x=function(e,t){var n=F(e);return n.view[c](t*s+n.byteOffset,!0)},S=function(e,t,i){var o=F(e);o.view[u](t*s+o.byteOffset,n?v(i):i,!0)},T=function(e,t){W(e,t,{get:function(){return x(this,t)},set:function(e){return S(this,t,e)},enumerable:!0})};V?a&&(y=t((function(e,t,n,i){return h(e,w),O(function(){return $(t)?ee(t)?void 0!==i?new p(t,m(n,s),i):void 0!==n?new p(t,m(n,s)):new p(t):q(t)?X(y,t):r(L,y,t):new p(f(t))}(),e,y)})),A&&A(y,G),_(k(p),(function(e){e in y||d(y,e,p[e])})),y.prototype=w):(y=t((function(e,t,n,i){h(e,w);var o,a,l,c=0,u=0;if($(t)){if(!ee(t))return q(t)?X(y,t):r(L,y,t);o=t,u=m(n,s);var d=t.byteLength;if(void 0===i){if(d%s)throw new H(Z);if(a=d-u,a<0)throw new H(Z)}else if(a=g(i)*s,a+u>d)throw new H(Z);l=a/s}else l=f(t),a=l*s,o=new P(a);D(e,{buffer:o,byteOffset:u,byteLength:a,length:l,view:new U(o)});while(c<l)T(e,c++)})),A&&A(y,G),w=y.prototype=C(K)),w.constructor!==y&&d(w,"constructor",y),N(w).TypedArrayConstructor=y,j&&d(w,j,l);var M=y!==p;b[l]=y,i({global:!0,constructor:!0,forced:M,sham:!V},b),Q in y||d(y,Q,s),Q in w||d(w,Q,s),R(l)}):e.exports=function(){}},8087:(e,t,n)=>{"use strict";var i=n(2150),o=n(4694),r=n(4418),s=n(4317).NATIVE_ARRAY_BUFFER_VIEWS,a=i.ArrayBuffer,l=i.Int8Array;e.exports=!s||!o((function(){l(1)}))||!o((function(){new l(-1)}))||!r((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||o((function(){return 1!==new l(new a(2),1,void 0).length}))},6897:(e,t,n)=>{"use strict";var i=n(4162),o=n(8724),r=n(3755),s=n(298),a=n(8344),l=n(4406),c=n(8674),h=n(2407),u=n(9232),d=n(4317).aTypedArrayConstructor,p=n(6601);e.exports=function(e){var t,n,g,f,m,v,y,w,b=r(this),$=s(e),x=arguments.length,C=x>1?arguments[1]:void 0,S=void 0!==C,A=c($);if(A&&!h(A)){y=l($,A),w=y.next,$=[];while(!(v=o(w,y)).done)$.push(v.value)}for(S&&x>2&&(C=i(C,arguments[2])),n=a($),g=new(d(b))(n),f=u(g),t=0;n>t;t++)m=S?C($[t],t):$[t],g[t]=f?p(m):+m;return g}},1979:(e,t,n)=>{"use strict";var i=n(586);i("flatMap")},4597:(e,t,n)=>{"use strict";var i=n(5532),o=n(8724),r=n(9668),s=n(1166),a=n(688),l=n(5268),c=n(9710),h=n(599),u=n(5383),d=n(976),p=n(6889),g=n(2032),f=n(6555),m=g("replace"),v=TypeError,y=r("".indexOf),w=r("".replace),b=r("".slice),$=Math.max,x=function(e,t,n){return n>e.length?-1:""===t?n:y(e,t,n)};i({target:"String",proto:!0},{replaceAll:function(e,t){var n,i,r,g,C,S,A,k,L,_=s(this),R=0,T=0,M="";if(!l(e)){if(n=c(e),n&&(i=h(s(d(e))),!~y(i,"g")))throw new v("`.replaceAll` does not allow non-global regexes");if(r=u(e,m),r)return o(r,e,_,t);if(f&&n)return w(h(_),e,t)}g=h(_),C=h(e),S=a(t),S||(t=h(t)),A=C.length,k=$(1,A),R=x(g,C,0);while(-1!==R)L=S?h(t(C,R,g)):p(C,g,R,[],void 0,t),M+=b(g,T,R)+L,T=R+A,R=x(g,C,R+k);return T<g.length&&(M+=b(g,T)),M}})},7380:(e,t,n)=>{"use strict";var i=n(4317),o=n(8344),r=n(1680),s=i.aTypedArray,a=i.exportTypedArrayMethod;a("at",(function(e){var t=s(this),n=o(t),i=r(e),a=i>=0?i:n+i;return a<0||a>=n?void 0:t[a]}))},527:(e,t,n)=>{"use strict";var i=n(4317),o=n(8404),r=n(6601),s=n(1566),a=n(8724),l=n(9668),c=n(4694),h=i.aTypedArray,u=i.exportTypedArrayMethod,d=l("".slice),p=c((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e}));u("fill",(function(e){var t=arguments.length;h(this);var n="Big"===d(s(this),0,3)?r(e):+e;return a(o,this,n,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),p)},9394:(e,t,n)=>{"use strict";var i=n(4317),o=n(563).findLastIndex,r=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLastIndex",(function(e){return o(r(this),e,arguments.length>1?arguments[1]:void 0)}))},1697:(e,t,n)=>{"use strict";var i=n(4317),o=n(563).findLast,r=i.aTypedArray,s=i.exportTypedArrayMethod;s("findLast",(function(e){return o(r(this),e,arguments.length>1?arguments[1]:void 0)}))},3438:(e,t,n)=>{"use strict";var i=n(2150),o=n(8724),r=n(4317),s=n(8344),a=n(2066),l=n(298),c=n(4694),h=i.RangeError,u=i.Int8Array,d=u&&u.prototype,p=d&&d.set,g=r.aTypedArray,f=r.exportTypedArrayMethod,m=!c((function(){var e=new Uint8ClampedArray(2);return o(p,e,{length:1,0:3},1),3!==e[1]})),v=m&&r.NATIVE_ARRAY_BUFFER_VIEWS&&c((function(){var e=new u(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));f("set",(function(e){g(this);var t=a(arguments.length>1?arguments[1]:void 0,1),n=l(e);if(m)return o(p,this,n,t);var i=this.length,r=s(n),c=0;if(r+t>i)throw new h("Wrong length");while(c<r)this[t+c]=n[c++]}),!m||v)},3616:(e,t,n)=>{"use strict";var i=n(2150),o=n(5033),r=n(4694),s=n(1052),a=n(3097),l=n(4317),c=n(9016),h=n(821),u=n(7067),d=n(4389),p=l.aTypedArray,g=l.exportTypedArrayMethod,f=i.Uint16Array,m=f&&o(f.prototype.sort),v=!!m&&!(r((function(){m(new f(2),null)}))&&r((function(){m(new f(2),{})}))),y=!!m&&!r((function(){if(u)return u<74;if(c)return c<67;if(h)return!0;if(d)return d<602;var e,t,n=new f(516),i=Array(516);for(e=0;e<516;e++)t=e%4,n[e]=515-e,i[e]=e-2*t+3;for(m(n,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(n[e]!==i[e])return!0})),w=function(e){return function(t,n){return void 0!==e?+e(t,n)||0:n!==n?-1:t!==t?1:0===t&&0===n?1/t>0&&1/n<0?1:-1:t>n}};g("sort",(function(e){return void 0!==e&&s(e),y?m(this,e):a(p(this),w(e))}),!y||v)},5630:(e,t,n)=>{"use strict";var i=n(4501),o=n(4317),r=o.aTypedArray,s=o.exportTypedArrayMethod,a=o.getTypedArrayConstructor;s("toReversed",(function(){return i(r(this),a(this))}))},896:(e,t,n)=>{"use strict";var i=n(4317),o=n(9668),r=n(1052),s=n(7895),a=i.aTypedArray,l=i.getTypedArrayConstructor,c=i.exportTypedArrayMethod,h=o(i.TypedArrayPrototype.sort);c("toSorted",(function(e){void 0!==e&&r(e);var t=a(this),n=s(l(t),t);return h(n,e)}))},5984:(e,t,n)=>{"use strict";var i=n(9082);i("Uint8",(function(e){return function(t,n,i){return e(this,t,n,i)}}))},4139:(e,t,n)=>{"use strict";var i=n(7117),o=n(4317),r=n(9232),s=n(1680),a=n(6601),l=o.aTypedArray,c=o.getTypedArrayConstructor,h=o.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();h("with",{with:function(e,t){var n=l(this),o=s(e),h=r(n)?a(t):+t;return i(n,c(n),o,h)}}["with"],!u)},162:(e,t,n)=>{"use strict";n.d(t,{Z:()=>zt});var i={};function o(e,t){return function(){return e.apply(t,arguments)}}n.r(i),n.d(i,{hasBrowserEnv:()=>Ee,hasStandardBrowserEnv:()=>Ie,hasStandardBrowserWebWorkerEnv:()=>Oe});const{toString:r}=Object.prototype,{getPrototypeOf:s}=Object,a=(e=>t=>{const n=r.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),l=e=>(e=e.toLowerCase(),t=>a(t)===e),c=e=>t=>typeof t===e,{isArray:h}=Array,u=c("undefined");function d(e){return null!==e&&!u(e)&&null!==e.constructor&&!u(e.constructor)&&m(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const p=l("ArrayBuffer");function g(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t}const f=c("string"),m=c("function"),v=c("number"),y=e=>null!==e&&"object"===typeof e,w=e=>!0===e||!1===e,b=e=>{if("object"!==a(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},$=l("Date"),x=l("File"),C=l("Blob"),S=l("FileList"),A=e=>y(e)&&m(e.pipe),k=e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||m(e.append)&&("formdata"===(t=a(e))||"object"===t&&m(e.toString)&&"[object FormData]"===e.toString()))},L=l("URLSearchParams"),_=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function R(e,t,{allOwnKeys:n=!1}={}){if(null===e||"undefined"===typeof e)return;let i,o;if("object"!==typeof e&&(e=[e]),h(e))for(i=0,o=e.length;i<o;i++)t.call(null,e[i],i,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),r=o.length;let s;for(i=0;i<r;i++)s=o[i],t.call(null,e[s],s,e)}}function T(e,t){t=t.toLowerCase();const n=Object.keys(e);let i,o=n.length;while(o-- >0)if(i=n[o],t===i.toLowerCase())return i;return null}const M=(()=>"undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:global)(),E=e=>!u(e)&&e!==M;function I(){const{caseless:e}=E(this)&&this||{},t={},n=(n,i)=>{const o=e&&T(t,i)||i;b(t[o])&&b(n)?t[o]=I(t[o],n):b(n)?t[o]=I({},n):h(n)?t[o]=n.slice():t[o]=n};for(let i=0,o=arguments.length;i<o;i++)arguments[i]&&R(arguments[i],n);return t}const O=(e,t,n,{allOwnKeys:i}={})=>(R(t,((t,i)=>{n&&m(t)?e[i]=o(t,n):e[i]=t}),{allOwnKeys:i}),e),F=e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),D=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},N=(e,t,n,i)=>{let o,r,a;const l={};if(t=t||{},null==e)return t;do{o=Object.getOwnPropertyNames(e),r=o.length;while(r-- >0)a=o[r],i&&!i(a,e,t)||l[a]||(t[a]=e[a],l[a]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},W=(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return-1!==i&&i===n},B=e=>{if(!e)return null;if(h(e))return e;let t=e.length;if(!v(t))return null;const n=new Array(t);while(t-- >0)n[t]=e[t];return n},H=(e=>t=>e&&t instanceof e)("undefined"!==typeof Uint8Array&&s(Uint8Array)),P=(e,t)=>{const n=e&&e[Symbol.iterator],i=n.call(e);let o;while((o=i.next())&&!o.done){const n=o.value;t.call(e,n[0],n[1])}},z=(e,t)=>{let n;const i=[];while(null!==(n=e.exec(t)))i.push(n);return i},U=l("HTMLFormElement"),V=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),j=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),G=l("RegExp"),K=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};R(n,((n,o)=>{let r;!1!==(r=t(n,o,e))&&(i[o]=r||n)})),Object.defineProperties(e,i)},Y=e=>{K(e,((t,n)=>{if(m(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const i=e[n];m(i)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},q=(e,t)=>{const n={},i=e=>{e.forEach((e=>{n[e]=!0}))};return h(e)?i(e):i(String(e).split(t)),n},Q=()=>{},Z=(e,t)=>(e=+e,Number.isFinite(e)?e:t),X="abcdefghijklmnopqrstuvwxyz",J="0123456789",ee={DIGIT:J,ALPHA:X,ALPHA_DIGIT:X+X.toUpperCase()+J},te=(e=16,t=ee.ALPHA_DIGIT)=>{let n="";const{length:i}=t;while(e--)n+=t[Math.random()*i|0];return n};function ne(e){return!!(e&&m(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])}const ie=e=>{const t=new Array(10),n=(e,i)=>{if(y(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[i]=e;const o=h(e)?[]:{};return R(e,((e,t)=>{const r=n(e,i+1);!u(r)&&(o[t]=r)})),t[i]=void 0,o}}return e};return n(e,0)},oe=l("AsyncFunction"),re=e=>e&&(y(e)||m(e))&&m(e.then)&&m(e.catch),se={isArray:h,isArrayBuffer:p,isBuffer:d,isFormData:k,isArrayBufferView:g,isString:f,isNumber:v,isBoolean:w,isObject:y,isPlainObject:b,isUndefined:u,isDate:$,isFile:x,isBlob:C,isRegExp:G,isFunction:m,isStream:A,isURLSearchParams:L,isTypedArray:H,isFileList:S,forEach:R,merge:I,extend:O,trim:_,stripBOM:F,inherits:D,toFlatObject:N,kindOf:a,kindOfTest:l,endsWith:W,toArray:B,forEachEntry:P,matchAll:z,isHTMLForm:U,hasOwnProperty:j,hasOwnProp:j,reduceDescriptors:K,freezeMethods:Y,toObjectSet:q,toCamelCase:V,noop:Q,toFiniteNumber:Z,findKey:T,global:M,isContextDefined:E,ALPHABET:ee,generateString:te,isSpecCompliantForm:ne,toJSONObject:ie,isAsyncFn:oe,isThenable:re};function ae(e,t,n,i,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),o&&(this.response=o)}se.inherits(ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:se.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const le=ae.prototype,ce={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((e=>{ce[e]={value:e}})),Object.defineProperties(ae,ce),Object.defineProperty(le,"isAxiosError",{value:!0}),ae.from=(e,t,n,i,o,r)=>{const s=Object.create(le);return se.toFlatObject(e,s,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),ae.call(s,e.message,t,n,i,o),s.cause=e,s.name=e.name,r&&Object.assign(s,r),s};const he=ae,ue=null;function de(e){return se.isPlainObject(e)||se.isArray(e)}function pe(e){return se.endsWith(e,"[]")?e.slice(0,-2):e}function ge(e,t,n){return e?e.concat(t).map((function(e,t){return e=pe(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}function fe(e){return se.isArray(e)&&!e.some(de)}const me=se.toFlatObject(se,{},null,(function(e){return/^is[A-Z]/.test(e)}));function ve(e,t,n){if(!se.isObject(e))throw new TypeError("target must be an object");t=t||new(ue||FormData),n=se.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!se.isUndefined(t[e])}));const i=n.metaTokens,o=n.visitor||h,r=n.dots,s=n.indexes,a=n.Blob||"undefined"!==typeof Blob&&Blob,l=a&&se.isSpecCompliantForm(t);if(!se.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(se.isDate(e))return e.toISOString();if(!l&&se.isBlob(e))throw new he("Blob is not supported. Use a Buffer instead.");return se.isArrayBuffer(e)||se.isTypedArray(e)?l&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function h(e,n,o){let a=e;if(e&&!o&&"object"===typeof e)if(se.endsWith(n,"{}"))n=i?n:n.slice(0,-2),e=JSON.stringify(e);else if(se.isArray(e)&&fe(e)||(se.isFileList(e)||se.endsWith(n,"[]"))&&(a=se.toArray(e)))return n=pe(n),a.forEach((function(e,i){!se.isUndefined(e)&&null!==e&&t.append(!0===s?ge([n],i,r):null===s?n:n+"[]",c(e))})),!1;return!!de(e)||(t.append(ge(o,n,r),c(e)),!1)}const u=[],d=Object.assign(me,{defaultVisitor:h,convertValue:c,isVisitable:de});function p(e,n){if(!se.isUndefined(e)){if(-1!==u.indexOf(e))throw Error("Circular reference detected in "+n.join("."));u.push(e),se.forEach(e,(function(e,i){const r=!(se.isUndefined(e)||null===e)&&o.call(t,e,se.isString(i)?i.trim():i,n,d);!0===r&&p(e,n?n.concat(i):[i])})),u.pop()}}if(!se.isObject(e))throw new TypeError("data must be an object");return p(e),t}const ye=ve;function we(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function be(e,t){this._pairs=[],e&&ye(e,this,t)}const $e=be.prototype;$e.append=function(e,t){this._pairs.push([e,t])},$e.toString=function(e){const t=e?function(t){return e.call(this,t,we)}:we;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};const xe=be;function Ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Se(e,t,n){if(!t)return e;const i=n&&n.encode||Ce,o=n&&n.serialize;let r;if(r=o?o(t,n):se.isURLSearchParams(t)?t.toString():new xe(t,n).toString(i),r){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+r}return e}class Ae{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){se.forEach(this.handlers,(function(t){null!==t&&e(t)}))}}const ke=Ae,Le={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},_e="undefined"!==typeof URLSearchParams?URLSearchParams:xe,Re="undefined"!==typeof FormData?FormData:null,Te="undefined"!==typeof Blob?Blob:null,Me={isBrowser:!0,classes:{URLSearchParams:_e,FormData:Re,Blob:Te},protocols:["http","https","file","blob","url","data"]},Ee="undefined"!==typeof window&&"undefined"!==typeof document,Ie=(e=>Ee&&["ReactNative","NativeScript","NS"].indexOf(e)<0)("undefined"!==typeof navigator&&navigator.product),Oe=(()=>"undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts)(),Fe={...i,...Me};function De(e,t){return ye(e,new Fe.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,i){return Fe.isNode&&se.isBuffer(e)?(this.append(t,e.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Ne(e){return se.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}function We(e){const t={},n=Object.keys(e);let i;const o=n.length;let r;for(i=0;i<o;i++)r=n[i],t[r]=e[r];return t}function Be(e){function t(e,n,i,o){let r=e[o++];const s=Number.isFinite(+r),a=o>=e.length;if(r=!r&&se.isArray(i)?i.length:r,a)return se.hasOwnProp(i,r)?i[r]=[i[r],n]:i[r]=n,!s;i[r]&&se.isObject(i[r])||(i[r]=[]);const l=t(e,n,i[r],o);return l&&se.isArray(i[r])&&(i[r]=We(i[r])),!s}if(se.isFormData(e)&&se.isFunction(e.entries)){const n={};return se.forEachEntry(e,((e,i)=>{t(Ne(e),i,n,0)})),n}return null}const He=Be;function Pe(e,t,n){if(se.isString(e))try{return(t||JSON.parse)(e),se.trim(e)}catch(i){if("SyntaxError"!==i.name)throw i}return(n||JSON.stringify)(e)}const ze={transitional:Le,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",i=n.indexOf("application/json")>-1,o=se.isObject(e);o&&se.isHTMLForm(e)&&(e=new FormData(e));const r=se.isFormData(e);if(r)return i&&i?JSON.stringify(He(e)):e;if(se.isArrayBuffer(e)||se.isBuffer(e)||se.isStream(e)||se.isFile(e)||se.isBlob(e))return e;if(se.isArrayBufferView(e))return e.buffer;if(se.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return De(e,this.formSerializer).toString();if((s=se.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return ye(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||i?(t.setContentType("application/json",!1),Pe(e)):e}],transformResponse:[function(e){const t=this.transitional||ze.transitional,n=t&&t.forcedJSONParsing,i="json"===this.responseType;if(e&&se.isString(e)&&(n&&!this.responseType||i)){const n=t&&t.silentJSONParsing,r=!n&&i;try{return JSON.parse(e)}catch(o){if(r){if("SyntaxError"===o.name)throw he.from(o,he.ERR_BAD_RESPONSE,this,null,this.response);throw o}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Fe.classes.FormData,Blob:Fe.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};se.forEach(["delete","get","head","post","put","patch"],(e=>{ze.headers[e]={}}));const Ue=ze,Ve=se.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),je=e=>{const t={};let n,i,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),i=e.substring(o+1).trim(),!n||t[n]&&Ve[n]||("set-cookie"===n?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)})),t},Ge=Symbol("internals");function Ke(e){return e&&String(e).trim().toLowerCase()}function Ye(e){return!1===e||null==e?e:se.isArray(e)?e.map(Ye):String(e)}function qe(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;while(i=n.exec(e))t[i[1]]=i[2];return t}const Qe=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ze(e,t,n,i,o){return se.isFunction(i)?i.call(this,t,n):(o&&(t=n),se.isString(t)?se.isString(i)?-1!==t.indexOf(i):se.isRegExp(i)?i.test(t):void 0:void 0)}function Xe(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}function Je(e,t){const n=se.toCamelCase(" "+t);["get","set","has"].forEach((i=>{Object.defineProperty(e,i+n,{value:function(e,n,o){return this[i].call(this,t,e,n,o)},configurable:!0})}))}class et{constructor(e){e&&this.set(e)}set(e,t,n){const i=this;function o(e,t,n){const o=Ke(t);if(!o)throw new Error("header name must be a non-empty string");const r=se.findKey(i,o);(!r||void 0===i[r]||!0===n||void 0===n&&!1!==i[r])&&(i[r||t]=Ye(e))}const r=(e,t)=>se.forEach(e,((e,n)=>o(e,n,t)));return se.isPlainObject(e)||e instanceof this.constructor?r(e,t):se.isString(e)&&(e=e.trim())&&!Qe(e)?r(je(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=Ke(e),e){const n=se.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return qe(e);if(se.isFunction(t))return t.call(this,e,n);if(se.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Ke(e),e){const n=se.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ze(this,this[n],n,t))}return!1}delete(e,t){const n=this;let i=!1;function o(e){if(e=Ke(e),e){const o=se.findKey(n,e);!o||t&&!Ze(n,n[o],o,t)||(delete n[o],i=!0)}}return se.isArray(e)?e.forEach(o):o(e),i}clear(e){const t=Object.keys(this);let n=t.length,i=!1;while(n--){const o=t[n];e&&!Ze(this,this[o],o,e,!0)||(delete this[o],i=!0)}return i}normalize(e){const t=this,n={};return se.forEach(this,((i,o)=>{const r=se.findKey(n,o);if(r)return t[r]=Ye(i),void delete t[o];const s=e?Xe(o):String(o).trim();s!==o&&delete t[o],t[s]=Ye(i),n[s]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return se.forEach(this,((n,i)=>{null!=n&&!1!==n&&(t[i]=e&&se.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=this[Ge]=this[Ge]={accessors:{}},n=t.accessors,i=this.prototype;function o(e){const t=Ke(e);n[t]||(Je(i,e),n[t]=!0)}return se.isArray(e)?e.forEach(o):o(e),this}}et.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),se.reduceDescriptors(et.prototype,(({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}})),se.freezeMethods(et);const tt=et;function nt(e,t){const n=this||Ue,i=t||n,o=tt.from(i.headers);let r=i.data;return se.forEach(e,(function(e){r=e.call(n,r,o.normalize(),t?t.status:void 0)})),o.normalize(),r}function it(e){return!(!e||!e.__CANCEL__)}function ot(e,t,n){he.call(this,null==e?"canceled":e,he.ERR_CANCELED,t,n),this.name="CanceledError"}se.inherits(ot,he,{__CANCEL__:!0});const rt=ot;function st(e,t,n){const i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new he("Request failed with status code "+n.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const at=Fe.hasStandardBrowserEnv?{write(e,t,n,i,o,r){const s=[e+"="+encodeURIComponent(t)];se.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),se.isString(i)&&s.push("path="+i),se.isString(o)&&s.push("domain="+o),!0===r&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function lt(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ct(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function ht(e,t){return e&&!lt(t)?ct(e,t):t}const ut=Fe.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function i(n){let i=n;return e&&(t.setAttribute("href",i),i=t.href),t.setAttribute("href",i),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(e){const t=se.isString(e)?i(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return function(){return!0}}();function dt(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function pt(e,t){e=e||10;const n=new Array(e),i=new Array(e);let o,r=0,s=0;return t=void 0!==t?t:1e3,function(a){const l=Date.now(),c=i[s];o||(o=l),n[r]=a,i[r]=l;let h=s,u=0;while(h!==r)u+=n[h++],h%=e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),l-o<t)return;const d=c&&l-c;return d?Math.round(1e3*u/d):void 0}}const gt=pt;function ft(e,t){let n=0;const i=gt(50,250);return o=>{const r=o.loaded,s=o.lengthComputable?o.total:void 0,a=r-n,l=i(a),c=r<=s;n=r;const h={loaded:r,total:s,progress:s?r/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-r)/l:void 0,event:o};h[t?"download":"upload"]=!0,e(h)}}const mt="undefined"!==typeof XMLHttpRequest,vt=mt&&function(e){return new Promise((function(t,n){let i=e.data;const o=tt.from(e.headers).normalize();let r,s,{responseType:a,withXSRFToken:l}=e;function c(){e.cancelToken&&e.cancelToken.unsubscribe(r),e.signal&&e.signal.removeEventListener("abort",r)}if(se.isFormData(i))if(Fe.hasStandardBrowserEnv||Fe.hasStandardBrowserWebWorkerEnv)o.setContentType(!1);else if(!1!==(s=o.getContentType())){const[e,...t]=s?s.split(";").map((e=>e.trim())).filter(Boolean):[];o.setContentType([e||"multipart/form-data",...t].join("; "))}let h=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const u=ht(e.baseURL,e.url);function d(){if(!h)return;const i=tt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),o=a&&"text"!==a&&"json"!==a?h.response:h.responseText,r={data:o,status:h.status,statusText:h.statusText,headers:i,config:e,request:h};st((function(e){t(e),c()}),(function(e){n(e),c()}),r),h=null}if(h.open(e.method.toUpperCase(),Se(u,e.params,e.paramsSerializer),!0),h.timeout=e.timeout,"onloadend"in h?h.onloadend=d:h.onreadystatechange=function(){h&&4===h.readyState&&(0!==h.status||h.responseURL&&0===h.responseURL.indexOf("file:"))&&setTimeout(d)},h.onabort=function(){h&&(n(new he("Request aborted",he.ECONNABORTED,e,h)),h=null)},h.onerror=function(){n(new he("Network Error",he.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const i=e.transitional||Le;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new he(t,i.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,h)),h=null},Fe.hasStandardBrowserEnv&&(l&&se.isFunction(l)&&(l=l(e)),l||!1!==l&&ut(u))){const t=e.xsrfHeaderName&&e.xsrfCookieName&&at.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===i&&o.setContentType(null),"setRequestHeader"in h&&se.forEach(o.toJSON(),(function(e,t){h.setRequestHeader(t,e)})),se.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),a&&"json"!==a&&(h.responseType=e.responseType),"function"===typeof e.onDownloadProgress&&h.addEventListener("progress",ft(e.onDownloadProgress,!0)),"function"===typeof e.onUploadProgress&&h.upload&&h.upload.addEventListener("progress",ft(e.onUploadProgress)),(e.cancelToken||e.signal)&&(r=t=>{h&&(n(!t||t.type?new rt(null,e,h):t),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(r),e.signal&&(e.signal.aborted?r():e.signal.addEventListener("abort",r)));const p=dt(u);p&&-1===Fe.protocols.indexOf(p)?n(new he("Unsupported protocol "+p+":",he.ERR_BAD_REQUEST,e)):h.send(i||null)}))},yt={http:ue,xhr:vt};se.forEach(yt,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}}));const wt=e=>`- ${e}`,bt=e=>se.isFunction(e)||null===e||!1===e,$t={getAdapter:e=>{e=se.isArray(e)?e:[e];const{length:t}=e;let n,i;const o={};for(let r=0;r<t;r++){let t;if(n=e[r],i=n,!bt(n)&&(i=yt[(t=String(n)).toLowerCase()],void 0===i))throw new he(`Unknown adapter '${t}'`);if(i)break;o[t||"#"+r]=i}if(!i){const e=Object.entries(o).map((([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build")));let n=t?e.length>1?"since :\n"+e.map(wt).join("\n"):" "+wt(e[0]):"as no adapter specified";throw new he("There is no suitable adapter to dispatch the request "+n,"ERR_NOT_SUPPORT")}return i},adapters:yt};function xt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new rt(null,e)}function Ct(e){xt(e),e.headers=tt.from(e.headers),e.data=nt.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);const t=$t.getAdapter(e.adapter||Ue.adapter);return t(e).then((function(t){return xt(e),t.data=nt.call(e,e.transformResponse,t),t.headers=tt.from(t.headers),t}),(function(t){return it(t)||(xt(e),t&&t.response&&(t.response.data=nt.call(e,e.transformResponse,t.response),t.response.headers=tt.from(t.response.headers))),Promise.reject(t)}))}const St=e=>e instanceof tt?e.toJSON():e;function At(e,t){t=t||{};const n={};function i(e,t,n){return se.isPlainObject(e)&&se.isPlainObject(t)?se.merge.call({caseless:n},e,t):se.isPlainObject(t)?se.merge({},t):se.isArray(t)?t.slice():t}function o(e,t,n){return se.isUndefined(t)?se.isUndefined(e)?void 0:i(void 0,e,n):i(e,t,n)}function r(e,t){if(!se.isUndefined(t))return i(void 0,t)}function s(e,t){return se.isUndefined(t)?se.isUndefined(e)?void 0:i(void 0,e):i(void 0,t)}function a(n,o,r){return r in t?i(n,o):r in e?i(void 0,n):void 0}const l={url:r,method:r,data:r,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t)=>o(St(e),St(t),!0)};return se.forEach(Object.keys(Object.assign({},e,t)),(function(i){const r=l[i]||o,s=r(e[i],t[i],i);se.isUndefined(s)&&r!==a||(n[i]=s)})),n}const kt="1.6.2",Lt={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Lt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const _t={};function Rt(e,t,n){if("object"!==typeof e)throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let o=i.length;while(o-- >0){const r=i[o],s=t[r];if(s){const t=e[r],n=void 0===t||s(t,r,e);if(!0!==n)throw new he("option "+r+" must be "+n,he.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new he("Unknown option "+r,he.ERR_BAD_OPTION)}}Lt.transitional=function(e,t,n){function i(e,t){return"[Axios v"+kt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,r)=>{if(!1===e)throw new he(i(o," has been removed"+(t?" in "+t:"")),he.ERR_DEPRECATED);return t&&!_t[o]&&(_t[o]=!0,console.warn(i(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,r)}};const Tt={assertOptions:Rt,validators:Lt},Mt=Tt.validators;class Et{constructor(e){this.defaults=e,this.interceptors={request:new ke,response:new ke}}request(e,t){"string"===typeof e?(t=t||{},t.url=e):t=e||{},t=At(this.defaults,t);const{transitional:n,paramsSerializer:i,headers:o}=t;void 0!==n&&Tt.assertOptions(n,{silentJSONParsing:Mt.transitional(Mt.boolean),forcedJSONParsing:Mt.transitional(Mt.boolean),clarifyTimeoutError:Mt.transitional(Mt.boolean)},!1),null!=i&&(se.isFunction(i)?t.paramsSerializer={serialize:i}:Tt.assertOptions(i,{encode:Mt.function,serialize:Mt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let r=o&&se.merge(o.common,o[t.method]);o&&se.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=tt.concat(r,o);const s=[];let a=!0;this.interceptors.request.forEach((function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let h,u=0;if(!a){const e=[Ct.bind(this),void 0];e.unshift.apply(e,s),e.push.apply(e,l),h=e.length,c=Promise.resolve(t);while(u<h)c=c.then(e[u++],e[u++]);return c}h=s.length;let d=t;u=0;while(u<h){const e=s[u++],t=s[u++];try{d=e(d)}catch(p){t.call(this,p);break}}try{c=Ct.call(this,d)}catch(p){return Promise.reject(p)}u=0,h=l.length;while(u<h)c=c.then(l[u++],l[u++]);return c}getUri(e){e=At(this.defaults,e);const t=ht(e.baseURL,e.url);return Se(t,e.params,e.paramsSerializer)}}se.forEach(["delete","get","head","options"],(function(e){Et.prototype[e]=function(t,n){return this.request(At(n||{},{method:e,url:t,data:(n||{}).data}))}})),se.forEach(["post","put","patch"],(function(e){function t(t){return function(n,i,o){return this.request(At(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:i}))}}Et.prototype[e]=t(),Et.prototype[e+"Form"]=t(!0)}));const It=Et;class Ot{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;while(t-- >0)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const i=new Promise((e=>{n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},e((function(e,i,o){n.reason||(n.reason=new rt(e,i,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;const t=new Ot((function(t){e=t}));return{token:t,cancel:e}}}const Ft=Ot;function Dt(e){return function(t){return e.apply(null,t)}}function Nt(e){return se.isObject(e)&&!0===e.isAxiosError}const Wt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Wt).forEach((([e,t])=>{Wt[t]=e}));const Bt=Wt;function Ht(e){const t=new It(e),n=o(It.prototype.request,t);return se.extend(n,It.prototype,t,{allOwnKeys:!0}),se.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return Ht(At(e,t))},n}const Pt=Ht(Ue);Pt.Axios=It,Pt.CanceledError=rt,Pt.CancelToken=Ft,Pt.isCancel=it,Pt.VERSION=kt,Pt.toFormData=ye,Pt.AxiosError=he,Pt.Cancel=Pt.CanceledError,Pt.all=function(e){return Promise.all(e)},Pt.spread=Dt,Pt.isAxiosError=Nt,Pt.mergeConfig=At,Pt.AxiosHeaders=tt,Pt.formToJSON=e=>He(se.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=$t.getAdapter,Pt.HttpStatusCode=Bt,Pt.default=Pt;const zt=Pt}}]);
41
- //# sourceMappingURL=398.js.map