rails_execution 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1 @@
1
+ (function(){var o,r,l,s,c,e,t,n=function(){return this}();n||"undefined"==typeof window||(n=window),"undefined"==typeof requirejs&&((o=function(e,t,n){"string"!=typeof e?o.original?o.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(2==arguments.length&&(n=t),o.modules[e]||(o.payloads[e]=n,o.modules[e]=null))}).modules={},o.payloads={},r=function(e,t,n){if("string"==typeof t){var i=c(e,t);if(null!=i)return n&&n(),i}else if("[object Array]"===Object.prototype.toString.call(t)){for(var o=[],r=0,s=t.length;r<s;++r){var a=c(e,t[r]);if(null==a&&l.original)return;o.push(a)}return n&&n.apply(null,o)||!0}},l=function(e,t){var n=r("",e,t);return null==n&&l.original?l.original.apply(this,arguments):n},s=function(e,t){var n;if(-1!==t.indexOf("!"))return n=t.split("!"),s(e,n[0])+"!"+s(e,n[1]);if("."==t.charAt(0))for(t=e.split("/").slice(0,-1).join("/")+"/"+t;-1!==t.indexOf(".")&&i!=t;){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}return t},c=function(e,n){n=s(e,n);var t,i,e=o.modules[n];return e||("function"==typeof(e=o.payloads[n])&&(t={id:n,uri:"",exports:i={},packaged:!0},i=e(function(e,t){return r(n,e,t)},i,t)||t.exports,o.modules[n]=i,delete o.payloads[n]),e=o.modules[n]=i||e),e},t=n,(e="")&&(n[e]||(n[e]={}),t=n[e]),t.define&&t.define.packaged||(o.original=t.define,t.define=o,t.define.packaged=!0),t.require&&t.require.packaged||(l.original=t.require,t.require=l,t.require.packaged=!0))})(),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 this.lastIndexOf(e,t=t||0)===t}),String.prototype.endsWith||i(String.prototype,"endsWith",function(e,t){var n=this,n=((void 0===t||t>n.length)&&(t=n.length),t-=e.length,n.indexOf(e,t));return-1!==n&&n===t}),String.prototype.repeat||i(String.prototype,"repeat",function(e){for(var t="",n=this;0<e;)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(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];null!=i&&Object.keys(i).forEach(function(e){t[e]=i[e]})}return t}),Object.values||(Object.values=function(t){return Object.keys(t).map(function(e){return t[e]})}),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){for(var t=this.length>>>0,n=arguments[1]>>0,i=n<0?Math.max(t+n,0):Math.min(n,t),n=arguments[2],n=void 0===n?t:n>>0,o=n<0?Math.max(t+n,0):Math.min(n,t);i<o;)this[i]=e,i++;return this}),Array.of||i(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(e,t,n){"use strict";e("./es6-shim")}),define("ace/lib/deep_copy",["require","exports","module"],function(e,t,n){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++)n[i]=e(t[i]);return n}if("[object Object]"!==Object.prototype.toString.call(t))return t;for(i in n={},t)n[i]=e(t[i]);return n}}),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){for(var n="";0<t;)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,n={};for(t in e)n[t]=e[t];return n},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,n=Object.create(null);for(t in e)n[t]=e[t];return n},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){function t(){i=null,e()}function n(e){return n.cancel(),i=setTimeout(t,e||0),n}var i=null;return(n.schedule=n).call=function(){return this.cancel(),e(),n},n.cancel=function(){return clearTimeout(i),i=null,n},n.isPending=function(){return i},n},t.delayedCall=function(e,t){function n(){o=null,e()}function i(e){null==o&&(o=setTimeout(n,e||t))}var o=null;return i.delay=function(e){o&&clearTimeout(o),o=setTimeout(n,e||t)},(i.schedule=i).call=function(){this.cancel(),e()},i.cancel=function(){o&&clearTimeout(o),o=null},i.isPending=function(){return o},i},t.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(e){return!1}return!0},t.skipEmptyMatch=function(e,t,n){return n&&65535<e.codePointAt(t)?2:1}}),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||"",i=i.appName||"";t.isWin="win"==o,t.isMac="mac"==o,t.isLinux="linux"==o,t.isIE="Microsoft Internet Explorer"==i||0<=i.indexOf("MSAppHost")?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=0<=r.indexOf("AdobeAIR"),t.isAndroid=0<=r.indexOf("Android"),t.isChromeOS=0<=r.indexOf(" CrOS "),t.isIOS=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid}),define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(e,r,t){"use strict";function s(){var e=l;l=null,e&&e.forEach(function(e){n(e[0],e[1])})}function n(e,t,n){if("undefined"!=typeof document){if(l)if(n)s();else if(!1===n)return l.push([e,t]);if(!a){var i=n,n=(i=n&&n.getRootNode&&(i=n.getRootNode())&&i!=n?i:document).ownerDocument||i;if(t&&r.hasCssString(t,i))return null;t&&(e+="\n/*# sourceURL=ace/css/"+t+" */");var o=r.createElement("style");o.appendChild(n.createTextNode(e)),t&&(o.id=t),(i=i==n?r.getDocumentHead(n):i).insertBefore(o,i.firstChild)}}}e=e("./useragent");r.buildDom=function e(t,n,i){if("string"==typeof t&&t)return c=document.createTextNode(t),n&&n.appendChild(c),c;if(!Array.isArray(t))return t&&t.appendChild&&n&&n.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],r=0;r<t.length;r++){var s=e(t[r],n,i);s&&o.push(s)}return o}for(var a=document.createElement(t[0]),l=t[1],c=1,r=c=l&&"object"==typeof l&&!Array.isArray(l)?2:c;r<t.length;r++)e(t[r],a,i);return 2==c&&Object.keys(l).forEach(function(e){var t=l[e];"class"===e?a.className=Array.isArray(t)?t.join(" "):t:"function"==typeof t||"value"==e||"$"==e[0]?a[e]=t:"ref"===e?i&&(i[t]=a):"style"===e?"string"==typeof t&&(a.style.cssText=t):null!=t&&a.setAttribute(e,t)}),n&&n.appendChild(a),a},r.getDocumentHead=function(e){return(e=e||document).head||e.getElementsByTagName("head")[0]||e.documentElement},r.createElement=function(e,t){return document.createElementNS?document.createElementNS(t||"http://www.w3.org/1999/xhtml",e):document.createElement(e)},r.removeChildren=function(e){e.innerHTML=""},r.createTextNode=function(e,t){return(t?t.ownerDocument:document).createTextNode(e)},r.createFragment=function(e){return(e?e.ownerDocument:document).createDocumentFragment()},r.hasCssClass=function(e,t){return-1!==(e.className+"").split(/\s+/g).indexOf(t)},r.addCssClass=function(e,t){r.hasCssClass(e,t)||(e.className+=" "+t)},r.removeCssClass=function(e,t){for(var n=e.className.split(/\s+/g);;){var i=n.indexOf(t);if(-1==i)break;n.splice(i,1)}e.className=n.join(" ")},r.toggleCssClass=function(e,t){for(var n=e.className.split(/\s+/g),i=!0;;){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},r.setCssClass=function(e,t,n){n?r.addCssClass(e,t):r.removeCssClass(e,t)},r.hasCssString=function(e,t){var n,i=0;if(n=(t=t||document).querySelectorAll("style"))for(;i<n.length;)if(n[i++].id===e)return!0},r.removeElementById=function(e,t){(t=t||document).getElementById(e)&&t.getElementById(e).remove()};var a,i,l=[];r.useStrictCSP=function(e){0==(a=e)?s():l=l||[]},r.importCssString=n,r.importCssStylsheet=function(e,t){r.buildDom(["link",{rel:"stylesheet",href:e}],r.getDocumentHead(t))},r.scrollbarWidth=function(e){var t=r.createElement("ace_inner"),n=(t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block",r.createElement("ace_outer")),i=n.style,e=(i.position="absolute",i.left="-10000px",i.overflow="hidden",i.width="200px",i.minWidth="0px",i.height="150px",i.display="block",n.appendChild(t),e&&e.documentElement||document&&document.documentElement);if(!e)return 0;e.appendChild(n);var o=t.offsetWidth,i=(i.overflow="scroll",t.offsetWidth);return o===i&&(i=n.clientWidth),e.removeChild(n),o-i},r.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},r.setStyle=function(e,t,n){e[t]!==n&&(e[t]=n)},r.HAS_CSS_ANIMATION=!1,r.HAS_CSS_TRANSFORMS=!1,r.HI_DPI=!e.isWin||"undefined"!=typeof window&&1.5<=window.devicePixelRatio,e.isChromeOS&&(r.HI_DPI=!1),"undefined"!=typeof document&&(i=document.createElement("div"),r.HI_DPI&&void 0!==i.style.transform&&(r.HAS_CSS_TRANSFORMS=!0),e.isEdge||void 0===i.style.animationName||(r.HAS_CSS_ANIMATION=!0),i=null),r.HAS_CSS_TRANSFORMS?r.translate=function(e,t,n){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(n)+"px)"}:r.translate=function(e,t,n){e.style.top=Math.round(n)+"px",e.style.left=Math.round(t)+"px"}}),define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=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,n){var t=o.getDocumentHead(),i=document.createElement("script");i.src=e,t.appendChild(i),i.onload=i.onreadystatechange=function(e,t){!t&&i.readyState&&"loaded"!=i.readyState&&"complete"!=i.readyState||(i=i.onload=i.onreadystatechange=null,t||n())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}}),define("ace/lib/oop",["require","exports","module"],function(e,n,t){"use strict";n.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},n.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},n.implement=function(e,t){n.mixin(e,t)}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";function r(){this.propagationStopped=!0}function s(){this.defaultPrevented=!0}var i={};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){(t="object"==typeof t&&t?t:{}).type||(t.type=e),t.stopPropagation||(t.stopPropagation=r),t.preventDefault||(t.preventDefault=s);for(var n=n.slice(),o=0;o<n.length&&(n[o](t,this),!t.propagationStopped);o++);return i&&!t.defaultPrevented?i(t,this):void 0}},i._signal=function(e,t){if(n=(this._eventRegistry||{})[e])for(var n=n.slice(),i=0;i<n.length;i++)n[i](t,this)},i.once=function(t,n){var i=this;if(this.on(t,function e(){i.off(t,e),n.apply(null,arguments)}),!n)return new Promise(function(e){n=e})},i.setDefaultHandler=function(e,t){var n,i,o=this._defaultHandlers;(o=o||(this._defaultHandlers={_disabled_:{}}))[e]&&(i=o[e],(n=o._disabled_[e])||(o._disabled_[e]=n=[]),n.push(i),-1!=(i=n.indexOf(t))&&n.splice(i,1)),o[e]=t},i.removeDefaultHandler=function(e,t){var n,i=this._defaultHandlers;i&&(n=i._disabled_[e],i[e]==t?n&&this.setDefaultHandler(e,n.pop()):n&&-1!=(i=n.indexOf(t))&&n.splice(i,1))},i.on=i.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[e];return-1==(i=i||(this._eventRegistry[e]=[])).indexOf(t)&&i[n?"unshift":"push"](t),t},i.off=i.removeListener=i.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};e=this._eventRegistry[e];!e||-1!==(t=e.indexOf(t))&&e.splice(t,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}),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})}}),define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error"],function(e,t,n){function i(e){"undefined"!=typeof console&&console.warn&&console.warn.apply(console,arguments)}var o,r=e("./oop"),s=e("./event_emitter").EventEmitter,e=e("./report_error").reportError,a={setOptions:function(t){Object.keys(t).forEach(function(e){this.setOption(e,t[e])},this)},getOptions:function(e){var t,n={};return e?Array.isArray(e)||(n=e,e=Object.keys(n)):(t=this.$options,e=Object.keys(t).filter(function(e){return!t[e].hidden})),e.forEach(function(e){n[e]=this.getOption(e)},this),n},setOption:function(e,t){var n;if(this["$"+e]!==t)return n=this.$options[e],n?n.forwardTo?this[n.forwardTo]&&this[n.forwardTo].setOption(e,t):(n.handlesSet||(this["$"+e]=t),void(n&&n.set&&n.set.call(this,t))):i('misspelled option "'+e+'"')},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]:i('misspelled option "'+e+'"')}},l=(c.prototype.defineOptions=function(n,e,i){return n.$options||(this.$defaultOptions[e]=n.$options={}),Object.keys(i).forEach(function(e){var t=i[e];(t="string"==typeof t?{forwardTo:t}:t).name||(t.name=e),"initialValue"in(n.$options[t.name]=t)&&(n["$"+t.name]=t.initialValue)}),r.implement(n,a),this},c.prototype.resetOptions=function(n){Object.keys(n.$options).forEach(function(e){var t=n.$options[e];"value"in t&&n.setOption(e,t.value)})},c.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)},c.prototype.setDefaultValues=function(t,n){Object.keys(n).forEach(function(e){this.setDefaultValue(t,e,n[e])},this)},c.prototype.setMessages=function(e){o=e},c.prototype.nls=function(e,n){o&&!o[e]&&i("No message found for '"+e+"' in the provided messages, falling back to default English message.");e=o&&o[e]||e;return e=n?e.replace(/\$(\$|[\d]+)/g,function(e,t){return"$"==t?"$":n[t]}):e},c);function c(){this.$defaultOptions={}}l.prototype.warn=i,l.prototype.reportError=e,r.implement(l.prototype,s),t.AppConfig=l}),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'}),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",e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)}),define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(s,a,t){var l,e=s("./lib/lang"),c=s("./lib/net"),n=s("./lib/dom"),i=s("./lib/app_config").AppConfig,r=(t.exports=a=new i,{packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null}),h=(a.get=function(e){if(r.hasOwnProperty(e))return r[e];throw new Error("Unknown config key: "+e)},a.set=function(e,t){if(r.hasOwnProperty(e))r[e]=t;else if(0==this.setDefaultValue("",e,t))throw new Error("Unknown config key: "+e);"useStrictCSP"==e&&n.useStrictCSP(t)},a.all=function(){return e.copyObject(r)},a.$modes={},a.moduleUrl=function(e,t){if(r.$moduleUrls[e])return r.$moduleUrls[e];var e=e.split("/"),n="snippets"==(t=t||e[e.length-2]||"")?"/":"-",i=e[e.length-1],o=("worker"==t&&"-"==n&&(o=new RegExp("^"+t+"[\\-_]|[\\-_]"+t+"$","g"),i=i.replace(o,"")),(!i||i==t)&&1<e.length&&(i=e[e.length-2]),r[t+"Path"]);return null==o?o=r.basePath:"/"==n&&(t=n=""),o&&"/"!=o.slice(-1)&&(o+="/"),o+t+n+i+this.get("suffix")},a.setModuleUrl=function(e,t){return r.$moduleUrls[e]=t},a.setLoader=function(e){l=e},a.dynamicModules=Object.create(null),a.$loading={},a.$loaded={},a.loadModule=function(e,t){function n(e){if(e&&!a.$loading[r])return t&&t(e);if(a.$loading[r]||(a.$loading[r]=[]),a.$loading[r].push(t),!(1<a.$loading[r].length))e=function(){var e,t;t=function(e,t){t&&(a.$loaded[r]=t),a._emit("load.module",{name:r,module:t});var n=a.$loading[r];a.$loading[r]=null,n.forEach(function(e){e&&e(t)})},"ace/theme/textmate"===(e=r)||"./theme/textmate"===e?t(null,s("./theme/textmate")):l?l(e,t):console.error("loader is not configured")},a.get("packaged")?(c.loadScript(a.moduleUrl(r,o),e),h()):e()}var i,o,r;Array.isArray(e)?(o=e[0],r=e[1]):"string"==typeof e&&(r=e);if(a.dynamicModules[r])a.dynamicModules[r]().then(function(e){e.default?n(e.default):n(e)});else{try{i=this.$require(r)}catch(e){}n(i||a.$loaded[r])}},a.$require=function(e){if("function"==typeof t.require)return t.require(e)},a.setModuleLoader=function(e,t){a.dynamicModules[e]=t},function(){r.basePath||r.workerPath||r.modePath||r.themePath||Object.keys(r.$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(){})});a.version="1.32.5"}),define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(p,e,g){"use strict";function t(e){if(m&&m.document){f.set("packaged",e||p.packaged||g.packaged||m.define&&define.packaged);for(var t,n={},i="",e=document.currentScript||document._currentScript,o=e&&e.ownerDocument||document,r=(e&&e.src&&(i=e.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||""),o.getElementsByTagName("script")),s=0;s<r.length;s++){var a=r[s],l=a.src||a.getAttribute("src");if(l){for(var c=a.attributes,h=0,u=c.length;h<u;h++){var d=c[h];0===d.name.indexOf("data-ace-")&&(n[d.name.replace(/^data-ace-/,"").replace(/-(.)/g,function(e,t){return t.toUpperCase()})]=d.value)}a=l.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);a&&(i=a[1])}}for(t in i&&(n.base=n.base||i,n.packaged=!0),n.basePath=n.base,n.workerPath=n.workerPath||n.base,n.modePath=n.modePath||n.base,n.themePath=n.themePath||n.base,delete n.base,n)void 0!==n[t]&&f.set(t,n[t])}}p("./lib/fixoldbrowsers");var f=p("./config"),m=(f.setLoader(function(e,t){p([e],function(e){t(null,e)})}),function(){return this||"undefined"!=typeof window&&window}());g.exports=function(e){f.init=t,f.$require=p,e.require=p,"function"==typeof define&&(e.define=define)}}),define("ace/range",["require","exports","module"],function(e,t,n){"use strict";r.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},r.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},r.prototype.contains=function(e,t){return 0==this.compare(e,t)},r.prototype.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},r.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},r.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},r.prototype.intersects=function(e){e=this.compareRange(e);return-1==e||0==e||1==e},r.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},r.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},r.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)},r.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)},r.prototype.inside=function(e,t){return 0==this.compare(e,t)&&(!this.isEnd(e,t)&&!this.isStart(e,t))},r.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},r.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},r.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:t<this.start.column?-1:t>this.end.column?1:0},r.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},r.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},r.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)},r.prototype.clipRows=function(e,t){var n,i;return this.end.row>t?n={row:t+1,column:0}:this.end.row<e&&(n={row:e,column:0}),this.start.row>t?i={row:t+1,column:0}:this.start.row<e&&(i={row:e,column:0}),r.fromPoints(i||this.start,n||this.end)},r.prototype.extend=function(e,t){var n,i,o=this.compare(e,t);return 0==o?this:(-1==o?n={row:e,column:t}:i={row:e,column:t},r.fromPoints(n||this.start,i||this.end))},r.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},r.prototype.isMultiLine=function(){return this.start.row!==this.end.row},r.prototype.clone=function(){return r.fromPoints(this.start,this.end)},r.prototype.collapseRows=function(){return 0==this.end.column?new r(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new r(this.start.row,0,this.end.row,0)},r.prototype.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),e=e.documentToScreenPosition(this.end);return new r(t.row,t.column,e.row,e.column)},r.prototype.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t};var i=r;function r(e,t,n,i){this.start={row:e,column:t},this.end={row:n,column:i}}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}),define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(e,t,n){"use strict";var r=e("./oop"),i=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);r.mixin(n,n.MODIFIER_KEYS),r.mixin(n,n.PRINTABLE_KEYS),r.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete;for(var i=["cmd","ctrl","alt","shift"],o=Math.pow(2,i.length);o--;)n.KEY_MODS[o]=i.filter(function(e){return o&n.KEY_MODS[e]}).join("-")+"-";return n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();r.mixin(t,i),(t.default=t).keyCodeToString=function(e){var t=i[e];return(t="string"!=typeof t?String.fromCharCode(e):t).toLowerCase()}}),define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,u,t){"use strict";function o(){if(null==n){n=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return n={passive:!1},!0}})}catch(e){}}return n}function r(e,t,n){this.elem=e,this.type=t,this.callback=n}function s(e){return 0|(e.ctrlKey?1:0)|(e.altKey?2:0)|(e.shiftKey?4:0)|(e.metaKey?8:0)}function a(){h=Object.create(null)}var n,l,c=e("./keys"),d=e("./useragent"),h=null,p=0,g=(r.prototype.destroy=function(){f(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0},u.addListener=function(e,t,n,i){e.addEventListener(t,n,o()),i&&i.$toDestroy.push(new r(e,t,n))}),f=u.removeListener=function(e,t,n){e.removeEventListener(t,n,o())};u.stopEvent=function(e){return u.stopPropagation(e),u.preventDefault(e),!1},u.stopPropagation=function(e){e.stopPropagation&&e.stopPropagation()},u.preventDefault=function(e){e.preventDefault&&e.preventDefault()},u.getButton=function(e){return"dblclick"==e.type?0:"contextmenu"==e.type||d.isMac&&e.ctrlKey&&!e.altKey&&!e.shiftKey?2:e.button},u.capture=function(e,t,n){function i(e){t&&t(e),n&&n(e),f(o,"mousemove",t),f(o,"mouseup",i),f(o,"dragstart",i)}var o=e&&e.ownerDocument||document;return g(o,"mousemove",t),g(o,"mouseup",i),g(o,"dragstart",i),i},u.addMouseWheelListener=function(e,i,t){g(e,"wheel",function(e){var t=e.deltaX||0,n=e.deltaY||0;switch(e.deltaMode){case e.DOM_DELTA_PIXEL:e.wheelX=.15*t,e.wheelY=.15*n;break;case e.DOM_DELTA_LINE:e.wheelX=15*t,e.wheelY=15*n;break;case e.DOM_DELTA_PAGE:e.wheelX=150*t,e.wheelY=150*n}i(e)},t)},u.addMultiMouseDownListener=function(e,n,i,o,t){function r(e){var t;if(0!==u.getButton(e)?c=0:1<e.detail?4<++c&&(c=1):c=1,d.isIE&&(t=5<Math.abs(e.clientX-s)||5<Math.abs(e.clientY-a),l&&!t||(c=1),l&&clearTimeout(l),l=setTimeout(function(){l=null},n[c-1]||600),1==c&&(s=e.clientX,a=e.clientY)),e._clicks=c,i[o]("mousedown",e),4<c)c=0;else if(1<c)return i[o](h[c],e)}var s,a,l,c=0,h={2:"dblclick",3:"tripleclick",4:"quadclick"};(e=Array.isArray(e)?e:[e]).forEach(function(e){g(e,"mousedown",r,t)})},u.getModifierString=function(e){return c.KEY_MODS[s(e)]},u.addCommandKeyListener=function(e,n,t){var i=null;g(e,"keydown",function(e){h[e.keyCode]=(h[e.keyCode]||0)+1;var t=function(e,t,n){var i,o=s(t);if(!d.isMac&&h){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(o|=8),h.altGr){if(3==(3&o))return;h.altGr=0}18!==n&&17!==n||(i=t.location,17===n&&1===i?1==h[n]&&(p=t.timeStamp):18===n&&3===o&&2===i&&t.timeStamp-p<50&&(h.altGr=!0))}if(n in c.MODIFIER_KEYS&&(n=-1),o||13!==n||3!==t.location||(e(t,o,-n),!t.defaultPrevented)){if(d.isChromeOS&&8&o){if(e(t,o,n),t.defaultPrevented)return;o&=-9}return!!(o||n in c.FUNCTION_KEYS||n in c.PRINTABLE_KEYS)&&e(t,o,n)}}(n,e,e.keyCode);return i=e.defaultPrevented,t},t),g(e,"keypress",function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(u.stopEvent(e),i=null)},t),g(e,"keyup",function(e){h[e.keyCode]=null},t),h||(a(),g(window,"focus",a))},"object"==typeof window&&window.postMessage&&!d.isOldIE&&(l=1,u.nextTick=function(t,n){n=n||window;function i(e){e.data==o&&(u.stopPropagation(e),f(n,"message",i),t())}var o="zero-timeout-message-"+l++;g(n,"message",i),n.postMessage(o,"*")}),u.$idleBlocked=!1,u.onIdle=function(t,e){return setTimeout(function e(){u.$idleBlocked?setTimeout(e,100):t()},e)},u.$idleBlockId=null,u.blockIdle=function(e){u.$idleBlockId&&clearTimeout(u.$idleBlockId),u.$idleBlocked=!0,u.$idleBlockId=setTimeout(function(){u.$idleBlocked=!1},e||100)},u.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),u.nextFrame?u.nextFrame=u.nextFrame.bind(window):u.nextFrame=function(e){setTimeout(e,17)}}),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()}}}),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 z=e("../lib/event"),V=e("../config").nls,U=e("../lib/useragent"),G=e("../lib/dom"),K=e("../lib/lang"),j=e("../clipboard"),Y=U.isChrome<18,Q=U.isIE,q=63<U.isChrome,X=e("../lib/keys"),Z=X.KEY_MODS,J=U.isIOS,ee=J?/\s/:/\n/,te=U.isMobile;t.TextInput=function(e,u){function t(){n=!0,d.blur(),d.focus(),n=!1}function a(){clearTimeout(E),E=setTimeout(function(){c&&(d.style.cssText=c,c=""),u.renderer.$isMousePressed=!1,u.renderer.$keepTextAreaAtCursor&&u.renderer.$moveTextAreaToCursor()},0)}var d=G.createElement("textarea"),r=(d.className="ace_text-input",d.setAttribute("wrap","off"),d.setAttribute("autocorrect","off"),d.setAttribute("autocapitalize","off"),d.setAttribute("spellcheck","false"),d.style.opacity="0",e.insertBefore(d,e.firstChild),!1),p=!1,l=!1,g=!1,c="",f=(te||(d.style.fontSize="1px"),!1),n=!1,m="",y=0,w=0,v=0,h=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,$=0;try{var C=document.activeElement===d}catch(e){}this.setNumberOfExtraLines=function(e){h=Number.MAX_SAFE_INTEGER,b=Number.MIN_SAFE_INTEGER,$=e<0?0:e},this.setAriaOptions=function(e){e.activeDescendant?(d.setAttribute("aria-haspopup","true"),d.setAttribute("aria-autocomplete",e.inline?"both":"list"),d.setAttribute("aria-activedescendant",e.activeDescendant)):(d.setAttribute("aria-haspopup","false"),d.setAttribute("aria-autocomplete","both"),d.removeAttribute("aria-activedescendant")),e.role&&d.setAttribute("role",e.role),e.setLabel&&(d.setAttribute("aria-roledescription",V("editor")),u.session&&(e=u.session.selection.cursor.row,d.setAttribute("aria-label",V("Cursor at row $0",[e+1]))))},this.setAriaOptions({role:"textbox"}),z.addListener(d,"blur",function(e){n||(u.onBlur(e),C=!1)},u),z.addListener(d,"focus",function(e){if(!n){if(C=!0,U.isEdge)try{if(!document.hasFocus())return}catch(e){}u.onFocus(e),U.isEdge?setTimeout(x):x()}},u),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:u.renderer.enableKeyboardAccessibility}),c||q||"browser"==this.$focusScroll)return d.focus({preventScroll:!0});var e=d.style.top;d.style.position="fixed",d.style.top="0px";try{var t=0!=d.getBoundingClientRect().top}catch(e){return}var n=[];if(t)for(var i=d.parentElement;i&&1==i.nodeType;)n.push(i),i.setAttribute("ace_nocontext","true"),i=!i.parentElement&&i.getRootNode?i.getRootNode().host:i.parentElement;d.focus({preventScroll:!0}),t&&n.forEach(function(e){e.removeAttribute("ace_nocontext")}),setTimeout(function(){d.style.position="","0px"==d.style.top&&(d.style.top=e)},0)},this.blur=function(){d.blur()},this.isFocused=function(){return C},u.on("beforeEndOperation",function(){var e=u.curOp,t=e&&e.command&&e.command.name;"insertstring"!=t&&(t=t&&(e.docChanged||e.selectionChanged),l&&t&&(m=d.value="",H()),x())});function S(e,t){for(var n=t,i=1;i<=e-h&&i<2*$+1;i++)n+=u.session.getLine(e-i).length+1;return n}function i(e){N(e,!0)}function o(e){N(e,!1)}function s(e){var t=M(e);j.pasteCancelled()||("string"==typeof t?(t&&u.onPaste(t,e),U.isIE&&setTimeout(x),z.preventDefault(e)):(d.value="",p=!0))}var x=J?function(e){var t;!C||r&&!e||g||((t="\n ab"+(e=e||"")+"cde fg\n")!=d.value&&(d.value=m=t),t=4+(e.length||(u.selection.isEmpty()?0:1)),4==y&&w==t||d.setSelectionRange(4,t),y=4,w=t)}:function(){if(!l&&!g&&(C||k)){l=!0;var e=0,t=0,n="";if(u.session){for(var i,o=u.selection,r=o.getRange(),o=o.cursor.row,s=(o===b+1?b=(h=b+1)+2*$:o===h-1?h=(b=h-1)-2*$:(o<h-1||b+1<o)&&(h=$<o?o-$:0,b=$<o?o+$:2*$),[]),a=h;a<=b;a++)s.push(u.session.getLine(a));n=s.join("\n"),e=S(r.start.row,r.start.column),t=S(r.end.row,r.end.column),r.start.row<h?(i=u.session.getLine(h-1),e=r.start.row<h-1?0:e,t+=i.length+1,n=i+"\n"+n):r.end.row>b?(i=u.session.getLine(b+1),t=r.end.row>b+1?i.length:r.end.column,t+=n.length+1,n=n+"\n"+i):te&&0<o&&(n="\n"+n,t+=1,e+=1),400<n.length&&(e<400&&t<400?n=n.slice(0,400):(n="\n",e==t?e=t=0:(e=0,t=1)));r=n+"\n\n";r!=m&&(d.value=m=r,y=w=r.length)}if(k&&(y=d.selectionStart,w=d.selectionEnd),w!=t||y!=e||d.selectionEnd!=w)try{d.setSelectionRange(e,t),y=e,w=t}catch(e){}l=!1}},F=(this.resetSelection=x,C&&u.onFocus(),function(e){return 0===e.selectionStart&&e.selectionEnd>=m.length&&e.value===m&&m&&e.selectionEnd!==w}),A=null,k=(this.setInputHandler=function(e){A=e},!(this.getInputHandler=function(){return A})),L=function(e,t){if(k=k&&!1,p)return x(),e&&u.onPaste(e),p=!1,"";for(var n=d.selectionStart,i=d.selectionEnd,o=y,r=m.length-w,s=e,a=e.length-n,l=e.length-i,c=0;0<o&&m[c]==e[c];)c++,o--;for(s=s.slice(c),c=1;0<r&&m.length-c>y-1&&m[m.length-c]==e[e.length-c];)c++,r--;a-=c-1,l-=c-1;var h=s.length-c+1;if(h<0&&(o=-h,h=0),s=s.slice(0,h),!(t||s||a||o||r||l))return"";h=!(g=!0);return U.isAndroid&&". "==s&&(s=" ",h=!0),s&&!o&&!r&&!a&&!l||f?u.onTextInput(s):u.onTextInput(s,{extendLeft:o,extendRight:r,restoreStart:a,restoreEnd:l}),g=!1,m=e,y=n,w=i,v=l,h?"\n":s},W=function(e){if(l)return R();if(e&&e.inputType){if("historyUndo"==e.inputType)return u.execCommand("undo");if("historyRedo"==e.inputType)return u.execCommand("redo")}var e=d.value,t=L(e,!0);(500<e.length||ee.test(t)||te&&y<1&&y==w)&&x()},M=function(e,t,n){var i=e.clipboardData||window.clipboardData;if(i&&!Y){var o=Q||n?"Text":"text/plain";try{return t?!1!==i.setData(o,t):i.getData(o)}catch(e){if(!n)return M(e,t,!0)}}},N=function(e,t){var n=u.getCopyText();if(!n)return z.preventDefault(e);M(e,n)?(J&&(x(n),r=n,setTimeout(function(){r=!1},10)),t?u.onCut():u.onCopy(),z.preventDefault(e)):(r=!0,d.value=n,d.select(),setTimeout(function(){r=!1,x(),t?u.onCut():u.onCopy()}))},R=(z.addCommandKeyListener(d,function(e,t,n){if(!l)return u.onCommandKey(e,t,n)},u),z.addListener(d,"select",function(e){l||(r?r=!1:F(d)?(u.selectAll(),x()):te&&d.selectionStart!=y&&x())},u),z.addListener(d,"input",W,u),z.addListener(d,"cut",i,u),z.addListener(d,"copy",o,u),z.addListener(d,"paste",s,u),"oncut"in d&&"oncopy"in d&&"onpaste"in d||z.addListener(e,"keydown",function(e){if((!U.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:o(e);break;case 86:s(e);break;case 88:i(e)}},u),function(){var e;if(l&&u.onCompositionUpdate&&!u.$readOnly)return f?t():void(l.useTextareaForIME?u.onCompositionUpdate(d.value):(e=d.value,L(e),l.markerRange&&(l.context&&(l.markerRange.start.column=l.selectionStart=l.context.compositionStartOffset),l.markerRange.end.column=l.markerRange.start.column+w-l.selectionStart+v)))}),H=function(e){u.onCompositionEnd&&!u.$readOnly&&(l=!1,u.onCompositionEnd(),u.off("mousedown",t),e&&W())},B=K.delayedCall(R,50).schedule.bind(null,null);z.addListener(d,"compositionstart",function(e){l||!u.onCompositionStart||u.$readOnly||(l={},f||(e.data&&(l.useTextareaForIME=!1),setTimeout(R,0),u._signal("compositionStart"),u.on("mousedown",t),(e=u.getSelectionRange()).end.row=e.start.row,e.end.column=e.start.column,l.markerRange=e,l.selectionStart=y,u.onCompositionStart(l),l.useTextareaForIME?(m=d.value="",w=y=0):(d.msGetInputContext&&(l.context=d.msGetInputContext()),d.getInputContext&&(l.context=d.getInputContext()))))},u),z.addListener(d,"compositionupdate",R,u),z.addListener(d,"keyup",function(e){27==e.keyCode&&d.value.length<d.selectionStart&&(l||(m=d.value),y=w=-1,x()),B()},u),z.addListener(d,"keydown",B,u),z.addListener(d,"compositionend",H,u),this.getElement=function(){return d},this.setCommandMode=function(e){f=e,d.readOnly=!1},this.setReadOnly=function(e){f||(d.readOnly=e)},this.setCopyWithEmptySelection=function(e){},this.onContextMenu=function(e){k=!0,x(),u._emit("nativecontextmenu",{target:u,domEvent:e}),this.moveToMouse(e,!0)},this.moveToMouse=function(e,t){c=c||d.style.cssText,d.style.cssText=(t?"z-index:100000;":"")+(U.isIE?"opacity:0.1;":"")+"text-indent: -"+(y+w)*u.renderer.characterWidth*.5+"px;";function n(e){G.translate(d,e.clientX-r-2,Math.min(e.clientY-o-2,s))}var t=u.container.getBoundingClientRect(),i=G.computedStyle(u.container),o=t.top+(parseInt(i.borderTopWidth)||0),r=t.left+(parseInt(t.borderLeftWidth)||0),s=t.bottom-o-d.clientHeight-2;n(e),"mousedown"==e.type&&(u.renderer.$isMousePressed=!0,clearTimeout(E),U.isWin&&z.capture(u.container,n,a))},this.onContextMenuClose=a;function T(e){u.textInput.onContextMenu(e),a()}var E,_,I,O,D;function P(e){var t,n,i,o;document.activeElement!==I||D||l||_.$mouseHandler.isMousePressed||r||(t=I.selectionStart,n=I.selectionEnd,i=null,(o=0)==t?i=X.up:1==t?i=X.home:w<n&&"\n"==m[n]?i=X.end:t<y&&" "==m[t-1]?(i=X.left,o=Z.option):t<y||t==y&&w!=y&&t==n?i=X.left:w<n&&2<m.slice(0,n).split("\n").length?i=X.down:w<n&&" "==m[n-1]?(i=X.right,o=Z.option):(w<n||n==w&&w!=y&&t==n)&&(i=X.right),t!==n&&(o|=Z.shift),i&&(!_.onCommandKey({},o,i)&&_.commands&&(i=X.keyCodeToString(i),(o=_.commands.findKeyCommand(o,i))&&_.execCommand(o)),y=t,w=n,x("")))}z.addListener(d,"mouseup",T,u),z.addListener(d,"mousedown",function(e){e.preventDefault(),a()},u),z.addListener(u.renderer.scroller,"contextmenu",T,u),z.addListener(d,"contextmenu",T,u),J&&(_=u,O=null,D=!1,(I=d).addEventListener("keydown",function(e){O&&clearTimeout(O),D=!0},!0),I.addEventListener("keyup",function(e){O=setTimeout(function(){D=!1},100)},!0),document.addEventListener("selectionchange",P),_.on("destroy",function(){document.removeEventListener("selectionchange",P)})),this.destroy=function(){d.parentElement&&d.parentElement.removeChild(d)}},t.$setUserAgentForTests=function(e,t){te=e,J=t}}),define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(e,t,n){"use strict";function s(e,t){return(e.start.row==e.end.row?2*t.column-e.start.column-e.end.column:e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4)<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}var r=e("../lib/useragent"),e=(i.prototype.onMouseDown=function(e){var t=e.inSelection(),n=e.getDocumentPosition(),i=(this.mousedownEvent=e,this.editor),o=e.getButton();return 0!==o?(!i.getSelectionRange().isEmpty()&&1!=o||i.selection.moveToPosition(n),void(2==o&&(i.textInput.onContextMenu(e.domEvent),r.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||i.isFocused()||(i.focus(),!this.$focusTimeout||this.$clickSelection||i.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(n,1<e.domEvent._clicks),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},i.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"))},i.prototype.select=function(){var e,t=this.editor,n=t.renderer.screenToTextCoordinates(this.x,this.y);this.$clickSelection&&(e=-1==(e=this.$clickSelection.comparePoint(n))?this.$clickSelection.end:1==e?this.$clickSelection.start:(n=(e=s(this.$clickSelection,n)).cursor,e.anchor),t.selection.setSelectionAnchor(e.row,e.column)),t.selection.selectToPosition(n),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(e){var t,n,i,o=this.editor,r=o.renderer.screenToTextCoordinates(this.x,this.y),e=o.selection[e](r.row,r.column);this.$clickSelection&&(n=this.$clickSelection.comparePoint(e.start),t=this.$clickSelection.comparePoint(e.end),-1==n&&t<=0?(i=this.$clickSelection.end,e.end.row==r.row&&e.end.column==r.column||(r=e.start)):1==t&&0<=n?(i=this.$clickSelection.start,e.start.row==r.row&&e.start.column==r.column||(r=e.end)):i=-1==n&&1==t?(r=e.end,e.start):(r=(n=s(this.$clickSelection,r)).cursor,n.anchor),o.selection.setSelectionAnchor(i.row,i.column)),o.selection.selectToPosition(r),o.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){i=this.mousedownEvent.x,e=this.mousedownEvent.y,n=this.x,t=this.y;var e,t,n=Math.sqrt(Math.pow(n-i,2)+Math.pow(t-e,2)),i=Date.now();(0<n||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=t.session.getBracketRange(e);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},i.prototype.onTripleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=(this.setState("selectByLines"),t.getSelectionRange());n.isMultiLine()&&n.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(n.start.row),this.$clickSelection.end=t.selection.getLineRange(n.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},i.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(e){var t,n,i,o,r,s,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),n=this.$lastScroll,i=e.domEvent.timeStamp,s=i-n.t,o=s?e.wheelX/s:n.vx,r=s?e.wheelY/s:n.vy,s<550&&(o=(o+n.vx)/2,r=(r+n.vy)/2),s=Math.abs(o/r),a=!1,1<=s&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)?!0:a)?n.allowed=i:i-n.allowed<550&&(Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(r)<=1.5*Math.abs(n.vy)?(a=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=o,n.vy=r,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0},i);function i(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}e.prototype.selectEnd=e.prototype.selectByLinesEnd,e.prototype.selectAllEnd=e.prototype.selectByLinesEnd,e.prototype.selectByWordsEnd=e.prototype.selectByLinesEnd,t.DefaultHandlers=e}),define("ace/lib/scroll",["require","exports","module"],function(e,t,n){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}}),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||(l=function(e,t){return(l=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");l(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),d=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{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/dom"),a=(e("./lib/event"),e("./range").Range),r=e("./lib/scroll").preventParentScroll,s="ace_tooltip",e=(u.prototype.$init=function(){return this.$element=o.createElement("div"),this.$element.className=s,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},u.prototype.getElement=function(){return this.$element||this.$init()},u.prototype.setText=function(e){this.getElement().textContent=e},u.prototype.setHtml=function(e){this.getElement().innerHTML=e},u.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},u.prototype.setClassName=function(e){o.addCssClass(this.getElement(),e)},u.prototype.setTheme=function(e){this.$element.className=s+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},u.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)},u.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=s,this.isOpen=!1)},u.prototype.getHeight=function(){return this.getElement().offsetHeight},u.prototype.getWidth=function(){return this.getElement().offsetWidth},u.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},u);h.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},h.prototype.removePopup=function(e){e=this.popups.indexOf(e);-1!==e&&(this.popups.splice(e,1),this.updatePopups())},h.prototype.updatePopups=function(){this.popups.sort(function(e,t){return t.priority-e.priority});var t,e,n,i,o=[];try{for(var r=d(this.popups),s=r.next();!s.done;s=r.next()){var a=s.value,l=!0;try{n=void 0;for(var c=d(o),h=c.next();!h.done;h=c.next()){var u=h.value;if(this.doPopupsOverlap(u,a)){l=!1;break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}l?o.push(a):a.hide()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},h.prototype.doPopupsOverlap=function(e,t){e=e.getElement().getBoundingClientRect(),t=t.getElement().getBoundingClientRect();return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top};var l,c=new h;function h(){this.popups=[]}function u(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}t.popupManager=c,t.Tooltip=e;i(g,p=e),g.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},g.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)},g.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n,t=t.$mouseHandler.isMousePressed;this.isOpen&&(n=this.lastEvent&&this.lastEvent.getDocumentPosition(),this.range&&this.range.contains(n.row,n.column)&&!t&&!this.isOutsideOfText(this.lastEvent)||this.hide()),this.timeout||t||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},g.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;10<this.idleTime-e?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},g.prototype.isOutsideOfText=function(e){var t=e.editor,n=e.getDocumentPosition(),i=t.session.getLine(n.row);if(n.column==i.length){i=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),e=t.session.documentToScreenPosition(n.row,n.column);if(e.column!=i.column||e.row!=i.row)return!0}return!1},g.prototype.setDataProvider=function(e){this.$gatherData=e},g.prototype.showForRange=function(e,t,n,i){var o,r,s;i&&i!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement()||(i=e.renderer,this.isOpen||(c.addPopup(this),this.$registerCloseEvents(),this.setTheme(i.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=a.fromPoints(t.start,t.end),e=i.textToScreenCoordinates(t.start.row,t.start.column),t=i.scroller.getBoundingClientRect(),e.pageX<t.left&&(e.pageX=t.left),(t=this.getElement()).innerHTML="",t.appendChild(n),t.style.maxHeight="",t.style.display="block",n=t.clientHeight,o=t.clientWidth,r=window.innerHeight-e.pageY-i.lineHeight,s=!0,e.pageY-n<0&&e.pageY<r&&(s=!1),t.style.maxHeight=(s?e.pageY:r)-10+"px",t.style.top=s?"":e.pageY+i.lineHeight+"px",t.style.bottom=s?window.innerHeight-e.pageY+"px":"",t.style.left=Math.min(e.pageX,window.innerWidth-o-10)+"px")},g.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")},g.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,c.removePopup(this)))},g.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},g.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},g.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()};var p,i=g;function g(e){void 0===e&&(e=document.body);var e=p.call(this,e)||this,t=(e.timeout=void 0,e.lastT=0,e.idleTime=350,e.lastEvent=void 0,e.onMouseOut=e.onMouseOut.bind(e),e.onMouseMove=e.onMouseMove.bind(e),e.waitForHover=e.waitForHover.bind(e),e.hide=e.hide.bind(e),e.getElement());return t.style.whiteSpace="pre-wrap",t.style.pointerEvents="auto",t.addEventListener("mouseout",e.onMouseOut),t.tabIndex=-1,t.addEventListener("blur",function(){t.contains(document.activeElement)||this.hide()}.bind(e)),t.addEventListener("wheel",r),e}t.HoverTooltip=i}),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,o,r=this&&this.__extends||(i=function(e,t){return(i=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),l=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{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},h=e("../lib/dom"),u=e("../lib/event"),s=e("../tooltip").Tooltip,a=e("../config").nls,d=(t.GutterHandler=function(i){function o(){n=n&&clearTimeout(n),c.isOpen&&(c.hideTooltip(),a.off("mousewheel",o))}function r(e){c.setPosition(e.x,e.y)}var n,s,a=i.editor,l=a.renderer.$gutterLayer,c=new d(a);i.editor.setDefaultHandler("guttermousedown",function(e){if(a.isFocused()&&0==e.getButton()){var t=l.getRegion(e);if("foldWidgets"!=t){var t=e.getDocumentPosition().row,n=a.session.selection;if(e.getShiftKey())n.selectTo(t,0);else{if(2==e.domEvent.detail)return a.selectAll(),e.preventDefault();i.$clickSelection=a.selection.getLineRange(t)}return i.setState("selectByLines"),i.captureMouse(e),e.preventDefault()}}}),i.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(h.hasCssClass(t,"ace_fold-widget"))return o();c.isOpen&&i.$tooltipFollowsMouse&&r(e),s=e,n=n||setTimeout(function(){n=null,(s&&!i.isMousePressed?function(){var e=s.getDocumentPosition().row;if(e==a.session.getLength()){var t=a.renderer.pixelToScreenCoordinates(0,s.y).row,n=s.$pos;if(t>a.session.documentToScreenRow(n.row,n.column))return o()}c.showTooltip(e),c.isOpen&&(a.on("mousewheel",o),i.$tooltipFollowsMouse?r(s):(t=s.getGutterRow(),(n=l.$lines.get(t))?(e=n.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),(t=c.getElement().style).left=e.right+"px",t.top=e.bottom+"px"):r(s)))}:o)()},50)}),u.addListener(a.renderer.$gutter,"mouseout",function(e){s=null,c.isOpen&&!n&&(n=setTimeout(function(){n=null,o()},50))},a),a.on("changeSession",o),a.on("input",o)},r(p,o=s),p.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();n<(e+=15)+o&&(e-=e+o-n),i<(t+=15)+r&&(t-=20+r),s.prototype.setPosition.call(this,e,t)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:a("error"),plural:a("errors")},warning:{singular:a("warning"),plural:a("warnings")},info:{singular:a("information message"),plural:a("information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(e){var t=this.editor.renderer.$gutterLayer,n=t.$annotations[e],i=n?{text:Array.from(n.text),type:Array.from(n.type)}:{text:[],type:[]},o=t.session.getFoldLine(e);if(o&&t.$showFoldedAnnotations){for(var r,s={error:[],warning:[],info:[]},a=e+1;a<=o.end.row;a++)if(t.$annotations[a])for(var l=0;l<t.$annotations[a].text.length;l++){var c=t.$annotations[a].type[l];s[c].push(t.$annotations[a].text[l]),"error"===c?r="error_fold":"warning"===c&&(r="warning_fold")}"error_fold"!==r&&"warning_fold"!==r||(n="".concat(p.annotationsToSummaryString(s)," in folded code."),i.text.push(n),i.type.push(r))}if(0===i.text.length)return this.hide();for(var h={error:[],warning:[],info:[]},u=t.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",a=0;a<i.text.length;a++){var d="<span class='ace_".concat(i.type[a]," ").concat(u,"' aria-label='").concat(p.annotationLabels[i.type[a].replace("_fold","")].singular,"' role=img> </span> ").concat(i.text[a]);h[i.type[a].replace("_fold","")].push(d)}e=[].concat(h.error,h.warning,h.info).join("<br>");this.setHtml(e),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)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(e){var t,n,i=[];try{for(var o=l(["error","warning","info"]),r=o.next();!r.done;r=o.next()){var s,a=r.value;e[a].length&&(s=1===e[a].length?p.annotationLabels[a].singular:p.annotationLabels[a].plural,i.push("".concat(e[a].length," ").concat(s)))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i.join(", ")},p);function p(e){var t=o.call(this,e.container)||this;return t.editor=e,t}t.GutterTooltip=d}),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");function r(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}r.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},r.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},r.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},r.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},r.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},r.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e,t=this.editor.getSelectionRange();return t.isEmpty()?this.$inSelection=!1:(e=this.getDocumentPosition(),this.$inSelection=t.contains(e.row,e.column)),this.$inSelection},r.prototype.getButton=function(){return i.getButton(this.domEvent)},r.prototype.getShiftKey=function(){return this.domEvent.shiftKey},r.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},t.MouseEvent=r}),define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){"use strict";function i(t){function e(){var e,t,n,i,o,r,s,a,l=d;d=w.renderer.screenToTextCoordinates(c,h),o=d,r=l,s=Date.now(),a=!r||o.row!=r.row,r=!r||o.column!=r.column,!m||a||r?(w.moveCursorToPosition(o),m=s,y={x:c,y:h}):5<S(y.x,y.y,c,h)?m=null:200<=s-m&&(w.renderer.scrollCursorIntoView(),m=null),a=d,r=l,o=Date.now(),s=w.renderer.layerConfig.lineHeight,l=w.renderer.layerConfig.characterWidth,e=w.renderer.scroller.getBoundingClientRect(),e={x:{left:c-e.left,right:e.right-c},y:{top:h-e.top,bottom:e.bottom-h}},t=Math.min(e.x.left,e.x.right),n=Math.min(e.y.top,e.y.bottom),i={row:a.row,column:a.column},t/l<=2&&(i.column+=e.x.left<e.x.right?-3:2),n/s<=1&&(i.row+=e.y.top<e.y.bottom?-1:1),t=a.row!=i.row,l=a.column!=i.column,n=!r||a.row!=r.row,t||l&&!n?f?200<=o-f&&w.renderer.scrollCursorIntoView(i):f=o:f=null}function n(){u=w.selection.toOrientedRange(),a=w.session.addMarker(u,"ace_selection",w.getSelectionStyle()),w.clearSelection(),w.isFocused()&&w.renderer.$cursorLayer.setBlinking(!1),clearInterval(l),e(),l=setInterval(e,20),$=0,A.addListener(document,"mousemove",o)}function i(){clearInterval(l),w.session.removeMarker(a),a=null,w.selection.fromOrientedRange(u),w.isFocused()&&!g&&w.$resetCursorStyle(),$=0,m=f=d=u=null,A.removeListener(document,"mousemove",o)}function o(){null==C&&(C=setTimeout(function(){null!=C&&a&&i()},20))}function r(e){e=e.types;return!e||Array.prototype.some.call(e,function(e){return"text/plain"==e||"Text"==e})}function s(e){var t=["copy","copymove","all","uninitialized"],n=k.isMac?e.altKey:e.ctrlKey,i="uninitialized";try{i=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var o="none";return n&&0<=t.indexOf(i)?o="copy":0<=["move","copymove","linkmove","all","uninitialized"].indexOf(i)?o="move":0<=t.indexOf(i)&&(o="copy"),o}var a,c,h,l,u,d,p,g,f,m,y,w=t.editor,v=x.createElement("div"),b=(v.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",v.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(e){t[e]=this[e]},this),w.on("mousedown",this.onMouseDown.bind(t)),w.container),$=0,C=(this.onDragStart=function(e){var t;if(this.cancelDrag||!b.draggable)return t=this,setTimeout(function(){t.startSelect(),t.captureMouse(e)},0),e.preventDefault();u=w.getSelectionRange();var n=e.dataTransfer;n.effectAllowed=w.getReadOnly()?"copy":"copyMove",w.container.appendChild(v),n.setDragImage&&n.setDragImage(v,0,0),setTimeout(function(){w.container.removeChild(v)}),n.clearData(),n.setData("Text",w.session.getTextRange()),g=!0,this.setState("drag")},this.onDragEnd=function(e){b.draggable=!1,g=!1,this.setState(null),w.getReadOnly()||(e=e.dataTransfer.dropEffect,p||"move"!=e||w.session.remove(w.getSelectionRange()),w.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!w.getReadOnly()&&r(e.dataTransfer))return c=e.clientX,h=e.clientY,a||n(),$++,e.dataTransfer.dropEffect=p=s(e),A.preventDefault(e)},this.onDragOver=function(e){if(!w.getReadOnly()&&r(e.dataTransfer))return c=e.clientX,h=e.clientY,a||(n(),$++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=s(e),A.preventDefault(e)},this.onDragLeave=function(e){if(--$<=0&&a)return i(),p=null,A.preventDefault(e)},this.onDrop=function(e){if(d){var t=e.dataTransfer;if(g)switch(p){case"move":u=u.contains(d.row,d.column)?{start:d,end:d}:w.moveText(u,d);break;case"copy":u=w.moveText(u,d,!0)}else{t=t.getData("Text");u={start:d,end:w.session.insert(d,t)},w.focus(),p=null}return i(),A.preventDefault(e)}},A.addListener(b,"dragstart",this.onDragStart.bind(t),w),A.addListener(b,"dragend",this.onDragEnd.bind(t),w),A.addListener(b,"dragenter",this.onDragEnter.bind(t),w),A.addListener(b,"dragover",this.onDragOver.bind(t),w),A.addListener(b,"dragleave",this.onDragLeave.bind(t),w),A.addListener(b,"drop",this.onDrop.bind(t),w),null)}function S(e,t,n,i){return Math.sqrt(Math.pow(n-e,2)+Math.pow(i-t,2))}var x=e("../lib/dom"),A=e("../lib/event"),k=e("../lib/useragent");(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.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.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),k.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;k.isIE&&"dragReady"==this.state&&3<S(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&t.dragDrop(),"dragWait"===this.state&&0<S(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){var t,n,i;this.$dragEnabled&&(this.mousedownEvent=e,t=this.editor,n=e.inSelection(),i=e.getButton(),1!==(e.domEvent.detail||1)||0!==i||!n||e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey())||(this.mousedownEvent.time=Date.now(),"unselectable"in(i=e.domEvent.target||e.domEvent.srcElement)&&(i.unselectable="on"),t.getDragDelay()?(k.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0))}}).call(i.prototype),t.DragdropHandler=i}),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 x=e("./mouse_event").MouseEvent,i=e("../lib/event"),a=e("../lib/dom");t.addTouchListeners=function(e,h){function o(){function t(e){var t,n=e.target.getAttribute("action");if("more"==n||!o)return o=!o,e=h.getCopyText(),t=h.session.getUndoManager().hasUndo(),void s.replaceChild(a.buildDom(o?["span",!e&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],e&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],e&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],i&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],t&&["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"]),s.firstChild);"paste"==n?i.readText().then(function(e){h.execCommand(n,e)}):n&&("cut"!=n&&"copy"!=n||(i?i.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(n)),s.firstChild.style.display="none",o=!1,"openCommandPalette"!=n&&h.focus()}var i=window.navigator&&window.navigator.clipboard,o=!1;s=a.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){v="menu",e.stopPropagation(),e.preventDefault(),h.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),t(e)},onclick:t},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function n(){s||o();var e=h.selection.cursor,e=h.renderer.textToScreenCoordinates(e.row,e.column),t=h.renderer.textToScreenCoordinates(0,0).pageX,n=h.renderer.scrollLeft,i=h.container.getBoundingClientRect();s.style.top=e.pageY-i.top-3+"px",e.pageX-i.left<i.width-70?(s.style.left="",s.style.right="10px"):(s.style.right="",s.style.left=t+n-i.left+"px"),s.style.display="",s.firstChild.style.display="none",h.on("input",r)}function r(e){s&&(s.style.display="none"),h.off("input",r)}function u(){m=null,clearTimeout(m);var e=h.selection.getRange(),t=e.contains(y.row,y.column);!e.isEmpty()&&t||(h.selection.moveToPosition(y),h.selection.selectWord()),v="wait",n()}var d,p,g,f,m,t,y,w,s,v="scroll",b=0,$=0,C=0,S=0;i.addListener(e,"contextmenu",function(e){w&&h.textInput.getElement().focus()},h),i.addListener(e,"touchstart",function(e){var t=e.touches;if(m||1<t.length)return clearTimeout(m),m=null,g=-1,void(v="zoom");w=h.$mouseHandler.isMousePressed=!0;var n=h.renderer.layerConfig.lineHeight,i=h.renderer.layerConfig.lineHeight,o=e.timeStamp,r=(f=o,t[0]),s=r.clientX,r=r.clientY,s=(Math.abs(d-s)+Math.abs(p-r)>n&&(g=-1),d=e.clientX=s,p=e.clientY=r,C=S=0,new x(e,h));if(y=s.getDocumentPosition(),o-g<500&&1==t.length&&!b)$++,e.preventDefault(),e.button=0,m=null,clearTimeout(m),h.selection.moveToPosition(y),(r=2<=$?h.selection.getLineRange(y.row):h.session.getBracketRange(y))&&!r.isEmpty()?h.selection.setRange(r):h.selection.selectWord(),v="wait";else{$=0;var s=h.selection.cursor,t=h.selection.isEmpty()?s:h.selection.anchor,r=h.renderer.$cursorLayer.getPixelPosition(s,!0),s=h.renderer.$cursorLayer.getPixelPosition(t,!0),t=h.renderer.scroller.getBoundingClientRect(),a=h.renderer.layerConfig.offset,l=h.renderer.scrollLeft,c=function(e,t){return(e/=i)*e+(t=t/n-.75)*t};if(e.clientX<t.left)return void(v="zoom");r=c(e.clientX-t.left-r.left+l,e.clientY-t.top-r.top+a),c=c(e.clientX-t.left-s.left+l,e.clientY-t.top-s.top+a);r<3.5&&c<3.5&&(v=c<r?"cursor":"anchor"),v=c<3.5?"anchor":r<3.5?"cursor":"scroll",m=setTimeout(u,450)}g=o},h),i.addListener(e,"touchend",function(e){w=h.$mouseHandler.isMousePressed=!1,t&&clearInterval(t),"zoom"==v?(v="",b=0):m?(h.selection.moveToPosition(y),b=0,n()):"scroll"==v?(b+=60,t=setInterval(function(){b--<=0&&(clearInterval(t),t=null),Math.abs(C)<.01&&(C=0),Math.abs(S)<.01&&(S=0),b<20&&(C*=.9),b<20&&(S*=.9);var e=h.session.getScrollTop();h.renderer.scrollBy(10*C,10*S),e==h.session.getScrollTop()&&(b=0)},10),r()):n(),clearTimeout(m),m=null},h),i.addListener(e,"touchmove",function(e){m&&(clearTimeout(m),m=null);var t=e.touches;if(!(1<t.length||"zoom"==v)){var t=t[0],n=d-t.clientX,i=p-t.clientY;if("wait"==v){if(!(4<n*n+i*i))return e.preventDefault();v="cursor"}d=t.clientX,p=t.clientY,e.clientX=t.clientX,e.clientY=t.clientY;var t=e.timeStamp,o=t-f;f=t,"scroll"==v?((t=new x(e,h)).speed=1,t.wheelX=n,t.wheelY=i,10*Math.abs(n)<Math.abs(i)&&(n=0),10*Math.abs(i)<Math.abs(n)&&(i=0),0!=o&&(C=n/o,S=i/o),h._emit("mousewheel",t),t.propagationStopped||(C=S=0)):(n=new x(e,h).getDocumentPosition(),"cursor"==v?h.selection.moveCursorToPosition(n):"anchor"==v&&h.selection.setSelectionAnchor(n.row,n.column),h.renderer.scrollCursorIntoView(n),e.preventDefault())}},h)}}),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 h=e("../lib/event"),u=e("../lib/useragent"),r=e("./default_handlers").DefaultHandlers,s=e("./default_gutter_handler").GutterHandler,d=e("./mouse_event").MouseEvent,a=e("./dragdrop_handler").DragdropHandler,l=e("./touch_handler").addTouchListeners,e=e("../config"),i=(o.prototype.onMouseEvent=function(e,t){this.editor.session&&this.editor._emit(e,new d(t,this.editor))},o.prototype.onMouseMove=function(e,t){var n=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;n&&n.length&&this.editor._emit(e,new d(t,this.editor))},o.prototype.onMouseWheel=function(e,t){var n=new d(t,this.editor);n.speed=2*this.$scrollSpeed,n.wheelX=t.wheelX,n.wheelY=t.wheelY,this.editor._emit(e,n)},o.prototype.setState=function(e){this.state=e},o.prototype.captureMouse=function(e,t){this.x=e.x,this.y=e.y,this.isMousePressed=!0;function n(e){if(e)return u.isWebKit&&!e.which&&a.releaseMouse?a.releaseMouse():(a.x=e.clientX,a.y=e.clientY,t&&t(e),a.mouseEvent=new d(e,a.editor),void(a.$mouseMoved=!0))}function i(e){r.off("beforeEndOperation",l),clearInterval(c),r.session&&o(),a[a.state+"End"]&&a[a.state+"End"](e),a.state="",a.isMousePressed=s.$isMousePressed=!1,s.$keepTextAreaAtCursor&&s.$moveTextAreaToCursor(),a.$onCaptureMouseMove=a.releaseMouse=null,e&&a.onMouseEvent("mouseup",e),r.endOperation()}function o(){a[a.state]&&a[a.state](),a.$mouseMoved=!1}var r=this.editor,s=this.editor.renderer,a=(s.$isMousePressed=!0,this);if(u.isOldIE&&"dblclick"==e.domEvent.type)return setTimeout(function(){i(e)});var l=function(e){a.releaseMouse&&r.curOp.command.name&&r.curOp.selectionChanged&&(a[a.state+"End"]&&a[a.state+"End"](),a.state="",a.releaseMouse())},c=(r.on("beforeEndOperation",l),r.startOperation({command:{name:"mouse"}}),a.$onCaptureMouseMove=n,a.releaseMouse=h.capture(this.editor.container,n,i),setInterval(o,20))},o.prototype.cancelContextMenu=function(){var t=function(e){e&&e.domEvent&&"contextmenu"!=e.domEvent.type||(this.editor.off("nativecontextmenu",t),e&&e.domEvent&&h.stopEvent(e.domEvent))}.bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},o.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},o);function o(i){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;function e(e){document.hasFocus&&document.hasFocus()&&(i.isFocused()||document.activeElement!=(i.textInput&&i.textInput.getElement()))||window.focus(),i.focus(),setTimeout(function(){i.isFocused()||i.focus()})}var o=this,t=(this.editor=i,new r(this),new s(this),new a(this),i.renderer.getMouseEventTarget()),n=(h.addListener(t,"click",this.onMouseEvent.bind(this,"click"),i),h.addListener(t,"mousemove",this.onMouseMove.bind(this,"mousemove"),i),h.addMultiMouseDownListener([t,i.renderer.scrollBarV&&i.renderer.scrollBarV.inner,i.renderer.scrollBarH&&i.renderer.scrollBarH.inner,i.textInput&&i.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",i),h.addMouseWheelListener(i.container,this.onMouseWheel.bind(this,"mousewheel"),i),l(i.container,i),i.renderer.$gutter);h.addListener(n,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),i),h.addListener(n,"click",this.onMouseEvent.bind(this,"gutterclick"),i),h.addListener(n,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),i),h.addListener(n,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),i),h.addListener(t,"mousedown",e,i),h.addListener(n,"mousedown",e,i),u.isIE&&i.renderer.scrollBarV&&(h.addListener(i.renderer.scrollBarV.element,"mousedown",e,i),h.addListener(i.renderer.scrollBarH.element,"mousedown",e,i)),i.on("mousemove",function(e){var t,n;o.state||o.$dragDelay||!o.$dragEnabled||(e=i.renderer.screenToTextCoordinates(e.x,e.y),t=i.session.selection.getRange(),n=i.renderer,!t.isEmpty()&&t.insideStart(e.row,e.column)?n.setCursorStyle("default"):n.setCursorStyle(""))},i)}i.prototype.releaseMouse=null,e.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:u.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),t.MouseHandler=i}),define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var i=e("../lib/dom");t.FoldHandler=function(o){o.on("click",function(e){var t=e.getDocumentPosition(),n=o.session,t=n.getFoldAt(t.row,t.column,1),t=(t&&(e.getAccelKey()?n.removeFold(t):n.expandFold(t),e.stop()),e.domEvent&&e.domEvent.target);t&&i.hasCssClass(t,"ace_inline_button")&&i.hasCssClass(t,"ace_toggle_wrap")&&(n.setOption("wrap",!n.getUseWrapMode()),o.renderer.scrollCursorIntoView())}),o.on("gutterclick",function(e){var t,n;"foldWidgets"==o.renderer.$gutterLayer.getRegion(e)&&(t=e.getDocumentPosition().row,(n=o.session).foldWidgets&&n.foldWidgets[t]&&o.session.onFoldWidgetClick(t,e),o.isFocused()||o.focus(),e.stop())}),o.on("gutterdblclick",function(e){var t,n,i;"foldWidgets"==o.renderer.$gutterLayer.getRegion(e)&&(i=e.getDocumentPosition().row,(n=(n=(t=o.session).getParentFoldRangeData(i,!0)).range||n.firstRange)&&(i=n.start.row,(i=t.getFoldAt(i,t.getLine(i).length,1))?t.removeFold(i):(t.addFold("...",n),o.renderer.scrollCursorIntoView({row:n.start.row,column:0}))),e.stop())})}}),define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(e,t,n){"use strict";var o=e("../lib/keys"),l=e("../lib/event");function i(e){this.$editor=e,this.$data={editor:e},this.$handlers=[],this.setDefaultHandler(e.commands)}i.prototype.setDefaultHandler=function(e){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=e,this.addKeyboardHandler(e,0)},i.prototype.setKeyboardHandler=function(e){var t=this.$handlers;if(t[t.length-1]!=e){for(;t[t.length-1]&&t[t.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(t[t.length-1]);this.addKeyboardHandler(e,1)}},i.prototype.addKeyboardHandler=function(e,t){var n;e&&("function"!=typeof e||e.handleKeyboard||(e.handleKeyboard=e),-1!=(n=this.$handlers.indexOf(e))&&this.$handlers.splice(n,1),null==t?this.$handlers.push(e):this.$handlers.splice(t,0,e),-1==n&&e.attach&&e.attach(this.$editor))},i.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)},i.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},i.prototype.getStatusText=function(){var t=this.$data,n=t.editor;return this.$handlers.map(function(e){return e.getStatusText&&e.getStatusText(n,t)||""}).filter(Boolean).join(" ")},i.prototype.$callKeyboardHandlers=function(e,t,n,i){for(var o,r=!1,s=this.$editor.commands,a=this.$handlers.length;a--&&!((o=this.$handlers[a].handleKeyboard(this.$data,e,t,n,i))&&o.command&&((r="null"==o.command||s.exec(o.command,this.$editor,o.args,i))&&i&&-1!=e&&1!=o.passEvent&&1!=o.command.passEvent&&l.stopEvent(i),r)););return r||-1!=e||(o={command:"insertstring"},r=s.exec("insertstring",this.$editor,t)),r&&this.$editor._signal&&this.$editor._signal("keyboardActivity",o),r},i.prototype.onCommandKey=function(e,t,n){var i=o.keyCodeToString(n);return this.$callKeyboardHandlers(t,i,n,e)},i.prototype.onTextInput=function(e){return this.$callKeyboardHandlers(-1,e)},t.KeyBinding=i}),define("ace/lib/bidiutil",["require","exports","module"],function(e,l,t){"use strict";function c(e,t,n,i){var o,r,s,a=f?$:b,l=0,c=-1,h=null,u=null,d=[];if(!i)for(h=0,i=[];h<n;h++)i[h]=g(e[h]);for(m=f,v=w=y=!1,u=0;u<n;u++){if(s=l,d[u]=o=function(e,t,n,i){var o,r,s,a=t[i];switch(a){case C:case S:y=!1;case k:case A:return a;case x:return y?A:x;case R:return y=!0,S;case T:return k;case E:return i<1||i+1>=t.length||(o=n[i-1])!=x&&o!=A||(l=t[i+1])!=x&&l!=A?k:(l=y?A:l)==o?l:k;case _:return(o=0<i?n[i-1]:L)==x&&i+1<t.length&&t[i+1]==x?x:k;case I:if(0<i&&n[i-1]==x)return x;if(y)return k;for(s=i+1,r=t.length;s<r&&t[s]==I;)s++;return s<r&&t[s]==x?x:k;case O:for(r=t.length,s=i+1;s<r&&t[s]==O;)s++;if(s<r){var l=e[i],l=1425<=l&&l<=2303||64286==l;if(o=t[s],l&&(o==S||o==R))return S}return i<1||(o=t[i-1])==L?k:n[i-1];case L:return w=!(y=!1),f;case M:return v=!0,k;case D:case F:case N:case H:case W:y=!1;case B:return k}}(e,i,d,u),s=240&(l=a[s][o]),l&=15,t[u]=r=a[l][5],0<s)if(16==s){for(h=c;h<u;h++)t[h]=1;c=-1}else c=-1;if(a[l][6])-1==c&&(c=u);else if(-1<c){for(h=c;h<u;h++)t[h]=r;c=-1}i[u]==L&&(t[u]=0),m|=r}if(v)for(h=0;h<n;h++)if(i[h]==M){t[h]=f;for(var p=h-1;0<=p&&i[p]==T;p--)t[p]=f}}function h(e,t,n){if(!(m<e))if(1!=e||1!=f||w)for(var i,o,r,s,a=n.length,l=0;l<a;){if(t[l]>=e){for(i=l+1;i<a&&t[i]>=e;)i++;for(o=l,r=i-1;o<r;o++,r--)s=n[o],n[o]=n[r],n[r]=s;l=i}l++}else n.reverse()}function g(e){var t=e.charCodeAt(0),n=t>>8;return 0==n?191<t?C:i[t]:5==n?/[\u0591-\u05f4]/.test(e)?S:C:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?O:/[\u0660-\u0669\u066b-\u066c]/.test(e)?A:1642==t?I:/[\u06f0-\u06f9]/.test(e)?x:R:32==n&&t<=8287?o[255&t]:254==n&&65136<=t?R:k}var f=0,m=0,y=!1,w=!1,v=!1,b=[[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]],$=[[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]],C=0,S=1,x=2,A=3,k=4,L=5,M=6,R=7,T=8,E=9,_=10,I=11,O=12,D=13,F=14,W=15,N=16,H=17,B=18,i=[B,B,B,B,B,B,B,B,B,M,L,M,T,L,B,B,B,B,B,B,B,B,B,B,B,B,B,B,L,L,L,M,T,k,k,I,I,I,k,k,k,k,k,_,E,_,E,E,x,x,x,x,x,x,x,x,x,x,E,k,k,k,k,k,k,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,k,k,k,k,k,k,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,C,k,k,k,k,B,B,B,B,B,B,L,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,B,E,k,I,I,I,I,k,k,k,k,C,k,k,B,k,k,I,I,x,x,k,C,k,k,k,x,C,k,k,k,k,k],o=[T,T,T,T,T,T,T,T,T,T,T,B,B,B,C,S,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,T,L,D,F,W,N,H,E,I,I,I,I,I,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,E,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,k,T];l.L=C,l.R=S,l.EN=x,l.ON_R=3,l.AN=4,l.R_H=5,l.B=6,l.RLE=7,l.DOT="·",l.doBidiReorder=function(e,t,n){if(e.length<2)return{};var i=e.split(""),o=new Array(i.length),r=new Array(i.length),s=[];f=n?1:0,c(i,s,i.length,t);for(var a=0;a<o.length;o[a]=a,a++);h(2,s,o),h(1,s,o);for(a=0;a<o.length-1;a++)t[a]===A?s[a]=l.AN:s[a]===S&&(t[a]>R&&t[a]<D||t[a]===k||t[a]===B)?s[a]=l.ON_R:0<a&&"ل"===i[a-1]&&/\u0622|\u0623|\u0625|\u0627/.test(i[a])&&(s[a-1]=s[a]=l.R_H,a++);i[i.length-1]===l.DOT&&(s[i.length-1]=l.B),"‫"===i[0]&&(s[0]=l.RLE);for(a=0;a<o.length;a++)r[a]=s[o[a]];return{logicalFromVisual:o,bidiLevels:r}},l.hasBidiCharacters=function(e,t){for(var n=!1,i=0;i<e.length;i++)t[i]=g(e.charAt(i)),n||t[i]!=S&&t[i]!=R&&t[i]!=A||(n=!0);return n},l.getVisualFromLogicalIdx=function(e,t){for(var n=0;n<t.logicalFromVisual.length;n++)if(t.logicalFromVisual[n]==e)return n;return 0}}),define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(e,t,n){"use strict";var a=e("./lib/bidiutil"),s=e("./lib/lang"),i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/;function o(e){this.session=e,this.bidiMap={},this.currentRow=null,this.bidiUtil=a,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=i.test(e.getValue())}o.prototype.isBidiRow=function(e,t,n){return!!this.seenBidi&&(e!==this.currentRow&&(this.currentRow=e,this.updateRowLine(t,n),this.updateBidiMap()),this.bidiMap.bidiLevels)},o.prototype.onChange=function(e){this.seenBidi?this.currentRow=null:"insert"==e.action&&i.test(e.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},o.prototype.getDocumentRow=function(){var e=0,t=this.session.$screenRowCache;return e=t.length&&0<=(t=this.session.$getRowCacheIndex(t,this.currentRow))?this.session.$docRowCache[t]:e},o.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var n,i=this.session.$getRowCacheIndex(t,this.currentRow);0<this.currentRow-e&&(n=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===i;)i=n,e++;else e=this.currentRow;return e},o.prototype.updateRowLine=function(e,t){var n,i=(e=void 0===e?this.getDocumentRow():e)===this.session.getLength()-1?this.EOF:this.EOL,o=(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode?(e=this.session.$wrapData[e])&&(0<(t=void 0===t?this.getSplitIndex():t)&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[a.L],this.line=t<e.length?this.line.substring(e[t-1],e[t]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[t]),t==e.length&&(this.line+=this.showInvisibles?i:a.DOT)):this.line+=this.showInvisibles?i:a.DOT,this.session),r=0;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(e,t){return"\t"===e||o.isFullWidth(e.charCodeAt(0))?(n="\t"===e?o.getScreenTabSize(t+r):2,r+=n-1,s.stringRepeat(a.DOT,n)):e}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==a.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},o.prototype.updateBidiMap=function(){var e=[];a.hasBidiCharacters(this.line,e)||this.isRtlDir?this.bidiMap=a.doBidiReorder(this.line,e,this.isRtlDir):this.bidiMap={}},o.prototype.markAsDirty=function(){this.currentRow=null},o.prototype.updateCharacterWidths=function(e){var t;this.characterWidth!==e.$characterSize.width&&(this.fontMetrics=e,t=this.characterWidth=e.$characterSize.width,e=e.$measureCharWidth("ה"),this.charWidths[a.L]=this.charWidths[a.EN]=this.charWidths[a.ON_R]=t,this.charWidths[a.R]=this.charWidths[a.AN]=e,this.charWidths[a.R_H]=.45*e,this.charWidths[a.B]=this.charWidths[a.RLE]=0,this.currentRow=null)},o.prototype.setShowInvisibles=function(e){this.showInvisibles=e,this.currentRow=null},o.prototype.setEolChar=function(e){this.EOL=e},o.prototype.setContentWidth=function(e){this.contentWidth=e},o.prototype.isRtlLine=function(e){return!!this.$isRtl||(null!=e?this.session.getLine(e).charAt(0)==this.RLE:this.isRtlDir)},o.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)},o.prototype.getPosLeft=function(e){e-=this.wrapIndent;var t=this.line.charAt(0)===this.RLE?1:0,n=t<e?this.session.getOverwrite()?e:e-1:t,i=a.getVisualFromLogicalIdx(n,this.bidiMap),o=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&e<=t&&o[i]%2!=0&&i++;for(var s=0;s<i;s++)r+=this.charWidths[o[s]];return!this.session.getOverwrite()&&t<e&&o[i]%2==0&&(r+=this.charWidths[o[i]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},o.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=a<=d&&d<l)&&!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},o.prototype.offsetToCol=function(e){this.isRtlDir&&(e-=this.rtlLineOffset);var t=0,e=Math.max(e,0),n=0,i=0,o=this.bidiMap.bidiLevels,r=this.charWidths[o[i]];for(this.wrapIndent&&(e-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n+r/2<e;){if(n+=r,i===o.length-1){r=0;break}r=this.charWidths[o[++i]]}return 0===(t=0<i&&o[i-1]%2!=0&&o[i]%2==0?(e<n&&i--,this.bidiMap.logicalFromVisual[i]):0<i&&o[i-1]%2==0&&o[i]%2!=0?1+(n<e?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?1+this.bidiMap.logicalFromVisual[i]:(0<i&&o[i-1]%2!=0&&0!==r&&i--,this.bidiMap.logicalFromVisual[i]))&&this.isRtlDir&&t++,t+this.wrapIndent},t.BidiHandler=o}),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,e=(a.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},a.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},a.prototype.getCursor=function(){return this.lead.getPosition()},a.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},a.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},a.prototype.getSelectionLead=function(){return this.lead.getPosition()},a.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},a.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)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(e,t){var n=t?e.end:e.start,t=t?e.start:e.end;this.$setSelection(n.row,n.column,t.row,t.column)},a.prototype.$setSelection=function(e,t,n,i){var o,r;this.$silent||(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"))},a.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},a.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},a.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},a.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},a.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(e,t){var n;return void 0===t&&(e=(n=e||this.lead).row,t=n.column),this.session.getWordRange(e,t)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},a.prototype.getLineRange=function(e,t){var e="number"==typeof e?e:this.lead.row,n=this.session.getFoldLine(e),n=n?(e=n.start.row,n.end.row):e;return!0===t?new s(e,0,n,this.session.getLine(n).length):new s(e,0,n+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.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},a.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0<t.row&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length):(e=this.session.getTabSize(),this.wouldMoveIntoSoftTab(t,e,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-e):this.moveCursorBy(0,-1))},a.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,1))?this.moveCursorTo(e.end.row,e.end.column):this.lead.column==this.doc.getLine(this.lead.row).length?this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0):(e=this.session.getTabSize(),t=this.lead,this.wouldMoveIntoSoftTab(t,e,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,e):this.moveCursorBy(0,1))},a.prototype.moveCursorLineStart=function(){var e=this.lead.row,t=this.lead.column,n=this.session.documentToScreenRow(e,t),n=this.session.screenToDocumentPosition(n,0),e=this.session.getDisplayLine(e,null,n.row,n.column).match(/^\s*/);e[0].length==t||this.session.$useEmacsStyleLineStart||(n.column+=e[0].length),this.moveCursorToPosition(n)},a.prototype.moveCursorLineEnd=function(){var e,t=this.lead,t=this.session.getDocumentLastRowColumnPosition(t.row,t.column);this.lead.column==t.column&&(e=this.session.getLine(t.row),t.column==e.length&&0<(e=e.search(/\s+$/))&&(t.column=e)),this.moveCursorTo(t.row,t.column)},a.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},a.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},a.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,n=this.doc.getLine(e),i=n.substring(t),o=(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,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)}},a.prototype.moveCursorLongWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(n=this.session.getFoldAt(e,t,-1))this.moveCursorTo(n.start.row,n.start.column);else{var n=this.session.getFoldStringAt(e,t,-1),n=(null==n&&(n=this.doc.getLine(e).substring(0,t)),o.stringReverse(n));if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(n)&&(t-=this.session.nonTokenRe.lastIndex,n=n.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),t<=0)return this.moveCursorTo(e,0),this.moveCursorLeft(),void(0<e&&this.moveCursorWordLeft());this.session.tokenRe.exec(n)&&(t-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,t)}},a.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{for(;(t=e[n])&&i.test(t);)n++;if(n<1)for(o.lastIndex=0;(t=e[n])&&!o.test(t);)if(o.lastIndex=0,n++,i.test(t)){if(2<n){n--;break}for(;(t=e[n])&&i.test(t);)n++;if(2<n)break}}return o.lastIndex=0,n},a.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){for(var r=this.doc.getLength();i=this.doc.getLine(++e),e<r&&/^\s*$/.test(i););/^\s+/.test(i)||(i=""),t=0}o=this.$shortWordEndIndex(i);this.moveCursorTo(e,t+o)},a.prototype.moveCursorShortWordLeft=function(){var e=this.lead.row,t=this.lead.column;if(i=this.session.getFoldAt(e,t,-1))return this.moveCursorTo(i.start.row,i.start.column);var n=this.session.getLine(e).substring(0,t);if(0===t){for(;n=this.doc.getLine(--e),0<e&&/^\s*$/.test(n););t=n.length,/\s+$/.test(n)||(n="")}var i=o.stringReverse(n),i=this.$shortWordEndIndex(i);return this.moveCursorTo(e,t-i)},a.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},a.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},a.prototype.moveCursorBy=function(e,t){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),o=(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]&&(o=this.session.lineWidgets[this.lead.row],e<0?e-=o.rowsAbove||0:0<e&&(e+=o.rowCount-(o.rowsAbove||0))),this.session.screenToDocumentPosition(i.row+e,i.column,n));0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},a.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},a.prototype.moveCursorTo=function(e,t,n){var i=this.session.getFoldAt(e,t,1),i=(i&&(e=i.start.row,t=i.start.column),this.$keepDesiredColumnOnChange=!0,this.session.getLine(e));/[\uDC00-\uDFFF]/.test(i.charAt(t))&&i.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?--t:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},a.prototype.moveCursorToScreen=function(e,t,n){e=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(e.row,e.column,n)},a.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},a.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},a.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},a.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var n=this.getCursor();return s.fromPoints(t,n)}catch(e){return s.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},a.prototype.toJSON=function(){var e;return this.rangeCount?e=this.ranges.map(function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}):(e=this.getRange()).isBackwards=this.isBackwards(),e},a.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&1<e.length){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)},a.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},a);function a(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")})}e.prototype.setSelectionAnchor=e.prototype.setAnchor,e.prototype.getSelectionAnchor=e.prototype.getAnchor,e.prototype.setSelectionRange=e.prototype.setRange,i.implement(e.prototype,r),t.Selection=e}),define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(e,t,n){"use strict";var e=e("./lib/report_error").reportError,w=2e3,i=(o.prototype.$setMaxTokenCount=function(e){w=0|e},o.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},o.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},o.prototype.removeCapturingGroups=function(e){return e.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(e,t){return t?"(?:":e})},o.prototype.createSplitterRegexp=function(e,t){var s,a,l;return-1!=e.indexOf("(?=")&&(s=0,a=!1,l={},e.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,n,i,o,r){return a?a="]"!=o:o?a=!0:i?(s==l.stack&&(l.end=r+1,l.stack=-1),s--):n&&(s++,1!=n.length&&(l.stack=s,l.start=r)),e}),null!=l.end&&/^\)*$/.test(e.substr(l.end))&&(e=e.substring(0,l.start)+e.substr(l.end))),"$"!=(e="^"!=e.charAt(0)?"^"+e:e).charAt(e.length-1)&&(e+="$"),new RegExp(e,(t||"").replace("g",""))},o.prototype.getLineTokens=function(e,t){t&&"string"!=typeof t?"#tmp"===(t=(n=t.slice(0))[0])&&(n.shift(),t=n.shift()):n=[];for(var n,i,o=t||"start",r=this.states[o],s=(r||(r=this.states[o="start"]),this.matchMappings[o]),a=this.regExps[o],l=[],c=a.lastIndex=0,h=0,u={type:null,value:""};i=a.exec(e);){var d,p=s.defaultToken,g=null,f=i[0],m=a.lastIndex;m-f.length>c&&(d=e.substring(c,m-f.length),u.type==p?u.value+=d:(u.type&&l.push(u),u={type:p,value:d}));for(var y=0;y<i.length-2;y++)if(void 0!==i[y+1]){p=(g=r[s[y]]).onMatch?g.onMatch(f,o,n,e):g.token,g.next&&(o="string"==typeof g.next?g.next:g.next(o,n),(r=this.states[o])||(this.reportError("state doesn't exist",o),r=this.states[o="start"]),s=this.matchMappings[o],(a=this.regExps[o]).lastIndex=c=m),g.consumeLineEnd&&(c=m);break}if(f)if("string"==typeof p)g&&!1===g.merge||u.type!==p?(u.type&&l.push(u),u={type:p,value:f}):u.value+=f;else if(p){u.type&&l.push(u);for(u={type:null,value:""},y=0;y<p.length;y++)l.push(p[y])}if(c==e.length)break;if(c=m,h++>w){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c<e.length;)u.type&&l.push(u),u={value:e.substring(c,c+=500),type:"overflow"};o="start",n=[];break}}return u.type&&l.push(u),1<n.length&&n[0]!==o&&n.unshift("#tmp",o),{tokens:l,state:n.length?n:o}},o);function o(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,h,u=n[l];u.defaultToken&&(r.defaultToken=u.defaultToken),u.caseInsensitive&&-1===s.indexOf("i")&&(s+="i"),u.unicode&&-1===s.indexOf("u")&&(s+="u"),null!=u.regex&&(u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1)),c=u.regex,h=new RegExp("(?:("+c+")|(.))").exec("a").length-2,Array.isArray(u.token)?1==u.token.length||1==h?u.token=u.token[0]:h-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:h-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):"function"!=typeof u.token||u.onMatch||(u.onMatch=1<h?this.$applyToken:u.token),1<h&&(c=/\\\d/.test(u.regex)?u.regex.replace(/\\([0-9]+)/g,function(e,t){return"\\"+(parseInt(t,10)+o+1)}):(h=1,this.removeCapturingGroups(u.regex)),u.splitRegex||"string"==typeof u.token||a.push(u)),r[o]=l,o+=h,i.push(c),u.onMatch||(u.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)}}i.prototype.reportError=e,t.Tokenizer=i}),define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(e,t,n){"use strict";var l=e("../lib/deep_copy").deepCopy,e=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,o){e="function"==typeof e?(new e).getRules():e;if(i)for(var r=0;r<i.length;r++)i[r]=t+i[r];else for(var s in i=[],e)i.push(t+s);if(this.addRules(e,t),n)for(var a=Array.prototype[o?"push":"unshift"],r=0;r<i.length;r++)a.apply(this.$rules[i[r]],l(n));this.$embeds||(this.$embeds=[]),this.$embeds.push(t)},this.getEmbeds=function(){return this.$embeds};function u(e,t){return"start"==e&&!t.length||t.unshift(this.nextState,e),this.nextState}function d(e,t){return t.shift(),t.shift()||"start"}this.normalizeRules=function(){var c=0,h=this.$rules;Object.keys(h).forEach(function e(t){var n=h[t];n.processed=!0;for(var i=0;i<n.length;i++){var o=n[i],r=null,s=(Array.isArray(o)&&(r=o,o={}),!o.regex&&o.start&&(o.regex=o.start,o.next||(o.next=[]),o.next.push({defaultToken:o.token},{token:o.token+".end",regex:o.end||o.start,next:"pop"}),o.token=o.token+".start",o.push=!0),o.next||o.push);if(s&&Array.isArray(s)?((l=o.stateName)||("string"!=typeof(l=o.token)&&(l=l[0]||""),h[l]&&(l+=c++)),h[l]=s,e(o.next=l)):"pop"==s&&(o.next=d),o.push&&(o.nextState=o.next||o.push,o.next=u,delete o.push),o.rules)for(var a in o.rules)h[a]?h[a].push&&h[a].push.apply(h[a],o.rules[a]):h[a]=o.rules[a];var l="string"==typeof o?o:o.include;l&&("$self"===l&&(l="start"),r=Array.isArray(l)?l.map(function(e){return h[e]}):h[l]),r&&(s=[i,1].concat(r),o.noEscape&&(s=s.filter(function(e){return!e.next})),n.splice.apply(n,s),i--),o.keywordMap&&(o.token=this.createKeywordMapper(o.keywordMap,o.defaultToken||"text",o.caseInsensitive),delete o.defaultToken)}},this)},this.createKeywordMapper=function(o,t,r,s){var a=Object.create(null);return this.$keywordList=[],Object.keys(o).forEach(function(e){for(var t=o[e].split(s||"|"),n=t.length;n--;){var i=t[n];this.$keywordList.push(i),r&&(i=i.toLowerCase()),a[i]=e}},this),o=null,r?function(e){return a[e.toLowerCase()]||t}:function(e){return a[e]||t}},this.getKeywords=function(){return this.$keywords}}).call(e.prototype),t.TextHighlightRules=e}),define("ace/mode/behaviour",["require","exports","module"],function(e,t,n){"use strict";var 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){e=("function"==typeof e?new e:e).getBehaviours(t),this.addBehaviours(e)},this.getBehaviours=function(e){if(!e)return this.$behaviours;for(var t={},n=0;n<e.length;n++)this.$behaviours[e[n]]&&(t[e[n]]=this.$behaviours[e[n]]);return t}}).call(i.prototype),t.Behaviour=i}),define("ace/token_iterator",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("./range").Range;function o(e,t,n){this.$session=e,this.$row=t,this.$rowTokens=e.getTokens(t);e=e.getTokenAt(t,n);this.$tokenIndex=e?e.index:-1}o.prototype.stepBackward=function(){for(--this.$tokenIndex;this.$tokenIndex<0;){if(--this.$row,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]},o.prototype.stepForward=function(){var e;for(this.$tokenIndex+=1;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]},o.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},o.prototype.getCurrentTokenRow=function(){return this.$row},o.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0!==n)return n;for(n=0;0<t;)n+=e[--t].value.length;return n},o.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},o.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new i(this.$row,t,this.$row,t+e.value.length)},t.TokenIterator=o}),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";function d(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,l.rangeCount!=e.multiSelect.rangeCount&&(l={rangeCount:e.multiSelect.rangeCount})),l[t])return g=l[t];g=l[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}}function p(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)]}}var g,i=e("../../lib/oop"),o=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,f=e("../../lib/lang"),s=["text","paren.rparen","rparen","paren","punctuation.operator"],a=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],l={},m={'"':'"',"'":"'"},y=function(u){u=u||{},this.add("braces","insertion",function(e,t,n,i,o){var r=n.getCursorPosition(),s=i.doc.getLine(r.row);if("{"==o)return d(n),l=n.getSelectionRange(),""!==(c=i.doc.getTextRange(l))&&"{"!==c&&n.getWrapBehavioursEnabled()?p(l,c,"{","}"):y.isSaneInsertion(n,i)?/[\]\}\)]/.test(s[r.column])||n.inMultiSelectMode||u.braces?(y.recordAutoInsert(n,i,"}"),{text:"{}",selection:[1,1]}):(y.recordMaybeInsert(n,i,"{"),{text:"{",selection:[1,1]}):void 0;if("}"==o){d(n);var a=s.substring(r.column,r.column+1);if("}"==a)if(null!==i.$findOpeningBracket("}",{column:r.column+1,row:r.row})&&y.isAutoInsertedClosing(r,s,o))return y.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==o||"\r\n"==o){d(n);var l="";if(y.isMaybeInsertedClosing(r,s)&&(l=f.stringRepeat("}",g.maybeInsertedBrackets),y.clearMaybeInsertedClosing()),"}"===(a=s.substring(r.column,r.column+1))){var c=i.findMatchingBracket({row:r.row,column:r.column+1},"}");if(!c)return null;var h=this.$getIndent(i.getLine(c.row))}else{if(!l)return void y.clearMaybeInsertedClosing();h=this.$getIndent(s)}o=h+i.getTabString();return{text:"\n"+o+"\n"+h+l,selection:[1,o.length,1,o.length]}}y.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(e,t,n,i,o){var r=i.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==r){if(d(n),"}"==i.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;g.maybeInsertedBrackets--}}),this.add("parens","insertion",function(e,t,n,i,o){if("("==o)return d(n),r=n.getSelectionRange(),""!==(s=i.doc.getTextRange(r))&&n.getWrapBehavioursEnabled()?p(r,s,"(",")"):y.isSaneInsertion(n,i)?(y.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}):void 0;if(")"==o){d(n);var r=n.getCursorPosition(),s=i.doc.getLine(r.row),n=s.substring(r.column,r.column+1);if(")"==n)if(null!==i.$findOpeningBracket(")",{column:r.column+1,row:r.row})&&y.isAutoInsertedClosing(r,s,o))return y.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&&(d(n),")"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o}),this.add("brackets","insertion",function(e,t,n,i,o){if("["==o)return d(n),r=n.getSelectionRange(),""!==(s=i.doc.getTextRange(r))&&n.getWrapBehavioursEnabled()?p(r,s,"[","]"):y.isSaneInsertion(n,i)?(y.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}):void 0;if("]"==o){d(n);var r=n.getCursorPosition(),s=i.doc.getLine(r.row),n=s.substring(r.column,r.column+1);if("]"==n)if(null!==i.$findOpeningBracket("]",{column:r.column+1,row:r.row})&&y.isAutoInsertedClosing(r,s,o))return y.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&&(d(n),"]"==i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)))return o.end.column++,o}),this.add("string_dquotes","insertion",function(e,t,n,i,o){var r=i.$mode.$quotes||m;if(1==o.length&&r[o]&&(!this.lineCommentStart||-1==this.lineCommentStart.indexOf(o))){d(n);var s=n.getSelectionRange(),a=i.doc.getTextRange(s);if(""!==a&&(1!=a.length||!r[a])&&n.getWrapBehavioursEnabled())return p(s,a,o,o);if(!a){var r=n.getCursorPosition(),s=i.doc.getLine(r.row),a=s.substring(r.column-1,r.column),n=s.substring(r.column,r.column+1),l=i.getTokenAt(r.row,r.column),c=i.getTokenAt(r.row,r.column+1);if("\\"==a&&l&&/escape/.test(l.type))return null;var h,l=l&&/string|escape/.test(l.type),u=!c||/string|escape/.test(c.type);if(n==o)(h=l!==u)&&/string\.end/.test(c.type)&&(h=!1);else{if(l&&!u)return null;if(l&&u)return null;c=i.$mode.tokenRe,l=(c.lastIndex=0,c.test(a)),u=(c.lastIndex=0,c.test(n)),i=i.$mode.$pairQuotesAfter;if(!(i&&i[o]&&i[o].test(a))&&l||u)return null;if(n&&!/[\s;,.})\]\\]/.test(n))return null;i=s[r.column-2];if(a==o&&(i==o||c.test(i)))return null;h=!0}return{text:h?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(e,t,n,i,o){var r=i.$mode.$quotes||m,s=i.doc.getTextRange(o);if(!o.isMultiLine()&&r.hasOwnProperty(s)&&(d(n),i.doc.getLine(o.start.row).substring(o.start.column+1,o.start.column+2)==s))return o.end.column++,o}),!1!==u.closeDocComment&&this.add("doc comment end","insertion",function(e,t,n,i,o){var r;if("doc-start"===e&&("\n"===o||"\r\n"===o)&&n.selection.isEmpty())return e=n.getCursorPosition(),n=i.doc.getLine(e.row),i=i.doc.getLine(e.row+1),r=this.$getIndent(n),/\s*\*/.test(i)?/^\s*\*/.test(n)?{text:o+r+"* ",selection:[1,3+r.length,1,3+r.length]}:{text:o+r+" * ",selection:[1,3+r.length,1,3+r.length]}:/\/\*\*/.test(n.substring(0,e.column))?{text:o+r+" * "+o+" "+r+"*/",selection:[1,4+r.length,1,4+r.length]}:void 0})};y.isSaneInsertion=function(e,t){var n=e.getCursorPosition(),i=new r(t,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",s)){if(/[)}\]]/.test(e.session.getLine(n.row)[n.column]))return!0;e=new r(t,n.row,n.column+1);if(!this.$matchTokenType(e.getCurrentToken()||"text",s))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",a)},y.$matchTokenType=function(e,t){return-1<t.indexOf(e.type||e)},y.recordAutoInsert=function(e,t,n){e=e.getCursorPosition(),t=t.doc.getLine(e.row);this.isAutoInsertedClosing(e,t,g.autoInsertedLineEnd[0])||(g.autoInsertedBrackets=0),g.autoInsertedRow=e.row,g.autoInsertedLineEnd=n+t.substr(e.column),g.autoInsertedBrackets++},y.recordMaybeInsert=function(e,t,n){e=e.getCursorPosition(),t=t.doc.getLine(e.row);this.isMaybeInsertedClosing(e,t)||(g.maybeInsertedBrackets=0),g.maybeInsertedRow=e.row,g.maybeInsertedLineStart=t.substr(0,e.column)+n,g.maybeInsertedLineEnd=t.substr(e.column),g.maybeInsertedBrackets++},y.isAutoInsertedClosing=function(e,t,n){return 0<g.autoInsertedBrackets&&e.row===g.autoInsertedRow&&n===g.autoInsertedLineEnd[0]&&t.substr(e.column)===g.autoInsertedLineEnd},y.isMaybeInsertedClosing=function(e,t){return 0<g.maybeInsertedBrackets&&e.row===g.maybeInsertedRow&&t.substr(e.column)===g.maybeInsertedLineEnd&&t.substr(0,e.column)==g.maybeInsertedLineStart},y.popAutoInsertedClosing=function(){g.autoInsertedLineEnd=g.autoInsertedLineEnd.substr(1),g.autoInsertedBrackets--},y.clearMaybeInsertedClosing=function(){g&&(g.maybeInsertedBrackets=0,g.maybeInsertedRow=-1)},i.inherits(y,o),t.CstyleBehaviour=y}),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)}),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 a=e("../config"),i=e("../tokenizer").Tokenizer,o=e("./text_highlight_rules").TextHighlightRules,r=e("./behaviour/cstyle").CstyleBehaviour,s=e("../unicode"),$=e("../lib/lang"),f=e("../token_iterator").TokenIterator,m=e("../range").Range,e=function(){this.HighlightRules=o};(function(){this.$defaultBehaviour=new r,this.tokenRe=new RegExp("^["+s.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+s.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new i(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,o,n,i){function t(e){for(var t=n;t<=i;t++)e(r.getLine(t),t)}var r=o.doc,s=!0,a=!0,l=1/0,c=o.getTabSize(),h=!1;if(this.lineCommentStart){m=Array.isArray(this.lineCommentStart)?(w=this.lineCommentStart.map($.escapeRegExp).join("|"),this.lineCommentStart[0]):(w=$.escapeRegExp(this.lineCommentStart),this.lineCommentStart),w=new RegExp("^(\\s*)(?:"+w+") ?"),h=o.getUseSoftTabs();var u=function(e,t){var n,i,o=e.match(w);o&&(n=o[1].length,i=o[0].length,f(e,n,i)||" "!=o[0][i-1]||i--,r.removeInLine(t,n,i))},d=m+" ",p=function(e,t){s&&!/\S/.test(e)||(f(e,l,l)?r.insertInLine({row:t,column:l},d):r.insertInLine({row:t,column:l},m))},g=function(e,t){return w.test(e)},f=function(e,t,n){for(var i=0;t--&&" "==e.charAt(t);)i++;if(i%c!=0)return!1;for(i=0;" "==e.charAt(n++);)i++;return 2<c?i%c!=c-1:i%c==0}}else{if(!this.blockComment)return!1;var m=this.blockComment.start,y=this.blockComment.end,w=new RegExp("^(\\s*)(?:"+$.escapeRegExp(m)+")"),v=new RegExp("(?:"+$.escapeRegExp(y)+")\\s*$"),p=function(e,t){g(e,t)||s&&!/\S/.test(e)||(r.insertInLine({row:t,column:e.length},y),r.insertInLine({row:t,column:l},m))},u=function(e,t){var n;(n=e.match(v))&&r.removeInLine(t,e.length-n[0].length,e.length),(n=e.match(w))&&r.removeInLine(t,n[1].length,n[0].length)},g=function(e,t){if(w.test(e))return!0;for(var n=o.getTokens(t),i=0;i<n.length;i++)if("comment"===n[i].type)return!0}}var b=1/0;t(function(e,t){var n=e.search(/\S/);-1!==n?(n<l&&(l=n),a&&!g(e,t)&&(a=!1)):b>e.length&&(b=e.length)}),l==1/0&&(l=b,a=s=!1),h&&l%c!=0&&(l=Math.floor(l/c)*c),t(a?u:p)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(d=new f(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(o.start))){var c=d.getCurrentTokenRow(),h=d.getCurrentTokenColumn()+p,u=new m(c,h,c,h+o.start.length);break}a=d.stepBackward()}for(var d,p,a=(d=new f(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(p=a.value.indexOf(o.end))){var c=d.getCurrentTokenRow(),h=d.getCurrentTokenColumn()+p,g=new m(c,h,c,h+o.end.length);break}a=d.stepForward()}g&&t.remove(g),u&&(t.remove(u),r=u.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);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},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){var n,i,o;e[t]&&(i=(n=e[t]).prototype.$id,(o=a.$modes[i])||(a.$modes[i]=o=new n),a.$modes[t]||(a.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o)}for(var r=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=this,t=0;t<r.length;t++)!function(e){var t,n;t=r[e],n=s[t],s[r[e]]=function(){return this.$delegator(t,arguments,n)}}(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];if(s=this.$modes[o])return s[e].apply(s,[i[1]].concat([].slice.call(t,1)))}i=i[0]||"start"}for(var r=0;r<this.$embeds.length;r++)if(this.$modes[this.$embeds[r]]){var s,a=i.split(this.$embeds[r]);if(!a[0]&&a[1])return t[0]=a[1],(s=this.$modes[this.$embeds[r]])[e].apply(s,t)}o=n.apply(this,t);return n?o:void 0},this.transformAction=function(e,t,n,i,o){if(this.$behaviour){var r,s=this.$behaviour.getBehaviours();for(r in s)if(s[r][t]){var a=s[r][t].apply(this,arguments);if(a)return a}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,n=[];for(i in t)for(var i,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++)/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){return(this.$keywordList||this.$createKeywordList()).map(function(e){return{name:e,value:e,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(e.prototype),t.Mode=e}),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":1===t.lines.length?e[i]=r.substring(0,o)+t.lines[0]+r.substring(o):(s=[i,1].concat(t.lines),e.splice.apply(e,s),e[i]=r.substring(0,o)+e[i],e[i+t.lines.length-1]+=r.substring(o));break;case"remove":var s=t.end.column,a=t.end.row;i===a?e[i]=r.substring(0,o)+r.substring(s):e.splice(i,a-i+1,r.substring(0,o)+e[a].substring(s))}}}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";function a(e,t,n){n=n?e.column<=t.column:e.column<t.column;return e.row<t.row||e.row==t.row&&n}var i=e("./lib/oop"),e=e("./lib/event_emitter").EventEmitter,o=(r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(e){var t,n,i,o,r,s;e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row||(e=e,t={row:this.row,column:this.column},n=this.$insertRight,i=((s="insert"==e.action)?1:-1)*(e.end.row-e.start.row),o=(s?1:-1)*(e.end.column-e.start.column),r=e.start,s=s?r:e.end,e=a(t,r,n)?{row:t.row,column:t.column}:a(s,t,!n)?{row:t.row+i,column:t.column+(t.row==s.row?o:0)}:{row:r.row,column:r.column},this.setPosition(e.row,e.column,!0))},r.prototype.setPosition=function(e,t,n){n=n?{row:e,column:t}:this.$clipPositionToDocument(e,t);this.row==n.row&&this.column==n.column||(e={row:this.row,column:this.column},this.row=n.row,this.column=n.column,this._signal("change",{old:e,value:n}))},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},r.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},r);function r(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)}o.prototype.$insertRight=!1,i.implement(o.prototype,e),t.Anchor=o}),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,e=(l.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||"")},l.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},l.prototype.createAnchor=function(e,t){return new a(this,e,t)},l.prototype.$detectNewLine=function(e){e=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},l.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},l.prototype.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},l.prototype.getNewLineMode=function(){return this.$newLineMode},l.prototype.isNewLine=function(e){return"\r\n"==e||"\r"==e||"\n"==e},l.prototype.getLine=function(e){return this.$lines[e]||""},l.prototype.getLines=function(e,t){return this.$lines.slice(e,t+1)},l.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},l.prototype.getLength=function(){return this.$lines.length},l.prototype.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},l.prototype.getLinesForRange=function(e){var t,n;return e.start.row===e.end.row?t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)]:((t=this.getLines(e.start.row,e.end.row))[0]=(t[0]||"").substring(e.start.column),n=t.length-1,e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))),t},l.prototype.insertLines=function(e,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},l.prototype.removeLines=function(e,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},l.prototype.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},l.prototype.insert=function(e,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},l.prototype.insertInLine=function(e,t){var n=this.clippedPos(e.row,e.column),e=this.pos(e.row,e.column+t.length);return this.applyDelta({start:n,end:e,action:"insert",lines:[t]},!0),this.clonePos(e)},l.prototype.clippedPos=function(e,t){var n=this.getLength(),n=(void 0===e?e=n:e<0?e=0:n<=e&&(e=n-1,t=void 0),this.getLine(e));return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},l.prototype.clonePos=function(e){return{row:e.row,column:e.column}},l.prototype.pos=function(e,t){return{row:e,column:t}},l.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},l.prototype.insertFullLines=function(e,t){var n=0,n=(e=Math.min(Math.max(e,0),this.getLength()))<this.getLength()?(t=t.concat([""]),0):(t=[""].concat(t),this.$lines[--e].length);this.insertMergedLines({row:e,column:n},t)},l.prototype.insertMergedLines=function(e,t){var e=this.clippedPos(e.row,e.column),n={row:e.row+t.length-1,column:(1==t.length?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:n,action:"insert",lines:t}),this.clonePos(n)},l.prototype.remove=function(e){var t=this.clippedPos(e.start.row,e.start.column),e=this.clippedPos(e.end.row,e.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},l.prototype.removeInLine=function(e,t,n){t=this.clippedPos(e,t),e=this.clippedPos(e,n);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})},!0),this.clonePos(t)},l.prototype.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1);var n=(t=Math.min(Math.max(0,t),this.getLength()-1))==this.getLength()-1&&0<e,i=t<this.getLength()-1,o=n?e-1:e,n=n?this.getLine(o).length:0,r=i?t+1:t,i=i?0:this.getLine(r).length,o=new s(o,n,r,i),n=this.$lines.slice(e,t+1);return this.applyDelta({start:o.start,end:o.end,action:"remove",lines:this.getLinesForRange(o)}),n},l.prototype.removeNewLine=function(e){e<this.getLength()-1&&0<=e&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},l.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),t?this.insert(e.start,t):e.start)},l.prototype.applyDeltas=function(e){for(var t=0;t<e.length;t++)this.applyDelta(e[t])},l.prototype.revertDeltas=function(e){for(var t=e.length-1;0<=t;t--)this.revertDelta(e[t])},l.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&&2e4<e.lines.length?this.$splitAndapplyLargeDelta(e,2e4):(o(this.$lines,e,t),this._signal("change",e)))},l.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)},l.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)},l.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()})},l.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)<0)return{row:o,column:e+n[o].length+i};return{row:r-1,column:e+n[r-1].length+i}},l.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},l.prototype.$split=function(e){return e.split(/\r\n|\r|\n/)},l);function l(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)}e.prototype.$autoNewLine="",e.prototype.$newLineMode="auto",i.implement(e.prototype,r),t.Document=e}),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"),e=e("./lib/event_emitter").EventEmitter,o=(r.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},r.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},r.prototype.fireUpdateEvent=function(e,t){this._signal("update",{data:{first:e,last:t}})},r.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)},r.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},r.prototype.$updateOnChange=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.lines[t]=null:"remove"==e.action?(this.lines.splice(t,1+n,null),this.states.splice(t,1+n,null)):((e=Array(1+n)).unshift(t,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)),this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},r.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},r.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},r.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},r.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),n=this.states[e-1],t=this.tokenizer.getLineTokens(t,n,e);return this.states[e]+""!=t.state+""?(this.states[e]=t.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.tokens},r.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},r);function r(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var a=this;this.$worker=function(){if(a.running){for(var e=new Date,t=a.currentLine,n=-1,i=a.doc,o=t;a.lines[t];)t++;var r=i.getLength(),s=0;for(a.running=!1;t<r;){for(a.$tokenizeRow(t),n=t;t++,a.lines[t];);if(++s%5==0&&20<new Date-e){a.running=setTimeout(a.$worker,20);break}}a.currentLine=t,o<=(n=-1==n?t:n)&&a.fireUpdateEvent(o,n)}}}i.implement(o.prototype,e),t.BackgroundTokenizer=o}),define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(e,t,n){"use strict";var d=e("./lib/lang"),p=e("./range").Range,e=(i.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},i.prototype.update=function(e,t,n,i){if(this.regExp)for(var o=i.firstRow,r=i.lastRow,s={},a=o;a<=r;a++){var l=this.cache[a];null==l&&(l=(l=(l=d.getMatchOffsets(n.getLine(a),this.regExp)).length>this.MAX_RANGES?l.slice(0,this.MAX_RANGES):l).map(function(e){return new p(a,e.offset,a,e.offset+e.length)}),this.cache[a]=l.length?l:"");for(var c=l.length;c--;){var h=l[c].toScreenRange(n),u=h.toString();s[u]||(s[u]=!0,t.drawSingleLineMarker(e,h,this.clazz,i))}}},i);function i(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n}e.prototype.MAX_RANGES=500,t.SearchHighlight=e}),define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){"use strict";function o(e,t){for(var n=t;n--;){var i=e[n];if(i&&!i[0].ignore){for(;n<t-1;){var o=function(e,t){for(var n=e.length;n--;)for(var i=0;i<t.length;i++)if(!s(e[n],t[i])){for(;n<e.length;){for(;i--;)s(t[i],e[n]);i=t.length,n++}return[e,t]}return e.selectionBefore=t.selectionBefore=e.selectionAfter=t.selectionAfter=null,[t,e]}(e[n],e[n+1]);e[n]=o[0],e[n+1]=o[1],n++}return 1}}}function a(e){return{row:e.row,column:e.column}}function i(e){if(e=e||this,Array.isArray(e))return e.map(i).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(r).join("\n"):r(e.value)),e.start&&(t+=r(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function r(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function s(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(0<=f(t.start,e.end))l(t,e,-1);else{if(!(f(t.start,e.start)<=0))return;l(e,t,1)}else if(n&&!i)if(0<=f(t.start,e.end))l(t,e,-1);else{if(!(f(t.end,e.start)<=0))return;l(e,t,-1)}else if(!n&&i)if(0<=f(t.start,e.start))l(t,e,1);else{if(!(f(t.start,e.start)<=0))return;l(e,t,1)}else if(!n&&!i)if(0<=f(t.start,e.start))l(t,e,1);else{if(!(f(t.end,e.start)<=0))return;l(e,t,-1)}return 1}function l(e,t,n){c(e.start,t.start,t.end,n),c(e.end,t.start,t.end,n)}function c(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 h(e,t){var n=e.lines,i=e.end,o=(e.end=a(t),e.end.row-e.start.row),r=n.splice(o,n.length),o=o?t.column:t.column-e.start.column;return n.push(r[0].substring(0,o)),r[0]=r[0].substr(o),{start:a(t),end:i,lines:r,action:e.action}}function u(e,t){var n;t={start:a((n=t).start),end:a(n.end),action:n.action,lines:n.lines.slice()};for(var i=e.length;i--;){for(var o=e[i],r=0;r<o.length;r++){var s=function(e,t){var n,i,o="insert"==e.action,r="insert"==t.action;if(o&&r)f(e.start,t.start)<0?l(t,e,1):l(e,t,1);else if(o&&!r)0<=f(e.start,t.end)?l(e,t,-1):(f(e.start,t.start)<=0||l(e,g.fromPoints(t.start,e.start),-1),l(t,e,1));else if(!o&&r)0<=f(t.start,e.end)?l(t,e,-1):(f(t.start,e.start)<=0||l(t,g.fromPoints(e.start,t.start),-1),l(e,t,1));else if(!o&&!r)if(0<=f(t.start,e.end))l(t,e,-1);else{if(!(f(t.end,e.start)<=0))return f(e.start,t.start)<0&&(e=h(n=e,t.start)),0<f(e.end,t.end)&&(i=h(e,t.end)),c(t.end,e.start,e.end,-1),i&&!n&&(e.lines=i.lines,e.start=i.start,e.end=i.end,i=e),[t,n,i].filter(Boolean);l(e,t,-1)}return[t,e]}(o[r],t);t=s[0],2!=s.length&&(s[2]?(o.splice(r+1,1,s[1],s[2]),r++):s[1]||(o.splice(r,1),r--))}o.length||e.splice(i,1)}}p.prototype.addSession=function(e){this.$session=e},p.prototype.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],(t=this.$undoStack.length)>this.$undoDepth-1&&this.$undoStack.splice(0,t-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))},p.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},p.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},p.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},p.prototype.getSelection=function(e,t){for(var n=this.selections,i=n.length;i--;){var o=n[i];if(o.rev<e)return o=t?n[i+1]:o}},p.prototype.getRevision=function(){return this.$rev},p.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)},p.prototype.getChangedRanges=function(e,t){null==t&&this.$rev},p.prototype.getChangedLines=function(e,t){null==t&&this.$rev},p.prototype.undo=function(e,t){this.lastDeltas=null;var n,i=this.$undoStack;if(o(i,i.length))return e=e||this.$session,this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0,i=i.pop(),n=null,i&&(n=e.undoChanges(i,t),this.$redoStack.push(i),this.$syncRev()),this.$fromUndo=!1,n},p.prototype.redo=function(e,t){if(this.lastDeltas=null,e=e||this.$session,this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){for(var n=this.getDeltas(this.$redoStackBaseRev,this.$rev+1),i=this.$redoStack,o=n,r=0;r<o.length;r++)for(var s=o[r],a=0;a<s.length;a++)u(i,s[a]);this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(e){e[0].id=++this.$maxRev},this)}var n=this.$redoStack.pop(),l=null;return n&&(l=e.redoChanges(n,t),this.$undoStack.push(n),this.$syncRev()),this.$fromUndo=!1,l},p.prototype.$syncRev=function(){var e=this.$undoStack,e=e[e.length-1],e=e&&e[0].id||0;this.$redoStackBaseRev=e,this.$rev=e},p.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=[]},p.prototype.canUndo=function(){return 0<this.$undoStack.length},p.prototype.canRedo=function(){return 0<this.$redoStack.length},p.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},p.prototype.isAtBookmark=function(){return this.$rev===this.mark},p.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},p.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},p.prototype.$prettyPrint=function(e){return e?i(e):i(this.$undoStack)+"\n---\n"+i(this.$redoStack)};var d=p;function p(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}d.prototype.hasUndo=d.prototype.canUndo,d.prototype.hasRedo=d.prototype.canRedo,d.prototype.isClean=d.prototype.isAtBookmark,d.prototype.markClean=d.prototype.bookmark;var g=e("./range").Range,f=g.comparePoints;g.comparePoints;t.UndoManager=d}),define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){"use strict";var i=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];e=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}o.prototype.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},o.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)}),0<this.range.compareEnd(e.start.row,e.start.column)?(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},o.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},o.prototype.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;l<s.length;l++){if(-1==(o=(i=s[l]).range.compareStart(t,n)))return void e(null,t,n,r,a);if(!e(null,i.start.row,i.start.column,r,a)&&e(i.placeholder,i.start.row,i.start.column,r)||0===o)return;a=!i.sameRow,r=i.end.column}e(null,t,n,r,a)},o.prototype.getNextFoldTo=function(e,t){for(var n,i,o=0;o<this.folds.length;o++){if(-1==(i=(n=this.folds[o]).range.compareEnd(e,t)))return{fold:n,kind:"after"};if(0===i)return{fold:n,kind:"inside"}}return null},o.prototype.addRemoveChars=function(e,t,n){var i,o=this.getNextFoldTo(e,t);if(o)if(i=o.fold,"inside"==o.kind&&i.start.column!=t&&i.start.row!=e)window.console&&window.console.log(e,t,i);else if(i.start.row==e){var r,s=(r=this.folds).indexOf(i);for(0===s&&(this.start.column+=n);s<r.length;s++){if((i=r[s]).start.column+=n,!i.sameRow)return;i.end.column+=n}this.end.column+=n}},o.prototype.split=function(e,t){e=this.getNextFoldTo(e,t);if(!e||"inside"==e.kind)return null;var t=e.fold,e=this.folds,n=this.foldData,t=e.indexOf(t),i=e[t-1],i=(this.end.row=i.end.row,this.end.column=i.end.column,new o(n,e=e.splice(t,e.length-t)));return n.splice(n.indexOf(this)+1,0,i),i},o.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)},o.prototype.toString=function(){var t=[this.range.toString()+": ["];return this.folds.forEach(function(e){t.push(" "+e.toString())}),t.push("]"),t.join("\n")},o.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)<0)return{row:i.start.row,column:i.start.column+e};if((e-=i.placeholder.length)<0)return i.start;t=i.end.column}return{row:this.end.row,column:this.end.column+e}},t.FoldLine=o}),define("ace/range_list",["require","exports","module","ace/range"],function(e,t,n){"use strict";var a=e("./range").Range.comparePoints,e=(i.prototype.pointIndex=function(e,t,n){for(var i=this.ranges,o=n||0;o<i.length;o++){var r=i[o],s=a(e,r.end);if(0<s);else return r=a(e,r.start),0===s?t&&0!==r?-o-2:o:0<r||0===r&&!t?o:-o-1}return-o-1},i.prototype.add=function(e){var t=!e.isEmpty(),n=this.pointIndex(e.start,t),t=this.pointIndex(e.end,t,n=n<0?-n-1:n);return t<0?t=-t-1:t++,this.ranges.splice(n,t-n,e)},i.prototype.addList=function(e){for(var t=[],n=e.length;n--;)t.push.apply(t,this.add(e[n]));return t},i.prototype.substractPoint=function(e){e=this.pointIndex(e);if(0<=e)return this.ranges.splice(e,1)},i.prototype.merge=function(){for(var e=[],t=this.ranges,n=(t=t.sort(function(e,t){return a(e.start,t.start)}))[0],i=1;i<t.length;i++){var o=n,n=t[i],r=a(o.end,n.start);r<0||(0!=r||o.isEmpty()||n.isEmpty())&&(a(o.end,n.end)<0&&(o.end.row=n.end.row,o.end.column=n.end.column),t.splice(i,1),e.push(n),n=o,i--)}return this.ranges=t,e},i.prototype.contains=function(e,t){return 0<=this.pointIndex({row:e,column:t})},i.prototype.containsPoint=function(e){return 0<=this.pointIndex(e)},i.prototype.rangeAtPoint=function(e){e=this.pointIndex(e);if(0<=e)return this.ranges[e]},i.prototype.clipRows=function(e,t){var n=this.ranges;if(n[0].start.row>t||n[n.length-1].start.row<e)return[];for(var e=this.pointIndex({row:e,column:0}),i=this.pointIndex({row:t,column:0},e=e<0?-e-1:e),o=(i<0&&(i=-i-1),[]),r=e;r<i;r++)o.push(n[r]);return o},i.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},i.prototype.attach=function(e){this.session&&this.detach(),this.session=e,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},i.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},i.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&&!((h=r[s]).end.row>=i);s++);if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;s<a;s++){if((h=r[s]).start.row>i)break;h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column&&(h.end.column==t.column&&this.$bias<0||(h.end.column==t.column&&0<c&&s<a-1&&h.end.column>h.start.column&&h.end.column==r[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l))}else for(var h,l=i-o,c=t.column-n.column;s<a;s++){if((h=r[s]).start.row>o)break;h.end.row<o&&(i<h.end.row||i==h.end.row&&t.column<h.end.column)?(h.end.row=i,h.end.column=t.column):h.end.row==o?h.end.column<=n.column?(l||h.end.column>t.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>o&&(h.end.row+=l),h.start.row<o&&(i<h.start.row||i==h.start.row&&t.column<h.start.column)?(h.start.row=i,h.start.column=t.column):h.start.row==o?h.start.column<=n.column?(l||h.start.column>t.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>o&&(h.start.row+=l)}if(0!=l&&s<a)for(;s<a;s++)(h=r[s]).start.row+=l,h.end.row+=l},i);function i(){this.ranges=[],this.$bias=1}e.prototype.comparePoints=a,t.RangeList=e}),define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(e,t,n){"use strict";function u(e,t){e.row-=t.row,0==e.row&&(e.column-=t.column)}function i(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row}var o,r,s=this&&this.__extends||(r=function(e,t){return(r=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),e=e("../range_list").RangeList,s=(s(a,o=e),a.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},a.prototype.setFoldLine=function(t){this.foldLine=t,this.subFolds.forEach(function(e){e.setFoldLine(t)})},a.prototype.clone=function(){var t=new a(this.range.clone(),this.placeholder);return this.subFolds.forEach(function(e){t.subFolds.push(e.clone())}),t.collapseChildren=this.collapseChildren,t},a.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){r=e,s=this.start,u(r.start,s),u(r.end,s);for(var t=e.start.row,n=e.start.column,i=0,o=-1;i<this.subFolds.length&&1==(o=this.subFolds[i].range.compare(t,n));i++);var r=this.subFolds[i],s=0;if(0==o){if(r.range.containsRange(e))return r.addSubFold(e);s=1}for(var t=e.range.end.row,n=e.range.end.column,a=i,o=-1;a<this.subFolds.length&&1==(o=this.subFolds[a].range.compare(t,n));a++);0==o&&a++;for(var l=this.subFolds.splice(i,a-i,e),c=0==o?l.length-1:l.length,h=s;h<c;h++)e.addSubFold(l[h]);return e.setFoldLine(this.foldLine),e}},a.prototype.restoreRange=function(e){return e=e,t=this.start,i(e.start,t),void i(e.end,t);var t},a);function a(e,t){var n=o.call(this)||this;return n.foldLine=null,n.placeholder=t,n.range=e,n.start=e.start,n.end=e.end,n.sameRow=e.start.row==e.end.row,n.subFolds=n.ranges=[],n}t.Fold=s}),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 c=e("../range").Range,d=e("./fold_line").FoldLine,p=e("./fold").Fold,h=e("../token_iterator").TokenIterator,i=e("../mouse/mouse_event").MouseEvent;t.Folding=function(){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)&&(1!=n||!s.isEnd(e,t)||s.isEmpty())&&(-1!=n||!s.isStart(e,t)||s.isEmpty()))return o[r]}},this.getFoldsInRange=function(e){var t=e.start,n=e.end,i=this.$foldData,o=[];t.column+=1,--n.column;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(-2==(s=c.range.compareRange(e)))break;if(2!=s){if(42==s)break;o.push(c)}}}}return--t.column,n.column+=1,o},this.getFoldsInRangeList=function(e){var t;return Array.isArray(e)?(t=[],e.forEach(function(e){t=t.concat(this.getFoldsInRange(e))},this)):t=this.getFoldsInRange(e),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)))return null;for(var o,r={end:{column:0}},s=0;s<i.folds.length;s++){var a,l=(a=i.folds[s]).range.compareEnd(e,t);if(-1==l){o=this.getLine(a.start.row).substring(r.end.column,a.start.column);break}if(0===l)return null;r=a}return o=o||this.getLine(a.start.row).substring(r.end.column),-1==n?o.substring(0,t-r.end.column):1==n?o.substring(t-r.end.column):o},this.getFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);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(-1==(i=t?n.indexOf(t):i)&&(i=0);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,r=r.start.row;if(t<=s){r<t&&(e<=r?i-=t-r:i=0);break}e<=s&&(i-=e<=r?s-r: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,o=!1,r=(e instanceof p?n=e:(n=new p(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(n.range),n.start.row),e=n.start.column,s=n.end.row,t=n.end.column,a=this.getFoldAt(r,e,1),l=this.getFoldAt(s,t,-1);if(a&&l==a)return a.addSubFold(n);a&&!a.range.isStart(r,e)&&this.removeFold(a),l&&!l.range.isEnd(s,t)&&this.removeFold(l);e=this.getFoldsInRange(n.range);0<e.length&&(this.removeFolds(e),n.collapseChildren||e.forEach(function(e){n.addSubFold(e)}));for(var c=0;c<i.length;c++){var h=i[c];if(s==h.start.row){h.addFold(n),o=!0;break}if(r==h.end.row){if(h.addFold(n),o=!0,!n.sameRow){var u=i[c+1];if(u&&u.start.row==s){h.merge(u);break}}break}if(s<=h.start.row)break}return o||(h=this.$addFoldLine(new d(this.$foldData,n))),this.$useWrapMode?this.$updateWrapData(h.start.row,h.start.row):this.$updateRowLengthCache(h.start.row,h.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;1==r.length?o.splice(o.indexOf(t),1):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):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):e.sameRow?r.splice(r.indexOf(e),1):((r=(o=t.split(e.start.row,e.start.column)).folds).shift(),o.start.row=r[0].start.row,o.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(t){this.removeFold(t),t.subFolds.forEach(function(e){t.restoreRange(e),this.addFold(e)},this),0<t.collapseChildren&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(e){e.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(e,t){var n;if(null==e)n=new c(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)n=new c(e,0,e,this.getLine(e).length);else if("row"in e)n=c.fromPoints(e,e);else{if(Array.isArray(e))return i=[],e.forEach(function(e){i=i.concat(this.unfold(e))},this),i;n=e}for(var i,e=i=this.getFoldsInRangeList(n);1==i.length&&c.comparePoints(i[0].start,n.start)<0&&0<c.comparePoints(i[0].end,n.end);)this.expandFolds(i),i=this.getFoldsInRangeList(n);if(0!=t?this.removeFolds(i):this.expandFolds(i),e.length)return e},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){t=this.getFoldLine(e,t);return t?t.end.row:e},this.getRowFoldStart=function(e,t){t=this.getFoldLine(e,t);return t?t.start.row:e},this.getFoldDisplayLine=function(e,t,n,o,r){null==o&&(o=e.start.row),null==r&&(r=0),null==t&&(t=e.end.row),null==n&&(n=this.getLine(t).length);var s=this.doc,a="";return e.walk(function(e,t,n,i){if(!(t<o)){if(t==o){if(n<r)return;i=Math.max(r,i)}a+=null!=e?e:s.getLine(t).substring(i,n)}},t,n),a},this.getDisplayLine=function(e,t,n,i){var o=this.getFoldLine(e);return o?this.getFoldDisplayLine(o,e,t,n,i):(o=this.doc.getLine(e)).substring(i||0,t||o.length)},this.$cloneFoldData=function(){var t=[];return t=this.$foldData.map(function(e){e=e.folds.map(function(e){return e.clone()});return new d(t,e)})},this.toggleFold=function(e){var t=this.selection.getRange();if(t.isEmpty()){var n,i=t.start;if(n=this.getFoldAt(i.row,i.column))return void this.expandFold(n);(o=this.findMatchingBracket(i))?1==t.comparePoint(o)?t.end=o:(t.start=o,t.start.column++,t.end.column--):(o=this.findMatchingBracket({row:i.row,column:i.column+1}))?(1==t.comparePoint(o)?t.end=o:t.start=o,t.start.column++):t=this.getCommentFoldRange(i.row,i.column)||t}else{var o=this.getFoldsInRange(t);if(e&&o.length)return void this.expandFolds(o);1==o.length&&(n=o[0])}if((n=n||this.getFoldAt(t.start.row,t.start.column))&&n.range.toString()==t.toString())this.expandFold(n);else{i="...";if(!t.isMultiLine()){if((i=this.getTextRange(t)).length<4)return;i=i.trim().substring(0,2)+".."}this.addFold(i,t)}},this.getCommentFoldRange=function(e,t,n){var i=new h(this,e,t),o=i.getCurrentToken(),r=o&&o.type;if(o&&/^comment|string/.test(r)){"comment"==(r=r.match(/comment|string/)[0])&&(r+="|doc-start|\\.doc");var s=new RegExp(r),r=new c;if(1!=n){for(;(o=i.stepBackward())&&s.test(o.type)&&!/^comment.end/.test(o.type););o=i.stepForward()}if(r.start.row=i.getCurrentTokenRow(),r.start.column=i.getCurrentTokenColumn()+(/^comment.start/.test(o.type)?o.value.length:2),i=new h(this,e,t),-1!=n){var a=-1;do{if(o=i.stepForward(),-1==a){var l=this.getState(i.$row);s.test(l)||(a=i.$row)}else if(i.$row>a)break}while(o&&s.test(o.type)&&!/^comment.start/.test(o.type));o=i.stepBackward()}else o=i.getCurrentToken();return r.end.row=i.getCurrentTokenRow(),r.end.column=i.getCurrentTokenColumn(),/^comment.end/.test(o.type)||(r.end.column+=o.value.length-2),r}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r,s=e=e||0;s<t;s++)null==o[s]&&(o[s]=this.getFoldWidget(s)),"start"!=o[s]||i&&!i(s)||(r=this.getFoldWidgetRange(s))&&r.isMultiLine()&&r.end.row<=t&&r.start.row>=e&&(s=r.end.row,r.collapseChildren=n,this.addFold("...",r))}},this.foldToLevel=function(e){for(this.foldAll();0<e--;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(e){for(var t=o.getTokens(e),n=0;n<t.length;n++){var i=t[n];if("text"!=i.type||!/^\s+$/.test(i.value))return!!/comment/.test(i.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(", ")+"]");this.$foldStyle!=e&&("manual"==(this.$foldStyle=e)&&this.unfold(),e=this.$foldMode,this.$setFolding(null),this.$setFolding(e))},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{};for(var i=e-1;0<=i;){var o=n[i];if("start"==(o=null==o?n[i]=this.getFoldWidget(i):o)){var r=this.getFoldWidgetRange(i),s=s||r;if(r&&r.end.row>=e)break}i--}return{range:-1!==i&&r,firstRange:s}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t instanceof i?t.domEvent:t).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,n)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var n=this.getFoldWidget(e),i=this.getLine(e),n="end"===n?-1:1,i=this.getFoldAt(e,-1==n?0:i.length,n);if(i)return t.children||t.all?this.removeFold(i):this.expandFold(i),i;var o,r,n=this.getFoldWidgetRange(e,!0);return n&&!n.isMultiLine()&&(i=this.getFoldAt(n.start.row,n.start.column,1))&&n.isEqual(i.range)?(this.removeFold(i),i):(t.siblings?((i=this.getParentFoldRangeData(e)).range&&(o=i.range.start.row+1,r=i.range.end.row),this.foldAll(o,r,t.all?1e4:0)):t.children?(r=n?n.end.row:this.getLength(),this.foldAll(e+1,r,t.all?1e4:0)):n&&(t.all&&(n.collapseChildren=1e4),this.addFold("...",n)),n)}},this.toggleFoldWidget=function(e){var t,n=this.selection.getCursor().row;n=this.getRowFoldStart(n),this.$toggleFoldWidget(n,{})||(t=(t=this.getParentFoldRangeData(n,!0)).range||t.firstRange)&&(n=t.start.row,(n=this.getFoldAt(n,this.getLine(n).length,1))?this.removeFold(n):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+n,null):((e=Array(1+n)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){"use strict";var u=e("../token_iterator").TokenIterator,y=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;t=t||this.getLine(e.row).charAt(e.column-1);if(""==t)return null;t=t.match(/([\(\[\{])|([\)\]\}])/);return t?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,n,i=this.getLine(e.row),o=!0,r=i.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=i.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),o=!1),!s)return null;if(s[1]){if(!(n=this.$findClosingBracket(s[1],e)))return null;t=y.fromPoints(e,n),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(n=this.$findOpeningBracket(s[2],e)))return null;t=y.fromPoints(n,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),r=o&&o.match(i);if(r||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(i)),!r)return null;t=new y(e.row,e.column-1,e.row,e.column),n=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e);return n?[t,new y(n.row,n.column,n.row,n.column+1)]:[t]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,r=new u(this,t.row,t.column),s=r.getCurrentToken();if(s=s||r.stepForward()){n=n||new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+");for(var a=t.column-r.getCurrentTokenColumn()-2,l=s.value;;){for(;0<=a;){var c=l.charAt(a);if(c==i){if(0==--o)return{row:r.getCurrentTokenRow(),column:a+r.getCurrentTokenColumn()}}else c==e&&(o+=1);--a}for(;(s=r.stepBackward())&&!n.test(s.type););if(null==s)break;a=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,r=new u(this,t.row,t.column),s=r.getCurrentToken();if(s=s||r.stepForward()){n=n||new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+");for(var a=t.column-r.getCurrentTokenColumn();;){for(var l=s.value,c=l.length;a<c;){var h=l.charAt(a);if(h==i){if(0==--o)return{row:r.getCurrentTokenRow(),column:a+r.getCurrentTokenColumn()}}else h==e&&(o+=1);a+=1}for(;(s=r.stepForward())&&!n.test(s.type););if(null==s)break;a=0}return null}},this.getMatchingTags=function(e){var e=new u(this,e.row,e.column),t=this.$findTagName(e);if(t)return"<"===e.stepBackward().value?this.$findClosingTag(e,t):this.$findOpeningTag(e,t)},this.$findTagName=function(e){var t=e.getCurrentToken(),n=!1,i=!1;if(t&&-1===t.type.indexOf("tag-name"))for(;(t=i?e.stepBackward():e.stepForward())&&("/>"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0)),t&&!n;);return t},this.$findClosingTag=function(e,t){var n=t.value,i=t.value,o=0,r=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),s=(t=e.stepForward(),new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length)),a=!1;do{var l,c=t;if(t=e.stepForward())if(">"!==t.value||a||(l=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),a=!0),-1!==t.type.indexOf("tag-name")){if(i===(n=t.value))if("<"===c.value)o++;else if("</"===c.value&&--o<0){e.stepBackward();var h=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),u=(t=e.stepForward(),new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length));if(!(t=e.stepForward())||">"!==t.value)return;var d=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else i===n&&"/>"===t.value&&--o<0&&(d=u=h=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),l=new y(s.end.row,s.end.column,s.end.row,s.end.column+1))}while(t&&0<=o);if(r&&l&&h&&d&&s&&u)return{openTag:new y(r.start.row,r.start.column,l.end.row,l.end.column),closeTag:new y(h.start.row,h.start.column,d.end.row,d.end.column),openTagName:s,closeTagName:u}},this.$findOpeningTag=function(e,t){var n,i=e.getCurrentToken(),o=t.value,r=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=new y(s,a,s,a+2),c=(e.stepForward(),new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length));if((t=e.stepForward())&&">"===t.value){var h=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=i,s=e.getCurrentTokenRow(),n=(a=e.getCurrentTokenColumn())+t.value.length,i=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(o===t.value)if("<"===i.value){if(0<++r){for(var u=new y(s,a,s,n),d=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);(t=e.stepForward())&&">"!==t.value;);var p=new y(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else"</"===i.value&&r--}else if("/>"===t.value){for(var g=0,f=i;f;){if(-1!==f.type.indexOf("tag-name")&&f.value===o){r--;break}if("<"===f.value)break;f=e.stepBackward(),g++}for(var m=0;m<g;m++)e.stepForward()}}while(i&&r<=0);return d&&p&&l&&h&&u&&c?{openTag:new y(d.start.row,d.start.column,p.end.row,p.end.column),closeTag:new y(l.start.row,l.start.column,h.end.row,h.end.column),openTagName:u,closeTagName:c}:void 0}}}}),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";function a(e){return!(e<4352)&&(4352<=e&&e<=4447||4515<=e&&e<=4519||4602<=e&&e<=4607||9001<=e&&e<=9002||11904<=e&&e<=11929||11931<=e&&e<=12019||12032<=e&&e<=12245||12272<=e&&e<=12283||12288<=e&&e<=12350||12353<=e&&e<=12438||12441<=e&&e<=12543||12549<=e&&e<=12589||12593<=e&&e<=12686||12688<=e&&e<=12730||12736<=e&&e<=12771||12784<=e&&e<=12830||12832<=e&&e<=12871||12880<=e&&e<=13054||13056<=e&&e<=19903||19968<=e&&e<=42124||42128<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||55216<=e&&e<=55238||55243<=e&&e<=55291||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65106||65108<=e&&e<=65126||65128<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510)}var i=e("./lib/oop"),o=e("./lib/lang"),r=e("./bidihandler").BidiHandler,s=e("./config"),l=e("./lib/event_emitter").EventEmitter,c=e("./selection").Selection,h=e("./mode/text").Mode,u=e("./range").Range,d=e("./document").Document,p=e("./background_tokenizer").BackgroundTokenizer,g=e("./search_highlight").SearchHighlight,f=e("./undomanager").UndoManager,m=(y.prototype.setDocument=function(e){this.doc&&this.doc.off("change",this.$onChange),(this.doc=e).on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},y.prototype.getDocument=function(){return this.doc},y.prototype.$resetRowCache=function(e){if(!e)return this.$docRowCache=[],void(this.$screenRowCache=[]);var t=this.$docRowCache.length,e=this.$getRowCacheIndex(this.$docRowCache,e)+1;e<t&&(this.$docRowCache.splice(e,t),this.$screenRowCache.splice(e,t))},y.prototype.$getRowCacheIndex=function(e,t){for(var n=0,i=e.length-1;n<=i;){var o=n+i>>1,r=e[o];if(r<t)n=1+o;else{if(!(t<r))return o;i=o-1}}return n-1},y.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},y.prototype.onChangeFold=function(e){e=e.data;this.$resetRowCache(e.start.row)},y.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)},y.prototype.setValue=function(e){this.doc.setValue(e),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},y.fromJSON=function(e){"string"==typeof e&&(e=JSON.parse(e));var t=new f,n=(t.$undoStack=e.history.undo,t.$redoStack=e.history.redo,t.mark=e.history.mark,t.$rev=e.history.rev,new y(e.value));return e.folds.forEach(function(e){n.addFold("...",u.fromPoints(e.start,e.end))}),n.setAnnotations(e.annotations),n.setBreakpoints(e.breakpoints),n.setMode(e.mode),n.setScrollLeft(e.scrollLeft),n.setScrollTop(e.scrollTop),n.setUndoManager(t),n.selection.fromJSON(e.selection),n},y.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()}},y.prototype.toString=function(){return this.doc.getValue()},y.prototype.getSelection=function(){return this.selection},y.prototype.getState=function(e){return this.bgTokenizer.getState(e)},y.prototype.getTokens=function(e){return this.bgTokenizer.getTokens(e)},y.prototype.getTokenAt=function(e,t){var n=this.bgTokenizer.getTokens(e),i=0;if(null==t)var o=n.length-1,i=this.getLine(e).length;else for(o=0;o<n.length&&!(t<=(i+=n[o].value.length));o++);return(e=n[o])?(e.index=o,e.start=i-e.value.length,e):null},y.prototype.setUndoManager=function(e){var t;this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e?(e.addSession(t=this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=o.delayedCall(this.$syncInformUndoManager)):this.$syncInformUndoManager=function(){}},y.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},y.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},y.prototype.getTabString=function(){return this.getUseSoftTabs()?o.stringRepeat(" ",this.getTabSize()):"\t"},y.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},y.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},y.prototype.setTabSize=function(e){this.setOption("tabSize",e)},y.prototype.getTabSize=function(){return this.$tabSize},y.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},y.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},y.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},y.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},y.prototype.getOverwrite=function(){return this.$overwrite},y.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},y.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},y.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},y.prototype.getBreakpoints=function(){return this.$breakpoints},y.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t<e.length;t++)this.$breakpoints[e[t]]="ace_breakpoint";this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},y.prototype.setBreakpoint=function(e,t){(t=void 0===t?"ace_breakpoint":t)?this.$breakpoints[e]=t:delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},y.prototype.clearBreakpoint=function(e){delete this.$breakpoints[e],this._signal("changeBreakpoint",{})},y.prototype.addMarker=function(e,t,n,i){var o=this.$markerId++,e={range:e,type:n||"line",renderer:"function"==typeof n?n:null,clazz:t,inFront:!!i,id:o};return i?(this.$frontMarkers[o]=e,this._signal("changeFrontMarker")):(this.$backMarkers[o]=e,this._signal("changeBackMarker")),o},y.prototype.addDynamicMarker=function(e,t){var n;if(e.update)return n=this.$markerId++,e.id=n,e.inFront=!!t,t?(this.$frontMarkers[n]=e,this._signal("changeFrontMarker")):(this.$backMarkers[n]=e,this._signal("changeBackMarker")),e},y.prototype.removeMarker=function(e){var t=this.$frontMarkers[e]||this.$backMarkers[e];t&&(delete(t.inFront?this.$frontMarkers:this.$backMarkers)[e],this._signal(t.inFront?"changeFrontMarker":"changeBackMarker"))},y.prototype.getMarkers=function(e){return e?this.$frontMarkers:this.$backMarkers},y.prototype.highlight=function(e){var t;this.$searchHighlight||(t=new g(null,"ace_selected-word","text"),this.$searchHighlight=this.addDynamicMarker(t)),this.$searchHighlight.setRegexp(e)},y.prototype.highlightLines=function(e,t,n,i){"number"!=typeof t&&(n=t,t=e),n=n||"ace_step";e=new u(e,0,t,1/0);return e.id=this.addMarker(e,n,"fullLine",i),e},y.prototype.setAnnotations=function(e){this.$annotations=e,this._signal("changeAnnotation",{})},y.prototype.getAnnotations=function(){return this.$annotations||[]},y.prototype.clearAnnotations=function(){this.setAnnotations([])},y.prototype.$detectNewLine=function(e){e=e.match(/^.*?(\r?\n)/m);this.$autoNewLine=e?e[1]:"\n"},y.prototype.getWordRange=function(e,t){var n,i=this.getLine(e),o=!1,r=(n=(o=(o=0<t?!!i.charAt(t-1).match(this.tokenRe):o)||!!i.charAt(t).match(this.tokenRe))?this.tokenRe:/^\s+$/.test(i.slice(t-1,t+1))?/\s/:this.nonTokenRe,t);if(0<r){for(;0<=--r&&i.charAt(r).match(n););r++}for(var s=t;s<i.length&&i.charAt(s).match(n);)s++;return new u(e,r,e,s)},y.prototype.getAWordRange=function(e,t){for(var n=this.getWordRange(e,t),i=this.getLine(n.end.row);i.charAt(n.end.column).match(/[ \t]/);)n.end.column+=1;return n},y.prototype.setNewLineMode=function(e){this.doc.setNewLineMode(e)},y.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},y.prototype.setUseWorker=function(e){this.setOption("useWorker",e)},y.prototype.getUseWorker=function(){return this.$useWorker},y.prototype.onReloadTokenizer=function(e){var t=e.data;this.bgTokenizer.start(t.first),this._signal("tokenizerUpdate",e)},y.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 h),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).$id=i),this.$onChangeMode(e)),t&&t()}.bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},y.prototype.$onChangeMode=function(e,t){var n,i,o;t||(this.$modeId=e.$id),this.$mode!==e&&(n=this.$mode,this.$mode=e,this.$stopWorker(),this.$useWorker&&this.$startWorker(),void 0!==(i=e.getTokenizer()).on&&(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})))},y.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},y.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(e){s.warn("Could not load worker",e),this.$worker=null}},y.prototype.getMode=function(){return this.$mode},y.prototype.setScrollTop=function(e){this.$scrollTop===e||isNaN(e)||(this.$scrollTop=e,this._signal("changeScrollTop",e))},y.prototype.getScrollTop=function(){return this.$scrollTop},y.prototype.setScrollLeft=function(e){this.$scrollLeft===e||isNaN(e)||(this.$scrollLeft=e,this._signal("changeScrollLeft",e))},y.prototype.getScrollLeft=function(){return this.$scrollLeft},y.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},y.prototype.getLineWidgetMaxWidth=function(){if(null!=this.lineWidgetsWidth)return this.lineWidgetsWidth;var t=0;return this.lineWidgets.forEach(function(e){e&&e.screenWidth>t&&(t=e.screenWidth)}),this.lineWidgetWidth=t},y.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(s<l){if(a<=(l=r.end.row+1))break;s=(r=this.$foldData[o++])?r.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(t[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},y.prototype.getLine=function(e){return this.doc.getLine(e)},y.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},y.prototype.getLength=function(){return this.doc.getLength()},y.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},y.prototype.insert=function(e,t){return this.doc.insert(e,t)},y.prototype.remove=function(e){return this.doc.remove(e)},y.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},y.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}},y.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}},y.prototype.setUndoSelect=function(e){this.$undoSelect=e},y.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=u.fromPoints(s.start,s.start))):i=n(s)?u.fromPoints(s.start,s.end):u.fromPoints(s.start,s.start))}return i},y.prototype.replace=function(e,t){return this.doc.replace(e,t)},y.prototype.moveText=function(e,t,n){var i,o,r,s=this.getTextRange(e),a=this.getFoldsInRange(e),t=u.fromPoints(t,t);return n||(this.remove(e),o=e.start.row-e.end.row,(r=o?-e.end.column:e.start.column-e.end.column)&&(t.start.row==e.end.row&&t.start.column>e.end.column&&(t.start.column+=r),t.end.row==e.end.row&&t.end.column>e.end.column&&(t.end.column+=r)),o&&t.start.row>=e.end.row&&(t.start.row+=o,t.end.row+=o)),t.end=this.insert(t.start,s),a.length&&(i=e.start,n=t.start,o=n.row-i.row,r=n.column-i.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==i.row&&(e.start.column+=r),e.end.row==i.row&&(e.end.column+=r),e.start.row+=o,e.end.row+=o,e}))),t},y.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)},y.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new u(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&&" "==r.charAt(s);++s);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)}},y.prototype.$moveLines=function(e,t,n){if(e=this.getRowFoldStart(e),t=this.getRowFoldEnd(t),n<0){if((o=this.getRowFoldStart(e+n))<0)return 0;var i=o-e}else if(0<n){if((o=this.getRowFoldEnd(t+n))>this.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new u(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),n=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,n),o.length&&this.addFolds(o),i},y.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},y.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},y.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},y.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},y.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},y.prototype.$clipPositionToDocument=function(e,t){var n;return t=Math.max(0,t),t=e<0?e=0:(n=this.doc.getLength())<=e?this.doc.getLine(e=n-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},y.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},y.prototype.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},y.prototype.getUseWrapMode=function(){return this.$useWrapMode},y.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"))},y.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange,t=(n.max<0&&(n={min:t,max:t}),this.$constrainWrapLimit(e,n.min,n.max));return t!=this.$wrapLimit&&1<t&&(this.$wrapLimit=t,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},y.prototype.$constrainWrapLimit=function(e,t,n){return t&&(e=Math.max(t,e)),e=n?Math.min(n,e):e},y.prototype.getWrapLimit=function(){return this.$wrapLimit},y.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},y.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},y.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=0;for((p=this.getFoldLine(o.row))&&(p.addRemoveChars(o.row,o.column,i.column-o.column),p.shiftRow(-a),(u=this.getFoldLine(r))&&u!==p&&(u.merge(p),p=u),h=c.indexOf(p)+1);h<c.length;h++)(p=c[h]).start.row>=o.row&&p.shiftRow(-a);s=r}else{var u=Array(a),d=(u.unshift(r,0),t?this.$wrapData:this.$rowLengthCache),c=(d.splice.apply(d,u),this.$foldData),h=0;for((p=this.getFoldLine(r))&&(0==(d=p.range.compareInside(i.row,i.column))?(p=p.split(i.row,i.column))&&(p.shiftRow(a),p.addRemoveChars(s,0,o.column-i.column)):-1==d&&(p.addRemoveChars(r,0,o.column-i.column),p.shiftRow(a)),h=c.indexOf(p)+1);h<c.length;h++)(p=c[h]).start.row>=r&&p.shiftRow(a)}else{var p,a=Math.abs(e.start.column-e.end.column);"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(p=this.getFoldLine(r))&&p.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},y.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},y.prototype.$updateWrapData=function(e,t){var s,n,a=this.doc.getAllLines(),i=this.getTabSize(),o=this.$wrapData,r=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(n=this.getFoldLine(l,n))?(s=[],n.walk(function(e,t,n,i){var o;if(null!=e){(o=this.$getDisplayTokens(e,s.length))[0]=b;for(var r=1;r<o.length;r++)o[r]=$}else o=this.$getDisplayTokens(a[t].substring(i,n),s.length);s=s.concat(o)}.bind(this),n.end.row,a[n.end.row].length+1),o[n.start.row]=this.$computeWrapSplits(s,r,i),l=n.end.row+1):(s=this.$getDisplayTokens(a[l]),o[l]=this.$computeWrapSplits(s,r,i),l++)},y.prototype.$computeWrapSplits=function(o,e,r){function t(e){for(var t=e-a,n=a;n<e;n++){var i=o[n];12!==i&&2!==i||--t}s.length||(d=function(){var e=0;if(0===u)return e;if(h)for(var t=0;t<o.length;t++){var n=o[t];if(n==S)e+=1;else{if(n!=x){if(n==A)continue;break}e+=r}}return c&&!1!==h&&(e+=r),Math.min(e,u)}(),s.indent=d),l+=t,s.push(l),a=e}if(0==o.length)return[];for(var s=[],n=o.length,a=0,l=0,c=this.$wrapAsCode,h=this.$indentedSoftWrap,u=e<=Math.max(2*r,8)||!1===h?0:Math.floor(e/2),d=0;e-d<n-a;){var i=a+e-d;if(o[i-1]>=S&&o[i]>=S)t(i);else if(o[i]==b||o[i]==$){for(;i!=a-1&&o[i]!=b;i--);if(a<i)t(i);else{for(i=a+e;i<o.length&&o[i]==$;i++);if(i==o.length)break;t(i)}}else{for(var p=Math.max(i-(e-(e>>2)),a-1);p<i&&o[i]<b;)i--;if(c){for(;p<i&&o[i]<b;)i--;for(;p<i&&o[i]==C;)i--}else for(;p<i&&o[i]<S;)i--;p<i?t(++i):(o[i=a+e]==v&&i--,t(i-d))}}return s},y.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(A)}else 32==r?i.push(S):39<r&&r<48||57<r&&r<64?i.push(C):4352<=r&&a(r)?i.push(w,v):i.push(w)}return i},y.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&&(9==(i=e.charCodeAt(o))?n+=this.getScreenTabSize(n):4352<=i&&a(i)?n+=2:n+=1,!(t<n));o++);return[n,o]},y.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},y.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},y.prototype.getRowWrapIndent=function(e){var t;return this.$useWrapMode?(e=this.screenToDocumentPosition(e,Number.MAX_VALUE),(t=this.$wrapData[e.row]).length&&t[0]<e.column?t.indent:0):0},y.prototype.getScreenLastRowColumn=function(e){e=this.screenToDocumentPosition(e,Number.MAX_VALUE);return this.documentToScreenColumn(e.row,e.column)},y.prototype.getDocumentLastRowColumn=function(e,t){e=this.documentToScreenRow(e,t);return this.getScreenLastRowColumn(e)},y.prototype.getDocumentLastRowColumnPosition=function(e,t){e=this.documentToScreenRow(e,t);return this.screenToDocumentPosition(e,Number.MAX_VALUE/10)},y.prototype.getRowSplitData=function(e){return this.$useWrapMode?this.$wrapData[e]:void 0},y.prototype.getScreenTabSize=function(e){return this.$tabSize-(e%this.$tabSize|0)},y.prototype.screenToDocumentRow=function(e,t){return this.screenToDocumentPosition(e,t).row},y.prototype.screenToDocumentColumn=function(e,t){return this.screenToDocumentPosition(e,t).column},y.prototype.screenToDocumentPosition=function(e,t,n){if(e<0)return{row:0,column:0};for(var i,o,r,s=0,a=0,l=0,c=0,h=this.$screenRowCache,u=this.$getRowCacheIndex(h,e),d=h.length,p=(r=d&&0<=u?(l=h[u],s=this.$docRowCache[u],e>h[d-1]):!d,this.getLength()-1),g=this.getNextFoldLine(s),f=g?g.start.row:1/0;l<=e&&!(e<l+(c=this.getRowLength(s))||p<=s);)l+=c,f<++s&&(s=g.end.row+1,f=(g=this.getNextFoldLine(s,g))?g.start.row:1/0),r&&(this.$docRowCache.push(s),this.$screenRowCache.push(l));if(g&&g.start.row<=s)i=this.getFoldDisplayLine(g),s=g.start.row;else{if(l+c<=e||p<s)return{row:p,column:this.getLine(p).length};i=this.getLine(s),g=null}u=0,h=Math.floor(e-l);return this.$useWrapMode&&(d=this.$wrapData[s])&&(o=d[h],0<h&&d.length&&(u=d.indent,a=d[h-1]||d[d.length-1],i=i.substring(a))),void 0!==n&&this.$bidiHandler.isBidiRow(l+h,s,h)&&(t=this.$bidiHandler.offsetToCol(n)),a+=this.$getStringScreenWidth(i,t-u)[1],this.$useWrapMode&&o<=a&&(a=o-1),g?g.idxToPosition(a):{row:s,column:a}},y.prototype.documentToScreenPosition=function(e,t){var n=void 0===t?this.$clipPositionToDocument(e.row,e.column):this.$clipPositionToDocument(e,t),i=(e=n.row,t=n.column,0),n=null;(a=this.getFoldAt(e,t,1))&&(e=a.start.row,t=a.start.column);for(var o,r,s=0,a=this.$docRowCache,l=this.$getRowCacheIndex(a,e),c=a.length,h=(r=c&&0<=l?(s=a[l],i=this.$screenRowCache[l],e>a[c-1]):!c,this.getNextFoldLine(s)),u=h?h.start.row:1/0;s<e;){if(u<=s){if(e<(o=h.end.row+1))break;u=(h=this.getNextFoldLine(o,h))?h.start.row:1/0}else o=s+1;i+=this.getRowLength(s),s=o,r&&(this.$docRowCache.push(s),this.$screenRowCache.push(i))}var d="",n=h&&u<=s?(d=this.getFoldDisplayLine(h,e,t),h.start.row):(d=this.getLine(e).substring(0,t),e),l=0;if(this.$useWrapMode){var p=this.$wrapData[n];if(p){for(var g=0;d.length>=p[g];)i++,g++;d=d.substring(p[g-1]||0,d.length),l=0<g?p.indent:0}}return this.lineWidgets&&this.lineWidgets[s]&&this.lineWidgets[s].rowsAbove&&(i+=this.lineWidgets[s].rowsAbove),{row:i,column:l+this.$getStringScreenWidth(d)[0]}},y.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},y.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},y.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,o=0,r=(t=this.$foldData[o++])?t.start.row:1/0;i<n;){var s=this.$wrapData[i];e+=s?s.length+1:1,r<++i&&(i=t.end.row+1,r=(t=this.$foldData[o++])?t.start.row:1/0)}else for(var e=this.getLength(),a=this.$foldData,o=0;o<a.length;o++)e-=(t=a[o]).end.row-t.start.row;return this.lineWidgets&&(e+=this.$getWidgetScreenLength()),e},y.prototype.$setFontMetrics=function(r){this.$enableVarChar&&(this.$getStringScreenWidth=function(e,t,n){if(0===t)return[0,0];var i,o;for(t=t||1/0,n=n||0,o=0;o<e.length&&!(t<(n+="\t"===(i=e.charAt(o))?this.getScreenTabSize(n):r.getCharacterWidth(i)));o++);return[n,o]})},y.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()},y);function y(e,t){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++y.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new p((new h).getTokenizer(),this);var n=this;this.bgTokenizer.on("update",function(e){n._signal("tokenizerUpdate",e)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof e&&e.getLine||(e=new d(e)),this.setDocument(e),this.selection=new c(this),this.$bidiHandler=new r(this),s.resetOptions(this),this.setMode(t),s._signal("session",this),this.destroyed=!1}m.$uid=0,m.prototype.$modes=s.$modes,m.prototype.getValue=m.prototype.toString,m.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},m.prototype.$overwrite=!1,m.prototype.$mode=null,m.prototype.$modeId=null,m.prototype.$scrollTop=0,m.prototype.$scrollLeft=0,m.prototype.$wrapLimit=80,m.prototype.$useWrapMode=!1,m.prototype.$wrapLimitRange={min:null,max:null},m.prototype.lineWidgets=null,m.prototype.isFullWidth=a,i.implement(m.prototype,l);var w=1,v=2,b=3,$=4,C=9,S=10,x=11,A=12;e("./edit_session/folding").Folding.call(m.prototype),e("./edit_session/bracket_match").BracketMatch.call(m.prototype),s.defineOptions(m.prototype,"session",{wrap:{set:function(e){e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e&&((this.$wrap=e)?(this.setWrapLimitRange(e="number"==typeof e?e:null,e),this.setUseWrapMode(!0)):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)!=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){0<(e=parseInt(e))&&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=m}),define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(e,t,n){"use strict";var v=e("./lib/lang"),i=e("./lib/oop"),b=e("./range").Range;function o(){this.$options={}}o.prototype.set=function(e){return i.mixin(this.$options,e),this},o.prototype.getOptions=function(){return v.copyObject(this.$options)},o.prototype.setOptions=function(e){this.$options=e},o.prototype.find=function(e){var o=this.$options,e=this.$matchIterator(e,o);if(!e)return!1;var r=null;return e.forEach(function(e,t,n,i){return r=new b(e,t,n,i),!(t==i&&o.start&&o.start.start&&0!=o.skipCurrent&&r.isEqual(o.start))||(r=null,!1)}),r},o.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var n=t.range,i=n?e.getLines(n.start.row,n.end.row):e.doc.getAllLines(),o=[],r=t.re;if(t.$isMultiLine){var s,a=r.length,l=i.length-a;e:for(var c=r.offset||0;c<=l;c++){for(var h=0;h<a;h++)if(-1==i[c+h].search(r[h]))continue e;var u=i[c],d=i[c+a-1],u=u.length-u.match(r[0])[0].length,d=d.match(r[a-1])[0].length;s&&s.end.row===c&&s.end.column>u||(o.push(s=new b(c,u,c+a-1,d)),2<a&&(c=c+a-2))}}else for(var p=0;p<i.length;p++)for(var g=v.getMatchOffsets(i[p],r),h=0;h<g.length;h++){var f=g[h];o.push(new b(p,f.offset,p,f.offset+f.length))}if(n){for(var m=n.start.column,y=n.end.column,p=0,h=o.length-1;p<h&&o[p].start.column<m&&0==o[p].start.row;)p++;for(var w=n.end.row-n.start.row;p<h&&o[h].end.column>y&&o[h].end.row==w;)h--;for(o=o.slice(p,h+1),p=0,h=o.length;p<h;p++)o[p].start.row+=n.start.row,o[p].end.row+=n.start.row}return o},o.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}},o.prototype.$assembleRegExp=function(t,e){if(t.needle instanceof RegExp)return t.re=t.needle;var n=t.needle;if(!t.needle)return t.re=!1;t.regExp||(n=v.escapeRegExp(n));var i,o,r,s,a,l=t.caseSensitive?"gm":"gmi";try{new RegExp(n,"u"),t.$supportsUnicodeFlag=!0,l+="u"}catch(e){t.$supportsUnicodeFlag=!1}function c(e,t){return void 0===t&&(t=!0),(r&&o.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||o.regExp?r&&o.$supportsUnicodeFlag?t?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}if(t.wholeWord&&(i=n,o=t,r=v.supportsLookbehind(),s=(a=Array.from(i))[0],a=a[a.length-1],n=c(s)+i+c(a,!1)),t.$isMultiLine=!e&&/[\n\r]/.test(n),t.$isMultiLine)return t.re=this.$assembleMultilineRegExp(n,l);try{var h=new RegExp(n,l)}catch(e){h=!1}return t.re=h},o.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(e){return!1}return i},o.prototype.$matchIterator=function(h,n){var u=this.$assembleRegExp(n);if(!u)return!1;var a,i,l=1==n.backwards,e=0!=n.skipCurrent,d=u.unicode,t=n.range,o=n.start,r=((o=o||(t?t[l?"end":"start"]:h.selection.getRange())).start&&(o=o[e!=l?"end":"start"]),t?t.start.row:0),s=t?t.end.row:h.getLength()-1;return i=n.$isMultiLine?(a=u.length,function(e,t,n){var i=l?e-a+1:e;if(!(i<0||i+a>h.getLength())){var o=h.getLine(i),e=o.search(u[0]);if(!(!l&&e<t||-1===e)){for(var r=1;r<a;r++)if(-1==(o=h.getLine(i+r)).search(u[r]))return;var s=o.match(u[a-1])[0].length;if(!(l&&t<s))return!!n(i,e,i+a-1,s)||void 0}}}):l?function(e,t,n){var i,o=h.getLine(e),r=[];for(u.lastIndex=0;i=u.exec(o);){var s=i[0].length,a=i.index;if(!s){if(a>=o.length)break;u.lastIndex=a+=v.skipEmptyMatch(o,a,d)}if(i.index+s>t)break;r.push(i.index,s)}for(var l=r.length-1;0<=l;l-=2){var c=r[l-1];if(n(e,c,e,c+(s=r[l])))return!0}}:function(e,t,n){var i=h.getLine(e);for(u.lastIndex=t;o=u.exec(i);){var o,r=o[0].length;if(n(e,o=o.index,e,o+r))return!0;if(!r&&(u.lastIndex=o+=v.skipEmptyMatch(i,o,d),o>=i.length))return!1}},{forEach:l?function(e){var t=o.row;if(!i(t,o.column,e)){for(t--;r<=t;t--)if(i(t,Number.MAX_VALUE,e))return;if(0!=n.wrap)for(t=s,r=o.row;r<=t;t--)if(i(t,Number.MAX_VALUE,e))return}}:function(e){var t=o.row;if(!i(t,o.column,e)){for(t+=1;t<=s;t++)if(i(t,0,e))return;if(0!=n.wrap)for(t=r,s=o.row;t<=s;t++)if(i(t,0,e))return}}}},t.Search=o}),define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){"use strict";function s(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var i,o,r=this&&this.__extends||(o=function(e,t){return(o=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=e("../lib/keys"),l=e("../lib/useragent"),c=a.KEY_MODS,h=(d.prototype.$init=function(e,t,n){this.platform=t||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},d.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},d.prototype.removeCommand=function(e,t){var n,i=e&&("string"==typeof e?e:e.name),o=(e=this.commands[i],t||delete this.commands[i],this.commandKeyBinding);for(n in o){var r,s=o[n];s==e?delete o[n]:Array.isArray(s)&&-1!=(r=s.indexOf(e))&&(s.splice(r,1),1==s.length&&(o[n]=s[0]))}},d.prototype.bindKey=function(e,i,o){if("object"==typeof e&&e&&(null==o&&(o=e.position),e=e[this.platform]),e)return"function"==typeof i?this.addCommand({exec:i,bindKey:e,name:i.name||e}):void e.split("|").forEach(function(e){var t="",n=(-1!=e.indexOf(" ")&&(e=(n=e.split(/\s+/)).pop(),n.forEach(function(e){e=this.parseKeys(e),e=c[e.hashId]+e.key;t+=(t?" ":"")+e,this._addCommandToBinding(t,"chainKeys")},this),t+=" "),this.parseKeys(e)),e=c[n.hashId]+n.key;this._addCommandToBinding(t+e,i,o)},this)},d.prototype._addCommandToBinding=function(e,t,n){var i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(r=i[e].indexOf(t))&&i[e].splice(r,1):i[e]=[i[e]],"number"!=typeof n&&(n=s(t));for(var o=i[e],r=0;r<o.length;r++)if(n<s(o[r]))break;o.splice(r,0,t)}else delete i[e]},d.prototype.addCommands=function(n){n&&Object.keys(n).forEach(function(e){var t=n[e];if(t){if("string"==typeof t)return this.bindKey(t,e);"object"==typeof(t="function"==typeof t?{exec:t}:t)&&(t.name||(t.name=e),this.addCommand(t))}},this)},d.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},d.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},d.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},d.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(e){return e}),n=t.pop(),i=a[n];if(a.FUNCTION_KEYS[i])n=a.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 o=0,r=t.length;r--;){var s=a.KEY_MODS[t[r]];if(null==s)return"undefined"!=typeof console&&console.error("invalid modifier "+t[r]+" in "+e),!1;o|=s}return{key:n,hashId:o}},d.prototype.findKeyCommand=function(e,t){e=c[e]+t;return this.commandKeyBinding[e]},d.prototype.handleKeyboard=function(e,t,n,i){var o,r;if(!(i<0))return o=c[t]+n,r=this.commandKeyBinding[o],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||0<i)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-o.length-1)),{command:r}):(e.$keyChain=e.$keyChain||o,{command:"null"})},d.prototype.getStatusText=function(e,t){return t.$keyChain||""},d),e=(r(u,i=h),u);function u(e,t){e=i.call(this,e,t)||this;return e.$singleCommand=!0,e}function d(e,t){this.$init(e,t,!1)}e.call=function(e,t,n){h.prototype.$init.call(e,t,n,!0)},h.call=function(e,t,n){h.prototype.$init.call(e,t,n,!1)},t.HashHandler=e,t.MultiHashHandler=h}),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,o,r=this&&this.__extends||(o=function(e,t){return(o=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),s=e("../lib/oop"),a=e("../keyboard/hash_handler").MultiHashHandler,e=e("../lib/event_emitter").EventEmitter,r=(r(l,i=a),l.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(!(e="string"==typeof 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},l.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)},l.prototype.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])},this)}finally{this.$inReplay=!1}}},l.prototype.trimMacro=function(e){return e.map(function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e=e[1]?e:e[0]})},l);function l(e,t){t=i.call(this,t,e)||this;return t.byName=t.commands,t.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)}),t}s.implement(r.prototype,e),t.CommandManager=r}),define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(e,t,n){"use strict";function i(e,t){return{win:e,mac:t}}var l=e("../lib/lang"),o=e("../config"),c=e("../range").Range;t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:i("Ctrl-,","Command-,"),exec:function(t){o.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:i("Alt-E","F4"),exec:function(t){o.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:i("Alt-Shift-E","Shift-F4"),exec:function(t){o.loadModule("ace/ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:i("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:i(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:i("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:i("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:i("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:i("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:i("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:i(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:i("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:i("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:i("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:i("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:i("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:i("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:i("Ctrl-F","Command-F"),exec:function(t){o.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:i("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:i("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:i("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:i("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:i("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:i("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:i("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:i("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:i("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:i("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:i("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:i("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:i("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:i("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:i("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:i("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:i("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:i("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:i("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:i("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:i(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:i("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:i(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:i("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:i("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:i("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:i("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:i("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:i("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:i("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:i(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()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),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:i("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:i("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:i("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:i("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:i("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:i("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:i("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:i("Ctrl-H","Command-Option-F"),exec:function(t){o.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:i("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:i("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:i("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:i("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:i("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:i("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:i("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:i("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:i("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:i("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:i("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:i("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:i("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:i("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:i("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:i("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:i("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:i("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:i("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(l.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:i(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:i("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:i("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:i("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:i(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:i("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:i("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:i(null,null),exec:function(e){for(var t=e.selection.isBackwards(),n=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),i=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),t=e.session.doc.getLine(n.row).length,o=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,r=e.session.doc.getLine(n.row),s=n.row+1;s<=i.row+1;s++){var a=l.stringTrimLeft(l.stringTrimRight(e.session.doc.getLine(s)));r+=a=0!==a.length?" "+a:a}i.row+1<e.session.doc.getLength()-1&&(r+=e.session.doc.getNewLineCharacter()),e.clearSelection(),e.session.doc.replace(new c(n.row,0,i.row+2,0),r),0<o?(e.selection.moveCursorTo(n.row,n.column),e.selection.selectTo(n.row,n.column+o)):(t=e.session.doc.getLine(n.row).length>t?t+1:t,e.selection.moveCursorTo(n.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:i(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 r=0;r<i.length;r++)r!=i.length-1||i[r].end.row===t&&i[r].end.column===n||o.push(new c(i[r].end.row,i[r].end.column,t,n)),0===r?0===i[r].start.row&&0===i[r].start.column||o.push(new c(0,0,i[r].start.row,i[r].start.column)):o.push(new c(i[r-1].end.row,i[r-1].end.column,i[r].start.row,i[r].start.column));e.exitMultiSelectMode(),e.clearSelection();for(r=0;r<o.length;r++)e.selection.addRange(o[r],!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:i("F1","F1"),exec:function(e){e.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:i(null,null),exec:function(e){e.prompt({$type:"modes"})},readOnly:!0}];for(var r=1;r<9;r++)t.commands.push({name:"foldToLevel"+r,description:"Fold To Level "+r,level:r,exec:function(e){e.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var o=e("./lib/dom");function i(e){this.session=e,(this.session.widgetManager=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)}i.prototype.getRowLength=function(e){var t=this.lineWidgets&&this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0;return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1+t:1+t},i.prototype.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},i.prototype.$onChangeEditor=function(e){this.attach(e.editor)},i.prototype.attach=function(e){e&&e.widgetManager&&e.widgetManager!=this&&e.widgetManager.detach(),this.editor!=e&&(this.detach(),(this.editor=e)&&(e.widgetManager=this,e.renderer.on("beforeRender",this.measureWidgets),e.renderer.on("afterRender",this.renderWidgets)))},i.prototype.detach=function(e){var t=this.editor;t&&(this.editor=null,t.widgetManager=null,t.renderer.off("beforeRender",this.measureWidgets),t.renderer.off("afterRender",this.renderWidgets),(t=this.session.lineWidgets)&&t.forEach(function(e){e&&e.el&&e.el.parentNode&&(e._inDocument=!1,e.el.parentNode.removeChild(e.el))}))},i.prototype.updateOnFold=function(e,t){var n=t.lineWidgets;if(n&&e.action){for(var t=e.data,i=t.start.row,o=t.end.row,r="add"==e.action,s=i+1;s<o;s++)n[s]&&(n[s].hidden=r);n[o]&&(r?n[i]?n[o].hidden=r:n[i]=n[o]:(n[i]==n[o]&&(n[i]=void 0),n[o].hidden=r))}},i.prototype.updateOnChange=function(e){var t,n,i,o=this.session.lineWidgets;o&&(t=e.start.row,0!=(n=e.end.row-t)&&("remove"==e.action?(i=o.splice(t+1,n),!o[t]&&i[i.length-1]&&(o[t]=i.pop()),i.forEach(function(e){e&&this.removeLineWidget(e)},this)):(i=new Array(n),o[t]&&null!=o[t].column&&e.start.column>o[t].column&&t++,i.unshift(t,0),o.splice.apply(o,i)),this.$updateRows()))},i.prototype.$updateRows=function(){var n,e=this.session.lineWidgets;e&&(n=!0,e.forEach(function(e,t){if(e)for(n=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),n&&(this.session.lineWidgets=null))},i.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).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e},i.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t,n=this.editor.renderer,i=(e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=o.createElement("div"),e.el.textContent=e.text),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&o.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",n.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/n.layerConfig.lineHeight),this.session.getFoldAt(e.row,0));return(e.$fold=i)&&(t=this.session.lineWidgets,e.row!=i.end.row||t[i.start.row]?e.hidden=!0:t[i.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,n),this.onWidgetChanged(e),e},i.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(e){}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 for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},i.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},i.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},i.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))<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=[]}},i.prototype.renderWidgets=function(e,t){var n=t.layerConfig,i=this.session.lineWidgets;if(i){for(var o=Math.min(this.firstRow,n.firstRow),r=Math.max(this.lastRow,n.lastRow,i.length);0<o&&!i[o];)o--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,t.$cursorLayer.config=n;for(var s=o;s<=r;s++){var a,l=i[s];l&&l.el&&(l.hidden?l.el.style.top=-100-(l.pixelHeight||0)+"px":(l._inDocument||(l._inDocument=!0,t.container.appendChild(l.el)),a=t.$cursorLayer.getPixelPosition({row:s,column:0},!0).top,l.coverLine||(a+=n.lineHeight*this.session.getRowLineCount(l.row)),l.el.style.top=a-n.offset+"px",a=l.coverGutter?0:t.gutterWidth,l.fixedWidth||(a-=t.scrollLeft),l.el.style.left=a+"px",l.fullWidth&&l.screenWidth&&(l.el.style.minWidth=n.width+2*n.padding+"px"),l.fixedWidth?l.el.style.right=t.scrollBar.getWidth()+"px":l.el.style.right=""))}}},t.LineWidgets=i}),define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(e,t,n){"use strict";var o=e("../lib/keys"),i=e("../mouse/default_gutter_handler").GutterTooltip;function r(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 i(this.editor)}r.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))},r.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))},r.prototype.$onGutterKeyDown=function(e){if(this.annotationTooltip.isOpen)return e.preventDefault(),void(e.keyCode===o.escape&&this.annotationTooltip.hideTooltip());if(e.target===this.element){if(e.keyCode!=o.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||(null===t||null!==n)&&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)},r.prototype.$handleGutterKeyboardInteraction=function(e){if(e.keyCode===o.tab)e.preventDefault();else{if(e.keyCode===o.escape)return e.preventDefault(),this.$blurGutter(),this.element.focus(),void(this.lane=null);if(e.keyCode===o.up)switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp()}else if(e.keyCode===o.down)switch(e.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown()}else{if(e.keyCode===o.left)return e.preventDefault(),void this.$switchLane("annotation");if(e.keyCode===o.right)return e.preventDefault(),void this.$switchLane("fold");if(e.keyCode===o.enter||e.keyCode===o.space)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].getBoundingClientRect(),i=this.annotationTooltip.getElement().style;i.left=n.right+"px",i.top=n.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex))}}}},r.prototype.$blurGutter=function(){if(null!==this.activeRowIndex)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex)}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},r.prototype.$isFoldWidgetVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),e="none"!==this.$getFoldWidget(e).style.display;return t&&e},r.prototype.$isAnnotationVisible=function(e){var t=this.editor.isRowFullyVisible(this.$rowIndexToRow(e)),e="none"!==this.$getAnnotation(e).style.display;return t&&e},r.prototype.$getFoldWidget=function(e){return this.lines.get(e).element.childNodes[1]},r.prototype.$getAnnotation=function(e){return this.lines.get(e).element.childNodes[2]},r.prototype.$findNearestFoldWidget=function(e){if(this.$isFoldWidgetVisible(e))return e;for(var t=0;0<e-t||e+t<this.lines.getLength()-1;){if(0<=e-++t&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},r.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;0<e-t||e+t<this.lines.getLength()-1;){if(0<=e-++t&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},r.prototype.$focusFoldWidget=function(e){null!=e&&((e=this.$getFoldWidget(e)).classList.add(this.editor.renderer.keyboardFocusClassName),e.focus())},r.prototype.$focusAnnotation=function(e){null!=e&&((e=this.$getAnnotation(e)).classList.add(this.editor.renderer.keyboardFocusClassName),e.focus())},r.prototype.$blurFoldWidget=function(e){e=this.$getFoldWidget(e);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},r.prototype.$blurAnnotation=function(e){e=this.$getAnnotation(e);e.classList.remove(this.editor.renderer.keyboardFocusClassName),e.blur()},r.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;0<e;)if(this.$isFoldWidgetVisible(--e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},r.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(this.$isFoldWidgetVisible(++e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},r.prototype.$moveAnnotationUp=function(){for(var e=this.activeRowIndex;0<e;)if(this.$isAnnotationVisible(--e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},r.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e<this.lines.getLength()-1;)if(this.$isAnnotationVisible(++e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},r.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;t=this.$findNearestFoldWidget(this.activeRowIndex);if(null==t)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=t,this.$focusFoldWidget(this.activeRowIndex)}},r.prototype.$rowIndexToRow=function(e){e=this.lines.get(e);return e?e.row:null},r.prototype.$rowToRowIndex=function(e){for(var t=0;t<this.lines.getLength();t++)if(this.lines.get(t).row==e)return t;return null},t.GutterKeyboardHandler=r;a.prototype.getKey=function(){return o.keyCodeToString(this.domEvent.keyCode)},a.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},a.prototype.isInAnnotationLane=function(){return"annotation"===this.gutterKeyboardHandler.activeLane},a.prototype.isInFoldLane=function(){return"fold"===this.gutterKeyboardHandler.activeLane};var s=a;function a(e,t){this.gutterKeyboardHandler=t,this.domEvent=e}t.GutterKeyboardEvent=s}),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 u=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{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),i=e("./lib/dom"),f=e("./lib/lang"),r=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,d=e("./search").Search,m=e("./range").Range,p=e("./lib/event_emitter").EventEmitter,g=e("./commands/command_manager").CommandManager,y=e("./commands/default_commands").commands,w=e("./config"),v=e("./token_iterator").TokenIterator,b=e("./line_widgets").LineWidgets,$=e("./keyboard/gutter_handler").GutterKeyboardHandler,C=e("./config").nls,S=e("./clipboard"),x=e("./lib/keys"),e=(A.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=f.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)},A.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()},A.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)&&(this._signal("beforeEndOperation"),this.curOp)){var e=this.curOp.command,t=e&&e.scrollIntoView;if(t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),i=this.renderer.layerConfig;(n.start.row>=i.lastRow||n.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON();this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},A.prototype.$historyTracker=function(e){var t,n,i,o;this.$mergeUndoDeltas&&(t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(o=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0):i=i&&-1!==n.indexOf(e.command.name),(i="always"!=this.$mergeUndoDeltas&&2e3<Date.now()-this.sequenceStartTime?!1:i)?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now()))},A.prototype.setKeyboardHandler=function(t,n){var i;t&&"string"==typeof t&&"ace"!=t?(this.$keybindingId=t,i=this,w.loadModule(["keybinding",t],function(e){i.$keybindingId==t&&i.keyBinding.setKeyboardHandler(e&&e.handler),n&&n()})):(this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),n&&n())},A.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},A.prototype.setSession=function(e){var t,n;this.session!=e&&(this.curOp&&this.endOperation(),this.curOp={},(t=this.session)&&(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),(n=this.session.getSelection()).off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)),(this.session=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())},A.prototype.getSession=function(){return this.session},A.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},A.prototype.getValue=function(){return this.session.getValue()},A.prototype.getSelection=function(){return this.selection},A.prototype.resize=function(e){this.renderer.onResize(e)},A.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},A.prototype.getTheme=function(){return this.renderer.getTheme()},A.prototype.setStyle=function(e){this.renderer.setStyle(e)},A.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},A.prototype.getFontSize=function(){return this.getOption("fontSize")||i.computedStyle(this.container).fontSize},A.prototype.setFontSize=function(e){this.setOption("fontSize",e)},A.prototype.$highlightBrackets=function(){var r;this.$highlightPending||((r=this).$highlightPending=!0,setTimeout(function(){r.$highlightPending=!1;var e,t,n,i,o=r.session;o&&!o.destroyed&&(o.$bracketHighlight&&(o.$bracketHighlight.markerIds.forEach(function(e){o.removeMarker(e)}),o.$bracketHighlight=null),e=r.getCursorPosition(),t=(t=r.getKeyboardHandler())&&t.$getDirectionForHighlight&&t.$getDirectionForHighlight(r),(t=o.getMatchingBracketRanges(e,t))||(n=new v(o,e.row,e.column).getCurrentToken())&&/\b(?:tag-open|tag-name)/.test(n.type)&&((n=o.getMatchingTags(e))&&(t=[n.openTagName,n.closeTagName])),(t=!t&&o.$mode.getMatching?o.$mode.getMatching(r.session):t)&&(i="ace_bracket",Array.isArray(t)?1==t.length&&(i="ace_error_bracket"):t=[t],2==t.length&&(0==m.comparePoints(t[0].end,t[1].start)?t=[m.fromPoints(t[0].start,t[1].end)]:0==m.comparePoints(t[0].start,t[1].end)&&(t=[m.fromPoints(t[1].start,t[0].end)])),o.$bracketHighlight={ranges:t,markerIds:t.map(function(e){return o.addMarker(e,i,"text")})}),r.getHighlightIndentGuides()&&r.renderer.$textLayer.$highlightIndentGuide())},50))},A.prototype.focus=function(){this.textInput.focus()},A.prototype.isFocused=function(){return this.textInput.isFocused()},A.prototype.blur=function(){this.textInput.blur()},A.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},A.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},A.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},A.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()},A.prototype.onTokenizerUpdate=function(e){e=e.data;this.renderer.updateLines(e.first,e.last)},A.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},A.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},A.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},A.prototype.$updateHighlightActiveLine=function(){var e,t,n=this.getSession();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()||1<this.renderer.$minLines||(e=!1)),n.$highlightLineMarker&&!e?(n.removeMarker(n.$highlightLineMarker.id),n.$highlightLineMarker=null):!n.$highlightLineMarker&&e?((t=new m(e.row,e.column,e.row,1/0)).id=n.addMarker(t,"ace_active-line","screenLine"),n.$highlightLineMarker=t):e&&(n.$highlightLineMarker.start.row=e.row,n.$highlightLineMarker.end.row=e.row,n.$highlightLineMarker.start.column=e.column,n._signal("changeBackMarker"))},A.prototype.onSelectionChange=function(e){var t,n,i=this.session,i=(i.$selectionMarker&&i.removeMarker(i.$selectionMarker),i.$selectionMarker=null,this.selection.isEmpty()?this.$updateHighlightActiveLine():(t=this.selection.getRange(),n=this.getSelectionStyle(),i.$selectionMarker=i.addMarker(t,"ace_selection",n)),this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp());this.session.highlight(i),this._signal("changeSelection")},A.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var n=t.start.column,i=t.end.column,e=e.getLine(t.start.row),t=e.substring(n,i);if(!(5e3<t.length)&&/[\w\d]/.test(t)){t=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:t}),e=e.substring(n-1,i+1);if(t.test(e))return t}}},A.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},A.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},A.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},A.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},A.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},A.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},A.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},A.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},A.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},A.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),n=!1;if(!e&&this.$copyWithEmptySelection)for(var n=!0,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),S.lineMode=!!n&&s.text,s.text},A.prototype.onCopy=function(){this.commands.exec("copy",this)},A.prototype.onCut=function(){this.commands.exec("cut",this)},A.prototype.onPaste=function(e,t){this.commands.exec("paste",this,{text:e,event:t})},A.prototype.$handlePaste=function(e){this._signal("paste",e="string"==typeof e?{text:e}:e);var t=e.text,e=t===S.lineMode,n=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)e?n.insert({row:this.selection.lead.row,column:0},t):this.insert(t);else if(e)this.selection.rangeList.ranges.forEach(function(e){n.insert({row:e.start.row,column:0},t)});else{var i=t.split(/\r\n|\r|\n/),o=this.selection.rangeList.ranges,e=!(2!=i.length||i[0]&&i[1]);if(i.length!=o.length||e)return this.commands.exec("insertstring",this,t);for(var r=o.length;r--;){var s=o[r];s.isEmpty()||n.remove(s),n.insert(s.start,i[r])}}},A.prototype.execCommand=function(e,t){return this.commands.exec(e,this,t)},A.prototype.insert=function(e,t){var n,i=this.session,o=i.getMode(),r=this.getCursorPosition(),s=(!this.getBehavioursEnabled()||t||(n=o.transformAction(i.getState(r.row),"insertion",this,i,e))&&(e===n.text||this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1),e=n.text),"\t"==e&&(e=this.session.getTabString()),this.selection.isEmpty()?this.session.getOverwrite()&&-1==e.indexOf("\n")&&((s=m.fromPoints(r,r)).end.column+=e.length,this.session.remove(s)):(s=this.getSelectionRange(),r=this.session.remove(s),this.clearSelection()),"\n"!=e&&"\r\n"!=e||(a=i.getLine(r.row),r.column>a.search(/\S|$/)&&(t=a.substr(r.column).search(/\S|$/),i.doc.removeInLine(r.row,r.column,r.column+t))),this.clearSelection(),r.column),t=i.getState(r.row),a=i.getLine(r.row),l=o.checkOutdent(t,a,e);i.insert(r,e),n&&n.selection&&(2==n.selection.length?this.selection.setSelectionRange(new m(r.row,s+n.selection[0],r.row,s+n.selection[1])):this.selection.setSelectionRange(new m(r.row+n.selection[0],n.selection[1],r.row+n.selection[2],n.selection[3]))),this.$enableAutoIndent&&(i.getDocument().isNewLine(e)&&(s=o.getNextLineIndent(t,a.slice(0,r.column),i.getTabString()),i.insert({row:r.row+1,column:0},s)),l&&o.autoOutdent(t,i,r.row))},A.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new m(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),i="",o="",r=e.getTabString(),s=0;s<n.length;s++)for(var a=n[s].start.row,l=n[s].end.row,c=a;c<=l;c++){0<c&&(i=e.getState(c-1),h=e.getLine(c-1),o=t.getNextLineIndent(i,h,r));var h=e.getLine(c),u=t.$getIndent(h);o!==u&&(0<u.length&&(u=new m(c,0,c,u.length),e.remove(u)),0<o.length&&e.insert({row:c,column:0},o)),t.autoOutdent(i,e,c)}},A.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});e=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(e):e(),this.endOperation()},A.prototype.applyComposition=function(e,t){var n;(t.extendLeft||t.extendRight)&&((n=this.selection.getRange()).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()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((n=this.selection.getRange()).start.column-=t.restoreStart,n.end.column-=t.restoreEnd,this.selection.setRange(n))},A.prototype.onCommandKey=function(e,t,n){return this.keyBinding.onCommandKey(e,t,n)},A.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},A.prototype.getOverwrite=function(){return this.session.getOverwrite()},A.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},A.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},A.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},A.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},A.prototype.getDragDelay=function(){return this.getOption("dragDelay")},A.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},A.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},A.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},A.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},A.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},A.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},A.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},A.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},A.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},A.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},A.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},A.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},A.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},A.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},A.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},A.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},A.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},A.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},A.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},A.prototype.getReadOnly=function(){return this.getOption("readOnly")},A.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},A.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},A.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},A.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},A.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},A.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},A.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t,n,i,e=this.getSelectionRange();this.getBehavioursEnabled()&&(n=(t=this.session).getState(e.start.row),n=t.getMode().transformAction(n,"deletion",this,t,e),0===e.end.column&&"\n"==(i=t.getTextRange(e))[i.length-1]&&(i=t.getLine(e.end.row),/^\s+$/.test(i)&&(e.end.column=i.length)),n&&(e=n)),this.session.remove(e),this.clearSelection()},A.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},A.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()},A.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},A.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)},A.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},A.prototype.transposeLetters=function(){var e,t,n,i;!this.selection.isEmpty()||0!==(t=(e=this.getCursorPosition()).column)&&(i=t<(i=this.session.getLine(e.row)).length?(n=i.charAt(t)+i.charAt(t-1),new m(e.row,t-1,e.row,t+1)):(n=i.charAt(t-1)+i.charAt(t-2),new m(e.row,t-2,e.row,t)),this.session.replace(i,n),this.session.selection.moveToPosition(i.end))},A.prototype.toLowerCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),n=this.session.getTextRange(t);this.session.replace(t,n.toLowerCase()),this.selection.setSelectionRange(e)},A.prototype.toUpperCase=function(){var e=this.getSelectionRange(),t=(this.selection.isEmpty()&&this.selection.selectWord(),this.getSelectionRange()),n=this.session.getTextRange(t);this.session.replace(t,n.toUpperCase()),this.selection.setSelectionRange(e)},A.prototype.indent=function(){var e=this.session,t=this.getSelectionRange();if(t.start.row<t.end.row)return o=this.$getSelectedRows(),void e.indentRows(o.first,o.last,"\t");if(t.start.column<t.end.column){var n=e.getTextRange(t);if(!/^\s+$/.test(n))return o=this.$getSelectedRows(),void e.indentRows(o.first,o.last,"\t")}var i=e.getLine(t.start.row),n=t.start,o=e.getTabSize(),e=e.documentToScreenColumn(n.row,n.column);if(this.session.getUseSoftTabs())var r=o-e%o,s=f.stringRepeat(" ",r);else{for(r=e%o;" "==i[t.start.column-1]&&r;)t.start.column--,r--;this.selection.setSelectionRange(t),s="\t"}return this.insert(s)},A.prototype.blockIndent=function(){var e=this.$getSelectedRows();this.session.indentRows(e.first,e.last,"\t")},A.prototype.blockOutdent=function(){var e=this.session.getSelection();this.session.outdentRows(e.getRange())},A.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});for(var o=new m(0,0,0,0),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])}},A.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)},A.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)},A.prototype.getNumberAt=function(e,t){for(var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g,i=(n.lastIndex=0,this.session.getLine(e));n.lastIndex<t;){var o=n.exec(i);if(o.index<=t&&o.index+o[0].length>=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},A.prototype.modifyNumber=function(e){var t,n,i,o=this.selection.getCursor().row,r=this.selection.getCursor().column,s=new m(o,r-1,o,r),s=this.session.getTextRange(s);!isNaN(parseFloat(s))&&isFinite(s)?(s=this.getNumberAt(o,r))&&(i=0<=s.value.indexOf(".")?s.start+s.value.indexOf(".")+1:s.end,t=s.start+s.value.length-i,n=parseFloat(s.value),n*=Math.pow(10,t),i!==s.end&&r<i?e*=Math.pow(10,s.end-r-1):e*=Math.pow(10,s.end-r),i=(n=(n+=e)/Math.pow(10,t)).toFixed(t),e=new m(o,s.start,o,s.end),this.session.replace(e,i),this.moveCursorTo(o,Math.max(s.start+1,r+i.length-s.value.length))):this.toggleWord()},A.prototype.toggleWord=function(){for(var n,i=this.selection.getCursor().row,e=this.selection.getCursor().column,o=(this.selection.selectWord(),this.getSelectedText()),r=this.selection.getWordRange().start.column,t=o.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),s=e-r-1,a=(s<0&&(s=0),0),l=this,c=(o.match(/[A-Za-z0-9_]+/)&&t.forEach(function(e,t){n=a+e.length,a<=s&&s<=n&&(o=e,l.selection.clearSelection(),l.moveCursorTo(i,a+r),l.selection.selectTo(i,n+r)),a=n}),this.$toggleWordPairs),h=0;h<c.length;h++)for(var u=c[h],d=0;d<=1;d++){var p=+!d,g=o.match(new RegExp("^\\s?_?("+f.escapeRegExp(u[d])+")\\s?$","i"));g&&o.match(new RegExp("([_]|^|\\s)("+f.escapeRegExp(g[1])+")($|\\s)","g"))&&(g=o.replace(new RegExp(f.escapeRegExp(u[d]),"i"),function(e){var t=u[p];return e.toUpperCase()==e?t=t.toUpperCase():e.charAt(0).toUpperCase()==e.charAt(0)&&(t=t.substr(0,0)+u[p].charAt(0).toUpperCase()+t.substr(1)),t}),this.insert(g))}},A.prototype.findLinkAt=function(e,t){var n,i,o,e=this.session.getLine(e).split(/((?:https?|ftp):\/\/[\S]+)/),r=t,s=(r<0&&(r=0),0);try{for(var a=u(e),l=a.next();!l.done;l=a.next()){var c=l.value,h=s+c.length;if(s<=r&&r<=h&&c.match(/((?:https?|ftp):\/\/[\S]+)/)){o=c.replace(/[\s:.,'";}\]]+$/,"");break}s=h}}catch(e){n={error:e}}finally{try{l&&!l.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}return o},A.prototype.openLink=function(){var e=this.selection.getCursor(),e=this.findLinkAt(e.row,e.column);return e&&window.open(e,"_blank"),null!=e},A.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},A.prototype.duplicateSelection=function(){var e,t=this.selection,n=this.session,i=t.getRange(),o=t.isBackwards();i.isEmpty()?(e=i.start.row,n.duplicateLines(e,e)):(e=o?i.start:i.end,n=n.insert(e,n.getTextRange(i)),i.start=e,i.end=n,t.setSelectionRange(i,o))},A.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},A.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},A.prototype.moveText=function(e,t,n){return this.session.moveText(e,t,n)},A.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},A.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},A.prototype.$moveLines=function(e,t){var n=this.selection;if(!n.inMultiSelectMode||this.inVirtualSelectionMode){var i=n.toOrientedRange(),o=this.$getSelectedRows(i),r=this.session.$moveLines(o.first,o.last,t?0:e);i.moveBy(r=t&&-1==e?0:r,0),n.fromOrientedRange(i)}else{for(var s=n.rangeList.ranges,a=(n.rangeList.detach(this.session),this.inVirtualSelectionMode=!0,0),l=0,c=s.length,h=0;h<c;h++){for(var u=h,d=(s[h].moveBy(a,0),(o=this.$getSelectedRows(s[h])).first),p=o.last;++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}for(h--,a=this.session.$moveLines(d,p,t?0:e),t&&-1==e&&(u=h+1);u<=h;)s[u].moveBy(a,0),u++;l+=a=t?a:0}n.fromOrientedRange(n.ranges[0]),n.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},A.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},A.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},A.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},A.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},A.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},A.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},A.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},A.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},A.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},A.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight),e=(!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),n.scrollTop);n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(e)},A.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},A.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},A.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},A.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},A.prototype.scrollPageDown=function(){this.$moveByPage(1)},A.prototype.scrollPageUp=function(){this.$moveByPage(-1)},A.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},A.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},A.prototype.centerSelection=function(){var e=this.getSelectionRange(),e={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(e,.5)},A.prototype.getCursorPosition=function(){return this.selection.getCursor()},A.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},A.prototype.getSelectionRange=function(){return this.selection.getRange()},A.prototype.selectAll=function(){this.selection.selectAll()},A.prototype.clearSelection=function(){this.selection.clearSelection()},A.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},A.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},A.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new v(this.session,n.row,n.column),o=i.getCurrentToken(),r=0,s=(o=o&&-1!==o.type.indexOf("tag-name")?i.stepBackward():o)||i.stepForward();if(s){var a,l,c,h,u,d=!1,p={},g=n.column-s.start,f={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;g<s.value.length&&!d;g++)if(f[s.value[g]])switch(l=f[s.value[g]]+"."+s.type.replace("rparen","lparen"),isNaN(p[l])&&(p[l]=0),s.value[g]){case"(":case"[":case"{":p[l]++;break;case")":case"]":case"}":p[l]--,-1===p[l]&&(a="bracket",d=!0)}}else-1!==s.type.indexOf("tag-name")&&(isNaN(p[s.value])&&(p[s.value]=0),"<"===o.value&&1<r?p[s.value]++:"</"===o.value&&p[s.value]--,-1===p[s.value]&&(a="tag",d=!0))}while(d||(o=s,r++,s=i.stepForward(),g=0),s&&!d);if(a){if("bracket"===a)(u=this.session.getBracketRange(n))||(c=(u=new m(i.getCurrentTokenRow(),i.getCurrentTokenColumn()+g-1,i.getCurrentTokenRow(),i.getCurrentTokenColumn()+g-1)).start,(t||c.row===n.row&&Math.abs(c.column-n.column)<2)&&(u=this.session.getBracketRange(c)));else if("tag"===a){if(!s||-1===s.type.indexOf("tag-name"))return;0!==(u=new m(i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2,i.getCurrentTokenRow(),i.getCurrentTokenColumn()-2)).compare(n.row,n.column)||(h=this.session.getMatchingTags(n))&&(c=h.openTag.contains(n.row,n.column)?(u=h.closeTag).start:(u=h.openTag,h.closeTag.start.row===n.row&&h.closeTag.start.column===n.column?u.end:u.start)),c=c||u.start}(c=u&&u.cursor||c)&&(e?u&&t?this.selection.setRange(u):u&&u.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(c.row,c.column):this.selection.moveTo(c.row,c.column))}}},A.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)},A.prototype.navigateTo=function(e,t){this.selection.moveTo(e,t)},A.prototype.navigateUp=function(e){var t;if(this.selection.isMultiLine()&&!this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(-e||-1,0)},A.prototype.navigateDown=function(e){var t;if(this.selection.isMultiLine()&&this.selection.isBackwards())return t=this.selection.anchor.getPosition(),this.moveCursorToPosition(t);this.selection.clearSelection(),this.selection.moveCursorBy(e||1,0)},A.prototype.navigateLeft=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorLeft();else{var t=this.getSelectionRange().start;this.moveCursorToPosition(t)}this.clearSelection()},A.prototype.navigateRight=function(e){if(this.selection.isEmpty())for(e=e||1;e--;)this.selection.moveCursorRight();else{var t=this.getSelectionRange().end;this.moveCursorToPosition(t)}this.clearSelection()},A.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},A.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},A.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},A.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},A.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},A.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},A.prototype.replace=function(e,t){t&&this.$search.set(t);var t=this.$search.find(this.session),n=0;return t&&(this.$tryReplace(t,e)&&(n=1),this.selection.setSelectionRange(t),this.renderer.scrollSelectionIntoView(t.start,t.end)),n},A.prototype.replaceAll=function(e,t){t&&this.$search.set(t);var n=this.$search.findAll(this.session),i=0;if(!n.length)return i;t=this.getSelectionRange();this.selection.moveTo(0,0);for(var o=n.length-1;0<=o;--o)this.$tryReplace(n[o],e)&&i++;return this.selection.setSelectionRange(t),i},A.prototype.$tryReplace=function(e,t){var n=this.session.getTextRange(e);return null!==(t=this.$search.replace(n,t))?(e.end=this.session.replace(e,t),e):null},A.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},A.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(),e=(null==t.needle&&((e=this.session.getTextRange(i)||this.$search.$options.needle)||(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}),this.$search.find(this.session));return t.preventScroll?e:e?(this.revealRange(e,n),e):(t.backwards?i.start=i.end:i.end=i.start,void this.selection.setRange(i))},A.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},A.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},A.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)},A.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},A.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()},A.prototype.setAutoScrollEditorIntoView=function(e){var i,o,r,s,t,n,a;e&&(r=!1,(o=this).$scrollAnchor||(this.$scrollAnchor=document.createElement("div")),(s=this.$scrollAnchor).style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild),t=this.on("changeSelection",function(){r=!0}),n=this.renderer.on("beforeRender",function(){r&&(i=o.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){var e,t,n;r&&i&&(o.isFocused()||o.searchBox&&o.searchBox.isFocused())&&(e=(t=o.renderer).$cursorLayer.$pixelPos,t=t.layerConfig,n=e.top-t.offset,null!=(r=0<=e.top&&n+i.top<0||!(e.top<t.height&&e.top+i.top+t.lineHeight>window.innerHeight)&&null)&&(s.style.top=n+"px",s.style.left=e.left+"px",s.style.height=t.lineHeight+"px",s.scrollIntoView(r)),r=i=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",n))})},A.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},A.prototype.prompt=function(t,n,i){var o=this;w.loadModule("ace/ext/prompt",function(e){e.prompt(o,t,n,i)})},A);function A(e,t,n){this.session,this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++A.$uid,this.commands=new g(r.isMac?"mac":"win",y),"object"==typeof document&&(this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new l(this)),this.keyBinding=new c(this),this.$search=(new d).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=f.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(t||n&&n.session||new h("")),w.resetOptions(this),n&&this.setOptions(n),w._signal("editor",this)}e.$uid=0,e.prototype.curOp=null,e.prototype.prevOp={},e.prototype.$mergeableCommands=["backspace","del","insertstring"],e.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(e.prototype,p),w.defineOptions(e.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||1<this.session.getLength()||0<this.session.getLine(0).length);e&&this.renderer.placeholderNode?(this.renderer.off("afterRender",this.$updatePlaceholder),i.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null):e||this.renderer.placeholderNode?!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||""):(this.renderer.on("afterRender",this.$updatePlaceholder),i.addCssClass(this.container,"ace_hasPlaceholder"),(e=i.createElement("div")).className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode))}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){function t(e){e.target==this.renderer.scroller&&e.keyCode===x.enter&&(e.preventDefault(),e=this.getCursorPosition().row,this.isRowVisible(e)||this.scrollToLine(e,!0,!0),this.focus())}var n,i={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};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(r.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",C("editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",C("Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",t.bind(this)),this.commands.addCommand(i),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",C("editor")),this.renderer.$gutter.setAttribute("aria-label",C("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),(n=n||new $(this)).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",t.bind(this)),this.commands.removeCommand(i),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),n&&n.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=e}),define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var s=e("../lib/dom");function i(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}i.prototype.moveContainer=function(e){s.translate(this.element,0,-(e.firstRowScreen*e.lineHeight%this.canvasHeight)-e.offset*this.$offsetCoefficient)},i.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},i.prototype.computeLineTop=function(e,t,n){var i=t.firstRowScreen*t.lineHeight,i=Math.floor(i/this.canvasHeight);return n.documentToScreenRow(e,0)*t.lineHeight-i*this.canvasHeight},i.prototype.computeLineHeight=function(e,t,n){return t.lineHeight*n.getRowLineCount(e)},i.prototype.getLength=function(){return this.cells.length},i.prototype.get=function(e){return this.cells[e]},i.prototype.shift=function(){this.$cacheCell(this.cells.shift())},i.prototype.pop=function(){this.$cacheCell(this.cells.pop())},i.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=s.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)},i.prototype.unshift=function(e){if(Array.isArray(e)){this.cells.unshift.apply(this.cells,e);for(var t=s.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)},i.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},i.prototype.$cacheCell=function(e){e&&(e.element.remove(),this.cellCache.push(e))},i.prototype.createCell=function(e,t,n,i){var o,r=this.cellCache.pop();return r||(o=s.createElement("div"),i&&i(o),this.element.appendChild(o),r={element:o,text:"",row:e}),r.row=e,r},t.Lines=i}),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";function c(e){var t=document.createTextNode(""),t=(e.appendChild(t),S.createElement("span")),t=(e.appendChild(t),S.createElement("span")),n=(e.appendChild(t),S.createElement("span"));return t.appendChild(n),e}var S=e("../lib/dom"),i=e("../lib/oop"),s=e("../lib/lang"),o=e("../lib/event_emitter").EventEmitter,r=e("./lines").Lines,x=e("../config").nls,e=(a.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),(this.session=e)&&e.on("change",this.$updateAnnotations)},a.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},a.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},a.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var n=e[t],i=n.row,o=(o=this.$annotations[i])||(this.$annotations[i]={text:[],type:[]}),i=n.text,r=n.type,i=i?s.escapeHTML(i):n.html||"",i=(-1===o.text.indexOf(i)&&(o.text.push(i),o.type.push(r)),n.className);i?o.className=i:"error"==r?o.className=" ace_error":"warning"==r&&" ace_error"!=o.className?o.className=" ace_warning":"info"!=r||o.className||(o.className=" ace_info")}},a.prototype.$updateAnnotations=function(e){var t,n;this.$annotations.length&&(t=e.start.row,0!=(n=e.end.row-t)&&("remove"==e.action?this.$annotations.splice(t,1+n,null):((e=new Array(1+n)).unshift(t,1),this.$annotations.splice.apply(this.$annotations,e))))},a.prototype.update=function(e){this.config=e;for(var t=this.session,n=e.firstRow,i=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1),o=(this.oldLastRow=i,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow(),t.getNextFoldLine(n)),r=o?o.start.row:1/0,s=null,a=-1,l=n;;){if(r<l&&(l=o.end.row+1,r=(o=t.getNextFoldLine(l,o))?o.start.row:1/0),i<l){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},a.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"",i=((this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1),n?n.getWidth(t,o,e):o.toString().length*e.characterWidth),n=this.$padding||this.$computePadding();(i+=n.left+n.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},a.prototype.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row&&(this.$cursorRow=e.row))},a.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(!(0<n&&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}}}}},a.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);0<o;o--)this.$lines.shift();if(n<i)for(o=this.session.getFoldedRowCount(n+1,i);0<o;o--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),i<n&&this.$lines.push(this.$renderLines(e,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},a.prototype.$renderLines=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;s<o&&(o=r.end.row+1,s=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(n<o);){var a=this.$lines.createCell(o,e,this.session,c);this.$renderCell(a,e,r,o),i.push(a),o++}return i},a.prototype.$renderCell=function(e,t,n,i){var o,r=e.element,s=this.session,a=r.childNodes[0],l=r.childNodes[1],c=r.childNodes[2],h=c.firstChild,u=s.$firstLineNumber,d=s.$breakpoints,p=s.$decorations,g=s.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&s.foldWidgets,m=n?n.start.row:Number.MAX_VALUE,y=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",v=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",g=(g?g.getText(s,i):i+u).toString();if(this.$highlightGutterLine&&(i==this.$cursorRow||n&&i<this.$cursorRow&&m<=i&&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)),d[i]&&(w+=d[i]),p[i]&&(w+=p[i]),this.$annotations[i]&&i!==m&&(w+=this.$annotations[i].className),!f||null==(o=f[i])&&(o=f[i]=s.getFoldWidget(i)),o){u="ace_fold-widget ace_"+o,d="start"==o&&i==m&&i<n.end.row;if(d){u+=" ace_closed";for(var b="",$=!1,C=i+1;C<=n.end.row;C++)if(this.$annotations[C]){if(" ace_error"===this.$annotations[C].className){$=!0,b=" ace_error_fold";break}" ace_warning"===this.$annotations[C].className&&($=!0,b=" ace_warning_fold")}w+=b}else u+=" ace_open";l.className!=u&&(l.className=u),S.setStyle(l.style,"height",y),S.setStyle(l.style,"display","inline-block"),l.setAttribute("role","button"),l.setAttribute("tabindex","-1");p=s.getFoldWidgetRange(i);p?l.setAttribute("aria-label",x("Toggle code folding, rows $0 through $1",[p.start.row+1,p.end.row+1])):n?l.setAttribute("aria-label",x("Toggle code folding, rows $0 through $1",[n.start.row+1,n.end.row+1])):l.setAttribute("aria-label",x("Toggle code folding, row $0",[i+1])),d?(l.setAttribute("aria-expanded","false"),l.setAttribute("title",x("Unfold code"))):(l.setAttribute("aria-expanded","true"),l.setAttribute("title",x("Fold code")))}else l&&(S.setStyle(l.style,"display","none"),l.setAttribute("tabindex","0"),l.removeAttribute("role"),l.removeAttribute("aria-label"));return $&&this.$showFoldedAnnotations?(c.className="ace_gutter_annotation",h.className=v,h.className+=b,S.setStyle(h.style,"height",y),S.setStyle(c.style,"display","block"),S.setStyle(c.style,"height",y),c.setAttribute("aria-label",x("Read annotations row $0",[g])),c.setAttribute("tabindex","-1"),c.setAttribute("role","button")):this.$annotations[i]?(c.className="ace_gutter_annotation",h.className=v,this.$useSvgGutterIcons?h.className+=this.$annotations[i].className:r.classList.add(this.$annotations[i].className.replace(" ","")),S.setStyle(h.style,"height",y),S.setStyle(c.style,"display","block"),S.setStyle(c.style,"height",y),c.setAttribute("aria-label",x("Read annotations row $0",[g])),c.setAttribute("tabindex","-1"),c.setAttribute("role","button")):(S.setStyle(c.style,"display","none"),c.removeAttribute("aria-label"),c.removeAttribute("role"),c.setAttribute("tabindex","0")),g!==a.data&&(a.data=g),r.className!=w&&(r.className=w),S.setStyle(e.element.style,"height",this.$lines.computeLineHeight(i,t,s)+"px"),S.setStyle(e.element.style,"top",this.$lines.computeLineTop(i,t,s)+"px"),e.text=g,"none"===c.style.display&&"none"===l.style.display?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},a.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},a.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},a.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},a.prototype.setShowFoldWidgets=function(e){e?S.addCssClass(this.element,"ace_folding-enabled"):S.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},a.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},a.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=S.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},a.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},a);function a(e){this.element=S.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 r(this.element),this.$lines.$offsetCoefficient=1}e.prototype.$fixedWidth=!1,e.prototype.$highlightGutterLine=!0,e.prototype.$renderer="",e.prototype.$showLineNumbers=!0,e.prototype.$showFoldWidgets=!0,i.implement(e.prototype,o),t.Gutter=e}),define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){"use strict";var p=e("../range").Range,i=e("../lib/dom"),e=(o.prototype.setPadding=function(e){this.$padding=e},o.prototype.setSession=function(e){this.session=e},o.prototype.setMarkers=function(e){this.markers=e},o.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},o.prototype.update=function(e){if(e){var t,n;for(n in this.config=e,this.i=0,this.markers){var i,o,r,s=this.markers[n];s.range?(r=s.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(r=r.toScreenRange(this.session),s.renderer?(i=this.$getTop(r.start.row,e),o=this.$padding+r.start.column*e.characterWidth,s.renderer(t,r,o,i,e)):"fullLine"==s.type?this.drawFullLineMarker(t,r,s.clazz,e):"screenLine"==s.type?this.drawScreenLineMarker(t,r,s.clazz,e):r.isMultiLine()?"text"==s.type?this.drawTextMarker(t,r,s.clazz,e):this.drawMultiLineMarker(t,r,s.clazz,e):this.drawSingleLineMarker(t,r,s.clazz+" ace_start ace_br15",e)):s.update(t,this,this.session,e)}if(-1!=this.i)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},o.prototype.$getTop=function(e,t){return(e-t.firstRowScreen)*t.lineHeight},o.prototype.drawTextMarker=function(e,t,n,i,o){for(var r,s=this.session,a=t.start.row,l=t.end.row,c=a,h=0,u=s.getScreenLastRowColumn(c),d=new p(c,t.start.column,c,h);c<=l;c++)d.start.row=d.end.row=c,d.start.column=c==a?t.start.column:s.getRowWrapIndent(c),d.end.column=u,r=h,h=u,u=c+1<l?s.getScreenLastRowColumn(c+1):c==l?0:t.end.column,this.drawSingleLineMarker(e,d,n+(c==a?" ace_start":"")+" ace_br"+((c==a||c==a+1&&t.start.column?1:0)|(r<h?2:0)|(u<h?4:0)|(c==l?8:0)),i,c==l?0:1,o)},o.prototype.drawMultiLineMarker=function(e,t,n,i,o){var r,s=this.$padding,a=i.lineHeight,l=this.$getTop(t.start.row,i),c=s+t.start.column*i.characterWidth;o=o||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((r=t.clone()).end.row=r.start.row,r.end.column=this.session.getLine(r.start.row).length,this.drawBidiSingleLineMarker(e,r,n+" ace_br1 ace_start",i,null,o)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+c+"px;"+(o||"")),this.session.$bidiHandler.isBidiRow(t.end.row)?((r=t.clone()).start.row=r.end.row,r.start.column=0,this.drawBidiSingleLineMarker(e,r,n+" ace_br12",i,null,o)):(l=this.$getTop(t.end.row,i),c=t.end.column*i.characterWidth,this.elt(n+" ace_br12","height:"+a+"px;width:"+c+"px;top:"+l+"px;left:"+s+"px;"+(o||""))),(a=(t.end.row-t.start.row-1)*i.lineHeight)<=0||(l=this.$getTop(t.start.row+1,i),e=(t.start.column?1:0)|(t.end.column?0:8),this.elt(n+(e?" ace_br"+e:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+s+"px;"+(o||"")))},o.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 e=i.lineHeight,o=(t.end.column+(o||0)-t.start.column)*i.characterWidth,s=this.$getTop(t.start.row,i),t=this.$padding+t.start.column*i.characterWidth;this.elt(n,"height:"+e+"px;width:"+o+"px;top:"+s+"px;left:"+t+"px;"+(r||""))},o.prototype.drawBidiSingleLineMarker=function(e,t,n,i,o,r){var s=i.lineHeight,a=this.$getTop(t.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).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)},o.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||""))},o.prototype.drawScreenLineMarker=function(e,t,n,i,o){t=this.$getTop(t.start.row,i),i=i.lineHeight;this.elt(n,"height:"+i+"px;top:"+t+"px;left:0;right:0;"+(o||""))},o);function o(e){this.element=i.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}e.prototype.$padding=0,t.Marker=e}),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)}}),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"),c=e("../lib/dom"),y=e("../lib/lang"),o=e("./lines").Lines,r=e("../lib/event_emitter").EventEmitter,w=e("../config").nls,v=e("./text_util").isTextToken,e=(s.prototype.$updateEolChar=function(){var e=this.session.doc,e="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},s.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},s.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},s.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},s.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},s.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},s.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},s.prototype.setSession=function(e){(this.session=e)&&this.$computeTabString()},s.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&("string"==typeof(this.showInvisibles=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)},s.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},s.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e)},s.prototype.$computeTabString=function(){for(var e,t,n,i,o,r,s=this.session.getTabSize(),a=(this.tabSize=s,this.$tabStrings=[0]),l=1;l<s+1;l++)this.showTabs?((r=this.dom.createElement("span")).className="ace_invisible ace_invisible_tab",r.textContent=y.stringRepeat(this.TAB_CHAR,l),a.push(r)):a.push(this.dom.createTextNode(y.stringRepeat(" ",l),this.element));this.displayIndentGuides&&(this.$indentGuideRe=/\s\S| \t|\t |\s$/,e="ace_indent-guide",t=this.showSpaces?" ace_invisible ace_invisible_space":"",n=this.showSpaces?y.stringRepeat(this.SPACE_CHAR,this.tabSize):y.stringRepeat(" ",this.tabSize),i=this.showTabs?" ace_invisible ace_invisible_tab":"",o=this.showTabs?y.stringRepeat(this.TAB_CHAR,this.tabSize):n,(r=this.dom.createElement("span")).className=e+t,r.textContent=n,this.$tabStrings[" "]=r,(r=this.dom.createElement("span")).className=e+i,r.textContent=o,this.$tabStrings["\t"]=r)},s.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++){if(l=this.session.getFoldLine(a)){if(l.containsRow(i)){i=l.start.row;break}a=l.end.row}s++}for(var l,c=!1,a=i,h=(l=this.session.getNextFoldLine(a))?l.start.row:1/0;h<a&&(a=l.end.row+1,h=(l=this.session.getNextFoldLine(a,l))?l.start.row:1/0),!(o<a);){var u,d=r[s++];d&&(this.dom.removeChildren(d),this.$renderLine(d,a,a==h&&l),c&&(d.style.top=this.$lines.computeLineTop(a,e,this.session)+"px"),u=e.lineHeight*this.session.getRowLength(a)+"px",d.style.height!=u&&(c=!0,d.style.height=u)),a++}if(c)for(;s<this.$lines.cells.length;){var p=this.$lines.cells[s++];p.element.style.top=this.$lines.computeLineTop(p.row,e,this.session)+"px"}},s.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);0<o;o--)this.$lines.shift();if(t.lastRow>e.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0<o;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()},s.prototype.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;s<o&&(o=r.end.row+1,s=(r=this.session.getNextFoldLine(o,r))?r.start.row:1/0),!(n<o);){var a=this.$lines.createCell(o,e,this.session),l=a.element;this.dom.removeChildren(l),c.setStyle(l.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),c.setStyle(l.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(l,o,o==s&&r),this.$useLineGroups()?l.className="ace_line_group":l.className="ace_line",i.push(a),o++}return i},s.prototype.update=function(e){this.$lines.moveContainer(e);for(var t=(this.config=e).firstRow,n=e.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(e,t,n))},s.prototype.$renderToken=function(e,t,n,i){for(var o,r,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,l=this.dom.createFragment(this.element),c=0;o=a.exec(i);){var h,u,d=o[1],p=o[2],g=o[3],f=o[4],m=o[5];!s.showSpaces&&p||(h=c!=o.index?i.slice(c,o.index):"",c=o.index+o[0].length,h&&l.appendChild(this.dom.createTextNode(h,this.element)),d?(h=s.session.getScreenTabSize(t+o.index),l.appendChild(s.$tabStrings[h].cloneNode(!0)),t+=h-1):p?s.showSpaces?((u=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",u.textContent=y.stringRepeat(s.SPACE_CHAR,p.length),l.appendChild(u)):l.appendChild(this.dom.createTextNode(p,this.element)):g?((u=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",u.textContent=y.stringRepeat(s.SPACE_CHAR,g.length),l.appendChild(u)):f?(t+=1,(u=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",u.className=s.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=s.showSpaces?s.SPACE_CHAR:f,l.appendChild(u)):m&&(t+=1,(u=this.dom.createElement("span")).style.width=2*s.config.characterWidth+"px",u.className="ace_cjk",u.textContent=m,l.appendChild(u)))}return l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),v(n.type)?e.appendChild(l):(r="ace_"+n.type.replace(/\./g," ace_"),u=this.dom.createElement("span"),"fold"==n.type&&(u.style.width=n.value.length*this.config.characterWidth+"px",u.setAttribute("title",w("Unfold code"))),u.className=r,u.appendChild(l),e.appendChild(u)),t+i.length},s.prototype.renderIndentGuide=function(e,t,n){var i=t.search(this.$indentGuideRe);if(i<=0||n<=i)return t;if(" "==t[0]){for(var o=(i-=i%this.tabSize)/this.tabSize,r=0;r<o;r++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)}if("\t"!=t[0])return this.$highlightIndentGuide(),t;for(r=0;r<i;r++)e.appendChild(this.$tabStrings["\t"].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(i)},s.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);if(this.$highlightIndentGuideMarker={indentLevel:i,start:t.row},this.session.$bracketHighlight)for(var o=this.session.$bracketHighlight.ranges,r=0;r<o.length;r++)if(t.row!==o[r].start.row){this.$highlightIndentGuideMarker.end=o[r].start.row,t.row>o[r].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(r=t.row+1;r<e.length;r++){var s=e[r],a=/^\s*/.exec(s)[0].length;if(""!==s&&(this.$highlightIndentGuideMarker.end=r,a<=n))break}}this.$renderHighlightIndentGuide()}}},s.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,t=0;t<e.length;t++){var n=e[t].element.childNodes;if(0<n.length)for(var i=0;i<n.length;i++)if(n[i].classList&&n[i].classList.contains("ace_indent-guide-active")){n[i].classList.remove("ace_indent-guide-active");break}}},s.prototype.$setIndentGuideActive=function(e,t){""!==this.session.doc.getLine(e.row)&&(e=e.element.childNodes)&&(e=e[t-1])&&e.classList&&e.classList.contains("ace_indent-guide")&&e.classList.add("ace_indent-guide-active")},s.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells,t=(this.$clearActiveIndentGuide(),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;0<=n;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row<this.$highlightIndentGuideMarker.start){if(i.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}}},s.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},s.prototype.$renderWrappedLine=function(e,t,n){var i=0,o=0,r=n[0],s=0,a=this.$createLineElement();e.appendChild(a);for(var l=0;l<t.length;l++){var c=t[l],h=c.value;if(0==l&&this.displayIndentGuides){if(i=h.length,!(h=this.renderIndentGuide(a,h,r)))continue;i-=h.length}if(i+h.length<r)s=this.$renderToken(a,s,c,h),i+=h.length;else{for(;i+h.length>=r;)s=this.$renderToken(a,s,c,h.substring(0,r-i)),h=h.substring(r-i),i=r,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(y.stringRepeat(" ",n.indent),this.element)),s=0,r=n[++o]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,s=this.$renderToken(a,s,c,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,s,null,"",!0)},s.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))){if(n+r.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,o,r);n=this.$renderToken(e,n,o,r)}}},s.prototype.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));n=this.dom.createElement("span");n.className="ace_inline_button ace_keyword ace_toggle_wrap",n.textContent=o?"<hide>":"<click to see more...>",e.appendChild(n)},s.prototype.$renderLine=function(e,t,n){var i,o,r=e;(i=(n=n||0==n?n:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,n):this.session.getTokens(t)).length?(o=this.session.getRowSplitData(t))&&o.length?(this.$renderWrappedLine(e,i,o),r=e.lastChild):(r=e,this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)):this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.showEOL&&r&&(n&&(t=n.end.row),(o=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(o))},s.prototype.$getFoldLineTokens=function(e,t){var u=this.session,d=[],p=u.getTokens(e);return t.walk(function(e,t,n,i,o){if(null!=e)d.push({type:"fold",value:e});else if((p=o?u.getTokens(t):p).length){for(var r,s=p,a=i,l=n,c=0,h=0;h+s[c].value.length<a;)if(h+=s[c].value.length,++c==s.length)return;for(h!=a&&((r=s[c].value.substring(a-h)).length>l-a&&(r=r.substring(0,l-a)),d.push({type:s[c].type,value:r}),h=a+r.length,c+=1);h<l&&c<s.length;)(r=s[c].value).length+h>l?d.push({type:s[c].type,value:r.substring(0,l-h)}):d.push(s[c]),h+=r.length,c+=1}},t.end.row,this.session.getLine(t.end.row).length),d},s.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},s);function s(e){this.dom=c,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 o(this.element)}e.prototype.EOF_CHAR="¶",e.prototype.EOL_CHAR_LF="¬",e.prototype.EOL_CHAR_CRLF="¤",e.prototype.EOL_CHAR=e.prototype.EOL_CHAR_LF,e.prototype.TAB_CHAR="—",e.prototype.SPACE_CHAR="·",e.prototype.$padding=0,e.prototype.MAX_LINE_LENGTH=1e4,e.prototype.showInvisibles=!1,e.prototype.showSpaces=!1,e.prototype.showTabs=!1,e.prototype.showEOL=!1,e.prototype.displayIndentGuides=!0,e.prototype.$highlightIndentGuides=!0,e.prototype.$tabStrings=[],e.prototype.destroy={},e.prototype.onChangeTabSize=e.prototype.$computeTabString,i.implement(e.prototype,r),t.Text=e}),define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){"use strict";var c=e("../lib/dom"),e=(i.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)c.setStyle(t[n].style,"opacity",e?"":"0")},i.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&&c.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},i.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,c.removeCssClass(this.element,"ace_animate-blinking")},i.prototype.setPadding=function(e){this.$padding=e},i.prototype.setSession=function(e){this.session=e},i.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},i.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},i.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,c.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},i.prototype.addCursor=function(){var e=c.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},i.prototype.removeCursor=function(){var e;if(1<this.cursors.length)return(e=this.cursors.pop()).parentNode.removeChild(e),e},i.prototype.hideCursor=function(){this.isVisible=!1,c.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},i.prototype.showCursor=function(){this.isVisible=!0,c.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},i.prototype.restartTimer=function(){var e,t=this.$updateCursors;clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,c.removeCssClass(this.element,"ace_smooth-blinking")),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible?(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&c.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),c.HAS_CSS_ANIMATION?this.$startCssAnimation():(e=function(){this.timeoutId=setTimeout(function(){t(!1)},.6*this.blinkInterval)}.bind(this),this.intervalId=setInterval(function(){t(!0),e()},this.blinkInterval),e())):this.$stopCssAnimation()},i.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);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},i.prototype.isCursorInView=function(e,t){return 0<=e.top&&e.top<t.maxHeight},i.prototype.update=function(e){this.config=e;for(var t=this.session.$selectionMarkers,n=0,i=0,n=0,o=(t=void 0!==t&&0!==t.length?t:[{cursor:null}]).length;n<o;n++){var r,s,a=this.getPixelPosition(t[n].cursor,!0);(a.top>e.height+e.offset||a.top<0)&&1<n||(s=(r=this.cursors[i++]||this.addCursor()).style,this.drawCursor?this.drawCursor(r,a,e,t[n],this.session):this.isCursorInView(a,e)?(c.setStyle(s,"display","block"),c.translate(r,a.left,a.top),c.setStyle(s,"width",Math.round(e.characterWidth)+"px"),c.setStyle(s,"height",e.lineHeight+"px")):c.setStyle(s,"display","none"))}for(;this.cursors.length>i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},i.prototype.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},i.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},i);function i(e){this.element=c.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(),c.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}e.prototype.$padding=0,e.prototype.drawCursor=null,t.Cursor=e}),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,o=this&&this.__extends||(i=function(e,t){return(i=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),e=e("./lib/event_emitter").EventEmitter,l=(c.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},c);function c(e,t){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=s.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,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}r.implement(l.prototype,e);o(u,h=l),u.prototype.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(e){this.element.style.height=e+"px"},u.prototype.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},u.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)};var h,r=u;function u(e,t){var n=h.call(this,e,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,t.$scrollbarWidth=n.width=s.scrollbarWidth(e.ownerDocument),n.inner.style.width=n.element.style.width=(n.width||15)+5+"px",n.$minWidth=0,n}r.prototype.setInnerHeight=r.prototype.setScrollHeight;o(p,d=l),p.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.setWidth=function(e){this.element.style.width=e+"px"},p.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},p.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},p.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)};var d,e=p;function p(e,t){e=d.call(this,e,"-h")||this;return e.scrollLeft=0,e.height=t.$scrollbarWidth,e.inner.style.height=e.element.style.height=(e.height||15)+5+"px",e}t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=e,t.VScrollBar=r,t.HScrollBar=e}),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,o=this&&this.__extends||(i=function(e,t){return(i=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)},function(e,t){function n(){this.constructor=e}if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),e=e("./lib/event_emitter").EventEmitter,l=(s.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),c.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},c);function c(e,t){this.element=s.createElement("div"),this.element.className="ace_sb"+t,this.inner=s.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,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}r.implement(l.prototype,e);o(u,h=l),u.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){var n,i,o,r,s;if(t.target===this.inner)return n=this,i=t.clientY,o=t.clientY,r=this.thumbTop,a.capture(this.inner,function(e){i=e.clientY},function(){clearInterval(s)}),s=setInterval(function(){var e;void 0!==i&&(e=n.scrollTopFromThumbTop(r+i-o))!==n.scrollTop&&n._emit("scroll",{data:e})},20),a.preventDefault(t);e=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(e)}),a.preventDefault(t)}},u.prototype.getHeight=function(){return this.height},u.prototype.scrollTopFromThumbTop=function(e){e=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(e>>=0)<0?e=0:e>this.pageHeight-this.viewHeight&&(e=this.pageHeight-this.viewHeight),e},u.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},u.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},u.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})))},u.prototype.setScrollTop=function(e){this.scrollTop=e,this.thumbTop=(e=e<0?0:e)*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"};var h,r=u;function u(e,t){var n=h.call(this,e,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,n.parent=e,n.width=n.VScrollWidth,n.renderer=t,n.inner.style.width=n.element.style.width=(n.width||15)+"px",n.$minWidth=0,n}r.prototype.setInnerHeight=r.prototype.setScrollHeight;o(p,d=l),p.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===a.getButton(t)&&2!==t.detail){var n,i,o,r,s;if(t.target===this.inner)return n=this,i=t.clientX,o=t.clientX,r=this.thumbLeft,a.capture(this.inner,function(e){i=e.clientX},function(){clearInterval(s)}),s=setInterval(function(){var e;void 0!==i&&(e=n.scrollLeftFromThumbLeft(r+i-o))!==n.scrollLeft&&n._emit("scroll",{data:e})},20),a.preventDefault(t);e=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(e)}),a.preventDefault(t)}},p.prototype.getHeight=function(){return this.isVisible?this.height:0},p.prototype.scrollLeftFromThumbLeft=function(e){e=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(e>>=0)<0?e=0:e>this.pageWidth-this.viewWidth&&(e=this.pageWidth-this.viewWidth),e},p.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)},p.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})))},p.prototype.setScrollLeft=function(e){this.scrollLeft=e,this.thumbLeft=(e=e<0?0:e)*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"};var d,e=p;function p(e,t){e=d.call(this,e,"-h")||this;return e.scrollLeft=0,e.scrollWidth=0,e.height=e.HScrollHeight,e.inner.style.height=e.element.style.height=(e.height||12)+"px",e.renderer=t,e}e.prototype.setInnerWidth=e.prototype.setScrollWidth,t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=e,t.VScrollBar=r,t.HScrollBar=e}),define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){"use strict";var i=e("./lib/event");function o(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;t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}o.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},o.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},t.RenderLoop=o}),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"),e=e("../lib/event_emitter").EventEmitter,l="function"==typeof ResizeObserver,c=(h.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"},h.prototype.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",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}))},h.prototype.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},h.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=s.onIdle(function e(){t.checkForSizeChanges(),s.onIdle(e,500)},500)},h.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},h.prototype.$measureSizes=function(e){e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/512};return 0===e.width||0===e.height?null:e},h.prototype.$measureCharWidth=function(e){return this.$main.textContent=r.stringRepeat(e,512),this.$main.getBoundingClientRect().width/512},h.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},h.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},h.prototype.$getZoom=function(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*this.$getZoom(e.parentElement):1},h.prototype.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=o.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},h.prototype.transformCoordinates=function(e,t){function n(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 i(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function s(e){e=e.getBoundingClientRect();return[e.left,e.top]}e=e&&r(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a=s(this.els[0]),l=s(this.els[1]),c=s(this.els[2]),h=s(this.els[3]),h=n(i(h,l),i(h,c),i(o(l,c),o(h,a))),l=r(1+h[0],i(l,a)),c=r(1+h[1],i(c,a));if(t)return u=h[0]*t[0]/200+h[1]*t[1]/200+1,t=o(r(t[0],l),r(t[1],c)),o(r(1/u/200,t),a);var u=i(e,a),t=n(i(l,r(h[0],u)),i(c,r(h[1],u)),u);return r(200,t)},h);function h(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",512),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}c.prototype.$characterSize={width:0,height:0},i.implement(c.prototype,e),t.FontMetrics=c}),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}'}),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"),e=e("../lib/event_emitter").EventEmitter,r=(s.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light,n=(e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight),this.canvas.getContext("2d")),i=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),i)for(var o={info:1,warning:2,error:3},r=(i.forEach(function(e){e.priority=o[e.type]||null}),i=i.sort(function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}),this.renderer.session.$foldData),s=0;s<i.length;s++){var a,l=i[s].row,c=this.compensateFoldRows(l,r),h=Math.round((l-c)*this.lineHeight*this.heightRatio),u=Math.round((l-c)*this.lineHeight*this.heightRatio),l=Math.round(((l-c)*this.lineHeight+this.lineHeight)*this.heightRatio);l-u<this.minDecorationHeight&&((a=(u+l)/2|0)<this.halfMinDecorationHeight?a=this.halfMinDecorationHeight:a+this.halfMinDecorationHeight>this.canvasHeight&&(a=this.canvasHeight-this.halfMinDecorationHeight),u=Math.round(a-this.halfMinDecorationHeight),l=Math.round(a+this.halfMinDecorationHeight)),n.fillStyle=t[i[s].type]||null,n.fillRect(0,h,this.canvasWidth,l-u)}e=this.renderer.session.selection.getCursor();e&&(c=this.compensateFoldRows(e.row,r),h=Math.round((e.row-c)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,h,this.canvasWidth,2))},s.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&0<t.length)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},s);function s(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)}o.implement(r.prototype,e),t.Decorator=r}),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"),a=e("./lib/dom"),o=e("./lib/lang"),r=e("./config"),s=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,y=e("./lib/event_emitter").EventEmitter,w=e("./css/editor-css"),v=e("./layer/decorators").Decorator,b=e("./lib/useragent"),e=(a.importCssString(w,"ace_editor.css",!1),$.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(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},$.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=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))},$.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)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(e,t,n,i){if(!(2<this.resizing)){0<this.resizing?this.resizing++:this.resizing=e?1:0;var o=this.container,o=(i=i||(o.clientHeight||o.scrollHeight),n=n||(o.clientWidth||o.scrollWidth),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(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(e,t,n,i){i-=this.$extraHeight||0;var o=0,r=this.$size,s={width:r.width,height:r.height,scrollerHeight:r.scrollerHeight,scrollerWidth:r.scrollerWidth};return i&&(e||r.height!=i)&&(r.height=i,o|=this.CHANGE_SIZE,r.scrollerHeight=r.height,this.$horizScroll&&(r.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(r.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),n&&(e||r.width!=n)&&(o|=this.CHANGE_SIZE,r.width=n,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,a.setStyle(this.scrollBarH.element.style,"left",t+"px"),a.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),r.scrollerWidth=Math.max(0,n-t-this.scrollBarV.getWidth()-this.margin.h),a.setStyle(this.$gutter.style,"left",this.margin.left+"px"),t=this.scrollBarV.getWidth()+"px",a.setStyle(this.scrollBarH.element.style,"right",t),a.setStyle(this.scroller.style,"right",t),a.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(r.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)),r.$dirty=!n||!i,o&&this._signal("resize",s),o},$.prototype.onGutterResize=function(e){e=this.$showGutter?e:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},$.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,e=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(e,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},$.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},$.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.$updatePrintMargin=function(){var e;(this.$showPrintMargin||this.$printMarginEl)&&(this.$printMarginEl||((e=a.createElement("div")).className="ace_layer ace_print-margin-layer",this.$printMarginEl=a.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)),(e=this.$printMarginEl.style).left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit())},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){var e,t,n,i,o,r,s;this.$isMousePressed||(e=this.textarea.style,r=this.$composition,this.$keepTextAreaAtCursor||r?(n=this.$cursorLayer.$pixelPos)&&(r&&r.markerRange&&(n=this.$cursorLayer.getPixelPosition(r.markerRange.start,!0)),s=this.layerConfig,t=n.top,n=n.left,t-=s.offset,i=r&&r.useTextareaForIME||b.isMobile?this.lineHeight:1,t<0||t>s.height-i?a.translate(this.textarea,0,0):(s=1,o=this.$size.height-i,r?r.useTextareaForIME?(r=this.textarea.value,s=this.characterWidth*this.session.$getStringScreenWidth(r)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(n-=this.scrollLeft)>this.$size.scrollerWidth-s&&(n=this.$size.scrollerWidth-s),n+=this.gutterWidth+this.margin.left,a.setStyle(e,"height",i+"px"),a.setStyle(e,"width",s+"px"),a.translate(this.textarea,Math.min(n,this.$size.scrollerWidth-s),Math.min(t,o)))):a.translate(this.textarea,-100,0))},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},$.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.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()},$.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()},$.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()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",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)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.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,i,t=this.layerConfig;(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)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(n=this.scrollTop+(t.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight)&&(this.scrollTop=n,e=(e|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-t.offset),n=t.width+2*this.$padding+"px",i=t.minHeight+"px",a.setStyle(this.content.style,"width",n),a.setStyle(this.content.style,"height",i)),e&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-t.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?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),void this._signal("afterRender",e)}else this.$changes|=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());t=!((n=this.$maxPixelHeight&&n>this.$maxPixelHeight?this.$maxPixelHeight:n)<=2*this.lineHeight)&&t<e;n==this.desiredHeight&&this.$size.height==this.desiredHeight&&t==this.$vScroll||(t!=this.$vScroll&&(this.$vScroll=t,this.scrollBarV.setVisible(t)),e=this.container.clientWidth,this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,n),this.desiredHeight=n,this._signal("autosize"))},$.prototype.$computeLayerConfig=function(){var e,t=this.session,n=this.$size,i=n.height<=2*this.lineHeight,o=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),s=!i&&(this.$hScrollBarAlwaysVisible||n.scrollerWidth-r-2*this.$padding<0),a=this.$horizScroll!==s,s=(a&&(this.$horizScroll=s,this.scrollBarH.setVisible(s)),this.$vScroll),l=(this.$maxLines&&1<this.lineHeight&&this.$autosize(),n.scrollerHeight+this.lineHeight),c=!this.$maxLines&&this.$scrollPastEnd?(n.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0,h=(o+=c,this.scrollMargin),i=(this.session.setScrollTop(Math.max(-h.top,Math.min(this.scrollTop,o-n.scrollerHeight+h.bottom))),this.session.setScrollLeft(Math.max(-h.left,Math.min(this.scrollLeft,r+2*this.$padding-n.scrollerWidth+h.right))),!i&&(this.$vScrollBarAlwaysVisible||n.scrollerHeight-o+c<0||this.scrollTop>h.top)),c=s!==i,h=(c&&(this.$vScroll=i,this.scrollBarV.setVisible(i)),this.scrollTop%this.lineHeight),s=Math.ceil(l/this.lineHeight)-1,s=(i=Math.max(0,Math.round((this.scrollTop-h)/this.lineHeight)))+s,u=this.lineHeight,i=t.screenToDocumentRow(i,0),d=t.getFoldLine(i),t=(d&&(i=d.start.row),d=t.documentToScreenRow(i,0),e=t.getRowLength(i)*u,s=Math.min(t.screenToDocumentRow(s,0),t.getLength()-1),l=n.scrollerHeight+t.getRowLength(s)*u+e,h=this.scrollTop-d*u,0);return this.layerConfig.width==r&&!a||(t=this.CHANGE_H_SCROLL),(a||c)&&(t|=this.$updateCachedSize(!0,this.gutterWidth,n.width,n.height),this._signal("scrollbarVisibilityChanged"),c&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:i,firstRowScreen:d,lastRow:s,lineHeight:u,characterWidth:this.characterWidth,minHeight:l,maxHeight:o,offset:h,gutterOffset:u?Math.max(0,Math.ceil((h+n.height-n.scrollerHeight)/u)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),t},$.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,n=(this.$changedLines=null,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)}},$.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))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},$.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},$.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},$.prototype.scrollCursorIntoView=function(e,t,n){var i,o,r;0!==this.$size.scrollerHeight&&(i=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,o=n&&n.top||0,n=n&&n.bottom||0,this.$scrollAnimation&&(this.$stopAnimation=!0),e<(r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+o?(t&&r+o>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):r+this.$size.scrollerHeight-n<e+this.lineHeight&&(t&&r+this.$size.scrollerHeight-n<e-this.lineHeight&&(e+=t*this.$size.scrollerHeight),this.session.setScrollTop(e+this.lineHeight+n-this.$size.scrollerHeight)),o=this.scrollLeft,i-(r=2*this.layerConfig.characterWidth)<o?((i-=r)<this.$padding+r&&(i=-this.scrollMargin.left),this.session.setScrollLeft(i)):o+this.$size.scrollerWidth<(i+=r)+this.characterWidth?this.session.setScrollLeft(Math.round(i+this.characterWidth-this.$size.scrollerWidth)):o<=this.$padding&&i-o<this.characterWidth&&this.session.setScrollLeft(0))},$.prototype.getScrollTop=function(){return this.session.getScrollTop()},$.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},$.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},$.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},$.prototype.scrollToRow=function(e){this.session.setScrollTop(e*this.lineHeight)},$.prototype.alignCursor=function(e,t){var e=this.$cursorLayer.getPixelPosition(e="number"==typeof e?{row:e,column:0}:e),n=this.$size.scrollerHeight-this.lineHeight,e=e.top-n*(t||0);return this.session.setScrollTop(e),e},$.prototype.$calcSteps=function(e,t){for(var n,i,o=0,r=this.STEPS,s=[],o=0;o<r;++o)s.push((n=o/this.STEPS,(t-(i=e))*(Math.pow(n-1,3)+1)+i));return s},$.prototype.scrollToLine=function(e,t,n,i){e=this.$cursorLayer.getPixelPosition({row:e,column:0}).top,t&&(e-=this.$size.scrollerHeight/2),t=this.scrollTop;this.session.setScrollTop(e),!1!==n&&this.animateScrolling(t,i)},$.prototype.animateScrolling=function(e,t){function n(){o.$timer=clearInterval(o.$timer),o.$scrollAnimation=null,o.$stopAnimation=!1,t&&t()}var i=this.scrollTop;if(this.$animatedScroll){var o=this;if(e!=i){if(this.$scrollAnimation){var r=this.$scrollAnimation.steps;if(r.length&&(e=r[0])==i)return}var s=o.$calcSteps(e,i);this.$scrollAnimation={from:e,to:i,steps:s},clearInterval(this.$timer),o.session.setScrollTop(s.shift()),o.session.$scrollTop=i,this.$timer=setInterval(function(){if(!o.$stopAnimation)return o.session?void(s.length?(o.session.setScrollTop(s.shift()),o.session.$scrollTop=i):null!=i?(o.session.$scrollTop=-1,o.session.setScrollTop(i),i=null):n()):clearInterval(o.$timer);n()},10)}}},$.prototype.scrollToY=function(e){this.scrollTop!==e&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=e)},$.prototype.scrollToX=function(e){this.scrollLeft!==e&&(this.scrollLeft=e),this.$loop.schedule(this.CHANGE_H_SCROLL)},$.prototype.scrollTo=function(e,t){this.session.setScrollTop(t),this.session.setScrollLeft(e)},$.prototype.scrollBy=function(e,t){t&&this.session.setScrollTop(this.session.getScrollTop()+t),e&&this.session.setScrollLeft(this.session.getScrollLeft()+e)},$.prototype.isScrollableBy=function(e,t){return t<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||(0<t&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||(e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||(0<e&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0)))},$.prototype.pixelToScreenCoordinates=function(e,t){this.$hasCssTransforms?(i={top:0,left:0},e=(n=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=n[0]):i=this.scroller.getBoundingClientRect();var n=e+this.scrollLeft-i.left-this.$padding,e=n/this.characterWidth,t=Math.floor((t+this.scrollTop-i.top)/this.lineHeight),i=this.$blockCursor?Math.floor(e):Math.round(e);return{row:t,column:i,side:0<e-i?1:-1,offsetX:n}},$.prototype.screenToTextCoordinates=function(e,t){this.$hasCssTransforms?(n={top:0,left:0},e=(i=this.$fontMetrics.transformCoordinates([e,t]))[1]-this.gutterWidth-this.margin.left,t=i[0]):n=this.scroller.getBoundingClientRect();var n,i=e+this.scrollLeft-n.left-this.$padding,e=i/this.characterWidth,e=this.$blockCursor?Math.floor(e):Math.round(e),t=Math.floor((t+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(t,Math.max(e,0),i)},$.prototype.textToScreenCoordinates=function(e,t){var n=this.scroller.getBoundingClientRect(),t=this.session.documentToScreenPosition(e,t),e=this.$padding+(this.session.$bidiHandler.isBidiRow(t.row,e)?this.session.$bidiHandler.getPosLeft(t.column):Math.round(t.column*this.characterWidth)),t=t.row*this.lineHeight;return{pageX:n.left+e-this.scrollLeft,pageY:n.top+t-this.scrollTop}},$.prototype.visualizeFocus=function(){a.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){a.removeCssClass(this.container,"ace_focus")},$.prototype.showComposition=function(e){(this.$composition=e).cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(a.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")},$.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},$.prototype.hideComposition=function(){var e;this.$composition&&(this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),a.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText,e=this.session.selection.cursor,this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display="")},$.prototype.setGhostText=function(e,t){var n,i=this.session.selection.cursor,t=t||{row:i.row,column:i.column},i=(this.removeGhostText(),e.split("\n"));this.addToken(i[0],"ghost_text",t.row,t.column),this.$ghostText={text:e,position:{row:t.row,column:t.column}},1<i.length&&(this.$ghostTextWidget={text:i.slice(1).join("\n"),row:t.row,column:t.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget),e=this.$cursorLayer.getPixelPosition(t,!0),t=this.container.getBoundingClientRect().height,(n=i.length*this.lineHeight)<t-e.top||(n<t?this.scrollBy(0,(i.length-1)*this.lineHeight):this.scrollBy(0,e.top)))},$.prototype.removeGhostText=function(){var e;this.$ghostText&&(e=this.$ghostText.position,this.removeExtraToken(e.row,e.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null)},$.prototype.addToken=function(e,t,n,i){var o=this.session,r=(o.bgTokenizer.lines[n]=null,{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(i<=(a+=c.value.length)){var h=c.value.length-(a-i),u=c.value.slice(0,h),h=c.value.slice(h);s.splice(l,1,{type:c.type,value:u},r,{type:c.type,value:h});break}}else s.push(r);this.updateLines(n,n)},$.prototype.removeExtraToken=function(e,t){this.session.bgTokenizer.lines[e]=null,this.updateLines(e,e)},$.prototype.setTheme=function(n,i){function e(e){if(o.$themeId!=n)return i&&i();if(!e||!e.cssClass)throw new Error("couldn't load module "+n+" or it didn't call define");e.$id&&(o.$themeId=e.$id),a.importCssString(e.cssText,e.cssClass,o.container),o.theme&&a.removeCssClass(o.container,o.theme.cssClass);var t="padding"in e?e.padding:"padding"in(o.theme||{})?4:o.$padding;o.$padding&&t!=o.$padding&&o.setPadding(t),o.$theme=e.cssClass,o.theme=e,a.addCssClass(o.container,e.cssClass),a.setCssClass(o.container,"ace_dark",e.isDark),o.$size&&(o.$size.width=0,o.$updateSizeAsync()),o._dispatchEvent("themeLoaded",{theme:e}),i&&i()}var t,o=this;this.$themeId=n,o._dispatchEvent("themeChange",{theme:n}),n&&"string"!=typeof n?e(n):(t=n||this.$options.theme.initialValue,r.loadModule(["theme",t],e))},$.prototype.getTheme=function(){return this.$themeId},$.prototype.setStyle=function(e,t){a.setCssClass(this.container,e,!1!==t)},$.prototype.unsetStyle=function(e){a.removeCssClass(this.container,e)},$.prototype.setCursorStyle=function(e){a.setStyle(this.scroller.style,"cursor",e)},$.prototype.setMouseCursor=function(e){a.setStyle(this.scroller.style,"cursor",e)},$.prototype.attachToShadowRoot=function(){a.importCssString(w,"ace_editor.css",this.container)},$.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},$.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 v(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)}))},$.prototype.$addResizeObserver=function(){var n;window.ResizeObserver&&!this.$resizeObserver&&((n=this).$resizeTimer=o.delayedCall(function(){n.destroyed||n.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(e){var t=e[0].contentRect.width,e=e[0].contentRect.height;1<Math.abs(n.$size.width-t)||1<Math.abs(n.$size.height-e)?n.$resizeTimer.delay():n.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container))},$);function $(e,t){var n=this,e=(this.container=e||a.createElement("div"),a.addCssClass(this.container,"ace_editor"),a.HI_DPI&&a.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==r.get("useStrictCSP")&&r.set("useStrictCSP",!1),this.$gutter=a.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=a.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=a.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new s(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new l(this.content),this.$textLayer=new c(this.content));this.canvas=e.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(),r.resetOptions(this),r._signal("renderer",this)}e.prototype.CHANGE_CURSOR=1,e.prototype.CHANGE_MARKER=2,e.prototype.CHANGE_GUTTER=4,e.prototype.CHANGE_SCROLL=8,e.prototype.CHANGE_LINES=16,e.prototype.CHANGE_TEXT=32,e.prototype.CHANGE_SIZE=64,e.prototype.CHANGE_MARKER_BACK=128,e.prototype.CHANGE_MARKER_FRONT=256,e.prototype.CHANGE_FULL=512,e.prototype.CHANGE_H_SCROLL=1024,e.prototype.$changes=0,e.prototype.$padding=null,e.prototype.$frozen=!1,e.prototype.STEPS=8,i.implement(e.prototype,y),r.defineOptions(e.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){a.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){this.$scrollPastEnd!=(e=+e||0)&&(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=e}),define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(a,e,t){"use strict";function l(e){return"undefined"==typeof Worker?{postMessage:function(){},terminate:function(){}}:u.get("loadWorkerFromBlob")?(t=function(t){t="importScripts('"+i.qualifyURL(t)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var n=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return n.append(t),n.getBlob("application/javascript")}}(e),t=(window.URL||window.webkitURL).createObjectURL(t),new Worker(t)):new Worker(e);var t}function c(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}var n=a("../lib/oop"),i=a("../lib/net"),h=a("../lib/event_emitter").EventEmitter,u=a("../config");(function(){n.implement(this,h),this.$createWorkerFromOldConfig=function(e,t,n,i,o){var r,s;return a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl),u.get("packaged")||!a.toUrl?i=i||u.moduleUrl(t,"worker"):(r=this.$normalizePath,i=i||r(a.toUrl("ace/worker/worker.js",null,"_")),s={},e.forEach(function(e){s[e]=r(a.toUrl(e,null,"_").replace(/(\.js)?(\?.*)?$/,""))})),this.$worker=l(i),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:s,module:t,classname:n}),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)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return i.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){var i;n&&(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(e){console.error(e.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,50<e.length&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(c.prototype);e.UIWorkerClient=function(e,t,n){var i=null,o=!1,r=Object.create(h),s=[],a=new c({messageBuffer:s,terminate:function(){},postMessage:function(e){s.push(e),i&&(o?setTimeout(l):l())}}),l=(a.setEmitSync=function(e){o=e},function(){var e=s.shift();e.command?i[e.command].apply(i,e.args):e.event&&r._signal(e.event,e.data)});return r.postMessage=function(e){a.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},u.loadModule(["worker",t],function(e){for(i=new e[n](r);s.length;)l()}),a},e.WorkerClient=c,e.createWorker=l}),define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){"use strict";var l=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,e=e("./lib/oop"),o=(r.prototype.setup=function(){var t=this,n=this.doc,e=this.session,i=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column),this.pos);i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new l(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){e=n.createAnchor(e.row,e.column);e.$insertRight=!0,e.detach(),t.others.push(e)}),e.setUndoSelect(!1)},r.prototype.showOtherMarkers=function(){var t,n;this.othersActive||(t=this.session,(n=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+n.length),n.othersClass,null,!1)}))},r.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)}},r.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,i=t.start.column>=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;0<=r;r--){var s={row:(a=this.others[r]).row,column:a.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;0<=r;r--){var a,s={row:(a=this.others[r]).row,column:a.column+o};this.doc.remove(new l(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},r.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},r.prototype.updateMarkers=function(){if(!this.$updating){var n=this,i=this.session,e=function(e,t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new l(e.row,e.column,e.row,e.column+n.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},r.prototype.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).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)))},r.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},r.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)}},r);function r(e,t,n,i,o,r){var s=this,t=(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,e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1});this.$undoStackDepth=t.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}e.implement(o.prototype,i),t.PlaceHolder=o}),define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){function A(e,t){return e.row==t.row&&e.column==t.column}var k=e("../lib/event"),L=e("../lib/useragent");t.onMouseDown=function(e){var t=e.domEvent,n=t.altKey,i=t.shiftKey,o=t.ctrlKey,r=e.getAccelKey(),s=e.getButton();if(o&&L.isMac&&(s=t.button),e.editor.inMultiSelectMode&&2==s)e.editor.textInput.onContextMenu(e.domEvent);else if(o||n||r){if(0===s){var a,l,c,h,u,d,p,g,f=e.editor,m=f.selection,y=f.inMultiSelectMode,w=e.getDocumentPosition(),v=m.getCursor(),v=e.inSelection()||m.isEmpty()&&A(w,v),b=e.x,$=e.y,C=f.session,S=f.renderer.pixelToScreenCoordinates(b,$),x=S;if(f.$mouseHandler.$enableJumpToDef)o&&n||r&&n?a=i?"block":"add":n&&f.$blockSelectEnabled&&(a="block");else if(r&&!n){if(a="add",!y&&i)return}else n&&f.$blockSelectEnabled&&(a="block");if(a&&L.isMac&&t.ctrlKey&&f.$mouseHandler.cancelContextMenu(),"add"==a)!y&&v||(y||(l=m.toOrientedRange(),f.addSelectionMarker(l)),c=m.rangeList.rangeAtPoint(w),f.inVirtualSelectionMode=!0,i&&(c=null,l=m.ranges[0]||l,f.removeSelectionMarker(l)),f.once("mouseup",function(){var e=m.toOrientedRange();c&&e.isEmpty()&&A(c.cursor,e.cursor)?m.substractPoint(e.cursor):(i?m.substractPoint(l.cursor):l&&(f.removeSelectionMarker(l),m.addRange(l)),m.addRange(e)),f.inVirtualSelectionMode=!1}));else if("block"==a)return e.stop(),f.inVirtualSelectionMode=!0,u=[],d=function(){var e=f.renderer.pixelToScreenCoordinates(b,$),t=C.screenToDocumentPosition(e.row,e.column,e.offsetX);A(x,e)&&A(t,m.lead)||(x=e,f.selection.moveToPosition(t),f.renderer.scrollCursorIntoView(),f.removeSelectionMarkers(u),u=m.rectangularRangeBlock(x,S),f.$mouseHandler.$clickSelection&&1==u.length&&u[0].isEmpty()&&(u[0]=f.$mouseHandler.$clickSelection.clone()),u.forEach(f.addSelectionMarker,f),f.updateSelectionMarkers())},y&&!r?m.toSingleRange():!y&&r&&(h=m.toOrientedRange(),f.addSelectionMarker(h)),i?S=C.documentToScreenPosition(m.lead):m.moveToPosition(w),x={row:-1,column:-1},p=d,k.capture(f.container,function(e){b=e.clientX,$=e.clientY},function(e){d(),clearInterval(g),f.removeSelectionMarkers(u),u.length||(u=[m.toOrientedRange()]),h&&(f.removeSelectionMarker(h),m.toSingleRange(h));for(var t=0;t<u.length;t++)m.addRange(u[t]);f.inVirtualSelectionMode=!1,f.$mouseHandler.$clickSelection=null}),g=setInterval(function(){p()},20),e.preventDefault()}}else 0===s&&e.editor.inMultiSelectMode&&e.editor.exitMultiSelectMode()}}),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){1<e.multiSelect.rangeCount?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}}];e=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new e(t.multiSelectCommands)}),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,o,t){function n(e){var t,n;function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}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=o.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",r),e.commands.addCommands(a.defaultCommands),(t=e).textInput&&(e=t.textInput.getElement(),n=!1,s.addListener(e,"keydown",function(e){e=18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey);t.$blockSelectEnabled&&e?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()},t),s.addListener(e,"keyup",i,t),s.addListener(e,"blur",i,t)))}var i=e("./range_list").RangeList,b=e("./range").Range,d=e("./selection").Selection,r=e("./mouse/multi_select_handler").onMouseDown,s=e("./lib/event"),p=e("./lib/lang"),a=e("./commands/multi_select_commands");o.commands=a.defaultCommands.concat(a.multiSelectCommands);var l=new(e("./search").Search),c=e("./edit_session").EditSession,c=(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}.call(c.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);n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),1<this.rangeCount&&!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){e=this.rangeList.substractPoint(e);if(e)return this.$onRemoveRange(e),e[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){var t;this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode&&(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.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],o=i.start.row,r=i.end.row;if(o===r)t.push(i.clone());else{for(t.push(new b(o,i.start.column,o,this.session.getLine(o).length));++o<r;)t.push(this.getLineRange(o,!0));t.push(new b(r,0,r,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],e=b.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)},this.toggleBlockSelection=function(){var e,t;1<this.rangeCount?(t=(e=this.rangeList.ranges)[e.length-1],e=b.fromPoints(e[0].start,t.end),this.toSingleRange(),this.setSelectionRange(e,t.cursor==t.start)):(e=this.session.documentToScreenPosition(this.cursor),t=this.session.documentToScreenPosition(this.anchor),this.rectangularRangeBlock(e,t).forEach(this.addRange,this))},this.rectangularRangeBlock=function(e,t,n){var i,o,r,s,a,l,c,h=[],u=e.column<t.column,d=(s=u?(i=e.column,o=t.column,r=e.offsetX,t.offsetX):(i=t.column,o=e.column,r=t.offsetX,e.offsetX),e.row<t.row);l=d?(a=e.row,t.row):(a=t.row,e.row),i<0&&(i=0),(a=a<0?0:a)==l&&(n=!0);for(var p,g,f=a;f<=l;f++){var m=b.fromPoints(this.session.screenToDocumentPosition(f,i,r),this.session.screenToDocumentPosition(f,o,s));if(m.isEmpty()){if(c&&(p=m.end,g=c,p.row==g.row&&p.column==g.column))break;c=m.end}m.cursor=u?m.start:m.end,h.push(m)}if(d&&h.reverse(),!n){for(var y=h.length-1;h[y].isEmpty()&&0<y;)y--;if(0<y)for(var w=0;h[w].isEmpty();)w++;for(var v=y;w<=v;v--)h[v].isEmpty()&&h.splice(v,1)}return h}}.call(d.prototype),e("./editor").Editor);(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){e.marker&&(this.session.removeMarker(e.marker),-1!=(e=this.session.$selectionMarkers.indexOf(e))&&this.session.$selectionMarkers.splice(e,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];i.marker&&(this.session.removeMarker(i.marker),-1!=(i=t.indexOf(i))&&t.splice(i,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(a.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(a.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t,n=e.command,i=e.editor;if(i.multiSelect)return n.multiSelectAction?t="forEach"==n.multiSelectAction?i.forEachSelection(n,e.args):"forEachLine"==n.multiSelectAction?i.forEachSelection(n,e.args,!0):"single"==n.multiSelectAction?(i.exitMultiSelectMode(),n.exec(i,e.args||{})):n.multiSelectAction(i,e.args||{}):(t=n.exec(i,e.args||{}),i.multiSelect.addRange(i.multiSelect.toOrientedRange()),i.multiSelect.mergeOverlappingRanges()),t},this.forEachSelection=function(e,t,n){if(!this.inVirtualSelectionMode){var i,o=n&&n.keepOrder,r=1==n||n&&n.$byLines,s=this.session,n=this.selection,a=n.rangeList,l=(o?n:a).ranges;if(!l.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var o=n._eventRegistry,c=(n._eventRegistry={},new d(s));this.inVirtualSelectionMode=!0;for(var h=l.length;h--;){if(r)for(;0<h&&l[h].start.row==l[h-1].end.row;)h--;c.fromOrientedRange(l[h]),c.index=h,this.selection=s.selection=c;var u=e.exec?e.exec(this,t||{}):e(this,t||{});i||void 0===u||(i=u),c.toOrientedRange(l[h])}c.detach(),this.selection=s.selection=n,this.inVirtualSelectionMode=!1,n._eventRegistry=o,n.mergeOverlappingRanges(),n.ranges[0]&&n.fromOrientedRange(n.ranges[0]);a=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),a&&a.from==a.to&&this.renderer.animateScrolling(a.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)).length==(n.length-1)*o.length&&(e="")}else this.selection.isEmpty()||(e=this.session.getTextRange(this.getSelectionRange()));return e},this.$checkMultiselectChange=function(e,t){var n;this.inMultiSelectMode&&!this.inVirtualSelectionMode&&(n=this.multiSelect.ranges[0],this.multiSelect.isEmpty()&&t==this.multiSelect.anchor||((n=t==this.multiSelect.anchor?n.cursor==n.start?n.end:n.start:n.cursor).row!=t.row||this.session.$clipPositionToDocument(n.row,n.column).column!=t.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()))},this.findAll=function(e,t,n){(t=t||{}).needle=e||t.needle,null==t.needle&&(i=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange(),t.needle=this.session.getTextRange(i)),this.$search.set(t);var i,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,i,o,r=this.selection.toOrientedRange(),s=r.cursor==r.end,a=this.session.documentToScreenPosition(r.cursor),l=(this.selection.$desiredColumn&&(a.column=this.selection.$desiredColumn),this.session.screenToDocumentPosition(a.row+e,a.column));e=r.isEmpty()?l:(n=this.session.documentToScreenPosition(s?r.end:r.start),this.session.screenToDocumentPosition(n.row+e,n.column)),s?(i=b.fromPoints(l,e)).cursor=i.start:(i=b.fromPoints(e,l)).cursor=i.end,i.desiredColumn=a.column,this.selection.inMultiSelectMode?t&&(o=r.cursor):this.selection.addRange(r),this.selection.addRange(i),o&&this.selection.substractPoint(o)},this.transposeSelections=function(e){for(var t,n=this.session,i=n.multiSelect,o=i.ranges,r=o.length;r--;)(a=o[r]).isEmpty()&&(t=n.getWordRange(a.start.row,a.start.column),a.start.row=t.start.row,a.start.column=t.start.column,a.end.row=t.end.row,a.end.column=t.end.column);i.mergeOverlappingRanges();for(var s=[],r=o.length;r--;){var a=o[r];s.unshift(n.getTextRange(a))}e<0?s.unshift(s.pop()):s.push(s.shift());for(r=o.length;r--;){var l=(a=o[r]).clone();n.replace(a,s[r]),a.start.row=l.start.row,a.start.column=l.start.column}i.fromOrientedRange(i.ranges[0])},this.selectMore=function(e,t,n){var i,o=this.session,r=o.multiSelect.toOrientedRange();r.isEmpty()&&((r=o.getWordRange(r.start.row,r.start.column)).cursor=-1==e?r.start:r.end,this.multiSelect.addRange(r),n)||(n=o.getTextRange(r),o=o,n=n,i=e,l.$options.wrap=!0,l.$options.needle=n,l.$options.backwards=-1==i,(n=l.find(o))&&(n.cursor=-1==e?n.start:n.end,this.session.unfold(n),this.multiSelect.addRange(n),this.renderer.scrollCursorIntoView(null,.5)),t&&this.multiSelect.substractPoint(r.cursor))},this.alignCursors=function(){var o=this.session,t=o.multiSelect,e=t.ranges,n=-1,i=e.filter(function(e){if(e.cursor.row==n)return!0;n=e.cursor.row});if(e.length&&i.length!=e.length-1){i.forEach(function(e){t.substractPoint(e.cursor)});var r=0,s=1/0,a=e.map(function(e){var e=e.cursor,t=o.getLine(e.row).substr(e.column).search(/\S/g);return e.column>r&&(r=e.column),(t=-1==t?0:t)<s&&(s=t),t});e.forEach(function(e,t){var n=e.cursor,i=r-n.column,t=a[t]-s;t<i?o.insert(n,p.stringRepeat(" ",i-t)):o.remove(new b(n.row,n.column,n.row,n.column-i+t)),e.start.column=e.end.column=r,e.start.row=e.end.row=n.row,e.cursor=e.end}),t.fromOrientedRange(e[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var i=this.selection.getRange(),l=i.start.row,c=i.end.row,e=l==c;if(e){for(var h,u=this.session.getLength();h=this.session.getLine(c),/[=:]/.test(h)&&++c<u;);for(;h=this.session.getLine(l),/[=:]/.test(h)&&0<--l;);l<0&&(l=0),u<=c&&(c=u-1)}var d=this.session.removeFullLines(l,c),d=this.$reAlignText(d,e);this.session.insert({row:l,column:0},d.join("\n")+"\n"),e||(i.start.column=0,i.end.column=d[d.length-1].length),this.selection.setRange(i)}},this.$reAlignText=function(e,t){function n(e){return p.stringRepeat(" ",e)}function i(e){return e[2]?n(o)+e[2]+n(r-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}var o,r,s,a=!0,l=!0;return e.map(function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?(null==o?(o=t[1].length,r=t[2].length,s=t[3].length):(o+r+s!=t[1].length+t[2].length+t[3].length&&(l=!1),o!=t[1].length&&(a=!1),o>t[1].length&&(o=t[1].length),r<t[2].length&&(r=t[2].length),s>t[3].length&&(s=t[3].length)),t):[e]}).map(t?i:a?l?function(e){return e[2]?n(o+r-e[2].length)+e[2]+n(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:i:function(e){return e[2]?n(o)+e[2]+n(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]})}}).call(c.prototype),o.onSessionChange=function(e){var t=e.session,e=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,e.oldSession);e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.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())},o.MultiSelect=n,e("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(e){n(this),e?this.on("mousedown",r):this.off("mousedown",r)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})}),define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(e,t,n){"use strict";var h=e("../../range").Range,e=t.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){e=e.getLine(n);return this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),r=o.search(i);if(-1!=r){for(var s,n=n||o.length,a=e.getLength(),o=t,l=t;++t<a;){var c=e.getLine(t).search(i);if(-1!=c){if(c<=r){c=e.getTokenAt(t,0);if(!c||"string"!==c.type)break}l=t}}return o<l?(s=e.getLine(l).length,new h(o,n,l,s)):void 0}},this.openingBracketBlock=function(e,t,n,i,o){n={row:n,column:i+1},i=e.$findClosingBracket(t,n,o);if(i)return t=e.foldWidgets[i.row],"start"==(t=null==t?e.getFoldWidget(i.row):t)&&i.row>n.row&&(i.row--,i.column=e.getLine(i.row).length),h.fromPoints(n,i)},this.closingBracketBlock=function(e,t,n,i,o){n={row:n,column:i},i=e.$findOpeningBracket(t,n);if(i)return i.column++,n.column--,h.fromPoints(i,n)}}.call(e.prototype)}),define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(e,t,n){"use strict";function c(e,t,n){var i=e.getAnnotations().sort(a.comparePoints);if(i.length){var o=function(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,s=n(t,e[r]);if(0<s)i=1+r;else{if(!(s<0))return r;o=r-1}}return-(i+1)}(i,{row:t,column:-1},a.comparePoints),r=((o=o<0?-o-1:o)>=i.length?o=0<n?0:i.length-1:0===o&&n<0&&(o=i.length-1),i[o]);if(r&&n){if(r.row===t){for(;(r=i[o+=n])&&r.row===t;);if(!r)return i.slice()}var s=[];for(t=r.row;s[n<0?"unshift":"push"](r),(r=i[o+=n])&&r.row==t;);return s.length&&s}}}var h=e("../line_widgets").LineWidgets,u=e("../lib/dom"),a=e("../range").Range,d=e("../config").nls;t.showErrorMarker=function(e,t){var n,i=e.session,o=(i.widgetManager||(i.widgetManager=new h(i),i.widgetManager.attach(e)),e.getCursorPosition()),r=o.row,s=i.widgetManager.getWidgetsAtRow(r).filter(function(e){return"errorMarker"==e.type})[0],r=(s?s.destroy():r-=t,c(i,r,t));if(r){t=r[0];o.column=(t.pos&&"number"!=typeof t.column?t.pos.sc:t.column)||0,o.row=t.row,n=e.renderer.$gutterLayer.$annotations[o.row]}else{if(s)return;n={text:[d("Looks good!")],className:"ace_ok"}}e.session.unfold(o.row),e.selection.moveToPosition(o);function a(e,t,n){if(0===t&&("esc"===n||"return"===n))return l.destroy(),{command:"null"}}var l={row:o.row,fixedWidth:!0,coverGutter:!0,el:u.createElement("div"),type:"errorMarker"},r=l.el.appendChild(u.createElement("div")),t=l.el.appendChild(u.createElement("div")),s=(t.className="error_widget_arrow "+n.className,e.renderer.$cursorLayer.getPixelPosition(o).left);t.style.left=s+e.renderer.gutterWidth-5+"px",l.el.className="error_widget_wrapper",r.className="error_widget "+n.className,r.innerHTML=n.text.join("<br>"),r.appendChild(u.createElement("div"));l.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(a),i.widgetManager.removeLineWidget(l),e.off("changeSelection",l.destroy),e.off("changeSession",l.destroy),e.off("mouseup",l.destroy),e.off("change",l.destroy))},e.keyBinding.addKeyboardHandler(a),e.on("changeSelection",l.destroy),e.on("changeSession",l.destroy),e.on("mouseup",l.destroy),e.on("change",l.destroy),e.session.widgetManager.addLineWidget(l),l.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},u.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)}),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,r,t){"use strict";e("./loader_build")(r);var s=e("./lib/dom"),n=e("./range").Range,a=e("./editor").Editor,i=e("./edit_session").EditSession,o=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"),r.config=e("./config"),r.edit=function(e,t){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}if(e&&e.env&&e.env.editor instanceof a)return e.env.editor;var i,n="",n=(e&&/input|textarea/i.test(e.tagName)?(n=(i=e).value,e=s.createElement("pre"),i.parentNode.replaceChild(e,i)):e&&(n=e.textContent,e.innerHTML=""),r.createEditSession(n)),e=new a(new l(e),n,t),o={document:n,editor:e,onResize:e.resize.bind(e,null)};return i&&(o.textarea=i),e.on("destroy",function(){o.editor.container.env=null}),e.container.env=e.env=o,e},r.createEditSession=function(e,t){e=new i(e,t);return e.setUndoManager(new o),e},r.Range=n,r.Editor=a,r.EditSession=i,r.UndoManager=o,r.VirtualRenderer=l,r.version=r.config.version}),window.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=window.define);var t,n=function(){return this}();for(t in(n=(n=n||"undefined"==typeof window?n:window)||"undefined"==typeof self?n:self).ace||(n.ace=e),e)e.hasOwnProperty(t)&&(n.ace[t]=e[t]);n.ace.default=n.ace,"object"==typeof module&&"object"==typeof exports&&module&&(module.exports=n.ace)});