2 lines
441 KiB
JavaScript
2 lines
441 KiB
JavaScript
import{a as Ce}from"./prismjs-BZPoR7_J.js?v=1773287522785";var pe={exports:{}},we;function Se(){return we||(we=1,(function(me,Me){(function(){var E="ace",x=(function(){return this})();!x&&typeof window<"u"&&(x=window);var z=function(o,i,n){if(typeof o!="string"){z.original?z.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=i),z.modules[o]||(z.payloads[o]=n,z.modules[o]=null)};z.modules={},z.payloads={};var k=function(o,i,n){if(typeof i=="string"){var t=a(o,i);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],r=0,s=i.length;r<s;++r){var l=a(o,i[r]);if(l==null&&M.original)return;e.push(l)}return n&&n.apply(null,e)||!0}},M=function(o,i){var n=k("",o,i);return n==null&&M.original?M.original.apply(this,arguments):n},S=function(o,i){if(i.indexOf("!")!==-1){var n=i.split("!");return S(o,n[0])+"!"+S(o,n[1])}if(i.charAt(0)=="."){var t=o.split("/").slice(0,-1).join("/");for(i=t+"/"+i;i.indexOf(".")!==-1&&e!=i;){var e=i;i=i.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return i},a=function(o,i){i=S(o,i);var n=z.modules[i];if(!n){if(n=z.payloads[i],typeof n=="function"){var t={},e={id:i,uri:"",exports:t,packaged:!0},r=function(l,u){return k(i,l,u)},s=n(r,t,e);t=s||e.exports,z.modules[i]=t,delete z.payloads[i]}n=z.modules[i]=t||n}return n};function c(o){var i=x;x[o]||(x[o]={}),i=x[o],(!i.define||!i.define.packaged)&&(z.original=i.define,i.define=z,i.define.packaged=!0),(!i.require||!i.require.packaged)&&(M.original=i.require,i.require=M,i.require.packaged=!0)}c(E)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(E,x,z){function k(M,S,a){Object.defineProperty(M,S,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||k(String.prototype,"startsWith",function(M,S){return S=S||0,this.lastIndexOf(M,S)===S}),String.prototype.endsWith||k(String.prototype,"endsWith",function(M,S){var a=this;(S===void 0||S>a.length)&&(S=a.length),S-=M.length;var c=a.indexOf(M,S);return c!==-1&&c===S}),String.prototype.repeat||k(String.prototype,"repeat",function(M){for(var S="",a=this;M>0;)M&1&&(S+=a),(M>>=1)&&(a+=a);return S}),String.prototype.includes||k(String.prototype,"includes",function(M,S){return this.indexOf(M,S)!=-1}),Object.assign||(Object.assign=function(M){if(M==null)throw new TypeError("Cannot convert undefined or null to object");for(var S=Object(M),a=1;a<arguments.length;a++){var c=arguments[a];c!=null&&Object.keys(c).forEach(function(o){S[o]=c[o]})}return S}),Object.values||(Object.values=function(M){return Object.keys(M).map(function(S){return M[S]})}),Array.prototype.find||k(Array.prototype,"find",function(M){for(var S=this.length,a=arguments[1],c=0;c<S;c++){var o=this[c];if(M.call(a,o,c,this))return o}}),Array.prototype.findIndex||k(Array.prototype,"findIndex",function(M){for(var S=this.length,a=arguments[1],c=0;c<S;c++){var o=this[c];if(M.call(a,o,c,this))return c}}),Array.prototype.includes||k(Array.prototype,"includes",function(M,S){return this.indexOf(M,S)!=-1}),Array.prototype.fill||k(Array.prototype,"fill",function(M){for(var S=this,a=S.length>>>0,c=arguments[1],o=c>>0,i=o<0?Math.max(a+o,0):Math.min(o,a),n=arguments[2],t=n===void 0?a:n>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);i<e;)S[i]=M,i++;return S}),Array.of||k(Array,"of",function(){return Array.prototype.slice.call(arguments)})}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/es6-shim"],function(E,x,z){E("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(E,x,z){x.deepCopy=function k(M){if(typeof M!="object"||!M)return M;var S;if(Array.isArray(M)){S=[];for(var a=0;a<M.length;a++)S[a]=k(M[a]);return S}if(Object.prototype.toString.call(M)!=="[object Object]")return M;S={};for(var a in M)S[a]=k(M[a]);return S}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(E,x,z){x.last=function(S){return S[S.length-1]},x.stringReverse=function(S){return S.split("").reverse().join("")},x.stringRepeat=function(S,a){for(var c="";a>0;)a&1&&(c+=S),(a>>=1)&&(S+=S);return c};var k=/^\s\s*/,M=/\s\s*$/;x.stringTrimLeft=function(S){return S.replace(k,"")},x.stringTrimRight=function(S){return S.replace(M,"")},x.copyObject=function(S){var a={};for(var c in S)a[c]=S[c];return a},x.copyArray=function(S){for(var a=[],c=0,o=S.length;c<o;c++)S[c]&&typeof S[c]=="object"?a[c]=this.copyObject(S[c]):a[c]=S[c];return a},x.deepCopy=E("./deep_copy").deepCopy,x.arrayToMap=function(S){for(var a={},c=0;c<S.length;c++)a[S[c]]=1;return a},x.createMap=function(S){var a=Object.create(null);for(var c in S)a[c]=S[c];return a},x.arrayRemove=function(S,a){for(var c=0;c<=S.length;c++)a===S[c]&&S.splice(c,1)},x.escapeRegExp=function(S){return S.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},x.escapeHTML=function(S){return(""+S).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},x.getMatchOffsets=function(S,a){var c=[];return S.replace(a,function(o){c.push({offset:arguments[arguments.length-2],length:o.length})}),c},x.deferredCall=function(S){var a=null,c=function(){a=null,S()},o=function(i){return o.cancel(),a=setTimeout(c,i||0),o};return o.schedule=o,o.call=function(){return this.cancel(),S(),o},o.cancel=function(){return clearTimeout(a),a=null,o},o.isPending=function(){return a},o},x.delayedCall=function(S,a){var c=null,o=function(){c=null,S()},i=function(n){c==null&&(c=setTimeout(o,n||a))};return i.delay=function(n){c&&clearTimeout(c),c=setTimeout(o,n||a)},i.schedule=i,i.call=function(){this.cancel(),S()},i.cancel=function(){c&&clearTimeout(c),c=null},i.isPending=function(){return c},i},x.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch(S){return!1}return!0},x.skipEmptyMatch=function(S,a,c){return c&&S.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(E,x,z){x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS};var k=typeof navigator=="object"?navigator:{},M=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),S=k.userAgent||"",a=k.appName||"";x.isWin=M=="win",x.isMac=M=="mac",x.isLinux=M=="linux",x.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((S.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((S.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=S.match(/ Gecko\/\d+/),x.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",x.isWebKit=parseFloat(S.split("WebKit/")[1])||void 0,x.isChrome=parseFloat(S.split(" Chrome/")[1])||void 0,x.isSafari=parseFloat(S.split(" Safari/")[1])&&!x.isChrome||void 0,x.isEdge=parseFloat(S.split(" Edge/")[1])||void 0,x.isAIR=S.indexOf("AdobeAIR")>=0,x.isAndroid=S.indexOf("Android")>=0,x.isChromeOS=S.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test(S)&&!window.MSStream,x.isIOS&&(x.isMac=!0),x.isMobile=x.isIOS||x.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(E,x,z){var k=E("./useragent"),M="http://www.w3.org/1999/xhtml";x.buildDom=function n(t,e,r){if(typeof t=="string"&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var l=[],u=0;u<t.length;u++){var b=n(t[u],e,r);b&&l.push(b)}return l}var m=document.createElement(t[0]),g=t[1],d=1;g&&typeof g=="object"&&!Array.isArray(g)&&(d=2);for(var u=d;u<t.length;u++)n(t[u],m,r);return d==2&&Object.keys(g).forEach(function($){var T=g[$];$==="class"?m.className=Array.isArray(T)?T.join(" "):T:typeof T=="function"||$=="value"||$[0]=="$"?m[$]=T:$==="ref"?r&&(r[T]=m):$==="style"?typeof T=="string"&&(m.style.cssText=T):T!=null&&m.setAttribute($,T)}),e&&e.appendChild(m),m},x.getDocumentHead=function(n){return n||(n=document),n.head||n.getElementsByTagName("head")[0]||n.documentElement},x.createElement=function(n,t){return document.createElementNS?document.createElementNS(t||M,n):document.createElement(n)},x.removeChildren=function(n){n.innerHTML=""},x.createTextNode=function(n,t){var e=t?t.ownerDocument:document;return e.createTextNode(n)},x.createFragment=function(n){var t=n?n.ownerDocument:document;return t.createDocumentFragment()},x.hasCssClass=function(n,t){var e=(n.className+"").split(/\s+/g);return e.indexOf(t)!==-1},x.addCssClass=function(n,t){x.hasCssClass(n,t)||(n.className+=" "+t)},x.removeCssClass=function(n,t){for(var e=n.className.split(/\s+/g);;){var r=e.indexOf(t);if(r==-1)break;e.splice(r,1)}n.className=e.join(" ")},x.toggleCssClass=function(n,t){for(var e=n.className.split(/\s+/g),r=!0;;){var s=e.indexOf(t);if(s==-1)break;r=!1,e.splice(s,1)}return r&&e.push(t),n.className=e.join(" "),r},x.setCssClass=function(n,t,e){e?x.addCssClass(n,t):x.removeCssClass(n,t)},x.hasCssString=function(n,t){var e=0,r;if(t=t||document,r=t.querySelectorAll("style")){for(;e<r.length;)if(r[e++].id===n)return!0}},x.removeElementById=function(n,t){t=t||document,t.getElementById(n)&&t.getElementById(n).remove()};var S,a=[];x.useStrictCSP=function(n){S=n,n==!1?c():a||(a=[])};function c(){var n=a;a=null,n&&n.forEach(function(t){o(t[0],t[1])})}function o(n,t,e){if(!(typeof document>"u")){if(a){if(e)c();else if(e===!1)return a.push([n,t])}if(!S){var r=e;!e||!e.getRootNode?r=document:(r=e.getRootNode(),(!r||r==e)&&(r=document));var s=r.ownerDocument||r;if(t&&x.hasCssString(t,r))return null;t&&(n+="\n/*# sourceURL=ace/css/"+t+" */");var l=x.createElement("style");l.appendChild(s.createTextNode(n)),t&&(l.id=t),r==s&&(r=x.getDocumentHead(s)),r.insertBefore(l,r.firstChild)}}}if(x.importCssString=o,x.importCssStylsheet=function(n,t){x.buildDom(["link",{rel:"stylesheet",href:n}],x.getDocumentHead(t))},x.scrollbarWidth=function(n){var t=x.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=x.createElement("ace_outer"),r=e.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",e.appendChild(t);var s=n&&n.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var l=t.offsetWidth;r.overflow="scroll";var u=t.offsetWidth;return l===u&&(u=e.clientWidth),s.removeChild(e),l-u},x.computedStyle=function(n,t){return window.getComputedStyle(n,"")||{}},x.setStyle=function(n,t,e){n[t]!==e&&(n[t]=e)},x.HAS_CSS_ANIMATION=!1,x.HAS_CSS_TRANSFORMS=!1,x.HI_DPI=k.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,k.isChromeOS&&(x.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");x.HI_DPI&&i.style.transform!==void 0&&(x.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof i.style.animationName<"u"&&(x.HAS_CSS_ANIMATION=!0),i=null}x.HAS_CSS_TRANSFORMS?x.translate=function(n,t,e){n.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:x.translate=function(n,t,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("./dom");x.get=function(M,S){var a=new XMLHttpRequest;a.open("GET",M,!0),a.onreadystatechange=function(){a.readyState===4&&S(a.responseText)},a.send(null)},x.loadScript=function(M,S){var a=k.getDocumentHead(),c=document.createElement("script");c.src=M,a.appendChild(c),c.onload=c.onreadystatechange=function(o,i){(i||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,i||S())}},x.qualifyURL=function(M){var S=document.createElement("a");return S.href=M,S.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(E,x,z){x.inherits=function(k,M){k.super_=M,k.prototype=Object.create(M.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(k,M){for(var S in M)k[S]=M[S];return k},x.implement=function(k,M){x.mixin(k,M)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(E,x,z){var k={},M=function(){this.propagationStopped=!0},S=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[a]||[],i=this._defaultHandlers[a];if(!(!o.length&&!i)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=M),c.preventDefault||(c.preventDefault=S),o=o.slice();for(var n=0;n<o.length&&(o[n](c,this),!c.propagationStopped);n++);if(i&&!c.defaultPrevented)return i(c,this)}},k._signal=function(a,c){var o=(this._eventRegistry||{})[a];if(o){o=o.slice();for(var i=0;i<o.length;i++)o[i](c,this)}},k.once=function(a,c){var o=this;if(this.on(a,function i(){o.off(a,i),c.apply(null,arguments)}),!c)return new Promise(function(i){c=i})},k.setDefaultHandler=function(a,c){var o=this._defaultHandlers;if(o||(o=this._defaultHandlers={_disabled_:{}}),o[a]){var i=o[a],n=o._disabled_[a];n||(o._disabled_[a]=n=[]),n.push(i);var t=n.indexOf(c);t!=-1&&n.splice(t,1)}o[a]=c},k.removeDefaultHandler=function(a,c){var o=this._defaultHandlers;if(o){var i=o._disabled_[a];if(o[a]==c)i&&this.setDefaultHandler(a,i.pop());else if(i){var n=i.indexOf(c);n!=-1&&i.splice(n,1)}}},k.on=k.addEventListener=function(a,c,o){this._eventRegistry=this._eventRegistry||{};var i=this._eventRegistry[a];return i||(i=this._eventRegistry[a]=[]),i.indexOf(c)==-1&&i[o?"unshift":"push"](c),c},k.off=k.removeListener=k.removeEventListener=function(a,c){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[a];if(o){var i=o.indexOf(c);i!==-1&&o.splice(i,1)}},k.removeAllListeners=function(a){a||(this._eventRegistry=this._defaultHandlers=void 0),this._eventRegistry&&(this._eventRegistry[a]=void 0),this._defaultHandlers&&(this._defaultHandlers[a]=void 0)},x.EventEmitter=k}),ace.define("ace/lib/report_error",["require","exports","module"],function(E,x,z){x.reportError=function(M,S){var a=new Error(M);a.data=S,typeof console=="object"&&console.error&&console.error(a),setTimeout(function(){throw a})}}),ace.define("ace/lib/default_english_messages",["require","exports","module"],function(E,x,z){var k={"autocomplete.popup.aria-roledescription":"Autocomplete suggestions","autocomplete.popup.aria-label":"Autocomplete suggestions","autocomplete.popup.item.aria-roledescription":"item","autocomplete.loading":"Loading...","editor.scroller.aria-roledescription":"editor","editor.scroller.aria-label":"Editor content, press Enter to start editing, press Escape to exit","editor.gutter.aria-roledescription":"editor","editor.gutter.aria-label":"Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit","error-marker.good-state":"Looks good!","prompt.recently-used":"Recently used","prompt.other-commands":"Other commands","prompt.no-matching-commands":"No matching commands","search-box.find.placeholder":"Search for","search-box.find-all.text":"All","search-box.replace.placeholder":"Replace with","search-box.replace-next.text":"Replace","search-box.replace-all.text":"All","search-box.toggle-replace.title":"Toggle Replace mode","search-box.toggle-regexp.title":"RegExp Search","search-box.toggle-case.title":"CaseSensitive Search","search-box.toggle-whole-word.title":"Whole Word Search","search-box.toggle-in-selection.title":"Search In Selection","search-box.search-counter":"$0 of $1","text-input.aria-roledescription":"editor","text-input.aria-label":"Cursor at row $0","gutter.code-folding.range.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.closed.aria-label":"Toggle code folding, rows $0 through $1","gutter.code-folding.open.aria-label":"Toggle code folding, row $0","gutter.code-folding.closed.title":"Unfold code","gutter.code-folding.open.title":"Fold code","gutter.annotation.aria-label.error":"Error, read annotations row $0","gutter.annotation.aria-label.warning":"Warning, read annotations row $0","gutter.annotation.aria-label.info":"Info, read annotations row $0","inline-fold.closed.title":"Unfold code","gutter-tooltip.aria-label.error.singular":"error","gutter-tooltip.aria-label.error.plural":"errors","gutter-tooltip.aria-label.warning.singular":"warning","gutter-tooltip.aria-label.warning.plural":"warnings","gutter-tooltip.aria-label.info.singular":"information message","gutter-tooltip.aria-label.info.plural":"information messages","gutter.annotation.aria-label.security":"Security finding, read annotations row $0","gutter.annotation.aria-label.hint":"Suggestion, read annotations row $0","gutter-tooltip.aria-label.security.singular":"security finding","gutter-tooltip.aria-label.security.plural":"security findings","gutter-tooltip.aria-label.hint.singular":"suggestion","gutter-tooltip.aria-label.hint.plural":"suggestions"};x.defaultEnglishMessages=k}),ace.define("ace/lib/app_config",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/report_error","ace/lib/default_english_messages"],function(E,x,z){"no use strict";var k=E("./oop"),M=E("./event_emitter").EventEmitter,S=E("./report_error").reportError,a=E("./default_english_messages").defaultEnglishMessages,c={setOptions:function(e){Object.keys(e).forEach(function(r){this.setOption(r,e[r])},this)},getOptions:function(e){var r={};if(e)Array.isArray(e)||(r=e,e=Object.keys(r));else{var s=this.$options;e=Object.keys(s).filter(function(l){return!s[l].hidden})}return e.forEach(function(l){r[l]=this.getOption(l)},this),r},setOption:function(e,r){if(this["$"+e]!==r){var s=this.$options[e];if(!s)return o('misspelled option "'+e+'"');if(s.forwardTo)return this[s.forwardTo]&&this[s.forwardTo].setOption(e,r);s.handlesSet||(this["$"+e]=r),s&&s.set&&s.set.call(this,r)}},getOption:function(e){var r=this.$options[e];return r?r.forwardTo?this[r.forwardTo]&&this[r.forwardTo].getOption(e):r&&r.get?r.get.call(this):this["$"+e]:o('misspelled option "'+e+'"')}};function o(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var i,n,t=(function(){function e(){this.$defaultOptions={},i=a,n="dollarSigns"}return e.prototype.defineOptions=function(r,s,l){return r.$options||(this.$defaultOptions[s]=r.$options={}),Object.keys(l).forEach(function(u){var b=l[u];typeof b=="string"&&(b={forwardTo:b}),b.name||(b.name=u),r.$options[b.name]=b,"initialValue"in b&&(r["$"+b.name]=b.initialValue)}),k.implement(r,c),this},e.prototype.resetOptions=function(r){Object.keys(r.$options).forEach(function(s){var l=r.$options[s];"value"in l&&r.setOption(s,l.value)})},e.prototype.setDefaultValue=function(r,s,l){if(!r){for(r in this.$defaultOptions)if(this.$defaultOptions[r][s])break;if(!this.$defaultOptions[r][s])return!1}var u=this.$defaultOptions[r]||(this.$defaultOptions[r]={});u[s]&&(u.forwardTo?this.setDefaultValue(u.forwardTo,s,l):u[s].value=l)},e.prototype.setDefaultValues=function(r,s){Object.keys(s).forEach(function(l){this.setDefaultValue(r,l,s[l])},this)},e.prototype.setMessages=function(r,s){i=r,s&&s.placeholders&&(n=s.placeholders)},e.prototype.nls=function(r,s,l){i[r]||(o("No message found for the key '"+r+"' in the provided messages, trying to find a translation for the default string '"+s+"'."),i[s]||o("No message found for the default string '"+s+"' in the provided messages. Falling back to the default English message."));var u=i[r]||i[s]||s;return l&&(n==="dollarSigns"&&(u=u.replace(/\$(\$|[\d]+)/g,function(b,m){return m=="$"?"$":l[m]})),n==="curlyBrackets"&&(u=u.replace(/\{([^\}]+)\}/g,function(b,m){return l[m]}))),u},e})();t.prototype.warn=o,t.prototype.reportError=S,k.implement(t.prototype,M),x.AppConfig=t}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(E,x,z){z.exports='.ace-tm .ace_gutter {\n background: #f0f0f0;\n color: #333;\n}\n\n.ace-tm .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_fold {\n background-color: #6B72E6;\n}\n\n.ace-tm {\n background-color: #FFFFFF;\n color: black;\n}\n\n.ace-tm .ace_cursor {\n color: black;\n}\n \n.ace-tm .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_storage,\n.ace-tm .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_constant {\n color: rgb(197, 6, 11);\n}\n\n.ace-tm .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_invalid {\n background-color: rgba(255, 0, 0, 0.1);\n color: red;\n}\n\n.ace-tm .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_support.ace_type,\n.ace-tm .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_xml-pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_entity.ace_name.ace_function {\n color: #0000A2;\n}\n\n\n.ace-tm .ace_heading {\n color: rgb(12, 7, 255);\n}\n\n.ace-tm .ace_list {\n color:rgb(185, 6, 144);\n}\n\n.ace-tm .ace_meta.ace_tag {\n color:rgb(0, 22, 142);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n.ace-tm.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px white;\n}\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active-line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_gutter-active-line {\n background-color : #dcdcdc;\n}\n\n.ace-tm .ace_marker-layer .ace_selected-word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_indent-guide {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;\n}\n\n.ace-tm .ace_indent-guide-active {\n background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y;\n}\n'}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(E,x,z){x.isDark=!1,x.cssClass="ace-tm",x.cssText=E("./textmate-css"),x.$id="ace/theme/textmate";var k=E("../lib/dom");k.importCssString(x.cssText,x.cssClass,!1)}),ace.define("ace/config",["require","exports","module","ace/lib/lang","ace/lib/net","ace/lib/dom","ace/lib/app_config","ace/theme/textmate"],function(E,x,z){"no use strict";var k=E("./lib/lang"),M=E("./lib/net"),S=E("./lib/dom"),a=E("./lib/app_config").AppConfig;z.exports=x=new a;var c={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js?v=1773287522785",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};x.get=function(t){if(!c.hasOwnProperty(t))throw new Error("Unknown config key: "+t);return c[t]},x.set=function(t,e){if(c.hasOwnProperty(t))c[t]=e;else if(this.setDefaultValue("",t,e)==!1)throw new Error("Unknown config key: "+t);t=="useStrictCSP"&&S.useStrictCSP(e)},x.all=function(){return k.copyObject(c)},x.$modes={},x.moduleUrl=function(t,e){if(c.$moduleUrls[t])return c.$moduleUrls[t];var r=t.split("/");e=e||r[r.length-2]||"";var s=e=="snippets"?"/":"-",l=r[r.length-1];if(e=="worker"&&s=="-"){var u=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");l=l.replace(u,"")}(!l||l==e)&&r.length>1&&(l=r[r.length-2]);var b=c[e+"Path"];return b==null?b=c.basePath:s=="/"&&(e=s=""),b&&b.slice(-1)!="/"&&(b+="/"),b+e+s+l+this.get("suffix")},x.setModuleUrl=function(t,e){return c.$moduleUrls[t]=e};var o=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,E("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;x.setLoader=function(t){i=t},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(t,e){var r;if(Array.isArray(t))var s=t[0],l=t[1];else if(typeof t=="string")var l=t;var u=function(b){if(b&&!x.$loading[l])return e&&e(b);if(x.$loading[l]||(x.$loading[l]=[]),x.$loading[l].push(e),!(x.$loading[l].length>1)){var m=function(){o(l,function(g,d){d&&(x.$loaded[l]=d),x._emit("load.module",{name:l,module:d});var $=x.$loading[l];x.$loading[l]=null,$.forEach(function(T){T&&T(d)})})};if(!x.get("packaged"))return m();M.loadScript(x.moduleUrl(l,s),m),n()}};if(x.dynamicModules[l])x.dynamicModules[l]().then(function(b){b.default?u(b.default):u(b)});else{try{r=this.$require(l)}catch(b){}u(r||x.$loaded[l])}},x.$require=function(t){if(typeof z.require=="function"){var e="require";return z[e](t)}},x.setModuleLoader=function(t,e){x.dynamicModules[t]=e};var n=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$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"),n=function(){})};x.version="1.36.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(E,x,z){E("./lib/fixoldbrowsers");var k=E("./config");k.setLoader(function(c,o){E([c],function(i){o(null,i)})});var M=(function(){return this||typeof window<"u"&&window})();z.exports=function(c){k.init=S,k.$require=E,c.require=E},S(!0);function S(c){if(!(!M||!M.document)){k.set("packaged",c||E.packaged||z.packaged||M.define&&(void 0).packaged);var o={},i="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(i=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),r=0;r<e.length;r++){var s=e[r],l=s.src||s.getAttribute("src");if(l){for(var u=s.attributes,b=0,m=u.length;b<m;b++){var g=u[b];g.name.indexOf("data-ace-")===0&&(o[a(g.name.replace(/^data-ace-/,""))]=g.value)}var d=l.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);d&&(i=d[1])}}i&&(o.base=o.base||i,o.packaged=!0),o.basePath=o.base,o.workerPath=o.workerPath||o.base,o.modePath=o.modePath||o.base,o.themePath=o.themePath||o.base,delete o.base;for(var $ in o)typeof o[$]<"u"&&k.set($,o[$])}}function a(c){return c.replace(/-(.)/g,function(o,i){return i.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(E,x,z){var k=(function(){function M(S,a,c,o){this.start={row:S,column:a},this.end={row:c,column:o}}return M.prototype.isEqual=function(S){return this.start.row===S.start.row&&this.end.row===S.end.row&&this.start.column===S.start.column&&this.end.column===S.end.column},M.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},M.prototype.contains=function(S,a){return this.compare(S,a)==0},M.prototype.compareRange=function(S){var a,c=S.end,o=S.start;return a=this.compare(c.row,c.column),a==1?(a=this.compare(o.row,o.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(o.row,o.column),a==-1?-1:a==1?42:0)},M.prototype.comparePoint=function(S){return this.compare(S.row,S.column)},M.prototype.containsRange=function(S){return this.comparePoint(S.start)==0&&this.comparePoint(S.end)==0},M.prototype.intersects=function(S){var a=this.compareRange(S);return a==-1||a==0||a==1},M.prototype.isEnd=function(S,a){return this.end.row==S&&this.end.column==a},M.prototype.isStart=function(S,a){return this.start.row==S&&this.start.column==a},M.prototype.setStart=function(S,a){typeof S=="object"?(this.start.column=S.column,this.start.row=S.row):(this.start.row=S,this.start.column=a)},M.prototype.setEnd=function(S,a){typeof S=="object"?(this.end.column=S.column,this.end.row=S.row):(this.end.row=S,this.end.column=a)},M.prototype.inside=function(S,a){return this.compare(S,a)==0?!(this.isEnd(S,a)||this.isStart(S,a)):!1},M.prototype.insideStart=function(S,a){return this.compare(S,a)==0?!this.isEnd(S,a):!1},M.prototype.insideEnd=function(S,a){return this.compare(S,a)==0?!this.isStart(S,a):!1},M.prototype.compare=function(S,a){return!this.isMultiLine()&&S===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:S<this.start.row?-1:S>this.end.row?1:this.start.row===S?a>=this.start.column?0:-1:this.end.row===S?a<=this.end.column?0:1:0},M.prototype.compareStart=function(S,a){return this.start.row==S&&this.start.column==a?-1:this.compare(S,a)},M.prototype.compareEnd=function(S,a){return this.end.row==S&&this.end.column==a?1:this.compare(S,a)},M.prototype.compareInside=function(S,a){return this.end.row==S&&this.end.column==a?1:this.start.row==S&&this.start.column==a?-1:this.compare(S,a)},M.prototype.clipRows=function(S,a){if(this.end.row>a)var c={row:a+1,column:0};else if(this.end.row<S)var c={row:S,column:0};if(this.start.row>a)var o={row:a+1,column:0};else if(this.start.row<S)var o={row:S,column:0};return M.fromPoints(o||this.start,c||this.end)},M.prototype.extend=function(S,a){var c=this.compare(S,a);if(c==0)return this;if(c==-1)var o={row:S,column:a};else var i={row:S,column:a};return M.fromPoints(o||this.start,i||this.end)},M.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},M.prototype.isMultiLine=function(){return this.start.row!==this.end.row},M.prototype.clone=function(){return M.fromPoints(this.start,this.end)},M.prototype.collapseRows=function(){return this.end.column==0?new M(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new M(this.start.row,0,this.end.row,0)},M.prototype.toScreenRange=function(S){var a=S.documentToScreenPosition(this.start),c=S.documentToScreenPosition(this.end);return new M(a.row,a.column,c.row,c.column)},M.prototype.moveBy=function(S,a){this.start.row+=S,this.start.column+=a,this.end.row+=S,this.end.column+=a},M})();k.fromPoints=function(M,S){return new k(M.row,M.column,S.row,S.column)},k.comparePoints=function(M,S){return M.row-S.row||M.column-S.column},x.Range=k}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(E,x,z){for(var k=E("./oop"),M={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","-13":"NumpadEnter",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",59:";",61:"=",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}},S={Command:224,Backspace:8,Tab:9,Return:13,Enter:13,Pause:19,Escape:27,PageUp:33,PageDown:34,End:35,Home:36,Insert:45,Delete:46,ArrowLeft:37,ArrowUp:38,ArrowRight:39,ArrowDown:40,Backquote:192,Minus:189,Equal:187,BracketLeft:219,Backslash:220,BracketRight:221,Semicolon:186,Quote:222,Comma:188,Period:190,Slash:191,Space:32,NumpadAdd:107,NumpadDecimal:110,NumpadSubtract:109,NumpadDivide:111,NumpadMultiply:106},a=0;a<10;a++)S["Digit"+a]=48+a,S["Numpad"+a]=96+a,M.PRINTABLE_KEYS[48+a]=""+a,M.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var c=String.fromCharCode(a+32);S["Key"+c.toUpperCase()]=a,M.PRINTABLE_KEYS[a]=c}for(var a=1;a<13;a++)S["F"+a]=111+a,M.FUNCTION_KEYS[111+a]="F"+a;var o={Shift:16,Control:17,Alt:18,Meta:224};for(var i in o)S[i]=S[i+"Left"]=S[i+"Right"]=o[i];x.$codeToKeyCode=S,M.PRINTABLE_KEYS[173]="-";for(var n in M.FUNCTION_KEYS){var t=M.FUNCTION_KEYS[n].toLowerCase();M[t]=parseInt(n,10)}for(var n in M.PRINTABLE_KEYS){var t=M.PRINTABLE_KEYS[n].toLowerCase();M[t]=parseInt(n,10)}k.mixin(M,M.MODIFIER_KEYS),k.mixin(M,M.PRINTABLE_KEYS),k.mixin(M,M.FUNCTION_KEYS),M.enter=M.return,M.escape=M.esc,M.del=M.delete,(function(){for(var e=["cmd","ctrl","alt","shift"],r=Math.pow(2,e.length);r--;)M.KEY_MODS[r]=e.filter(function(s){return r&M.KEY_MODS[s]}).join("-")+"-"})(),M.KEY_MODS[0]="",M.KEY_MODS[-1]="input-",k.mixin(x,M),x.default=x,x.keyCodeToString=function(e){var r=M[e];return typeof r!="string"&&(r=String.fromCharCode(e)),r.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,z){var k=E("./keys"),M=E("./useragent"),S=null,a=0,c;function o(){c=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return c={passive:!1},!0}})}catch(b){}}function i(){return c==null&&o(),c}function n(b,m,g){this.elem=b,this.type=m,this.callback=g}n.prototype.destroy=function(){e(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var t=x.addListener=function(b,m,g,d){b.addEventListener(m,g,i()),d&&d.$toDestroy.push(new n(b,m,g))},e=x.removeListener=function(b,m,g){b.removeEventListener(m,g,i())};x.stopEvent=function(b){return x.stopPropagation(b),x.preventDefault(b),!1},x.stopPropagation=function(b){b.stopPropagation&&b.stopPropagation()},x.preventDefault=function(b){b.preventDefault&&b.preventDefault()},x.getButton=function(b){return b.type=="dblclick"?0:b.type=="contextmenu"||M.isMac&&b.ctrlKey&&!b.altKey&&!b.shiftKey?2:b.button},x.capture=function(b,m,g){var d=b&&b.ownerDocument||document;function $(T){m&&m(T),g&&g(T),e(d,"mousemove",m),e(d,"mouseup",$),e(d,"dragstart",$)}return t(d,"mousemove",m),t(d,"mouseup",$),t(d,"dragstart",$),$},x.addMouseWheelListener=function(b,m,g){t(b,"wheel",function(d){var $=.15,T=d.deltaX||0,A=d.deltaY||0;switch(d.deltaMode){case d.DOM_DELTA_PIXEL:d.wheelX=T*$,d.wheelY=A*$;break;case d.DOM_DELTA_LINE:var C=15;d.wheelX=T*C,d.wheelY=A*C;break;case d.DOM_DELTA_PAGE:var w=150;d.wheelX=T*w,d.wheelY=A*w;break}m(d)},g)},x.addMultiMouseDownListener=function(b,m,g,d,$){var T=0,A,C,w,f={2:"dblclick",3:"tripleclick",4:"quadclick"};function p(h){if(x.getButton(h)!==0?T=0:h.detail>1?(T++,T>4&&(T=1)):T=1,M.isIE){var v=Math.abs(h.clientX-A)>5||Math.abs(h.clientY-C)>5;(!w||v)&&(T=1),w&&clearTimeout(w),w=setTimeout(function(){w=null},m[T-1]||600),T==1&&(A=h.clientX,C=h.clientY)}if(h._clicks=T,g[d]("mousedown",h),T>4)T=0;else if(T>1)return g[d](f[T],h)}Array.isArray(b)||(b=[b]),b.forEach(function(h){t(h,"mousedown",p,$)})};function r(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)}x.getModifierString=function(b){return k.KEY_MODS[r(b)]};function s(b,m,g){var d=r(m);if(!g&&m.code&&(g=k.$codeToKeyCode[m.code]||g),!M.isMac&&S){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(d|=8),S.altGr)if((3&d)!=3)S.altGr=0;else return;if(g===18||g===17){var $=m.location;if(g===17&&$===1)S[g]==1&&(a=m.timeStamp);else if(g===18&&d===3&&$===2){var T=m.timeStamp-a;T<50&&(S.altGr=!0)}}}if(g in k.MODIFIER_KEYS&&(g=-1),!(!d&&g===13&&m.location===3&&(b(m,d,-g),m.defaultPrevented))){if(M.isChromeOS&&d&8){if(b(m,d,g),m.defaultPrevented)return;d&=-9}return!d&&!(g in k.FUNCTION_KEYS)&&!(g in k.PRINTABLE_KEYS)?!1:b(m,d,g)}}x.addCommandKeyListener=function(b,m,g){var d=null;t(b,"keydown",function($){S[$.keyCode]=(S[$.keyCode]||0)+1;var T=s(m,$,$.keyCode);return d=$.defaultPrevented,T},g),t(b,"keypress",function($){d&&($.ctrlKey||$.altKey||$.shiftKey||$.metaKey)&&(x.stopEvent($),d=null)},g),t(b,"keyup",function($){S[$.keyCode]=null},g),S||(l(),t(window,"focus",l))};function l(){S=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!M.isOldIE){var u=1;x.nextTick=function(b,m){m=m||window;var g="zero-timeout-message-"+u++,d=function($){$.data==g&&(x.stopPropagation($),e(m,"message",d),b())};t(m,"message",d),m.postMessage(g,"*")}}x.$idleBlocked=!1,x.onIdle=function(b,m){return setTimeout(function g(){x.$idleBlocked?setTimeout(g,100):b()},m)},x.$idleBlockId=null,x.blockIdle=function(b){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},b||100)},x.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame?x.nextFrame=x.nextFrame.bind(window):x.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(E,x,z){var k;z.exports={lineMode:!1,pasteCancelled:function(){return k&&k>Date.now()-50?!0:k=!1},cancel:function(){k=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(E,x,z){var k=E("../lib/event"),M=E("../config").nls,S=E("../lib/useragent"),a=E("../lib/dom"),c=E("../lib/lang"),o=E("../clipboard"),i=S.isChrome<18,n=S.isIE,t=S.isChrome>63,e=400,r=E("../lib/keys"),s=r.KEY_MODS,l=S.isIOS,u=l?/\s/:/\n/,b=S.isMobile,m;m=function(g,d){var $=a.createElement("textarea");$.className="ace_text-input",$.setAttribute("wrap","off"),$.setAttribute("autocorrect","off"),$.setAttribute("autocapitalize","off"),$.setAttribute("spellcheck","false"),$.style.opacity="0",g.insertBefore($,g.firstChild);var T=!1,A=!1,C=!1,w=!1,f="";b||($.style.fontSize="1px");var p=!1,h=!1,v="",y=0,L=0,R=0,_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,N=0;try{var W=document.activeElement===$}catch(B){}this.setNumberOfExtraLines=function(B){if(_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,B<0){N=0;return}N=B},this.setAriaOptions=function(B){if(B.activeDescendant?($.setAttribute("aria-haspopup","true"),$.setAttribute("aria-autocomplete",B.inline?"both":"list"),$.setAttribute("aria-activedescendant",B.activeDescendant)):($.setAttribute("aria-haspopup","false"),$.setAttribute("aria-autocomplete","both"),$.removeAttribute("aria-activedescendant")),B.role&&$.setAttribute("role",B.role),B.setLabel){$.setAttribute("aria-roledescription",M("text-input.aria-roledescription","editor"));var G="";if(d.$textInputAriaLabel&&(G+="".concat(d.$textInputAriaLabel,", ")),d.session){var K=d.session.selection.cursor.row;G+=M("text-input.aria-label","Cursor at row $0",[K+1])}$.setAttribute("aria-label",G)}},this.setAriaOptions({role:"textbox"}),k.addListener($,"blur",function(B){h||(d.onBlur(B),W=!1)},d),k.addListener($,"focus",function(B){if(!h){if(W=!0,S.isEdge)try{if(!document.hasFocus())return}catch(G){}d.onFocus(B),S.isEdge?setTimeout(D):D()}},d),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:d.renderer.enableKeyboardAccessibility}),f||t||this.$focusScroll=="browser")return $.focus({preventScroll:!0});var B=$.style.top;$.style.position="fixed",$.style.top="0px";try{var G=$.getBoundingClientRect().top!=0}catch(X){return}var K=[];if(G)for(var Q=$.parentElement;Q&&Q.nodeType==1;)K.push(Q),Q.setAttribute("ace_nocontext","true"),!Q.parentElement&&Q.getRootNode?Q=Q.getRootNode().host:Q=Q.parentElement;$.focus({preventScroll:!0}),G&&K.forEach(function(X){X.removeAttribute("ace_nocontext")}),setTimeout(function(){$.style.position="",$.style.top=="0px"&&($.style.top=B)},0)},this.blur=function(){$.blur()},this.isFocused=function(){return W},d.on("beforeEndOperation",function(){var B=d.curOp,G=B&&B.command&&B.command.name;if(G!="insertstring"){var K=G&&(B.docChanged||B.selectionChanged);C&&K&&(v=$.value="",ce()),D()}});var O=function(B,G){for(var K=G,Q=1;Q<=B-_&&Q<2*N+1;Q++)K+=d.session.getLine(B-Q).length+1;return K},D=l?function(B){if(!(!W||T&&!B||w)){B||(B="");var G="\n ab"+B+"cde fg\n";G!=$.value&&($.value=v=G);var K=4,Q=4+(B.length||(d.selection.isEmpty()?0:1));(y!=K||L!=Q)&&$.setSelectionRange(K,Q),y=K,L=Q}}:function(){if(!(C||w)&&!(!W&&!U)){C=!0;var B=0,G=0,K="";if(d.session){var Q=d.selection,X=Q.getRange(),te=Q.cursor.row;te===I+1?(_=I+1,I=_+2*N):te===_-1?(I=_-1,_=I-2*N):(te<_-1||te>I+1)&&(_=te>N?te-N:0,I=te>N?te+N:2*N);for(var ne=[],ie=_;ie<=I;ie++)ne.push(d.session.getLine(ie));if(K=ne.join("\n"),B=O(X.start.row,X.start.column),G=O(X.end.row,X.end.column),X.start.row<_){var ee=d.session.getLine(_-1);B=X.start.row<_-1?0:B,G+=ee.length+1,K=ee+"\n"+K}else if(X.end.row>I){var J=d.session.getLine(I+1);G=X.end.row>I+1?J.length:X.end.column,G+=K.length+1,K=K+"\n"+J}else b&&te>0&&(K="\n"+K,G+=1,B+=1);K.length>e&&(B<e&&G<e?K=K.slice(0,e):(K="\n",B==G?B=G=0:(B=0,G=1)));var se=K+"\n\n";se!=v&&($.value=v=se,y=L=se.length)}if(U&&(y=$.selectionStart,L=$.selectionEnd),L!=G||y!=B||$.selectionEnd!=L)try{$.setSelectionRange(B,G),y=B,L=G}catch(he){}C=!1}};this.resetSelection=D,W&&d.onFocus();var F=function(B){return B.selectionStart===0&&B.selectionEnd>=v.length&&B.value===v&&v&&B.selectionEnd!==L},H=function(B){C||(T?T=!1:F($)?(d.selectAll(),D()):b&&$.selectionStart!=y&&D())},P=null;this.setInputHandler=function(B){P=B},this.getInputHandler=function(){return P};var U=!1,j=function(B,G){if(U&&(U=!1),A)return D(),B&&d.onPaste(B),A=!1,"";for(var K=$.selectionStart,Q=$.selectionEnd,X=y,te=v.length-L,ne=B,ie=B.length-K,ee=B.length-Q,J=0;X>0&&v[J]==B[J];)J++,X--;for(ne=ne.slice(J),J=1;te>0&&v.length-J>y-1&&v[v.length-J]==B[B.length-J];)J++,te--;ie-=J-1,ee-=J-1;var se=ne.length-J+1;if(se<0&&(X=-se,se=0),ne=ne.slice(0,se),!G&&!ne&&!ie&&!X&&!te&&!ee)return"";w=!0;var he=!1;return S.isAndroid&&ne==". "&&(ne=" ",he=!0),ne&&!X&&!te&&!ie&&!ee||p?d.onTextInput(ne):d.onTextInput(ne,{extendLeft:X,extendRight:te,restoreStart:ie,restoreEnd:ee}),w=!1,v=B,y=K,L=Q,R=ee,he?"\n":ne},V=function(B){if(C)return le();if(B&&B.inputType){if(B.inputType=="historyUndo")return d.execCommand("undo");if(B.inputType=="historyRedo")return d.execCommand("redo")}var G=$.value,K=j(G,!0);(G.length>e+100||u.test(K)||b&&y<1&&y==L)&&D()},Y=function(B,G,K){var Q=B.clipboardData||window.clipboardData;if(!(!Q||i)){var X=n||K?"Text":"text/plain";try{return G?Q.setData(X,G)!==!1:Q.getData(X)}catch(te){if(!K)return Y(te,G,!0)}}},Z=function(B,G){var K=d.getCopyText();if(!K)return k.preventDefault(B);Y(B,K)?(l&&(D(K),T=K,setTimeout(function(){T=!1},10)),G?d.onCut():d.onCopy(),k.preventDefault(B)):(T=!0,$.value=K,$.select(),setTimeout(function(){T=!1,D(),G?d.onCut():d.onCopy()}))},oe=function(B){Z(B,!0)},re=function(B){Z(B,!1)},q=function(B){var G=Y(B);o.pasteCancelled()||(typeof G=="string"?(G&&d.onPaste(G,B),S.isIE&&setTimeout(D),k.preventDefault(B)):($.value="",A=!0))};k.addCommandKeyListener($,function(B,G,K){if(!C)return d.onCommandKey(B,G,K)},d),k.addListener($,"select",H,d),k.addListener($,"input",V,d),k.addListener($,"cut",oe,d),k.addListener($,"copy",re,d),k.addListener($,"paste",q,d),(!("oncut"in $)||!("oncopy"in $)||!("onpaste"in $))&&k.addListener(g,"keydown",function(B){if(!(S.isMac&&!B.metaKey||!B.ctrlKey))switch(B.keyCode){case 67:re(B);break;case 86:q(B);break;case 88:oe(B);break}},d);var ae=function(B){if(!(C||!d.onCompositionStart||d.$readOnly)&&(C={},!p)){B.data&&(C.useTextareaForIME=!1),setTimeout(le,0),d._signal("compositionStart"),d.on("mousedown",de);var G=d.getSelectionRange();G.end.row=G.start.row,G.end.column=G.start.column,C.markerRange=G,C.selectionStart=y,d.onCompositionStart(C),C.useTextareaForIME?(v=$.value="",y=0,L=0):($.msGetInputContext&&(C.context=$.msGetInputContext()),$.getInputContext&&(C.context=$.getInputContext()))}},le=function(){if(!(!C||!d.onCompositionUpdate||d.$readOnly)){if(p)return de();if(C.useTextareaForIME)d.onCompositionUpdate($.value);else{var B=$.value;j(B),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+L-C.selectionStart+R)}}},ce=function(B){!d.onCompositionEnd||d.$readOnly||(C=!1,d.onCompositionEnd(),d.off("mousedown",de),B&&V())};function de(){h=!0,$.blur(),$.focus(),h=!1}var ve=c.delayedCall(le,50).schedule.bind(null,null);function be(B){B.keyCode==27&&$.value.length<$.selectionStart&&(C||(v=$.value),y=L=-1,D()),ve()}k.addListener($,"compositionstart",ae,d),k.addListener($,"compositionupdate",le,d),k.addListener($,"keyup",be,d),k.addListener($,"keydown",ve,d),k.addListener($,"compositionend",ce,d),this.getElement=function(){return $},this.setCommandMode=function(B){p=B,$.readOnly=!1},this.setReadOnly=function(B){p||($.readOnly=B)},this.setCopyWithEmptySelection=function(B){},this.onContextMenu=function(B){U=!0,D(),d._emit("nativecontextmenu",{target:d,domEvent:B}),this.moveToMouse(B,!0)},this.moveToMouse=function(B,G){f||(f=$.style.cssText),$.style.cssText=(G?"z-index:100000;":"")+(S.isIE?"opacity:0.1;":"")+"text-indent: -"+(y+L)*d.renderer.characterWidth*.5+"px;";var K=d.container.getBoundingClientRect(),Q=a.computedStyle(d.container),X=K.top+(parseInt(Q.borderTopWidth)||0),te=K.left+(parseInt(K.borderLeftWidth)||0),ne=K.bottom-X-$.clientHeight-2,ie=function(ee){a.translate($,ee.clientX-te-2,Math.min(ee.clientY-X-2,ne))};ie(B),B.type=="mousedown"&&(d.renderer.$isMousePressed=!0,clearTimeout(fe),S.isWin&&k.capture(d.container,ie,ue))},this.onContextMenuClose=ue;var fe;function ue(){clearTimeout(fe),fe=setTimeout(function(){f&&($.style.cssText=f,f=""),d.renderer.$isMousePressed=!1,d.renderer.$keepTextAreaAtCursor&&d.renderer.$moveTextAreaToCursor()},0)}var ge=function(B){d.textInput.onContextMenu(B),ue()};k.addListener($,"mouseup",ge,d),k.addListener($,"mousedown",function(B){B.preventDefault(),ue()},d),k.addListener(d.renderer.scroller,"contextmenu",ge,d),k.addListener($,"contextmenu",ge,d),l&&$e(g,d,$);function $e(B,G,K){var Q=null,X=!1;K.addEventListener("keydown",function(ne){Q&&clearTimeout(Q),X=!0},!0),K.addEventListener("keyup",function(ne){Q=setTimeout(function(){X=!1},100)},!0);var te=function(ne){if(document.activeElement===K&&!(X||C||G.$mouseHandler.isMousePressed)&&!T){var ie=K.selectionStart,ee=K.selectionEnd,J=null,se=0;if(ie==0?J=r.up:ie==1?J=r.home:ee>L&&v[ee]=="\n"?J=r.end:ie<y&&v[ie-1]==" "?(J=r.left,se=s.option):ie<y||ie==y&&L!=y&&ie==ee?J=r.left:ee>L&&v.slice(0,ee).split("\n").length>2?J=r.down:ee>L&&v[ee-1]==" "?(J=r.right,se=s.option):(ee>L||ee==L&&L!=y&&ie==ee)&&(J=r.right),ie!==ee&&(se|=s.shift),J){var he=G.onCommandKey({},se,J);if(!he&&G.commands){J=r.keyCodeToString(J);var ye=G.commands.findKeyCommand(se,J);ye&&G.execCommand(ye)}y=ie,L=ee,D("")}}};document.addEventListener("selectionchange",te),G.on("destroy",function(){document.removeEventListener("selectionchange",te)})}this.destroy=function(){$.parentElement&&$.parentElement.removeChild($)}},x.TextInput=m,x.$setUserAgentForTests=function(g,d){b=g,l=d}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(E,x,z){var k=E("../lib/useragent"),M=0,S=550,a=(function(){function i(n){n.$clickSelection=null;var t=n.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(r){n[r]=this[r]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return i.prototype.onMouseDown=function(n){var t=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var r=this.editor,s=n.getButton();if(s!==0){var l=r.getSelectionRange(),u=l.isEmpty();(u||s==1)&&r.selection.moveToPosition(e),s==2&&(r.textInput.onContextMenu(n.domEvent),k.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!r.isFocused()&&(r.focus(),this.$focusTimeout&&!this.$clickSelection&&!r.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},i.prototype.startSelect=function(n,t){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):t||e.selection.moveToPosition(n),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var n,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(e);if(r==-1)n=this.$clickSelection.end;else if(r==1)n=this.$clickSelection.start;else{var s=o(this.$clickSelection,e);e=s.cursor,n=s.anchor}t.selection.setSelectionAnchor(n.row,n.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(n){var t,e=this.editor,r=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[n](r.row,r.column);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s.start),u=this.$clickSelection.comparePoint(s.end);if(l==-1&&u<=0)t=this.$clickSelection.end,(s.end.row!=r.row||s.end.column!=r.column)&&(r=s.start);else if(u==1&&l>=0)t=this.$clickSelection.start,(s.start.row!=r.row||s.start.column!=r.column)&&(r=s.end);else if(l==-1&&u==1)r=s.end,t=s.start;else{var b=o(this.$clickSelection,r);r=b.cursor,t=b.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(r),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var n=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>M||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var t=n.getDocumentPosition(),e=this.editor,r=e.session,s=r.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},i.prototype.onTripleClick=function(n){var t=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var r=e.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(r.start.row),this.$clickSelection.end=e.selection.getLineRange(r.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},i.prototype.onQuadClick=function(n){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,r=n.domEvent.timeStamp,s=r-e.t,l=s?n.wheelX/s:e.vx,u=s?n.wheelY/s:e.vy;s<S&&(l=(l+e.vx)/2,u=(u+e.vy)/2);var b=Math.abs(l/u),m=!1;if(b>=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(m=!0),b<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(m=!0),m)e.allowed=r;else if(r-e.allowed<S){var g=Math.abs(l)<=1.5*Math.abs(e.vx)&&Math.abs(u)<=1.5*Math.abs(e.vy);g?(m=!0,e.allowed=r):e.allowed=0}if(e.t=r,e.vx=l,e.vy=u,m)return t.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},i})();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,x.DefaultHandlers=a;function c(i,n,t,e){return Math.sqrt(Math.pow(t-i,2)+Math.pow(e-n,2))}function o(i,n){if(i.start.row==i.end.row)var t=2*n.column-i.start.column-i.end.column;else if(i.start.row==i.end.row-1&&!i.start.column&&!i.end.column)var t=n.column-4;else var t=2*n.row-i.start.row-i.end.row;return t<0?{cursor:i.start,anchor:i.end}:{cursor:i.end,anchor:i.start}}}),ace.define("ace/lib/scroll",["require","exports","module"],function(E,x,z){x.preventParentScroll=function(M){M.stopPropagation();var S=M.currentTarget,a=S.scrollHeight>S.clientHeight;a||M.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(E,x,z){var k=this&&this.__extends||(function(){var r=function(s,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,b){u.__proto__=b}||function(u,b){for(var m in b)Object.prototype.hasOwnProperty.call(b,m)&&(u[m]=b[m])},r(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),M=this&&this.__values||function(r){var s=typeof Symbol=="function"&&Symbol.iterator,l=s&&r[s],u=0;if(l)return l.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&u>=r.length&&(r=void 0),{value:r&&r[u++],done:!r}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},S=E("./lib/dom");E("./lib/event");var a=E("./range").Range,c=E("./lib/scroll").preventParentScroll,o="ace_tooltip",i=(function(){function r(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return r.prototype.$init=function(){return this.$element=S.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},r.prototype.getElement=function(){return this.$element||this.$init()},r.prototype.setText=function(s){this.getElement().textContent=s},r.prototype.setHtml=function(s){this.getElement().innerHTML=s},r.prototype.setPosition=function(s,l){this.getElement().style.left=s+"px",this.getElement().style.top=l+"px"},r.prototype.setClassName=function(s){S.addCssClass(this.getElement(),s)},r.prototype.setTheme=function(s){this.$element.className=o+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},r.prototype.show=function(s,l,u){s!=null&&this.setText(s),l!=null&&u!=null&&this.setPosition(l,u),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},r.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},r.prototype.getHeight=function(){return this.getElement().offsetHeight},r.prototype.getWidth=function(){return this.getElement().offsetWidth},r.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},r})(),n=(function(){function r(){this.popups=[]}return r.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},r.prototype.removePopup=function(s){var l=this.popups.indexOf(s);l!==-1&&(this.popups.splice(l,1),this.updatePopups())},r.prototype.updatePopups=function(){var s,l,u,b;this.popups.sort(function(f,p){return p.priority-f.priority});var m=[];try{for(var g=M(this.popups),d=g.next();!d.done;d=g.next()){var $=d.value,T=!0;try{for(var A=(u=void 0,M(m)),C=A.next();!C.done;C=A.next()){var w=C.value;if(this.doPopupsOverlap(w,$)){T=!1;break}}}catch(f){u={error:f}}finally{try{C&&!C.done&&(b=A.return)&&b.call(A)}finally{if(u)throw u.error}}T?m.push($):$.hide()}}catch(f){s={error:f}}finally{try{d&&!d.done&&(l=g.return)&&l.call(g)}finally{if(s)throw s.error}}},r.prototype.doPopupsOverlap=function(s,l){var u=s.getElement().getBoundingClientRect(),b=l.getElement().getBoundingClientRect();return u.left<b.right&&u.right>b.left&&u.top<b.bottom&&u.bottom>b.top},r})(),t=new n;x.popupManager=t,x.Tooltip=i;var e=(function(r){k(s,r);function s(l){l===void 0&&(l=document.body);var u=r.call(this,l)||this;u.timeout=void 0,u.lastT=0,u.idleTime=350,u.lastEvent=void 0,u.onMouseOut=u.onMouseOut.bind(u),u.onMouseMove=u.onMouseMove.bind(u),u.waitForHover=u.waitForHover.bind(u),u.hide=u.hide.bind(u);var b=u.getElement();return b.style.whiteSpace="pre-wrap",b.style.pointerEvents="auto",b.addEventListener("mouseout",u.onMouseOut),b.tabIndex=-1,b.addEventListener("blur",(function(){b.contains(document.activeElement)||this.hide()}).bind(u)),b.addEventListener("wheel",c),u}return s.prototype.addToEditor=function(l){l.on("mousemove",this.onMouseMove),l.on("mousedown",this.hide),l.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(l){l.off("mousemove",this.onMouseMove),l.off("mousedown",this.hide),l.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(l,u){this.lastEvent=l,this.lastT=Date.now();var b=u.$mouseHandler.isMousePressed;if(this.isOpen){var m=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(m.row,m.column)||b||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||b||(this.lastEvent=l,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var l=Date.now()-this.lastT;if(this.idleTime-l>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-l);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(l){var u=l.editor,b=l.getDocumentPosition(),m=u.session.getLine(b.row);if(b.column==m.length){var g=u.renderer.pixelToScreenCoordinates(l.clientX,l.clientY),d=u.session.documentToScreenPosition(b.row,b.column);if(d.column!=g.column||d.row!=g.row)return!0}return!1},s.prototype.setDataProvider=function(l){this.$gatherData=l},s.prototype.showForRange=function(l,u,b,m){var g=10;if(!(m&&m!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var d=l.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(d.theme)),this.isOpen=!0,this.addMarker(u,l.session),this.range=a.fromPoints(u.start,u.end);var $=d.textToScreenCoordinates(u.start.row,u.start.column),T=d.scroller.getBoundingClientRect();$.pageX<T.left&&($.pageX=T.left);var A=this.getElement();A.innerHTML="",A.appendChild(b),A.style.maxHeight="",A.style.display="block";var C=A.clientHeight,w=A.clientWidth,f=window.innerHeight-$.pageY-d.lineHeight,p=!0;$.pageY-C<0&&$.pageY<f&&(p=!1),A.style.maxHeight=(p?$.pageY:f)-g+"px",A.style.top=p?"":$.pageY+d.lineHeight+"px",A.style.bottom=p?window.innerHeight-$.pageY+"px":"",A.style.left=Math.min($.pageX,window.innerWidth-w-g)+"px"}},s.prototype.addMarker=function(l,u){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=u,this.marker=u&&u.addMarker(l,"ace_highlight-marker","text")},s.prototype.hide=function(l){!l&&document.activeElement==this.getElement()||l&&l.target&&(l.type!="keydown"||l.ctrlKey||l.metaKey)&&this.$element.contains(l.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,t.removePopup(this)))},s.prototype.$registerCloseEvents=function(){window.addEventListener("keydown",this.hide,!0),window.addEventListener("wheel",this.hide,!0),window.addEventListener("mousedown",this.hide,!0)},s.prototype.$removeCloseEvents=function(){window.removeEventListener("keydown",this.hide,!0),window.removeEventListener("wheel",this.hide,!0),window.removeEventListener("mousedown",this.hide,!0)},s.prototype.onMouseOut=function(l){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),this.lastEvent=null,this.isOpen&&(!l.relatedTarget||this.getElement().contains(l.relatedTarget)||l&&l.currentTarget.contains(l.relatedTarget)||l.relatedTarget.classList.contains("ace_content")||this.hide())},s})(i);x.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/tooltip","ace/config","ace/lib/lang"],function(E,x,z){var k=this&&this.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function s(){this.constructor=e}e.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}})(),M=this&&this.__values||function(t){var e=typeof Symbol=="function"&&Symbol.iterator,r=e&&t[e],s=0;if(r)return r.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},S=E("../lib/dom"),a=E("../lib/event"),c=E("../tooltip").Tooltip,o=E("../config").nls;E("../lib/lang");function i(t){var e=t.editor,r=e.renderer.$gutterLayer,s=new n(e);t.editor.setDefaultHandler("guttermousedown",function(d){if(!(!e.isFocused()||d.getButton()!=0)){var $=r.getRegion(d);if($!="foldWidgets"){var T=d.getDocumentPosition().row,A=e.session.selection;if(d.getShiftKey())A.selectTo(T,0);else{if(d.domEvent.detail==2)return e.selectAll(),d.preventDefault();t.$clickSelection=e.selection.getLineRange(T)}return t.setState("selectByLines"),t.captureMouse(d),d.preventDefault()}}});var l,u;function b(){var d=u.getDocumentPosition().row,$=e.session.getLength();if(d==$){var T=e.renderer.pixelToScreenCoordinates(0,u.y).row,A=u.$pos;if(T>e.session.documentToScreenRow(A.row,A.column))return m()}if(s.showTooltip(d),!!s.isOpen)if(e.on("mousewheel",m),t.$tooltipFollowsMouse)g(u);else{var C=u.getGutterRow(),w=r.$lines.get(C);if(w){var f=w.element.querySelector(".ace_gutter_annotation"),p=f.getBoundingClientRect(),h=s.getElement().style;h.left=p.right+"px",h.top=p.bottom+"px"}else g(u)}}function m(){l&&(l=clearTimeout(l)),s.isOpen&&(s.hideTooltip(),e.off("mousewheel",m))}function g(d){s.setPosition(d.x,d.y)}t.editor.setDefaultHandler("guttermousemove",function(d){var $=d.domEvent.target||d.domEvent.srcElement;if(S.hasCssClass($,"ace_fold-widget"))return m();s.isOpen&&t.$tooltipFollowsMouse&&g(d),u=d,!l&&(l=setTimeout(function(){l=null,u&&!t.isMousePressed?b():m()},50))}),a.addListener(e.renderer.$gutter,"mouseout",function(d){u=null,!(!s.isOpen||l)&&(l=setTimeout(function(){l=null,m()},50))},e),e.on("changeSession",m),e.on("input",m)}x.GutterHandler=i;var n=(function(t){k(e,t);function e(r){var s=t.call(this,r.container)||this;return s.editor=r,s}return e.prototype.setPosition=function(r,s){var l=window.innerWidth||document.documentElement.clientWidth,u=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),m=this.getHeight();r+=15,s+=15,r+b>l&&(r-=r+b-l),s+m>u&&(s-=20+m),c.prototype.setPosition.call(this,r,s)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(r){var s,l=this.editor.renderer.$gutterLayer,u=l.$annotations[r],b;u?b={displayText:Array.from(u.displayText),type:Array.from(u.type)}:b={displayText:[],type:[]};var m=l.session.getFoldLine(r);if(m&&l.$showFoldedAnnotations){for(var g={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},$,T=r+1;T<=m.end.row;T++)if(l.$annotations[T])for(var A=0;A<l.$annotations[T].text.length;A++){var C=l.$annotations[T].type[A];g[C].push(l.$annotations[T].text[A]),(!$||d[C]<d[$])&&($=C)}if(["error","security","warning"].includes($)){var w="".concat(e.annotationsToSummaryString(g)," in folded code.");b.displayText.push(w),b.type.push($+"_fold")}}if(b.displayText.length===0)return this.hide();for(var f={error:[],security:[],warning:[],info:[],hint:[]},p=l.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=0;T<b.displayText.length;T++){var h=S.createElement("span"),v=S.createElement("span");(s=v.classList).add.apply(s,["ace_".concat(b.type[T]),p]),v.setAttribute("aria-label","".concat(e.annotationLabels[b.type[T].replace("_fold","")].singular)),v.setAttribute("role","img"),v.appendChild(S.createTextNode(" ")),h.appendChild(v),h.appendChild(S.createTextNode(b.displayText[T])),h.appendChild(S.createElement("br")),f[b.type[T].replace("_fold","")].push(h)}var y=this.getElement();S.removeChildren(y),f.error.forEach(function(L){return y.appendChild(L)}),f.security.forEach(function(L){return y.appendChild(L)}),f.warning.forEach(function(L){return y.appendChild(L)}),f.info.forEach(function(L){return y.appendChild(L)}),f.hint.forEach(function(L){return y.appendChild(L)}),y.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},e.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},e.annotationsToSummaryString=function(r){var s,l,u=[],b=["error","security","warning","info","hint"];try{for(var m=M(b),g=m.next();!g.done;g=m.next()){var d=g.value;if(r[d].length){var $=r[d].length===1?e.annotationLabels[d].singular:e.annotationLabels[d].plural;u.push("".concat(r[d].length," ").concat($))}}}catch(T){s={error:T}}finally{try{g&&!g.done&&(l=m.return)&&l.call(m)}finally{if(s)throw s.error}}return u.join(", ")},e})(c);x.GutterTooltip=n}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,x,z){var k=E("../lib/event"),M=E("../lib/useragent"),S=(function(){function a(c,o){this.speed,this.wheelX,this.wheelY,this.domEvent=c,this.editor=o,this.x=this.clientX=c.clientX,this.y=this.clientY=c.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return a.prototype.stopPropagation=function(){k.stopPropagation(this.domEvent),this.propagationStopped=!0},a.prototype.preventDefault=function(){k.preventDefault(this.domEvent),this.defaultPrevented=!0},a.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},a.prototype.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},a.prototype.getGutterRow=function(){var c=this.getDocumentPosition().row,o=this.editor.session.documentToScreenRow(c,0),i=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return o-i},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var c=this.editor,o=c.getSelectionRange();if(o.isEmpty())this.$inSelection=!1;else{var i=this.getDocumentPosition();this.$inSelection=o.contains(i.row,i.column)}return this.$inSelection},a.prototype.getButton=function(){return k.getButton(this.domEvent)},a.prototype.getShiftKey=function(){return this.domEvent.shiftKey},a.prototype.getAccelKey=function(){return M.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a})();x.MouseEvent=S}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(E,x,z){var k=E("../lib/dom"),M=E("../lib/event"),S=E("../lib/useragent"),a=200,c=200,o=5;function i(t){var e=t.editor,r=k.createElement("div");r.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",r.textContent=" ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(O){t[O]=this[O]},this),e.on("mousedown",this.onMouseDown.bind(t));var l=e.container,u,b,m,g,d,$,T=0,A,C,w,f,p;this.onDragStart=function(O){if(this.cancelDrag||!l.draggable){var D=this;return setTimeout(function(){D.startSelect(),D.captureMouse(O)},0),O.preventDefault()}d=e.getSelectionRange();var F=O.dataTransfer;F.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(r),F.setDragImage&&F.setDragImage(r,0,0),setTimeout(function(){e.container.removeChild(r)}),F.clearData(),F.setData("Text",e.session.getTextRange()),C=!0,this.setState("drag")},this.onDragEnd=function(O){if(l.draggable=!1,C=!1,this.setState(null),!e.getReadOnly()){var D=O.dataTransfer.dropEffect;!A&&D=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(O){if(!(e.getReadOnly()||!N(O.dataTransfer)))return b=O.clientX,m=O.clientY,u||L(),T++,O.dataTransfer.dropEffect=A=W(O),M.preventDefault(O)},this.onDragOver=function(O){if(!(e.getReadOnly()||!N(O.dataTransfer)))return b=O.clientX,m=O.clientY,u||(L(),T++),_!==null&&(_=null),O.dataTransfer.dropEffect=A=W(O),M.preventDefault(O)},this.onDragLeave=function(O){if(T--,T<=0&&u)return R(),A=null,M.preventDefault(O)},this.onDrop=function(O){if($){var D=O.dataTransfer;if(C)switch(A){case"move":d.contains($.row,$.column)?d={start:$,end:$}:d=e.moveText(d,$);break;case"copy":d=e.moveText(d,$,!0);break}else{var F=D.getData("Text");d={start:$,end:e.session.insert($,F)},e.focus(),A=null}return R(),M.preventDefault(O)}},M.addListener(l,"dragstart",this.onDragStart.bind(t),e),M.addListener(l,"dragend",this.onDragEnd.bind(t),e),M.addListener(l,"dragenter",this.onDragEnter.bind(t),e),M.addListener(l,"dragover",this.onDragOver.bind(t),e),M.addListener(l,"dragleave",this.onDragLeave.bind(t),e),M.addListener(l,"drop",this.onDrop.bind(t),e);function h(O,D){var F=Date.now(),H=!D||O.row!=D.row,P=!D||O.column!=D.column;if(!f||H||P)e.moveCursorToPosition(O),f=F,p={x:b,y:m};else{var U=n(p.x,p.y,b,m);U>o?f=null:F-f>=c&&(e.renderer.scrollCursorIntoView(),f=null)}}function v(O,D){var F=Date.now(),H=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,U=e.renderer.scroller.getBoundingClientRect(),j={x:{left:b-U.left,right:U.right-b},y:{top:m-U.top,bottom:U.bottom-m}},V=Math.min(j.x.left,j.x.right),Y=Math.min(j.y.top,j.y.bottom),Z={row:O.row,column:O.column};V/P<=2&&(Z.column+=j.x.left<j.x.right?-3:2),Y/H<=1&&(Z.row+=j.y.top<j.y.bottom?-1:1);var oe=O.row!=Z.row,re=O.column!=Z.column,q=!D||O.row!=D.row;oe||re&&!q?w?F-w>=a&&e.renderer.scrollCursorIntoView(Z):w=F:w=null}function y(){var O=$;$=e.renderer.screenToTextCoordinates(b,m),h($,O),v($,O)}function L(){d=e.selection.toOrientedRange(),u=e.session.addMarker(d,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),y(),g=setInterval(y,20),T=0,M.addListener(document,"mousemove",I)}function R(){clearInterval(g),e.session.removeMarker(u),u=null,e.selection.fromOrientedRange(d),e.isFocused()&&!C&&e.$resetCursorStyle(),d=null,$=null,T=0,w=null,f=null,M.removeListener(document,"mousemove",I)}var _=null;function I(){_==null&&(_=setTimeout(function(){_!=null&&u&&R()},20))}function N(O){var D=O.types;return!D||Array.prototype.some.call(D,function(F){return F=="text/plain"||F=="Text"})}function W(O){var D=["copy","copymove","all","uninitialized"],F=["move","copymove","linkmove","all","uninitialized"],H=S.isMac?O.altKey:O.ctrlKey,P="uninitialized";try{P=O.dataTransfer.effectAllowed.toLowerCase()}catch(j){}var U="none";return H&&D.indexOf(P)>=0?U="copy":F.indexOf(P)>=0?U="move":D.indexOf(P)>=0&&(U="copy"),U}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var r=S.isWin?"default":"move";t.renderer.setCursorStyle(r),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(S.isIE&&this.state=="dragReady"){var r=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);r>3&&e.dragDrop()}if(this.state==="dragWait"){var r=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);r>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,r=t.inSelection(),s=t.getButton(),l=t.domEvent.detail||1;if(l===1&&s===0&&r){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var u=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in u&&(u.unselectable="on"),e.getDragDelay()){if(S.isWebKit){this.cancelDrag=!0;var b=e.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function n(t,e,r,s){return Math.sqrt(Math.pow(r-t,2)+Math.pow(s-e,2))}x.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(E,x,z){var k=E("./mouse_event").MouseEvent,M=E("../lib/event"),S=E("../lib/dom");x.addTouchListeners=function(a,c){var o="scroll",i,n,t,e,r,s,l=0,u,b=0,m=0,g=0,d,$;function T(){var h=window.navigator&&window.navigator.clipboard,v=!1,y=function(){var _=c.getCopyText(),I=c.session.getUndoManager().hasUndo();$.replaceChild(S.buildDom(v?["span",!_&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],h&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),$.firstChild)},L=function(_){return c.commands.canExecute(_,c)},R=function(_){var I=_.target.getAttribute("action");if(I=="more"||!v)return v=!v,y();I=="paste"?h.readText().then(function(N){c.execCommand(I,N)}):I&&((I=="cut"||I=="copy")&&(h?h.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(I)),$.firstChild.style.display="none",v=!1,I!="openCommandPalette"&&c.focus()};$=S.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){o="menu",_.stopPropagation(),_.preventDefault(),c.textInput.focus()},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),R(_)},onclick:R},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function A(){if(!c.getOption("enableMobileMenu")){$&&C();return}$||T();var h=c.selection.cursor,v=c.renderer.textToScreenCoordinates(h.row,h.column),y=c.renderer.textToScreenCoordinates(0,0).pageX,L=c.renderer.scrollLeft,R=c.container.getBoundingClientRect();$.style.top=v.pageY-R.top-3+"px",v.pageX-R.left<R.width-70?($.style.left="",$.style.right="10px"):($.style.right="",$.style.left=y+L-R.left+"px"),$.style.display="",$.firstChild.style.display="none",c.on("input",C)}function C(h){$&&($.style.display="none"),c.off("input",C)}function w(){r=null,clearTimeout(r);var h=c.selection.getRange(),v=h.contains(u.row,u.column);(h.isEmpty()||!v)&&(c.selection.moveToPosition(u),c.selection.selectWord()),o="wait",A()}function f(){r=null,clearTimeout(r),c.selection.moveToPosition(u);var h=b>=2?c.selection.getLineRange(u.row):c.session.getBracketRange(u);h&&!h.isEmpty()?c.selection.setRange(h):c.selection.selectWord(),o="wait"}M.addListener(a,"contextmenu",function(h){if(d){var v=c.textInput.getElement();v.focus()}},c),M.addListener(a,"touchstart",function(h){var v=h.touches;if(r||v.length>1){clearTimeout(r),r=null,t=-1,o="zoom";return}d=c.$mouseHandler.isMousePressed=!0;var y=c.renderer.layerConfig.lineHeight,L=c.renderer.layerConfig.lineHeight,R=h.timeStamp;e=R;var _=v[0],I=_.clientX,N=_.clientY;Math.abs(i-I)+Math.abs(n-N)>y&&(t=-1),i=h.clientX=I,n=h.clientY=N,m=g=0;var W=new k(h,c);if(u=W.getDocumentPosition(),R-t<500&&v.length==1&&!l)b++,h.preventDefault(),h.button=0,f();else{b=0;var O=c.selection.cursor,D=c.selection.isEmpty()?O:c.selection.anchor,F=c.renderer.$cursorLayer.getPixelPosition(O,!0),H=c.renderer.$cursorLayer.getPixelPosition(D,!0),P=c.renderer.scroller.getBoundingClientRect(),U=c.renderer.layerConfig.offset,j=c.renderer.scrollLeft,V=function(oe,re){return oe=oe/L,re=re/y-.75,oe*oe+re*re};if(h.clientX<P.left){o="zoom";return}var Y=V(h.clientX-P.left-F.left+j,h.clientY-P.top-F.top+U),Z=V(h.clientX-P.left-H.left+j,h.clientY-P.top-H.top+U);Y<3.5&&Z<3.5&&(o=Y>Z?"cursor":"anchor"),Z<3.5?o="anchor":Y<3.5?o="cursor":o="scroll",r=setTimeout(w,450)}t=R},c),M.addListener(a,"touchend",function(h){d=c.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),o=="zoom"?(o="",l=0):r?(c.selection.moveToPosition(u),l=0,A()):o=="scroll"?(p(),C()):A(),clearTimeout(r),r=null},c),M.addListener(a,"touchmove",function(h){r&&(clearTimeout(r),r=null);var v=h.touches;if(!(v.length>1||o=="zoom")){var y=v[0],L=i-y.clientX,R=n-y.clientY;if(o=="wait")if(L*L+R*R>4)o="cursor";else return h.preventDefault();i=y.clientX,n=y.clientY,h.clientX=y.clientX,h.clientY=y.clientY;var _=h.timeStamp,I=_-e;if(e=_,o=="scroll"){var N=new k(h,c);N.speed=1,N.wheelX=L,N.wheelY=R,10*Math.abs(L)<Math.abs(R)&&(L=0),10*Math.abs(R)<Math.abs(L)&&(R=0),I!=0&&(m=L/I,g=R/I),c._emit("mousewheel",N),N.propagationStopped||(m=g=0)}else{var W=new k(h,c),O=W.getDocumentPosition();o=="cursor"?c.selection.moveCursorToPosition(O):o=="anchor"&&c.selection.setSelectionAnchor(O.row,O.column),c.renderer.scrollCursorIntoView(O),h.preventDefault()}}},c);function p(){l+=60,s=setInterval(function(){l--<=0&&(clearInterval(s),s=null),Math.abs(m)<.01&&(m=0),Math.abs(g)<.01&&(g=0),l<20&&(m=.9*m),l<20&&(g=.9*g);var h=c.session.getScrollTop();c.renderer.scrollBy(10*m,10*g),h==c.session.getScrollTop()&&(l=0)},10)}}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/mouse/touch_handler","ace/config"],function(E,x,z){var k=E("../lib/event"),M=E("../lib/useragent"),S=E("./default_handlers").DefaultHandlers,a=E("./default_gutter_handler").GutterHandler,c=E("./mouse_event").MouseEvent,o=E("./dragdrop_handler").DragdropHandler,i=E("./touch_handler").addTouchListeners,n=E("../config"),t=(function(){function e(r){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=r,new S(this),new a(this),new o(this);var l=function(m){var g=!document.hasFocus||!document.hasFocus()||!r.isFocused()&&document.activeElement==(r.textInput&&r.textInput.getElement());g&&window.focus(),r.focus(),setTimeout(function(){r.isFocused()||r.focus()})},u=r.renderer.getMouseEventTarget();k.addListener(u,"click",this.onMouseEvent.bind(this,"click"),r),k.addListener(u,"mousemove",this.onMouseMove.bind(this,"mousemove"),r),k.addMultiMouseDownListener([u,r.renderer.scrollBarV&&r.renderer.scrollBarV.inner,r.renderer.scrollBarH&&r.renderer.scrollBarH.inner,r.textInput&&r.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",r),k.addMouseWheelListener(r.container,this.onMouseWheel.bind(this,"mousewheel"),r),i(r.container,r);var b=r.renderer.$gutter;k.addListener(b,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),r),k.addListener(b,"click",this.onMouseEvent.bind(this,"gutterclick"),r),k.addListener(b,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),r),k.addListener(b,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),r),k.addListener(u,"mousedown",l,r),k.addListener(b,"mousedown",l,r),M.isIE&&r.renderer.scrollBarV&&(k.addListener(r.renderer.scrollBarV.element,"mousedown",l,r),k.addListener(r.renderer.scrollBarH.element,"mousedown",l,r)),r.on("mousemove",function(m){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var g=r.renderer.screenToTextCoordinates(m.x,m.y),d=r.session.selection.getRange(),$=r.renderer;!d.isEmpty()&&d.insideStart(g.row,g.column)?$.setCursorStyle("default"):$.setCursorStyle("")}},r)}return e.prototype.onMouseEvent=function(r,s){this.editor.session&&this.editor._emit(r,new c(s,this.editor))},e.prototype.onMouseMove=function(r,s){var l=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!l||!l.length||this.editor._emit(r,new c(s,this.editor))},e.prototype.onMouseWheel=function(r,s){var l=new c(s,this.editor);l.speed=this.$scrollSpeed*2,l.wheelX=s.wheelX,l.wheelY=s.wheelY,this.editor._emit(r,l)},e.prototype.setState=function(r){this.state=r},e.prototype.captureMouse=function(r,s){this.x=r.x,this.y=r.y,this.isMousePressed=!0;var l=this.editor,u=this.editor.renderer;u.$isMousePressed=!0;var b=this,m=function(A){if(A){if(M.isWebKit&&!A.which&&b.releaseMouse)return b.releaseMouse();b.x=A.clientX,b.y=A.clientY,s&&s(A),b.mouseEvent=new c(A,b.editor),b.$mouseMoved=!0}},g=function(A){l.off("beforeEndOperation",$),clearInterval(T),l.session&&d(),b[b.state+"End"]&&b[b.state+"End"](A),b.state="",b.isMousePressed=u.$isMousePressed=!1,u.$keepTextAreaAtCursor&&u.$moveTextAreaToCursor(),b.$onCaptureMouseMove=b.releaseMouse=null,A&&b.onMouseEvent("mouseup",A),l.endOperation()},d=function(){b[b.state]&&b[b.state](),b.$mouseMoved=!1};if(M.isOldIE&&r.domEvent.type=="dblclick")return setTimeout(function(){g(r)});var $=function(A){b.releaseMouse&&l.curOp.command.name&&l.curOp.selectionChanged&&(b[b.state+"End"]&&b[b.state+"End"](),b.state="",b.releaseMouse())};l.on("beforeEndOperation",$),l.startOperation({command:{name:"mouse"}}),b.$onCaptureMouseMove=m,b.releaseMouse=k.capture(this.editor.container,m,g);var T=setInterval(d,20)},e.prototype.cancelContextMenu=function(){var r=(function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",r),s&&s.domEvent&&k.stopEvent(s.domEvent))}).bind(this);setTimeout(r,10),this.editor.on("nativecontextmenu",r)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse()},e})();t.prototype.releaseMouse=null,n.defineOptions(t.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:M.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),x.MouseHandler=t}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("../lib/dom"),M=(function(){function S(a){a.on("click",function(c){var o=c.getDocumentPosition(),i=a.session,n=i.getFoldAt(o.row,o.column,1);n&&(c.getAccelKey()?i.removeFold(n):i.expandFold(n),c.stop());var t=c.domEvent&&c.domEvent.target;t&&k.hasCssClass(t,"ace_inline_button")&&k.hasCssClass(t,"ace_toggle_wrap")&&(i.setOption("wrap",!i.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(c){var o=a.renderer.$gutterLayer.getRegion(c);if(o=="foldWidgets"){var i=c.getDocumentPosition().row,n=a.session;n.foldWidgets&&n.foldWidgets[i]&&a.session.onFoldWidgetClick(i,c),a.isFocused()||a.focus(),c.stop()}}),a.on("gutterdblclick",function(c){var o=a.renderer.$gutterLayer.getRegion(c);if(o=="foldWidgets"){var i=c.getDocumentPosition().row,n=a.session,t=n.getParentFoldRangeData(i,!0),e=t.range||t.firstRange;if(e){i=e.start.row;var r=n.getFoldAt(i,n.getLine(i).length,1);r?n.removeFold(r):(n.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}c.stop()}})}return S})();x.FoldHandler=M}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(E,x,z){var k=E("../lib/keys"),M=E("../lib/event"),S=(function(){function a(c){this.$editor=c,this.$data={editor:c},this.$handlers=[],this.setDefaultHandler(c.commands)}return a.prototype.setDefaultHandler=function(c){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=c,this.addKeyboardHandler(c,0)},a.prototype.setKeyboardHandler=function(c){var o=this.$handlers;if(o[o.length-1]!=c){for(;o[o.length-1]&&o[o.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(o[o.length-1]);this.addKeyboardHandler(c,1)}},a.prototype.addKeyboardHandler=function(c,o){if(c){typeof c=="function"&&!c.handleKeyboard&&(c.handleKeyboard=c);var i=this.$handlers.indexOf(c);i!=-1&&this.$handlers.splice(i,1),o==null?this.$handlers.push(c):this.$handlers.splice(o,0,c),i==-1&&c.attach&&c.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(c){var o=this.$handlers.indexOf(c);return o==-1?!1:(this.$handlers.splice(o,1),c.detach&&c.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var c=this.$data,o=c.editor;return this.$handlers.map(function(i){return i.getStatusText&&i.getStatusText(o,c)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(c,o,i,n){for(var t,e=!1,r=this.$editor.commands,s=this.$handlers.length;s--&&(t=this.$handlers[s].handleKeyboard(this.$data,c,o,i,n),!(!(!t||!t.command)&&(t.command=="null"?e=!0:e=r.exec(t.command,this.$editor,t.args,n),e&&n&&c!=-1&&t.passEvent!=!0&&t.command.passEvent!=!0&&M.stopEvent(n),e))););return!e&&c==-1&&(t={command:"insertstring"},e=r.exec("insertstring",this.$editor,o)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",t),e},a.prototype.onCommandKey=function(c,o,i){var n=k.keyCodeToString(i);return this.$callKeyboardHandlers(o,n,i,c)},a.prototype.onTextInput=function(c){return this.$callKeyboardHandlers(-1,c)},a})();x.KeyBinding=S}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(E,x,z){var k=0,M=0,S=!1,a=!1,c=!1,o=[[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]],i=[[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]],n=0,t=1,e=0,r=1,s=2,l=3,u=4,b=5,m=6,g=7,d=8,$=9,T=10,A=11,C=12,w=13,f=14,p=15,h=16,v=17,y=18,L=[y,y,y,y,y,y,y,y,y,m,b,m,d,b,y,y,y,y,y,y,y,y,y,y,y,y,y,y,b,b,b,m,d,u,u,A,A,A,u,u,u,u,u,T,$,T,$,$,s,s,s,s,s,s,s,s,s,s,$,u,u,u,u,u,u,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,u,u,u,u,u,u,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,e,u,u,u,u,y,y,y,y,y,y,b,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,y,$,u,A,A,A,A,u,u,u,u,e,u,u,y,u,u,A,A,s,s,u,e,u,u,u,s,e,u,u,u,u,u],R=[d,d,d,d,d,d,d,d,d,d,d,y,y,y,e,r,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,d,b,w,f,p,h,v,$,A,A,A,A,A,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,$,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,u,d];function _(O,D,F,H){var P=k?i:o,U=null,j=null,V=null,Y=0,Z=null,oe=null,re=-1,q=null,ae=null,le=[];if(!H)for(q=0,H=[];q<F;q++)H[q]=W(O[q]);for(M=k,S=!1,a=!1,c=!1,ae=0;ae<F;ae++){if(U=Y,le[ae]=j=N(O,H,le,ae),Y=P[U][j],Z=Y&240,Y&=15,D[ae]=V=P[Y][5],Z>0)if(Z==16){for(q=re;q<ae;q++)D[q]=1;re=-1}else re=-1;if(oe=P[Y][6],oe)re==-1&&(re=ae);else if(re>-1){for(q=re;q<ae;q++)D[q]=V;re=-1}H[ae]==b&&(D[ae]=0),M|=V}if(c){for(q=0;q<F;q++)if(H[q]==m){D[q]=k;for(var ce=q-1;ce>=0&&H[ce]==d;ce--)D[ce]=k}}}function I(O,D,F){if(!(M<O)){if(O==1&&k==t&&!a){F.reverse();return}for(var H=F.length,P=0,U,j,V,Y;P<H;){if(D[P]>=O){for(U=P+1;U<H&&D[U]>=O;)U++;for(j=P,V=U-1;j<V;j++,V--)Y=F[j],F[j]=F[V],F[V]=Y;P=U}P++}}}function N(O,D,F,H){var P=D[H],U,j,V,Y;switch(P){case e:case r:S=!1;case u:case l:return P;case s:return S?l:s;case g:return S=!0,r;case d:return u;case $:return H<1||H+1>=D.length||(U=F[H-1])!=s&&U!=l||(j=D[H+1])!=s&&j!=l?u:(S&&(j=l),j==U?j:u);case T:return U=H>0?F[H-1]:b,U==s&&H+1<D.length&&D[H+1]==s?s:u;case A:if(H>0&&F[H-1]==s)return s;if(S)return u;for(Y=H+1,V=D.length;Y<V&&D[Y]==A;)Y++;return Y<V&&D[Y]==s?s:u;case C:for(V=D.length,Y=H+1;Y<V&&D[Y]==C;)Y++;if(Y<V){var Z=O[H],oe=Z>=1425&&Z<=2303||Z==64286;if(U=D[Y],oe&&(U==r||U==g))return r}return H<1||(U=D[H-1])==b?u:F[H-1];case b:return S=!1,a=!0,k;case m:return c=!0,u;case w:case f:case h:case v:case p:S=!1;case y:return u}}function W(O){var D=O.charCodeAt(0),F=D>>8;return F==0?D>191?e:L[D]:F==5?/[\u0591-\u05f4]/.test(O)?r:e:F==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(O)?C:/[\u0660-\u0669\u066b-\u066c]/.test(O)?l:D==1642?A:/[\u06f0-\u06f9]/.test(O)?s:g:F==32&&D<=8287?R[D&255]:F==254&&D>=65136?g:u}x.L=e,x.R=r,x.EN=s,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.RLE=7,x.DOT="·",x.doBidiReorder=function(O,D,F){if(O.length<2)return{};var H=O.split(""),P=new Array(H.length),U=new Array(H.length),j=[];k=F?t:n,_(H,j,H.length,D);for(var V=0;V<P.length;P[V]=V,V++);I(2,j,P),I(1,j,P);for(var V=0;V<P.length-1;V++)D[V]===l?j[V]=x.AN:j[V]===r&&(D[V]>g&&D[V]<w||D[V]===u||D[V]===y)?j[V]=x.ON_R:V>0&&H[V-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(H[V])&&(j[V-1]=j[V]=x.R_H,V++);H[H.length-1]===x.DOT&&(j[H.length-1]=x.B),H[0]===""&&(j[0]=x.RLE);for(var V=0;V<P.length;V++)U[V]=j[P[V]];return{logicalFromVisual:P,bidiLevels:U}},x.hasBidiCharacters=function(O,D){for(var F=!1,H=0;H<O.length;H++)D[H]=W(O.charAt(H)),!F&&(D[H]==r||D[H]==g||D[H]==l)&&(F=!0);return F},x.getVisualFromLogicalIdx=function(O,D){for(var F=0;F<D.logicalFromVisual.length;F++)if(D.logicalFromVisual[F]==O)return F;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(E,x,z){var k=E("./lib/bidiutil"),M=E("./lib/lang"),S=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=(function(){function c(o){this.session=o,this.bidiMap={},this.currentRow=null,this.bidiUtil=k,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=S.test(o.getValue())}return c.prototype.isBidiRow=function(o,i,n){return this.seenBidi?(o!==this.currentRow&&(this.currentRow=o,this.updateRowLine(i,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},c.prototype.onChange=function(o){this.seenBidi?this.currentRow=null:o.action=="insert"&&S.test(o.lines.join("\n"))&&(this.seenBidi=!0,this.currentRow=null)},c.prototype.getDocumentRow=function(){var o=0,i=this.session.$screenRowCache;if(i.length){var n=this.session.$getRowCacheIndex(i,this.currentRow);n>=0&&(o=this.session.$docRowCache[n])}return o},c.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var n,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-o-1),n===t);)t=n,o++;else o=this.currentRow;return o},c.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var n=o===this.session.getLength()-1,t=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[o];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[k.L],this.line=i<e.length?this.line.substring(e[i-1],e[i]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[i]),i==e.length&&(this.line+=this.showInvisibles?t:k.DOT))}else this.line+=this.showInvisibles?t:k.DOT;var r=this.session,s=0,l;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(u,b){return u===" "||r.isFullWidth(u.charCodeAt(0))?(l=u===" "?r.getScreenTabSize(b+s):2,s+=l-1,M.stringRepeat(k.DOT,l)):u}),this.isRtlDir&&(this.fontMetrics.$main.textContent=this.line.charAt(this.line.length-1)==k.DOT?this.line.substr(0,this.line.length-1):this.line,this.rtlLineOffset=this.contentWidth-this.fontMetrics.$main.getBoundingClientRect().width)},c.prototype.updateBidiMap=function(){var o=[];k.hasBidiCharacters(this.line,o)||this.isRtlDir?this.bidiMap=k.doBidiReorder(this.line,o,this.isRtlDir):this.bidiMap={}},c.prototype.markAsDirty=function(){this.currentRow=null},c.prototype.updateCharacterWidths=function(o){if(this.characterWidth!==o.$characterSize.width){this.fontMetrics=o;var i=this.characterWidth=o.$characterSize.width,n=o.$measureCharWidth("ה");this.charWidths[k.L]=this.charWidths[k.EN]=this.charWidths[k.ON_R]=i,this.charWidths[k.R]=this.charWidths[k.AN]=n,this.charWidths[k.R_H]=n*.45,this.charWidths[k.B]=this.charWidths[k.RLE]=0,this.currentRow=null}},c.prototype.setShowInvisibles=function(o){this.showInvisibles=o,this.currentRow=null},c.prototype.setEolChar=function(o){this.EOL=o},c.prototype.setContentWidth=function(o){this.contentWidth=o},c.prototype.isRtlLine=function(o){return this.$isRtl?!0:o!=null?this.session.getLine(o).charAt(0)==this.RLE:this.isRtlDir},c.prototype.setRtlDirection=function(o,i){for(var n=o.getCursorPosition(),t=o.selection.getSelectionAnchor().row;t<=n.row;t++)!i&&o.session.getLine(t).charAt(0)===o.session.$bidiHandler.RLE?o.session.doc.removeInLine(t,0,1):i&&o.session.getLine(t).charAt(0)!==o.session.$bidiHandler.RLE&&o.session.doc.insert({column:0,row:t},o.session.$bidiHandler.RLE)},c.prototype.getPosLeft=function(o){o-=this.wrapIndent;var i=this.line.charAt(0)===this.RLE?1:0,n=o>i?this.session.getOverwrite()?o:o-1:i,t=k.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&o<=i&&e[t]%2!==0&&t++;for(var s=0;s<t;s++)r+=this.charWidths[e[s]];return!this.session.getOverwrite()&&o>i&&e[t]%2===0&&(r+=this.charWidths[e[t]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},c.prototype.getSelections=function(o,i){var n=this.bidiMap,t=n.bidiLevels,e,r=[],s=0,l=Math.min(o,i)-this.wrapIndent,u=Math.max(o,i)-this.wrapIndent,b=!1,m=!1,g=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,$=0;$<t.length;$++)d=n.logicalFromVisual[$],e=t[$],b=d>=l&&d<u,b&&!m?g=s:!b&&m&&r.push({left:g,width:s-g}),s+=this.charWidths[e],m=b;if(b&&$===t.length&&r.push({left:g,width:s-g}),this.isRtlDir)for(var T=0;T<r.length;T++)r[T].left+=this.rtlLineOffset;return r},c.prototype.offsetToCol=function(n){this.isRtlDir&&(n-=this.rtlLineOffset);var i=0,n=Math.max(n,0),t=0,e=0,r=this.bidiMap.bidiLevels,s=this.charWidths[r[e]];for(this.wrapIndent&&(n-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n>t+s/2;){if(t+=s,e===r.length-1){s=0;break}s=this.charWidths[r[++e]]}return e>0&&r[e-1]%2!==0&&r[e]%2===0?(n<t&&e--,i=this.bidiMap.logicalFromVisual[e]):e>0&&r[e-1]%2===0&&r[e]%2!==0?i=1+(n>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===r.length-1&&s===0&&r[e-1]%2===0||!this.isRtlDir&&e===0&&r[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&r[e-1]%2!==0&&s!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},c})();x.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/lang"),S=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,c=(function(){function o(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(t){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,n){this.$isEmpty=!1,this.anchor.setPosition(i,n)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,n=this.lead;return i.row>n.row||i.row==n.row&&i.column>n.column},o.prototype.getRange=function(){var i=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,i):a.fromPoints(i,n)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(i,n){var t=n?i.end:i.start,e=n?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},o.prototype.$setSelection=function(i,n,t,e){if(!this.$silent){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,n),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),i.call(this)},o.prototype.selectTo=function(i,n){this.$moveSelection(function(){this.moveCursorTo(i,n)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,n){this.clearSelection(),this.moveCursorTo(i,n)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,n){if(typeof n>"u"){var t=i||this.lead;i=t.row,n=t.column}return this.session.getWordRange(i,n)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),n=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(n)},o.prototype.getLineRange=function(i,n){var t=typeof i=="number"?i:this.lead.row,e,r=this.session.getFoldLine(t);return r?(t=r.start.row,e=r.end.row):e=t,n===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,n,t){var e=i.column,r=i.column+n;return t<0&&(e=i.column-n,r=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,r).split(" ").length-1==n},o.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row<this.doc.getLength()-1&&this.moveCursorTo(this.lead.row+1,0);else{var t=this.session.getTabSize(),i=this.lead;this.wouldMoveIntoSoftTab(i,t,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,t):this.moveCursorBy(0,1)}},o.prototype.moveCursorLineStart=function(){var i=this.lead.row,n=this.lead.column,t=this.session.documentToScreenRow(i,n),e=this.session.screenToDocumentPosition(t,0),r=this.session.getDisplayLine(i,null,e.row,e.column),s=r.match(/^\s*/);s[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},o.prototype.moveCursorLineEnd=function(){var i=this.lead,n=this.session.getDocumentLastRowColumnPosition(i.row,i.column);if(this.lead.column==n.column){var t=this.session.getLine(n.row);if(n.column==t.length){var e=t.search(/\s+$/);e>0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,n=this.doc.getLine(i).length;this.moveCursorTo(i,n)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(i,n,1);if(r){this.moveCursorTo(r.end.row,r.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(n)),n>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},o.prototype.moveCursorLongWordLeft=function(){var i=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(i,n,-1)){this.moveCursorTo(t.start.row,t.start.column);return}var e=this.session.getFoldStringAt(i,n,-1);e==null&&(e=this.doc.getLine(i).substring(0,n));var r=M.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(r)&&(n-=this.session.nonTokenRe.lastIndex,r=r.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(i,0),this.moveCursorLeft(),i>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},o.prototype.$shortWordEndIndex=function(i){var n=0,t,e=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(i))n=this.session.tokenRe.lastIndex;else{for(;(t=i[n])&&e.test(t);)n++;if(n<1){for(r.lastIndex=0;(t=i[n])&&!r.test(t);)if(r.lastIndex=0,n++,e.test(t))if(n>2){n--;break}else{for(;(t=i[n])&&e.test(t);)n++;if(n>2)break}}}return r.lastIndex=0,n},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n),r=this.session.getFoldAt(i,n,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(n==t.length){var s=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),n=0}var l=this.$shortWordEndIndex(e);this.moveCursorTo(i,n+l)},o.prototype.moveCursorShortWordLeft=function(){var i=this.lead.row,n=this.lead.column,t;if(t=this.session.getFoldAt(i,n,-1))return this.moveCursorTo(t.start.row,t.start.column);var e=this.session.getLine(i).substring(0,n);if(n===0){do i--,e=this.doc.getLine(i);while(i>0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var r=M.stringReverse(e),s=this.$shortWordEndIndex(r);return this.moveCursorTo(i,n-s)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(i,n){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];i<0?i-=r.rowsAbove||0:i>0&&(i+=r.rowCount-(r.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&n===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+n,n===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.prototype.moveCursorTo=function(i,n,t){var e=this.session.getFoldAt(i,n,1);e&&(i=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(r.charAt(n))&&r.charAt(n-1)&&(this.lead.row==i&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(i,n),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(i,n,t){var e=this.session.screenToDocumentPosition(i,n);this.moveCursorTo(e.row,e.column,t)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(i){var n=this.getRange();return i?(i.start.column=n.start.column,i.start.row=n.start.row,i.end.column=n.end.column,i.end.row=n.end.row):i=n,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},o.prototype.getRangeOfMovements=function(i){var n=this.getCursor();try{i(this);var t=this.getCursor();return a.fromPoints(n,t)}catch(e){return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},o.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},o.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var n=i.length;n--;){var t=a.fromPoints(i[n].start,i[n].end);i[n].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},o.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(i[n]))return!1;return!0},o})();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,k.implement(c.prototype,S),x.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(E,x,z){var k=E("./lib/report_error").reportError,M=2e3,S=(function(){function a(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],n=[],t=0,e=this.matchMappings[o]={defaultToken:"text"},r="g",s=[],l=0;l<i.length;l++){var u=i[l];if(u.defaultToken&&(e.defaultToken=u.defaultToken),u.caseInsensitive&&r.indexOf("i")===-1&&(r+="i"),u.unicode&&r.indexOf("u")===-1&&(r+="u"),u.regex!=null){u.regex instanceof RegExp&&(u.regex=u.regex.toString().slice(1,-1));var b=u.regex,m=new RegExp("(?:("+b+")|(.))").exec("a").length-2;Array.isArray(u.token)?u.token.length==1||m==1?u.token=u.token[0]:m-1!=u.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:u,groupCount:m-1}),u.token=u.token[0]):(u.tokenArray=u.token,u.token=null,u.onMatch=this.$arrayTokens):typeof u.token=="function"&&!u.onMatch&&(m>1?u.onMatch=this.$applyToken:u.onMatch=u.token),m>1&&(/\\\d/.test(u.regex)?b=u.regex.replace(/\\([0-9]+)/g,function(g,d){return"\\"+(parseInt(d,10)+t+1)}):(m=1,b=this.removeCapturingGroups(u.regex)),!u.splitRegex&&typeof u.token!="string"&&s.push(u)),e[t]=l,t+=m,n.push(b),u.onMatch||(u.onMatch=null)}}n.length||(e[0]=0,n.push("$")),s.forEach(function(g){g.splitRegex=this.createSplitterRegexp(g.regex,r)},this),this.regExps[o]=new RegExp("("+n.join(")|(")+")|($)",r)}}return a.prototype.$setMaxTokenCount=function(c){M=c|0},a.prototype.$applyToken=function(c){var o=this.splitRegex.exec(c).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:c}];for(var n=[],t=0,e=i.length;t<e;t++)o[t]&&(n[n.length]={type:i[t],value:o[t]});return n},a.prototype.$arrayTokens=function(c){if(!c)return[];var o=this.splitRegex.exec(c);if(!o)return"text";for(var i=[],n=this.tokenArray,t=0,e=n.length;t<e;t++)o[t+1]&&(i[i.length]={type:n[t],value:o[t+1]});return i},a.prototype.removeCapturingGroups=function(c){var o=c.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(i,n){return n?"(?:":i});return o},a.prototype.createSplitterRegexp=function(c,o){if(c.indexOf("(?=")!=-1){var i=0,n=!1,t={};c.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,r,s,l,u,b){return n?n=u!="]":u?n=!0:l?(i==t.stack&&(t.end=b+1,t.stack=-1),i--):s&&(i++,s.length!=1&&(t.stack=i,t.start=b)),e}),t.end!=null&&/^\)*$/.test(c.substr(t.end))&&(c=c.substring(0,t.start)+c.substr(t.end))}return c.charAt(0)!="^"&&(c="^"+c),c.charAt(c.length-1)!="$"&&(c+="$"),new RegExp(c,(o||"").replace("g",""))},a.prototype.getLineTokens=function(c,o){if(o&&typeof o!="string"){var i=o.slice(0);o=i[0],o==="#tmp"&&(i.shift(),o=i.shift())}else var i=[];var n=o||"start",t=this.states[n];t||(n="start",t=this.states[n]);var e=this.matchMappings[n],r=this.regExps[n];r.lastIndex=0;for(var s,l=[],u=0,b=0,m={type:null,value:""};s=r.exec(c);){var g=e.defaultToken,d=null,$=s[0],T=r.lastIndex;if(T-$.length>u){var A=c.substring(u,T-$.length);m.type==g?m.value+=A:(m.type&&l.push(m),m={type:g,value:A})}for(var C=0;C<s.length-2;C++)if(s[C+1]!==void 0){d=t[e[C]],d.onMatch?g=d.onMatch($,n,i,c):g=d.token,d.next&&(typeof d.next=="string"?n=d.next:n=d.next(n,i),t=this.states[n],t||(this.reportError("state doesn't exist",n),n="start",t=this.states[n]),e=this.matchMappings[n],u=T,r=this.regExps[n],r.lastIndex=T),d.consumeLineEnd&&(u=T);break}if($){if(typeof g=="string")(!d||d.merge!==!1)&&m.type===g?m.value+=$:(m.type&&l.push(m),m={type:g,value:$});else if(g){m.type&&l.push(m),m={type:null,value:""};for(var C=0;C<g.length;C++)l.push(g[C])}}if(u==c.length)break;if(u=T,b++>M){for(b>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:c});u<c.length;)m.type&&l.push(m),m={value:c.substring(u,u+=500),type:"overflow"};n="start",i=[];break}}return m.type&&l.push(m),i.length>1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:l,state:i.length?i:n}},a})();S.prototype.reportError=k,x.Tokenizer=S}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(E,x,z){var k=E("../lib/deep_copy").deepCopy,M;M=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(c,o){if(!o){for(var i in c)this.$rules[i]=c[i];return}for(var i in c){for(var n=c[i],t=0;t<n.length;t++){var e=n[t];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(o)!==0&&(e.next=o+e.next),e.nextState&&e.nextState.indexOf(o)!==0&&(e.nextState=o+e.nextState))}this.$rules[o+i]=n}},this.getRules=function(){return this.$rules},this.embedRules=function(c,o,i,n,t){var e=typeof c=="function"?new c().getRules():c;if(n)for(var r=0;r<n.length;r++)n[r]=o+n[r];else{n=[];for(var s in e)n.push(o+s)}if(this.addRules(e,o),i)for(var l=Array.prototype[t?"push":"unshift"],r=0;r<n.length;r++)l.apply(this.$rules[n[r]],k(i));this.$embeds||(this.$embeds=[]),this.$embeds.push(o)},this.getEmbeds=function(){return this.$embeds};var S=function(c,o){return(c!="start"||o.length)&&o.unshift(this.nextState,c),this.nextState},a=function(c,o){return o.shift(),o.shift()||"start"};this.normalizeRules=function(){var c=0,o=this.$rules;function i(n){var t=o[n];t.processed=!0;for(var e=0;e<t.length;e++){var r=t[e],s=null;Array.isArray(r)&&(s=r,r={}),!r.regex&&r.start&&(r.regex=r.start,r.next||(r.next=[]),r.next.push({defaultToken:r.token},{token:r.token+".end",regex:r.end||r.start,next:"pop"}),r.token=r.token+".start",r.push=!0);var l=r.next||r.push;if(l&&Array.isArray(l)){var u=r.stateName;u||(u=r.token,typeof u!="string"&&(u=u[0]||""),o[u]&&(u+=c++)),o[u]=l,r.next=u,i(u)}else l=="pop"&&(r.next=a);if(r.push&&(r.nextState=r.next||r.push,r.next=S,delete r.push),r.rules)for(var b in r.rules)o[b]?o[b].push&&o[b].push.apply(o[b],r.rules[b]):o[b]=r.rules[b];var m=typeof r=="string"?r:r.include;if(m&&(m==="$self"&&(m="start"),Array.isArray(m)?s=m.map(function(d){return o[d]}):s=o[m]),s){var g=[e,1].concat(s);r.noEscape&&(g=g.filter(function(d){return!d.next})),t.splice.apply(t,g),e--}r.keywordMap&&(r.token=this.createKeywordMapper(r.keywordMap,r.defaultToken||"text",r.caseInsensitive),delete r.defaultToken)}}Object.keys(o).forEach(i,this)},this.createKeywordMapper=function(c,o,i,n){var t=Object.create(null);return this.$keywordList=[],Object.keys(c).forEach(function(e){for(var r=c[e],s=r.split(n||"|"),l=s.length;l--;){var u=s[l];this.$keywordList.push(u),i&&(u=u.toLowerCase()),t[u]=e}},this),c=null,i?function(e){return t[e.toLowerCase()]||o}:function(e){return t[e]||o}},this.getKeywords=function(){return this.$keywords}}).call(M.prototype),x.TextHighlightRules=M}),ace.define("ace/mode/behaviour",["require","exports","module"],function(E,x,z){var k;k=function(){this.$behaviours={}},(function(){this.add=function(M,S,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[M]:this.$behaviours[M]={}}this.$behaviours[M][S]=a},this.addBehaviours=function(M){for(var S in M)for(var a in M[S])this.add(S,a,M[S][a])},this.remove=function(M){this.$behaviours&&this.$behaviours[M]&&delete this.$behaviours[M]},this.inherit=function(M,S){if(typeof M=="function")var a=new M().getBehaviours(S);else var a=M.getBehaviours(S);this.addBehaviours(a)},this.getBehaviours=function(M){if(M){for(var S={},a=0;a<M.length;a++)this.$behaviours[M[a]]&&(S[M[a]]=this.$behaviours[M[a]]);return S}else return this.$behaviours}}).call(k.prototype),x.Behaviour=k}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(E,x,z){var k=E("./range").Range,M=(function(){function S(a,c,o){this.$session=a,this.$row=c,this.$rowTokens=a.getTokens(c);var i=a.getTokenAt(c,o);this.$tokenIndex=i?i.index:-1}return S.prototype.stepBackward=function(){for(this.$tokenIndex-=1;this.$tokenIndex<0;){if(this.$row-=1,this.$row<0)return this.$row=0,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=this.$rowTokens.length-1}return this.$rowTokens[this.$tokenIndex]},S.prototype.stepForward=function(){this.$tokenIndex+=1;for(var a;this.$tokenIndex>=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},S.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},S.prototype.getCurrentTokenRow=function(){return this.$row},S.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,o=a[c].start;if(o!==void 0)return o;for(o=0;c>0;)c-=1,o+=a[c].value.length;return o},S.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},S.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new k(this.$row,c,this.$row,c+a.value.length)},S})();x.TokenIterator=M}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(E,x,z){var k=E("../../lib/oop"),M=E("../behaviour").Behaviour,S=E("../../token_iterator").TokenIterator,a=E("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},t={'"':'"',"'":"'"},e=function(l){var u=-1;if(l.multiSelect&&(u=l.selection.index,n.rangeCount!=l.multiSelect.rangeCount&&(n={rangeCount:l.multiSelect.rangeCount})),n[u])return i=n[u];i=n[u]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},r=function(l,u,b,m){var g=l.end.row-l.start.row;return{text:b+u+m,selection:[0,l.start.column+1,g,l.end.column+(g?0:1)]}},s;s=function(l){l=l||{},this.add("braces","insertion",function(u,b,m,g,d){var $=m.getCursorPosition(),T=g.doc.getLine($.row);if(d=="{"){e(m);var A=m.getSelectionRange(),C=g.doc.getTextRange(A),w=g.getTokenAt($.row,$.column);if(C!==""&&C!=="{"&&m.getWrapBehavioursEnabled())return r(A,C,"{","}");if(w&&/(?:string)\.quasi|\.xml/.test(w.type)){var f=[/tag\-(?:open|name)/,/attribute\-name/];return f.some(function(_){return _.test(w.type)})||/(string)\.quasi/.test(w.type)&&w.value[$.column-w.start-1]!=="$"?void 0:(s.recordAutoInsert(m,g,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(m,g))return/[\]\}\)]/.test(T[$.column])||m.inMultiSelectMode||l.braces?(s.recordAutoInsert(m,g,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(m,g,"{"),{text:"{",selection:[1,1]})}else if(d=="}"){e(m);var p=T.substring($.column,$.column+1);if(p=="}"){var h=g.$findOpeningBracket("}",{column:$.column+1,row:$.row});if(h!==null&&s.isAutoInsertedClosing($,T,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(d=="\n"||d=="\r\n"){e(m);var v="";s.isMaybeInsertedClosing($,T)&&(v=a.stringRepeat("}",i.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var p=T.substring($.column,$.column+1);if(p==="}"){var y=g.findMatchingBracket({row:$.row,column:$.column+1},"}");if(!y)return null;var L=this.$getIndent(g.getLine(y.row))}else if(v)var L=this.$getIndent(T);else{s.clearMaybeInsertedClosing();return}var R=L+g.getTabString();return{text:"\n"+R+"\n"+L+v,selection:[1,R.length,1,R.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(u,b,m,g,d){var $=g.doc.getTextRange(d);if(!d.isMultiLine()&&$=="{"){e(m);var T=g.doc.getLine(d.start.row),A=T.substring(d.end.column,d.end.column+1);if(A=="}")return d.end.column++,d;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(u,b,m,g,d){if(d=="("){e(m);var $=m.getSelectionRange(),T=g.doc.getTextRange($);if(T!==""&&m.getWrapBehavioursEnabled())return r($,T,"(",")");if(s.isSaneInsertion(m,g))return s.recordAutoInsert(m,g,")"),{text:"()",selection:[1,1]}}else if(d==")"){e(m);var A=m.getCursorPosition(),C=g.doc.getLine(A.row),w=C.substring(A.column,A.column+1);if(w==")"){var f=g.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(f!==null&&s.isAutoInsertedClosing(A,C,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(u,b,m,g,d){var $=g.doc.getTextRange(d);if(!d.isMultiLine()&&$=="("){e(m);var T=g.doc.getLine(d.start.row),A=T.substring(d.start.column+1,d.start.column+2);if(A==")")return d.end.column++,d}}),this.add("brackets","insertion",function(u,b,m,g,d){if(d=="["){e(m);var $=m.getSelectionRange(),T=g.doc.getTextRange($);if(T!==""&&m.getWrapBehavioursEnabled())return r($,T,"[","]");if(s.isSaneInsertion(m,g))return s.recordAutoInsert(m,g,"]"),{text:"[]",selection:[1,1]}}else if(d=="]"){e(m);var A=m.getCursorPosition(),C=g.doc.getLine(A.row),w=C.substring(A.column,A.column+1);if(w=="]"){var f=g.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(f!==null&&s.isAutoInsertedClosing(A,C,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(u,b,m,g,d){var $=g.doc.getTextRange(d);if(!d.isMultiLine()&&$=="["){e(m);var T=g.doc.getLine(d.start.row),A=T.substring(d.start.column+1,d.start.column+2);if(A=="]")return d.end.column++,d}}),this.add("string_dquotes","insertion",function(u,b,m,g,d){var $=g.$mode.$quotes||t;if(d.length==1&&$[d]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(d)!=-1)return;e(m);var T=d,A=m.getSelectionRange(),C=g.doc.getTextRange(A);if(C!==""&&(C.length!=1||!$[C])&&m.getWrapBehavioursEnabled())return r(A,C,T,T);if(!C){var w=m.getCursorPosition(),f=g.doc.getLine(w.row),p=f.substring(w.column-1,w.column),h=f.substring(w.column,w.column+1),v=g.getTokenAt(w.row,w.column),y=g.getTokenAt(w.row,w.column+1);if(p=="\\"&&v&&/escape/.test(v.type))return null;var L=v&&/string|escape/.test(v.type),R=!y||/string|escape/.test(y.type),_;if(h==T)_=L!==R,_&&/string\.end/.test(y.type)&&(_=!1);else{if(L&&!R||L&&R)return null;var I=g.$mode.tokenRe;I.lastIndex=0;var N=I.test(p);I.lastIndex=0;var W=I.test(h),O=g.$mode.$pairQuotesAfter,D=O&&O[T]&&O[T].test(p);if(!D&&N||W||h&&!/[\s;,.})\]\\]/.test(h))return null;var F=f[w.column-2];if(p==T&&(F==T||I.test(F)))return null;_=!0}return{text:_?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(u,b,m,g,d){var $=g.$mode.$quotes||t,T=g.doc.getTextRange(d);if(!d.isMultiLine()&&$.hasOwnProperty(T)){e(m);var A=g.doc.getLine(d.start.row),C=A.substring(d.start.column+1,d.start.column+2);if(C==T)return d.end.column++,d}}),l.closeDocComment!==!1&&this.add("doc comment end","insertion",function(u,b,m,g,d){if(u==="doc-start"&&(d==="\n"||d==="\r\n")&&m.selection.isEmpty()){var $=m.getCursorPosition();if($.column===0)return;for(var T=g.doc.getLine($.row),A=g.doc.getLine($.row+1),C=g.getTokens($.row),w=0,f=0;f<C.length;f++){w+=C[f].value.length;var p=C[f];if(w>=$.column){if(w===$.column){if(!/\.doc/.test(p.type))return;if(/\*\//.test(p.value)){var h=C[f+1];if(!h||!/\.doc/.test(h.type))return}}var v=$.column-(w-p.value.length),y=p.value.indexOf("*/"),L=p.value.indexOf("/**",y>-1?y+2:0);if(L!==-1&&v>L&&v<L+3||y!==-1&&L!==-1&&v>=y&&v<=L||!/\.doc/.test(p.type))return;break}}var R=this.$getIndent(T);if(/\s*\*/.test(A))return/^\s*\*/.test(T)?{text:d+R+"* ",selection:[1,2+R.length,1,2+R.length]}:{text:d+R+" * ",selection:[1,3+R.length,1,3+R.length]};if(/\/\*\*/.test(T.substring(0,$.column)))return{text:d+R+" * "+d+" "+R+"*/",selection:[1,4+R.length,1,4+R.length]}}})},s.isSaneInsertion=function(l,u){var b=l.getCursorPosition(),m=new S(u,b.row,b.column);if(!this.$matchTokenType(m.getCurrentToken()||"text",c)){if(/[)}\]]/.test(l.session.getLine(b.row)[b.column]))return!0;var g=new S(u,b.row,b.column+1);if(!this.$matchTokenType(g.getCurrentToken()||"text",c))return!1}return m.stepForward(),m.getCurrentTokenRow()!==b.row||this.$matchTokenType(m.getCurrentToken()||"text",o)},s.$matchTokenType=function(l,u){return u.indexOf(l.type||l)>-1},s.recordAutoInsert=function(l,u,b){var m=l.getCursorPosition(),g=u.doc.getLine(m.row);this.isAutoInsertedClosing(m,g,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=m.row,i.autoInsertedLineEnd=b+g.substr(m.column),i.autoInsertedBrackets++},s.recordMaybeInsert=function(l,u,b){var m=l.getCursorPosition(),g=u.doc.getLine(m.row);this.isMaybeInsertedClosing(m,g)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=m.row,i.maybeInsertedLineStart=g.substr(0,m.column)+b,i.maybeInsertedLineEnd=g.substr(m.column),i.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(l,u,b){return i.autoInsertedBrackets>0&&l.row===i.autoInsertedRow&&b===i.autoInsertedLineEnd[0]&&u.substr(l.column)===i.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(l,u){return i.maybeInsertedBrackets>0&&l.row===i.maybeInsertedRow&&u.substr(l.column)===i.maybeInsertedLineEnd&&u.substr(0,l.column)==i.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},k.inherits(s,M),x.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(E,x,z){for(var k=[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],M=0,S=[],a=0;a<k.length;a+=2)S.push(M+=k[a]),k[a+1]&&S.push(45,M+=k[a+1]);x.wordChars=String.fromCharCode.apply(null,S)}),ace.define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(E,x,z){var k=E("../config"),M=E("../tokenizer").Tokenizer,S=E("./text_highlight_rules").TextHighlightRules,a=E("./behaviour/cstyle").CstyleBehaviour,c=E("../unicode"),o=E("../lib/lang"),i=E("../token_iterator").TokenIterator,n=E("../range").Range,t;t=function(){this.HighlightRules=S},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+c.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+c.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new M(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,r,s,l){var u=r.doc,b=!0,m=!0,g=1/0,d=r.getTabSize(),$=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var C=this.lineCommentStart.map(o.escapeRegExp).join("|"),T=this.lineCommentStart[0];else var C=o.escapeRegExp(this.lineCommentStart),T=this.lineCommentStart;C=new RegExp("^(\\s*)(?:"+C+") ?"),$=r.getUseSoftTabs();var p=function(W,O){var D=W.match(C);if(D){var F=D[1].length,H=D[0].length;!y(W,F,H)&&D[0][H-1]==" "&&H--,u.removeInLine(O,F,H)}},v=T+" ",f=function(W,O){(!b||/\S/.test(W))&&(y(W,g,g)?u.insertInLine({row:O,column:g},v):u.insertInLine({row:O,column:g},T))},h=function(W,O){return C.test(W)},y=function(W,O,D){for(var F=0;O--&&W.charAt(O)==" ";)F++;if(F%d!=0)return!1;for(var F=0;W.charAt(D++)==" ";)F++;return d>2?F%d!=d-1:F%d==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,A=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+o.escapeRegExp(T)+")"),w=new RegExp("(?:"+o.escapeRegExp(A)+")\\s*$"),f=function(_,I){h(_,I)||(!b||/\S/.test(_))&&(u.insertInLine({row:I,column:_.length},A),u.insertInLine({row:I,column:g},T))},p=function(_,I){var N;(N=_.match(w))&&u.removeInLine(I,_.length-N[0].length,_.length),(N=_.match(C))&&u.removeInLine(I,N[1].length,N[0].length)},h=function(_,I){if(C.test(_))return!0;for(var N=r.getTokens(I),W=0;W<N.length;W++)if(N[W].type==="comment")return!0}}function L(_){for(var I=s;I<=l;I++)_(u.getLine(I),I)}var R=1/0;L(function(_,I){var N=_.search(/\S/);N!==-1?(N<g&&(g=N),m&&!h(_,I)&&(m=!1)):R>_.length&&(R=_.length)}),g==1/0&&(g=R,b=!1,m=!1),$&&g%d!=0&&(g=Math.floor(g/d)*d),L(m?p:f)},this.toggleBlockComment=function(e,r,s,l){var u=this.blockComment;if(u){!u.start&&u[0]&&(u=u[0]);var b=new i(r,l.row,l.column),m=b.getCurrentToken();r.selection;var g=r.selection.toOrientedRange(),d,$;if(m&&/comment/.test(m.type)){for(var T,A;m&&/comment/.test(m.type);){var C=m.value.indexOf(u.start);if(C!=-1){var w=b.getCurrentTokenRow(),f=b.getCurrentTokenColumn()+C;T=new n(w,f,w,f+u.start.length);break}m=b.stepBackward()}for(var b=new i(r,l.row,l.column),m=b.getCurrentToken();m&&/comment/.test(m.type);){var C=m.value.indexOf(u.end);if(C!=-1){var w=b.getCurrentTokenRow(),f=b.getCurrentTokenColumn()+C;A=new n(w,f,w,f+u.end.length);break}m=b.stepForward()}A&&r.remove(A),T&&(r.remove(T),d=T.start.row,$=-u.start.length)}else $=u.start.length,d=s.start.row,r.insert(s.end,u.end),r.insert(s.start,u.start);g.start.row==d&&(g.start.column+=$),g.end.row==d&&(g.end.column+=$),r.selection.fromOrientedRange(g)}},this.getNextLineIndent=function(e,r,s){return this.$getIndent(r)},this.checkOutdent=function(e,r,s){return!1},this.autoOutdent=function(e,r,s){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var r in e)if(e[r]){var s=e[r],l=s.prototype.$id,u=k.$modes[l];u||(k.$modes[l]=u=new s),k.$modes[r]||(k.$modes[r]=u),this.$embeds.push(r),this.$modes[r]=u}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=function(d){(function($){var T=b[d],A=$[T];$[b[d]]=function(){return this.$delegator(T,arguments,A)}})(g)},g=this,r=0;r<b.length;r++)m(r)},this.$delegator=function(e,r,s){var l=r[0]||"start";if(typeof l!="string"){if(Array.isArray(l[2])){var u=l[2][l[2].length-1],b=this.$modes[u];if(b)return b[e].apply(b,[l[1]].concat([].slice.call(r,1)))}l=l[0]||"start"}for(var m=0;m<this.$embeds.length;m++)if(this.$modes[this.$embeds[m]]){var g=l.split(this.$embeds[m]);if(!g[0]&&g[1]){r[0]=g[1];var b=this.$modes[this.$embeds[m]];return b[e].apply(b,r)}}var d=s.apply(this,r);return s?d:void 0},this.transformAction=function(e,r,s,l,u){if(this.$behaviour){var b=this.$behaviour.getBehaviours();for(var m in b)if(b[m][r]){var g=b[m][r].apply(this,arguments);if(g)return g}}},this.getKeywords=function(e){if(!this.completionKeywords){var r=this.$tokenizer.rules,s=[];for(var l in r)for(var u=r[l],b=0,m=u.length;b<m;b++)if(typeof u[b].token=="string")/keyword|support|storage/.test(u[b].token)&&s.push(u[b].regex);else if(typeof u[b].token=="object"){for(var g=0,d=u[b].token.length;g<d;g++)if(/keyword|support|storage/.test(u[b].token[g])){var l=u[b].regex.match(/\(.+?\)/g)[g];s.push(l.substr(1,l.length-2))}}this.completionKeywords=s}return e?s.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(e,r,s,l){var u=this.$keywordList||this.$createKeywordList();return u.map(function(b){return{name:b,value:b,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(t.prototype),x.Mode=t}),ace.define("ace/apply_delta",["require","exports","module"],function(E,x,z){x.applyDelta=function(k,M,S){var a=M.start.row,c=M.start.column,o=k[a]||"";switch(M.action){case"insert":var i=M.lines;if(i.length===1)k[a]=o.substring(0,c)+M.lines[0]+o.substring(c);else{var n=[a,1].concat(M.lines);k.splice.apply(k,n),k[a]=o.substring(0,c)+k[a],k[a+M.lines.length-1]+=o.substring(c)}break;case"remove":var t=M.end.column,e=M.end.row;a===e?k[a]=o.substring(0,c)+o.substring(t):k.splice(a,e-a+1,o.substring(0,c)+k[e].substring(t));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/event_emitter").EventEmitter,S=(function(){function o(i,n,t){this.$onChange=this.onChange.bind(this),this.attach(i),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,t)}return o.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},o.prototype.getDocument=function(){return this.document},o.prototype.onChange=function(i){if(!(i.start.row==i.end.row&&i.start.row!=this.row)&&!(i.start.row>this.row)){var n=c(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},o.prototype.setPosition=function(i,n,t){var e;if(t?e={row:i,column:n}:e=this.$clipPositionToDocument(i,n),!(this.row==e.row&&this.column==e.column)){var r={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:r,value:e})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(i,n){var t={};return i>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):i<0?(t.row=0,t.column=0):(t.row=i,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,n))),n<0&&(t.column=0),t},o})();S.prototype.$insertRight=!1,k.implement(S.prototype,M);function a(o,i,n){var t=n?o.column<=i.column:o.column<i.column;return o.row<i.row||o.row==i.row&&t}function c(o,i,n){var t=o.action=="insert",e=(t?1:-1)*(o.end.row-o.start.row),r=(t?1:-1)*(o.end.column-o.start.column),s=o.start,l=t?s:o.end;return a(i,s,n)?{row:i.row,column:i.column}:a(l,i,!n)?{row:i.row+e,column:i.column+(i.row==l.row?r:0)}:{row:s.row,column:s.column}}x.Anchor=S}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(E,x,z){var k=E("./lib/oop"),M=E("./apply_delta").applyDelta,S=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,c=E("./anchor").Anchor,o=(function(){function i(n){this.$lines=[""],n.length===0?this.$lines=[""]:Array.isArray(n)?this.insertMergedLines({row:0,column:0},n):this.insert({row:0,column:0},n)}return i.prototype.setValue=function(n){var t=this.getLength()-1;this.remove(new a(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},n||"")},i.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},i.prototype.createAnchor=function(n,t){return new c(this,n,t)},i.prototype.$detectNewLine=function(n){var t=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},i.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},i.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},i.prototype.getNewLineMode=function(){return this.$newLineMode},i.prototype.isNewLine=function(n){return n=="\r\n"||n=="\r"||n=="\n"},i.prototype.getLine=function(n){return this.$lines[n]||""},i.prototype.getLines=function(n,t){return this.$lines.slice(n,t+1)},i.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},i.prototype.getLength=function(){return this.$lines.length},i.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},i.prototype.getLinesForRange=function(n){var t;if(n.start.row===n.end.row)t=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{t=this.getLines(n.start.row,n.end.row),t[0]=(t[0]||"").substring(n.start.column);var e=t.length-1;n.end.row-n.start.row==e&&(t[e]=t[e].substring(0,n.end.column))}return t},i.prototype.insertLines=function(n,t){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,t)},i.prototype.removeLines=function(n,t){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,t)},i.prototype.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])},i.prototype.insert=function(n,t){return this.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(n,this.$split(t))},i.prototype.insertInLine=function(n,t){var e=this.clippedPos(n.row,n.column),r=this.pos(n.row,n.column+t.length);return this.applyDelta({start:e,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},i.prototype.clippedPos=function(n,t){var e=this.getLength();n===void 0?n=e:n<0?n=0:n>=e&&(n=e-1,t=void 0);var r=this.getLine(n);return t==null&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:n,column:t}},i.prototype.clonePos=function(n){return{row:n.row,column:n.column}},i.prototype.pos=function(n,t){return{row:n,column:t}},i.prototype.$clipPosition=function(n){var t=this.getLength();return n.row>=t?(n.row=Math.max(0,t-1),n.column=this.getLine(t-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},i.prototype.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var e=0;n<this.getLength()?(t=t.concat([""]),e=0):(t=[""].concat(t),n--,e=this.$lines[n].length),this.insertMergedLines({row:n,column:e},t)},i.prototype.insertMergedLines=function(n,t){var e=this.clippedPos(n.row,n.column),r={row:e.row+t.length-1,column:(t.length==1?e.column:0)+t[t.length-1].length};return this.applyDelta({start:e,end:r,action:"insert",lines:t}),this.clonePos(r)},i.prototype.remove=function(n){var t=this.clippedPos(n.start.row,n.start.column),e=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:t,end:e,action:"remove",lines:this.getLinesForRange({start:t,end:e})}),this.clonePos(t)},i.prototype.removeInLine=function(n,t,e){var r=this.clippedPos(n,t),s=this.clippedPos(n,e);return this.applyDelta({start:r,end:s,action:"remove",lines:this.getLinesForRange({start:r,end:s})},!0),this.clonePos(r)},i.prototype.removeFullLines=function(n,t){n=Math.min(Math.max(0,n),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);var e=t==this.getLength()-1&&n>0,r=t<this.getLength()-1,s=e?n-1:n,l=e?this.getLine(s).length:0,u=r?t+1:t,b=r?0:this.getLine(u).length,m=new a(s,l,u,b),g=this.$lines.slice(n,t+1);return this.applyDelta({start:m.start,end:m.end,action:"remove",lines:this.getLinesForRange(m)}),g},i.prototype.removeNewLine=function(n){n<this.getLength()-1&&n>=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(n,t){if(n instanceof a||(n=a.fromPoints(n.start,n.end)),t.length===0&&n.isEmpty())return n.start;if(t==this.getTextRange(n))return n.end;this.remove(n);var e;return t?e=this.insert(n.start,t):e=n.start,e},i.prototype.applyDeltas=function(n){for(var t=0;t<n.length;t++)this.applyDelta(n[t])},i.prototype.revertDeltas=function(n){for(var t=n.length-1;t>=0;t--)this.revertDelta(n[t])},i.prototype.applyDelta=function(n,t){var e=n.action=="insert";(e?n.lines.length<=1&&!n.lines[0]:!a.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(M(this.$lines,n,t),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row<t&&n.end.row<t||n.action=="insert"&&n.start.row<=t)&&this.applyDelta(n)},i.prototype.$splitAndapplyLargeDelta=function(n,t){for(var e=n.lines,r=e.length-t+1,s=n.start.row,l=n.start.column,u=0,b=0;u<r;u=b){b+=t-1;var m=e.slice(u,b);m.push(""),this.applyDelta({start:this.pos(s+u,l),end:this.pos(s+b,l=0),action:n.action,lines:m},!0)}n.lines=e.slice(u),n.start.row=s+u,n.start.column=l,this.applyDelta(n,!0)},i.prototype.revertDelta=function(n){this.$safeApplyDelta({start:this.clonePos(n.start),end:this.clonePos(n.end),action:n.action=="insert"?"remove":"insert",lines:n.lines.slice()})},i.prototype.indexToPosition=function(n,t){for(var e=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,s=t||0,l=e.length;s<l;s++)if(n-=e[s].length+r,n<0)return{row:s,column:n+e[s].length+r};return{row:l-1,column:n+e[l-1].length+r}},i.prototype.positionToIndex=function(n,t){for(var e=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,s=0,l=Math.min(n.row,e.length),u=t||0;u<l;++u)s+=e[u].length+r;return s+n.column},i.prototype.$split=function(n){return n.split(/\r\n|\r|\n/)},i})();o.prototype.$autoNewLine="",o.prototype.$newLineMode="auto",k.implement(o.prototype,S),x.Document=o}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/event_emitter").EventEmitter,S=(function(){function a(c,o){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=c;var i=this;this.$worker=function(){if(i.running){for(var n=new Date,t=i.currentLine,e=-1,r=i.doc,s=t;i.lines[t];)t++;var l=r.getLength(),u=0;for(i.running=!1;t<l;){i.$tokenizeRow(t),e=t;do t++;while(i.lines[t]);if(u++,u%5===0&&new Date-n>20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),s<=e&&i.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,o){var i={first:c,last:o};this._signal("update",{data:i})},a.prototype.start=function(c){this.currentLine=Math.min(c||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)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var o=c.start.row,i=c.end.row-o;if(i===0)this.lines[o]=null;else if(c.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var n=Array(i+1);n.unshift(o,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var o=this.doc.getLine(c),i=this.states[c-1],n=this.tokenizer.getLineTokens(o,i,c);return this.states[c]+""!=n.state+""?(this.states[c]=n.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=n.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a})();k.implement(S.prototype,M),x.BackgroundTokenizer=S}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(E,x,z){var k=E("./lib/lang"),M=E("./range").Range,S=(function(){function a(c,o,i){i===void 0&&(i="text"),this.setRegexp(c),this.clazz=o,this.type=i}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,o,i,n){if(this.regExp)for(var t=n.firstRow,e=n.lastRow,r={},s=t;s<=e;s++){var l=this.cache[s];l==null&&(l=k.getMatchOffsets(i.getLine(s),this.regExp),l.length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map(function(g){return new M(s,g.offset,s,g.offset+g.length)}),this.cache[s]=l.length?l:"");for(var u=l.length;u--;){var b=l[u].toScreenRange(i),m=b.toString();r[m]||(r[m]=!0,o.drawSingleLineMarker(c,b,this.clazz,n))}}},a})();S.prototype.MAX_RANGES=500,x.SearchHighlight=S}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(E,x,z){var k=(function(){function g(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return g.prototype.addSession=function(d){this.$session=d},g.prototype.add=function(d,$,T){if(!this.$fromUndo&&d!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),$===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),d.id=this.$rev=++this.$maxRev}(d.action=="remove"||d.action=="insert")&&(this.$lastDelta=d),this.lastDeltas.push(d)}},g.prototype.addSelection=function(d,$){this.selections.push({value:d,rev:$||this.$rev})},g.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},g.prototype.markIgnored=function(d,$){$==null&&($=this.$rev+1);for(var T=this.$undoStack,A=T.length;A--;){var C=T[A][0];if(C.id<=d)break;C.id<$&&(C.ignore=!0)}this.lastDeltas=null},g.prototype.getSelection=function(d,$){for(var T=this.selections,A=T.length;A--;){var C=T[A];if(C.rev<d)return $&&(C=T[A+1]),C}},g.prototype.getRevision=function(){return this.$rev},g.prototype.getDeltas=function(d,$){$==null&&($=this.$rev+1);for(var T=this.$undoStack,A=null,C=0,w=T.length;w--;){var f=T[w][0];if(f.id<$&&!A&&(A=w+1),f.id<=d){C=w+1;break}}return T.slice(C,A)},g.prototype.getChangedRanges=function(d,$){$==null&&($=this.$rev+1)},g.prototype.getChangedLines=function(d,$){$==null&&($=this.$rev+1)},g.prototype.undo=function(d,$){this.lastDeltas=null;var T=this.$undoStack;if(M(T,T.length)){d||(d=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var A=T.pop(),C=null;return A&&(C=d.undoChanges(A,$),this.$redoStack.push(A),this.$syncRev()),this.$fromUndo=!1,C}},g.prototype.redo=function(d,$){if(this.lastDeltas=null,d||(d=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var T=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);m(this.$redoStack,T),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(w){w[0].id=++this.$maxRev},this)}var A=this.$redoStack.pop(),C=null;return A&&(C=d.redoChanges(A,$),this.$undoStack.push(A),this.$syncRev()),this.$fromUndo=!1,C},g.prototype.$syncRev=function(){var d=this.$undoStack,$=d[d.length-1],T=$&&$[0].id||0;this.$redoStackBaseRev=T,this.$rev=T},g.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=[]},g.prototype.canUndo=function(){return this.$undoStack.length>0},g.prototype.canRedo=function(){return this.$redoStack.length>0},g.prototype.bookmark=function(d){d==null&&(d=this.$rev),this.mark=d},g.prototype.isAtBookmark=function(){return this.$rev===this.mark},g.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},g.prototype.fromJSON=function(d){this.reset(),this.$undoStack=d.$undoStack,this.$redoStack=d.$redoStack},g.prototype.$prettyPrint=function(d){return d?i(d):i(this.$undoStack)+"\n---\n"+i(this.$redoStack)},g})();k.prototype.hasUndo=k.prototype.canUndo,k.prototype.hasRedo=k.prototype.canRedo,k.prototype.isClean=k.prototype.isAtBookmark,k.prototype.markClean=k.prototype.bookmark;function M(g,d){for(var $=d;$--;){var T=g[$];if(T&&!T[0].ignore){for(;$<d-1;){var A=e(g[$],g[$+1]);g[$]=A[0],g[$+1]=A[1],$++}return!0}}}var S=E("./range").Range,a=S.comparePoints;S.comparePoints;function c(g){return{row:g.row,column:g.column}}function o(g){return{start:c(g.start),end:c(g.end),action:g.action,lines:g.lines.slice()}}function i(g){if(g=g||this,Array.isArray(g))return g.map(i).join("\n");var d="";return g.action?(d=g.action=="insert"?"+":"-",d+="["+g.lines+"]"):g.value&&(Array.isArray(g.value)?d=g.value.map(n).join("\n"):d=n(g.value)),g.start&&(d+=n(g)),(g.id||g.rev)&&(d+=" ("+(g.id||g.rev)+")"),d}function n(g){return g.start.row+":"+g.start.column+"=>"+g.end.row+":"+g.end.column}function t(g,d){var $=g.action=="insert",T=d.action=="insert";if($&&T)if(a(d.start,g.end)>=0)s(d,g,-1);else if(a(d.start,g.start)<=0)s(g,d,1);else return null;else if($&&!T)if(a(d.start,g.end)>=0)s(d,g,-1);else if(a(d.end,g.start)<=0)s(g,d,-1);else return null;else if(!$&&T)if(a(d.start,g.start)>=0)s(d,g,1);else if(a(d.start,g.start)<=0)s(g,d,1);else return null;else if(!$&&!T)if(a(d.start,g.start)>=0)s(d,g,1);else if(a(d.end,g.start)<=0)s(g,d,-1);else return null;return[d,g]}function e(g,d){for(var $=g.length;$--;)for(var T=0;T<d.length;T++)if(!t(g[$],d[T])){for(;$<g.length;){for(;T--;)t(d[T],g[$]);T=d.length,$++}return[g,d]}return g.selectionBefore=d.selectionBefore=g.selectionAfter=d.selectionAfter=null,[d,g]}function r(g,d){var $=g.action=="insert",T=d.action=="insert";if($&&T)a(g.start,d.start)<0?s(d,g,1):s(g,d,1);else if($&&!T)a(g.start,d.end)>=0?s(g,d,-1):(a(g.start,d.start)<=0||s(g,S.fromPoints(d.start,g.start),-1),s(d,g,1));else if(!$&&T)a(d.start,g.end)>=0?s(d,g,-1):(a(d.start,g.start)<=0||s(d,S.fromPoints(g.start,d.start),-1),s(g,d,1));else if(!$&&!T)if(a(d.start,g.end)>=0)s(d,g,-1);else if(a(d.end,g.start)<=0)s(g,d,-1);else{var A,C;return a(g.start,d.start)<0&&(A=g,g=u(g,d.start)),a(g.end,d.end)>0&&(C=u(g,d.end)),l(d.end,g.start,g.end,-1),C&&!A&&(g.lines=C.lines,g.start=C.start,g.end=C.end,C=g),[d,A,C].filter(Boolean)}return[d,g]}function s(g,d,$){l(g.start,d.start,d.end,$),l(g.end,d.start,d.end,$)}function l(g,d,$,T){g.row==(T==1?d:$).row&&(g.column+=T*($.column-d.column)),g.row+=T*($.row-d.row)}function u(g,d){var $=g.lines,T=g.end;g.end=c(d);var A=g.end.row-g.start.row,C=$.splice(A,$.length),w=A?d.column:d.column-g.start.column;$.push(C[0].substring(0,w)),C[0]=C[0].substr(w);var f={start:c(d),end:T,lines:C,action:g.action};return f}function b(g,d){d=o(d);for(var $=g.length;$--;){for(var T=g[$],A=0;A<T.length;A++){var C=T[A],w=r(C,d);d=w[0],w.length!=2&&(w[2]?(T.splice(A+1,1,w[1],w[2]),A++):w[1]||(T.splice(A,1),A--))}T.length||g.splice($,1)}return g}function m(g,d){for(var $=0;$<d.length;$++)for(var T=d[$],A=0;A<T.length;A++)b(g,T[A])}x.UndoManager=k}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(E,x,z){var k=E("../range").Range,M=(function(){function S(a,c){this.foldData=a,Array.isArray(c)?this.folds=c:c=this.folds=[c];var o=c[c.length-1];this.range=new k(c[0].start.row,c[0].start.column,o.end.row,o.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(i){i.setFoldLine(this)},this)}return S.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(c){c.start.row+=a,c.end.row+=a})},S.prototype.addFold=function(a){if(a.sameRow){if(a.start.row<this.startRow||a.endRow>this.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,o){return-c.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},S.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},S.prototype.walk=function(a,c,o){var i=0,n=this.folds,t,e,r,s=!0;c==null&&(c=this.end.row,o=this.end.column);for(var l=0;l<n.length;l++){if(t=n[l],e=t.range.compareStart(c,o),e==-1){a(null,c,o,i,s);return}if(r=a(null,t.start.row,t.start.column,i,s),r=!r&&a(t.placeholder,t.start.row,t.start.column,i),r||e===0)return;s=!t.sameRow,i=t.end.column}a(null,c,o,i,s)},S.prototype.getNextFoldTo=function(a,c){for(var o,i,n=0;n<this.folds.length;n++){if(o=this.folds[n],i=o.range.compareEnd(a,c),i==-1)return{fold:o,kind:"after"};if(i===0)return{fold:o,kind:"inside"}}return null},S.prototype.addRemoveChars=function(a,c,o){var i=this.getNextFoldTo(a,c),n,t;if(i){if(n=i.fold,i.kind=="inside"&&n.start.column!=c&&n.start.row!=a)window.console&&window.console.log(a,c,n);else if(n.start.row==a){t=this.folds;var e=t.indexOf(n);for(e===0&&(this.start.column+=o),e;e<t.length;e++){if(n=t[e],n.start.column+=o,!n.sameRow)return;n.end.column+=o}this.end.column+=o}}},S.prototype.split=function(a,c){var o=this.getNextFoldTo(a,c);if(!o||o.kind=="inside")return null;var i=o.fold,n=this.folds,t=this.foldData,e=n.indexOf(i),r=n[e-1];this.end.row=r.end.row,this.end.column=r.end.column,n=n.splice(e,n.length-e);var s=new S(t,n);return t.splice(t.indexOf(this)+1,0,s),s},S.prototype.merge=function(a){for(var c=a.folds,o=0;o<c.length;o++)this.addFold(c[o]);var i=this.foldData;i.splice(i.indexOf(a),1)},S.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(c){a.push(" "+c.toString())}),a.push("]"),a.join("\n")},S.prototype.idxToPosition=function(a){for(var c=0,o=0;o<this.folds.length;o++){var i=this.folds[o];if(a-=i.start.column-c,a<0)return{row:i.start.row,column:i.start.column+a};if(a-=i.placeholder.length,a<0)return i.start;c=i.end.column}return{row:this.end.row,column:this.end.column+a}},S})();x.FoldLine=M}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(E,x,z){var k=E("./range").Range,M=k.comparePoints,S=(function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(c,o,i){for(var n=this.ranges,t=i||0;t<n.length;t++){var e=n[t],r=M(c,e.end);if(!(r>0)){var s=M(c,e.start);return r===0?o&&s!==0?-t-2:t:s>0||s===0&&!o?t:-t-1}}return-t-1},a.prototype.add=function(c){var o=!c.isEmpty(),i=this.pointIndex(c.start,o);i<0&&(i=-i-1);var n=this.pointIndex(c.end,o,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,c)},a.prototype.addList=function(c){for(var o=[],i=c.length;i--;)o.push.apply(o,this.add(c[i]));return o},a.prototype.substractPoint=function(c){var o=this.pointIndex(c);if(o>=0)return this.ranges.splice(o,1)},a.prototype.merge=function(){var c=[],o=this.ranges;o=o.sort(function(r,s){return M(r.start,s.start)});for(var i=o[0],n,t=1;t<o.length;t++){n=i,i=o[t];var e=M(n.end,i.start);e<0||e==0&&!n.isEmpty()&&!i.isEmpty()||(M(n.end,i.end)<0&&(n.end.row=i.end.row,n.end.column=i.end.column),o.splice(t,1),c.push(i),i=n,t--)}return this.ranges=o,c},a.prototype.contains=function(c,o){return this.pointIndex({row:c,column:o})>=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var o=this.pointIndex(c);if(o>=0)return this.ranges[o]},a.prototype.clipRows=function(c,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row<c)return[];var n=this.pointIndex({row:c,column:0});n<0&&(n=-n-1);var t=this.pointIndex({row:o,column:0},n);t<0&&(t=-t-1);for(var e=[],r=n;r<t;r++)e.push(i[r]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(c){this.session&&this.detach(),this.session=c,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},a.prototype.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},a.prototype.$onChange=function(c){for(var o=c.start,i=c.end,n=o.row,t=i.row,e=this.ranges,r=0,s=e.length;r<s;r++){var l=e[r];if(l.end.row>=n)break}if(c.action=="insert")for(var u=t-n,b=-o.column+i.column;r<s;r++){var l=e[r];if(l.start.row>n)break;if(l.start.row==n&&l.start.column>=o.column&&(l.start.column==o.column&&this.$bias<=0||(l.start.column+=b,l.start.row+=u)),l.end.row==n&&l.end.column>=o.column){if(l.end.column==o.column&&this.$bias<0)continue;l.end.column==o.column&&b>0&&r<s-1&&l.end.column>l.start.column&&l.end.column==e[r+1].start.column&&(l.end.column-=b),l.end.column+=b,l.end.row+=u}}else for(var u=n-t,b=o.column-i.column;r<s;r++){var l=e[r];if(l.start.row>t)break;l.end.row<t&&(n<l.end.row||n==l.end.row&&o.column<l.end.column)?(l.end.row=n,l.end.column=o.column):l.end.row==t?l.end.column<=i.column?(u||l.end.column>o.column)&&(l.end.column=o.column,l.end.row=o.row):(l.end.column+=b,l.end.row+=u):l.end.row>t&&(l.end.row+=u),l.start.row<t&&(n<l.start.row||n==l.start.row&&o.column<l.start.column)?(l.start.row=n,l.start.column=o.column):l.start.row==t?l.start.column<=i.column?(u||l.start.column>o.column)&&(l.start.column=o.column,l.start.row=o.row):(l.start.column+=b,l.start.row+=u):l.start.row>t&&(l.start.row+=u)}if(u!=0&&r<s)for(;r<s;r++){var l=e[r];l.start.row+=u,l.end.row+=u}},a})();S.prototype.comparePoints=M,x.RangeList=S}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(E,x,z){var k=this&&this.__extends||(function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(r[l]=s[l])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),M=E("../range_list").RangeList,S=(function(n){k(t,n);function t(e,r){var s=n.call(this)||this;return s.foldLine=null,s.placeholder=r,s.range=e,s.start=e.start,s.end=e.end,s.sameRow=e.start.row==e.end.row,s.subFolds=s.ranges=[],s}return t.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},t.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(r){r.setFoldLine(e)})},t.prototype.clone=function(){var e=this.range.clone(),r=new t(e,this.placeholder);return this.subFolds.forEach(function(s){r.subFolds.push(s.clone())}),r.collapseChildren=this.collapseChildren,r},t.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){c(e,this.start);for(var b=e.start.row,m=e.start.column,r=0,s=-1;r<this.subFolds.length&&(s=this.subFolds[r].range.compare(b,m),s==1);r++);var l=this.subFolds[r],u=0;if(s==0){if(l.range.containsRange(e))return l.addSubFold(e);u=1}for(var b=e.range.end.row,m=e.range.end.column,g=r,s=-1;g<this.subFolds.length&&(s=this.subFolds[g].range.compare(b,m),s==1);g++);s==0&&g++;for(var d=this.subFolds.splice(r,g-r,e),$=s==0?d.length-1:d.length,T=u;T<$;T++)e.addSubFold(d[T]);return e.setFoldLine(this.foldLine),e}},t.prototype.restoreRange=function(e){return i(e,this.start)},t})(M);function a(n,t){n.row-=t.row,n.row==0&&(n.column-=t.column)}function c(n,t){a(n.start,t),a(n.end,t)}function o(n,t){n.row==0&&(n.column+=t.column),n.row+=t.row}function i(n,t){o(n.start,t),o(n.end,t)}x.Fold=S}),ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator","ace/mouse/mouse_event"],function(E,x,z){var k=E("../range").Range,M=E("./fold_line").FoldLine,S=E("./fold").Fold,a=E("../token_iterator").TokenIterator,c=E("../mouse/mouse_event").MouseEvent;function o(){this.getFoldAt=function(i,n,t){var e=this.getFoldLine(i);if(!e)return null;for(var r=e.folds,s=0;s<r.length;s++){var l=r[s].range;if(l.contains(i,n)){if(t==1&&l.isEnd(i,n)&&!l.isEmpty())continue;if(t==-1&&l.isStart(i,n)&&!l.isEmpty())continue;return r[s]}}},this.getFoldsInRange=function(i){var n=i.start,t=i.end,e=this.$foldData,r=[];n.column+=1,t.column-=1;for(var s=0;s<e.length;s++){var l=e[s].range.compareRange(i);if(l!=2){if(l==-2)break;for(var u=e[s].folds,b=0;b<u.length;b++){var m=u[b];if(l=m.range.compareRange(i),l==-2)break;if(l==2)continue;if(l==42)break;r.push(m)}}}return n.column-=1,t.column+=1,r},this.getFoldsInRangeList=function(i){if(Array.isArray(i)){var n=[];i.forEach(function(t){n=n.concat(this.getFoldsInRange(t))},this)}else var n=this.getFoldsInRange(i);return n},this.getAllFolds=function(){for(var i=[],n=this.$foldData,t=0;t<n.length;t++)for(var e=0;e<n[t].folds.length;e++)i.push(n[t].folds[e]);return i},this.getFoldStringAt=function(i,n,t,e){if(e=e||this.getFoldLine(i),!e)return null;for(var r={end:{column:0}},s,l,u=0;u<e.folds.length;u++){l=e.folds[u];var b=l.range.compareEnd(i,n);if(b==-1){s=this.getLine(l.start.row).substring(r.end.column,l.start.column);break}else if(b===0)return null;r=l}return s||(s=this.getLine(l.start.row).substring(r.end.column)),t==-1?s.substring(0,n-r.end.column):t==1?s.substring(n-r.end.column):s},this.getFoldLine=function(i,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var r=t[e];if(r.start.row<=i&&r.end.row>=i)return r;if(r.end.row>i)return null}return null},this.getNextFoldLine=function(i,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e<t.length;e++){var r=t[e];if(r.end.row>=i)return r}return null},this.getFoldedRowCount=function(i,n){for(var t=this.$foldData,e=n-i+1,r=0;r<t.length;r++){var s=t[r],l=s.end.row,u=s.start.row;if(l>=n){u<n&&(u>=i?e-=n-u:e=0);break}else l>=i&&(u>=i?e-=l-u:e-=l-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),i},this.addFold=function(i,n){var t=this.$foldData,e=!1,r;i instanceof S?r=i:(r=new S(n,i),r.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(r.range);var s=r.start.row,l=r.start.column,u=r.end.row,b=r.end.column,m=this.getFoldAt(s,l,1),g=this.getFoldAt(u,b,-1);if(m&&g==m)return m.addSubFold(r);m&&!m.range.isStart(s,l)&&this.removeFold(m),g&&!g.range.isEnd(u,b)&&this.removeFold(g);var d=this.getFoldsInRange(r.range);d.length>0&&(this.removeFolds(d),r.collapseChildren||d.forEach(function(C){r.addSubFold(C)}));for(var $=0;$<t.length;$++){var T=t[$];if(u==T.start.row){T.addFold(r),e=!0;break}else if(s==T.end.row){if(T.addFold(r),e=!0,!r.sameRow){var A=t[$+1];if(A&&A.start.row==u){T.merge(A);break}}break}else if(u<=T.start.row)break}return e||(T=this.$addFoldLine(new M(this.$foldData,r))),this.$useWrapMode?this.$updateWrapData(T.start.row,T.start.row):this.$updateRowLengthCache(T.start.row,T.start.row),this.$modified=!0,this._signal("changeFold",{data:r,action:"add"}),r},this.addFolds=function(i){i.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(i){var n=i.foldLine,t=n.start.row,e=n.end.row,r=this.$foldData,s=n.folds;if(s.length==1)r.splice(r.indexOf(n),1);else if(n.range.isEnd(i.end.row,i.end.column))s.pop(),n.end.row=s[s.length-1].end.row,n.end.column=s[s.length-1].end.column;else if(n.range.isStart(i.start.row,i.start.column))s.shift(),n.start.row=s[0].start.row,n.start.column=s[0].start.column;else if(i.sameRow)s.splice(s.indexOf(i),1);else{var l=n.split(i.start.row,i.start.column);s=l.folds,s.shift(),l.start.row=s[0].start.row,l.start.column=s[0].start.column}this.$updating||(this.$useWrapMode?this.$updateWrapData(t,e):this.$updateRowLengthCache(t,e)),this.$modified=!0,this._signal("changeFold",{data:i,action:"remove"})},this.removeFolds=function(i){for(var n=[],t=0;t<i.length;t++)n.push(i[t]);n.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(i){this.removeFold(i),i.subFolds.forEach(function(n){i.restoreRange(n),this.addFold(n)},this),i.collapseChildren>0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(i,n){var t,e;if(i==null)t=new k(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof i=="number")t=new k(i,0,i,this.getLine(i).length);else if("row"in i)t=k.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var r=e;e.length==1&&k.comparePoints(e[0].start,t.start)<0&&k.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),r.length)return r},this.isRowFolded=function(i,n){return!!this.getFoldLine(i,n)},this.getRowFoldEnd=function(i,n){var t=this.getFoldLine(i,n);return t?t.end.row:i},this.getRowFoldStart=function(i,n){var t=this.getFoldLine(i,n);return t?t.start.row:i},this.getFoldDisplayLine=function(i,n,t,e,r){e==null&&(e=i.start.row),r==null&&(r=0),n==null&&(n=i.end.row),t==null&&(t=this.getLine(n).length);var s=this.doc,l="";return i.walk(function(u,b,m,g){if(!(b<e)){if(b==e){if(m<r)return;g=Math.max(r,g)}u!=null?l+=u:l+=s.getLine(b).substring(g,m)}},n,t),l},this.getDisplayLine=function(i,n,t,e){var r=this.getFoldLine(i);if(r)return this.getFoldDisplayLine(r,i,n,t,e);var s;return s=this.doc.getLine(i),s.substring(e||0,n||s.length)},this.$cloneFoldData=function(){var i=[];return i=this.$foldData.map(function(n){var t=n.folds.map(function(e){return e.clone()});return new M(i,t)}),i},this.toggleFold=function(i){var n=this.selection,t=n.getRange(),e,r;if(t.isEmpty()){var s=t.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else(r=this.findMatchingBracket(s))?t.comparePoint(r)==1?t.end=r:(t.start=r,t.start.column++,t.end.column--):(r=this.findMatchingBracket({row:s.row,column:s.column+1}))?(t.comparePoint(r)==1?t.end=r:t.start=r,t.start.column++):t=this.getCommentFoldRange(s.row,s.column)||t}else{var l=this.getFoldsInRange(t);if(i&&l.length){this.expandFolds(l);return}else l.length==1&&(e=l[0])}if(e||(e=this.getFoldAt(t.start.row,t.start.column)),e&&e.range.toString()==t.toString()){this.expandFold(e);return}var u="...";if(!t.isMultiLine()){if(u=this.getTextRange(t),u.length<4)return;u=u.trim().substring(0,2)+".."}this.addFold(u,t)},this.getCommentFoldRange=function(i,n,t){var e=new a(this,i,n),r=e.getCurrentToken(),s=r&&r.type;if(r&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var l=new RegExp(s),u=new k;if(t!=1){do r=e.stepBackward();while(r&&l.test(r.type));r=e.stepForward()}u.start.row=e.getCurrentTokenRow(),u.start.column=e.getCurrentTokenColumn()+r.value.length,e=new a(this,i,n);var b=this.getState(e.$row);if(t!=-1){var m=-1;do if(r=e.stepForward(),m==-1){var g=this.getState(e.$row);b.toString()!==g.toString()&&(m=e.$row)}else if(e.$row>m)break;while(r&&l.test(r.type));r=e.stepBackward()}else r=e.getCurrentToken();return u.end.row=e.getCurrentTokenRow(),u.end.column=e.getCurrentTokenColumn(),u}},this.foldAll=function(i,n,t,e){t==null&&(t=1e5);var r=this.foldWidgets;if(r){n=n||this.getLength(),i=i||0;for(var s=i;s<n;s++)if(r[s]==null&&(r[s]=this.getFoldWidget(s)),r[s]=="start"&&!(e&&!e(s))){var l=this.getFoldWidgetRange(s);l&&l.isMultiLine()&&l.end.row<=n&&l.start.row>=i&&(s=l.end.row,l.collapseChildren=t,this.addFold("...",l))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(n){for(var t=i.getTokens(n),e=0;e<t.length;e++){var r=t[e];if(!(r.type=="text"&&/^\s+$/.test(r.value)))return!!/comment/.test(r.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(i){if(!this.$foldStyles[i])throw new Error("invalid fold style: "+i+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=i){this.$foldStyle=i,i=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(i){if(this.$foldMode!=i){if(this.$foldMode=i,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!i||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=i.getFoldWidget.bind(i,this,this.$foldStyle),this.getFoldWidgetRange=i.getFoldWidgetRange.bind(i,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.getParentFoldRangeData=function(i,n){var t=this.foldWidgets;if(!t||n&&t[i])return{};for(var e=i-1,r;e>=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var l=this.getFoldWidgetRange(e);if(r||(r=l),l&&l.end.row>=i)break}e--}return{range:e!==-1&&l,firstRange:r}},this.onFoldWidgetClick=function(i,n){n instanceof c&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var r=n.target||n.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,n){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),r=t==="end"?-1:1,s=this.getFoldAt(i,r===-1?0:e.length,r);if(s)return n.children||n.all?this.removeFold(s):this.expandFold(s),s;var l=this.getFoldWidgetRange(i,!0);if(l&&!l.isMultiLine()&&(s=this.getFoldAt(l.start.row,l.start.column,1),s&&l.isEqual(s.range)))return this.removeFold(s),s;if(n.siblings){var u=this.getParentFoldRangeData(i);if(u.range)var b=u.range.start.row+1,m=u.range.end.row;this.foldAll(b,m,n.all?1e4:0)}else n.children?(m=l?l.end.row:this.getLength(),this.foldAll(i+1,m,n.all?1e4:0)):l&&(n.all&&(l.collapseChildren=1e4),this.addFold("...",l));return l}},this.toggleFoldWidget=function(i){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var t=this.$toggleFoldWidget(n,{});if(!t){var e=this.getParentFoldRangeData(n,!0);if(t=e.range||e.firstRange,t){n=t.start.row;var r=this.getFoldAt(n,this.getLine(n).length,1);r?this.removeFold(r):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var n=i.start.row,t=i.end.row-n;if(t===0)this.foldWidgets[n]=null;else if(i.action=="remove")this.foldWidgets.splice(n,t+1,null);else{var e=Array(t+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var n=i.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}x.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(E,x,z){var k=E("../token_iterator").TokenIterator,M=E("../range").Range;function S(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var o=c||this.getLine(a.row).charAt(a.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),o=!0,i,n=c.charAt(a.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=c.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(/([\(\[\{])|([\)\]\}])/),o=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;i=M.fromPoints(a,e),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;i=M.fromPoints(e,a),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(a,c){var o=this.getLine(a.row),i=/([\(\[\{])|([\)\]\}])/,n=!c&&o.charAt(a.column-1),t=n&&n.match(i);if(t||(n=(c===void 0||c)&&o.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(i)),!t)return null;var e=new M(a.row,a.column-1,a.row,a.column),r=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!r)return[e];var s=new M(r.row,r.column,r.row,r.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,o){var i=this.$brackets[a],n=1,t=new k(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var r=c.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;r>=0;){var l=s.charAt(r);if(l==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:r+t.getCurrentTokenColumn()}}else l==a&&(n+=1);r-=1}do e=t.stepBackward();while(e&&!o.test(e.type));if(e==null)break;s=e.value,r=s.length-1}return null}},this.$findClosingBracket=function(a,c,o){var i=this.$brackets[a],n=1,t=new k(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var r=c.column-t.getCurrentTokenColumn();;){for(var s=e.value,l=s.length;r<l;){var u=s.charAt(r);if(u==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:r+t.getCurrentTokenColumn()}}else u==a&&(n+=1);r+=1}do e=t.stepForward();while(e&&!o.test(e.type));if(e==null)break;r=0}return null}},this.getMatchingTags=function(a){var c=new k(this,a.row,a.column),o=this.$findTagName(c);if(o){var i=c.stepBackward();return i.value==="<"?this.$findClosingTag(c,o):this.$findOpeningTag(c,o)}},this.$findTagName=function(a){var c=a.getCurrentToken(),o=!1,i=!1;if(c&&c.type.indexOf("tag-name")===-1)do i?c=a.stepBackward():c=a.stepForward(),c&&(c.value==="/>"?i=!0:c.type.indexOf("tag-name")!==-1&&(o=!0));while(c&&!o);return c},this.$findClosingTag=function(a,c){var o,i=c.value,n=c.value,t=0,e=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var r=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),s=!1;do{if(o=c,o.type.indexOf("tag-close")!==-1&&!s){var l=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(c=a.stepForward(),c){if(c.value===">"&&!s){var l=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(c.type.indexOf("tag-name")!==-1){if(i=c.value,n===i){if(o.value==="<")t++;else if(o.value==="</"&&(t--,t<0)){a.stepBackward();var u=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);c=a.stepForward();var b=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=a.stepForward()),c&&c.value===">")var m=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===i&&c.value==="/>"&&(t--,t<0))var u=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),b=u,m=b,l=new M(r.end.row,r.end.column,r.end.row,r.end.column+1)}}while(c&&t>=0);if(e&&l&&u&&m&&r&&b)return{openTag:new M(e.start.row,e.start.column,l.end.row,l.end.column),closeTag:new M(u.start.row,u.start.column,m.end.row,m.end.column),openTagName:r,closeTagName:b}},this.$findOpeningTag=function(a,c){var o=a.getCurrentToken(),i=c.value,n=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),r=e+2,s=new M(t,e,t,r);a.stepForward();var l=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=a.stepForward()),!(!c||c.value!==">")){var u=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=o,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),r=e+c.value.length,o=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(i===c.value)if(o.value==="<"){if(n++,n>0){var b=new M(t,e,t,r),m=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var g=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else o.value==="</"&&n--}else if(c.value==="/>"){for(var d=0,$=o;$;){if($.type.indexOf("tag-name")!==-1&&$.value===i){n--;break}else if($.value==="<")break;$=a.stepBackward(),d++}for(var T=0;T<d;T++)a.stepForward()}}while(o&&n<=0);if(m&&g&&s&&u&&b&&l)return{openTag:new M(m.start.row,m.start.column,g.end.row,g.end.column),closeTag:new M(s.start.row,s.start.column,u.end.row,u.end.column),openTagName:b,closeTagName:l}}}}x.BracketMatch=S}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/lang"),S=E("./bidihandler").BidiHandler,a=E("./config"),c=E("./lib/event_emitter").EventEmitter,o=E("./selection").Selection,i=E("./mode/text").Mode,n=E("./range").Range,t=E("./document").Document,e=E("./background_tokenizer").BackgroundTokenizer,r=E("./search_highlight").SearchHighlight,s=E("./undomanager").UndoManager,l=(function(){function w(f,p){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.id="session"+ ++w.$uid,this.$foldData.toString=function(){return this.join("\n")},this.bgTokenizer=new e(new i().getTokenizer(),this);var h=this;this.bgTokenizer.on("update",function(v){h._signal("tokenizerUpdate",v)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof f!="object"||!f.getLine)&&(f=new t(f)),this.setDocument(f),this.selection=new o(this),this.$bidiHandler=new S(this),a.resetOptions(this),this.setMode(p),a._signal("session",this),this.destroyed=!1}return w.prototype.setDocument=function(f){this.doc&&this.doc.off("change",this.$onChange),this.doc=f,f.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},w.prototype.getDocument=function(){return this.doc},w.prototype.$resetRowCache=function(f){if(!f){this.$docRowCache=[],this.$screenRowCache=[];return}var p=this.$docRowCache.length,h=this.$getRowCacheIndex(this.$docRowCache,f)+1;p>h&&(this.$docRowCache.splice(h,p),this.$screenRowCache.splice(h,p))},w.prototype.$getRowCacheIndex=function(f,p){for(var h=0,v=f.length-1;h<=v;){var y=h+v>>1,L=f[y];if(p>L)h=y+1;else if(p<L)v=y-1;else return y}return h-1},w.prototype.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.destroyed||this.bgTokenizer.start(0)},w.prototype.onChangeFold=function(f){var p=f.data;this.$resetRowCache(p.start.row)},w.prototype.onChange=function(f){this.$modified=!0,this.$bidiHandler.onChange(f),this.$resetRowCache(f.start.row);var p=this.$updateInternalDataOnChange(f);!this.$fromUndo&&this.$undoManager&&(p&&p.length&&(this.$undoManager.add({action:"removeFolds",folds:p},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(f,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(f),this._signal("change",f)},w.prototype.setValue=function(f){this.doc.setValue(f),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},w.fromJSON=function(f){typeof f=="string"&&(f=JSON.parse(f));var p=new s;p.$undoStack=f.history.undo,p.$redoStack=f.history.redo,p.mark=f.history.mark,p.$rev=f.history.rev;var h=new w(f.value);return f.folds.forEach(function(v){h.addFold("...",n.fromPoints(v.start,v.end))}),h.setAnnotations(f.annotations),h.setBreakpoints(f.breakpoints),h.setMode(f.mode),h.setScrollLeft(f.scrollLeft),h.setScrollTop(f.scrollTop),h.setUndoManager(p),h.selection.fromJSON(f.selection),h},w.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(f){return f.range}),history:this.getUndoManager(),mode:this.$mode.$id,scrollLeft:this.$scrollLeft,scrollTop:this.$scrollTop,selection:this.selection.toJSON(),value:this.doc.getValue()}},w.prototype.toString=function(){return this.doc.getValue()},w.prototype.getSelection=function(){return this.selection},w.prototype.getState=function(f){return this.bgTokenizer.getState(f)},w.prototype.getTokens=function(f){return this.bgTokenizer.getTokens(f)},w.prototype.getTokenAt=function(f,p){var h=this.bgTokenizer.getTokens(f),v,y=0;if(p==null){var L=h.length-1;y=this.getLine(f).length}else for(var L=0;L<h.length&&(y+=h[L].value.length,!(y>=p));L++);return v=h[L],v?(v.index=L,v.start=y-v.value.length,v):null},w.prototype.setUndoManager=function(f){if(this.$undoManager=f,this.$informUndoManager&&this.$informUndoManager.cancel(),f){var p=this;f.addSession(this),this.$syncInformUndoManager=function(){p.$informUndoManager.cancel(),p.mergeUndoDeltas=!1},this.$informUndoManager=M.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},w.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},w.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},w.prototype.getTabString=function(){return this.getUseSoftTabs()?M.stringRepeat(" ",this.getTabSize()):" "},w.prototype.setUseSoftTabs=function(f){this.setOption("useSoftTabs",f)},w.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},w.prototype.setTabSize=function(f){this.setOption("tabSize",f)},w.prototype.getTabSize=function(){return this.$tabSize},w.prototype.isTabStop=function(f){return this.$useSoftTabs&&f.column%this.$tabSize===0},w.prototype.setNavigateWithinSoftTabs=function(f){this.setOption("navigateWithinSoftTabs",f)},w.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},w.prototype.setOverwrite=function(f){this.setOption("overwrite",f)},w.prototype.getOverwrite=function(){return this.$overwrite},w.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},w.prototype.addGutterDecoration=function(f,p){this.$decorations[f]||(this.$decorations[f]=""),this.$decorations[f]+=" "+p,this._signal("changeBreakpoint",{})},w.prototype.removeGutterDecoration=function(f,p){this.$decorations[f]=(this.$decorations[f]||"").replace(" "+p,""),this._signal("changeBreakpoint",{})},w.prototype.getBreakpoints=function(){return this.$breakpoints},w.prototype.setBreakpoints=function(f){this.$breakpoints=[];for(var p=0;p<f.length;p++)this.$breakpoints[f[p]]="ace_breakpoint";this._signal("changeBreakpoint",{})},w.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},w.prototype.setBreakpoint=function(f,p){p===void 0&&(p="ace_breakpoint"),p?this.$breakpoints[f]=p:delete this.$breakpoints[f],this._signal("changeBreakpoint",{})},w.prototype.clearBreakpoint=function(f){delete this.$breakpoints[f],this._signal("changeBreakpoint",{})},w.prototype.addMarker=function(f,p,h,v){var y=this.$markerId++,L={range:f,type:h||"line",renderer:typeof h=="function"?h:null,clazz:p,inFront:!!v,id:y};return v?(this.$frontMarkers[y]=L,this._signal("changeFrontMarker")):(this.$backMarkers[y]=L,this._signal("changeBackMarker")),y},w.prototype.addDynamicMarker=function(f,p){if(f.update){var h=this.$markerId++;return f.id=h,f.inFront=!!p,p?(this.$frontMarkers[h]=f,this._signal("changeFrontMarker")):(this.$backMarkers[h]=f,this._signal("changeBackMarker")),f}},w.prototype.removeMarker=function(f){var p=this.$frontMarkers[f]||this.$backMarkers[f];if(p){var h=p.inFront?this.$frontMarkers:this.$backMarkers;delete h[f],this._signal(p.inFront?"changeFrontMarker":"changeBackMarker")}},w.prototype.getMarkers=function(f){return f?this.$frontMarkers:this.$backMarkers},w.prototype.highlight=function(f){if(!this.$searchHighlight){var p=new r(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(p)}this.$searchHighlight.setRegexp(f)},w.prototype.highlightLines=function(f,p,h,v){typeof p!="number"&&(h=p,p=f),h||(h="ace_step");var y=new n(f,0,p,1/0);return y.id=this.addMarker(y,h,"fullLine",v),y},w.prototype.setAnnotations=function(f){this.$annotations=f,this._signal("changeAnnotation",{})},w.prototype.getAnnotations=function(){return this.$annotations||[]},w.prototype.clearAnnotations=function(){this.setAnnotations([])},w.prototype.$detectNewLine=function(f){var p=f.match(/^.*?(\r?\n)/m);p?this.$autoNewLine=p[1]:this.$autoNewLine="\n"},w.prototype.getWordRange=function(f,p){var h=this.getLine(f),v=!1;if(p>0&&(v=!!h.charAt(p-1).match(this.tokenRe)),v||(v=!!h.charAt(p).match(this.tokenRe)),v)var y=this.tokenRe;else if(/^\s+$/.test(h.slice(p-1,p+1)))var y=/\s/;else var y=this.nonTokenRe;var L=p;if(L>0){do L--;while(L>=0&&h.charAt(L).match(y));L++}for(var R=p;R<h.length&&h.charAt(R).match(y);)R++;return new n(f,L,f,R)},w.prototype.getAWordRange=function(f,p){for(var h=this.getWordRange(f,p),v=this.getLine(h.end.row);v.charAt(h.end.column).match(/[ \t]/);)h.end.column+=1;return h},w.prototype.setNewLineMode=function(f){this.doc.setNewLineMode(f)},w.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},w.prototype.setUseWorker=function(f){this.setOption("useWorker",f)},w.prototype.getUseWorker=function(){return this.$useWorker},w.prototype.onReloadTokenizer=function(f){var p=f.data;this.bgTokenizer.start(p.first),this._signal("tokenizerUpdate",f)},w.prototype.setMode=function(f,p){if(f&&typeof f=="object"){if(f.getTokenizer)return this.$onChangeMode(f);var h=f,v=h.path}else v=f||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new i),this.$modes[v]&&!h){this.$onChangeMode(this.$modes[v]),p&&p();return}this.$modeId=v,a.loadModule(["mode",v],(function(y){if(this.$modeId!==v)return p&&p();this.$modes[v]&&!h?this.$onChangeMode(this.$modes[v]):y&&y.Mode&&(y=new y.Mode(h),h||(this.$modes[v]=y,y.$id=v),this.$onChangeMode(y)),p&&p()}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},w.prototype.$onChangeMode=function(f,p){if(p||(this.$modeId=f.$id),this.$mode!==f){var h=this.$mode;this.$mode=f,this.$stopWorker(),this.$useWorker&&this.$startWorker();var v=f.getTokenizer();if(v.on!==void 0){var y=this.onReloadTokenizer.bind(this);v.on("update",y)}this.bgTokenizer.setTokenizer(v),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=f.tokenRe,this.nonTokenRe=f.nonTokenRe,p||(f.attachToSession&&f.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(f.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:h,mode:f}))}},w.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},w.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(f){a.warn("Could not load worker",f),this.$worker=null}},w.prototype.getMode=function(){return this.$mode},w.prototype.setScrollTop=function(f){this.$scrollTop===f||isNaN(f)||(this.$scrollTop=f,this._signal("changeScrollTop",f))},w.prototype.getScrollTop=function(){return this.$scrollTop},w.prototype.setScrollLeft=function(f){this.$scrollLeft===f||isNaN(f)||(this.$scrollLeft=f,this._signal("changeScrollLeft",f))},w.prototype.getScrollLeft=function(){return this.$scrollLeft},w.prototype.getScreenWidth=function(){return this.$computeWidth(),this.lineWidgets?Math.max(this.getLineWidgetMaxWidth(),this.screenWidth):this.screenWidth},w.prototype.getLineWidgetMaxWidth=function(){if(this.lineWidgetsWidth!=null)return this.lineWidgetsWidth;var f=0;return this.lineWidgets.forEach(function(p){p&&p.screenWidth>f&&(f=p.screenWidth)}),this.lineWidgetWidth=f},w.prototype.$computeWidth=function(f){if(this.$modified||f){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var p=this.doc.getAllLines(),h=this.$rowLengthCache,v=0,y=0,L=this.$foldData[y],R=L?L.start.row:1/0,_=p.length,I=0;I<_;I++){if(I>R){if(I=L.end.row+1,I>=_)break;L=this.$foldData[y++],R=L?L.start.row:1/0}h[I]==null&&(h[I]=this.$getStringScreenWidth(p[I])[0]),h[I]>v&&(v=h[I])}this.screenWidth=v}},w.prototype.getLine=function(f){return this.doc.getLine(f)},w.prototype.getLines=function(f,p){return this.doc.getLines(f,p)},w.prototype.getLength=function(){return this.doc.getLength()},w.prototype.getTextRange=function(f){return this.doc.getTextRange(f||this.selection.getRange())},w.prototype.insert=function(f,p){return this.doc.insert(f,p)},w.prototype.remove=function(f){return this.doc.remove(f)},w.prototype.removeFullLines=function(f,p){return this.doc.removeFullLines(f,p)},w.prototype.undoChanges=function(f,p){if(f.length){this.$fromUndo=!0;for(var h=f.length-1;h!=-1;h--){var v=f[h];v.action=="insert"||v.action=="remove"?this.doc.revertDelta(v):v.folds&&this.addFolds(v.folds)}!p&&this.$undoSelect&&(f.selectionBefore?this.selection.fromJSON(f.selectionBefore):this.selection.setRange(this.$getUndoSelection(f,!0))),this.$fromUndo=!1}},w.prototype.redoChanges=function(f,p){if(f.length){this.$fromUndo=!0;for(var h=0;h<f.length;h++){var v=f[h];(v.action=="insert"||v.action=="remove")&&this.doc.$safeApplyDelta(v)}!p&&this.$undoSelect&&(f.selectionAfter?this.selection.fromJSON(f.selectionAfter):this.selection.setRange(this.$getUndoSelection(f,!1))),this.$fromUndo=!1}},w.prototype.setUndoSelect=function(f){this.$undoSelect=f},w.prototype.$getUndoSelection=function(f,p){function h(_){return p?_.action!=="insert":_.action==="insert"}for(var v,y,L=0;L<f.length;L++){var R=f[L];if(R.start){if(!v){h(R)?v=n.fromPoints(R.start,R.end):v=n.fromPoints(R.start,R.start);continue}h(R)?(y=R.start,v.compare(y.row,y.column)==-1&&v.setStart(y),y=R.end,v.compare(y.row,y.column)==1&&v.setEnd(y)):(y=R.start,v.compare(y.row,y.column)==-1&&(v=n.fromPoints(R.start,R.start)))}}return v},w.prototype.replace=function(f,p){return this.doc.replace(f,p)},w.prototype.moveText=function(f,p,h){var v=this.getTextRange(f),y=this.getFoldsInRange(f),L=n.fromPoints(p,p);if(!h){this.remove(f);var R=f.start.row-f.end.row,_=R?-f.end.column:f.start.column-f.end.column;_&&(L.start.row==f.end.row&&L.start.column>f.end.column&&(L.start.column+=_),L.end.row==f.end.row&&L.end.column>f.end.column&&(L.end.column+=_)),R&&L.start.row>=f.end.row&&(L.start.row+=R,L.end.row+=R)}if(L.end=this.insert(L.start,v),y.length){var I=f.start,N=L.start,R=N.row-I.row,_=N.column-I.column;this.addFolds(y.map(function(D){return D=D.clone(),D.start.row==I.row&&(D.start.column+=_),D.end.row==I.row&&(D.end.column+=_),D.start.row+=R,D.end.row+=R,D}))}return L},w.prototype.indentRows=function(f,p,h){h=h.replace(/\t/g,this.getTabString());for(var v=f;v<=p;v++)this.doc.insertInLine({row:v,column:0},h)},w.prototype.outdentRows=function(f){for(var p=f.collapseRows(),h=new n(0,0,0,0),v=this.getTabSize(),y=p.start.row;y<=p.end.row;++y){var L=this.getLine(y);h.start.row=y,h.end.row=y;for(var R=0;R<v&&L.charAt(R)==" ";++R);R<v&&L.charAt(R)==" "?(h.start.column=R,h.end.column=R+1):(h.start.column=0,h.end.column=R),this.remove(h)}},w.prototype.$moveLines=function(f,p,h){if(f=this.getRowFoldStart(f),p=this.getRowFoldEnd(p),h<0){var v=this.getRowFoldStart(f+h);if(v<0)return 0;var y=v-f}else if(h>0){var v=this.getRowFoldEnd(p+h);if(v>this.doc.getLength()-1)return 0;var y=v-p}else{f=this.$clipRowToDocument(f),p=this.$clipRowToDocument(p);var y=p-f+1}var L=new n(f,0,p,Number.MAX_VALUE),R=this.getFoldsInRange(L).map(function(I){return I=I.clone(),I.start.row+=y,I.end.row+=y,I}),_=h==0?this.doc.getLines(f,p):this.doc.removeFullLines(f,p);return this.doc.insertFullLines(f+y,_),R.length&&this.addFolds(R),y},w.prototype.moveLinesUp=function(f,p){return this.$moveLines(f,p,-1)},w.prototype.moveLinesDown=function(f,p){return this.$moveLines(f,p,1)},w.prototype.duplicateLines=function(f,p){return this.$moveLines(f,p,0)},w.prototype.$clipRowToDocument=function(f){return Math.max(0,Math.min(f,this.doc.getLength()-1))},w.prototype.$clipColumnToRow=function(f,p){return p<0?0:Math.min(this.doc.getLine(f).length,p)},w.prototype.$clipPositionToDocument=function(f,p){if(p=Math.max(0,p),f<0)f=0,p=0;else{var h=this.doc.getLength();f>=h?(f=h-1,p=this.doc.getLine(h-1).length):p=Math.min(this.doc.getLine(f).length,p)}return{row:f,column:p}},w.prototype.$clipRangeToDocument=function(f){f.start.row<0?(f.start.row=0,f.start.column=0):f.start.column=this.$clipColumnToRow(f.start.row,f.start.column);var p=this.doc.getLength()-1;return f.end.row>p?(f.end.row=p,f.end.column=this.doc.getLine(p).length):f.end.column=this.$clipColumnToRow(f.end.row,f.end.column),f},w.prototype.setUseWrapMode=function(f){if(f!=this.$useWrapMode){if(this.$useWrapMode=f,this.$modified=!0,this.$resetRowCache(0),f){var p=this.getLength();this.$wrapData=Array(p),this.$updateWrapData(0,p-1)}this._signal("changeWrapMode")}},w.prototype.getUseWrapMode=function(){return this.$useWrapMode},w.prototype.setWrapLimitRange=function(f,p){(this.$wrapLimitRange.min!==f||this.$wrapLimitRange.max!==p)&&(this.$wrapLimitRange={min:f,max:p},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},w.prototype.adjustWrapLimit=function(f,p){var h=this.$wrapLimitRange;h.max<0&&(h={min:p,max:p});var v=this.$constrainWrapLimit(f,h.min,h.max);return v!=this.$wrapLimit&&v>1?(this.$wrapLimit=v,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},w.prototype.$constrainWrapLimit=function(f,p,h){return p&&(f=Math.max(p,f)),h&&(f=Math.min(h,f)),f},w.prototype.getWrapLimit=function(){return this.$wrapLimit},w.prototype.setWrapLimit=function(f){this.setWrapLimitRange(f,f)},w.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},w.prototype.$updateInternalDataOnChange=function(f){var p=this.$useWrapMode,h=f.action,v=f.start,y=f.end,L=v.row,R=y.row,_=R-L,I=null;if(this.$updating=!0,_!=0)if(h==="remove"){this[p?"$wrapData":"$rowLengthCache"].splice(L,_);var N=this.$foldData;I=this.getFoldsInRange(f),this.removeFolds(I);var W=this.getFoldLine(y.row),O=0;if(W){W.addRemoveChars(y.row,y.column,v.column-y.column),W.shiftRow(-_);var D=this.getFoldLine(L);D&&D!==W&&(D.merge(W),W=D),O=N.indexOf(W)+1}for(O;O<N.length;O++){var W=N[O];W.start.row>=y.row&&W.shiftRow(-_)}R=L}else{var F=Array(_);F.unshift(L,0);var H=p?this.$wrapData:this.$rowLengthCache;H.splice.apply(H,F);var N=this.$foldData,W=this.getFoldLine(L),O=0;if(W){var P=W.range.compareInside(v.row,v.column);P==0?(W=W.split(v.row,v.column),W&&(W.shiftRow(_),W.addRemoveChars(R,0,y.column-v.column))):P==-1&&(W.addRemoveChars(L,0,y.column-v.column),W.shiftRow(_)),O=N.indexOf(W)+1}for(O;O<N.length;O++){var W=N[O];W.start.row>=L&&W.shiftRow(_)}}else{_=Math.abs(f.start.column-f.end.column),h==="remove"&&(I=this.getFoldsInRange(f),this.removeFolds(I),_=-_);var W=this.getFoldLine(L);W&&W.addRemoveChars(L,v.column,_)}return p&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,p?this.$updateWrapData(L,R):this.$updateRowLengthCache(L,R),I},w.prototype.$updateRowLengthCache=function(f,p){this.$rowLengthCache[f]=null,this.$rowLengthCache[p]=null},w.prototype.$updateWrapData=function(f,p){var h=this.doc.getAllLines(),v=this.getTabSize(),y=this.$wrapData,L=this.$wrapLimit,R,_,I=f;for(p=Math.min(p,h.length-1);I<=p;)_=this.getFoldLine(I,_),_?(R=[],_.walk((function(N,W,O,D){var F;if(N!=null){F=this.$getDisplayTokens(N,R.length),F[0]=m;for(var H=1;H<F.length;H++)F[H]=g}else F=this.$getDisplayTokens(h[W].substring(D,O),R.length);R=R.concat(F)}).bind(this),_.end.row,h[_.end.row].length+1),y[_.start.row]=this.$computeWrapSplits(R,L,v),I=_.end.row+1):(R=this.$getDisplayTokens(h[I]),y[I]=this.$computeWrapSplits(R,L,v),I++)},w.prototype.$computeWrapSplits=function(f,p,h){if(f.length==0)return[];var v=[],y=f.length,L=0,R=0,_=this.$wrapAsCode,I=this.$indentedSoftWrap,N=p<=Math.max(2*h,8)||I===!1?0:Math.floor(p/2);function W(){var P=0;if(N===0)return P;if(I)for(var U=0;U<f.length;U++){var j=f[U];if(j==$)P+=1;else if(j==T)P+=h;else{if(j==A)continue;break}}return _&&I!==!1&&(P+=h),Math.min(P,N)}function O(P){for(var U=P-L,j=L;j<P;j++){var V=f[j];(V===12||V===2)&&(U-=1)}v.length||(D=W(),v.indent=D),R+=U,v.push(R),L=P}for(var D=0;y-L>p-D;){var F=L+p-D;if(f[F-1]>=$&&f[F]>=$){O(F);continue}if(f[F]==m||f[F]==g){for(F;F!=L-1&&f[F]!=m;F--);if(F>L){O(F);continue}for(F=L+p,F;F<f.length&&f[F]==g;F++);if(F==f.length)break;O(F);continue}for(var H=Math.max(F-(p-(p>>2)),L-1);F>H&&f[F]<m;)F--;if(_){for(;F>H&&f[F]<m;)F--;for(;F>H&&f[F]==d;)F--}else for(;F>H&&f[F]<$;)F--;if(F>H){O(++F);continue}F=L+p,f[F]==b&&F--,O(F-D)}return v},w.prototype.$getDisplayTokens=function(f,p){var h=[],v;p=p||0;for(var y=0;y<f.length;y++){var L=f.charCodeAt(y);if(L==9){v=this.getScreenTabSize(h.length+p),h.push(T);for(var R=1;R<v;R++)h.push(A)}else L==32?h.push($):L>39&&L<48||L>57&&L<64?h.push(d):L>=4352&&C(L)?h.push(u,b):h.push(u)}return h},w.prototype.$getStringScreenWidth=function(f,p,h){if(p==0)return[0,0];p==null&&(p=1/0),h=h||0;var v,y;for(y=0;y<f.length&&(v=f.charCodeAt(y),v==9?h+=this.getScreenTabSize(h):v>=4352&&C(v)?h+=2:h+=1,!(h>p));y++);return[h,y]},w.prototype.getRowLength=function(f){var p=1;return this.lineWidgets&&(p+=this.lineWidgets[f]&&this.lineWidgets[f].rowCount||0),!this.$useWrapMode||!this.$wrapData[f]?p:this.$wrapData[f].length+p},w.prototype.getRowLineCount=function(f){return!this.$useWrapMode||!this.$wrapData[f]?1:this.$wrapData[f].length+1},w.prototype.getRowWrapIndent=function(f){if(this.$useWrapMode){var p=this.screenToDocumentPosition(f,Number.MAX_VALUE),h=this.$wrapData[p.row];return h.length&&h[0]<p.column?h.indent:0}else return 0},w.prototype.getScreenLastRowColumn=function(f){var p=this.screenToDocumentPosition(f,Number.MAX_VALUE);return this.documentToScreenColumn(p.row,p.column)},w.prototype.getDocumentLastRowColumn=function(f,p){var h=this.documentToScreenRow(f,p);return this.getScreenLastRowColumn(h)},w.prototype.getDocumentLastRowColumnPosition=function(f,p){var h=this.documentToScreenRow(f,p);return this.screenToDocumentPosition(h,Number.MAX_VALUE/10)},w.prototype.getRowSplitData=function(f){if(this.$useWrapMode)return this.$wrapData[f]},w.prototype.getScreenTabSize=function(f){return this.$tabSize-(f%this.$tabSize|0)},w.prototype.screenToDocumentRow=function(f,p){return this.screenToDocumentPosition(f,p).row},w.prototype.screenToDocumentColumn=function(f,p){return this.screenToDocumentPosition(f,p).column},w.prototype.screenToDocumentPosition=function(f,p,h){if(f<0)return{row:0,column:0};var v,y=0,L=0,R,_=0,I=0,N=this.$screenRowCache,W=this.$getRowCacheIndex(N,f),O=N.length;if(O&&W>=0)var _=N[W],y=this.$docRowCache[W],D=f>N[O-1];else var D=!O;for(var F=this.getLength()-1,H=this.getNextFoldLine(y),P=H?H.start.row:1/0;_<=f&&(I=this.getRowLength(y),!(_+I>f||y>=F));)_+=I,y++,y>P&&(y=H.end.row+1,H=this.getNextFoldLine(y,H),P=H?H.start.row:1/0),D&&(this.$docRowCache.push(y),this.$screenRowCache.push(_));if(H&&H.start.row<=y)v=this.getFoldDisplayLine(H),y=H.start.row;else{if(_+I<=f||y>F)return{row:F,column:this.getLine(F).length};v=this.getLine(y),H=null}var U=0,j=Math.floor(f-_);if(this.$useWrapMode){var V=this.$wrapData[y];V&&(R=V[j],j>0&&V.length&&(U=V.indent,L=V[j-1]||V[V.length-1],v=v.substring(L)))}return h!==void 0&&this.$bidiHandler.isBidiRow(_+j,y,j)&&(p=this.$bidiHandler.offsetToCol(h)),L+=this.$getStringScreenWidth(v,p-U)[1],this.$useWrapMode&&L>=R&&(L=R-1),H?H.idxToPosition(L):{row:y,column:L}},w.prototype.documentToScreenPosition=function(f,p){if(typeof p>"u")var h=this.$clipPositionToDocument(f.row,f.column);else h=this.$clipPositionToDocument(f,p);f=h.row,p=h.column;var v=0,y=null,L=null;L=this.getFoldAt(f,p,1),L&&(f=L.start.row,p=L.start.column);var R,_=0,I=this.$docRowCache,N=this.$getRowCacheIndex(I,f),W=I.length;if(W&&N>=0)var _=I[N],v=this.$screenRowCache[N],O=f>I[W-1];else var O=!W;for(var D=this.getNextFoldLine(_),F=D?D.start.row:1/0;_<f;){if(_>=F){if(R=D.end.row+1,R>f)break;D=this.getNextFoldLine(R,D),F=D?D.start.row:1/0}else R=_+1;v+=this.getRowLength(_),_=R,O&&(this.$docRowCache.push(_),this.$screenRowCache.push(v))}var H="";D&&_>=F?(H=this.getFoldDisplayLine(D,f,p),y=D.start.row):(H=this.getLine(f).substring(0,p),y=f);var P=0;if(this.$useWrapMode){var U=this.$wrapData[y];if(U){for(var j=0;H.length>=U[j];)v++,j++;H=H.substring(U[j-1]||0,H.length),P=j>0?U.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(v+=this.lineWidgets[_].rowsAbove),{row:v,column:P+this.$getStringScreenWidth(H)[0]}},w.prototype.documentToScreenColumn=function(f,p){return this.documentToScreenPosition(f,p).column},w.prototype.documentToScreenRow=function(f,p){return this.documentToScreenPosition(f,p).row},w.prototype.getScreenLength=function(){var f=0,p=null;if(this.$useWrapMode)for(var y=this.$wrapData.length,L=0,v=0,p=this.$foldData[v++],R=p?p.start.row:1/0;L<y;){var _=this.$wrapData[L];f+=_?_.length+1:1,L++,L>R&&(L=p.end.row+1,p=this.$foldData[v++],R=p?p.start.row:1/0)}else{f=this.getLength();for(var h=this.$foldData,v=0;v<h.length;v++)p=h[v],f-=p.end.row-p.start.row}return this.lineWidgets&&(f+=this.$getWidgetScreenLength()),f},w.prototype.$setFontMetrics=function(f){this.$enableVarChar&&(this.$getStringScreenWidth=function(p,h,v){if(h===0)return[0,0];h||(h=1/0),v=v||0;var y,L;for(L=0;L<p.length&&(y=p.charAt(L),y===" "?v+=this.getScreenTabSize(v):v+=f.getCharacterWidth(y),!(v>h));L++);return[v,L]})},w.prototype.getPrecedingCharacter=function(){var f=this.selection.getCursor();if(f.column===0)return f.row===0?"":this.doc.getNewLineCharacter();var p=this.getLine(f.row);return p[f.column-1]},w.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()},w})();l.$uid=0,l.prototype.$modes=a.$modes,l.prototype.getValue=l.prototype.toString,l.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},l.prototype.$overwrite=!1,l.prototype.$mode=null,l.prototype.$modeId=null,l.prototype.$scrollTop=0,l.prototype.$scrollLeft=0,l.prototype.$wrapLimit=80,l.prototype.$useWrapMode=!1,l.prototype.$wrapLimitRange={min:null,max:null},l.prototype.lineWidgets=null,l.prototype.isFullWidth=C,k.implement(l.prototype,c);var u=1,b=2,m=3,g=4,d=9,$=10,T=11,A=12;function C(w){return w<4352?!1:w>=4352&&w<=4447||w>=4515&&w<=4519||w>=4602&&w<=4607||w>=9001&&w<=9002||w>=11904&&w<=11929||w>=11931&&w<=12019||w>=12032&&w<=12245||w>=12272&&w<=12283||w>=12288&&w<=12350||w>=12353&&w<=12438||w>=12441&&w<=12543||w>=12549&&w<=12589||w>=12593&&w<=12686||w>=12688&&w<=12730||w>=12736&&w<=12771||w>=12784&&w<=12830||w>=12832&&w<=12871||w>=12880&&w<=13054||w>=13056&&w<=19903||w>=19968&&w<=42124||w>=42128&&w<=42182||w>=43360&&w<=43388||w>=44032&&w<=55203||w>=55216&&w<=55238||w>=55243&&w<=55291||w>=63744&&w<=64255||w>=65040&&w<=65049||w>=65072&&w<=65106||w>=65108&&w<=65126||w>=65128&&w<=65131||w>=65281&&w<=65376||w>=65504&&w<=65510}E("./edit_session/folding").Folding.call(l.prototype),E("./edit_session/bracket_match").BracketMatch.call(l.prototype),a.defineOptions(l.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var f=typeof w=="number"?w:null;this.setWrapLimitRange(f,f),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,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(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){w=parseInt(w),w>0&&this.$tabSize!==w&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(w){this.setFoldStyle(w)},handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId},handlesSet:!0}}),x.EditSession=l}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(E,x,z){var k=E("./lib/lang"),M=E("./lib/oop"),S=E("./range").Range,a=(function(){function o(){this.$options={}}return o.prototype.set=function(i){return M.mixin(this.$options,i),this},o.prototype.getOptions=function(){return k.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var n=this.$options,t=this.$matchIterator(i,n);if(!t)return!1;var e=null;return t.forEach(function(r,s,l,u){return e=new S(r,s,l,u),s==u&&n.start&&n.start.start&&n.skipCurrent!=!1&&e.isEqual(n.start)?(e=null,!1):!0}),e},o.prototype.findAll=function(i){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var t=n.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),r=[],s=n.re;if(n.$isMultiLine){var l=s.length,u=e.length-l,b;e:for(var m=s.offset||0;m<=u;m++){for(var g=0;g<l;g++)if(e[m+g].search(s[g])==-1)continue e;var d=e[m],$=e[m+l-1],T=d.length-d.match(s[0])[0].length,A=$.match(s[l-1])[0].length;b&&b.end.row===m&&b.end.column>T||(r.push(b=new S(m,T,m+l-1,A)),l>2&&(m=m+l-2))}}else for(var C=0;C<e.length;C++)for(var w=k.getMatchOffsets(e[C],s),g=0;g<w.length;g++){var f=w[g];r.push(new S(C,f.offset,C,f.offset+f.length))}if(t){for(var p=t.start.column,h=t.end.column,C=0,g=r.length-1;C<g&&r[C].start.column<p&&r[C].start.row==0;)C++;for(var v=t.end.row-t.start.row;C<g&&r[g].end.column>h&&r[g].end.row==v;)g--;for(r=r.slice(C,g+1),C=0,g=r.length;C<g;C++)r[C].start.row+=t.start.row,r[C].end.row+=t.start.row}return r},o.prototype.replace=function(i,n){var t=this.$options,e=this.$assembleRegExp(t);if(t.$isMultiLine)return n;if(e){var r=e.exec(i);if(!r||r[0].length!=i.length)return null;if(t.regExp||(n=n.replace(/\$/g,"$$$$")),n=i.replace(e,n),t.preserveCase){n=n.split("");for(var s=Math.min(i.length,i.length);s--;){var l=i[s];l&&l.toLowerCase()!=l?n[s]=n[s].toUpperCase():n[s]=n[s].toLowerCase()}n=n.join("")}return n}},o.prototype.$assembleRegExp=function(i,n){if(i.needle instanceof RegExp)return i.re=i.needle;var t=i.needle;if(!i.needle)return i.re=!1;i.regExp||(t=k.escapeRegExp(t));var e=i.caseSensitive?"gm":"gmi";try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,e+="u"}catch(s){i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=c(t,i)),i.$isMultiLine=!n&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,e);try{var r=new RegExp(t,e)}catch(s){r=!1}return i.re=r},o.prototype.$assembleMultilineRegExp=function(i,n){for(var t=i.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),e=[],r=0;r<t.length;r++)try{e.push(new RegExp(t[r],n))}catch(s){return!1}return e},o.prototype.$matchIterator=function(i,n){var t=this.$assembleRegExp(n);if(!t)return!1;var e=n.backwards==!0,r=n.skipCurrent!=!1,s=t.unicode,l=n.range,u=n.start;u||(u=l?l[e?"end":"start"]:i.selection.getRange()),u.start&&(u=u[r!=e?"end":"start"]);var b=l?l.start.row:0,m=l?l.end.row:i.getLength()-1;if(e)var g=function(T){var A=u.row;if(!$(A,u.column,T)){for(A--;A>=b;A--)if($(A,Number.MAX_VALUE,T))return;if(n.wrap!=!1){for(A=m,b=u.row;A>=b;A--)if($(A,Number.MAX_VALUE,T))return}}};else var g=function(A){var C=u.row;if(!$(C,u.column,A)){for(C=C+1;C<=m;C++)if($(C,0,A))return;if(n.wrap!=!1){for(C=b,m=u.row;C<=m;C++)if($(C,0,A))return}}};if(n.$isMultiLine)var d=t.length,$=function(T,A,C){var w=e?T-d+1:T;if(!(w<0||w+d>i.getLength())){var f=i.getLine(w),p=f.search(t[0]);if(!(!e&&p<A||p===-1)){for(var h=1;h<d;h++)if(f=i.getLine(w+h),f.search(t[h])==-1)return;var v=f.match(t[d-1])[0].length;if(!(e&&v>A)&&C(w,p,w+d-1,v))return!0}}};else if(e)var $=function(A,C,w){var f=i.getLine(A),p=[],h,v=0;for(t.lastIndex=0;h=t.exec(f);){var y=h[0].length;if(v=h.index,!y){if(v>=f.length)break;t.lastIndex=v+=k.skipEmptyMatch(f,v,s)}if(h.index+y>C)break;p.push(h.index,y)}for(var L=p.length-1;L>=0;L-=2){var R=p[L-1],y=p[L];if(w(A,R,A,R+y))return!0}};else var $=function(A,C,w){var f=i.getLine(A),p,h;for(t.lastIndex=C;h=t.exec(f);){var v=h[0].length;if(p=h.index,w(A,p,A,p+v))return!0;if(!v&&(t.lastIndex=p+=k.skipEmptyMatch(f,p,s),p>=f.length))return!1}};return{forEach:g}},o})();function c(o,i){var n=k.supportsLookbehind();function t(l,u){u===void 0&&(u=!0);var b=n&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(l)||i.regExp?n&&i.$supportsUnicodeFlag?u?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(o),r=e[0],s=e[e.length-1];return t(r)+o+t(s,!1)}x.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,z){var k=this&&this.__extends||(function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(r[l]=s[l])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),M=E("../lib/keys"),S=E("../lib/useragent"),a=M.KEY_MODS,c=(function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,r){this.platform=e||(S.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=r},n.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},n.prototype.removeCommand=function(t,e){var r=t&&(typeof t=="string"?t:t.name);t=this.commands[r],e||delete this.commands[r];var s=this.commandKeyBinding;for(var l in s){var u=s[l];if(u==t)delete s[l];else if(Array.isArray(u)){var b=u.indexOf(t);b!=-1&&(u.splice(b,1),u.length==1&&(s[l]=u[0]))}}},n.prototype.bindKey=function(t,e,r){if(typeof t=="object"&&t&&(r==null&&(r=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var l="";if(s.indexOf(" ")!=-1){var u=s.split(/\s+/);s=u.pop(),u.forEach(function(g){var d=this.parseKeys(g),$=a[d.hashId]+d.key;l+=(l?" ":"")+$,this._addCommandToBinding(l,"chainKeys")},this),l+=" "}var b=this.parseKeys(s),m=a[b.hashId]+b.key;this._addCommandToBinding(l+m,e,r)},this)}},n.prototype._addCommandToBinding=function(t,e,r){var s=this.commandKeyBinding,l;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(l=s[t].indexOf(e))!=-1&&s[t].splice(l,1):s[t]=[s[t]],typeof r!="number"&&(r=o(e));var u=s[t];for(l=0;l<u.length;l++){var b=u[l],m=o(b);if(m>r)break}u.splice(l,0,e)}},n.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var r=t[e];if(r){if(typeof r=="string")return this.bindKey(r,e);typeof r=="function"&&(r={exec:r}),typeof r=="object"&&(r.name||(r.name=e),this.addCommand(r))}},this)},n.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},n.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},n.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},n.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),r=e.pop(),s=M[r];if(M.FUNCTION_KEYS[s])r=M.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}else return{key:r,hashId:-1};for(var l=0,u=e.length;u--;){var b=M.KEY_MODS[e[u]];if(b==null)return typeof console<"u"&&console.error("invalid modifier "+e[u]+" in "+t),!1;l|=b}return{key:r,hashId:l}},n.prototype.findKeyCommand=function(t,e){var r=a[t]+e;return this.commandKeyBinding[r]},n.prototype.handleKeyboard=function(t,e,r,s){if(!(s<0)){var l=a[e]+r,u=this.commandKeyBinding[l];return t.$keyChain&&(t.$keyChain+=" "+l,u=this.commandKeyBinding[t.$keyChain]||u),u&&(u=="chainKeys"||u[u.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||l,{command:"null"}):(t.$keyChain&&((!e||e==4)&&r.length==1?t.$keyChain=t.$keyChain.slice(0,-l.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:u})}},n.prototype.getStatusText=function(t,e){return e.$keyChain||""},n})();function o(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var i=(function(n){k(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.$singleCommand=!0,s}return t})(c);i.call=function(n,t,e){c.prototype.$init.call(n,t,e,!0)},c.call=function(n,t,e){c.prototype.$init.call(n,t,e,!1)},x.HashHandler=i,x.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(E,x,z){var k=this&&this.__extends||(function(){var o=function(i,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})(),M=E("../lib/oop"),S=E("../keyboard/hash_handler").MultiHashHandler,a=E("../lib/event_emitter").EventEmitter,c=(function(o){k(i,o);function i(n,t){var e=o.call(this,t,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(r){return r.args?r.command.exec(r.editor,r.args,r.event,!1):r.command.exec(r.editor,{},r.event,!0)}),e}return i.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var r=n.length;r--;)if(this.exec(n[r],t,e))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!this.canExecute(n,t))return!1;var s={editor:t,command:n,args:e};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},i.prototype.canExecute=function(n,t){return typeof n=="string"&&(n=this.commands[n]),!(!n||t&&t.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(t))},i.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._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(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,n):this.exec(t[0],n,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(n){return n.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i})(S);M.implement(c.prototype,a),x.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(E,x,z){var k=E("../lib/lang"),M=E("../config"),S=E("../range").Range;function a(o,i){return{win:o,mac:i}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(o){M.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(o){M.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(o){M.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(o){M.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),n=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",n),n.isEmpty()||o.session.remove(n),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(o){M.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert(k.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(o){for(var i=o.selection.isBackwards(),n=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),t=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),e=o.session.doc.getLine(n.row).length,r=o.session.doc.getTextRange(o.selection.getRange()),s=r.replace(/\n\s*/," ").length,l=o.session.doc.getLine(n.row),u=n.row+1;u<=t.row+1;u++){var b=k.stringTrimLeft(k.stringTrimRight(o.session.doc.getLine(u)));b.length!==0&&(b=" "+b),l+=b}t.row+1<o.session.doc.getLength()-1&&(l+=o.session.doc.getNewLineCharacter()),o.clearSelection(),o.session.doc.replace(new S(n.row,0,t.row+2,0),l),s>0?(o.selection.moveCursorTo(n.row,n.column),o.selection.selectTo(n.row,n.column+s)):(e=o.session.doc.getLine(n.row).length>e?e+1:e,o.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(o){var i=o.session.doc.getLength()-1,n=o.session.doc.getLine(i).length,t=o.selection.rangeList.ranges,e=[];t.length<1&&(t=[o.selection.getRange()]);for(var r=0;r<t.length;r++)r==t.length-1&&(t[r].end.row===i&&t[r].end.column===n||e.push(new S(t[r].end.row,t[r].end.column,i,n))),r===0?t[r].start.row===0&&t[r].start.column===0||e.push(new S(0,0,t[r].start.row,t[r].start.column)):e.push(new S(t[r-1].end.row,t[r-1].end.column,t[r].start.row,t[r].start.column));o.exitMultiSelectMode(),o.clearSelection();for(var r=0;r<e.length;r++)o.selection.addRange(e[r],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(o){o.selection.clearSelection(),o.navigateLineEnd(),o.insert("\n")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(o){o.selection.clearSelection();var i=o.getCursorPosition();o.selection.moveTo(i.row-1,Number.MAX_VALUE),o.insert("\n"),i.row===0&&o.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(o){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),o.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(o){o.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(o){o.prompt({$type:"modes"})},readOnly:!0}];for(var c=1;c<9;c++)x.commands.push({name:"foldToLevel"+c,description:"Fold To Level "+c,level:c,exec:function(o){o.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("./lib/dom"),M=(function(){function S(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}return S.prototype.getRowLength=function(a){var c;return this.lineWidgets?c=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:c=0,!this.$useWrapMode||!this.$wrapData[a]?1+c:this.$wrapData[a].length+1+c},S.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(c){c&&c.rowCount&&!c.hidden&&(a+=c.rowCount)}),a},S.prototype.$onChangeEditor=function(a){this.attach(a.editor)},S.prototype.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},S.prototype.detach=function(a){var c=this.editor;if(c){this.editor=null,c.widgetManager=null,c.renderer.off("beforeRender",this.measureWidgets),c.renderer.off("afterRender",this.renderWidgets);var o=this.session.lineWidgets;o&&o.forEach(function(i){i&&i.el&&i.el.parentNode&&(i._inDocument=!1,i.el.parentNode.removeChild(i.el))})}},S.prototype.updateOnFold=function(a,c){var o=c.lineWidgets;if(!(!o||!a.action)){for(var i=a.data,n=i.start.row,t=i.end.row,e=a.action=="add",r=n+1;r<t;r++)o[r]&&(o[r].hidden=e);o[t]&&(e?o[n]?o[t].hidden=e:o[n]=o[t]:(o[n]==o[t]&&(o[n]=void 0),o[t].hidden=e))}},S.prototype.updateOnChange=function(a){var c=this.session.lineWidgets;if(c){var o=a.start.row,i=a.end.row-o;if(i!==0)if(a.action=="remove"){var n=c.splice(o+1,i);!c[o]&&n[n.length-1]&&(c[o]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var t=new Array(i);c[o]&&c[o].column!=null&&a.start.column>c[o].column&&o++,t.unshift(o,0),c.splice.apply(c,t),this.$updateRows()}}},S.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(o,i){if(o)for(c=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),c&&(this.session.lineWidgets=null)}},S.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},S.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=k.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=k.createElement("div"),a.el.textContent=a.text),a.el&&(k.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&k.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var o=this.session.getFoldAt(a.row,0);if(a.$fold=o,o){var i=this.session.lineWidgets;a.row==o.end.row&&!i[o.start.row]?i[o.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},S.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch(o){}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},S.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,o=c&&c[a],i=[];o;)i.push(o),o=o.$oldWidget;return i},S.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},S.prototype.measureWidgets=function(a,c){var o=this.session._changedWidgets,i=c.layerConfig;if(!(!o||!o.length)){for(var n=1/0,t=0;t<o.length;t++){var e=o[t];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,c.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/i.characterWidth));var r=e.h/i.lineHeight;e.coverLine&&(r-=this.session.getRowLineCount(e.row),r<0&&(r=0)),e.rowCount!=r&&(e.rowCount=r,e.row<n&&(n=e.row))}}n!=1/0&&(this.session._emit("changeFold",{data:{start:{row:n}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},S.prototype.renderWidgets=function(a,c){var o=c.layerConfig,i=this.session.lineWidgets;if(i){for(var n=Math.min(this.firstRow,o.firstRow),t=Math.max(this.lastRow,o.lastRow,i.length);n>0&&!i[n];)n--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,c.$cursorLayer.config=o;for(var e=n;e<=t;e++){var r=i[e];if(!(!r||!r.el)){if(r.hidden){r.el.style.top=-100-(r.pixelHeight||0)+"px";continue}r._inDocument||(r._inDocument=!0,c.container.appendChild(r.el));var s=c.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;r.coverLine||(s+=o.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=s-o.offset+"px";var l=r.coverGutter?0:c.gutterWidth;r.fixedWidth||(l-=c.scrollLeft),r.el.style.left=l+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=o.width+2*o.padding+"px"),r.fixedWidth?r.el.style.right=c.scrollBar.getWidth()+"px":r.el.style.right=""}}}},S})();x.LineWidgets=M}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(E,x,z){var k=E("../lib/keys"),M=E("../mouse/default_gutter_handler").GutterTooltip,S=(function(){function c(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new M(this.editor)}return c.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))},c.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))},c.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===k.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=k.enter)return;o.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(n),e=this.$findNearestAnnotation(n);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-n)<Math.abs(t-n)){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}else{this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(o),setTimeout((function(){this.editor._signal("gutterkeydown",new a(o,this))}).bind(this),10)},c.prototype.$handleGutterKeyboardInteraction=function(o){if(o.keyCode===k.tab){o.preventDefault();return}if(o.keyCode===k.escape){o.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(o.keyCode===k.up){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(o.keyCode===k.down){switch(o.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(o.keyCode===k.left){o.preventDefault(),this.$switchLane("annotation");return}if(o.keyCode===k.right){o.preventDefault(),this.$switchLane("fold");return}if(o.keyCode===k.enter||o.keyCode===k.space){switch(o.preventDefault(),this.activeLane){case"fold":if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="start"){var i=this.$rowIndexToRow(this.activeRowIndex);this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),o),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==i&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(i),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":var n=this.lines.cells[this.activeRowIndex].element.childNodes[2],t=n.getBoundingClientRect(),e=this.annotationTooltip.getElement().style;e.left=t.right+"px",e.top=t.bottom+"px",this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex));break}return}},c.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hideTooltip()},c.prototype.$isFoldWidgetVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),n=this.$getFoldWidget(o).style.display!=="none";return i&&n},c.prototype.$isAnnotationVisible=function(o){var i=this.editor.isRowFullyVisible(this.$rowIndexToRow(o)),n=this.$getAnnotation(o).style.display!=="none";return i&&n},c.prototype.$getFoldWidget=function(o){var i=this.lines.get(o),n=i.element;return n.childNodes[1]},c.prototype.$getAnnotation=function(o){var i=this.lines.get(o),n=i.element;return n.childNodes[2]},c.prototype.$findNearestFoldWidget=function(o){if(this.$isFoldWidgetVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isFoldWidgetVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+i))return o+i}return null},c.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var i=0;o-i>0||o+i<this.lines.getLength()-1;){if(i++,o-i>=0&&this.$isAnnotationVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+i))return o+i}return null},c.prototype.$focusFoldWidget=function(o){if(o!=null){var i=this.$getFoldWidget(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$focusAnnotation=function(o){if(o!=null){var i=this.$getAnnotation(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$blurFoldWidget=function(o){var i=this.$getFoldWidget(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$blurAnnotation=function(o){var i=this.$getAnnotation(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveAnnotationUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o<this.lines.getLength()-1;)if(o++,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$switchLane=function(o){switch(o){case"annotation":if(this.activeLane==="annotation")break;var i=this.$findNearestAnnotation(this.activeRowIndex);if(i==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=i,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var n=this.$findNearestFoldWidget(this.activeRowIndex);if(n==null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=n,this.$focusFoldWidget(this.activeRowIndex);break}},c.prototype.$rowIndexToRow=function(o){var i=this.lines.get(o);return i?i.row:null},c.prototype.$rowToRowIndex=function(o){for(var i=0;i<this.lines.getLength();i++){var n=this.lines.get(i);if(n.row==o)return i}return null},c})();x.GutterKeyboardHandler=S;var a=(function(){function c(o,i){this.gutterKeyboardHandler=i,this.domEvent=o}return c.prototype.getKey=function(){return k.keyCodeToString(this.domEvent.keyCode)},c.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},c.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},c.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},c})();x.GutterKeyboardEvent=a}),ace.define("ace/editor",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/line_widgets","ace/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys"],function(E,x,z){var k=this&&this.__values||function(p){var h=typeof Symbol=="function"&&Symbol.iterator,v=h&&p[h],y=0;if(v)return v.call(p);if(p&&typeof p.length=="number")return{next:function(){return p&&y>=p.length&&(p=void 0),{value:p&&p[y++],done:!p}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},M=E("./lib/oop"),S=E("./lib/dom"),a=E("./lib/lang"),c=E("./lib/useragent"),o=E("./keyboard/textinput").TextInput,i=E("./mouse/mouse_handler").MouseHandler,n=E("./mouse/fold_handler").FoldHandler,t=E("./keyboard/keybinding").KeyBinding,e=E("./edit_session").EditSession,r=E("./search").Search,s=E("./range").Range,l=E("./lib/event_emitter").EventEmitter,u=E("./commands/command_manager").CommandManager,b=E("./commands/default_commands").commands,m=E("./config"),g=E("./token_iterator").TokenIterator,d=E("./line_widgets").LineWidgets,$=E("./keyboard/gutter_handler").GutterKeyboardHandler,T=E("./config").nls,A=E("./clipboard"),C=E("./lib/keys"),w=(function(){function p(h,v,y){this.session,this.$toDestroy=[];var L=h.getContainerElement();this.container=L,this.renderer=h,this.id="editor"+ ++p.$uid,this.commands=new u(c.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new o(h.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(this)),this.keyBinding=new t(this),this.$search=new r().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(R,_){_._$emitInputEvent.schedule(31)}),this.setSession(v||y&&y.session||new e("")),m.resetOptions(this),y&&this.setOptions(y),m._signal("editor",this)}return p.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.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)},p.prototype.startOperation=function(h){if(this.curOp){if(!h||this.curOp.command)return;this.prevOp=this.curOp}h||(this.previousCommand=null,h={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:h.command||{},args:h.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},p.prototype.endOperation=function(h){if(this.curOp&&this.session){if(h&&h.returnValue===!1||!this.session)return this.curOp=null;if(h==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var v=this.curOp.command,y=v&&v.scrollIntoView;if(y){switch(y){case"center-animate":y="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var L=this.selection.getRange(),R=this.renderer.layerConfig;(L.start.row>=R.lastRow||L.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}y=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(_),this.prevOp=this.curOp,this.curOp=null}},p.prototype.$historyTracker=function(h){if(this.$mergeUndoDeltas){var v=this.prevOp,y=this.$mergeableCommands,L=v.command&&h.command.name==v.command.name;if(h.command.name=="insertstring"){var R=h.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),L=L&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(v.args)),this.mergeNextCommand=!0}else L=L&&y.indexOf(h.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(L=!1),L?this.session.mergeUndoDeltas=!0:y.indexOf(h.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},p.prototype.setKeyboardHandler=function(h,v){if(h&&typeof h=="string"&&h!="ace"){this.$keybindingId=h;var y=this;m.loadModule(["keybinding",h],function(L){y.$keybindingId==h&&y.keyBinding.setKeyboardHandler(L&&L.handler),v&&v()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(h),v&&v()},p.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},p.prototype.setSession=function(h){if(this.session!=h){this.curOp&&this.endOperation(),this.curOp={};var v=this.session;if(v){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var y=this.session.getSelection();y.off("changeCursor",this.$onCursorChange),y.off("changeSelection",this.$onSelectionChange)}this.session=h,h?(this.$onDocumentChange=this.onDocumentChange.bind(this),h.on("change",this.$onDocumentChange),this.renderer.setSession(h),this.$onChangeMode=this.onChangeMode.bind(this),h.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),h.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),h.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),h.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),h.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),h.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=h.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(h)),this._signal("changeSession",{session:h,oldSession:v}),this.curOp=null,v&&v._signal("changeEditor",{oldEditor:this}),h&&h._signal("changeEditor",{editor:this}),h&&!h.destroyed&&h.bgTokenizer.scheduleStart()}},p.prototype.getSession=function(){return this.session},p.prototype.setValue=function(h,v){return this.session.doc.setValue(h),v?v==1?this.navigateFileEnd():v==-1&&this.navigateFileStart():this.selectAll(),h},p.prototype.getValue=function(){return this.session.getValue()},p.prototype.getSelection=function(){return this.selection},p.prototype.resize=function(h){this.renderer.onResize(h)},p.prototype.setTheme=function(h,v){this.renderer.setTheme(h,v)},p.prototype.getTheme=function(){return this.renderer.getTheme()},p.prototype.setStyle=function(h){this.renderer.setStyle(h)},p.prototype.unsetStyle=function(h){this.renderer.unsetStyle(h)},p.prototype.getFontSize=function(){return this.getOption("fontSize")||S.computedStyle(this.container).fontSize},p.prototype.setFontSize=function(h){this.setOption("fontSize",h)},p.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var h=this;this.$highlightPending=!0,setTimeout(function(){h.$highlightPending=!1;var v=h.session;if(!(!v||v.destroyed)){v.$bracketHighlight&&(v.$bracketHighlight.markerIds.forEach(function(D){v.removeMarker(D)}),v.$bracketHighlight=null);var y=h.getCursorPosition(),L=h.getKeyboardHandler(),R=L&&L.$getDirectionForHighlight&&L.$getDirectionForHighlight(h),_=v.getMatchingBracketRanges(y,R);if(!_){var I=new g(v,y.row,y.column),N=I.getCurrentToken();if(N&&/\b(?:tag-open|tag-name)/.test(N.type)){var W=v.getMatchingTags(y);W&&(_=[W.openTagName.isEmpty()?W.openTag:W.openTagName,W.closeTagName.isEmpty()?W.closeTag:W.closeTagName])}}if(!_&&v.$mode.getMatching&&(_=v.$mode.getMatching(h.session)),!_){h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide();return}var O="ace_bracket";Array.isArray(_)?_.length==1&&(O="ace_error_bracket"):_=[_],_.length==2&&(s.comparePoints(_[0].end,_[1].start)==0?_=[s.fromPoints(_[0].start,_[1].end)]:s.comparePoints(_[0].start,_[1].end)==0&&(_=[s.fromPoints(_[1].start,_[0].end)])),v.$bracketHighlight={ranges:_,markerIds:_.map(function(D){return v.addMarker(D,O,"text")})},h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide()}},50)}},p.prototype.focus=function(){this.textInput.focus()},p.prototype.isFocused=function(){return this.textInput.isFocused()},p.prototype.blur=function(){this.textInput.blur()},p.prototype.onFocus=function(h){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",h))},p.prototype.onBlur=function(h){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",h))},p.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},p.prototype.onDocumentChange=function(h){var v=this.session.$useWrapMode,y=h.start.row==h.end.row?h.end.row:1/0;this.renderer.updateLines(h.start.row,y,v),this._signal("change",h),this.$cursorChange()},p.prototype.onTokenizerUpdate=function(h){var v=h.data;this.renderer.updateLines(v.first,v.last)},p.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},p.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},p.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},p.prototype.$updateHighlightActiveLine=function(){var h=this.getSession(),v;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(v=!1)),h.$highlightLineMarker&&!v)h.removeMarker(h.$highlightLineMarker.id),h.$highlightLineMarker=null;else if(!h.$highlightLineMarker&&v){var y=new s(v.row,v.column,v.row,1/0);y.id=h.addMarker(y,"ace_active-line","screenLine"),h.$highlightLineMarker=y}else v&&(h.$highlightLineMarker.start.row=v.row,h.$highlightLineMarker.end.row=v.row,h.$highlightLineMarker.start.column=v.column,h._signal("changeBackMarker"))},p.prototype.onSelectionChange=function(h){var v=this.session;if(v.$selectionMarker&&v.removeMarker(v.$selectionMarker),v.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var y=this.selection.getRange(),L=this.getSelectionStyle();v.$selectionMarker=v.addMarker(y,"ace_selection",L)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},p.prototype.$getSelectionHighLightRegexp=function(){var h=this.session,v=this.getSelectionRange();if(!(v.isEmpty()||v.isMultiLine())){var y=v.start.column,L=v.end.column,R=h.getLine(v.start.row),_=R.substring(y,L);if(!(_.length>5e3||!/[\w\d]/.test(_))){var I=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),N=R.substring(y-1,L+1);if(I.test(N))return I}}},p.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},p.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},p.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},p.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},p.prototype.onChangeMode=function(h){this.renderer.updateText(),this._emit("changeMode",h)},p.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},p.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},p.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},p.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},p.prototype.getCopyText=function(){var h=this.getSelectedText(),v=this.session.doc.getNewLineCharacter(),y=!1;if(!h&&this.$copyWithEmptySelection){y=!0;for(var L=this.selection.getAllRanges(),R=0;R<L.length;R++){var _=L[R];R&&L[R-1].start.row==_.start.row||(h+=this.session.getLine(_.start.row)+v)}}var I={text:h};return this._signal("copy",I),A.lineMode=y?I.text:!1,I.text},p.prototype.onCopy=function(){this.commands.exec("copy",this)},p.prototype.onCut=function(){this.commands.exec("cut",this)},p.prototype.onPaste=function(h,v){var y={text:h,event:v};this.commands.exec("paste",this,y)},p.prototype.$handlePaste=function(h){typeof h=="string"&&(h={text:h}),this._signal("paste",h);var v=h.text,y=v===A.lineMode,L=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)y?L.insert({row:this.selection.lead.row,column:0},v):this.insert(v);else if(y)this.selection.rangeList.ranges.forEach(function(O){L.insert({row:O.start.row,column:0},v)});else{var R=v.split(/\r\n|\r|\n/),_=this.selection.rangeList.ranges,I=R.length==2&&(!R[0]||!R[1]);if(R.length!=_.length||I)return this.commands.exec("insertstring",this,v);for(var N=_.length;N--;){var W=_[N];W.isEmpty()||L.remove(W),L.insert(W.start,R[N])}}},p.prototype.execCommand=function(h,v){return this.commands.exec(h,this,v)},p.prototype.insert=function(h,v){var y=this.session,L=y.getMode(),R=this.getCursorPosition();if(this.getBehavioursEnabled()&&!v){var _=L.transformAction(y.getState(R.row),"insertion",this,y,h);_&&(h!==_.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),h=_.text)}if(h==" "&&(h=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&h.indexOf("\n")==-1){var I=s.fromPoints(R,R);I.end.column+=h.length,this.session.remove(I)}}else{var I=this.getSelectionRange();R=this.session.remove(I),this.clearSelection()}if(h=="\n"||h=="\r\n"){var D=y.getLine(R.row);if(R.column>D.search(/\S|$/)){var N=D.substr(R.column).search(/\S|$/);y.doc.removeInLine(R.row,R.column,R.column+N)}}this.clearSelection();var W=R.column,O=y.getState(R.row),D=y.getLine(R.row),F=L.checkOutdent(O,D,h);if(y.insert(R,h),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new s(R.row,W+_.selection[0],R.row,W+_.selection[1])):this.selection.setSelectionRange(new s(R.row+_.selection[0],_.selection[1],R.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(y.getDocument().isNewLine(h)){var H=L.getNextLineIndent(O,D.slice(0,R.column),y.getTabString());y.insert({row:R.row+1,column:0},H)}F&&L.autoOutdent(O,y,R.row)}},p.prototype.autoIndent=function(){for(var h=this.session,v=h.getMode(),y=this.selection.isEmpty()?[new s(0,0,h.doc.getLength()-1,0)]:this.selection.getAllRanges(),L="",R="",_="",I=h.getTabString(),N=0;N<y.length;N++)for(var W=y[N].start.row,O=y[N].end.row,D=W;D<=O;D++){D>0&&(L=h.getState(D-1),R=h.getLine(D-1),_=v.getNextLineIndent(L,R,I));var F=h.getLine(D),H=v.$getIndent(F);if(_!==H){if(H.length>0){var P=new s(D,0,D,H.length);h.remove(P)}_.length>0&&h.insert({row:D,column:0},_)}v.autoOutdent(L,h,D)}},p.prototype.onTextInput=function(h,v){if(!v)return this.keyBinding.onTextInput(h);this.startOperation({command:{name:"insertstring"}});var y=this.applyComposition.bind(this,h,v);this.selection.rangeCount?this.forEachSelection(y):y(),this.endOperation()},p.prototype.applyComposition=function(h,v){if(v.extendLeft||v.extendRight){var y=this.selection.getRange();y.start.column-=v.extendLeft,y.end.column+=v.extendRight,y.start.column<0&&(y.start.row--,y.start.column+=this.session.getLine(y.start.row).length+1),this.selection.setRange(y),!h&&!y.isEmpty()&&this.remove()}if((h||!this.selection.isEmpty())&&this.insert(h,!0),v.restoreStart||v.restoreEnd){var y=this.selection.getRange();y.start.column-=v.restoreStart,y.end.column-=v.restoreEnd,this.selection.setRange(y)}},p.prototype.onCommandKey=function(h,v,y){return this.keyBinding.onCommandKey(h,v,y)},p.prototype.setOverwrite=function(h){this.session.setOverwrite(h)},p.prototype.getOverwrite=function(){return this.session.getOverwrite()},p.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},p.prototype.setScrollSpeed=function(h){this.setOption("scrollSpeed",h)},p.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},p.prototype.setDragDelay=function(h){this.setOption("dragDelay",h)},p.prototype.getDragDelay=function(){return this.getOption("dragDelay")},p.prototype.setSelectionStyle=function(h){this.setOption("selectionStyle",h)},p.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},p.prototype.setHighlightActiveLine=function(h){this.setOption("highlightActiveLine",h)},p.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},p.prototype.setHighlightGutterLine=function(h){this.setOption("highlightGutterLine",h)},p.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},p.prototype.setHighlightSelectedWord=function(h){this.setOption("highlightSelectedWord",h)},p.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},p.prototype.setAnimatedScroll=function(h){this.renderer.setAnimatedScroll(h)},p.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},p.prototype.setShowInvisibles=function(h){this.renderer.setShowInvisibles(h)},p.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},p.prototype.setDisplayIndentGuides=function(h){this.renderer.setDisplayIndentGuides(h)},p.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},p.prototype.setHighlightIndentGuides=function(h){this.renderer.setHighlightIndentGuides(h)},p.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},p.prototype.setShowPrintMargin=function(h){this.renderer.setShowPrintMargin(h)},p.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},p.prototype.setPrintMarginColumn=function(h){this.renderer.setPrintMarginColumn(h)},p.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},p.prototype.setReadOnly=function(h){this.setOption("readOnly",h)},p.prototype.getReadOnly=function(){return this.getOption("readOnly")},p.prototype.setBehavioursEnabled=function(h){this.setOption("behavioursEnabled",h)},p.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},p.prototype.setWrapBehavioursEnabled=function(h){this.setOption("wrapBehavioursEnabled",h)},p.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},p.prototype.setShowFoldWidgets=function(h){this.setOption("showFoldWidgets",h)},p.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},p.prototype.setFadeFoldWidgets=function(h){this.setOption("fadeFoldWidgets",h)},p.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},p.prototype.remove=function(h){this.selection.isEmpty()&&(h=="left"?this.selection.selectLeft():this.selection.selectRight());var v=this.getSelectionRange();if(this.getBehavioursEnabled()){var y=this.session,L=y.getState(v.start.row),R=y.getMode().transformAction(L,"deletion",this,y,v);if(v.end.column===0){var _=y.getTextRange(v);if(_[_.length-1]=="\n"){var I=y.getLine(v.end.row);/^\s+$/.test(I)&&(v.end.column=I.length)}}R&&(v=R)}this.session.remove(v),this.clearSelection()},p.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var h=this.getSelectionRange();h.start.column==h.end.column&&h.start.row==h.end.row&&(h.end.column=0,h.end.row++),this.session.remove(h),this.clearSelection()},p.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var h=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(h)},p.prototype.setGhostText=function(h,v){this.session.widgetManager||(this.session.widgetManager=new d(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(h,v)},p.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},p.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var h=this.getCursorPosition(),v=h.column;if(v!==0){var y=this.session.getLine(h.row),L,R;v<y.length?(L=y.charAt(v)+y.charAt(v-1),R=new s(h.row,v-1,h.row,v+1)):(L=y.charAt(v-1)+y.charAt(v-2),R=new s(h.row,v-2,h.row,v)),this.session.replace(R,L),this.session.selection.moveToPosition(R.end)}}},p.prototype.toLowerCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),y=this.session.getTextRange(v);this.session.replace(v,y.toLowerCase()),this.selection.setSelectionRange(h)},p.prototype.toUpperCase=function(){var h=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var v=this.getSelectionRange(),y=this.session.getTextRange(v);this.session.replace(v,y.toUpperCase()),this.selection.setSelectionRange(h)},p.prototype.indent=function(){var h=this.session,v=this.getSelectionRange();if(v.start.row<v.end.row){var y=this.$getSelectedRows();h.indentRows(y.first,y.last," ");return}else if(v.start.column<v.end.column){var L=h.getTextRange(v);if(!/^\s+$/.test(L)){var y=this.$getSelectedRows();h.indentRows(y.first,y.last," ");return}}var R=h.getLine(v.start.row),_=v.start,I=h.getTabSize(),N=h.documentToScreenColumn(_.row,_.column);if(this.session.getUseSoftTabs())var W=I-N%I,O=a.stringRepeat(" ",W);else{for(var W=N%I;R[v.start.column-1]==" "&&W;)v.start.column--,W--;this.selection.setSelectionRange(v),O=" "}return this.insert(O)},p.prototype.blockIndent=function(){var h=this.$getSelectedRows();this.session.indentRows(h.first,h.last," ")},p.prototype.blockOutdent=function(){var h=this.session.getSelection();this.session.outdentRows(h.getRange())},p.prototype.sortLines=function(){for(var h=this.$getSelectedRows(),v=this.session,y=[],L=h.first;L<=h.last;L++)y.push(v.getLine(L));y.sort(function(I,N){return I.toLowerCase()<N.toLowerCase()?-1:I.toLowerCase()>N.toLowerCase()?1:0});for(var R=new s(0,0,0,0),L=h.first;L<=h.last;L++){var _=v.getLine(L);R.start.row=L,R.end.row=L,R.end.column=_.length,v.replace(R,y[L-h.first])}},p.prototype.toggleCommentLines=function(){var h=this.session.getState(this.getCursorPosition().row),v=this.$getSelectedRows();this.session.getMode().toggleCommentLines(h,this.session,v.first,v.last)},p.prototype.toggleBlockComment=function(){var h=this.getCursorPosition(),v=this.session.getState(h.row),y=this.getSelectionRange();this.session.getMode().toggleBlockComment(v,this.session,y,h)},p.prototype.getNumberAt=function(h,v){var y=/[\-]?[0-9]+(?:\.[0-9]+)?/g;y.lastIndex=0;for(var L=this.session.getLine(h);y.lastIndex<v;){var R=y.exec(L);if(R.index<=v&&R.index+R[0].length>=v){var _={value:R[0],start:R.index,end:R.index+R[0].length};return _}}return null},p.prototype.modifyNumber=function(h){var v=this.selection.getCursor().row,y=this.selection.getCursor().column,L=new s(v,y-1,v,y),R=this.session.getTextRange(L);if(!isNaN(parseFloat(R))&&isFinite(R)){var _=this.getNumberAt(v,y);if(_){var I=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,N=_.start+_.value.length-I,W=parseFloat(_.value);W*=Math.pow(10,N),I!==_.end&&y<I?h*=Math.pow(10,_.end-y-1):h*=Math.pow(10,_.end-y),W+=h,W/=Math.pow(10,N);var O=W.toFixed(N),D=new s(v,_.start,v,_.end);this.session.replace(D,O),this.moveCursorTo(v,Math.max(_.start+1,y+O.length-_.value.length))}}else this.toggleWord()},p.prototype.toggleWord=function(){var h=this.selection.getCursor().row,v=this.selection.getCursor().column;this.selection.selectWord();var y=this.getSelectedText(),L=this.selection.getWordRange().start.column,R=y.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),_=v-L-1;_<0&&(_=0);var I=0,N=0,W=this;y.match(/[A-Za-z0-9_]+/)&&R.forEach(function(Y,Z){N=I+Y.length,_>=I&&_<=N&&(y=Y,W.selection.clearSelection(),W.moveCursorTo(h,I+L),W.selection.selectTo(h,N+L)),I=N});for(var O=this.$toggleWordPairs,D,F=0;F<O.length;F++)for(var H=O[F],P=0;P<=1;P++){var U=+!P,j=y.match(new RegExp("^\\s?_?("+a.escapeRegExp(H[P])+")\\s?$","i"));if(j){var V=y.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(j[1])+")($|\\s)","g"));V&&(D=y.replace(new RegExp(a.escapeRegExp(H[P]),"i"),function(Y){var Z=H[U];return Y.toUpperCase()==Y?Z=Z.toUpperCase():Y.charAt(0).toUpperCase()==Y.charAt(0)&&(Z=Z.substr(0,0)+H[U].charAt(0).toUpperCase()+Z.substr(1)),Z}),this.insert(D),D="")}}},p.prototype.findLinkAt=function(h,v){var y,L,R=this.session.getLine(h),_=R.split(/((?:https?|ftp):\/\/[\S]+)/),I=v;I<0&&(I=0);var N=0,W=0,O;try{for(var D=k(_),F=D.next();!F.done;F=D.next()){var H=F.value;if(W=N+H.length,I>=N&&I<=W&&H.match(/((?:https?|ftp):\/\/[\S]+)/)){O=H.replace(/[\s:.,'";}\]]+$/,"");break}N=W}}catch(P){y={error:P}}finally{try{F&&!F.done&&(L=D.return)&&L.call(D)}finally{if(y)throw y.error}}return O},p.prototype.openLink=function(){var h=this.selection.getCursor(),v=this.findLinkAt(h.row,h.column);return v&&window.open(v,"_blank"),v!=null},p.prototype.removeLines=function(){var h=this.$getSelectedRows();this.session.removeFullLines(h.first,h.last),this.clearSelection()},p.prototype.duplicateSelection=function(){var h=this.selection,v=this.session,y=h.getRange(),L=h.isBackwards();if(y.isEmpty()){var R=y.start.row;v.duplicateLines(R,R)}else{var _=L?y.start:y.end,I=v.insert(_,v.getTextRange(y));y.start=_,y.end=I,h.setSelectionRange(y,L)}},p.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},p.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},p.prototype.moveText=function(h,v,y){return this.session.moveText(h,v,y)},p.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},p.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},p.prototype.$moveLines=function(h,v){var y,L,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var _=R.toOrientedRange();y=this.$getSelectedRows(_),L=this.session.$moveLines(y.first,y.last,v?0:h),v&&h==-1&&(L=0),_.moveBy(L,0),R.fromOrientedRange(_)}else{var I=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var N=0,W=0,O=I.length,D=0;D<O;D++){var F=D;I[D].moveBy(N,0),y=this.$getSelectedRows(I[D]);for(var H=y.first,P=y.last;++D<O;){W&&I[D].moveBy(W,0);var U=this.$getSelectedRows(I[D]);if(v&&U.first!=P)break;if(!v&&U.first>P+1)break;P=U.last}for(D--,N=this.session.$moveLines(H,P,v?0:h),v&&h==-1&&(F=D+1);F<=D;)I[F].moveBy(N,0),F++;v||(N=0),W+=N}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},p.prototype.$getSelectedRows=function(h){return h=(h||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(h.start.row),last:this.session.getRowFoldEnd(h.end.row)}},p.prototype.onCompositionStart=function(h){this.renderer.showComposition(h)},p.prototype.onCompositionUpdate=function(h){this.renderer.setCompositionText(h)},p.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},p.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},p.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},p.prototype.isRowVisible=function(h){return h>=this.getFirstVisibleRow()&&h<=this.getLastVisibleRow()},p.prototype.isRowFullyVisible=function(h){return h>=this.renderer.getFirstFullyVisibleRow()&&h<=this.renderer.getLastFullyVisibleRow()},p.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},p.prototype.$moveByPage=function(h,v){var y=this.renderer,L=this.renderer.layerConfig,R=h*Math.floor(L.height/L.lineHeight);v===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):v===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var _=y.scrollTop;y.scrollBy(0,R*L.lineHeight),v!=null&&y.scrollCursorIntoView(null,.5),y.animateScrolling(_)},p.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},p.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},p.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},p.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},p.prototype.scrollPageDown=function(){this.$moveByPage(1)},p.prototype.scrollPageUp=function(){this.$moveByPage(-1)},p.prototype.scrollToRow=function(h){this.renderer.scrollToRow(h)},p.prototype.scrollToLine=function(h,v,y,L){this.renderer.scrollToLine(h,v,y,L)},p.prototype.centerSelection=function(){var h=this.getSelectionRange(),v={row:Math.floor(h.start.row+(h.end.row-h.start.row)/2),column:Math.floor(h.start.column+(h.end.column-h.start.column)/2)};this.renderer.alignCursor(v,.5)},p.prototype.getCursorPosition=function(){return this.selection.getCursor()},p.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},p.prototype.getSelectionRange=function(){return this.selection.getRange()},p.prototype.selectAll=function(){this.selection.selectAll()},p.prototype.clearSelection=function(){this.selection.clearSelection()},p.prototype.moveCursorTo=function(h,v){this.selection.moveCursorTo(h,v)},p.prototype.moveCursorToPosition=function(h){this.selection.moveCursorToPosition(h)},p.prototype.jumpToMatching=function(h,v){var y=this.getCursorPosition(),L=new g(this.session,y.row,y.column),R=L.getCurrentToken(),_=0;R&&R.type.indexOf("tag-name")!==-1&&(R=L.stepBackward());var I=R||L.stepForward();if(I){var N,W=!1,O={},D=y.column-I.start,F,H={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(I.value.match(/[{}()\[\]]/g)){for(;D<I.value.length&&!W;D++)if(H[I.value[D]])switch(F=H[I.value[D]]+"."+I.type.replace("rparen","lparen"),isNaN(O[F])&&(O[F]=0),I.value[D]){case"(":case"[":case"{":O[F]++;break;case")":case"]":case"}":O[F]--,O[F]===-1&&(N="bracket",W=!0);break}}else I.type.indexOf("tag-name")!==-1&&(isNaN(O[I.value])&&(O[I.value]=0),R.value==="<"&&_>1?O[I.value]++:R.value==="</"&&O[I.value]--,O[I.value]===-1&&(N="tag",W=!0));W||(R=I,_++,I=L.stepForward(),D=0)}while(I&&!W);if(N){var P,U;if(N==="bracket")P=this.session.getBracketRange(y),P||(P=new s(L.getCurrentTokenRow(),L.getCurrentTokenColumn()+D-1,L.getCurrentTokenRow(),L.getCurrentTokenColumn()+D-1),U=P.start,(v||U.row===y.row&&Math.abs(U.column-y.column)<2)&&(P=this.session.getBracketRange(U)));else if(N==="tag"){if(!I||I.type.indexOf("tag-name")===-1)return;if(P=new s(L.getCurrentTokenRow(),L.getCurrentTokenColumn()-2,L.getCurrentTokenRow(),L.getCurrentTokenColumn()-2),P.compare(y.row,y.column)===0){var j=this.session.getMatchingTags(y);j&&(j.openTag.contains(y.row,y.column)?(P=j.closeTag,U=P.start):(P=j.openTag,j.closeTag.start.row===y.row&&j.closeTag.start.column===y.column?U=P.end:U=P.start))}U=U||P.start}U=P&&P.cursor||U,U&&(h?P&&v?this.selection.setRange(P):P&&P.isEqual(this.getSelectionRange())?this.clearSelection():this.selection.selectTo(U.row,U.column):this.selection.moveTo(U.row,U.column))}}},p.prototype.gotoLine=function(h,v,y){this.selection.clearSelection(),this.session.unfold({row:h-1,column:v||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(h-1,v||0),this.isRowFullyVisible(h-1)||this.scrollToLine(h-1,!0,y)},p.prototype.navigateTo=function(h,v){this.selection.moveTo(h,v)},p.prototype.navigateUp=function(h){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(-h||-1,0)},p.prototype.navigateDown=function(h){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var v=this.selection.anchor.getPosition();return this.moveCursorToPosition(v)}this.selection.clearSelection(),this.selection.moveCursorBy(h||1,0)},p.prototype.navigateLeft=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorLeft();else{var v=this.getSelectionRange().start;this.moveCursorToPosition(v)}this.clearSelection()},p.prototype.navigateRight=function(h){if(this.selection.isEmpty())for(h=h||1;h--;)this.selection.moveCursorRight();else{var v=this.getSelectionRange().end;this.moveCursorToPosition(v)}this.clearSelection()},p.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},p.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},p.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},p.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},p.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},p.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},p.prototype.replace=function(h,v){v&&this.$search.set(v);var y=this.$search.find(this.session),L=0;return y&&(this.$tryReplace(y,h)&&(L=1),this.selection.setSelectionRange(y),this.renderer.scrollSelectionIntoView(y.start,y.end)),L},p.prototype.replaceAll=function(h,v){v&&this.$search.set(v);var y=this.$search.findAll(this.session),L=0;if(!y.length)return L;var R=this.getSelectionRange();this.selection.moveTo(0,0);for(var _=y.length-1;_>=0;--_)this.$tryReplace(y[_],h)&&L++;return this.selection.setSelectionRange(R),L},p.prototype.$tryReplace=function(h,v){var y=this.session.getTextRange(h);return v=this.$search.replace(y,v),v!==null?(h.end=this.session.replace(h,v),h):null},p.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},p.prototype.find=function(h,v,y){v||(v={}),typeof h=="string"||h instanceof RegExp?v.needle=h:typeof h=="object"&&M.mixin(v,h);var L=this.selection.getRange();v.needle==null&&(h=this.session.getTextRange(L)||this.$search.$options.needle,h||(L=this.session.getWordRange(L.start.row,L.start.column),h=this.session.getTextRange(L)),this.$search.set({needle:h})),this.$search.set(v),v.start||this.$search.set({start:L});var R=this.$search.find(this.session);if(v.preventScroll)return R;if(R)return this.revealRange(R,y),R;v.backwards?L.start=L.end:L.end=L.start,this.selection.setRange(L)},p.prototype.findNext=function(h,v){this.find({skipCurrent:!0,backwards:!1},h,v)},p.prototype.findPrevious=function(h,v){this.find(h,{skipCurrent:!0,backwards:!0},v)},p.prototype.revealRange=function(h,v){this.session.unfold(h),this.selection.setSelectionRange(h);var y=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(h.start,h.end,.5),v!==!1&&this.renderer.animateScrolling(y)},p.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(h){h.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()},p.prototype.setAutoScrollEditorIntoView=function(h){if(h){var v,y=this,L=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var _=this.on("changeSelection",function(){L=!0}),I=this.renderer.on("beforeRender",function(){L&&(v=y.renderer.container.getBoundingClientRect())}),N=this.renderer.on("afterRender",function(){if(L&&v&&(y.isFocused()||y.searchBox&&y.searchBox.isFocused())){var W=y.renderer,O=W.$cursorLayer.$pixelPos,D=W.layerConfig,F=O.top-D.offset;O.top>=0&&F+v.top<0?L=!0:O.top<D.height&&O.top+v.top+D.lineHeight>window.innerHeight?L=!1:L=null,L!=null&&(R.style.top=F+"px",R.style.left=O.left+"px",R.style.height=D.lineHeight+"px",R.scrollIntoView(L)),L=v=null}});this.setAutoScrollEditorIntoView=function(W){W||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",N),this.renderer.off("beforeRender",I))}}},p.prototype.$resetCursorStyle=function(){var h=this.$cursorStyle||"ace",v=this.renderer.$cursorLayer;v&&(v.setSmoothBlinking(/smooth/.test(h)),v.isBlinking=!this.$readOnly&&h!="wide",S.setCssClass(v.element,"ace_slim-cursors",/slim/.test(h)))},p.prototype.prompt=function(h,v,y){var L=this;m.loadModule("ace/ext/prompt",function(R){R.prompt(L,h,v,y)})},p})();w.$uid=0,w.prototype.curOp=null,w.prototype.prevOp={},w.prototype.$mergeableCommands=["backspace","del","insertstring"],w.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"],["&&","||"],["==","!="]],M.implement(w.prototype,l),m.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(p){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:p})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(p){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(p){this.textInput.setReadOnly(p),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(p){this.textInput.setCopyWithEmptySelection(p)},initialValue:!1},cursorStyle:{set:function(p){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(p){this.setAutoScrollEditorIntoView(p)}},keyboardHandler:{set:function(p){this.setKeyboardHandler(p)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(p){this.session.setValue(p)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(p){this.setSession(p)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(p){this.renderer.$gutterLayer.setShowLineNumbers(p),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),p&&this.$relativeLineNumbers?f.attach(this):f.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(p){this.$showLineNumbers&&p?f.attach(this):f.detach(this)}},placeholder:{set:function(p){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var h=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(h&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),S.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!h&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),S.addCssClass(this.container,"ace_hasPlaceholder");var v=S.createElement("div");v.className="ace_placeholder",v.textContent=this.$placeholder||"",this.renderer.placeholderNode=v,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!h&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(p){var h={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(L){L.blur(),L.renderer.scroller.focus()},readOnly:!0},v=function(L){if(L.target==this.renderer.scroller&&L.keyCode===C.enter){L.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},y;p?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",v.bind(this)),this.commands.addCommand(h),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",T("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",T("editor.gutter.aria-label","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),y||(y=new $(this)),y.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(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",v.bind(this)),this.commands.removeCommand(h),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),y&&y.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(p){this.$textInputAriaLabel=p},initialValue:""},enableMobileMenu:{set:function(p){this.$enableMobileMenu=p},initialValue:!0},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 f={getText:function(p,h){return(Math.abs(p.selection.lead.row-h)||h+1+(h<9?"·":""))+""},getWidth:function(p,h,v){return Math.max(h.toString().length,(v.lastRow+1).toString().length,2)*v.characterWidth},update:function(p,h){h.renderer.$loop.schedule(h.renderer.CHANGE_GUTTER)},attach:function(p){p.renderer.$gutterLayer.$renderer=this,p.on("changeSelection",this.update),this.update(null,p)},detach:function(p){p.renderer.$gutterLayer.$renderer==this&&(p.renderer.$gutterLayer.$renderer=null),p.off("changeSelection",this.update),this.update(null,p)}};x.Editor=w}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("../lib/dom"),M=(function(){function S(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return S.prototype.moveContainer=function(a){k.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},S.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},S.prototype.computeLineTop=function(a,c,o){var i=c.firstRowScreen*c.lineHeight,n=Math.floor(i/this.canvasHeight),t=o.documentToScreenRow(a,0)*c.lineHeight;return t-n*this.canvasHeight},S.prototype.computeLineHeight=function(a,c,o){return c.lineHeight*o.getRowLineCount(a)},S.prototype.getLength=function(){return this.cells.length},S.prototype.get=function(a){return this.cells[a]},S.prototype.shift=function(){this.$cacheCell(this.cells.shift())},S.prototype.pop=function(){this.$cacheCell(this.cells.pop())},S.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=k.createFragment(this.element),o=0;o<a.length;o++)c.appendChild(a[o].element);this.element.appendChild(c)}else this.cells.push(a),this.element.appendChild(a.element)},S.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var c=k.createFragment(this.element),o=0;o<a.length;o++)c.appendChild(a[o].element);this.element.firstChild?this.element.insertBefore(c,this.element.firstChild):this.element.appendChild(c)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},S.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},S.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},S.prototype.createCell=function(a,c,o,i){var n=this.cellCache.pop();if(!n){var t=k.createElement("div");i&&i(t),this.element.appendChild(t),n={element:t,text:"",row:a}}return n.row=a,n},S})();x.Lines=M}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/layer/lines","ace/config"],function(E,x,z){var k=E("../lib/dom"),M=E("../lib/oop"),S=E("../lib/lang"),a=E("../lib/event_emitter").EventEmitter,c=E("./lines").Lines,o=E("../config").nls,i=(function(){function t(e){this.element=k.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 c(this.element),this.$lines.$offsetCoefficient=1}return t.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},t.prototype.addGutterDecoration=function(e,r){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,r)},t.prototype.removeGutterDecoration=function(e,r){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,r)},t.prototype.setAnnotations=function(e){this.$annotations=[];for(var r=0;r<e.length;r++){var s=e[r],l=s.row,u=this.$annotations[l];u||(u=this.$annotations[l]={text:[],type:[],displayText:[]});var b=s.text,m=s.text,g=s.type;b=b?S.escapeHTML(b):s.html||"",m=m||s.html||"",u.text.indexOf(b)===-1&&(u.text.push(b),u.type.push(g),u.displayText.push(m));var d=s.className;d?u.className=d:g==="error"?u.className=" ace_error":g==="security"&&!/\bace_error\b/.test(u.className)?u.className=" ace_security":g==="warning"&&!/\bace_(error|security)\b/.test(u.className)?u.className=" ace_warning":g==="info"&&!u.className?u.className=" ace_info":g==="hint"&&!u.className&&(u.className=" ace_hint")}},t.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var r=e.start.row,s=e.end.row-r;if(s!==0)if(e.action=="remove")this.$annotations.splice(r,s+1,null);else{var l=new Array(s+1);l.unshift(r,1),this.$annotations.splice.apply(this.$annotations,l)}}},t.prototype.update=function(e){this.config=e;var r=this.session,s=e.firstRow,l=Math.min(e.lastRow+e.gutterOffset,r.getLength()-1);this.oldLastRow=l,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var u=r.getNextFoldLine(s),b=u?u.start.row:1/0,m=null,g=-1,d=s;;){if(d>b&&(d=u.end.row+1,u=r.getNextFoldLine(d,u),b=u?u.start.row:1/0),d>l){for(;this.$lines.getLength()>g+1;)this.$lines.pop();break}m=this.$lines.get(++g),m?m.row=d:(m=this.$lines.createCell(d,e,this.session,n),this.$lines.push(m)),this.$renderCell(m,e,u,d),d++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var r=this.session,s=r.gutterRenderer||this.$renderer,l=r.$firstLineNumber,u=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||r.$useWrapMode)&&(u=r.getLength()+l-1);var b=s?s.getWidth(r,u,e):u.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();b+=m.left+m.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.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 r=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<r.length;s++){var l=r[s];if(l.row>=this.$cursorRow){if(l.row>this.$cursorRow){var u=this.session.getFoldLine(this.$cursorRow);if(s>0&&u&&u.start.row==r[s-1].row)l=r[s-1];else break}l.element.className="ace_gutter-active-line "+l.element.className,this.$cursorCell=l;break}}}}},t.prototype.scrollLines=function(e){var r=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(r,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),l=this.oldLastRow;if(this.oldLastRow=s,!r||l<e.firstRow)return this.update(e);if(s<r.firstRow)return this.update(e);if(r.firstRow<e.firstRow)for(var u=this.session.getFoldedRowCount(r.firstRow,e.firstRow-1);u>0;u--)this.$lines.shift();if(l>s)for(var u=this.session.getFoldedRowCount(s+1,l);u>0;u--)this.$lines.pop();e.firstRow<r.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,r.firstRow-1)),s>l&&this.$lines.push(this.$renderLines(e,l+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,r,s){for(var l=[],u=r,b=this.session.getNextFoldLine(u),m=b?b.start.row:1/0;u>m&&(u=b.end.row+1,b=this.session.getNextFoldLine(u,b),m=b?b.start.row:1/0),!(u>s);){var g=this.$lines.createCell(u,e,this.session,n);this.$renderCell(g,e,b,u),l.push(g),u++}return l},t.prototype.$renderCell=function(e,r,s,l){var u=e.element,b=this.session,m=u.childNodes[0],g=u.childNodes[1],d=u.childNodes[2],$=d.firstChild,T=b.$firstLineNumber,A=b.$breakpoints,C=b.$decorations,w=b.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&b.foldWidgets,p=s?s.start.row:Number.MAX_VALUE,h=r.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",y=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=(w?w.getText(b,l):l+T).toString();if(this.$highlightGutterLine&&(l==this.$cursorRow||s&&l<this.$cursorRow&&l>=p&&this.$cursorRow<=s.end.row)&&(v+="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)),A[l]&&(v+=A[l]),C[l]&&(v+=C[l]),this.$annotations[l]&&l!==p&&(v+=this.$annotations[l].className),f){var R=f[l];R==null&&(R=f[l]=b.getFoldWidget(l))}if(R){var _="ace_fold-widget ace_"+R,I=R=="start"&&l==p&&l<s.end.row;if(I){_+=" ace_closed";for(var N="",W=!1,O=l+1;O<=s.end.row;O++)if(this.$annotations[O]){if(this.$annotations[O].className===" ace_error"){W=!0,N=" ace_error_fold";break}this.$annotations[O].className===" ace_security"?(W=!0,N=" ace_security_fold"):this.$annotations[O].className===" ace_warning"&&N!==" ace_security_fold"&&(W=!0,N=" ace_warning_fold")}v+=N}else _+=" ace_open";g.className!=_&&(g.className=_),k.setStyle(g.style,"height",h),k.setStyle(g.style,"display","inline-block"),g.setAttribute("role","button"),g.setAttribute("tabindex","-1");var D=b.getFoldWidgetRange(l);D?g.setAttribute("aria-label",o("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[D.start.row+1,D.end.row+1])):s?g.setAttribute("aria-label",o("gutter.code-folding.closed.aria-label","Toggle code folding, rows $0 through $1",[s.start.row+1,s.end.row+1])):g.setAttribute("aria-label",o("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[l+1])),I?(g.setAttribute("aria-expanded","false"),g.setAttribute("title",o("gutter.code-folding.closed.title","Unfold code"))):(g.setAttribute("aria-expanded","true"),g.setAttribute("title",o("gutter.code-folding.open.title","Fold code")))}else g&&(k.setStyle(g.style,"display","none"),g.setAttribute("tabindex","0"),g.removeAttribute("role"),g.removeAttribute("aria-label"));if(W&&this.$showFoldedAnnotations){d.className="ace_gutter_annotation",$.className=y,$.className+=N,k.setStyle($.style,"height",h),k.setStyle(d.style,"display","block"),k.setStyle(d.style,"height",h);var F;switch(N){case" ace_error_fold":F=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[L]);break;case" ace_security_fold":F=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[L]);break;case" ace_warning_fold":F=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[L]);break}d.setAttribute("aria-label",F),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[l]){d.className="ace_gutter_annotation",$.className=y,this.$useSvgGutterIcons?$.className+=this.$annotations[l].className:u.classList.add(this.$annotations[l].className.replace(" ","")),k.setStyle($.style,"height",h),k.setStyle(d.style,"display","block"),k.setStyle(d.style,"height",h);var F;switch(this.$annotations[l].className){case" ace_error":F=o("gutter.annotation.aria-label.error","Error, read annotations row $0",[L]);break;case" ace_security":F=o("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[L]);break;case" ace_warning":F=o("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[L]);break;case" ace_info":F=o("gutter.annotation.aria-label.info","Info, read annotations row $0",[L]);break;case" ace_hint":F=o("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[L]);break}d.setAttribute("aria-label",F),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else k.setStyle(d.style,"display","none"),d.removeAttribute("aria-label"),d.removeAttribute("role"),d.setAttribute("tabindex","0");return L!==m.data&&(m.data=L),u.className!=v&&(u.className=v),k.setStyle(e.element.style,"height",this.$lines.computeLineHeight(l,r,b)+"px"),k.setStyle(e.element.style,"top",this.$lines.computeLineTop(l,r,b)+"px"),e.text=L,d.style.display==="none"&&g.style.display==="none"?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},t.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e},t.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},t.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},t.prototype.setShowFoldWidgets=function(e){e?k.addCssClass(this.element,"ace_folding-enabled"):k.removeCssClass(this.element,"ace_folding-enabled"),this.$showFoldWidgets=e,this.$padding=null},t.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},t.prototype.$computePadding=function(){if(!this.element.firstChild)return{left:0,right:0};var e=k.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},t.prototype.getRegion=function(e){var r=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<r.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-r.right)return"foldWidgets"},t})();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,M.implement(i.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var r=k.createElement("span");t.appendChild(r);var s=k.createElement("span");t.appendChild(s);var l=k.createElement("span");return s.appendChild(l),t}x.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(E,x,z){var k=E("../range").Range,M=E("../lib/dom"),S=(function(){function c(o){this.element=M.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return c.prototype.setPadding=function(o){this.$padding=o},c.prototype.setSession=function(o){this.session=o},c.prototype.setMarkers=function(o){this.markers=o},c.prototype.elt=function(o,i){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=i,n.className=o},c.prototype.update=function(o){if(o){this.config=o,this.i=0;var i;for(var n in this.markers){var t=this.markers[n];if(!t.range){t.update(i,this,this.session,o);continue}var e=t.range.clipRows(o.firstRow,o.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var r=this.$getTop(e.start.row,o),s=this.$padding+e.start.column*o.characterWidth;t.renderer(i,e,s,r,o)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,o):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,o):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,o):this.drawMultiLineMarker(i,e,t.clazz,o):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},c.prototype.$getTop=function(o,i){return(o-i.firstRowScreen)*i.lineHeight},c.prototype.drawTextMarker=function(o,i,n,t,e){for(var r=this.session,s=i.start.row,l=i.end.row,u=s,b=0,m=0,g=r.getScreenLastRowColumn(u),d=new k(u,i.start.column,u,m);u<=l;u++)d.start.row=d.end.row=u,d.start.column=u==s?i.start.column:r.getRowWrapIndent(u),d.end.column=g,b=m,m=g,g=u+1<l?r.getScreenLastRowColumn(u+1):u==l?0:i.end.column,this.drawSingleLineMarker(o,d,n+(u==s?" ace_start":"")+" ace_br"+a(u==s||u==s+1&&i.start.column,b<m,m>g,u==l),t,u==l?0:1,e)},c.prototype.drawMultiLineMarker=function(o,i,n,t,e){var r=this.$padding,s=t.lineHeight,l=this.$getTop(i.start.row,t),u=r+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var b=i.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(o,b,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+r+"px;top:"+l+"px;left:"+u+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var b=i.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(o,b,n+" ace_br12",t,null,e)}else{l=this.$getTop(i.end.row,t);var m=i.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+m+"px;top:"+l+"px;left:"+r+"px;"+(e||""))}if(s=(i.end.row-i.start.row-1)*t.lineHeight,!(s<=0)){l=this.$getTop(i.start.row+1,t);var g=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(g?" ace_br"+g:""),"height:"+s+"px;right:"+r+"px;top:"+l+"px;left:"+r+"px;"+(e||""))}},c.prototype.drawSingleLineMarker=function(o,i,n,t,e,r){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,n,t,e,r);var s=t.lineHeight,l=(i.end.column+(e||0)-i.start.column)*t.characterWidth,u=this.$getTop(i.start.row,t),b=this.$padding+i.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+l+"px;top:"+u+"px;left:"+b+"px;"+(r||""))},c.prototype.drawBidiSingleLineMarker=function(o,i,n,t,e,r){var s=t.lineHeight,l=this.$getTop(i.start.row,t),u=this.$padding,b=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);b.forEach(function(m){this.elt(n,"height:"+s+"px;width:"+(m.width+(e||0))+"px;top:"+l+"px;left:"+(u+m.left)+"px;"+(r||""))},this)},c.prototype.drawFullLineMarker=function(o,i,n,t,e){var r=this.$getTop(i.start.row,t),s=t.lineHeight;i.start.row!=i.end.row&&(s+=this.$getTop(i.end.row,t)-r),this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(e||""))},c.prototype.drawScreenLineMarker=function(o,i,n,t,e){var r=this.$getTop(i.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(e||""))},c})();S.prototype.$padding=0;function a(c,o,i,n){return(c?1:0)|(o?2:0)|(i?4:0)|(n?8:0)}x.Marker=S}),ace.define("ace/layer/text_util",["require","exports","module"],function(E,x,z){var k=new Set(["text","rparen","lparen"]);x.isTextToken=function(M){return k.has(M)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(E,x,z){var k=E("../lib/oop"),M=E("../lib/dom"),S=E("../lib/lang"),a=E("./lines").Lines,c=E("../lib/event_emitter").EventEmitter,o=E("../config").nls,i=E("./text_util").isTextToken,n=(function(){function t(e){this.dom=M,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 a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,r=e.getNewLineCharacter()=="\n"&&e.getNewLineMode()!="windows",s=r?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(r){this._signal("changeCharacterSize",r)}).bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(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)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var r=this.$tabStrings=[0],s=1;s<e+1;s++)if(this.showTabs){var l=this.dom.createElement("span");l.className="ace_invisible ace_invisible_tab",l.textContent=S.stringRepeat(this.TAB_CHAR,s),r.push(l)}else r.push(this.dom.createTextNode(S.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var u="ace_indent-guide",b=this.showSpaces?" ace_invisible ace_invisible_space":"",m=this.showSpaces?S.stringRepeat(this.SPACE_CHAR,this.tabSize):S.stringRepeat(" ",this.tabSize),g=this.showTabs?" ace_invisible ace_invisible_tab":"",d=this.showTabs?S.stringRepeat(this.TAB_CHAR,this.tabSize):m,l=this.dom.createElement("span");l.className=u+b,l.textContent=m,this.$tabStrings[" "]=l;var l=this.dom.createElement("span");l.className=u+g,l.textContent=d,this.$tabStrings[" "]=l}},t.prototype.updateLines=function(e,r,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var l=Math.max(r,e.firstRow),u=Math.min(s,e.lastRow),b=this.element.childNodes,m=0,d=e.firstRow;d<l;d++){var $=this.session.getFoldLine(d);if($)if($.containsRow(l)){l=$.start.row;break}else d=$.end.row;m++}for(var g=!1,d=l,$=this.session.getNextFoldLine(d),T=$?$.start.row:1/0;d>T&&(d=$.end.row+1,$=this.session.getNextFoldLine(d,$),T=$?$.start.row:1/0),!(d>u);){var A=b[m++];if(A){this.dom.removeChildren(A),this.$renderLine(A,d,d==T?$:!1),g&&(A.style.top=this.$lines.computeLineTop(d,e,this.session)+"px");var C=e.lineHeight*this.session.getRowLength(d)+"px";A.style.height!=C&&(g=!0,A.style.height=C)}d++}if(g)for(;m<this.$lines.cells.length;){var w=this.$lines.cells[m++];w.element.style.top=this.$lines.computeLineTop(w.row,e,this.session)+"px"}},t.prototype.scrollLines=function(e){var r=this.config;if(this.config=e,this.$lines.pageChanged(r,e))return this.update(e);this.$lines.moveContainer(e);var s=e.lastRow,l=r?r.lastRow:-1;if(!r||l<e.firstRow)return this.update(e);if(s<r.firstRow)return this.update(e);if(!r||r.lastRow<e.firstRow)return this.update(e);if(e.lastRow<r.firstRow)return this.update(e);if(r.firstRow<e.firstRow)for(var u=this.session.getFoldedRowCount(r.firstRow,e.firstRow-1);u>0;u--)this.$lines.shift();if(r.lastRow>e.lastRow)for(var u=this.session.getFoldedRowCount(e.lastRow+1,r.lastRow);u>0;u--)this.$lines.pop();e.firstRow<r.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,r.firstRow-1)),e.lastRow>r.lastRow&&this.$lines.push(this.$renderLinesFragment(e,r.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,r,s){for(var l=[],u=r,b=this.session.getNextFoldLine(u),m=b?b.start.row:1/0;u>m&&(u=b.end.row+1,b=this.session.getNextFoldLine(u,b),m=b?b.start.row:1/0),!(u>s);){var g=this.$lines.createCell(u,e,this.session),d=g.element;this.dom.removeChildren(d),M.setStyle(d.style,"height",this.$lines.computeLineHeight(u,e,this.session)+"px"),M.setStyle(d.style,"top",this.$lines.computeLineTop(u,e,this.session)+"px"),this.$renderLine(d,u,u==m?b:!1),this.$useLineGroups()?d.className="ace_line_group":d.className="ace_line",l.push(g),u++}return l},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var r=e.firstRow,s=e.lastRow,l=this.$lines;l.getLength();)l.pop();l.push(this.$renderLinesFragment(e,r,s))},t.prototype.$renderToken=function(e,r,s,l){for(var u=this,b=/(\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,m=this.dom.createFragment(this.element),g,d=0;g=b.exec(l);){var $=g[1],T=g[2],A=g[3],C=g[4],w=g[5];if(!(!u.showSpaces&&T)){var f=d!=g.index?l.slice(d,g.index):"";if(d=g.index+g[0].length,f&&m.appendChild(this.dom.createTextNode(f,this.element)),$){var p=u.session.getScreenTabSize(r+g.index);m.appendChild(u.$tabStrings[p].cloneNode(!0)),r+=p-1}else if(T)if(u.showSpaces){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_space",h.textContent=S.stringRepeat(u.SPACE_CHAR,T.length),m.appendChild(h)}else m.appendChild(this.dom.createTextNode(T,this.element));else if(A){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_space ace_invalid",h.textContent=S.stringRepeat(u.SPACE_CHAR,A.length),m.appendChild(h)}else if(C){r+=1;var h=this.dom.createElement("span");h.style.width=u.config.characterWidth*2+"px",h.className=u.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h.textContent=u.showSpaces?u.SPACE_CHAR:C,m.appendChild(h)}else if(w){r+=1;var h=this.dom.createElement("span");h.style.width=u.config.characterWidth*2+"px",h.className="ace_cjk",h.textContent=w,m.appendChild(h)}}}if(m.appendChild(this.dom.createTextNode(d?l.slice(d):l,this.element)),i(s.type))e.appendChild(m);else{var v="ace_"+s.type.replace(/\./g," ace_"),h=this.dom.createElement("span");s.type=="fold"&&(h.style.width=s.value.length*this.config.characterWidth+"px",h.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),h.className=v,h.appendChild(m),e.appendChild(h)}return r+l.length},t.prototype.renderIndentGuide=function(e,r,s){var l=r.search(this.$indentGuideRe);if(l<=0||l>=s)return r;if(r[0]==" "){l-=l%this.tabSize;for(var u=l/this.tabSize,b=0;b<u;b++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),r.substr(l)}else if(r[0]==" "){for(var b=0;b<l;b++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),r.substr(l)}return this.$highlightIndentGuide(),r},t.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 r=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(r.row))[0].length,l=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:l,start:r.row};var u=this.session.$bracketHighlight;if(u){for(var b=this.session.$bracketHighlight.ranges,m=0;m<b.length;m++)if(r.row!==b[m].start.row){this.$highlightIndentGuideMarker.end=b[m].start.row,r.row>b[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[r.row]!==""&&r.column===e[r.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=r.row+1;m<e.length;m++){var g=e[m],d=/^\s*/.exec(g)[0].length;if(g!==""&&(this.$highlightIndentGuideMarker.end=m,d<=s))break}}this.$renderHighlightIndentGuide()}}},t.prototype.$clearActiveIndentGuide=function(){for(var e=this.$lines.cells,r=0;r<e.length;r++){var s=e[r],l=s.element.childNodes;if(l.length>0){for(var u=0;u<l.length;u++)if(l[u].classList&&l[u].classList.contains("ace_indent-guide-active")){l[u].classList.remove("ace_indent-guide-active");break}}}},t.prototype.$setIndentGuideActive=function(e,r){var s=this.session.doc.getLine(e.row);if(s!==""){var l=e.element.childNodes;if(l){var u=l[r-1];u&&u.classList&&u.classList.contains("ace_indent-guide")&&u.classList.add("ace_indent-guide-active")}}},t.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var r=this.$highlightIndentGuideMarker.indentLevel;if(r!==0)if(this.$highlightIndentGuideMarker.dir===1)for(var s=0;s<e.length;s++){var l=e[s];if(this.$highlightIndentGuideMarker.end&&l.row>=this.$highlightIndentGuideMarker.start+1){if(l.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(l,r)}}else for(var s=e.length-1;s>=0;s--){var l=e[s];if(this.$highlightIndentGuideMarker.end&&l.row<this.$highlightIndentGuideMarker.start){if(l.row<=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(l,r)}}}},t.prototype.$createLineElement=function(e){var r=this.dom.createElement("div");return r.className="ace_line",r.style.height=this.config.lineHeight+"px",r},t.prototype.$renderWrappedLine=function(e,r,s){var l=0,u=0,b=s[0],m=0,g=this.$createLineElement();e.appendChild(g);for(var d=0;d<r.length;d++){var $=r[d],T=$.value;if(d==0&&this.displayIndentGuides){if(l=T.length,T=this.renderIndentGuide(g,T,b),!T)continue;l-=T.length}if(l+T.length<b)m=this.$renderToken(g,m,$,T),l+=T.length;else{for(;l+T.length>=b;)m=this.$renderToken(g,m,$,T.substring(0,b-l)),T=T.substring(b-l),l=b,g=this.$createLineElement(),e.appendChild(g),g.appendChild(this.dom.createTextNode(S.stringRepeat(" ",s.indent),this.element)),u++,m=0,b=s[u]||Number.MAX_VALUE;T.length!=0&&(l+=T.length,m=this.$renderToken(g,m,$,T))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(g,m,null,"",!0)},t.prototype.$renderSimpleLine=function(e,r){for(var s=0,l=0;l<r.length;l++){var u=r[l],b=u.value;if(!(l==0&&this.displayIndentGuides&&(b=this.renderIndentGuide(e,b),!b))){if(s+b.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,u,b);s=this.$renderToken(e,s,u,b)}}},t.prototype.$renderOverflowMessage=function(e,r,s,l,u){s&&this.$renderToken(e,r,s,l.slice(0,this.MAX_LINE_LENGTH-r));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=u?"<hide>":"<click to see more...>",e.appendChild(b)},t.prototype.$renderLine=function(e,r,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(r)),s)var l=this.$getFoldLineTokens(r,s);else var l=this.session.getTokens(r);var u=e;if(l.length){var b=this.session.getRowSplitData(r);if(b&&b.length){this.$renderWrappedLine(e,l,b);var u=e.lastChild}else{var u=e;this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u)),this.$renderSimpleLine(u,l)}}else this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u));if(this.showEOL&&u){s&&(r=s.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=r==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,u.appendChild(m)}},t.prototype.$getFoldLineTokens=function(e,r){var s=this.session,l=[];function u(m,g,d){for(var $=0,T=0;T+m[$].value.length<g;)if(T+=m[$].value.length,$++,$==m.length)return;if(T!=g){var A=m[$].value.substring(g-T);A.length>d-g&&(A=A.substring(0,d-g)),l.push({type:m[$].type,value:A}),T=g+A.length,$+=1}for(;T<d&&$<m.length;){var A=m[$].value;A.length+T>d?l.push({type:m[$].type,value:A.substring(0,d-T)}):l.push(m[$]),T+=A.length,$+=1}}var b=s.getTokens(e);return r.walk(function(m,g,d,$,T){m!=null?l.push({type:"fold",value:m}):(T&&(b=s.getTokens(g)),b.length&&u(b,$,d))},r.end.row,this.session.getLine(r.end.row).length),l},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t})();n.prototype.EOF_CHAR="¶",n.prototype.EOL_CHAR_LF="¬",n.prototype.EOL_CHAR_CRLF="¤",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="—",n.prototype.SPACE_CHAR="·",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,k.implement(n.prototype,c),x.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("../lib/dom"),M=(function(){function S(a){this.element=k.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),k.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return S.prototype.$updateOpacity=function(a){for(var c=this.cursors,o=c.length;o--;)k.setStyle(c[o].style,"opacity",a?"":"0")},S.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&k.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},S.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,k.removeCssClass(this.element,"ace_animate-blinking")},S.prototype.setPadding=function(a){this.$padding=a},S.prototype.setSession=function(a){this.session=a},S.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},S.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},S.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,k.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},S.prototype.addCursor=function(){var a=k.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},S.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},S.prototype.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},S.prototype.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},S.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,k.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&k.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),k.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},S.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(a),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,a.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),n=(o.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},S.prototype.isCursorInView=function(a,c){return a.top>=0&&a.top<c.maxHeight},S.prototype.update=function(a){this.config=a;var c=this.session.$selectionMarkers,o=0,i=0;(c===void 0||c.length===0)&&(c=[{cursor:null}]);for(var o=0,n=c.length;o<n;o++){var t=this.getPixelPosition(c[o].cursor,!0);if(!((t.top>a.height+a.offset||t.top<0)&&o>1)){var e=this.cursors[i++]||this.addCursor(),r=e.style;this.drawCursor?this.drawCursor(e,t,a,c[o],this.session):this.isCursorInView(t,a)?(k.setStyle(r,"display","block"),k.translate(e,t.left,t.top),k.setStyle(r,"width",Math.round(a.characterWidth)+"px"),k.setStyle(r,"height",a.lineHeight+"px")):k.setStyle(r,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},S.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?k.addCssClass(this.element,"ace_overwrite-cursors"):k.removeCssClass(this.element,"ace_overwrite-cursors"))},S.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},S})();M.prototype.$padding=0,M.prototype.drawCursor=null,x.Cursor=M}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,z){var k=this&&this.__extends||(function(){var e=function(r,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(l[b]=u[b])},e(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(r,s);function l(){this.constructor=r}r.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),M=E("./lib/oop"),S=E("./lib/dom"),a=E("./lib/event"),c=E("./lib/event_emitter").EventEmitter,o=32768,i=(function(){function e(r,s){this.element=S.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=S.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),r.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)}return e.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},e})();M.implement(i.prototype,c);var n=(function(e){k(r,e);function r(s,l){var u=e.call(this,s,"-v")||this;return u.scrollTop=0,u.scrollHeight=0,l.$scrollbarWidth=u.width=S.scrollbarWidth(s.ownerDocument),u.inner.style.width=u.element.style.width=(u.width||15)+5+"px",u.$minWidth=0,u}return r.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(s){this.element.style.height=s+"px"},r.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>o?(this.coeff=o/s,s=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},r.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},r})(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=(function(e){k(r,e);function r(s,l){var u=e.call(this,s,"-h")||this;return u.scrollLeft=0,u.height=l.$scrollbarWidth,u.inner.style.height=u.element.style.height=(u.height||15)+5+"px",u}return r.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.setWidth=function(s){this.element.style.width=s+"px"},r.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},r.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},r.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},r})(i);x.ScrollBar=n,x.ScrollBarV=n,x.ScrollBarH=t,x.VScrollBar=n,x.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,z){var k=this&&this.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function s(){this.constructor=e}e.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}})(),M=E("./lib/oop"),S=E("./lib/dom"),a=E("./lib/event"),c=E("./lib/event_emitter").EventEmitter;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?v=1773287522785",!1);var o=(function(){function t(e,r){this.element=S.createElement("div"),this.element.className="ace_sb"+r,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")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t})();M.implement(o.prototype,c);var i=(function(t){k(e,t);function e(r,s){var l=t.call(this,r,"-v")||this;return l.scrollTop=0,l.scrollHeight=0,l.parent=r,l.width=l.VScrollWidth,l.renderer=s,l.inner.style.width=l.element.style.width=(l.width||15)+"px",l.$minWidth=0,l}return e.prototype.onMouseDown=function(r,s){if(r==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,u=s.clientY,b=function(C){u=C.clientY},m=function(){clearInterval(T)},g=s.clientY,d=this.thumbTop,$=function(){if(u!==void 0){var C=l.scrollTopFromThumbTop(d+u-g);C!==l.scrollTop&&l._emit("scroll",{data:C})}};a.capture(this.inner,b,m);var T=setInterval($,20);return a.preventDefault(s)}var A=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(r){var s=r*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return s=s>>0,s<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(r){this.height=Math.max(0,r),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(r,s){this.pageHeight===r&&!s||(this.pageHeight=r,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})))},e.prototype.setScrollTop=function(r){this.scrollTop=r,r<0&&(r=0),this.thumbTop=r*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=(function(t){k(e,t);function e(r,s){var l=t.call(this,r,"-h")||this;return l.scrollLeft=0,l.scrollWidth=0,l.height=l.HScrollHeight,l.inner.style.height=l.element.style.height=(l.height||12)+"px",l.renderer=s,l}return e.prototype.onMouseDown=function(r,s){if(r==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,u=s.clientX,b=function(C){u=C.clientX},m=function(){clearInterval(T)},g=s.clientX,d=this.thumbLeft,$=function(){if(u!==void 0){var C=l.scrollLeftFromThumbLeft(d+u-g);C!==l.scrollLeft&&l._emit("scroll",{data:C})}};a.capture(this.inner,b,m);var T=setInterval($,20);return a.preventDefault(s)}var A=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(r){var s=r*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return s=s>>0,s<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.prototype.setWidth=function(r){this.width=Math.max(0,r),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(r,s){this.pageWidth===r&&!s||(this.pageWidth=r,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})))},e.prototype.setScrollLeft=function(r){this.scrollLeft=r,r<0&&(r=0),this.thumbLeft=r*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(o);n.prototype.setInnerWidth=n.prototype.setScrollWidth,x.ScrollBar=i,x.ScrollBarV=i,x.ScrollBarH=n,x.VScrollBar=i,x.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(E,x,z){var k=E("./lib/event"),M=(function(){function S(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var o=this;this._flush=function(i){o.pending=!1;var n=o.changes;if(n&&(k.blockIdle(100),o.changes=0,o.onRender(n)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return S.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(k.nextFrame(this._flush),this.pending=!0)},S.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},S})();x.RenderLoop=M}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(E,x,z){var k=E("../lib/oop"),M=E("../lib/dom"),S=E("../lib/lang"),a=E("../lib/event"),c=E("../lib/useragent"),o=E("../lib/event_emitter").EventEmitter,i=512,n=typeof ResizeObserver=="function",t=200,e=(function(){function r(s){this.el=M.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=M.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=M.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=S.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return r.prototype.$setMeasureNodeStyles=function(s,l){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",c.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=l?"hidden":"visible"},r.prototype.checkForSizeChanges=function(s){if(s===void 0&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var l=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=l&&l.width===s.width&&l.height===s.height,this._emit("changeCharacterSize",{data:s})}},r.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(l){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},r.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function l(){s.checkForSizeChanges(),a.onIdle(l,500)},500)},r.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},r.prototype.$measureSizes=function(s){var l={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/i};return l.width===0||l.height===0?null:l},r.prototype.$measureCharWidth=function(s){this.$main.textContent=S.stringRepeat(s,i);var l=this.$main.getBoundingClientRect();return l.width/i},r.prototype.getCharacterWidth=function(s){var l=this.charSizes[s];return l===void 0&&(l=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),l},r.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},r.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},r.prototype.$initTransformMeasureNodes=function(){var s=function(l,u){return["div",{style:"position: absolute;top:"+l+"px;left:"+u+"px;"}]};this.els=M.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},r.prototype.transformCoordinates=function(s,l){if(s){var u=this.$getZoom(this.el);s=d(1/u,s)}function b(I,N,W){var O=I[1]*N[0]-I[0]*N[1];return[(-N[1]*W[0]+N[0]*W[1])/O,(+I[1]*W[0]-I[0]*W[1])/O]}function m(I,N){return[I[0]-N[0],I[1]-N[1]]}function g(I,N){return[I[0]+N[0],I[1]+N[1]]}function d(I,N){return[I*N[0],I*N[1]]}this.els||this.$initTransformMeasureNodes();function $(I){var N=I.getBoundingClientRect();return[N.left,N.top]}var T=$(this.els[0]),A=$(this.els[1]),C=$(this.els[2]),w=$(this.els[3]),f=b(m(w,A),m(w,C),m(g(A,C),g(w,T))),p=d(1+f[0],m(A,T)),h=d(1+f[1],m(C,T));if(l){var v=l,y=f[0]*v[0]/t+f[1]*v[1]/t+1,L=g(d(v[0],p),d(v[1],h));return g(d(1/y/t,L),T)}var R=m(s,T),_=b(m(p,d(f[0],R)),m(h,d(f[1],R)),R);return d(t,_)},r})();e.prototype.$characterSize={width:0,height:0},k.implement(e.prototype,o),x.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(E,x,z){z.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 forced-color-adjust: none;\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, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_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, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\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_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\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.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\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_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\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 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 position: relative;\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 z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\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}\n\n.ace_hidden_token {\n display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(E,x,z){var k=E("../lib/dom"),M=E("../lib/oop"),S=E("../lib/event_emitter").EventEmitter,a=(function(){function c(o,i){this.canvas=k.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.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)"},o.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(o){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var n=(o.lastRow+1)*this.lineHeight;n<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight}var t=this.canvas.getContext("2d");function e(w,f){return w.priority<f.priority?-1:w.priority>f.priority?1:0}var r=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),r){var s={info:1,warning:2,error:3};r.forEach(function(w){w.priority=s[w.type]||null}),r=r.sort(e);for(var l=this.renderer.session.$foldData,u=0;u<r.length;u++){var b=r[u].row,m=this.compensateFoldRows(b,l),g=Math.round((b-m)*this.lineHeight*this.heightRatio),d=Math.round((b-m)*this.lineHeight*this.heightRatio),$=Math.round(((b-m)*this.lineHeight+this.lineHeight)*this.heightRatio),T=$-d;if(T<this.minDecorationHeight){var A=(d+$)/2|0;A<this.halfMinDecorationHeight?A=this.halfMinDecorationHeight:A+this.halfMinDecorationHeight>this.canvasHeight&&(A=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(A-this.halfMinDecorationHeight),$=Math.round(A+this.halfMinDecorationHeight)}t.fillStyle=i[r[u].type]||null,t.fillRect(0,g,this.canvasWidth,$-d)}}var C=this.renderer.session.selection.getCursor();if(C){var m=this.compensateFoldRows(C.row,l),g=Math.round((C.row-m)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,g,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(o,i){var n=0;if(i&&i.length>0)for(var t=0;t<i.length;t++)o>i[t].start.row&&o<i[t].end.row?n+=o-i[t].start.row:o>=i[t].end.row&&(n+=i[t].end.row-i[t].start.row);return n},c})();M.implement(a.prototype,S),x.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/dom"),S=E("./lib/lang"),a=E("./config"),c=E("./layer/gutter").Gutter,o=E("./layer/marker").Marker,i=E("./layer/text").Text,n=E("./layer/cursor").Cursor,t=E("./scrollbar").HScrollBar,e=E("./scrollbar").VScrollBar,r=E("./scrollbar_custom").HScrollBar,s=E("./scrollbar_custom").VScrollBar,l=E("./renderloop").RenderLoop,u=E("./layer/font_metrics").FontMetrics,b=E("./lib/event_emitter").EventEmitter,m=E("./css/editor-css"),g=E("./layer/decorators").Decorator,d=E("./lib/useragent"),$=E("./layer/text_util").isTextToken;M.importCssString(m,"ace_editor.css?v=1773287522785",!1);var T=(function(){function A(C,w){var f=this;this.container=C||M.createElement("div"),M.addCssClass(this.container,"ace_editor"),M.HI_DPI&&M.addCssClass(this.container,"ace_hidpi"),this.setTheme(w),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=M.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=M.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=M.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var p=this.$textLayer=new i(this.content);this.canvas=p.element,this.$markerFront=new o(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(h){f.$scrollAnimation||f.session.setScrollTop(h.data-f.scrollMargin.top)}),this.scrollBarH.on("scroll",function(h){f.$scrollAnimation||f.session.setScrollLeft(h.data-f.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new u(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(h){f.updateCharacterSize(),f.onResize(!0,f.gutterWidth,f.$size.width,f.$size.height),f._signal("changeCharacterSize",h)}),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=!d.isIOS,this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.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(),M.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(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))},A.prototype.updateLines=function(C,w,f){if(w===void 0&&(w=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRow<w&&(this.$changedLines.lastRow=w)):this.$changedLines={firstRow:C,lastRow:w},this.$changedLines.lastRow<this.layerConfig.firstRow)if(f)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(C,w,f,p){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var h=this.container;p||(p=h.clientHeight||h.scrollHeight),!p&&this.$maxLines&&this.lineHeight>1&&(!h.style.height||h.style.height=="0px")&&(h.style.height="1px",p=h.clientHeight||h.scrollHeight),f||(f=h.clientWidth||h.scrollWidth);var v=this.$updateCachedSize(C,w,f,p);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!f&&!p)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(v|this.$changes,!0):this.$loop.schedule(v|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(C,w,f,p){p-=this.$extraHeight||0;var h=0,v=this.$size,y={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(p&&(C||v.height!=p)&&(v.height=p,h|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",h=h|this.CHANGE_SCROLL),f&&(C||v.width!=f)){h|=this.CHANGE_SIZE,v.width=f,w==null&&(w=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=w,M.setStyle(this.scrollBarH.element.style,"left",w+"px"),M.setStyle(this.scroller.style,"left",w+this.margin.left+"px"),v.scrollerWidth=Math.max(0,f-w-this.scrollBarV.getWidth()-this.margin.h),M.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";M.setStyle(this.scrollBarH.element.style,"right",L),M.setStyle(this.scroller.style,"right",L),M.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(h|=this.CHANGE_FULL)}return v.$dirty=!f||!p,h&&this._signal("resize",y),h},A.prototype.onGutterResize=function(C){var w=this.$showGutter?C:0;w!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,w,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,w=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(w,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},A.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},A.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=M.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=M.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var w=this.$printMarginEl.style;w.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",w.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,w=this.$composition;if(!this.$keepTextAreaAtCursor&&!w){M.translate(this.textarea,-100,0);return}var f=this.$cursorLayer.$pixelPos;if(f){w&&w.markerRange&&(f=this.$cursorLayer.getPixelPosition(w.markerRange.start,!0));var p=this.layerConfig,h=f.top,v=f.left;h-=p.offset;var y=w&&w.useTextareaForIME||d.isMobile?this.lineHeight:1;if(h<0||h>p.height-y){M.translate(this.textarea,0,0);return}var L=1,R=this.$size.height-y;if(!w)h+=this.lineHeight;else if(w.useTextareaForIME){var _=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(_)[0]}else h+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-L&&(v=this.$size.scrollerWidth-L),v+=this.gutterWidth+this.margin.left,M.setStyle(C,"height",y+"px"),M.setStyle(C,"width",L+"px"),M.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-L),Math.min(h,R))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,w=C.lastRow,f=this.session.documentToScreenRow(w,0)*C.lineHeight;return f-this.session.getScrollTop()>C.height-C.lineHeight?w-1:w},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(C,w,f,p){var h=this.scrollMargin;h.top=C|0,h.bottom=w|0,h.right=p|0,h.left=f|0,h.v=h.top+h.bottom,h.h=h.left+h.right,h.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-h.top),this.updateFull()},A.prototype.setMargin=function(C,w,f,p){var h=this.margin;h.top=C|0,h.bottom=w|0,h.right=p|0,h.left=f|0,h.v=h.top+h.bottom,h.h=h.left+h.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},A.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,w=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(w-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-w&&(C=this.scrollTop+w,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(C,w){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!w){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var f=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),f.firstRow!=this.layerConfig.firstRow&&f.firstRowScreen==this.layerConfig.firstRowScreen){var p=this.scrollTop+(f.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;p>0&&(this.scrollTop=p,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}f=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),M.translate(this.content,-this.scrollLeft,-f.offset);var h=f.width+2*this.$padding+"px",v=f.minHeight+"px";M.setStyle(this.content.style,"width",h),M.setStyle(this.content.style,"height",v)}if(C&this.CHANGE_H_SCROLL&&(M.translate(this.content,-this.scrollLeft,-f.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(f),this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f),this.$markerBack.update(f),this.$markerFront.update(f),this.$cursorLayer.update(f),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(f):this.$textLayer.scrollLines(f),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(f):this.$gutterLayer.scrollLines(f)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f),this.$markerBack.update(f),this.$markerFront.update(f),this.$cursorLayer.update(f),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(f),this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(f),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(f),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(f),this._signal("afterRender",C)},A.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,w=this.$maxLines*this.lineHeight,f=Math.min(w,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(f+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&f>this.$maxPixelHeight&&(f=this.$maxPixelHeight);var p=f<=2*this.lineHeight,h=!p&&C>w;if(f!=this.desiredHeight||this.$size.height!=this.desiredHeight||h!=this.$vScroll){h!=this.$vScroll&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var v=this.container.clientWidth;this.container.style.height=f+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,f),this.desiredHeight=f,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var C=this.session,w=this.$size,f=w.height<=2*this.lineHeight,p=this.session.getScreenLength(),h=p*this.lineHeight,v=this.$getLongestLine(),y=!f&&(this.$hScrollBarAlwaysVisible||w.scrollerWidth-v-2*this.$padding<0),L=this.$horizScroll!==y;L&&(this.$horizScroll=y,this.scrollBarH.setVisible(y));var R=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var _=w.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(w.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;h+=I;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,h-w.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,v+2*this.$padding-w.scrollerWidth+N.right)));var W=!f&&(this.$vScrollBarAlwaysVisible||w.scrollerHeight-h+I<0||this.scrollTop>N.top),O=R!==W;O&&(this.$vScroll=W,this.scrollBarV.setVisible(W));var D=this.scrollTop%this.lineHeight,F=Math.ceil(_/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-D)/this.lineHeight)),P=H+F,U,j,V=this.lineHeight;H=C.screenToDocumentRow(H,0);var Y=C.getFoldLine(H);Y&&(H=Y.start.row),U=C.documentToScreenRow(H,0),j=C.getRowLength(H)*V,P=Math.min(C.screenToDocumentRow(P,0),C.getLength()-1),_=w.scrollerHeight+C.getRowLength(P)*V+j,D=this.scrollTop-U*V;var Z=0;return(this.layerConfig.width!=v||L)&&(Z=this.CHANGE_H_SCROLL),(L||O)&&(Z|=this.$updateCachedSize(!0,this.gutterWidth,w.width,w.height),this._signal("scrollbarVisibilityChanged"),O&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:H,firstRowScreen:U,lastRow:P,lineHeight:V,characterWidth:this.characterWidth,minHeight:_,maxHeight:h,offset:D,gutterOffset:V?Math.max(0,Math.ceil((D+w.height-w.scrollerHeight)/V)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),Z},A.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,w=this.$changedLines.lastRow;this.$changedLines=null;var f=this.layerConfig;if(!(C>f.lastRow+1)&&!(w<f.firstRow)){if(w===1/0){this.$showGutter&&this.$gutterLayer.update(f),this.$textLayer.update(f);return}return this.$textLayer.updateLines(f,C,w),!0}}},A.prototype.$getLongestLine=function(){var C=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(C+=1),this.$textLayer&&C>this.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(C,w){this.$gutterLayer.addGutterDecoration(C,w)},A.prototype.removeGutterDecoration=function(C,w){this.$gutterLayer.removeGutterDecoration(C,w)},A.prototype.updateBreakpoints=function(C){this._rows=C,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(C,w,f){this.scrollCursorIntoView(C,f),this.scrollCursorIntoView(w,f)},A.prototype.scrollCursorIntoView=function(C,w,f){if(this.$size.scrollerHeight!==0){var p=this.$cursorLayer.getPixelPosition(C),h=p.left,v=p.top,y=f&&f.top||0,L=f&&f.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;R+y>v?(w&&R+y>v+this.lineHeight&&(v-=w*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):R+this.$size.scrollerHeight-L<v+this.lineHeight&&(w&&R+this.$size.scrollerHeight-L<v-this.lineHeight&&(v+=w*this.$size.scrollerHeight),this.session.setScrollTop(v+this.lineHeight+L-this.$size.scrollerHeight));var _=this.scrollLeft,I=2*this.layerConfig.characterWidth;h-I<_?(h-=I,h<this.$padding+I&&(h=-this.scrollMargin.left),this.session.setScrollLeft(h)):(h+=I,_+this.$size.scrollerWidth<h+this.characterWidth?this.session.setScrollLeft(Math.round(h+this.characterWidth-this.$size.scrollerWidth)):_<=this.$padding&&h-_<this.characterWidth&&this.session.setScrollLeft(0))}},A.prototype.getScrollTop=function(){return this.session.getScrollTop()},A.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},A.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},A.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},A.prototype.scrollToRow=function(C){this.session.setScrollTop(C*this.lineHeight)},A.prototype.alignCursor=function(C,w){typeof C=="number"&&(C={row:C,column:0});var f=this.$cursorLayer.getPixelPosition(C),p=this.$size.scrollerHeight-this.lineHeight,h=f.top-p*(w||0);return this.session.setScrollTop(h),h},A.prototype.$calcSteps=function(C,w){var f=0,p=this.STEPS,h=[],v=function(y,L,R){return R*(Math.pow(y-1,3)+1)+L};for(f=0;f<p;++f)h.push(v(f/this.STEPS,C,w-C));return h},A.prototype.scrollToLine=function(C,w,f,p){var h=this.$cursorLayer.getPixelPosition({row:C,column:0}),v=h.top;w&&(v-=this.$size.scrollerHeight/2);var y=this.scrollTop;this.session.setScrollTop(v),f!==!1&&this.animateScrolling(y,p)},A.prototype.animateScrolling=function(C,w){var f=this.scrollTop;if(!this.$animatedScroll)return;var p=this;if(C==f)return;if(this.$scrollAnimation){var h=this.$scrollAnimation.steps;if(h.length&&(C=h[0],C==f))return}var v=p.$calcSteps(C,f);this.$scrollAnimation={from:C,to:f,steps:v},clearInterval(this.$timer),p.session.setScrollTop(v.shift()),p.session.$scrollTop=f;function y(){p.$timer=clearInterval(p.$timer),p.$scrollAnimation=null,p.$stopAnimation=!1,w&&w()}this.$timer=setInterval(function(){if(p.$stopAnimation){y();return}if(!p.session)return clearInterval(p.$timer);v.length?(p.session.setScrollTop(v.shift()),p.session.$scrollTop=f):f!=null?(p.session.$scrollTop=-1,p.session.setScrollTop(f),f=null):y()},10)},A.prototype.scrollToY=function(C){this.scrollTop!==C&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=C)},A.prototype.scrollToX=function(C){this.scrollLeft!==C&&(this.scrollLeft=C),this.$loop.schedule(this.CHANGE_H_SCROLL)},A.prototype.scrollTo=function(C,w){this.session.setScrollTop(w),this.session.setScrollLeft(C)},A.prototype.scrollBy=function(C,w){w&&this.session.setScrollTop(this.session.getScrollTop()+w),C&&this.session.setScrollLeft(this.session.getScrollLeft()+C)},A.prototype.isScrollableBy=function(C,w){if(w<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||w>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(C,w){var f;if(this.$hasCssTransforms){f={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([C,w]);C=p[1]-this.gutterWidth-this.margin.left,w=p[0]}else f=this.scroller.getBoundingClientRect();var h=C+this.scrollLeft-f.left-this.$padding,v=h/this.characterWidth,y=Math.floor((w+this.scrollTop-f.top)/this.lineHeight),L=this.$blockCursor?Math.floor(v):Math.round(v);return{row:y,column:L,side:v-L>0?1:-1,offsetX:h}},A.prototype.screenToTextCoordinates=function(C,w){var f;if(this.$hasCssTransforms){f={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([C,w]);C=p[1]-this.gutterWidth-this.margin.left,w=p[0]}else f=this.scroller.getBoundingClientRect();var h=C+this.scrollLeft-f.left-this.$padding,v=h/this.characterWidth,y=this.$blockCursor?Math.floor(v):Math.round(v),L=Math.floor((w+this.scrollTop-f.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(y,0),h)},A.prototype.textToScreenCoordinates=function(C,w){var f=this.scroller.getBoundingClientRect(),p=this.session.documentToScreenPosition(C,w),h=this.$padding+(this.session.$bidiHandler.isBidiRow(p.row,C)?this.session.$bidiHandler.getPosLeft(p.column):Math.round(p.column*this.characterWidth)),v=p.row*this.lineHeight;return{pageX:f.left+h-this.scrollLeft,pageY:f.top+v-this.scrollTop}},A.prototype.visualizeFocus=function(){M.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){M.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(M.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(C){var w=this.session.selection.cursor;this.addToken(C,"composition_placeholder",w.row,w.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),M.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(C,w){var f=this.session.selection.cursor,p=w||{row:f.row,column:f.column};this.removeGhostText();var h=this.$calculateWrappedTextChunks(C,p);this.addToken(h[0].text,"ghost_text",p.row,p.column),this.$ghostText={text:C,position:{row:p.row,column:p.column}};var v=M.createElement("div");if(h.length>1){var y=this.hideTokensAfterPosition(p.row,p.column),L;h.slice(1).forEach(function(O){var D=M.createElement("div"),F=M.createElement("span");F.className="ace_ghost_text",O.wrapped&&(D.className="ghost_text_line_wrapped"),O.text.length===0&&(O.text=" "),F.appendChild(M.createTextNode(O.text)),D.appendChild(F),v.appendChild(D),L=D}),y.forEach(function(O){var D=M.createElement("span");$(O.type)||(D.className="ace_"+O.type.replace(/\./g," ace_")),D.appendChild(M.createTextNode(O.value)),L.appendChild(D)}),this.$ghostTextWidget={el:v,row:p.row,column:p.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var R=this.$cursorLayer.getPixelPosition(p,!0),_=this.container,I=_.getBoundingClientRect().height,N=h.length*this.lineHeight,W=N<I-R.top;if(W)return;N<I?this.scrollBy(0,(h.length-1)*this.lineHeight):this.scrollToRow(p.row)}},A.prototype.$calculateWrappedTextChunks=function(C,w){var f=this.$size.scrollerWidth-this.$padding*2,p=Math.floor(f/this.characterWidth)-2;p=p<=0?60:p;for(var h=C.split(/\r?\n/),v=[],y=0;y<h.length;y++){var L=this.session.$getDisplayTokens(h[y],w.column),R=this.session.$computeWrapSplits(L,p,this.session.$tabSize);if(R.length>0){var _=0;R.push(h[y].length);for(var I=0;I<R.length;I++){var N=h[y].slice(_,R[I]);v.push({text:N,wrapped:!0}),_=R[I]}}else v.push({text:h[y],wrapped:!1})}return v},A.prototype.removeGhostText=function(){if(this.$ghostText){var C=this.$ghostText.position;this.removeExtraToken(C.row,C.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},A.prototype.addToken=function(C,w,f,p){var h=this.session;h.bgTokenizer.lines[f]=null;var v={type:w,value:C},y=h.getTokens(f);if(p==null||!y.length)y.push(v);else for(var L=0,R=0;R<y.length;R++){var _=y[R];if(L+=_.value.length,p<=L){var I=_.value.length-(L-p),N=_.value.slice(0,I),W=_.value.slice(I);y.splice(R,1,{type:_.type,value:N},v,{type:_.type,value:W});break}}this.updateLines(f,f)},A.prototype.hideTokensAfterPosition=function(C,w){for(var f=this.session.getTokens(C),p=0,h=!1,v=[],y=0;y<f.length;y++){var L=f[y];if(p+=L.value.length,L.type!=="ghost_text"){if(h){v.push({type:L.type,value:L.value}),L.type="hidden_token";continue}p===w&&(h=!0)}}return this.updateLines(C,C),v},A.prototype.removeExtraToken=function(C,w){this.session.bgTokenizer.lines[C]=null,this.updateLines(C,C)},A.prototype.setTheme=function(C,w){var f=this;if(this.$themeId=C,f._dispatchEvent("themeChange",{theme:C}),!C||typeof C=="string"){var p=C||this.$options.theme.initialValue;a.loadModule(["theme",p],h)}else h(C);function h(v){if(f.$themeId!=C)return w&&w();if(!v||!v.cssClass)throw new Error("couldn't load module "+C+" or it didn't call define");v.$id&&(f.$themeId=v.$id),M.importCssString(v.cssText,v.cssClass,f.container),f.theme&&M.removeCssClass(f.container,f.theme.cssClass);var y="padding"in v?v.padding:"padding"in(f.theme||{})?4:f.$padding;f.$padding&&y!=f.$padding&&f.setPadding(y),f.$theme=v.cssClass,f.theme=v,M.addCssClass(f.container,v.cssClass),M.setCssClass(f.container,"ace_dark",v.isDark),f.$size&&(f.$size.width=0,f.$updateSizeAsync()),f._dispatchEvent("themeLoaded",{theme:v}),w&&w(),d.isSafari&&f.scroller&&(f.scroller.style.background="red",f.scroller.style.background="")}},A.prototype.getTheme=function(){return this.$themeId},A.prototype.setStyle=function(C,w){M.setCssClass(this.container,C,w!==!1)},A.prototype.unsetStyle=function(C){M.removeCssClass(this.container,C)},A.prototype.setCursorStyle=function(C){M.setStyle(this.scroller.style,"cursor",C)},A.prototype.setMouseCursor=function(C){M.setStyle(this.scroller.style,"cursor",C)},A.prototype.attachToShadowRoot=function(){M.importCssString(m,"ace_editor.css?v=1773287522785",this.container)},A.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},A.prototype.$updateCustomScrollbar=function(C){var w=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,C===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(f){w.$scrollAnimation||w.session.setScrollTop(f.data-w.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(f){w.$scrollAnimation||w.session.setScrollLeft(f.data-w.scrollMargin.left)}),this.$scrollDecorator=new g(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.addEventListener("scroll",function(f){w.$scrollAnimation||w.session.setScrollTop(f.data-w.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(f){w.$scrollAnimation||w.session.setScrollLeft(f.data-w.scrollMargin.left)}))},A.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var C=this;this.$resizeTimer=S.delayedCall(function(){C.destroyed||C.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(w){var f=w[0].contentRect.width,p=w[0].contentRect.height;Math.abs(C.$size.width-f)>1||Math.abs(C.$size.height-p)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A})();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,k.implement(T.prototype,b),a.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&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(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){M.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),x.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(E,x,z){var k=E("../lib/oop"),M=E("../lib/net"),S=E("../lib/event_emitter").EventEmitter,a=E("../config");function c(t){var e="importScripts('"+M.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(l){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(e),s.getBlob("application/javascript")}}function o(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=c(t),r=window.URL||window.webkitURL,s=r.createObjectURL(e);return new Worker(s)}return new Worker(t)}var i=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){k.implement(this,S),this.$createWorkerFromOldConfig=function(t,e,r,s,l){if(E.nameToUrl&&!E.toUrl&&(E.toUrl=E.nameToUrl),a.get("packaged")||!E.toUrl)s=s||a.moduleUrl(e,"worker");else{var u=this.$normalizePath;s=s||u(E.toUrl("ace/worker/worker.js?v=1773287522785",null,"_"));var b={};t.forEach(function(m){b[m]=u(E.toUrl(m,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(s),l&&this.send("importScripts",l),this.$worker.postMessage({init:!0,tlns:b,module:e,classname:r}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var r=this.callbacks[e.id];r&&(r(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return M.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,r){if(r){var s=this.callbackId++;this.callbacks[s]=r,e.push(s)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(r){console.error(r.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(i.prototype);var n=function(t,e,r){var s=null,l=!1,u=Object.create(S),b=[],m=new i({messageBuffer:b,terminate:function(){},postMessage:function(d){b.push(d),s&&(l?setTimeout(g):g())}});m.setEmitSync=function(d){l=d};var g=function(){var d=b.shift();d.command?s[d.command].apply(s,d.args):d.event&&u._signal(d.event,d.data)};return u.postMessage=function(d){m.onMessage({data:d})},u.callback=function(d,$){this.postMessage({type:"call",id:$,data:d})},u.emit=function(d,$){this.postMessage({type:"event",name:d,data:$})},a.loadModule(["worker",e],function(d){for(s=new d[r](u);b.length;)g()}),m};x.UIWorkerClient=n,x.WorkerClient=i,x.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(E,x,z){var k=E("./range").Range,M=E("./lib/event_emitter").EventEmitter,S=E("./lib/oop"),a=(function(){function c(o,i,n,t,e,r){var s=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=e,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var l=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=l.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var o=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=n.addMarker(new k(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var r=i.createAnchor(e.row,e.column);r.$insertRight=!0,r.detach(),o.others.push(r)}),n.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=o.addMarker(new k(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o<this.others.length;o++)this.session.removeMarker(this.others[o].markerId)}},c.prototype.onUpdate=function(o){if(this.$updating)return this.updateAnchors(o);var i=o;if(i.start.row===i.end.row&&i.start.row===this.pos.row){this.$updating=!0;var n=o.action==="insert"?i.end.column-i.start.column:i.start.column-i.end.column,t=i.start.column>=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(o),t&&(this.length+=n),t&&!this.session.$fromUndo){if(o.action==="insert")for(var r=this.others.length-1;r>=0;r--){var s=this.others[r],l={row:s.row,column:s.column+e};this.doc.insertMergedLines(l,o.lines)}else if(o.action==="remove")for(var r=this.others.length-1;r>=0;r--){var s=this.others[r],l={row:s.row,column:s.column+e};this.doc.remove(new k(l.row,l.column,l.row,l.column-n))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,n=function(e,r){i.removeMarker(e.markerId),e.markerId=i.addMarker(new k(e.row,e.column,e.row,e.column+o.length),r,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},c.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},c.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},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,n=0;n<i;n++)o.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},c})();S.implement(a.prototype,M),x.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,x,z){var k=E("../lib/event"),M=E("../lib/useragent");function S(c,o){return c.row==o.row&&c.column==o.column}function a(c){var o=c.domEvent,i=o.altKey,n=o.shiftKey,t=o.ctrlKey,e=c.getAccelKey(),r=c.getButton();if(t&&M.isMac&&(r=o.button),c.editor.inMultiSelectMode&&r==2){c.editor.textInput.onContextMenu(c.domEvent);return}if(!t&&!i&&!e){r===0&&c.editor.inMultiSelectMode&&c.editor.exitMultiSelectMode();return}if(r===0){var s=c.editor,l=s.selection,u=s.inMultiSelectMode,b=c.getDocumentPosition(),m=l.getCursor(),g=c.inSelection()||l.isEmpty()&&S(b,m),d=c.x,$=c.y,T=function(N){d=N.clientX,$=N.clientY},A=s.session,C=s.renderer.pixelToScreenCoordinates(d,$),w=C,f;if(s.$mouseHandler.$enableJumpToDef)t&&i||e&&i?f=n?"block":"add":i&&s.$blockSelectEnabled&&(f="block");else if(e&&!i){if(f="add",!u&&n)return}else i&&s.$blockSelectEnabled&&(f="block");if(f&&M.isMac&&o.ctrlKey&&s.$mouseHandler.cancelContextMenu(),f=="add"){if(!u&&g)return;if(!u){var p=l.toOrientedRange();s.addSelectionMarker(p)}var h=l.rangeList.rangeAtPoint(b);s.inVirtualSelectionMode=!0,n&&(h=null,p=l.ranges[0]||p,s.removeSelectionMarker(p)),s.once("mouseup",function(){var N=l.toOrientedRange();h&&N.isEmpty()&&S(h.cursor,N.cursor)?l.substractPoint(N.cursor):(n?l.substractPoint(p.cursor):p&&(s.removeSelectionMarker(p),l.addRange(p)),l.addRange(N)),s.inVirtualSelectionMode=!1})}else if(f=="block"){c.stop(),s.inVirtualSelectionMode=!0;var v,y=[],L=function(){var N=s.renderer.pixelToScreenCoordinates(d,$),W=A.screenToDocumentPosition(N.row,N.column,N.offsetX);S(w,N)&&S(W,l.lead)||(w=N,s.selection.moveToPosition(W),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(y),y=l.rectangularRangeBlock(w,C),s.$mouseHandler.$clickSelection&&y.length==1&&y[0].isEmpty()&&(y[0]=s.$mouseHandler.$clickSelection.clone()),y.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};u&&!e?l.toSingleRange():!u&&e&&(v=l.toOrientedRange(),s.addSelectionMarker(v)),n?C=A.documentToScreenPosition(l.lead):l.moveToPosition(b),w={row:-1,column:-1};var R=function(N){L(),clearInterval(I),s.removeSelectionMarkers(y),y.length||(y=[l.toOrientedRange()]),v&&(s.removeSelectionMarker(v),l.toSingleRange(v));for(var W=0;W<y.length;W++)l.addRange(y[W]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},_=L;k.capture(s.container,T,R);var I=setInterval(function(){_()},20);return c.preventDefault()}}}x.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(E,x,z){x.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(M){M.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(M){M.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(M){M.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(M){M.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(M){M.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(M){M.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(M){M.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(M){M.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(M){M.multiSelect.rangeCount>1?M.multiSelect.joinSelections():M.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(M){M.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(M){M.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(M){M.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],x.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(M){M.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(M){return M&&M.inMultiSelectMode}}];var k=E("../keyboard/hash_handler").HashHandler;x.keyboardHandler=new k(x.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(E,x,z){var k=E("./range_list").RangeList,M=E("./range").Range,S=E("./selection").Selection,a=E("./mouse/multi_select_handler").onMouseDown,c=E("./lib/event"),o=E("./lib/lang"),i=E("./commands/multi_select_commands");x.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=E("./search").Search,t=new n;function e(m,g,d){return t.$options.wrap=!0,t.$options.needle=g,t.$options.backwards=d==-1,t.find(m)}var r=E("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(r.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(m,g){if(m){if(!this.inMultiSelectMode&&this.rangeCount===0){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(m),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),g||this.fromOrientedRange(m);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d)}m.cursor||(m.cursor=m.end);var $=this.rangeList.add(m);return this.$onAddRange(m),$.length&&this.$onRemoveRange($),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),g||this.fromOrientedRange(m)}},this.toSingleRange=function(m){m=m||this.ranges[0];var g=this.rangeList.removeAll();g.length&&this.$onRemoveRange(g),m&&this.fromOrientedRange(m)},this.substractPoint=function(m){var g=this.rangeList.substractPoint(m);if(g)return this.$onRemoveRange(g),g[0]},this.mergeOverlappingRanges=function(){var m=this.rangeList.merge();m.length&&this.$onRemoveRange(m)},this.$onAddRange=function(m){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(m),this._signal("addRange",{range:m})},this.$onRemoveRange=function(m){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var g=this.rangeList.ranges.pop();m.push(g),this.rangeCount=0}for(var d=m.length;d--;){var $=this.ranges.indexOf(m[d]);this.ranges.splice($,1)}this._signal("removeRange",{ranges:m}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),g=g||this.ranges[0],g&&!g.isEqual(this.getRange())&&this.fromOrientedRange(g)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new k,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var m=this.ranges.length?this.ranges:[this.getRange()],g=[],d=0;d<m.length;d++){var $=m[d],T=$.start.row,A=$.end.row;if(T===A)g.push($.clone());else{for(g.push(new M(T,$.start.column,T,this.session.getLine(T).length));++T<A;)g.push(this.getLineRange(T,!0));g.push(new M(A,0,A,$.end.column))}d==0&&!this.isBackwards()&&(g=g.reverse())}this.toSingleRange();for(var d=g.length;d--;)this.addRange(g[d])},this.joinSelections=function(){var m=this.rangeList.ranges,g=m[m.length-1],d=M.fromPoints(m[0].start,g.end);this.toSingleRange(),this.setSelectionRange(d,g.cursor==g.start)},this.toggleBlockSelection=function(){if(this.rangeCount>1){var m=this.rangeList.ranges,g=m[m.length-1],d=M.fromPoints(m[0].start,g.end);this.toSingleRange(),this.setSelectionRange(d,g.cursor==g.start)}else{var $=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock($,T);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(m,g,d){var $=[],T=m.column<g.column;if(T)var A=m.column,C=g.column,w=m.offsetX,f=g.offsetX;else var A=g.column,C=m.column,w=g.offsetX,f=m.offsetX;var p=m.row<g.row;if(p)var h=m.row,v=g.row;else var h=g.row,v=m.row;A<0&&(A=0),h<0&&(h=0),h==v&&(d=!0);for(var y,L=h;L<=v;L++){var R=M.fromPoints(this.session.screenToDocumentPosition(L,A,w),this.session.screenToDocumentPosition(L,C,f));if(R.isEmpty()){if(y&&l(R.end,y))break;y=R.end}R.cursor=T?R.start:R.end,$.push(R)}if(p&&$.reverse(),!d){for(var _=$.length-1;$[_].isEmpty()&&_>0;)_--;if(_>0)for(var I=0;$[I].isEmpty();)I++;for(var N=_;N>=I;N--)$[N].isEmpty()&&$.splice(N,1)}return $}}).call(S.prototype);var s=E("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(m){m.cursor||(m.cursor=m.end);var g=this.getSelectionStyle();return m.marker=this.session.addMarker(m,"ace_selection",g),this.session.$selectionMarkers.push(m),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,m},this.removeSelectionMarker=function(m){if(m.marker){this.session.removeMarker(m.marker);var g=this.session.$selectionMarkers.indexOf(m);g!=-1&&this.session.$selectionMarkers.splice(g,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(m){for(var g=this.session.$selectionMarkers,d=m.length;d--;){var $=m[d];if($.marker){this.session.removeMarker($.marker);var T=g.indexOf($);T!=-1&&g.splice(T,1)}}this.session.selectionMarkerCount=g.length},this.$onAddRange=function(m){this.addSelectionMarker(m.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(m){this.removeSelectionMarkers(m.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(m){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(m){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(m){var g=m.command,d=m.editor;if(d.multiSelect){if(g.multiSelectAction)g.multiSelectAction=="forEach"?$=d.forEachSelection(g,m.args):g.multiSelectAction=="forEachLine"?$=d.forEachSelection(g,m.args,!0):g.multiSelectAction=="single"?(d.exitMultiSelectMode(),$=g.exec(d,m.args||{})):$=g.multiSelectAction(d,m.args||{});else{var $=g.exec(d,m.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return $}},this.forEachSelection=function(m,g,d){if(!this.inVirtualSelectionMode){var $=d&&d.keepOrder,T=d==!0||d&&d.$byLines,A=this.session,C=this.selection,w=C.rangeList,f=($?C:w).ranges,p;if(!f.length)return m.exec?m.exec(this,g||{}):m(this,g||{});var h=C._eventRegistry;C._eventRegistry={};var v=new S(A);this.inVirtualSelectionMode=!0;for(var y=f.length;y--;){if(T)for(;y>0&&f[y].start.row==f[y-1].end.row;)y--;v.fromOrientedRange(f[y]),v.index=y,this.selection=A.selection=v;var L=m.exec?m.exec(this,g||{}):m(this,g||{});!p&&L!==void 0&&(p=L),v.toOrientedRange(f[y])}v.detach(),this.selection=A.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=h,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),p}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var m="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var g=this.multiSelect.rangeList.ranges,d=[],$=0;$<g.length;$++)d.push(this.session.getTextRange(g[$]));var T=this.session.getDocument().getNewLineCharacter();m=d.join(T),m.length==(d.length-1)*T.length&&(m="")}else this.selection.isEmpty()||(m=this.session.getTextRange(this.getSelectionRange()));return m},this.$checkMultiselectChange=function(m,g){if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){var d=this.multiSelect.ranges[0];if(this.multiSelect.isEmpty()&&g==this.multiSelect.anchor)return;var $=g==this.multiSelect.anchor?d.cursor==d.start?d.end:d.start:d.cursor;$.row!=g.row||this.session.$clipPositionToDocument($.row,$.column).column!=g.column?this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()):this.multiSelect.mergeOverlappingRanges()}},this.findAll=function(m,g,d){if(g=g||{},g.needle=m||g.needle,g.needle==null){var $=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();g.needle=this.session.getTextRange($)}this.$search.set(g);var T=this.$search.findAll(this.session);if(!T.length)return 0;var A=this.multiSelect;d||A.toSingleRange(T[0]);for(var C=T.length;C--;)A.addRange(T[C],!0);return $&&A.rangeList.rangeAtPoint($.start)&&A.addRange($,!0),T.length},this.selectMoreLines=function(m,g){var d=this.selection.toOrientedRange(),$=d.cursor==d.end,T=this.session.documentToScreenPosition(d.cursor);this.selection.$desiredColumn&&(T.column=this.selection.$desiredColumn);var A=this.session.screenToDocumentPosition(T.row+m,T.column);if(d.isEmpty())var w=A;else var C=this.session.documentToScreenPosition($?d.end:d.start),w=this.session.screenToDocumentPosition(C.row+m,C.column);if($){var f=M.fromPoints(A,w);f.cursor=f.start}else{var f=M.fromPoints(w,A);f.cursor=f.end}if(f.desiredColumn=T.column,!this.selection.inMultiSelectMode)this.selection.addRange(d);else if(g)var p=d.cursor;this.selection.addRange(f),p&&this.selection.substractPoint(p)},this.transposeSelections=function(m){for(var g=this.session,d=g.multiSelect,$=d.ranges,T=$.length;T--;){var A=$[T];if(A.isEmpty()){var C=g.getWordRange(A.start.row,A.start.column);A.start.row=C.start.row,A.start.column=C.start.column,A.end.row=C.end.row,A.end.column=C.end.column}}d.mergeOverlappingRanges();for(var w=[],T=$.length;T--;){var A=$[T];w.unshift(g.getTextRange(A))}m<0?w.unshift(w.pop()):w.push(w.shift());for(var T=$.length;T--;){var A=$[T],f=A.clone();g.replace(A,w[T]),A.start.row=f.start.row,A.start.column=f.start.column}d.fromOrientedRange(d.ranges[0])},this.selectMore=function(m,g,d){var $=this.session,T=$.multiSelect,A=T.toOrientedRange();if(!(A.isEmpty()&&(A=$.getWordRange(A.start.row,A.start.column),A.cursor=m==-1?A.start:A.end,this.multiSelect.addRange(A),d))){var C=$.getTextRange(A),w=e($,C,m);w&&(w.cursor=m==-1?w.start:w.end,this.session.unfold(w),this.multiSelect.addRange(w),this.renderer.scrollCursorIntoView(null,.5)),g&&this.multiSelect.substractPoint(A.cursor)}},this.alignCursors=function(){var m=this.session,g=m.multiSelect,d=g.ranges,$=-1,T=d.filter(function(_){if(_.cursor.row==$)return!0;$=_.cursor.row});if(!d.length||T.length==d.length-1){var A=this.selection.getRange(),C=A.start.row,w=A.end.row,f=C==w;if(f){var p=this.session.getLength(),h;do h=this.session.getLine(w);while(/[=:]/.test(h)&&++w<p);do h=this.session.getLine(C);while(/[=:]/.test(h)&&--C>0);C<0&&(C=0),w>=p&&(w=p-1)}var v=this.session.removeFullLines(C,w);v=this.$reAlignText(v,f),this.session.insert({row:C,column:0},v.join("\n")+"\n"),f||(A.start.column=0,A.end.column=v[v.length-1].length),this.selection.setRange(A)}else{T.forEach(function(_){g.substractPoint(_.cursor)});var y=0,L=1/0,R=d.map(function(_){var I=_.cursor,N=m.getLine(I.row),W=N.substr(I.column).search(/\S/g);return W==-1&&(W=0),I.column>y&&(y=I.column),W<L&&(L=W),W});d.forEach(function(_,I){var N=_.cursor,W=y-N.column,O=R[I]-L;W>O?m.insert(N,o.stringRepeat(" ",W-O)):m.remove(new M(N.row,N.column,N.row,N.column-W+O)),_.start.column=_.end.column=y,_.start.row=_.end.row=N.row,_.cursor=_.end}),g.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(m,g){var d=!0,$=!0,T,A,C;return m.map(function(v){var y=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return y?T==null?(T=y[1].length,A=y[2].length,C=y[3].length,y):(T+A+C!=y[1].length+y[2].length+y[3].length&&($=!1),T!=y[1].length&&(d=!1),T>y[1].length&&(T=y[1].length),A<y[2].length&&(A=y[2].length),C>y[3].length&&(C=y[3].length),y):[v]}).map(g?f:d?$?p:f:h);function w(v){return o.stringRepeat(" ",v)}function f(v){return v[2]?w(T)+v[2]+w(A-v[2].length+C)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function p(v){return v[2]?w(T+A-v[2].length)+v[2]+w(C)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function h(v){return v[2]?w(T)+v[2]+w(C)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(s.prototype);function l(m,g){return m.row==g.row&&m.column==g.column}x.onSessionChange=function(m){var g=m.session;g&&!g.multiSelect&&(g.$selectionMarkers=[],g.selection.$initRangeList(),g.multiSelect=g.selection),this.multiSelect=g&&g.multiSelect;var d=m.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),g&&(g.multiSelect.on("addRange",this.$onAddRange),g.multiSelect.on("removeRange",this.$onRemoveRange),g.multiSelect.on("multiSelect",this.$onMultiSelect),g.multiSelect.on("singleSelect",this.$onSingleSelect),g.multiSelect.lead.on("change",this.$checkMultiselectChange),g.multiSelect.anchor.on("change",this.$checkMultiselectChange)),g&&this.inMultiSelectMode!=g.selection.inMultiSelectMode&&(g.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function u(m){m.$multiselectOnSessionChange||(m.$onAddRange=m.$onAddRange.bind(m),m.$onRemoveRange=m.$onRemoveRange.bind(m),m.$onMultiSelect=m.$onMultiSelect.bind(m),m.$onSingleSelect=m.$onSingleSelect.bind(m),m.$multiselectOnSessionChange=x.onSessionChange.bind(m),m.$checkMultiselectChange=m.$checkMultiselectChange.bind(m),m.$multiselectOnSessionChange(m),m.on("changeSession",m.$multiselectOnSessionChange),m.on("mousedown",a),m.commands.addCommands(i.defaultCommands),b(m))}function b(m){if(!m.textInput)return;var g=m.textInput.getElement(),d=!1;c.addListener(g,"keydown",function(T){var A=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);m.$blockSelectEnabled&&A?d||(m.renderer.setMouseCursor("crosshair"),d=!0):d&&$()},m),c.addListener(g,"keyup",$,m),c.addListener(g,"blur",$,m);function $(T){d&&(m.renderer.setMouseCursor(""),d=!1)}}x.MultiSelect=u,E("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(m){u(this),m?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(m){this.$blockSelectEnabled=m},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(E,x,z){var k=E("../../range").Range,M=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(S,a,c){var o=S.getLine(c);return this.foldingStartMarker.test(o)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(S,a,c){return null},this.indentationBlock=function(S,a,c){var o=/\S/,i=S.getLine(a),n=i.search(o);if(n!=-1){for(var t=c||i.length,e=S.getLength(),r=a,s=a;++a<e;){var l=S.getLine(a).search(o);if(l!=-1){if(l<=n){var u=S.getTokenAt(a,0);if(!u||u.type!=="string")break}s=a}}if(s>r){var b=S.getLine(s).length;return new k(r,t,s,b)}}},this.openingBracketBlock=function(S,a,c,o,i){var n={row:c,column:o+1},t=S.$findClosingBracket(a,n,i);if(t){var e=S.foldWidgets[t.row];return e==null&&(e=S.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=S.getLine(t.row).length),k.fromPoints(n,t)}},this.closingBracketBlock=function(S,a,c,o,i){var n={row:c,column:o},t=S.$findOpeningBracket(a,n);if(t)return t.column++,n.column--,k.fromPoints(t,n)}}).call(M.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(E,x,z){var k=E("../line_widgets").LineWidgets,M=E("../lib/dom"),S=E("../range").Range,a=E("../config").nls;function c(i,n,t){for(var e=0,r=i.length-1;e<=r;){var s=e+r>>1,l=t(n,i[s]);if(l>0)e=s+1;else if(l<0)r=s-1;else return s}return-(e+1)}function o(i,n,t){var e=i.getAnnotations().sort(S.comparePoints);if(e.length){var r=c(e,{row:n,column:-1},S.comparePoints);r<0&&(r=-r-1),r>=e.length?r=t>0?0:e.length-1:r===0&&t<0&&(r=e.length-1);var s=e[r];if(!(!s||!t)){if(s.row===n){do s=e[r+=t];while(s&&s.row===n);if(!s)return e.slice()}var l=[];n=s.row;do l[t<0?"unshift":"push"](s),s=e[r+=t];while(s&&s.row==n);return l.length&&l}}}x.showErrorMarker=function(i,n){var t=i.session;t.widgetManager||(t.widgetManager=new k(t),t.widgetManager.attach(i));var e=i.getCursorPosition(),r=e.row,s=t.widgetManager.getWidgetsAtRow(r).filter(function(A){return A.type=="errorMarker"})[0];s?s.destroy():r-=n;var l=o(t,r,n),u;if(l){var b=l[0];e.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,e.row=b.row,u=i.renderer.$gutterLayer.$annotations[e.row]}else{if(s)return;u={displayText:[a("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(e.row),i.selection.moveToPosition(e);var m={row:e.row,fixedWidth:!0,coverGutter:!0,el:M.createElement("div"),type:"errorMarker"},g=m.el.appendChild(M.createElement("div")),d=m.el.appendChild(M.createElement("div"));d.className="error_widget_arrow "+u.className;var $=i.renderer.$cursorLayer.getPixelPosition(e).left;d.style.left=$+i.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",g.className="error_widget "+u.className,u.displayText.forEach(function(A,C){g.appendChild(M.createTextNode(A)),C<u.displayText.length-1&&g.appendChild(M.createElement("br"))}),g.appendChild(M.createElement("div"));var T=function(A,C,w){if(C===0&&(w==="esc"||w==="return"))return m.destroy(),{command:"null"}};m.destroy=function(){i.$mouseHandler.isMousePressed||(i.keyBinding.removeKeyboardHandler(T),t.widgetManager.removeLineWidget(m),i.off("changeSelection",m.destroy),i.off("changeSession",m.destroy),i.off("mouseup",m.destroy),i.off("change",m.destroy))},i.keyBinding.addKeyboardHandler(T),i.on("changeSelection",m.destroy),i.on("changeSession",m.destroy),i.on("mouseup",m.destroy),i.on("change",m.destroy),i.session.widgetManager.addLineWidget(m),m.el.onmousedown=i.focus.bind(i),i.renderer.scrollCursorIntoView(null,.5,{bottom:m.el.offsetHeight})},M.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?v=1773287522785",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(E,x,z){E("./loader_build")(x);var k=E("./lib/dom"),M=E("./range").Range,S=E("./editor").Editor,a=E("./edit_session").EditSession,c=E("./undomanager").UndoManager,o=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"),x.config=E("./config"),x.edit=function(i,n){if(typeof i=="string"){var t=i;if(i=document.getElementById(t),!i)throw new Error("ace.edit can't find div #"+t)}if(i&&i.env&&i.env.editor instanceof S)return i.env.editor;var e="";if(i&&/input|textarea/i.test(i.tagName)){var r=i;e=r.value,i=k.createElement("pre"),r.parentNode.replaceChild(i,r)}else i&&(e=i.textContent,i.innerHTML="");var s=x.createEditSession(e),l=new S(new o(i),s,n),u={document:s,editor:l,onResize:l.resize.bind(l,null)};return r&&(u.textarea=r),l.on("destroy",function(){u.editor.container.env=null}),l.container.env=l.env=u,l},x.createEditSession=function(i,n){var t=new a(i,n);return t.setUndoManager(new c),t},x.Range=M,x.Editor=S,x.EditSession=a,x.UndoManager=c,x.VirtualRenderer=o,x.version=x.config.version}),(function(){ace.require(["ace/ace"],function(E){E&&(E.config.init(!0),E.define=ace.define);var x=(function(){return this})();!x&&typeof window<"u"&&(x=window),!x&&typeof self<"u"&&(x=self),x.ace||(x.ace=E);for(var z in E)E.hasOwnProperty(z)&&(x.ace[z]=E[z]);x.ace.default=x.ace,me&&(me.exports=x.ace)})})()})(pe)),pe.exports}var Ae=Se();const xe=Ce(Ae);export{xe as a};
|