1var oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ne(Q){return Q&&Q.__esModule&&Object.prototype.hasOwnProperty.call(Q,"default")?Q.default:Q}function se(Q){if(Q.__esModule)return Q;var J=Q.default;if(typeof J=="function"){var E=function x(){return this instanceof x?Reflect.construct(J,arguments,this.constructor):J.apply(this,arguments)};E.prototype=J.prototype}else E={};return Object.defineProperty(E,"__esModule",{value:!0}),Object.keys(Q).forEach(function(x){var B=Object.getOwnPropertyDescriptor(Q,x);Object.defineProperty(E,x,B.get?B:{enumerable:!0,get:function(){return Q[x]}})}),E}var te={exports:{}};(function(Q,J){(function(){var E="ace",x=function(){return this}();!x&&typeof window<"u"&&(x=window);var B=function(r,o,n){if(typeof r!="string"){B.original?B.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=o),B.modules[r]||(B.payloads[r]=n,B.modules[r]=null)};B.modules={},B.payloads={};var k=function(r,o,n){if(typeof o=="string"){var i=a(r,o);if(i!=null)return n&&n(),i}else if(Object.prototype.toString.call(o)==="[object Array]"){for(var e=[],t=0,s=o.length;t<s;++t){var l=a(r,o[t]);if(l==null&&A.original)return;e.push(l)}return n&&n.apply(null,e)||!0}},A=function(r,o){var n=k("",r,o);return n==null&&A.original?A.original.apply(this,arguments):n},C=function(r,o){if(o.indexOf("!")!==-1){var n=o.split("!");return C(r,n[0])+"!"+C(r,n[1])}if(o.charAt(0)=="."){var i=r.split("/").slice(0,-1).join("/");for(o=i+"/"+o;o.indexOf(".")!==-1&&e!=o;){var e=o;o=o.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return o},a=function(r,o){o=C(r,o);var n=B.modules[o];if(!n){if(n=B.payloads[o],typeof n=="function"){var i={},e={id:o,uri:"",exports:i,packaged:!0},t=function(l,c){return k(o,l,c)},s=n(t,i,e);i=s||e.exports,B.modules[o]=i,delete B.payloads[o]}n=B.modules[o]=i||n}return n};function h(r){var o=x;r&&(x[r]||(x[r]={}),o=x[r]),(!o.define||!o.define.packaged)&&(B.original=o.define,o.define=B,o.define.packaged=!0),(!o.require||!o.require.packaged)&&(A.original=o.require,o.require=A,o.require.packaged=!0)}h(E)})(),ace.define("ace/lib/es6-shim",["require","exports","module"],function(E,x,B){function k(A,C,a){Object.defineProperty(A,C,{value:a,enumerable:!1,writable:!0,configurable:!0})}String.prototype.startsWith||k(String.prototype,"startsWith",function(A,C){return C=C||0,this.lastIndexOf(A,C)===C}),String.prototype.endsWith||k(String.prototype,"endsWith",function(A,C){var a=this;(C===void 0||C>a.length)&&(C=a.length),C-=A.length;var h=a.indexOf(A,C);return h!==-1&&h===C}),String.prototype.repeat||k(String.prototype,"repeat",function(A){for(var C="",a=this;A>0;)A&1&&(C+=a),(A>>=1)&&(a+=a);return C}),String.prototype.includes||k(String.prototype,"includes",function(A,C){return this.indexOf(A,C)!=-1}),Object.assign||(Object.assign=function(A){if(A==null)throw new TypeError("Cannot convert undefined or null to object");for(var C=Object(A),a=1;a<arguments.length;a++){var h=arguments[a];h!=null&&Object.keys(h).forEach(function(r){C[r]=h[r]})}return C}),Object.values||(Object.values=function(A){return Object.keys(A).map(function(C){return A[C]})}),Array.prototype.find||k(Array.prototype,"find",function(A){for(var C=this.length,a=arguments[1],h=0;h<C;h++){var r=this[h];if(A.call(a,r,h,this))return r}}),Array.prototype.findIndex||k(Array.prototype,"findIndex",function(A){for(var C=this.length,a=arguments[1],h=0;h<C;h++){var r=this[h];if(A.call(a,r,h,this))return h}}),Array.prototype.includes||k(Array.prototype,"includes",function(A,C){return this.indexOf(A,C)!=-1}),Array.prototype.fill||k(Array.prototype,"fill",function(A){for(var C=this,a=C.length>>>0,h=arguments[1],r=h>>0,o=r<0?Math.max(a+r,0):Math.min(r,a),n=arguments[2],i=n===void 0?a:n>>0,e=i<0?Math.max(a+i,0):Math.min(i,a);o<e;)C[o]=A,o++;return C}),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,B){E("./es6-shim")}),ace.define("ace/lib/deep_copy",["require","exports","module"],function(E,x,B){x.deepCopy=function k(A){if(typeof A!="object"||!A)return A;var C;if(Array.isArray(A)){C=[];for(var a=0;a<A.length;a++)C[a]=k(A[a]);return C}if(Object.prototype.toString.call(A)!=="[object Object]")return A;C={};for(var a in A)C[a]=k(A[a]);return C}}),ace.define("ace/lib/lang",["require","exports","module","ace/lib/deep_copy"],function(E,x,B){x.last=function(C){return C[C.length-1]}
1,x.stringReverse=function(C){return C.split("").reverse().join("")},x.stringRepeat=function(C,a){for(var h="";a>0;)a&1&&(h+=C),(a>>=1)&&(C+=C);return h};var k=/^\s\s*/,A=/\s\s*$/;x.stringTrimLeft=function(C){return C.replace(k,"")},x.stringTrimRight=function(C){return C.replace(A,"")},x.copyObject=function(C){var a={};for(var h in C)a[h]=C[h];return a},x.copyArray=function(C){for(var a=[],h=0,r=C.length;h<r;h++)C[h]&&typeof C[h]=="object"?a[h]=this.copyObject(C[h]):a[h]=C[h];return a},x.deepCopy=E("./deep_copy").deepCopy,x.arrayToMap=function(C){for(var a={},h=0;h<C.length;h++)a[C[h]]=1;return a},x.createMap=function(C){var a=Object.create(null);for(var h in C)a[h]=C[h];return a},x.arrayRemove=function(C,a){for(var h=0;h<=C.length;h++)a===C[h]&&C.splice(h,1)},x.escapeRegExp=function(C){return C.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},x.escapeHTML=function(C){return(""+C).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},x.getMatchOffsets=function(C,a){var h=[];return C.replace(a,function(r){h.push({offset:arguments[arguments.length-2],length:r.length})}),h},x.deferredCall=function(C){var a=null,h=function(){a=null,C()},r=function(o){return r.cancel(),a=setTimeout(h,o||0),r};return r.schedule=r,r.call=function(){return this.cancel(),C(),r},r.cancel=function(){return clearTimeout(a),a=null,r},r.isPending=function(){return a},r},x.delayedCall=function(C,a){var h=null,r=function(){h=null,C()},o=function(n){h==null&&(h=setTimeout(r,n||a))};return o.delay=function(n){h&&clearTimeout(h),h=setTimeout(r,n||a)},o.schedule=o,o.call=function(){this.cancel(),C()},o.cancel=function(){h&&clearTimeout(h),h=null},o.isPending=function(){return h},o},x.supportsLookbehind=function(){try{new RegExp("(?<=.)")}catch{return!1}return!0},x.skipEmptyMatch=function(C,a,h){return h&&C.codePointAt(a)>65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(E,x,B){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:{},A=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),C=k.userAgent||"",a=k.appName||"";x.isWin=A=="win",x.isMac=A=="mac",x.isLinux=A=="linux",x.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((C.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((C.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=C.match(/ Gecko\/\d+/),x.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",x.isWebKit=parseFloat(C.split("WebKit/")[1])||void 0,x.isChrome=parseFloat(C.split(" Chrome/")[1])||void 0,x.isSafari=parseFloat(C.split(" Safari/")[1])&&!x.isChrome||void 0,x.isEdge=parseFloat(C.split(" Edge/")[1])||void 0,x.isAIR=C.indexOf("AdobeAIR")>=0,x.isAndroid=C.indexOf("Android")>=0,x.isChromeOS=C.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test(C)&&!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,B){var k=E("./useragent"),A="http://www.w3.org/1999/xhtml";x.buildDom=function n(i,e,t){if(typeof i=="string"&&i){var s=document.createTextNode(i);return e&&e.appendChild(s),s}if(!Array.isArray(i))return i&&i.appendChild&&e&&e.appendChild(i),i;if(typeof i[0]!="string"||!i[0]){for(var l=[],c=0;c<i.length;c++){var y=n(i[c],e,t);y&&l.push(y)}return l}var m=document.createElement(i[0]),g=i[1],d=1;g&&typeof g=="object"&&!Array.isArray(g)&&(d=2);for(var c=d;c<i.length;c++)n(i[c],m,t);return d==2&&Object.keys(g).forEach(function(b){var L=g[b];b==="class"?m.className=Array.isArray(L)?L.join(" "):L:typeof L=="function"||b=="value"||b[0]=="$"?m[b]=L:b==="ref"?t&&(t[L]=m):b==="style"?typeof L=="string"&&(m.style.cssText=L):L!=null&&m.setAttribute(b,L)}),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,i){return document.createElementNS?document.createElementNS(i||A,n):document.createElement(n)},x.removeChildren=function(n){n.innerHTML=""},x.createTextNode=function(n,i){var e=i?i.ownerDocument:document;return e.createTextNode(n)},x.createFragment=function(n){var i=n?n.ownerDocument:document;return i.createDocumentFragment()},x.hasCssClass=function(n,i){var e=(n.className+"").split(/\s+/g);return e.indexOf(i)!==-1},x.addCssClass=function(n,i){x.hasCssClass(n,i)||(n.className+=" "+i)},x.removeCssClass=function(n,i){for(var e=n.className.split(/\s+/g);;){var t=e.indexOf(i);if(t==-1)break;e.splice(t,1)}n.className=e.join(" ")},x.toggleCssClass=function(n,i){for(var e=n.className.split(/\s+/g),t=!0;;){var s=e.indexOf(i);if(s==-1)break;t=!1,e.splice(s,1)}return t&&e.push(i),n.className=e.join(" "),t},x.setCssClass=function(n,i,e){e?x.addCssClass(n,i):x.removeCssClass(n,i)},x.hasCssString=function(n,i){var e=0,t;if(i=i||document,t=i.querySelectorAll("style")){for(;e<t.length;)if(t[e++].id===n)return!0}},x.removeElementById=function(n,i){i=i||document,i.getElementById(n)&&i.getElementById(n).remove()};
1var C,a=[];x.useStrictCSP=function(n){C=n,n==!1?h():a||(a=[])};function h(){var n=a;a=null,n&&n.forEach(function(i){r(i[0],i[1])})}function r(n,i,e){if(!(typeof document>"u")){if(a){if(e)h();else if(e===!1)return a.push([n,i])}if(!C){var t=e;!e||!e.getRootNode?t=document:(t=e.getRootNode(),(!t||t==e)&&(t=document));var s=t.ownerDocument||t;if(i&&x.hasCssString(i,t))return null;i&&(n+=` 2/*# sourceURL=ace/css/`+i+" */");var l=x.createElement("style");l.appendChild(s.createTextNode(n)),i&&(l.id=i),t==s&&(t=x.getDocumentHead(s)),t.insertBefore(l,t.firstChild)}}}if(x.importCssString=r,x.importCssStylsheet=function(n,i){x.buildDom(["link",{rel:"stylesheet",href:n}],x.getDocumentHead(i))},x.$fixPositionBug=function(n){var i=n.getBoundingClientRect();if(n.style.left){var e=parseFloat(n.style.left),t=+i.left;Math.abs(e-t)>1&&(n.style.left=2*e-t+"px")}if(n.style.right){var e=parseFloat(n.style.right),t=window.innerWidth-i.right;Math.abs(e-t)>1&&(n.style.right=2*e-t+"px")}if(n.style.top){var e=parseFloat(n.style.top),t=+i.top;Math.abs(e-t)>1&&(n.style.top=2*e-t+"px")}if(n.style.bottom){var e=parseFloat(n.style.bottom),t=window.innerHeight-i.bottom;Math.abs(e-t)>1&&(n.style.bottom=2*e-t+"px")}},x.scrollbarWidth=function(n){var i=x.createElement("ace_inner");i.style.width="100%",i.style.minWidth="0px",i.style.height="200px",i.style.display="block";var e=x.createElement("ace_outer"),t=e.style;t.position="absolute",t.left="-10000px",t.overflow="hidden",t.width="200px",t.minWidth="0px",t.height="150px",t.display="block",e.appendChild(i);var s=n&&n.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var l=i.offsetWidth;t.overflow="scroll";var c=i.offsetWidth;return l===c&&(c=e.clientWidth),s.removeChild(e),l-c},x.computedStyle=function(n,i){return window.getComputedStyle(n,"")||{}},x.setStyle=function(n,i,e){n[i]!==e&&(n[i]=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 o=document.createElement("div");x.HI_DPI&&o.style.transform!==void 0&&(x.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof o.style.animationName<"u"&&(x.HAS_CSS_ANIMATION=!0),o=null}x.HAS_CSS_TRANSFORMS?x.translate=function(n,i,e){n.style.transform="translate("+Math.round(i)+"px, "+Math.round(e)+"px)"}:x.translate=function(n,i,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(i)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(E,x,B){/* 3* based on code from: 4* 5* @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. 6* Available via the MIT or new BSD license. 7* see: http://github.com/jrburke/requirejs for details 8*/var k=E("./dom");x.get=function(A,C){var a=new XMLHttpRequest;a.open("GET",A,!0),a.onreadystatechange=function(){a.readyState===4&&C(a.responseText)},a.send(null)},x.loadScript=function(A,C){var a=k.getDocumentHead(),h=document.createElement("script");h.src=A,a.appendChild(h),h.onload=h.onreadystatechange=function(r,o){(o||!h.readyState||h.readyState=="loaded"||h.readyState=="complete")&&(h=h.onload=h.onreadystatechange=null,o||C())}},x.qualifyURL=function(A){var C=document.createElement("a");return C.href=A,C.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(E,x,B){x.inherits=function(k,A){k.super_=A,k.prototype=Object.create(A.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(k,A){for(var C in A)k[C]=A[C];return k},x.implement=function(k,A){x.mixin(k,A)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(E,x,B){var k={},A=function(){this.propagationStopped=!0},C=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(a,h){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var r=this._eventRegistry[a]||[],o=this._defaultHandlers[a];if(!(!r.length&&!o)){(typeof h!="object"||!h)&&(h={}),h.type||(h.type=a),h.stopPropagation||(h.stopPropagation=A),h.preventDefault||(h.preventDefault=C),r=r.slice();for(var n=0;n<r.length&&(r[n](h,this),!h.propagationStopped);n++);if(o&&!h.defaultPrevented)return o(h,this)}},k._signal=function(a,h){var r=(this._eventRegistry||{})[a];if(r){r=r.slice();for(var o=0;o<r.length;o++)r[o](h,this)}},k.once=function(a,h){var r=this;if(this.on(a,function o(){r.off(a,o),h.apply(null,arguments)}),!h)return new Promise(function(o){h=o})},k.setDefaultHandler=function(a,h){var r=this._defaultHandlers;if(r||(r=this._defaultHandlers={_disabled_:{}}),r[a]){var o=r[a],n=r._disabled_[a];n||(r._disabled_[a]=n=[]),n.push(o);var i=n.indexOf(h);i!=-1&&n.splice(i,1)}r[a]=h},k.removeDefaultHandler=function(a,h){var r=this._defaultHandlers;if(r){var o=r._disabled_[a];if(r[a]==h)o&&this.setDefaultHandler(a,o.pop());else if(o){var n=o.indexOf(h);n!=-1&&o.splice(n,1)}}},k.on=k.addEventListener=function(a,h,r){this._eventRegistry=this._eventRegistry||{};var o=this._eventRegistry[a];return o||(o=this._eventRegistry[a]=[]),o.indexOf(h)==-1&&o[r?"unshift":"push"](h),h},k.off=k.removeListener=k.removeEventListener=function(a,h){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[a];if(r){var o=r.indexOf(h);o!==-1&&r.splice(o,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,B){x.reportError=function(A,C){var a=new Error(A);a.data=C,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,B){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 gutter","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"
vendor: 5,477 bytes, lines 8-82
8:"$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","editor.tooltip.disable-editing":"Editing is disabled"};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,B){"no use strict";var k=E("./oop"),A=E("./event_emitter").EventEmitter,C=E("./report_error").reportError,a=E("./default_english_messages").defaultEnglishMessages,h={setOptions:function(e){Object.keys(e).forEach(function(t){this.setOption(t,e[t])},this)},getOptions:function(e){var t={};if(e)Array.isArray(e)||(e=Object.keys(e));else{var s=this.$options;e=Object.keys(s).filter(function(l){return!s[l].hidden})}return e.forEach(function(l){t[l]=this.getOption(l)},this),t},setOption:function(e,t){if(this["$"+e]!==t){var s=this.$options[e];if(!s)return r('misspelled option "'+e+'"');if(s.forwardTo)return this[s.forwardTo]&&this[s.forwardTo].setOption(e,t);s.handlesSet||(this["$"+e]=t),s&&s.set&&s.set.call(this,t)}},getOption:function(e){var t=this.$options[e];return t?t.forwardTo?this[t.forwardTo]&&this[t.forwardTo].getOption(e):t&&t.get?t.get.call(this):this["$"+e]:r('misspelled option "'+e+'"')}};function r(e){typeof console<"u"&&console.warn&&console.warn.apply(console,arguments)}var o,n,i=function(){function e(){this.$defaultOptions={},o=a,n="dollarSigns"}return e.prototype.defineOptions=function(t,s,l){return t.$options||(this.$defaultOptions[s]=t.$options={}),Object.keys(l).forEach(function(c){var y=l[c];typeof y=="string"&&(y={forwardTo:y}),y.name||(y.name=c),t.$options[y.name]=y,"initialValue"in y&&(t["$"+y.name]=y.initialValue)}),k.implement(t,h),this},e.prototype.resetOptions=function(t){Object.keys(t.$options).forEach(function(s){var l=t.$options[s];"value"in l&&t.setOption(s,l.value)})},e.prototype.setDefaultValue=function(t,s,l){if(!t){for(t in this.$defaultOptions)if(this.$defaultOptions[t][s])break;if(!this.$defaultOptions[t][s])return!1}var c=this.$defaultOptions[t]||(this.$defaultOptions[t]={});c[s]&&(c.forwardTo?this.setDefaultValue(c.forwardTo,s,l):c[s].value=l)},e.prototype.setDefaultValues=function(t,s){Object.keys(s).forEach(function(l){this.setDefaultValue(t,l,s[l])},this)},e.prototype.setMessages=function(t,s){o=t,s&&s.placeholders&&(n=s.placeholders)},e.prototype.nls=function(t,s,l){o[t]||(r("No message found for the key '"+t+"' in messages with id "+o.$id+", trying to find a translation for the default string '"+s+"'."),o[s]||r("No message found for the default string '"+s+"' in the provided messages. Falling back to the default English message."));var c=o[t]||o[s]||s;return l&&(n==="dollarSigns"&&(c=c.replace(/\$(\$|[\d]+)/g,function(y,m){return m=="$"?"$":l[m]})),n==="curlyBrackets"&&(c=c.replace(/\{([^\}]+)\}/g,function(y,m){return l[m]}))),c},e}();i.prototype.warn=r,i.prototype.reportError=C,k.implement(i.prototype,A),x.AppConfig=i}),ace.define("ace/theme/textmate-css",["require","exports","module"],function(E,x,B){B.exports=`.ace-tm .ace_gutter { 9 background: #f0f0f0; 10 color: #333; 11} 12 13.ace-tm .ace_print-margin { 14 width: 1px; 15 background: #e8e8e8; 16} 17 18.ace-tm .ace_fold { 19 background-color: #6B72E6; 20} 21 22.ace-tm { 23 background-color: #FFFFFF; 24 color: black; 25} 26 27.ace-tm .ace_cursor { 28 color: black; 29} 30 31.ace-tm .ace_invisible { 32 color: rgb(191, 191, 191); 33} 34 35.ace-tm .ace_storage, 36.ace-tm .ace_keyword { 37 color: blue; 38} 39 40.ace-tm .ace_constant { 41 color: rgb(197, 6, 11); 42} 43 44.ace-tm .ace_constant.ace_buildin { 45 color: rgb(88, 72, 246); 46} 47 48.ace-tm .ace_constant.ace_language { 49 color: rgb(88, 92, 246); 50} 51 52.ace-tm .ace_constant.ace_library { 53 color: rgb(6, 150, 14); 54} 55 56.ace-tm .ace_invalid { 57 background-color: rgba(255, 0, 0, 0.1); 58 color: red; 59} 60 61.ace-tm .ace_support.ace_function { 62 color: rgb(60, 76, 114); 63} 64 65.ace-tm .ace_support.ace_constant { 66 color: rgb(6, 150, 14); 67} 68 69.ace-tm .ace_support.ace_type, 70.ace-tm .ace_support.ace_class { 71 color: rgb(109, 121, 222); 72} 73 74.ace-tm .ace_keyword.ace_operator { 75 color: rgb(104, 118, 135); 76} 77 78.ace-tm .ace_string { 79 color: rgb(3, 106, 7); 80} 81 82.ace-tm .ace_comment {
83 color: rgb(76, 136, 107); 84} 85 86.ace-tm .ace_comment.ace_doc { 87 color: rgb(0, 102, 255); 88} 89 90.ace-tm .ace_comment.ace_doc.ace_tag { 91 color: rgb(128, 159, 191); 92} 93 94.ace-tm .ace_constant.ace_numeric { 95 color: rgb(0, 0, 205); 96} 97 98.ace-tm .ace_variable { 99 color: rgb(49, 132, 149); 100} 101 102.ace-tm .ace_xml-pe { 103 color: rgb(104, 104, 91); 104} 105 106.ace-tm .ace_entity.ace_name.ace_function { 107 color: #0000A2; 108} 109 110 111.ace-tm .ace_heading { 112 color: rgb(12, 7, 255); 113} 114 115.ace-tm .ace_list { 116 color:rgb(185, 6, 144); 117} 118 119.ace-tm .ace_meta.ace_tag { 120 color:rgb(0, 22, 142); 121} 122 123.ace-tm .ace_string.ace_regex { 124 color: rgb(255, 0, 0) 125} 126 127.ace-tm .ace_marker-layer .ace_selection { 128 background: rgb(181, 213, 255); 129} 130.ace-tm.ace_multiselect .ace_selection.ace_start { 131 box-shadow: 0 0 3px 0px white; 132} 133.ace-tm .ace_marker-layer .ace_step { 134 background: rgb(252, 255, 0); 135} 136 137.ace-tm .ace_marker-layer .ace_stack { 138 background: rgb(164, 229, 101); 139} 140 141.ace-tm .ace_marker-layer .ace_bracket { 142 margin: -1px 0 0 -1px; 143 border: 1px solid rgb(192, 192, 192); 144} 145 146.ace-tm .ace_marker-layer .ace_active-line { 147 background: rgba(0, 0, 0, 0.07); 148} 149 150.ace-tm .ace_gutter-active-line { 151 background-color : #dcdcdc; 152} 153 154.ace-tm .ace_marker-layer .ace_selected-word { 155 background: rgb(250, 250, 255); 156 border: 1px solid rgb(200, 200, 250); 157} 158 159.ace-tm .ace_indent-guide { 160 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; 161} 162 163.ace-tm .ace_indent-guide-active { 164 background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; 165} 166`}),ace.define("ace/theme/textmate",["require","exports","module","ace/theme/textmate-css","ace/lib/dom"],function(E,x,B){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,B){"no use strict";var k=E("./lib/lang"),A=E("./lib/net"),C=E("./lib/dom"),a=E("./lib/app_config").AppConfig;B.exports=x=new a;var h={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{},loadWorkerFromBlob:!0,sharedPopups:!1,useStrictCSP:null};x.get=function(i){if(!h.hasOwnProperty(i))throw new Error("Unknown config key: "+i);return h[i]},x.set=function(i,e){if(h.hasOwnProperty(i))h[i]=e;else if(this.setDefaultValue("",i,e)==!1)throw new Error("Unknown config key: "+i);i=="useStrictCSP"&&C.useStrictCSP(e)},x.all=function(){return k.copyObject(h)},x.$modes={},x.moduleUrl=function(i,e){if(h.$moduleUrls[i])return h.$moduleUrls[i];var t=i.split("/");e=e||t[t.length-2]||"";var s=e=="snippets"?"/":"-",l=t[t.length-1];if(e=="worker"&&s=="-"){var c=new RegExp("^"+e+"[\\-_]|[\\-_]"+e+"$","g");l=l.replace(c,"")}(!l||l==e)&&t.length>1&&(l=t[t.length-2]);var y=h[e+"Path"];return y==null?y=h.basePath:s=="/"&&(e=s=""),y&&y.slice(-1)!="/"&&(y+="/"),y+e+s+l+this.get("suffix")},x.setModuleUrl=function(i,e){return h.$moduleUrls[i]=e};var r=function(i,e){if(i==="ace/theme/textmate"||i==="./theme/textmate")return e(null,E("./theme/textmate"));if(o)return o(i,e);console.error("loader is not configured")},o;x.setLoader=function(i){o=i},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(i,e){var t;if(Array.isArray(i))var s=i[0],l=i[1];else if(typeof i=="string")var l=i;var c=function(y){if(y&&!x.$loading[l])return e&&e(y);if(x.$loading[l]||(x.$loading[l]=[]),x.$loading[l].push(e),!(x.$loading[l].length>1)){var m=function(){r(l,function(g,d){d&&(x.$loaded[l]=d),x._emit("load.module",{name:l,module:d});var b=x.$loading[l];x.$loading[l]=null,b.forEach(function(L){L&&L(d)})})};if(!x.get("packaged"))return m();A.loadScript(x.moduleUrl(l,s),m),n()}};if(x.dynamicModules[l])x.dynamicModules[l]().then(function(y){y.default?c(y.default):c(y)});else{try{t=this.$require(l)}catch{}c(t||x.$loaded[l])}},x.$require=function(i){if(typeof B.require=="function"){var e="require";return B[e](i)}},x.setModuleLoader=function(i,e){x.dynamicModules[i]=e};var n=function(){!h.basePath&&!h.workerPath&&!h.modePath&&!h.themePath&&!Object.keys(h.$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.43.6"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(E,x,B){E("./lib/fixoldbrowsers");var k=E("./config");
166k.setLoader(function(h,r){E([h],function(o){r(null,o)})});var A=function(){return this||typeof window<"u"&&window}();B.exports=function(h){k.init=C,k.$require=E,h.require=E},C(!0);function C(h){if(!(!A||!A.document)){k.set("packaged",h||E.packaged||B.packaged||A.define&&(void 0).packaged);var r={},o="",n=document.currentScript||document._currentScript,i=n&&n.ownerDocument||document;n&&n.src&&(o=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=i.getElementsByTagName("script"),t=0;t<e.length;t++){var s=e[t],l=s.src||s.getAttribute("src");if(l){for(var c=s.attributes,y=0,m=c.length;y<m;y++){var g=c[y];g.name.indexOf("data-ace-")===0&&(r[a(g.name.replace(/^data-ace-/,""))]=g.value)}var d=l.match(/^(.*)\/ace([\-.]\w+)?\.js(\?|$)/);d&&(o=d[1])}}o&&(r.base=r.base||o,r.packaged=!0),r.basePath=r.base,r.workerPath=r.workerPath||r.base,r.modePath=r.modePath||r.base,r.themePath=r.themePath||r.base,delete r.base;for(var b in r)typeof r[b]<"u"&&k.set(b,r[b])}}function a(h){return h.replace(/-(.)/g,function(r,o){return o.toUpperCase()})}}),ace.define("ace/range",["require","exports","module"],function(E,x,B){var k=function(){function A(C,a,h,r){this.start={row:C,column:a},this.end={row:h,column:r}}return A.prototype.isEqual=function(C){return this.start.row===C.start.row&&this.end.row===C.end.row&&this.start.column===C.start.column&&this.end.column===C.end.column},A.prototype.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},A.prototype.contains=function(C,a){return this.compare(C,a)==0},A.prototype.compareRange=function(C){var a,h=C.end,r=C.start;return a=this.compare(h.row,h.column),a==1?(a=this.compare(r.row,r.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(r.row,r.column),a==-1?-1:a==1?42:0)},A.prototype.comparePoint=function(C){return this.compare(C.row,C.column)},A.prototype.containsRange=function(C){return this.comparePoint(C.start)==0&&this.comparePoint(C.end)==0},A.prototype.intersects=function(C){var a=this.compareRange(C);return a==-1||a==0||a==1},A.prototype.isEnd=function(C,a){return this.end.row==C&&this.end.column==a},A.prototype.isStart=function(C,a){return this.start.row==C&&this.start.column==a},A.prototype.setStart=function(C,a){typeof C=="object"?(this.start.column=C.column,this.start.row=C.row):(this.start.row=C,this.start.column=a)},A.prototype.setEnd=function(C,a){typeof C=="object"?(this.end.column=C.column,this.end.row=C.row):(this.end.row=C,this.end.column=a)},A.prototype.inside=function(C,a){return this.compare(C,a)==0?!(this.isEnd(C,a)||this.isStart(C,a)):!1},A.prototype.insideStart=function(C,a){return this.compare(C,a)==0?!this.isEnd(C,a):!1},A.prototype.insideEnd=function(C,a){return this.compare(C,a)==0?!this.isStart(C,a):!1},A.prototype.compare=function(C,a){return!this.isMultiLine()&&C===this.start.row?a<this.start.column?-1:a>this.end.column?1:0:C<this.start.row?-1:C>this.end.row?1:this.start.row===C?a>=this.start.column?0:-1:this.end.row===C?a<=this.end.column?0:1:0},A.prototype.compareStart=function(C,a){return this.start.row==C&&this.start.column==a?-1:this.compare(C,a)},A.prototype.compareEnd=function(C,a){return this.end.row==C&&this.end.column==a?1:this.compare(C,a)},A.prototype.compareInside=function(C,a){return this.end.row==C&&this.end.column==a?1:this.start.row==C&&this.start.column==a?-1:this.compare(C,a)},A.prototype.clipRows=function(C,a){if(this.end.row>a)var h={row:a+1,column:0};else if(this.end.row<C)var h={row:C,column:0};if(this.start.row>a)var r={row:a+1,column:0};else if(this.start.row<C)var r={row:C,column:0};return A.fromPoints(r||this.start,h||this.end)},A.prototype.extend=function(C,a){var h=this.compare(C,a);if(h==0)return this;
166if(h==-1)var r={row:C,column:a};else var o={row:C,column:a};return A.fromPoints(r||this.start,o||this.end)},A.prototype.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},A.prototype.isMultiLine=function(){return this.start.row!==this.end.row},A.prototype.clone=function(){return A.fromPoints(this.start,this.end)},A.prototype.collapseRows=function(){return this.end.column==0?new A(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new A(this.start.row,0,this.end.row,0)},A.prototype.toScreenRange=function(C){var a=C.documentToScreenPosition(this.start),h=C.documentToScreenPosition(this.end);return new A(a.row,a.column,h.row,h.column)},A.prototype.moveBy=function(C,a){this.start.row+=C,this.start.column+=a,this.end.row+=C,this.end.column+=a},A}();k.fromPoints=function(A,C){return new k(A.row,A.column,C.row,C.column)},k.comparePoints=function(A,C){return A.row-C.row||A.column-C.column},x.Range=k}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(E,x,B){for(var k=E("./oop"),A={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:"*"}},C={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++)C["Digit"+a]=48+a,C["Numpad"+a]=96+a,A.PRINTABLE_KEYS[48+a]=""+a,A.FUNCTION_KEYS[96+a]="Numpad"+a;for(var a=65;a<91;a++){var h=String.fromCharCode(a+32);C["Key"+h.toUpperCase()]=a,A.PRINTABLE_KEYS[a]=h}for(var a=1;a<13;a++)C["F"+a]=111+a,A.FUNCTION_KEYS[111+a]="F"+a;var r={Shift:16,Control:17,Alt:18,Meta:224};for(var o in r)C[o]=C[o+"Left"]=C[o+"Right"]=r[o];x.$codeToKeyCode=C,A.PRINTABLE_KEYS[173]="-";for(var n in A.FUNCTION_KEYS){var i=A.FUNCTION_KEYS[n].toLowerCase();A[i]=parseInt(n,10)}for(var n in A.PRINTABLE_KEYS){var i=A.PRINTABLE_KEYS[n].toLowerCase();A[i]=parseInt(n,10)}k.mixin(A,A.MODIFIER_KEYS),k.mixin(A,A.PRINTABLE_KEYS),k.mixin(A,A.FUNCTION_KEYS),A.enter=A.return,A.escape=A.esc,A.del=A.delete,function(){for(var e=["cmd","ctrl","alt","shift"],t=Math.pow(2,e.length);t--;)A.KEY_MODS[t]=e.filter(function(s){return t&A.KEY_MODS[s]}).join("-")+"-"}(),A.KEY_MODS[0]="",A.KEY_MODS[-1]="input-",k.mixin(x,A),x.default=x,x.keyCodeToString=function(e){var t=A[e];return typeof t!="string"&&(t=String.fromCharCode(e)),t.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,B){var k=E("./keys"),A=E("./useragent"),C=null,a=0,h;function r(){h=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){return h={passive:!1},!0}})}catch{}}function o(){return h==null&&r(),h}function n(y,m,g){this.elem=y,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 i=x.addListener=function(y,m,g,d){y.addEventListener(m,g,o()),d&&d.$toDestroy.push(new n(y,m,g))},e=x.removeListener=function(y,m,g){y.removeEventListener(m,g,o())};x.stopEvent=function(y){return x.stopPropagation(y),x.preventDefault(y),!1},x.stopPropagation=function(y){y.stopPropagation&&y.stopPropagation()},x.preventDefault=function(y){y.preventDefault&&y.preventDefault()},x.getButton=function(y){return y.type=="dblclick"?0:y.type=="contextmenu"||A.isMac&&y.ctrlKey&&!y.altKey&&!y.shiftKey?2:y.button},x.capture=function(y,m,g){var d=y&&y.ownerDocument||document;function b(L){m&&m(L),g&&g(L),e(d,"mousemove",m),e(d,"mouseup",b),e(d,"dragstart",b)}return i(d,"mousemove",m),i(d,"mouseup",b),i(d,"dragstart",b),b},x.addMouseWheelListener=function(y,m,g){i(y,"wheel",function(d){var b=.15,L=d.deltaX||0,$=d.deltaY||0;switch(d.deltaMode){case d.DOM_DELTA_PIXEL:d.wheelX=L*b,d.wheelY=$*b;break;case d.DOM_DELTA_LINE:var S=15;d.wheelX=L*S,d.wheelY=$*S;break;case d.DOM_DELTA_PAGE:var _=150;d.wheelX=L*_,d.wheelY=$*_;break}m(d)},g)},x.addMultiMouseDownListener=function(y,m,g,d,b){var L=0,$,S,_,w={2:"dblclick",3:"tripleclick",4:"quadclick"};function v(f){if(x.getButton(f)!==0?L=0:f.detail>1?(L++,L>4&&(L=1)):L=1,A.isIE){var u=Math.abs(f.clientX-$)>5||Math.abs(f.clientY-S)>5;(!_||u)&&(L=1),_&&clearTimeout(_),_=setTimeout(function(){_=null},m[L-1]||600),L==1&&($=f.clientX,S=f.clientY)}if(f._clicks=L,g[d]("mousedown",f),L>4)L=0;else if(L>1)return g[d](w[L],f)}
166Array.isArray(y)||(y=[y]),y.forEach(function(f){i(f,"mousedown",v,b)})};function t(y){return 0|(y.ctrlKey?1:0)|(y.altKey?2:0)|(y.shiftKey?4:0)|(y.metaKey?8:0)}x.getModifierString=function(y){return k.KEY_MODS[t(y)]};function s(y,m,g){var d=t(m);if(!g&&m.code&&(g=k.$codeToKeyCode[m.code]||g),!A.isMac&&C){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(d|=8),C.altGr)if((3&d)!=3)C.altGr=0;else return;if(g===18||g===17){var b=m.location;if(g===17&&b===1)C[g]==1&&(a=m.timeStamp);else if(g===18&&d===3&&b===2){var L=m.timeStamp-a;L<50&&(C.altGr=!0)}}}if(g in k.MODIFIER_KEYS&&(g=-1),!(!d&&g===13&&m.location===3&&(y(m,d,-g),m.defaultPrevented))){if(A.isChromeOS&&d&8){if(y(m,d,g),m.defaultPrevented)return;d&=-9}return!d&&!(g in k.FUNCTION_KEYS)&&!(g in k.PRINTABLE_KEYS)?!1:y(m,d,g)}}x.addCommandKeyListener=function(y,m,g){var d=null;i(y,"keydown",function(b){C[b.keyCode]=(C[b.keyCode]||0)+1;var L=s(m,b,b.keyCode);return d=b.defaultPrevented,L},g),i(y,"keypress",function(b){d&&(b.ctrlKey||b.altKey||b.shiftKey||b.metaKey)&&(x.stopEvent(b),d=null)},g),i(y,"keyup",function(b){C[b.keyCode]=null},g),C||(l(),i(window,"focus",l))};function l(){C=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!A.isOldIE){var c=1;x.nextTick=function(y,m){m=m||window;var g="zero-timeout-message-"+c++,d=function(b){b.data==g&&(x.stopPropagation(b),e(m,"message",d),y())};i(m,"message",d),m.postMessage(g,"*")}}x.$idleBlocked=!1,x.onIdle=function(y,m){return setTimeout(function g(){x.$idleBlocked?setTimeout(g,100):y()},m)},x.$idleBlockId=null,x.blockIdle=function(y){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},y||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(y){setTimeout(y,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(E,x,B){var k;B.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,B){var k=E("../lib/event"),A=E("../config").nls,C=E("../lib/useragent"),a=E("../lib/dom"),h=E("../lib/lang"),r=E("../clipboard"),o=C.isChrome<18,n=C.isIE,i=C.isChrome>63,e=400,t=E("../lib/keys"),s=t.KEY_MODS,l=C.isIOS,c=l?/\s/:/\n/,y=C.isMobile,m=function(){function g(d,b){var L=this;this.host=b,this.text=a.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",d.insertBefore(this.text,d.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",y||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch{}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),k.addListener(this.text,"blur",function($){L.ignoreFocusEvents||(b.onBlur($),L.$isFocused=!1)},b),k.addListener(this.text,"focus",function($){if(!L.ignoreFocusEvents){if(L.$isFocused=!0,C.isEdge)try{if(!document.hasFocus())return}catch{}b.onFocus($),C.isEdge?setTimeout(L.resetSelection.bind(L)):L.resetSelection()}},b),this.$focusScroll=!1,b.on("beforeEndOperation",function(){var $=b.curOp,S=$&&$.command&&$.command.name;if(S!="insertstring"){var _=S&&($.docChanged||$.selectionChanged);L.inComposition&&_&&(L.lastValue=L.text.value="",L.onCompositionEnd()),L.resetSelection()}}),b.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=l?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&b.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,k.addCommandKeyListener(this.text,function($,S,_){if(!L.inComposition)return b.onCommandKey($,S,_)},b),k.addListener(this.text,"select",this.onSelect.bind(this),b),k.addListener(this.text,"input",this.onInput.bind(this),b),k.addListener(this.text,"cut",this.onCut.bind(this),b),k.addListener(this.text,"copy",this.onCopy.bind(this),b),k.addListener(this.text,"paste",this.onPaste.bind(this),b),(!("oncut"in this.text)||!("oncopy"in this.text)||!("onpaste"in this.text))&&k.addListener(d,"keydown",function($){if(!(C.isMac&&!$.metaKey||!$.ctrlKey))switch($.keyCode){case 67:L.onCopy($);break;case 86:L.onPaste($);break;case 88:L.onCut($);break}},b),this.syncComposition=h.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),k.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),b),k.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),b),k.addListener(this.text,"keyup",this.onKeyup.bind(this),b),k.addListener(this.text,"keydown",this.syncComposition.bind(this),b),k.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),b),this.closeTimeout,k.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),b),k.addListener(this.text,"mousedown",function($){$.preventDefault(),L.onContextMenuClose()},b),k.addListener(b.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),b),k.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),b),l&&this.addIosSelectionHandler(d,b,this.text)}return g.prototype.addIosSelectionHandler=function(d,b,L){var $=this,S=null,_=!1;L.addEventListener("keydown",function(v){S&&clearTimeout(S),_=!0},!0),L.addEventListener("keyup",function(v){S=setTimeout(function(){_=!1},100)},!0);var w=function(v){if(document.activeElement===L&&!(_||$.inComposition||b.$mouseHandler.isMousePressed)&&!$.copied){var f=L.selectionStart,u=L.selectionEnd,p=null,M=0;if(f==0?p=t.up:f==1?p=t.home:u>$.lastSelectionEnd&&$.lastValue[u]==` 167`?p=t.end:f<$.lastSelectionStart&&$.lastValue[f-1]==" "?(p=t.left,M=s.option):f<$.lastSelectionStart||f==$.lastSelectionStart&&$.lastSelectionEnd!=$.lastSelectionStart&&f==u?p=t.left:u>$.lastSelectionEnd&&$.lastValue.slice(0,u).split(` 168`).length>2?p=t.down:u>$.lastSelectionEnd&&$.lastValue[u-1]==" "?(p=t.right,M=s.option):(u>$.lastSelectionEnd||u==$.lastSelectionEnd&&$.lastSelectionEnd!=$.lastSelectionStart&&f==u)&&(p=t.right),f!==u&&(M|=s.shift),p){var T=b.onCommandKey({},M,p);if(!T&&b.commands){p=t.keyCodeToString(p);var R=b.commands.findKeyCommand(M,p);R&&b.execCommand(R)}$.lastSelectionStart=f,$.lastSelectionEnd=u,$.resetSelection("")}}};document.addEventListener("selectionchange",w),b.on("destroy",function(){document.removeEventListener("selectionchange",w)})},g.prototype.onContextMenuClose=function(){var d=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout(function(){d.tempStyle&&(d.text.style.cssText=d.tempStyle,d.tempStyle=""),d.host.renderer.$isMousePressed=!1,d.host.renderer.$keepTextAreaAtCurs
168or&&d.host.renderer.$moveTextAreaToCursor()},0)},g.prototype.$onContextMenu=function(d){this.host.textInput.onContextMenu(d),this.onContextMenuClose()},g.prototype.onKeyup=function(d){d.keyCode==27&&this.text.value.length<this.text.selectionStart&&(this.inComposition||(this.lastValue=this.text.value),this.lastSelectionStart=this.lastSelectionEnd=-1,this.resetSelection()),this.syncComposition()},g.prototype.cancelComposition=function(){this.ignoreFocusEvents=!0,this.text.blur(),this.text.focus(),this.ignoreFocusEvents=!1},g.prototype.onCompositionStart=function(d){if(!(this.inComposition||!this.host.onCompositionStart||this.host.$readOnly)&&(this.inComposition={},!this.commandMode)){d.data&&(this.inComposition.useTextareaForIME=!1),setTimeout(this.onCompositionUpdate.bind(this),0),this.host._signal("compositionStart"),this.host.on("mousedown",this.cancelComposition);var b=this.host.getSelectionRange();b.end.row=b.start.row,b.end.column=b.start.column,this.inComposition.markerRange=b,this.inComposition.selectionStart=this.lastSelectionStart,this.host.onCompositionStart(this.inComposition),this.inComposition.useTextareaForIME?(this.lastValue=this.text.value="",this.lastSelectionStart=0,this.lastSelectionEnd=0):(this.text.msGetInputContext&&(this.inComposition.context=this.text.msGetInputContext()),this.text.getInputContext&&(this.inComposition.context=this.text.getInputContext()))}},g.prototype.onCompositionUpdate=function(){if(!(!this.inComposition||!this.host.onCompositionUpdate||this.host.$readOnly)){if(this.commandMode)return this.cancelComposition();if(this.inComposition.useTextareaForIME)this.host.onCompositionUpdate(this.text.value);else{var d=this.text.value;this.sendText(d),this.inComposition.markerRange&&(this.inComposition.context&&(this.inComposition.markerRange.start.column=this.inComposition.selectionStart=this.inComposition.context.compositionStartOffset),this.inComposition.markerRange.end.column=this.inComposition.markerRange.start.column+this.lastSelectionEnd-this.inComposition.selectionStart+this.lastRestoreEnd)}}},g.prototype.onCompositionEnd=function(d){!this.host.onCompositionEnd||this.host.$readOnly||(this.inComposition=!1,this.host.onCompositionEnd(),this.host.off("mousedown",this.cancelComposition),d&&this.onInput())},g.prototype.onCut=function(d){this.doCopy(d,!0)},g.prototype.onCopy=function(d){this.doCopy(d,!1)},g.prototype.onPaste=function(d){var b=this.handleClipboardData(d);r.pasteCancelled()||(typeof b=="string"?(b&&this.host.onPaste(b,d),C.isIE&&setTimeout(this.resetSelection),k.preventDefault(d)):(this.text.value="",this.pasted=!0))},g.prototype.doCopy=function(d,b){var L=this,$=this.host.getCopyText();if(!$)return k.preventDefault(d);this.handleClipboardData(d,$)?(l&&(this.resetSelection($),this.copied=$,setTimeout(function(){L.copied=!1},10)),b?this.host.onCut():this.host.onCopy(),k.preventDefault(d)):(this.copied=!0,this.text.value=$,this.text.select(),setTimeout(function(){L.copied=!1,L.resetSelection(),b?L.host.onCut():L.host.onCopy()}))},g.prototype.handleClipboardData=function(d,b,L){var $=d.clipboardData||window.clipboardData;if(!(!$||o)){var S=n||L?"Text":"text/plain";try{return b?$.setData(S,b)!==!1:$.getData(S)}catch(_){if(!L)return this.handleClipboardData(_,b,!0)}}},g.prototype.onInput=function(d){if(this.inComposition)return this.onCompositionUpdate();if(d&&d.inputType){if(d.inputType=="historyUndo")return this.host.execCommand("undo");if(d.inputType=="historyRedo")return this.host.execCommand("redo")}var b=this.text.value,L=this.sendText(b,!0);(b.length>e+100||c.test(L)||y&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},g.prototype.sendText=function(d,b){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),d&&this.host.onPaste(d),this.pasted=!1,"";for(var L=this.text.selectionStart,$=this.text.selectionEnd,S=this.lastSelectionStart,_=this.lastValue.length-this.lastSelectionEnd,w=d,v=d.length-L,f=d.length-$,u=0;S>0&&this.lastValue[u]==d[u];)u++,S--;for(w=w.slice(u),u=1;_>0&&this.lastValue.length-u>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-u]==d[d.length-u];)u++,_--;v-=u-1,f-=u-1;var p=w.length-u+1;if(p<0&&(S=-p,p=0),w=w.slice(0,p),!b&&!w&&!v&&!S&&!_&&!f)return"";this.sendingText=!0;var M=!1;return C.isAndroid&&w==". "&&(w=" ",M=!0),w&&!S&&!_&&!v&&!f||this.commandMode?this.host.onTextInput(w):this.host.onTextInput(w,{extendLeft:S,extendRight:_,restoreStart:v,restoreEnd:f}),this.sendingText=!1,this.lastValue=d,this.lastSelectionStart=L,this.lastSelectionEnd=$,this.lastRestoreEnd=f,M?` 169`:w},g.prototype.onSelect=function(d){var b=this;if(!this.inComposition){var L=function($){return $.selectionStart===0&&$.selectionEnd>=b.lastValue.length&&$.value===b.lastValue&&b.lastValue&&$.selectionEnd!==b.lastSelectionEnd};this.copied?this.copied=!1:L(this.text)?(this.host.selectAll(),this.resetSelection()):y&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection()}},g.prototype.$resetSelectionIOS=function(d){if(!(!this.$isFocused||this.copied&&!
169d||this.sendingText)){d||(d="");var b=` 170 ab`+d+`cde fg 171`;b!=this.text.value&&(this.text.value=this.lastValue=b);var L=4,$=4+(d.length||(this.host.selection.isEmpty()?0:1));(this.lastSelectionStart!=L||this.lastSelectionEnd!=$)&&this.text.setSelectionRange(L,$),this.lastSelectionStart=L,this.lastSelectionEnd=$}},g.prototype.$resetSelection=function(){var d=this;if(!(this.inComposition||this.sendingText)&&!(!this.$isFocused&&!this.afterContextMenu)){this.inComposition=!0;var b=0,L=0,$="",S=function(R,I){for(var D=I,H=1;H<=R-d.rowStart&&H<2*d.numberOfExtraLines+1;H++)D+=d.host.session.getLine(R-H).length+1;return D};if(this.host.session){var _=this.host.selection,w=_.getRange(),v=_.cursor.row;v===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):v===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(v<this.rowStart-1||v>this.rowEnd+1)&&(this.rowStart=v>this.numberOfExtraLines?v-this.numberOfExtraLines:0,this.rowEnd=v>this.numberOfExtraLines?v+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var f=[],u=this.rowStart;u<=this.rowEnd;u++)f.push(this.host.session.getLine(u));if($=f.join(` 172`),b=S(w.start.row,w.start.column),L=S(w.end.row,w.end.column),w.start.row<this.rowStart){var p=this.host.session.getLine(this.rowStart-1);b=w.start.row<this.rowStart-1?0:b,L+=p.length+1,$=p+` 173`+$}else if(w.end.row>this.rowEnd){var M=this.host.session.getLine(this.rowEnd+1);L=w.end.row>this.rowEnd+1?M.length:w.end.column,L+=$.length+1,$=$+` 174`+M}else y&&v>0&&($=` 175`+$,L+=1,b+=1);$.length>e&&(b<e&&L<e?$=$.slice(0,e):($=` 176`,b==L?b=L=0:(b=0,L=1)));var T=$+` 177 178`;T!=this.lastValue&&(this.text.value=this.lastValue=T,this.lastSelectionStart=this.lastSelectionEnd=T.length)}if(this.afterContextMenu&&(this.lastSelectionStart=this.text.selectionStart,this.lastSelectionEnd=this.text.selectionEnd),this.lastSelectionEnd!=L||this.lastSelectionStart!=b||this.text.selectionEnd!=this.lastSelectionEnd)try{this.text.setSelectionRange(b,L),this.lastSelectionStart=b,this.lastSelectionEnd=L}catch{}this.inComposition=!1}},g.prototype.setHost=function(d){this.host=d},g.prototype.setNumberOfExtraLines=function(d){if(this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,d<0){this.numberOfExtraLines=0;return}this.numberOfExtraLines=d},g.prototype.setAriaLabel=function(){var d="";if(this.host.$textInputAriaLabel&&(d+="".concat(this.host.$textInputAriaLabel,", ")),this.host.session){var b=this.host.session.selection.cursor.row;d+=A("text-input.aria-label","Cursor at row $0",[b+1])}this.text.setAttribute("aria-label",d)},g.prototype.setAriaOptions=function(d){d.activeDescendant?(this.text.setAttribute("aria-haspopup","true"),this.text.setAttribute("aria-autocomplete",d.inline?"both":"list"),this.text.setAttribute("aria-activedescendant",d.activeDescendant)):(this.text.setAttribute("aria-haspopup","false"),this.text.setAttribute("aria-autocomplete","both"),this.text.removeAttribute("aria-activedescendant")),d.role&&this.text.setAttribute("role",d.role),d.setLabel&&(this.text.setAttribute("aria-roledescription",A("text-input.aria-roledescription","editor")),this.setAriaLabel())},g.prototype.focus=function(){var d=this;if(this.setAriaOptions({setLabel:this.host.renderer.enableKeyboardAccessibility}),this.tempStyle||i||this.$focusScroll=="browser")return this.text.focus({preventScroll:!0});var b=this.text.style.top;this.text.style.position="fixed",this.text.style.top="0px";try{var L=this.text.getBoundingClientRect().top!=0}catch{return}var $=[];if(L)for(var S=this.text.parentElement;S&&S.nodeType==1;)$.push(S),S.setAttribute("ace_nocontext","true"),!S.parentElement&&S.getRootNode?S=S.getRootNode().host:S=S.parentElement;this.text.focus({preventScroll:!0}),L&&$.forEach(function(_){_.removeAttribute("ace_nocontext")}),setTimeout(function(){d.text.style.position="",d.text.style.top=="0px"&&(d.text.style.top=b)},0)},g.prototype.blur=function(){this.text.blur()},g.prototype.isFocused=function(){return this.$isFocused},g.prototype.setInputHandler=function(d){this.inputHandler=d},g.prototype.getInputHandler=function(){return this.inputHandler},g.prototype.getElement=function(){return this.text},g.prototype.setCommandMode=function(d){this.commandMode=d,this.text.readOnly=!1},g.prototype.setReadOnly=function(d){this.commandMode||(this.text.readOnly=d)},g.prototype.setCopyWithEmptySelection=function(d){},g.prototype.onContextMenu=function(d){this.afterContextMenu=!0,this.resetSelection(),this.host._emit("nativecontextmenu",{target:this.host,domEvent:d}),this.moveToMouse(d,!0)},g.prototype.moveToMouse=function(d,b){var L=this;this.tempStyle||(this.tempStyle=this.text.style.cssText),this.text.style.cssText=(b?"z-index:100000;":"")+(C.isIE?"opacity:0.1;":"")+"text-indent: -"+(this.lastSelectionStart+this.lastSelectionEnd)*this.host.renderer.characterWidth*.5+"px;";var $=this.host.container.getBoundingClientRect(),S=a.computedStyle(this.host.container),_=$.top+(parseInt(S.borderTopWidth)||0),w=$.left+(parseInt(S.borderLeftWidth)||0),v=$.bottom-_-this.text.clientHeight-2,f=function(u){a.translate(L.text,u.clientX-w-2,Math.min(u.clientY-_-2,v))};f(d),d.type=="mousedown"&&(this.host.renderer.$isMousePressed=!0,clearTimeout(this.closeTimeout),C.isWin&&k.capture(this.host.container,f,this.onContextMenuClose.bind(this)))},g.prototype.destroy=function(){this.text.parentElement&&this.text.parentElement.removeChild(this.text)},g}();x.TextInput=m,x.$setUserAgentForTests=function(g,d){y=g,l=d}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(E,x,B){var k=E("../lib/useragent"),A=0,C=550,a=function(){function o(n){n.$clickSelection=null;var i=n.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(t){n[t]=this[t]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return o.prototype.onMouseDown=function(n){var i=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var t=this.editor,s=n.getButton();if(s!==0){var l=t.getSelectionRange(),c=l.isEmpty();(c||s==1)&&t.selection.moveToPosition(e),s==2&&(t.textInput.onContextMenu(n.domEvent),k.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!t.isFocused()&&(t.focus(),this.$focusTimeout&&!this.$clickSelection&&!t.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},o.prototype.startSelect=function(n,i){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):i||e.selection.moveToPosition(n),i||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},o.prototype.select=function(){var n,i=this.editor,e=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var t=this.$clickSelection.comparePoint(e);if(t==-1)n=this.$clickSelection.end;else if(t==1)n=this.$clickSelection.start;else{var s=r(this.$clickSelection,e,i.session);e=s.cursor,n=s.anchor}i.selection.setSelectionAnchor(n.row,n.column)}i.selection.selectToPosition(e),i.renderer.scrollCursorIntoView()},o.prototype.extendSelectionBy=function(n){var i,e=this.editor,t=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[n](t.row,t.column);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s.start),c=this.$clickSelection.comparePoint(s.end);if(l==-1&&c<=0)i=this.$clickSelection.end,(s.end.row!=t.row||s.end.column!=t.column)&&(t=s.start);else if(c==1&&l>=0)i=this.$clickSelection.start,(s.start.row!=t.row||s.start.column!=t.column)&&(t=s.end);else if(l==-1&&c==1)t=s.end,i=s.start;else{var y=r(this.$clickSelection,t,e.session);t=y.cursor,i=y.anchor}e.selection.setSelectionAnchor(i.row,i.column)}e.selection.selectToPosition(t),e.renderer.scrollCursorIntoView()},o.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")}
178,o.prototype.focusWait=function(){var n=h(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(n>A||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},o.prototype.onDoubleClick=function(n){var i=n.getDocumentPosition(),e=this.editor,t=e.session,s=t.getBracketRange(i);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},o.prototype.onTripleClick=function(n){var i=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var t=e.getSelectionRange();t.isMultiLine()&&t.contains(i.row,i.column)?(this.$clickSelection=e.selection.getLineRange(t.start.row),this.$clickSelection.end=e.selection.getLineRange(t.end.row).end):this.$clickSelection=e.selection.getLineRange(i.row),this.select()},o.prototype.onQuadClick=function(n){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},o.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,t=n.domEvent.timeStamp,s=t-e.t,l=s?n.wheelX/s:e.vx,c=s?n.wheelY/s:e.vy;s<C&&(l=(l+e.vx)/2,c=(c+e.vy)/2);var y=Math.abs(l/c),m=!1;if(y>=1&&i.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(m=!0),y<=1&&i.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(m=!0),m)e.allowed=t;else if(t-e.allowed<C){var g=Math.abs(l)<=1.5*Math.abs(e.vx)&&Math.abs(c)<=1.5*Math.abs(e.vy);g?(m=!0,e.allowed=t):e.allowed=0}if(e.t=t,e.vx=l,e.vy=c,m)return i.renderer.scrollBy(n.wheelX*n.speed,n.wheelY*n.speed),n.stop()}},o}();a.prototype.selectEnd=a.prototype.selectByLinesEnd,a.prototype.selectAllEnd=a.prototype.selectByLinesEnd,a.prototype.selectByWordsEnd=a.prototype.selectByLinesEnd,x.DefaultHandlers=a;function h(o,n,i,e){return Math.sqrt(Math.pow(i-o,2)+Math.pow(e-n,2))}function r(o,n,i){if(o.start.row==o.end.row)var e=2*n.column-o.start.column-o.end.column;else if(o.start.row==o.end.row-1&&!o.start.column&&!o.end.column)var e=3*n.column-2*i.getLine(o.start.row).length;else var e=2*n.row-o.start.row-o.end.row;return e<0?{cursor:o.start,anchor:o.end}:{cursor:o.end,anchor:o.start}}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,x,B){var k=E("../lib/event"),A=E("../lib/useragent"),C=function(){function a(h,r){this.speed,this.wheelX,this.wheelY,this.domEvent=h,this.editor=r,this.x=this.clientX=h.clientX,this.y=this.clientY=h.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 h=this.getDocumentPosition().row,r=this.editor.session.documentToScreenRow(h,0),o=this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0);return r-o},a.prototype.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var h=this.editor,r=h.getSelectionRange();if(r.isEmpty())this.$inSelection=!1;else{var o=this.getDocumentPosition();this.$inSelection=r.contains(o.row,o.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 A.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},a}();x.MouseEvent=C}),ace.define("ace/lib/scroll",["require","exports","module"],function(E,x,B){x.preventParentScroll=function(A){A.stopPropagation();var C=A.currentTarget,a=C.scrollHeight>C.clientHeight;a||A.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(E,x,B){var k=this&&this.__extends||function(){var t=function(s,l){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,y){c.__proto__=y}||function(c,y){for(var m in y)Object.prototype.hasOwnProperty.call(y,m)&&(c[m]=y[m])},t(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");t(s,l);function c(){this.constructor=s}
178s.prototype=l===null?Object.create(l):(c.prototype=l.prototype,new c)}}(),A=this&&this.__values||function(t){var s=typeof Symbol=="function"&&Symbol.iterator,l=s&&t[s],c=0;if(l)return l.call(t);if(t&&typeof t.length=="number")return{next:function(){return t&&c>=t.length&&(t=void 0),{value:t&&t[c++],done:!t}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},C=E("./lib/dom");E("./lib/event");var a=E("./range").Range,h=E("./lib/scroll").preventParentScroll,r="ace_tooltip",o=function(){function t(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return t.prototype.$init=function(){return this.$element=C.createElement("div"),this.$element.className=r,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},t.prototype.getElement=function(){return this.$element||this.$init()},t.prototype.setText=function(s){this.getElement().textContent=s},t.prototype.setHtml=function(s){this.getElement().innerHTML=s},t.prototype.setPosition=function(s,l){this.getElement().style.left=s+"px",this.getElement().style.top=l+"px"},t.prototype.setClassName=function(s){C.addCssClass(this.getElement(),s)},t.prototype.setTheme=function(s){this.theme&&(this.theme.isDark&&C.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&C.removeCssClass(this.getElement(),this.theme.cssClass)),s.isDark&&C.addCssClass(this.getElement(),"ace_dark"),s.cssClass&&C.addCssClass(this.getElement(),s.cssClass),this.theme={isDark:s.isDark,cssClass:s.cssClass}},t.prototype.show=function(s,l,c){s!=null&&this.setText(s),l!=null&&c!=null&&this.setPosition(l,c),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},t.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=r,this.isOpen=!1)},t.prototype.getHeight=function(){return this.getElement().offsetHeight},t.prototype.getWidth=function(){return this.getElement().offsetWidth},t.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},t}(),n=function(){function t(){this.popups=[]}return t.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},t.prototype.removePopup=function(s){var l=this.popups.indexOf(s);l!==-1&&(this.popups.splice(l,1),this.updatePopups())},t.prototype.updatePopups=function(){var s,l,c,y;this.popups.sort(function(w,v){return v.priority-w.priority});var m=[];try{for(var g=A(this.popups),d=g.next();!d.done;d=g.next()){var b=d.value,L=!0;try{for(var $=(c=void 0,A(m)),S=$.next();!S.done;S=$.next()){var _=S.value;if(this.doPopupsOverlap(_,b)){L=!1;break}}}catch(w){c={error:w}}finally{try{S&&!S.done&&(y=$.return)&&y.call($)}finally{if(c)throw c.error}}L?m.push(b):b.hide()}}catch(w){s={error:w}}finally{try{d&&!d.done&&(l=g.return)&&l.call(g)}finally{if(s)throw s.error}}},t.prototype.doPopupsOverlap=function(s,l){var c=s.getElement().getBoundingClientRect(),y=l.getElement().getBoundingClientRect();return c.left<y.right&&c.right>y.left&&c.top<y.bottom&&c.bottom>y.top},t}(),i=new n;x.popupManager=i,x.Tooltip=o;var e=function(t){k(s,t);function s(l){l===void 0&&(l=document.body);var c=t.call(this,l)||this;c.timeout=void 0,c.lastT=0,c.idleTime=350,c.lastEvent=void 0,c.onMouseOut=c.onMouseOut.bind(c),c.onMouseMove=c.onMouseMove.bind(c),c.waitForHover=c.waitForHover.bind(c),c.hide=c.hide.bind(c);var y=c.getElement();return y.style.whiteSpace="pre-wrap",y.style.pointerEvents="auto",y.addEventListener("mouseout",c.onMouseOut),y.tabIndex=-1,y.addEventListener("blur",(function(){y.contains(document.activeElement)||this.hide()}).bind(c)),y.addEventListener("wheel",h),c}return s.prototype.addToEditor=function(l){l.on("mousemove",this.onMouseMove),l.on("mousedown",this.hide);var c=l.renderer.getMouseEventTarget();c&&typeof c.removeEventListener=="function"&&c.addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(l){l.off("mousemove",this.onMouseMove),l.off("mousedown",this.hide);var c=l.renderer.getMouseEventTarget();c&&typeof c.removeEventListener=="function"&&c.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(l,c){this.lastEvent=l,this.lastT=Date.now();var y=c.$mouseHandler.isMousePressed;if(this.isOpen){var m=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(m.row,m.column)||y||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||y||(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 c=l.editor,y=l.getDocumentPosition(),m=c.session.getLine(y.row);if(y.column==m.length){var g=c.renderer.pixelToScreenCoordinates(l.clientX,l.clientY),d=c.session.documentToScreenPosition(y.row,y.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,c,y,m){if(!(m&&m!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var g=l.renderer;this.isOpen||(i.addPopup(this),this.$registerCloseEvents(),this.setTheme(g.theme)),this.isOpen=!0,this.range=a.fromPoints(c.start,c.end);var d=g.textToScreenCoordinates(c.start.row,c.start.column),b=g.scroller.getBoundingClientRect();d.pageX<b.left&&(d.pageX=b.left);var L=this.getElement();L.innerHTML="",L.appendChild(y),L.style.maxHeight="",L.style.display="block",this.$setPosition(l,d,!0,c),C.$fixPositionBug(L)}},s.prototype.$setPosition=function(l,c,y,m){var g=10;y&&this.addMarker(m,l.session);var d=l.renderer,b=this.getElement(),L=b.offsetHeight,$=b.offsetWidth,S=c.pageY,_=c.pageX,w=window.innerHeight-S-d.lineHeight,v=this.$shouldPlaceAbove(L,S,w-g);b.style.maxHeight=(v?S:w)-g+"px",b.style.top=v?"":S+d.lineHeight+"px",b.style.bottom=v?window.innerHeight-S+"px":"",b.style.left=Math.min(_,window.innerWidth-$-g)+"px"},s.prototype.$shouldPlaceAbove=function(l,c,y){return!(c-l<0&&c<y)},s.prototype.addMarker=function(l,c){this.marker&&this.$markerSession.removeMarker(this.marker),this.$markerSession=c,this.marker=c&&c.addMarker(l,"ace_highlight-marker","text")},s.prototype.hide=function(l){l&&this.$fromKeyboard&&l.type=="keydown"&&l.code=="Escape"||!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.$fromKeyboard=!1,this.$removeCloseEvents(),this.getElement().style.display="none",this.isOpen=!1,i.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}(o);x.HoverTooltip=e}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/mouse/mouse_event","ace/tooltip","ace/config","ace/range"],function(E,x,B){var k=this&&this.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var y in c)Object.prototype.hasOwnProperty.call(c,y)&&(l[y]=c[y])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function l(){this.constructor=t}
178t.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),A=this&&this.__values||function(e){var t=typeof Symbol=="function"&&Symbol.iterator,s=t&&e[t],l=0;if(s)return s.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&l>=e.length&&(e=void 0),{value:e&&e[l++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},C=E("../lib/dom"),a=E("./mouse_event").MouseEvent,h=E("../tooltip").HoverTooltip,r=E("../config").nls,o=E("../range").Range;function n(e){var t=e.editor,s=t.renderer.$gutterLayer;e.$tooltip=new i(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider(function(l,c){var y=l.getDocumentPosition().row;e.$tooltip.showTooltip(y)}),e.editor.setDefaultHandler("guttermousedown",function(l){if(!(!t.isFocused()||l.getButton()!=0)){var c=s.getRegion(l);if(c!="foldWidgets"){var y=l.getDocumentPosition().row,m=t.session.selection;if(l.getShiftKey())m.selectTo(y,0);else{if(l.domEvent.detail==2)return t.selectAll(),l.preventDefault();e.$clickSelection=t.selection.getLineRange(y)}return e.setState("selectByLines"),e.captureMouse(l),l.preventDefault()}}})}x.GutterHandler=n;var i=function(e){k(t,e);function t(s){var l=e.call(this,s.container)||this;l.id="gt"+ ++t.$uid,l.editor=s,l.visibleTooltipRow;var c=l.getElement();return c.setAttribute("role","tooltip"),c.setAttribute("id",l.id),c.style.pointerEvents="auto",l.idleTime=50,l.onDomMouseMove=l.onDomMouseMove.bind(l),l.onDomMouseOut=l.onDomMouseOut.bind(l),l.setClassName("ace_gutter-tooltip"),l}return t.prototype.onDomMouseMove=function(s){var l=new a(s,this.editor);this.onMouseMove(l,this.editor)},t.prototype.onDomMouseOut=function(s){var l=new a(s,this.editor);this.onMouseOut(l)},t.prototype.addToEditor=function(s){var l=s.renderer.$gutter;l.addEventListener("mousemove",this.onDomMouseMove),l.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,s)},t.prototype.removeFromEditor=function(s){var l=s.renderer.$gutter;l.removeEventListener("mousemove",this.onDomMouseMove),l.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,s)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:r("gutter-tooltip.aria-label.security.singular","security finding"),plural:r("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:r("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:r("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(s){var l,c=this.editor.renderer.$gutterLayer,y=c.$annotations[s],m;y?m={displayText:Array.from(y.displayText),type:Array.from(y.type)}:m={displayText:[],type:[]};var g=c.session.getFoldLine(s);if(g&&c.$showFoldedAnnotations){for(var d={error:[],security:[],warning:[],info:[],hint:[]},b={error:1,security:2,warning:3,info:4,hint:5},L,$=s+1;$<=g.end.row;$++)if(c.$annotations[$])for(var S=0;S<c.$annotations[$].text.length;S++){var _=c.$annotations[$].type[S];d[_].push(c.$annotations[$].text[S]),(!L||b[_]<b[L])&&(L=_)}if(["error","security","warning"].includes(L)){var w="".concat(t.annotationsToSummaryString(d)," in folded code.");m.displayText.push(w),m.type.push(L+"_fold")}}if(m.displayText.length===0)return this.hide();for(var v={error:[],security:[],warning:[],info:[],hint:[]},f=c.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",$=0;$<m.displayText.length;$++){var u=C.createElement("span"),p=C.createElement("span");(l=p.classList).add.apply(l,["ace_".concat(m.type[$]),f]),p.setAttribute("aria-label","".concat(t.annotationLabels[m.type[$].replace("_fold","")].singular)),p.setAttribute("role","img"),p.appendChild(C.createTextNode(" ")),u.appendChild(p),u.appendChild(C.createTextNode(m.displayText[$])),u.a
178ppendChild(C.createElement("br")),v[m.type[$].replace("_fold","")].push(u)}var M=C.createElement("span");v.error.forEach(function(I){return M.appendChild(I)}),v.security.forEach(function(I){return M.appendChild(I)}),v.warning.forEach(function(I){return M.appendChild(I)}),v.info.forEach(function(I){return M.appendChild(I)}),v.hint.forEach(function(I){return M.appendChild(I)}),M.setAttribute("aria-live","polite");var T=this.$findLinkedAnnotationNode(s);T&&T.setAttribute("aria-describedby",this.id);var R=o.fromPoints({row:s,column:0},{row:s,column:0});this.showForRange(this.editor,R,M),this.visibleTooltipRow=s,this.editor._signal("showGutterTooltip",this)},t.prototype.$setPosition=function(s,l,c,y){var m=this.$findCellByRow(y.start.row);if(m){var g=m&&m.element,d=g&&g.querySelector(".ace_gutter_annotation");if(d){var b=d.getBoundingClientRect();if(b){var L={pageX:b.right,pageY:b.top};return e.prototype.$setPosition.call(this,s,L,!1,y)}}}},t.prototype.$shouldPlaceAbove=function(s,l,c){return c<s},t.prototype.$findLinkedAnnotationNode=function(s){var l=this.$findCellByRow(s);if(l){var c=l.element;if(c.childNodes.length>2)return c.childNodes[2]}},t.prototype.$findCellByRow=function(s){return this.editor.renderer.$gutterLayer.$lines.cells.find(function(l){return l.row===s})},t.prototype.hide=function(s){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),this.visibleTooltipRow!=null){var l=this.$findLinkedAnnotationNode(this.visibleTooltipRow);l&&l.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,s)}},t.annotationsToSummaryString=function(s){var l,c,y=[],m=["error","security","warning","info","hint"];try{for(var g=A(m),d=g.next();!d.done;d=g.next()){var b=d.value;if(s[b].length){var L=s[b].length===1?t.annotationLabels[b].singular:t.annotationLabels[b].plural;y.push("".concat(s[b].length," ").concat(L))}}}catch($){l={error:$}}finally{try{d&&!d.done&&(c=g.return)&&c.call(g)}finally{if(l)throw l.error}}return y.join(", ")},t.prototype.isOutsideOfText=function(s){var l=s.editor,c=l.renderer.$gutter.getBoundingClientRect();return!(s.clientX>=c.left&&s.clientX<=c.right&&s.clientY>=c.top&&s.clientY<=c.bottom)},t}(h);i.$uid=0,x.GutterTooltip=i}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(E,x,B){var k=E("../lib/dom"),A=E("../lib/event"),C=E("../lib/useragent"),a=200,h=200,r=5;function o(i){var e=i.editor,t=k.createElement("div");t.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",t.textContent=" ";var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(O){i[O]=this[O]},this),e.on("mousedown",this.onMouseDown.bind(i));var l=e.container,c,y,m,g,d,b,L=0,$,S,_,w,v;this.onDragStart=function(O){if(this.cancelDrag||!l.draggable){var N=this;return setTimeout(function(){N.startSelect(),N.captureMouse(O)},0),O.preventDefault()}d=e.getSelectionRange();var F=O.dataTransfer;F.effectAllowed=e.getReadOnly()?"copy":"copyMove",e.container.appendChild(t),F.setDragImage&&F.setDragImage(t,0,0),setTimeout(function(){e.container.removeChild(t)}),F.clearData(),F.setData("Text",e.session.getTextRange()),S=!0,this.setState("drag")},this.onDragEnd=function(O){if(l.draggable=!1,S=!1,this.setState(null),!e.getReadOnly()){var N=O.dataTransfer.dropEffect;!$&&N=="move"&&e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(O){if(!(e.getReadOnly()||!D(O.dataTransfer)))return y=O.clientX,m=O.clientY,c||M(),L++,O.dataTransfer.dropEffect=$=H(O),A.preventDefault(O)},this.onDragOver=function(O){if(!(e.getReadOnly()||!D(O.dataTransfer)))return y=O.clientX,m=O.clientY,c||(M(),L++),R!==null&&(R=null),O.dataTransfer.dropEffect=$=H(O),A.preventDefault(O)},this.onDragLeave=function(O){if(L--,L<=0&&c)return T(),$=null,A.preventDefault(O)},this.onDrop=function(O){if(b){var N=O.dataTransfer;if(S)switch($){case"move":d.contains(b.row,b.column)?d={start:b,end:b}:d=e.moveText(d,b);break;case"copy":d=e.moveText(d,b,!0);break}else{var F=N.getData("Text");d={start:b,end:e.session.insert(b,F)},e.focus(),$=null}return T(),A.preventDefault(O)}},A.addListener(l,"dragstart",this.onDragStart.bind(i),e),A.addListener(l,"dragend",this.onDragEnd.bind(i),e),A.addListener(l,"dragenter",this.onDragEnter.bind(i),e),A.addListener(l,"dragover",this.onDragOver.bind(i),e),A.addListener(l,"dragleave",this.onDragLeave.bind(i),e),A.addListener(l,"drop",this.onDrop.bind(i),e);function f(O,N){var F=Date.now(),W=!N||O.row!=N.row,z=!N||O.column!=N.column;if(!w||W||z)e.moveCursorToPosition(O),w=F,v={x:y,y:m};else{var P=n(v.x,v.y,y,m);P>r?w=null:F-w>=h&&(e.renderer.scrollCursorIntoView(),w=null)}}function u(O,N){var F=Date.now(),W=e.renderer.layerConfig.lineHeight,z=e.renderer.layerConfig.characterWidth,P=e.renderer.scroller.getBoundingClientRect(),U={x:{left:y-P.left,right:P.right-y},y:{top:m-P.top,bottom:P.bottom-m}},j=Math.min(U.x.left,U.x.right),V=Math.min(U.y.top,U.y.bottom),G={row:O.row,column:O.column};j/z<=2&&(G.column+=U.x.left<U.x.right?-3:2),V/W<=1&&(G.row+=U.y.top<U.y.bottom?-1:1);var Y=O.row!=G.row,Z=O.column!=G.column,K=!N||O.row!=N.row;Y||Z&&!K?_?F-_>=a&&e.renderer.scrollCursorIntoView(G):_=F:_=null}function p(){var O=b;b=e.renderer.screenToTextCoordinates(y,m),f(b,O),u(b,O)}function M(){d=e.selection.toOrientedRange(),c=e.session.addMarker(d,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),p(),g=setInterval(p,20),L=0,A.addListener(document,"mousemove",I)}function T(){clearInterval(g),e.session.removeMarker(c),c=null,e.selection.fromOrientedRange(d),e.isFocused()&&!S&&e.$resetCursorStyle(),d=null,b=null,L=0,_=null,w=null,A.removeListener(document,"mousemove",I)}var R=null;function I(){R==null&&(R=setTimeout(function(){R!=null&&c&&T()},20))}function D(O){var N=O.types;return!N||Array.prototype.some.call(N,function(F){return F=="text/plain"||F=="Text"})}function H(O){var N=["copy","copymove","all","uninitialized"],F=["move","copymove","linkmove","all","uninitialized"],W=C.isMac?O.altKey:O.ctrlKey,z="uninitialized";try{z=O.dataTransfer.effectAllowed.toLowerCase()}catch{}var P="none";return W&&N.indexOf(z)>=0?P="copy":F.indexOf(z)>=0?P="move":N.indexOf(z)>=0&&(P="copy"),P}}(function(){this.dragWait=function(){var i=Date.now()-this.mousedownEvent.time;i>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var i=this.editor.container;i.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(i){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var i=this.editor,e=i.container;e.draggable=!0,i.renderer.$cursorLayer.setBlinking(!1),i.setStyle("ace_dragging");var t=C.isWin?"default":"move";i.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(i){var e=this.editor.container;if(C.isIE&&this.state=="dragReady"){var t=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>3&&e.dragDrop()}if(this.state==="dragWait"){var t=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);t>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(i){if(this.$dragEnabled){this.mousedownEvent=i;var e=this.editor,t=i.inSelection(),s=i.getButton(),l=i.domEvent.detail||1;if(l===1&&s===0&&t){if(i.editor.inMultiSelectMode&&(i.getAccelKey()||i.getShiftKey()))return;this.mousedownEvent.time=Date.now();var c=i.domEvent.target||i.domEvent.srcElement;if("unselectable"in c&&(c.unselectable="on"),e.getDragDelay()){if(C.isWebKit){this.cancelDrag=!0;var y=e.container;y.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(i,this.onMouseDrag.bind(this)),i.defaultPrevented=!0}}}}).call(o.prototype);function n(i,e,t,s){return Math.sqrt(Math.pow(t-i,2)+Math.pow(s-e,2))}x.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(E,x,B){var k=E("./mouse_event").MouseEvent,A=E("../lib/event"),C=E("../lib/dom");x.addTouchListeners=function(a,h){var r="scroll",o,n,i,e,t,s,l=0,c,y=0,m=0,g=0,d,b;function L(){var f=window.navigator&&window.navigator.clipboard,u=!1,p=function(){var R=h.getCopyText(),I=h.session.getUndoManager().hasUndo();b.replaceChild(C.buildDom(u?["span",!R&&M("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],R&&M("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],R&&M("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],f&&M("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&M("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],M("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],M("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),b.firstChild)},M=function(R){return h.commands.canExecute(R,h)},T=function(R){var I=R.target.getAttribute("action");if(I=="more"||!u)return u=!u,p();I=="paste"?f.readText().then(function(D){h.execCommand(I,D)}):I&&((I=="cut"||I=="copy")&&(f?f.writeText(h.getCopyText()):document.execCommand("copy")),h.execCommand(I)),b.firstChild.style.display="none",u=!1,I!="openCommandPalette"&&h.focus()};b=C.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(R){r="menu",R.stopPropagation(),R.preventDefault(),h.textInput.focus()},ontouchend:function(R){R.stopPropagation(),R.preventDefault(),T(R)},onclick:T},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],h.container)}function $(){if(!h.getOption("enableMobileMenu")){b&&S();return}b||L();var f=h.selection.cursor,u=h.renderer.textToScreenCoordinates(f.row,f.column),p=h.renderer.textToScreenCoordinates(0,0).pageX,M=h.renderer.scrollLeft,T=h.container.getBoundingClientRect();b.style.top=u.pageY-T.top-3+"px",u.pageX-T.left<T.width-70?(b.style.left="",b.style.right="10px"):(b.style.right="",b.style.left=p+M-T.left+"px"),b.style.display="",b.firstChild.style.display="none",h.on("input",S)}function S(f){b&&(b.style.display="none"),h.off("input",S)}function _(){t=null,clearTimeout(t);var f=h.selection.getRange(),u=f.contains(c.row,c.column);(f.isEmpty()||!u)&&(h.selection.moveToPosition(c),h.selection.selectWord()),r="wait",$()}function w(){t=null,clearTimeout(t),h.selection.moveToPosition(c);var f=y>=2?h.selection.getLineRange(c.row):h.session.getBracketRange(c);f&&!f.isEmpty()?h.selection.setRange(f):h.selection.selectWord(),r="wait"}A.addListener(a,"contextmenu",function(f){if(d){var u=h.textInput.getElement();u.focus()}},h),A.addListener(a,"touchstart",function(f){var u=f.touches;if(t||u.length>1){clearTimeout(t),t=null,i=-1,r="zoom";return}d=h.$mouseHandler.isMousePressed=!0;var p=h.renderer.layerConfig.lineHeight,M=h.renderer.layerConfig.lineHeight,T=f.timeStamp;e=T;var R=u[0],I=R.clientX,D=R.clientY;Math.abs(o-I)+Math.abs(n-D)>p&&(i=-1),o=f.clientX=I,n=f.clientY=D,m=g=0;var H=new k(f,h);if(c=H.getDocumentPosition(),T-i<500&&u.length==1&&!l)y++,f.preventDefault(),f.button=0,w();else{y=0;var O=h.selection.cursor,N=h.selection.isEmpty()?O:h.selection.anchor,F=h.renderer.$cursorLayer.getPixelPosition(O,!0),W=h.renderer.$cursorLayer.getPixelPosition(N,!0),z=h.renderer.scroller.getBoundingClientRect(),P=h.renderer.layerConfig.offset,U=h.renderer.scrollLeft,j=function(Y,Z){return Y=Y/M,Z=Z/p-.75,Y*Y+Z*Z};if(f.clientX<z.left){r="zoom";return}var V=j(f.clientX-z.left-F.left+U,f.clientY-z.top-F.top+P),G=j(f.clientX-z.left-W.left+U,f.clientY-z.top-W.to
178p+P);V<3.5&&G<3.5&&(r=V>G?"cursor":"anchor"),G<3.5?r="anchor":V<3.5?r="cursor":r="scroll",t=setTimeout(_,450)}i=T},h),A.addListener(a,"touchend",function(f){d=h.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),r=="zoom"?(r="",l=0):t?(h.selection.moveToPosition(c),l=0,$()):r=="scroll"?(v(),S()):$(),clearTimeout(t),t=null},h),A.addListener(a,"touchmove",function(f){t&&(clearTimeout(t),t=null);var u=f.touches;if(!(u.length>1||r=="zoom")){var p=u[0],M=o-p.clientX,T=n-p.clientY;if(r=="wait")if(M*M+T*T>4)r="cursor";else return f.preventDefault();o=p.clientX,n=p.clientY,f.clientX=p.clientX,f.clientY=p.clientY;var R=f.timeStamp,I=R-e;if(e=R,r=="scroll"){var D=new k(f,h);D.speed=1,D.wheelX=M,D.wheelY=T,10*Math.abs(M)<Math.abs(T)&&(M=0),10*Math.abs(T)<Math.abs(M)&&(T=0),I!=0&&(m=M/I,g=T/I),h._emit("mousewheel",D),D.propagationStopped||(m=g=0)}else{var H=new k(f,h),O=H.getDocumentPosition();r=="cursor"?h.selection.moveCursorToPosition(O):r=="anchor"&&h.selection.setSelectionAnchor(O.row,O.column),h.renderer.scrollCursorIntoView(O),f.preventDefault()}}},h);function v(){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 f=h.session.getScrollTop();h.renderer.scrollBy(10*m,10*g),f==h.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,B){var k=E("../lib/event"),A=E("../lib/useragent"),C=E("./default_handlers").DefaultHandlers,a=E("./default_gutter_handler").GutterHandler,h=E("./mouse_event").MouseEvent,r=E("./dragdrop_handler").DragdropHandler,o=E("./touch_handler").addTouchListeners,n=E("../config"),i=function(){function e(t){this.$dragDelay,this.$dragEnabled,this.$mouseMoved,this.mouseEvent,this.$focusTimeout;var s=this;this.editor=t,new C(this),new a(this),new r(this);var l=function(m){var g=!document.hasFocus||!document.hasFocus()||!t.isFocused()&&document.activeElement==(t.textInput&&t.textInput.getElement());g&&window.focus(),t.focus(),setTimeout(function(){t.isFocused()||t.focus()})},c=t.renderer.getMouseEventTarget();k.addListener(c,"click",this.onMouseEvent.bind(this,"click"),t),k.addListener(c,"mousemove",this.onMouseMove.bind(this,"mousemove"),t),k.addMultiMouseDownListener([c,t.renderer.scrollBarV&&t.renderer.scrollBarV.inner,t.renderer.scrollBarH&&t.renderer.scrollBarH.inner,t.textInput&&t.textInput.getElement()].filter(Boolean),[400,300,250],this,"onMouseEvent",t),k.addMouseWheelListener(t.container,this.onMouseWheel.bind(this,"mousewheel"),t),o(t.container,t);var y=t.renderer.$gutter;k.addListener(y,"mousedown",this.onMouseEvent.bind(this,"guttermousedown"),t),k.addListener(y,"click",this.onMouseEvent.bind(this,"gutterclick"),t),k.addListener(y,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick"),t),k.addListener(y,"mousemove",this.onMouseEvent.bind(this,"guttermousemove"),t),k.addListener(c,"mousedown",l,t),k.addListener(y,"mousedown",l,t),A.isIE&&t.renderer.scrollBarV&&(k.addListener(t.renderer.scrollBarV.element,"mousedown",l,t),k.addListener(t.renderer.scrollBarH.element,"mousedown",l,t)),t.on("mousemove",function(m){if(!(s.state||s.$dragDelay||!s.$dragEnabled)){var g=t.renderer.screenToTextCoordinates(m.x,m.y),d=t.session.selection.getRange(),b=t.renderer;!d.isEmpty()&&d.insideStart(g.row,g.column)?b.setCursorStyle("default"):b.setCursorStyle("")}},t)}return e.prototype.onMouseEvent=function(t,s){this.editor.session&&this.editor._emit(t,new h(s,this.editor))},e.prototype.onMouseMove=function(t,s){var l=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;!l||!l.length||this.editor._emit(t,new h(s,this.editor))},e.prototype.onMouseWheel=function(t,s){var l=new h(s,this.editor);l.speed=this.$scrollSpeed*2,l.wheelX=s.wheelX,l.wheelY=s.wheelY,this.editor._emit(t,l)},e.prototype.setState=function(t){this.state=t},e.prototype.captureMouse=function(t,s){this.x=t.x,this.y=t.y,this.isMousePressed=!0;var l=this.editor,c=this.editor.renderer;c.$isMousePressed=!0;var y=this,m=!0,g=function(S){if(S){if(A.isWebKit&&!S.which&&y.releaseMouse)return y.releaseMouse();
178y.x=S.clientX,y.y=S.clientY,s&&s(S),y.mouseEvent=new h(S,y.editor),y.$mouseMoved=!0}},d=function(S){l.off("beforeEndOperation",$),m=!1,l.session&&b(),y[y.state+"End"]&&y[y.state+"End"](S),y.state="",y.isMousePressed=c.$isMousePressed=!1,c.$keepTextAreaAtCursor&&c.$moveTextAreaToCursor(),y.$onCaptureMouseMove=y.releaseMouse=null,S&&y.onMouseEvent("mouseup",S),l.endOperation()},b=function(){y[y.state]&&y[y.state](),y.$mouseMoved=!1},L=function(){m&&(b(),k.nextFrame(L))};if(A.isOldIE&&t.domEvent.type=="dblclick")return setTimeout(function(){d(t)});var $=function(S){y.releaseMouse&&l.curOp.command.name&&l.curOp.selectionChanged&&(y[y.state+"End"]&&y[y.state+"End"](),y.state="",y.releaseMouse())};l.on("beforeEndOperation",$),l.startOperation({command:{name:"mouse"}}),y.$onCaptureMouseMove=g,y.releaseMouse=k.capture(this.editor.container,g,d),L()},e.prototype.cancelContextMenu=function(){var t=(function(s){s&&s.domEvent&&s.domEvent.type!="contextmenu"||(this.editor.off("nativecontextmenu",t),s&&s.domEvent&&k.stopEvent(s.domEvent))}).bind(this);setTimeout(t,10),this.editor.on("nativecontextmenu",t)},e.prototype.destroy=function(){this.releaseMouse&&this.releaseMouse(),this.$tooltip&&this.$tooltip.destroy()},e}();i.prototype.releaseMouse=null,n.defineOptions(i.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:A.isMac?150:0},dragEnabled:{initialValue:!0},focusTimeout:{initialValue:0}}),x.MouseHandler=i}),ace.define("ace/mouse/fold_handler",["require","exports","module","ace/lib/dom"],function(E,x,B){var k=E("../lib/dom"),A=function(){function C(a){a.on("click",function(h){var r=h.getDocumentPosition(),o=a.session,n=o.getFoldAt(r.row,r.column,1);n&&(h.getAccelKey()?o.removeFold(n):o.expandFold(n),h.stop());var i=h.domEvent&&h.domEvent.target;i&&k.hasCssClass(i,"ace_inline_button")&&k.hasCssClass(i,"ace_toggle_wrap")&&(o.setOption("wrap",!o.getUseWrapMode()),a.renderer.scrollCursorIntoView())}),a.on("gutterclick",function(h){var r=a.renderer.$gutterLayer.getRegion(h);if(r=="foldWidgets"){var o=h.getDocumentPosition().row,n=a.session;n.foldWidgets&&n.foldWidgets[o]&&a.session.onFoldWidgetClick(o,h),a.isFocused()||a.focus(),h.stop()}}),a.on("gutterdblclick",function(h){var r=a.renderer.$gutterLayer.getRegion(h);if(r=="foldWidgets"){var o=h.getDocumentPosition().row,n=a.session,i=n.getParentFoldRangeData(o,!0),e=i.range||i.firstRange;if(e){o=e.start.row;var t=n.getFoldAt(o,n.getLine(o).length,1);t?n.removeFold(t):(n.addFold("...",e),a.renderer.scrollCursorIntoView({row:e.start.row,column:0}))}h.stop()}})}return C}();x.FoldHandler=A}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(E,x,B){var k=E("../lib/keys"),A=E("../lib/event"),C=function(){function a(h){this.$editor=h,this.$data={editor:h},this.$handlers=[],this.setDefaultHandler(h.commands)}return a.prototype.setDefaultHandler=function(h){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=h,this.addKeyboardHandler(h,0)},a.prototype.setKeyboardHandler=function(h){var r=this.$handlers;if(r[r.length-1]!=h){for(;r[r.length-1]&&r[r.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(r[r.length-1]);this.addKeyboardHandler(h,1)}},a.prototype.addKeyboardHandler=function(h,r){if(h){typeof h=="function"&&!h.handleKeyboard&&(h.handleKeyboard=h);var o=this.$handlers.indexOf(h);o!=-1&&this.$handlers.splice(o,1),r==null?this.$handlers.push(h):this.$handlers.splice(r,0,h),o==-1&&h.attach&&h.attach(this.$editor)}},a.prototype.removeKeyboardHandler=function(h){var r=this.$handlers.indexOf(h);return r==-1?!1:(this.$handlers.splice(r,1),h.detach&&h.detach(this.$editor),!0)},a.prototype.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},a.prototype.getStatusText=function(){var h=this.$data,r=h.editor;return this.$handlers.map(function(o){return o.getStatusText&&o.getStatusText(r,h)||""}).filter(Boolean).join(" ")},a.prototype.$callKeyboardHandlers=function(h,r,o,n){for(var i,e=!1,t=this.$editor.commands,s=this.$handlers.length;s--&&(i=this.$handlers[s].handleKeyboard(this.$data,h,r,o,n),!(!(!i||!i.command)&&(i.command=="null"?e=!0:e=t.exec(i.command,this.$editor,i.args,n),e&&n&&h!=-1&&i.passEvent!=!0&&i.command.passEvent!=!0&&A.stopEvent(n),e))););return!e&&h==-1&&(i={command:"insertstring"},e=t.exec("insertstring",this.$editor,r)),e&&this.$editor._signal&&this.$editor._signal("keyboardActivity",i),e},a.prototype.onCommandKey=function(h,r,o){var n=k.keyCodeToString(o);return this.$callKeyboardHandlers(r,n,o,h)},a.prototype.onTextInput=function(h){return this.$callKeyboardHandlers(-1,h)},a}();x.KeyBinding=C}),ace.define("ace/lib/bidiutil",["require","exports","module"],function(E,x,B){var k=0,A=0,C=!1,a=!1,h=!1,r=[[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]],o=[[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,i=1,e=0,t=1,s=2,l=3,c=4,y=5,m=6,g=7,d=8,b=9,L=10,$=11,S=12,_=13,w=14,v=15,f=16,u=17,p=18,M=[p,p,p,p,p,p,p,p,p,m,y,m,d,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,y,y,y,m,d,c,c,$,$,$,c,c,c,c,c,L,b,L,b,b,s,s,s,s,s,s,s,s,s,s,b,c,c,c,c,c,c,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,c,c,c,c,c,c,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,c,c,c,c,p,p,p,p,p,p,y,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,p,b,c,$,$,$,$,c,c,c,c,e,c,c,p,c,c,$,$,s,s,c,e,c,c,c,s,e,c,c,c,c,c],T=[d,d,d,d,d,d,d,d,d,d,d,p,p,p,e,t,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,d,y,_,w,v,f,u,b,$,$,$,$,$,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,b,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,c,d];function R(O,N,F,W){var z=k?o:r,P=null,U=null,j=null,V=0,G=null,Y=null,Z=-1,K=null,X=null,ee=[];
178if(!W)for(K=0,W=[];K<F;K++)W[K]=H(O[K]);for(A=k,C=!1,a=!1,h=!1,X=0;X<F;X++){if(P=V,ee[X]=U=D(O,W,ee,X),V=z[P][U],G=V&240,V&=15,N[X]=j=z[V][5],G>0)if(G==16){for(K=Z;K<X;K++)N[K]=1;Z=-1}else Z=-1;if(Y=z[V][6],Y)Z==-1&&(Z=X);else if(Z>-1){for(K=Z;K<X;K++)N[K]=j;Z=-1}W[X]==y&&(N[X]=0),A|=j}if(h){for(K=0;K<F;K++)if(W[K]==m){N[K]=k;for(var q=K-1;q>=0&&W[q]==d;q--)N[q]=k}}}function I(O,N,F){if(!(A<O)){if(O==1&&k==i&&!a){F.reverse();return}for(var W=F.length,z=0,P,U,j,V;z<W;){if(N[z]>=O){for(P=z+1;P<W&&N[P]>=O;)P++;for(U=z,j=P-1;U<j;U++,j--)V=F[U],F[U]=F[j],F[j]=V;z=P}z++}}}function D(O,N,F,W){var z=N[W],P,U,j,V;switch(z){case e:case t:C=!1;case c:case l:return z;case s:return C?l:s;case g:return C=!0,t;case d:return c;case b:return W<1||W+1>=N.length||(P=F[W-1])!=s&&P!=l||(U=N[W+1])!=s&&U!=l?c:(C&&(U=l),U==P?U:c);case L:return P=W>0?F[W-1]:y,P==s&&W+1<N.length&&N[W+1]==s?s:c;case $:if(W>0&&F[W-1]==s)return s;if(C)return c;for(V=W+1,j=N.length;V<j&&N[V]==$;)V++;return V<j&&N[V]==s?s:c;case S:for(j=N.length,V=W+1;V<j&&N[V]==S;)V++;if(V<j){var G=O[W],Y=G>=1425&&G<=2303||G==64286;if(P=N[V],Y&&(P==t||P==g))return t}return W<1||(P=N[W-1])==y?c:F[W-1];case y:return C=!1,a=!0,k;case m:return h=!0,c;case _:case w:case f:case u:case v:C=!1;case p:return c}}function H(O){var N=O.charCodeAt(0),F=N>>8;return F==0?N>191?e:M[N]:F==5?/[\u0591-\u05f4]/.test(O)?t:e:F==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(O)?S:/[\u0660-\u0669\u066b-\u066c]/.test(O)?l:N==1642?$:/[\u06f0-\u06f9]/.test(O)?s:g:F==32&&N<=8287?T[N&255]:F==254&&N>=65136?g:c}x.L=e,x.R=t,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,N,F){if(O.length<2)return{};var W=O.split(""),z=new Array(W.length),P=new Array(W.length),U=[];k=F?i:n,R(W,U,W.length,N);for(var j=0;j<z.length;z[j]=j,j++);I(2,U,z),I(1,U,z);for(var j=0;j<z.length-1;j++)N[j]===l?U[j]=x.AN:U[j]===t&&(N[j]>g&&N[j]<_||N[j]===c||N[j]===p)?U[j]=x.ON_R:j>0&&W[j-1]==="ل"&&/\u0622|\u0623|\u0625|\u0627/.test(W[j])&&(U[j-1]=U[j]=x.R_H,j++);W[W.length-1]===x.DOT&&(U[W.length-1]=x.B),W[0]==="‫"&&(U[0]=x.RLE);for(var j=0;j<z.length;j++)P[j]=U[z[j]];return{logicalFromVisual:z,bidiLevels:P}},x.hasBidiCharacters=function(O,N){for(var F=!1,W=0;W<O.length;W++)N[W]=H(O.charAt(W)),!F&&(N[W]==t||N[W]==g||N[W]==l)&&(F=!0);return F},x.getVisualFromLogicalIdx=function(O,N){for(var F=0;F<N.logicalFromVisual.length;F++)if(N.logicalFromVisual[F]==O)return F;return 0}}),ace.define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"],function(E,x,B){var k=E("./lib/bidiutil"),A=E("./lib/lang"),C=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/,a=function(){function h(r){this.session=r,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=C.test(r.getValue())}return h.prototype.isBidiRow=function(r,o,n){return this.seenBidi?(r!==this.currentRow&&(this.currentRow=r,this.updateRowLine(o,n),this.updateBidiMap()),this.bidiMap.bidiLevels):!1},h.prototype.onChange=function(r){this.seenBidi?this.currentRow=null:r.action=="insert"&&C.test(r.lines.join(` 179`))&&(this.seenBidi=!0,this.currentRow=null)},h.prototype.getDocumentRow=function(){var r=0,o=this.session.$screenRowCache;if(o.length){var n=this.session.$getRowCacheIndex(o,this.currentRow);n>=0&&(r=this.session.$docRowCache[n])}return r},h.prototype.getSplitIndex=function(){var r=0,o=this.session.$screenRowCache;if(o.length)for(var n,i=this.session.$getRowCacheIndex(o,this.currentRow);this.currentRow-r>0&&(n=this.session.$getRowCacheIndex(o,this.currentRow-r-1),n===i);)i=n,r++;else r=this.currentRow;return r},h.prototype.updateRowLine=function(r,o){r===void 0&&(r=this.getDocumentRow());var n=r===this.session.getLength()-1,i=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(r),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[r];e&&(o===void 0&&(o=this.getSplitIndex()),o>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[k.L],this.line=o<e.length?this.line.substring(e[o-1],e[o]):this.line.substring(e[e.length-1])):this.line=this.line.substring(0,e[o]),o==e.length&&(this.line+=this.showInvisibles?i:k.DOT))}else this.line+=this.showInvisibles?i:k.DOT;var t=this.session,s=0,l;this.line=this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g,function(c,y){return c===" "||t.isFullWidth(c.charCodeAt(0))?(l=c===" "?t.getScreenTabSize(y+s):2,s+=l-1,A.stringRepeat(k.DOT,l)):c}),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)},h.prototype.updateBidiMap=function(){var r=[];k.hasBidiCharacters(this.line,r)||this.isRtlDir?this.bidiMap=k.doBidiReorder(this.line,r,this.isRtlDir):this.bidiMap={}},h.prototype.markAsDirty=function(){this.currentRow=null},h.prototype.updateCharacterWidths=function(r){if(this.characterWidth!==r.$characterSize.width){this.fontMetrics=r;var o=this.characterWidth=r.$characterSize.width,n=r.$measureCharWidth("ה");this.charWidths[k.L]=this.charWidths[k.EN]=this.charWidths[k.ON_R]=o,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}},h.prototype.setShowInvisibles=function(r){this.showInvisibles=r,this.currentRow=null},h.prototype.setEolChar=function(r){this.EOL=r},h.prototype.setContentWidth=function(r){this.contentWidth=r},h.prototype.isRtlLine=function(r){return this.$isRtl?!0:r!=null?this.session.getLine(r).charAt(0)==this.RLE:this.isRtlDir},h.prototype.setRtlDirection=function(r,o){for(var n=r.getCursorPosition(),i=r.selection.getSelectionAnchor().row;i<=n.row;i++)!o&&r.session.getLine(i).charAt(0)===r.session.$bidiHandler.RLE?r.session.doc.removeInLine(i,0,1):o&&r.session.getLine(i).charAt(0)!==r.session.$bidiHandler.RLE&&r.session.doc.insert({column:0,row:i},r.session.$bidiHandler.RLE)},h.prototype.getPosLeft=function(r){r-=this.wrapIndent;var o=this.line.charAt(0)===this.RLE?1:0,n=r>o?this.session.getOverwrite()?r:r-1:o,i=k.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,t=0;!this.session.getOverwrite()&&r<=o&&e[i]%2!==0&&i++;for(var s=0;s<i;s++)t+=this.charWidths[e[s]];return!this.session.getOverwrite()&&r>o&&e[i]%2===0&&(t+=this.charWidths[e[i]]),this.wrapIndent&&(t+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(t+=this.rtlLineOffset),t},h.prototype.getSelections=function(r,o){var n=this.bidiMap,i=n.bidiLevels,e,t=[],s=0,l=Math.min(r,o)-this.wrapIndent,c=Math.max(r,o)-this.wrapIndent,y=!1,m=!1,g=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,b=0;b<i.length;b++)d=n.logicalFromVisual[b],e=i[b],y=d>=l&&d<c,y&&!m?g=s:!y&&m&&t.push({left:g,width:s-g}),s+=this.charWidths[e],m=y;if(y&&b===i.length&&t.push({left:g,width:s-g}),this.isRtlDir)for(var L=0;L<t.length;L++)t[L].left+=this.rtlLineOffset;return t},h.prototype.offsetToCol=function(n){this.isRtlDir&&(n-=this.rtlLineOffset);var o=0,n=Math.max(n,0),i=0,e=0,t=this.bidiMap.bidiLevels,s=this.charWidths[t[e]];for(this.wrapIndent&&(n-=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);n>i+s/2;){if(i+=s,e===t.length-1){s=0;break}s=this.charWidths[t[++e]]}return e>0&&t[e-1]%2!==0&&t[e]%2===0?(n<i&&e--,o=this.bidiMap.logicalFromVisual[e]):e>0&&t[e-1]%2===0&&t[e]%2!==0?o=1+(n>i?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===t.length-1&&s===0&&t[e-1]%2===0||!this.isRtlDir&&e===0&&t[e]%2!==0?o=1+this.bidiMap.logicalFromVisual[e]:(e>0&&t[e-1]%2!==0&&s!==0&&e--,o=this.bidiMap.logicalFromVisual[e]),o===0&&this.isRtlDir&&o++,o+this.wrapIndent},h}();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,B){var k=E("./lib/oop"),A=E("./lib/lang"),C=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,h=function(){function r(o){this.session=o,this.doc=o.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(i){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return r.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},r.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},r.prototype.getCursor=function(){return this.lead.getPosition()},r.prototype.setAnchor=function(o,n){this.$isEmpty=!1,this.anchor.setPosition(o,n)}
vendor: 5,317 bytes, line 179
179,r.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},r.prototype.getSelectionLead=function(){return this.lead.getPosition()},r.prototype.isBackwards=function(){var o=this.anchor,n=this.lead;return o.row>n.row||o.row==n.row&&o.column>n.column},r.prototype.getRange=function(){var o=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,o):a.fromPoints(o,n)},r.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},r.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},r.prototype.setRange=function(o,n){var i=n?o.end:o.start,e=n?o.start:o.end;this.$setSelection(i.row,i.column,e.row,e.column)},r.prototype.$setSelection=function(o,n,i,e){if(!this.$silent){var t=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(o,n),this.cursor.setPosition(i,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||t!=this.$isEmpty||s)&&this._emit("changeSelection")}},r.prototype.$moveSelection=function(o){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),o.call(this)},r.prototype.selectTo=function(o,n){this.$moveSelection(function(){this.moveCursorTo(o,n)})},r.prototype.selectToPosition=function(o){this.$moveSelection(function(){this.moveCursorToPosition(o)})},r.prototype.moveTo=function(o,n){this.clearSelection(),this.moveCursorTo(o,n)},r.prototype.moveToPosition=function(o){this.clearSelection(),this.moveCursorToPosition(o)},r.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},r.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},r.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},r.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},r.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},r.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},r.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},r.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},r.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},r.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},r.prototype.getWordRange=function(o,n){if(typeof n>"u"){var i=o||this.lead;o=i.row,n=i.column}return this.session.getWordRange(o,n)},r.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},r.prototype.selectAWord=function(){var o=this.getCursor(),n=this.session.getAWordRange(o.row,o.column);this.setSelectionRange(n)},r.prototype.getLineRange=function(o,n){var i=typeof o=="number"?o:this.lead.row,e,t=this.session.getFoldLine(i);return t?(i=t.start.row,e=t.end.row):e=i,n===!0?new a(i,0,e,this.session.getLine(e).length):new a(i,0,e+1,0)},r.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},r.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},r.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},r.prototype.wouldMoveIntoSoftTab=function(o,n,i){var e=o.column,t=o.column+n;return i<0&&(e=o.column-n,t=o.column),this.session.isTabStop(o)&&this.doc.getLine(o.row).slice(e,t).split(" ").length-1==n},r.prototype.moveCursorLeft=function(){var o=this.lead.getPosition(),n;if(n=this.session.getFoldAt(o.row,o.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(o.column===0)o.row>0&&this.moveCursorTo(o.row-1,this.doc.getLine(o.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(o,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},r.prototype.moveCursorRight=function(){var o=this.lead.getPosition(),n;if(n=this.session.getFoldAt(o.row,o.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 i=this.session.getTabSize(),o=this.lead;this.wouldMoveIntoSoftTab(o,i,1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,i):this.moveCursorBy(0,1)}},r.prototype.moveCursorLineStart=function(){var o=this.lead.row,n=this.lead.column,i=this.session.documentToScreenRow(o,n),e=this.session.screenToDocumentPosition(i,0),t=this.session.getDisplayLine(o,null,e.row,e.column),s=t.match(/^\s*/);s[0].length!=n&&!this.session.$useEmacsStyleLineStart&&(e.column+=s[0].length),this.moveCursorToPosition(e)},r.prototype.moveCursorLineEnd=function(){var o=this.lead,n=this.session.getDocumentLastRowColumnPosition(o.row,o.column);if(this.lead.column==n.column){var i=this.session.getLine(n.row);if(n.column==i.length){var e=i.search(/\s+$/);e>0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},r.prototype.moveCursorFileEnd=function(){var o=this.doc.getLength()-1,n=this.doc.getLine(o).length;this.moveCursorTo(o,n)},r.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},r.prototype.moveCursorLongWordRight=function(){var o=this.lead.row,n=this.lead.column,i=this.doc.getLine(o),e=i.substring(n);
179this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var t=this.session.getFoldAt(o,n,1);if(t){this.moveCursorTo(t.end.row,t.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=i.substring(n)),n>=i.length){this.moveCursorTo(o,i.length),this.moveCursorRight(),o<this.doc.getLength()-1&&this.moveCursorWordRight();return}this.session.tokenRe.exec(e)&&(n+=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,n)},r.prototype.moveCursorLongWordLeft=function(){var o=this.lead.row,n=this.lead.column,i;if(i=this.session.getFoldAt(o,n,-1)){this.moveCursorTo(i.start.row,i.start.column);return}var e=this.session.getFoldStringAt(o,n,-1);e==null&&(e=this.doc.getLine(o).substring(0,n));var t=A.stringReverse(e);if(this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0,this.session.nonTokenRe.exec(t)&&(n-=this.session.nonTokenRe.lastIndex,t=t.slice(this.session.nonTokenRe.lastIndex),this.session.nonTokenRe.lastIndex=0),n<=0){this.moveCursorTo(o,0),this.moveCursorLeft(),o>0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(t)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(o,n)},r.prototype.$shortWordEndIndex=function(o){var n=0,i,e=/\s/,t=this.session.tokenRe;if(t.lastIndex=0,this.session.tokenRe.exec(o))n=this.session.tokenRe.lastIndex;else{for(;(i=o[n])&&e.test(i);)n++;if(n<1){for(t.lastIndex=0;(i=o[n])&&!t.test(i);)if(t.lastIndex=0,n++,e.test(i))if(n>2){n--;break}else{for(;(i=o[n])&&e.test(i);)n++;if(n>2)break}}}return t.lastIndex=0,n},r.prototype.moveCursorShortWordRight=function(){var o=this.lead.row,n=this.lead.column,i=this.doc.getLine(o),e=i.substring(n),t=this.session.getFoldAt(o,n,1);if(t)return this.moveCursorTo(t.end.row,t.end.column);if(n==i.length){var s=this.doc.getLength();do o++,e=this.doc.getLine(o);while(o<s&&/^\s*$/.test(e));/^\s+/.test(e)||(e=""),n=0}var l=this.$shortWordEndIndex(e);this.moveCursorTo(o,n+l)},r.prototype.moveCursorShortWordLeft=function(){var o=this.lead.row,n=this.lead.column,i;if(i=this.session.getFoldAt(o,n,-1))return this.moveCursorTo(i.start.row,i.start.column);var e=this.session.getLine(o).substring(0,n);if(n===0){do o--,e=this.doc.getLine(o);while(o>0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var t=A.stringReverse(e),s=this.$shortWordEndIndex(t);return this.moveCursorTo(o,n-s)},r.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},r.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},r.prototype.moveCursorBy=function(o,n){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(o!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),o!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var t=this.session.lineWidgets[this.lead.row];o<0?o-=t.rowsAbove||0:o>0&&(o+=t.rowCount-(t.rowsAbove||0))}var s=this.session.screenToDocumentPosition(i.row+o,i.column,e);o!==0&&n===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+n,n===0)},r.prototype.moveCursorToPosition=function(o){this.moveCursorTo(o.row,o.column)},r.prototype.moveCursorTo=function(o,n,i){var e=this.session.getFoldAt(o,n,1);e&&(o=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var t=this.session.getLine(o);/[\uDC00-\uDFFF]/.test(t.charAt(n))&&t.charAt(n-1)&&(this.lead.row==o&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(o,n),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},r.prototype.moveCursorToScreen=function(o,n,i){var e=this.session.screenToDocumentPosition(o,n);this.moveCursorTo(e.row,e.column,i)},r.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},r.prototype.fromOrientedRange=function(o){this.setSelectionRange(o,o.cursor==o.start),this.$desiredColumn=o.desiredColumn||this.$desiredColumn},r.prototype.toOrientedRange=function(o){var n=this.getRange();return o?(o.start.column=n.start.column,o.start.row=n.start.row,o.end.column=n.end.column,o.end.row=n.end.row):o=n,o.cursor=this.isBackwards()?o.start:o.end,o.desiredColumn=this.$desiredColumn,o},r.prototype.getRangeOfMovements=function(o){var n=this.getCursor();try{o(this);var i=this.getCursor();return a.fromPoints(n,i)}catch{return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},r.prototype.toJSON=function(){if(this.rangeCount)var o=this.ranges.map(function(n){var i=n.clone();return i.isBackwards=n.cursor==n.start,i});else{var o=this.getRange();o.isBackwards=this.isBackwards()}return o}
179,r.prototype.fromJSON=function(o){if(o.start==null)if(this.rangeList&&o.length>1){this.toSingleRange(o[0]);for(var n=o.length;n--;){var i=a.fromPoints(o[n].start,o[n].end);o[n].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else o=o[0];this.rangeList&&this.toSingleRange(o),this.setSelectionRange(o,o.isBackwards)},r.prototype.isEqual=function(o){if((o.length||this.rangeCount)&&o.length!=this.rangeCount)return!1;if(!o.length||!this.ranges)return this.getRange().isEqual(o);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(o[n]))return!1;return!0},r}();h.prototype.setSelectionAnchor=h.prototype.setAnchor,h.prototype.getSelectionAnchor=h.prototype.getAnchor,h.prototype.setSelectionRange=h.prototype.setRange,k.implement(h.prototype,C),x.Selection=h}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(E,x,B){var k=E("./lib/report_error").reportError,A=2e3,C=function(){function a(h){this.splitRegex,this.states=h,this.regExps={},this.matchMappings={};for(var r in this.states){for(var o=this.states[r],n=[],i=0,e=this.matchMappings[r]={defaultToken:"text"},t="g",s=[],l=0;l<o.length;l++){var c=o[l];if(c.defaultToken&&(e.defaultToken=c.defaultToken),c.caseInsensitive&&t.indexOf("i")===-1&&(t+="i"),c.unicode&&t.indexOf("u")===-1&&(t+="u"),c.regex!=null){c.regex instanceof RegExp&&(c.regex=c.regex.toString().slice(1,-1));var y=c.regex,m=new RegExp("(?:("+y+")|(.))").exec("a").length-2;Array.isArray(c.token)?c.token.length==1||m==1?c.token=c.token[0]:m-1!=c.token.length?(this.reportError("number of classes and regexp groups doesn't match",{rule:c,groupCount:m-1}),c.token=c.token[0]):(c.tokenArray=c.token,c.token=null,c.onMatch=this.$arrayTokens):typeof c.token=="function"&&!c.onMatch&&(m>1?c.onMatch=this.$applyToken:c.onMatch=c.token),m>1&&(/\\\d/.test(c.regex)?y=c.regex.replace(/\\([0-9]+)/g,function(g,d){return"\\"+(parseInt(d,10)+i+1)}):(m=1,y=this.removeCapturingGroups(c.regex)),!c.splitRegex&&typeof c.token!="string"&&s.push(c)),e[i]=l,i+=m,n.push(y),c.onMatch||(c.onMatch=null)}}
179n.length||(e[0]=0,n.push("$")),s.forEach(function(g){g.splitRegex=this.createSplitterRegexp(g.regex,t)},this),this.regExps[r]=new RegExp("("+n.join(")|(")+")|($)",t)}}return a.prototype.$setMaxTokenCount=function(h){A=h|0},a.prototype.$applyToken=function(h){var r=this.splitRegex.exec(h).slice(1),o=this.token.apply(this,r);if(typeof o=="string")return[{type:o,value:h}];for(var n=[],i=0,e=o.length;i<e;i++)r[i]&&(n[n.length]={type:o[i],value:r[i]});return n},a.prototype.$arrayTokens=function(h){if(!h)return[];var r=this.splitRegex.exec(h);if(!r)return"text";for(var o=[],n=this.tokenArray,i=0,e=n.length;i<e;i++)r[i+1]&&(o[o.length]={type:n[i],value:r[i+1]});return o},a.prototype.removeCapturingGroups=function(h){var r=h.replace(/\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!<]|(\()/g,function(o,n){return n?"(?:":o});return r},a.prototype.createSplitterRegexp=function(h,r){if(h.indexOf("(?=")!=-1){var o=0,n=!1,i={};h.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(e,t,s,l,c,y){return n?n=c!="]":c?n=!0:l?(o==i.stack&&(i.end=y+1,i.stack=-1),o--):s&&(o++,s.length!=1&&(i.stack=o,i.start=y)),e}),i.end!=null&&/^\)*$/.test(h.substr(i.end))&&(h=h.substring(0,i.start)+h.substr(i.end))}return h.charAt(0)!="^"&&(h="^"+h),h.charAt(h.length-1)!="$"&&(h+="$"),new RegExp(h,(r||"").replace("g",""))},a.prototype.getLineTokens=function(h,r){if(r&&typeof r!="string"){var o=r.slice(0);r=o[0],r==="#tmp"&&(o.shift(),r=o.shift())}else var o=[];var n=r||"start",i=this.states[n];i||(n="start",i=this.states[n]);var e=this.matchMappings[n],t=this.regExps[n];t.lastIndex=0;for(var s,l=[],c=0,y=0,m={type:null,value:""};s=t.exec(h);){var g=e.defaultToken,d=null,b=s[0],L=t.lastIndex;if(L-b.length>c){var $=h.substring(c,L-b.length);m.type==g?m.value+=$:(m.type&&l.push(m),m={type:g,value:$})}for(var S=0;S<s.length-2;S++)if(s[S+1]!==void 0){d=i[e[S]],d.onMatch?g=d.onMatch(b,n,o,h):g=d.token,d.next&&(typeof d.next=="string"?n=d.next:n=d.next(n,o),i=this.states[n],i||(this.reportError("state doesn't exist",n),n="start",i=this.states[n]),e=this.matchMappings[n],c=L,t=this.regExps[n],t.lastIndex=L),d.consumeLineEnd&&(c=L);break}if(b){if(typeof g=="string")(!d||d.merge!==!1)&&m.type===g?m.value+=b:(m.type&&l.push(m),m={type:g,value:b});else if(g){m.type&&l.push(m),m={type:null,value:""};for(var S=0;S<g.length;S++)l.push(g[S])}}if(c==h.length)break;if(c=L,y++>A){for(y>2*h.length&&this.reportError("infinite loop with in ace tokenizer",{startState:r,line:h});c<h.length;)m.type&&l.push(m),m={value:h.substring(c,c+=500),type:"overflow"};n="start",o=[];break}}return m.type&&l.push(m),o.length>1&&o[0]!==n&&o.unshift("#tmp",n),{tokens:l,state:o.length?o:n}},a}();C.prototype.reportError=k,x.Tokenizer=C}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(E,x,B){var k=E("../lib/deep_copy").deepCopy,A;A=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(h,r){if(!r){for(var o in h)this.$rules[o]=h[o];return}for(var o in h){for(var n=h[o],i=0;i<n.length;i++){var e=n[i];(e.next||e.onMatch)&&(typeof e.next=="string"&&e.next.indexOf(r)!==0&&(e.next=r+e.next),e.nextState&&e.nextState.indexOf(r)!==0&&(e.nextState=r+e.nextState))}this.$rules[r+o]=n}},this.getRules=function(){return this.$rules},this.embedRules=function(h,r,o,n,i){var e=typeof h=="function"?new h().getRules():h;if(n)for(var t=0;t<n.length;t++)n[t]=r+n[t];else{n=[];for(var s in e)n.push(r+s)}if(this.addRules(e,r),o)for(var l=Array.prototype[i?"push":"unshift"],t=0;t<n.length;t++)l.apply(this.$rules[n[t]],k(o));this.$embeds||(this.$embeds=[]),this.$embeds.push(r)},this.getEmbeds=function(){return this.$embeds};var C=function(h,r){return(h!="start"||r.length)&&r.unshift(this.nextState,h),this.nextState},a=function(h,r){return r.shift(),r.shift()||"start"};this.normalizeRules=function(){var h=0,r=this.$rules;function o(n){var i=r[n];i.processed=!0;for(var e=0;e<i.length;e++){var t=i[e],s=null;Array.isArray(t)&&(s=t,t={}),!t.regex&&t.start&&(t.regex=t.start,t.next||(t.next=[]),t.next.push({defaultToken:t.token},{token:t.token+".end",regex:t.end||t.start,next:"pop"}),t.token=t.token+".start",t.push=!0);var l=t.next||t.push;if(l&&Array.isArray(l)){var c=t.stateName;c||(c=t.token,typeof c!="string"&&(c=c[0]||""),r[c]&&(c+=h++)),r[c]=l,t.next=c,o(c)}else l=="pop"&&(t.next=a);if(t.push&&(t.nextState=t.next||t.push,t.next=C,delete t.push),t.rules)for(var y in t.rules)r[y]?r[y].push&&r[y].push.apply(r[y],t.rules[y]):r[y]=t.rules[y];var m=typeof t=="string"?t:t.include;if(m&&(m==="$self"&&(m="start"),Array.isArray(m)?s=m.map(function(d){return r[d]}):s=r[m]),s){var g=[e,1].concat(s);t.noEscape&&(g=g.filter(function(d){return!d.next})),i.splice.apply(i,g),e--}
179t.keywordMap&&(t.token=this.createKeywordMapper(t.keywordMap,t.defaultToken||"text",t.caseInsensitive),delete t.defaultToken)}}Object.keys(r).forEach(o,this)},this.createKeywordMapper=function(h,r,o,n){var i=Object.create(null);return this.$keywordList=[],Object.keys(h).forEach(function(e){for(var t=h[e],s=t.split(n||"|"),l=s.length;l--;){var c=s[l];this.$keywordList.push(c),o&&(c=c.toLowerCase()),i[c]=e}},this),h=null,o?function(e){return i[e.toLowerCase()]||r}:function(e){return i[e]||r}},this.getKeywords=function(){return this.$keywords}}).call(A.prototype),x.TextHighlightRules=A}),ace.define("ace/mode/behaviour",["require","exports","module"],function(E,x,B){var k;k=function(){this.$behaviours={}},(function(){this.add=function(A,C,a){switch(void 0){case this.$behaviours:this.$behaviours={};case this.$behaviours[A]:this.$behaviours[A]={}}this.$behaviours[A][C]=a},this.addBehaviours=function(A){for(var C in A)for(var a in A[C])this.add(C,a,A[C][a])},this.remove=function(A){this.$behaviours&&this.$behaviours[A]&&delete this.$behaviours[A]},this.inherit=function(A,C){if(typeof A=="function")var a=new A().getBehaviours(C);else var a=A.getBehaviours(C);this.addBehaviours(a)},this.getBehaviours=function(A){if(A){for(var C={},a=0;a<A.length;a++)this.$behaviours[A[a]]&&(C[A[a]]=this.$behaviours[A[a]]);return C}else return this.$behaviours}}).call(k.prototype),x.Behaviour=k}),ace.define("ace/token_iterator",["require","exports","module","ace/range"],function(E,x,B){var k=E("./range").Range,A=function(){function C(a,h,r){this.$session=a,this.$row=h,this.$rowTokens=a.getTokens(h);var o=a.getTokenAt(h,r);this.$tokenIndex=o?o.index:-1}return C.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]},C.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]},C.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},C.prototype.getCurrentTokenRow=function(){return this.$row},C.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,h=this.$tokenIndex,r=a[h].start;if(r!==void 0)return r;for(r=0;h>0;)h-=1,r+=a[h].value.length;return r},C.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},C.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],h=this.getCurrentTokenColumn();return new k(this.$row,h,this.$row,h+a.value.length)},C}();x.TokenIterator=A}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(E,x,B){var k=E("../../lib/oop"),A=E("../behaviour").Behaviour,C=E("../../token_iterator").TokenIterator,a=E("../../lib/lang"),h=["text","paren.rparen","rparen","paren","punctuation.operator"],r=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],o,n={},i={'"':'"',"'":"'"},e=function(l){var c=-1;if(l.multiSelect&&(c=l.selection.index,n.rangeCount!=l.multiSelect.rangeCount&&(n={rangeCount:l.multiSelect.rangeCount})),n[c])return o=n[c];o=n[c]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},t=function(l,c,y,m){var g=l.end.row-l.start.row;return{text:y+c+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(c,y,m,g,d){var b=m.getCursorPosition(),L=g.doc.getLine(b.row);if(d=="{"){e(m);var $=m.getSelectionRange(),S=g.doc.getTextRange($),_=g.getTokenAt(b.row,b.column);if(S!==""&&S!=="{"&&m.getWrapBehavioursEnabled())return t($,S,"{","}");if(_&&/(?:string)\.quasi|\.xml/.test(_.type)){var w=[/tag\-(?:open|name)/,/attribute\-name/];return w.some(function(R){return R.test(_.type)})||/(string)\.quasi/.test(_.type)&&_.value[b.column-_.start-1]!=="$"?void 0:(s.recordAutoInsert(m,g,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(m,g))return/[\]\}\)]/.test(L[b.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 v=L.substring(b.column,b.column+1);if(v=="}"){var f=g.$findOpeningBracket("}",{column:b.column+1,row:b.row});if(f!==null&&s.isAutoInsertedClosing(b,L,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(d==` 180`||d==`\r 181`){e(m);var u="";
181s.isMaybeInsertedClosing(b,L)&&(u=a.stringRepeat("}",o.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var v=L.substring(b.column,b.column+1);if(v==="}"){var p=g.findMatchingBracket({row:b.row,column:b.column+1},"}");if(!p)return null;var M=this.$getIndent(g.getLine(p.row))}else if(u)var M=this.$getIndent(L);else{s.clearMaybeInsertedClosing();return}var T=M+g.getTabString();return{text:` 182`+T+` 183`+M+u,selection:[1,T.length,1,T.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(c,y,m,g,d){var b=g.doc.getTextRange(d);if(!d.isMultiLine()&&b=="{"){e(m);var L=g.doc.getLine(d.start.row),$=L.substring(d.end.column,d.end.column+1);if($=="}")return d.end.column++,d;o.maybeInsertedBrackets--}}),this.add("parens","insertion",function(c,y,m,g,d){if(d=="("){e(m);var b=m.getSelectionRange(),L=g.doc.getTextRange(b);if(L!==""&&m.getWrapBehavioursEnabled())return t(b,L,"(",")");if(s.isSaneInsertion(m,g))return s.recordAutoInsert(m,g,")"),{text:"()",selection:[1,1]}}else if(d==")"){e(m);var $=m.getCursorPosition(),S=g.doc.getLine($.row),_=S.substring($.column,$.column+1);if(_==")"){var w=g.$findOpeningBracket(")",{column:$.column+1,row:$.row});if(w!==null&&s.isAutoInsertedClosing($,S,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(c,y,m,g,d){var b=g.doc.getTextRange(d);if(!d.isMultiLine()&&b=="("){e(m);var L=g.doc.getLine(d.start.row),$=L.substring(d.start.column+1,d.start.column+2);if($==")")return d.end.column++,d}}),this.add("brackets","insertion",function(c,y,m,g,d){if(d=="["){e(m);var b=m.getSelectionRange(),L=g.doc.getTextRange(b);if(L!==""&&m.getWrapBehavioursEnabled())return t(b,L,"[","]");if(s.isSaneInsertion(m,g))return s.recordAutoInsert(m,g,"]"),{text:"[]",selection:[1,1]}}else if(d=="]"){e(m);var $=m.getCursorPosition(),S=g.doc.getLine($.row),_=S.substring($.column,$.column+1);if(_=="]"){var w=g.$findOpeningBracket("]",{column:$.column+1,row:$.row});if(w!==null&&s.isAutoInsertedClosing($,S,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(c,y,m,g,d){var b=g.doc.getTextRange(d);if(!d.isMultiLine()&&b=="["){e(m);var L=g.doc.getLine(d.start.row),$=L.substring(d.start.column+1,d.start.column+2);if($=="]")return d.end.column++,d}}),this.add("string_dquotes","insertion",function(c,y,m,g,d){var b=g.$mode.$quotes||i;if(d.length==1&&b[d]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(d)!=-1)return;e(m);var L=d,$=m.getSelectionRange(),S=g.doc.getTextRange($);if(S!==""&&(S.length!=1||!b[S])&&m.getWrapBehavioursEnabled())return t($,S,L,L);if(!S){var _=m.getCursorPosition(),w=g.doc.getLine(_.row),v=w.substring(_.column-1,_.column),f=w.substring(_.column,_.column+1),u=g.getTokenAt(_.row,_.column),p=g.getTokenAt(_.row,_.column+1);if(v=="\\"&&u&&/escape/.test(u.type))return null;var M=u&&/string|escape/.test(u.type),T=!p||/string|escape/.test(p.type),R;if(f==L)R=M!==T,R&&/string\.end/.test(p.type)&&(R=!1);else{if(M&&!T||M&&T)return null;var I=g.$mode.tokenRe;I.lastIndex=0;var D=I.test(v);I.lastIndex=0;var H=I.test(f),O=g.$mode.$pairQuotesAfter,N=O&&O[L]&&O[L].test(v);if(!N&&D||H||f&&!/[\s;,.})\]\\]/.test(f))return null;var F=w[_.column-2];if(v==L&&(F==L||I.test(F)))return null;R=!0}return{text:R?L+L:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(c,y,m,g,d){var b=g.$mode.$quotes||i,L=g.doc.getTextRange(d);if(!d.isMultiLine()&&b.hasOwnProperty(L)){e(m);var $=g.doc.getLine(d.start.row),S=$.substring(d.start.column+1,d.start.column+2);if(S==L)return d.end.column++,d}}),l.closeDocComment!==!1&&this.add("doc comment end","insertion",function(c,y,m,g,d){if(c==="doc-start"&&(d===` 184`||d===`\r 185`)&&m.selection.isEmpty()){var b=m.getCursorPosition();if(b.column===0)return;for(var L=g.doc.getLine(b.row),$=g.doc.getLine(b.row+1),S=g.getTokens(b.row),_=0,w=0;w<S.length;w++){_+=S[w].value.length;var v=S[w];if(_>=b.column){if(_===b.column){if(!/\.doc/.test(v.type))return;if(/\*\//.test(v.value)){var f=S[w+1];if(!f||!/\.doc/.test(f.type))return}}var u=b.column-(_-v.value.length),p=v.value.indexOf("*/"),M=v.value.indexOf("/**",p>-1?p+2:0);if(M!==-1&&u>M&&u<M+3||p!==-1&&M!==-1&&u>=p&&u<=M||!/\.doc/.test(v.type))return;break}}var T=this.$getIndent(L);if(/\s*\*/.test($))return/^\s*\*/.test(L)?{text:d+T+"* ",selection:[1,2+T.length,1,2+T.length]}:{text:d+T+" * ",selection:[1,3+T.length,1,3+T.length]};if(/\/\*\*/.test(L.substring(0,b.column)))return{text:d+T+" * "+d+" "+T+"*/",selection:[1,4+T.length,1,4+T.length]}}})},s.isSaneInsertion=function(l,c){var y=l.getCursorPosition(),m=new C(c,y.row,y.column);if(!this.$matchTokenType(m.getCurrentToken()||"text",h)){if(/[)}\]]/.test(l.session.getLine(y.row)[y.column]))return!0;var g=new C(c,y.row,y.column+1);if(!this.$matchTokenType(g.getCurrentToken()||"text",h))return!1}return m.stepForward(),m.getCurrentTokenRow()!==y.row||this.$matchTokenType(m.getCurrentToken()||"text",r)},s.$matchTokenType=function(l,c){return c.indexOf(l.type||l)>-1},s.recordAutoInsert=function(l,c,y){var m=l.getCursorPosition(),g=c.doc.getLine(m.row);
185this.isAutoInsertedClosing(m,g,o.autoInsertedLineEnd[0])||(o.autoInsertedBrackets=0),o.autoInsertedRow=m.row,o.autoInsertedLineEnd=y+g.substr(m.column),o.autoInsertedBrackets++},s.recordMaybeInsert=function(l,c,y){var m=l.getCursorPosition(),g=c.doc.getLine(m.row);this.isMaybeInsertedClosing(m,g)||(o.maybeInsertedBrackets=0),o.maybeInsertedRow=m.row,o.maybeInsertedLineStart=g.substr(0,m.column)+y,o.maybeInsertedLineEnd=g.substr(m.column),o.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(l,c,y){return o.autoInsertedBrackets>0&&l.row===o.autoInsertedRow&&y===o.autoInsertedLineEnd[0]&&c.substr(l.column)===o.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(l,c){return o.maybeInsertedBrackets>0&&l.row===o.maybeInsertedRow&&c.substr(l.column)===o.maybeInsertedLineEnd&&c.substr(0,l.column)==o.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){o.autoInsertedLineEnd=o.autoInsertedLineEnd.substr(1),o.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){o&&(o.maybeInsertedBrackets=0,o.maybeInsertedRow=-1)},k.inherits(s,A),x.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(E,x,B){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],A=0,C=[],a=0;a<k.length;a+=2)C.push(A+=k[a]),k[a+1]&&C.push(45,A+=k[a+1]);x.wordChars=String.fromCharCode.apply(null,C)}),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,B){var k=E("../config"),A=E("../tokenizer").Tokenizer,C=E("./text_highlight_rules").TextHighlightRules,a=E("./behaviour/cstyle").CstyleBehaviour,h=E("../unicode"),r=E("../lib/lang"),o=E("../token_iterator").TokenIterator,n=E("../range").Range,i;i=function(){this.HighlightRules=C},(function(){this.$defaultBehaviour=new a,this.tokenRe=new RegExp("^["+h.wordChars+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+h.wordChars+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules(this.$highlightRuleConfig),this.$tokenizer=new A(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(e,t,s,l){var c=t.doc,y=!0,m=!0,g=1/0,d=t.getTabSize(),b=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var S=this.lineCommentStart.map(r.escapeRegExp).join("|"),L=this.lineCommentStart[0];else var S=r.escapeRegExp(this.lineCommentStart),L=this.lineCommentStart;S=new RegExp("^(\\s*)(?:"+S+") ?"),b=t.getUseSoftTabs();var v=function(H,O){var N=H.match(S);if(N){var F=N[1].length,W=N[0].length;!p(H,F,W)&&N[0][W-1]==" "&&W--,c.removeInLine(O,F,W)}},u=L+" ",w=function(H,O){(!y||/\S/.test(H))&&(p(H,g,g)?c.insertInLine({row:O,column:g},u):c.insertInLine({row:O,column:g},L))},f=function(H,O){return S.test(H)},p=function(H,O,N){for(var F=0;
185O--&&H.charAt(O)==" ";)F++;if(F%d!=0)return!1;for(var F=0;H.charAt(N++)==" ";)F++;return d>2?F%d!=d-1:F%d==0}}else{if(!this.blockComment)return!1;var L=this.blockComment.start,$=this.blockComment.end,S=new RegExp("^(\\s*)(?:"+r.escapeRegExp(L)+")"),_=new RegExp("(?:"+r.escapeRegExp($)+")\\s*$"),w=function(R,I){f(R,I)||(!y||/\S/.test(R))&&(c.insertInLine({row:I,column:R.length},$),c.insertInLine({row:I,column:g},L))},v=function(R,I){var D;(D=R.match(_))&&c.removeInLine(I,R.length-D[0].length,R.length),(D=R.match(S))&&c.removeInLine(I,D[1].length,D[0].length)},f=function(R,I){if(S.test(R))return!0;for(var D=t.getTokens(I),H=0;H<D.length;H++)if(D[H].type==="comment")return!0}}function M(R){for(var I=s;I<=l;I++)R(c.getLine(I),I)}var T=1/0;M(function(R,I){var D=R.search(/\S/);D!==-1?(D<g&&(g=D),m&&!f(R,I)&&(m=!1)):T>R.length&&(T=R.length)}),g==1/0&&(g=T,y=!1,m=!1),b&&g%d!=0&&(g=Math.floor(g/d)*d),M(m?v:w)},this.toggleBlockComment=function(e,t,s,l){var c=this.blockComment;if(c){!c.start&&c[0]&&(c=c[0]);var y=new o(t,l.row,l.column),m=y.getCurrentToken();t.selection;var g=t.selection.toOrientedRange(),d,b;if(m&&/comment/.test(m.type)){for(var L,$;m&&/comment/.test(m.type);){var S=m.value.indexOf(c.start);if(S!=-1){var _=y.getCurrentTokenRow(),w=y.getCurrentTokenColumn()+S;L=new n(_,w,_,w+c.start.length);break}m=y.stepBackward()}for(var y=new o(t,l.row,l.column),m=y.getCurrentToken();m&&/comment/.test(m.type);){var S=m.value.indexOf(c.end);if(S!=-1){var _=y.getCurrentTokenRow(),w=y.getCurrentTokenColumn()+S;$=new n(_,w,_,w+c.end.length);break}m=y.stepForward()}$&&t.remove($),L&&(t.remove(L),d=L.start.row,b=-c.start.length)}else b=c.start.length,d=s.start.row,t.insert(s.end,c.end),t.insert(s.start,c.start);g.start.row==d&&(g.start.column+=b),g.end.row==d&&(g.end.column+=b),t.selection.fromOrientedRange(g)}},this.getNextLineIndent=function(e,t,s){return this.$getIndent(t)},this.checkOutdent=function(e,t,s){return!1},this.autoOutdent=function(e,t,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 t in e)if(e[t]){var s=e[t],l=s.prototype.$id,c=k.$modes[l];c||(k.$modes[l]=c=new s),k.$modes[t]||(k.$modes[t]=c),this.$embeds.push(t),this.$modes[t]=c}for(var y=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=function(d){(function(b){var L=y[d],$=b[L];b[y[d]]=function(){return this.$delegator(L,arguments,$)}})(g)},g=this,t=0;t<y.length;t++)m(t)},this.$delegator=function(e,t,s){var l=t[0]||"start";if(typeof l!="string"){if(Array.isArray(l[2])){var c=l[2][l[2].length-1],y=this.$modes[c];if(y)return y[e].apply(y,[l[1]].concat([].slice.call(t,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]){t[0]=g[1];var y=this.$modes[this.$embeds[m]];return y[e].apply(y,t)}}var d=s.apply(this,t);return s?d:void 0},this.transformAction=function(e,t,s,l,c){if(this.$behaviour){var y=this.$behaviour.getBehaviours();for(var m in y)if(y[m][t]){var g=y[m][t].apply(this,arguments);if(g)return g}}},this.getKeywords=function(e){if(!this.completionKeywords){var t=this.$tokenizer.rules,s=[];for(var l in t)for(var c=t[l],y=0,m=c.length;y<m;y++)if(typeof c[y].token=="string")/keyword|support|storage/.test(c[y].token)&&s.push(c[y].regex);else if(typeof c[y].token=="object"){for(var g=0,d=c[y].token.length;g<d;g++)if(/keyword|support|storage/.test(c[y].token[g])){var l=c[y].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,t,s,l){var c=this.$keywordList||this.$createKeywordList();return c.map(function(y){return{name:y,value:y,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(i.prototype),x.Mode=i}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(E,x,B){var k=E("./lib/dom"),A=function(){function C(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 C.prototype.getRowLength=function(a){var h;return this.lineWidgets?h=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:h=0,!this.$useWrapMode||!this.$wrapData[a]?1+h:this.$wrapData[a].length+1+h}
185,C.prototype.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(h){h&&h.rowCount&&!h.hidden&&(a+=h.rowCount)}),a},C.prototype.$onChangeEditor=function(a){this.attach(a.editor)},C.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)))},C.prototype.detach=function(a){var h=this.editor;if(h){this.editor=null,h.widgetManager=null,h.renderer.off("beforeRender",this.measureWidgets),h.renderer.off("afterRender",this.renderWidgets);var r=this.session.lineWidgets;r&&r.forEach(function(o){o&&o.el&&o.el.parentNode&&(o._inDocument=!1,o.el.parentNode.removeChild(o.el))})}},C.prototype.updateOnFold=function(a,h){var r=h.lineWidgets;if(!(!r||!a.action)){for(var o=a.data,n=o.start.row,i=o.end.row,e=a.action=="add",t=n+1;t<i;t++)r[t]&&(r[t].hidden=e);r[i]&&(e?r[n]?r[i].hidden=e:r[n]=r[i]:(r[n]==r[i]&&(r[n]=void 0),r[i].hidden=e))}},C.prototype.updateOnChange=function(a){var h=this.session.lineWidgets;if(h){var r=a.start.row,o=a.end.row-r;if(o!==0)if(a.action=="remove"){var n=h.splice(r+1,o);!h[r]&&n[n.length-1]&&(h[r]=n.pop()),n.forEach(function(e){e&&this.removeLineWidget(e)},this),this.$updateRows()}else{var i=new Array(o);h[r]&&h[r].column!=null&&a.start.column>h[r].column&&r++,i.unshift(r,0),h.splice.apply(h,i),this.$updateRows()}}},C.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var h=!0;a.forEach(function(r,o){if(r)for(h=!1,r.row=o;r.$oldWidget;)r.$oldWidget.row=o,r=r.$oldWidget}),h&&(this.session.lineWidgets=null)}},C.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var h=this.session.lineWidgets[a.row];return h&&(a.$oldWidget=h,h.el&&h.el.parentNode&&(h.el.parentNode.removeChild(h.el),h._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},C.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var h=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",h.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/h.layerConfig.lineHeight);var r=this.session.getFoldAt(a.row,0);if(a.$fold=r,r){var o=this.session.lineWidgets;a.row==r.end.row&&!o[r.start.row]?o[r.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,h),this.onWidgetChanged(a),a},C.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{}if(this.session.lineWidgets){var h=this.session.lineWidgets[a.row];if(h==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;h;){if(h.$oldWidget==a){h.$oldWidget=a.$oldWidget;break}h=h.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},C.prototype.getWidgetsAtRow=function(a){for(var h=this.session.lineWidgets,r=h&&h[a],o=[];r;)o.push(r),r=r.$oldWidget;return o},C.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},C.prototype.measureWidgets=function(a,h){var r=this.session._changedWidgets,o=h.layerConfig;if(!(!r||!r.length)){for(var n=1/0,i=0;i<r.length;i++){var e=r[i];if(!(!e||!e.el)&&e.session==this.session){if(!e._inDocument){if(this.session.lineWidgets[e.row]!=e)continue;e._inDocument=!0,h.container.appendChild(e.el)}e.h=e.el.offsetHeight,e.fixedWidth||(e.w=e.el.offsetWidth,e.screenWidth=Math.ceil(e.w/o.characterWidth));var t=e.h/o.lineHeight;e.coverLine&&(t-=this.session.getRowLineCount(e.row),t<0&&(t=0)),e.rowCount!=t&&(e.rowCount=t,e.row<n&&(n=e.row))}}n!=1/0&&(this.session._emit("changeFold",{data:{start:{row:n}}}),this.session.lineWidgetWidth=null),this.session._changedWidgets=[]}},C.prototype.renderWidgets=function(a,h){var r=h.layerConfig,o=this.session.lineWidgets;if(o){for(var n=Math.min(this.firstRow,r.firstRow),i=Math.max(this.lastRow,r.lastRow,o.length);n>0&&!o[n];)n--;
185this.firstRow=r.firstRow,this.lastRow=r.lastRow,h.$cursorLayer.config=r;for(var e=n;e<=i;e++){var t=o[e];if(!(!t||!t.el)){if(t.hidden){t.el.style.top=-100-(t.pixelHeight||0)+"px";continue}t._inDocument||(t._inDocument=!0,h.container.appendChild(t.el));var s=h.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;t.coverLine||(s+=r.lineHeight*this.session.getRowLineCount(t.row)),t.el.style.top=s-r.offset+"px";var l=t.coverGutter?0:h.gutterWidth;t.fixedWidth||(l-=h.scrollLeft),t.el.style.left=l+"px",t.fullWidth&&t.screenWidth&&(t.el.style.minWidth=r.width+2*r.padding+"px"),t.fixedWidth?t.el.style.right=h.scrollBar.getWidth()+"px":t.el.style.right=""}}}},C}();x.LineWidgets=A}),ace.define("ace/apply_delta",["require","exports","module"],function(E,x,B){x.applyDelta=function(k,A,C){var a=A.start.row,h=A.start.column,r=k[a]||"";switch(A.action){case"insert":var o=A.lines;if(o.length===1)k[a]=r.substring(0,h)+A.lines[0]+r.substring(h);else{var n=[a,1].concat(A.lines);k.splice.apply(k,n),k[a]=r.substring(0,h)+k[a],k[a+A.lines.length-1]+=r.substring(h)}break;case"remove":var i=A.end.column,e=A.end.row;a===e?k[a]=r.substring(0,h)+r.substring(i):k.splice(a,e-a+1,r.substring(0,h)+k[e].substring(i));break}}}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,B){var k=E("./lib/oop"),A=E("./lib/event_emitter").EventEmitter,C=function(){function r(o,n,i){this.$onChange=this.onChange.bind(this),this.attach(o),typeof n!="number"?this.setPosition(n.row,n.column):this.setPosition(n,i)}return r.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},r.prototype.getDocument=function(){return this.document},r.prototype.onChange=function(o){if(!(o.start.row==o.end.row&&o.start.row!=this.row)&&!(o.start.row>this.row)){var n=h(o,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},r.prototype.setPosition=function(o,n,i){var e;if(i?e={row:o,column:n}:e=this.$clipPositionToDocument(o,n),!(this.row==e.row&&this.column==e.column)){var t={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:t,value:e})}},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(o){this.document=o||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(o,n){var i={};return o>=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):o<0?(i.row=0,i.column=0):(i.row=o,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,n))),n<0&&(i.column=0),i},r}();C.prototype.$insertRight=!1,k.implement(C.prototype,A);function a(r,o,n){var i=n?r.column<=o.column:r.column<o.column;return r.row<o.row||r.row==o.row&&i}function h(r,o,n){var i=r.action=="insert",e=(i?1:-1)*(r.end.row-r.start.row),t=(i?1:-1)*(r.end.column-r.start.column),s=r.start,l=i?s:r.end;return a(o,s,n)?{row:o.row,column:o.column}:a(l,o,!n)?{row:o.row+e,column:o.column+(o.row==l.row?t:0)}:{row:s.row,column:s.column}}x.Anchor=C}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(E,x,B){var k=E("./lib/oop"),A=E("./apply_delta").applyDelta,C=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,h=E("./anchor").Anchor,r=function(){function o(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 o.prototype.setValue=function(n){var i=this.getLength()-1;this.remove(new a(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},n||"")},o.prototype.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},o.prototype.createAnchor=function(n,i){return new h(this,n,i)},o.prototype.$detectNewLine=function(n){var i=n.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:` 186`,this._signal("changeNewLineMode")},o.prototype.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r 187`;case"unix":return` 188`;default:return this.$autoNewLine||` 189`}},o.prototype.setNewLineMode=function(n){this.$newLineMode!==n&&(this.$newLineMode=n,this._signal("changeNewLineMode"))},o.prototype.getNewLineMode=function(){return this.$newLineMode},o.prototype.isNewLine=function(n){return n==`\r 190`||n=="\r"||n==` 191`},o.prototype.getLine=function(n){return this.$lines[n]||""},o.prototype.getLines=function(n,i){return this.$lines.slice(n,i+1)},o.prototype.getAllLines=function(){return this.getLines(0,this.getLength())},o.prototype.getLength=function(){return this.$lines.length},o.prototype.getTextRange=function(n){return this.getLinesForRange(n).join(this.getNewLineCharacter())},o.prototype.getLinesForRange=function(n){var i;if(n.start.row===n.end.row)i=[this.getLine(n.start.row).substring(n.start.column,n.end.column)];else{i=this.getLines(n.start.row,n.end.row),i[0]=(i[0]||"").substring(n.start.column);var e=i.length-1;n.end.row-n.start.row==e&&(i[e]=i[e].substring(0,n.end.column))}return i},o.prototype.insertLines=function(n,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(n,i)},o.prototype.removeLines=function(n,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(n,i)},o.prototype.insertNewLine=function(n){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(n,["",""])},o.prototype.insert=function(n,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(n,this.$split(i))},o.prototype.insertInLine=function(n,i){var e=this.clippedPos(n.row,n.column),t=this.pos(n.row,n.column+i.length);return this.applyDelta({start:e,end:t,action:"insert",lines:[i]},!0),this.clonePos(t)},o.prototype.clippedPos=function(n,i){var e=this.getLength();n===void 0?n=e:n<0?n=0:n>=e&&(n=e-1,i=void 0);var t=this.getLine(n);return i==null&&(i=t.length),i=Math.min(Math.max(i,0),t.length),{row:n,column:i}},o.prototype.clonePos=function(n){return{row:n.row,column:n.column}},o.prototype.pos=function(n,i){return{row:n,column:i}},o.prototype.$clipPosition=function(n){var i=this.getLength();return n.row>=i?(n.row=Math.max(0,i-1),n.column=this.getLine(i-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},o.prototype.insertFullLines=function(n,i){n=Math.min(Math.max(n,0),this.getLength());var e=0;n<this.getLength()?(i=i.concat([""]),e=0):(i=[""].concat(i),n--,e=this.$lines[n].length),this.insertMergedLines({row:n,column:e},i)},o.prototype.insertMergedLines=function(n,i){var e=this.clippedPos(n.row,n.column),t={row:e.row+i.length-1,column:(i.length==1?e.column:0)+i[i.length-1].length};return this.applyDelta({start:e,end:t,action:"insert",lines:i}),this.clonePos(t)},o.prototype.remove=function(n){var i=this.clippedPos(n.start.row,n.start.column),e=this.clippedPos(n.end.row,n.end.column);return this.applyDelta({start:i,end:e,action:"remove",lines:this.getLinesForRange({start:i,end:e})}),this.clonePos(i)},o.prototype.removeInLine=function(n,i,e){var t=this.clippedPos(n,i),s=this.clippedPos(n,e);return this.applyDelta({start:t,end:s,action:"remove",lines:this.getLinesForRange({start:t,end:s})},!0),this.clonePos(t)},o.prototype.removeFullLines=function(n,i){n=Math.min(Math.max(0,n),this.getLength()-1),i=Math.min(Math.max(0,i),this.getLength()-1);var e=i==this.getLength()-1&&n>0,t=i<this.getLength()-1,s=e?n-1:n,l=e?this.getLine(s).length:0,c=t?i+1:i,y=t?0:this.getLine(c).length,m=new a(s,l,c,y),g=this.$lines.slice(n,i+1);return this.applyDelta({start:m.start,end:m.end,action:"remove",lines:this.getLinesForRange(m)}),g},o.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:["",""]})}
191,o.prototype.replace=function(n,i){if(n instanceof a||(n=a.fromPoints(n.start,n.end)),i.length===0&&n.isEmpty())return n.start;if(i==this.getTextRange(n))return n.end;this.remove(n);var e;return i?e=this.insert(n.start,i):e=n.start,e},o.prototype.applyDeltas=function(n){for(var i=0;i<n.length;i++)this.applyDelta(n[i])},o.prototype.revertDeltas=function(n){for(var i=n.length-1;i>=0;i--)this.revertDelta(n[i])},o.prototype.applyDelta=function(n,i){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):(A(this.$lines,n,i),this._signal("change",n)))},o.prototype.$safeApplyDelta=function(n){var i=this.$lines.length;(n.action=="remove"&&n.start.row<i&&n.end.row<i||n.action=="insert"&&n.start.row<=i)&&this.applyDelta(n)},o.prototype.$splitAndapplyLargeDelta=function(n,i){for(var e=n.lines,t=e.length-i+1,s=n.start.row,l=n.start.column,c=0,y=0;c<t;c=y){y+=i-1;var m=e.slice(c,y);m.push(""),this.applyDelta({start:this.pos(s+c,l),end:this.pos(s+y,l=0),action:n.action,lines:m},!0)}n.lines=e.slice(c),n.start.row=s+c,n.start.column=l,this.applyDelta(n,!0)},o.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()})},o.prototype.indexToPosition=function(n,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,s=i||0,l=e.length;s<l;s++)if(n-=e[s].length+t,n<0)return{row:s,column:n+e[s].length+t};return{row:l-1,column:n+e[l-1].length+t}},o.prototype.positionToIndex=function(n,i){for(var e=this.$lines||this.getAllLines(),t=this.getNewLineCharacter().length,s=0,l=Math.min(n.row,e.length),c=i||0;c<l;++c)s+=e[c].length+t;return s+n.column},o.prototype.$split=function(n){return n.split(/\r\n|\r|\n/)},o}();r.prototype.$autoNewLine="",r.prototype.$newLineMode="auto",k.implement(r.prototype,C),x.Document=r}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(E,x,B){var k=E("./lib/oop"),A=E("./lib/event_emitter").EventEmitter,C=function(){function a(h,r){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=h;var o=this;this.$worker=function(){if(o.running){for(var n=new Date,i=o.currentLine,e=-1,t=o.doc,s=i;o.lines[i];)i++;var l=t.getLength(),c=0;for(o.running=!1;i<l;){o.$tokenizeRow(i),e=i;do i++;while(o.lines[i]);if(c++,c%5===0&&new Date-n>20){o.running=setTimeout(o.$worker,20);break}}o.currentLine=i,e==-1&&(e=i),s<=e&&o.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(h){this.tokenizer=h,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(h){this.doc=h,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(h,r){var o={first:h,last:r};this._signal("update",{data:o})},a.prototype.start=function(h){this.currentLine=Math.min(h||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(h){var r=h.start.row,o=h.end.row-r;if(o===0)this.lines[r]=null;else if(h.action=="remove")this.lines.splice(r,o+1,null),this.states.splice(r,o+1,null);else{var n=Array(o+1);n.unshift(r,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(r,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(h){return this.lines[h]||this.$tokenizeRow(h)},a.prototype.getState=function(h){return this.currentLine==h&&this.$tokenizeRow(h),this.states[h]||"start"},a.prototype.$tokenizeRow=function(h){var r=this.doc.getLine(h),o=this.states[h-1],n=this.tokenizer.getLineTokens(r,o,h);return this.states[h]+""!=n.state+""?(this.states[h]=n.state,this.lines[h+1]=null,this.currentLine>h+1&&(this.currentLine=h+1)):this.currentLine==h&&(this.currentLine=h+1),this.lines[h]=n.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a}();
191k.implement(C.prototype,A),x.BackgroundTokenizer=C}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(E,x,B){var k=E("./lib/lang"),A=E("./range").Range,C=function(){function a(h,r,o){o===void 0&&(o="text"),this.setRegexp(h),this.clazz=r,this.type=o,this.docLen=0}return a.prototype.setRegexp=function(h){this.regExp+""!=h+""&&(this.regExp=h,this.cache=[])},a.prototype.update=function(h,r,o,n){if(this.regExp){for(var i=n.firstRow,e=n.lastRow,t={},s=o.$editor&&o.$editor.$search,l=s&&s.$isMultilineSearch(o.$editor.getLastSearchOptions()),c=i;c<=e;c++){var y=this.cache[c];if(y==null||o.getValue().length!=this.docLen){if(l){y=[];var m=s.$multiLineForward(o,this.regExp,c,e);if(m){var g=m.endRow<=e?m.endRow-1:e;g>c&&(c=g),y.push(new A(m.startRow,m.startCol,m.endRow,m.endCol))}y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES))}else y=k.getMatchOffsets(o.getLine(c),this.regExp),y.length>this.MAX_RANGES&&(y=y.slice(0,this.MAX_RANGES)),y=y.map(function($){return new A(c,$.offset,c,$.offset+$.length)});this.cache[c]=y.length?y:""}if(y.length!==0)for(var d=y.length;d--;){var b=y[d].toScreenRange(o),L=b.toString();t[L]||(t[L]=!0,r.drawSingleLineMarker(h,b,this.clazz,n))}}this.docLen=o.getValue().length}},a}();C.prototype.MAX_RANGES=500,x.SearchHighlight=C}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(E,x,B){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,b,L){if(!this.$fromUndo&&d!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),b===!1||!this.lastDeltas){this.lastDeltas=[];var $=this.$undoStack.length;$>this.$undoDepth-1&&this.$undoStack.splice(0,$-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,b){this.selections.push({value:d,rev:b||this.$rev})},g.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},g.prototype.markIgnored=function(d,b){b==null&&(b=this.$rev+1);for(var L=this.$undoStack,$=L.length;$--;){var S=L[$][0];if(S.id<=d)break;S.id<b&&(S.ignore=!0)}this.lastDeltas=null},g.prototype.getSelection=function(d,b){for(var L=this.selections,$=L.length;$--;){var S=L[$];if(S.rev<d)return b&&(S=L[$+1]),S}},g.prototype.getRevision=function(){return this.$rev},g.prototype.getDeltas=function(d,b){b==null&&(b=this.$rev+1);for(var L=this.$undoStack,$=null,S=0,_=L.length;_--;){var w=L[_][0];if(w.id<b&&!$&&($=_+1),w.id<=d){S=_+1;break}}return L.slice(S,$)},g.prototype.getChangedRanges=function(d,b){b==null&&(b=this.$rev+1)},g.prototype.getChangedLines=function(d,b){b==null&&(b=this.$rev+1)},g.prototype.undo=function(d,b){this.lastDeltas=null;var L=this.$undoStack;if(A(L,L.length)){d||(d=this.$session),this.$redoStackBaseRev!==this.$rev&&this.$redoStack.length&&(this.$redoStack=[]),this.$fromUndo=!0;var $=L.pop(),S=null;return $&&(S=d.undoChanges($,b),this.$redoStack.push($),this.$syncRev()),this.$fromUndo=!1,S}},g.prototype.redo=function(d,b){if(this.lastDeltas=null,d||(d=this.$session),this.$fromUndo=!0,this.$redoStackBaseRev!=this.$rev){var L=this.getDeltas(this.$redoStackBaseRev,this.$rev+1);m(this.$redoStack,L),this.$redoStackBaseRev=this.$rev,this.$redoStack.forEach(function(_){_[0].id=++this.$maxRev},this)}var $=this.$redoStack.pop(),S=null;return $&&(S=d.redoChanges($,b),this.$undoStack.push($),this.$syncRev()),this.$fromUndo=!1,S},g.prototype.$syncRev=function(){var d=this.$undoStack,b=d[d.length-1],L=b&&b[0].id||0;this.$redoStackBaseRev=L,this.$rev=L},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?o(d):o(this.$undoStack)+` 192--- 193`+o(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 A(g,d){for(var b=d;b--;){var L=g[b];if(L&&!L[0].ignore){for(;b<d-1;){var $=e(g[b],g[b+1]);g[b]=$[0],g[b+1]=$[1],b++}return!0}}}var C=E("./range").Range,a=C.comparePoints;C.comparePoints;function h(g){return{row:g.row,column:g.column}}function r(g){return{start:h(g.start),end:h(g.end),action:g.action,lines:g.lines.slice()}}function o(g){if(g=g||this,Array.isArray(g))return g.map(o).join(` 194`);var d="";return g.action?(d=g.action=="insert"?"+":"-",d+="["+g.lines+"]"):g.value&&(Array.isArray(g.value)?d=g.value.map(n).join(` 195`):d=n(g.value)),g.start&&(d+=n(g)),(g.id||g.rev)&&(d+=" ("+(g.id||g.rev)+")"),d}
195function n(g){return g.start.row+":"+g.start.column+"=>"+g.end.row+":"+g.end.column}function i(g,d){var b=g.action=="insert",L=d.action=="insert";if(b&&L)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(b&&!L)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(!b&&L)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(!b&&!L)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 b=g.length;b--;)for(var L=0;L<d.length;L++)if(!i(g[b],d[L])){for(;b<g.length;){for(;L--;)i(d[L],g[b]);L=d.length,b++}return[g,d]}return g.selectionBefore=d.selectionBefore=g.selectionAfter=d.selectionAfter=null,[d,g]}function t(g,d){var b=g.action=="insert",L=d.action=="insert";if(b&&L)a(g.start,d.start)<0?s(d,g,1):s(g,d,1);else if(b&&!L)a(g.start,d.end)>=0?s(g,d,-1):(a(g.start,d.start)<=0||s(g,C.fromPoints(d.start,g.start),-1),s(d,g,1));else if(!b&&L)a(d.start,g.end)>=0?s(d,g,-1):(a(d.start,g.start)<=0||s(d,C.fromPoints(g.start,d.start),-1),s(g,d,1));else if(!b&&!L)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 $,S;return a(g.start,d.start)<0&&($=g,g=c(g,d.start)),a(g.end,d.end)>0&&(S=c(g,d.end)),l(d.end,g.start,g.end,-1),S&&!$&&(g.lines=S.lines,g.start=S.start,g.end=S.end,S=g),[d,$,S].filter(Boolean)}return[d,g]}function s(g,d,b){l(g.start,d.start,d.end,b),l(g.end,d.start,d.end,b)}function l(g,d,b,L){g.row==(L==1?d:b).row&&(g.column+=L*(b.column-d.column)),g.row+=L*(b.row-d.row)}function c(g,d){var b=g.lines,L=g.end;g.end=h(d);var $=g.end.row-g.start.row,S=b.splice($,b.length),_=$?d.column:d.column-g.start.column;b.push(S[0].substring(0,_)),S[0]=S[0].substr(_);var w={start:h(d),end:L,lines:S,action:g.action};return w}function y(g,d){d=r(d);for(var b=g.length;b--;){for(var L=g[b],$=0;$<L.length;$++){var S=L[$],_=t(S,d);d=_[0],_.length!=2&&(_[2]?(L.splice($+1,1,_[1],_[2]),$++):_[1]||(L.splice($,1),$--))}L.length||g.splice(b,1)}return g}function m(g,d){for(var b=0;b<d.length;b++)for(var L=d[b],$=0;$<L.length;$++)y(g,L[$])}x.UndoManager=k}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(E,x,B){var k=E("../range").Range,A=function(){function C(a,h){this.foldData=a,Array.isArray(h)?this.folds=h:h=this.folds=[h];var r=h[h.length-1];this.range=new k(h[0].start.row,h[0].start.column,r.end.row,r.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(o){o.setFoldLine(this)},this)}return C.prototype.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(h){h.start.row+=a,h.end.row+=a})},C.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(h,r){return-h.range.compareEnd(r.start.row,r.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},C.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},C.prototype.walk=function(a,h,r){var o=0,n=this.folds,i,e,t,s=!0;h==null&&(h=this.end.row,r=this.end.column);for(var l=0;l<n.length;l++){if(i=n[l],e=i.range.compareStart(h,r),e==-1){a(null,h,r,o,s);return}if(t=a(null,i.start.row,i.start.column,o,s),t=!t&&a(i.placeholder,i.start.row,i.start.column,o),t||e===0)return;s=!i.sameRow,o=i.end.column}a(null,h,r,o,s)},C.prototype.getNextFoldTo=function(a,h){for(var r,o,n=0;n<this.folds.length;n++){if(r=this.folds[n],o=r.range.compareEnd(a,h),o==-1)return{fold:r,kind:"after"};if(o===0)return{fold:r,kind:"inside"}}return null},C.prototype.addRemoveChars=function(a,h,r){var o=this.getNextFoldTo(a,h),n,i;if(o){if(n=o.fold,o.kind=="inside"&&n.start.column!=h&&n.start.row!=a)window.console&&window.console.log(a,h,n);else if(n.start.row==a){i=this.folds;var e=i.indexOf(n);for(e===0&&(this.start.column+=r),e;e<i.length;e++){if(n=i[e],n.start.column+=r,!n.sameRow)return;n.end.column+=r}this.end.column+=r}}},C.prototype.split=function(a,h){var r=this.getNextFoldTo(a,h);if(!r||r.kind=="inside")return null;var o=r.fold,n=this.folds,i=this.foldData,e=n.indexOf(o),t=n[e-1];this.end.row=t.end.row,this.end.column=t.end.column,n=n.splice(e,n.length-e);var s=new C(i,n);return i.splice(i.indexOf(this)+1,0,s),s},C.prototype.merge=function(a){for(var h=a.folds,r=0;r<h.length;r++)this.addFold(h[r]);var o=this.foldData;o.splice(o.indexOf(a),1)},C.prototype.toString=function(){var a=[this.range.toString()+": ["];return this.folds.forEach(function(h){a.push(" "+h.toString())}),a.push("]"),a.join(` 196`)},C.prototype.idxToPosition=function(a){for(var h=0,r=0;r<this.folds.length;r++){var o=this.folds[r];if(a-=o.start.column-h,a<0)return{row:o.start.row,column:o.start.column+a};if(a-=o.placeholder.length,a<0)return o.start;h=o.end.column}return{row:this.end.row,column:this.end.column+a}},C}();x.FoldLine=A}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(E,x,B){var k=E("./range").Range,A=k.comparePoints,C=function(){function a(){this.ranges=[],this.$bias=1}return a.prototype.pointIndex=function(h,r,o){for(var n=this.ranges,i=o||0;i<n.length;i++){var e=n[i],t=A(h,e.end);if(!(t>0)){var s=A(h,e.start);return t===0?r&&s!==0?-i-2:i:s>0||s===0&&!r?i:-i-1}}return-i-1},a.prototype.add=function(h){var r=!h.isEmpty(),o=this.pointIndex(h.start,r);o<0&&(o=-o-1);var n=this.pointIndex(h.end,r,o);return n<0?n=-n-1:n++,this.ranges.splice(o,n-o,h)},a.prototype.addList=function(h){for(var r=[],o=h.length;o--;)r.push.apply(r,this.add(h[o]));return r},a.prototype.substractPoint=function(h){var r=this.pointIndex(h);if(r>=0)return this.ranges.splice(r,1)},a.prototype.merge=function(){var h=[],r=this.ranges;r=r.sort(function(t,s){return A(t.start,s.start)});for(var o=r[0],n,i=1;i<r.length;i++){n=o,o=r[i];var e=A(n.end,o.start);e<0||e==0&&!n.isEmpty()&&!o.isEmpty()||(A(n.end,o.end)<0&&(n.end.row=o.end.row,n.end.column=o.end.column),r.splice(i,1),h.push(o),o=n,i--)}return this.ranges=r,h},a.prototype.contains=function(h,r){return this.pointIndex({row:h,column:r})>=0},a.prototype.containsPoint=function(h){return this.pointIndex(h)>=0},a.prototype.rangeAtPoint=function(h){var r=this.pointIndex(h);if(r>=0)return this.ranges[r]},a.prototype.clipRows=function(h,r){var o=this.ranges;if(o[0].start.row>r||o[o.length-1].start.row<h)return[];var n=this.pointIndex({row:h,column:0});n<0&&(n=-n-1);var i=this.pointIndex({row:r,column:0},n);i<0&&(i=-i-1);for(var e=[],t=n;t<i;t++)e.push(o[t]);return e},a.prototype.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},a.prototype.attach=function(h){this.session&&this.detach(),this.session=h,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(h){for(var r=h.start,o=h.end,n=r.row,i=o.row,e=this.ranges,t=0,s=e.length;t<s;t++){var l=e[t];if(l.end.row>=n)break}if(h.action=="insert")for(var c=i-n,y=-r.column+o.column;t<s;t++){var l=e[t];if(l.start.row>n)break;if(l.start.row==n&&l.start.column>=r.column&&(l.start.column==r.column&&this.$bias<=0||(l.start.column+=y,l.start.row+=c)),l.end.row==n&&l.end.column>=r.column){if(l.end.column==r.column&&this.$bias<0)continue;l.end.column==r.column&&y>0&&t<s-1&&l.end.column>l.start.column&&l.end.column==e[t+1].start.column&&(l.end.column-=y),l.end.column+=y,l.end.row+=c}}else for(var c=n-i,y=r.column-o.column;t<s;t++){var l=e[t];if(l.start.row>i)break;l.end.row<i&&(n<l.end.row||n==l.end.row&&r.column<l.end.column)?(l.end.row=n,l.end.column=r.column):l.end.row==i?l.end.column<=o.column?(c||l.end.column>r.column)&&(l.end.column=r.column,l.end.row=r.row):(l.end.column+=y,l.end.row+=c):l.end.row>i&&(l.end.row+=c),l.start.row<i&&(n<l.start.row||n==l.start.row&&r.column<l.start.column)?(l.start.row=n,l.start.column=r.column):l.start.row==i?l.start.column<=o.column?(c||l.start.column>r.column)&&(l.start.column=r.column,l.start.row=r.row):(l.start.column+=y,l.start.row+=c):l.start.row>i&&(l.start.row+=c)}if(c!=0&&t<s)for(;t<s;t++){var l=e[t];l.start.row+=c,l.end.row+=c}},a}();C.prototype.comparePoints=A,x.RangeList=C}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range_list"],function(E,x,B){var k=this&&this.__extends||function(){var n=function(i,e){return n=Object.
196setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(t[l]=s[l])},n(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),A=E("../range_list").RangeList,C=function(n){k(i,n);function i(e,t){var s=n.call(this)||this;return s.foldLine=null,s.placeholder=t,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 i.prototype.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},i.prototype.setFoldLine=function(e){this.foldLine=e,this.subFolds.forEach(function(t){t.setFoldLine(e)})},i.prototype.clone=function(){var e=this.range.clone(),t=new i(e,this.placeholder);return this.subFolds.forEach(function(s){t.subFolds.push(s.clone())}),t.collapseChildren=this.collapseChildren,t},i.prototype.addSubFold=function(e){if(!this.range.isEqual(e)){h(e,this.start);for(var y=e.start.row,m=e.start.column,t=0,s=-1;t<this.subFolds.length&&(s=this.subFolds[t].range.compare(y,m),s==1);t++);var l=this.subFolds[t],c=0;if(s==0){if(l.range.containsRange(e))return l.addSubFold(e);c=1}for(var y=e.range.end.row,m=e.range.end.column,g=t,s=-1;g<this.subFolds.length&&(s=this.subFolds[g].range.compare(y,m),s==1);g++);s==0&&g++;for(var d=this.subFolds.splice(t,g-t,e),b=s==0?d.length-1:d.length,L=c;L<b;L++)e.addSubFold(d[L]);return e.setFoldLine(this.foldLine),e}},i.prototype.restoreRange=function(e){return o(e,this.start)},i}(A);function a(n,i){n.row-=i.row,n.row==0&&(n.column-=i.column)}function h(n,i){a(n.start,i),a(n.end,i)}function r(n,i){n.row==0&&(n.column+=i.column),n.row+=i.row}function o(n,i){r(n.start,i),r(n.end,i)}x.Fold=C}),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,B){var k=E("../range").Range,A=E("./fold_line").FoldLine,C=E("./fold").Fold,a=E("../token_iterator").TokenIterator,h=E("../mouse/mouse_event").MouseEvent;function r(){this.getFoldAt=function(o,n,i){var e=this.getFoldLine(o);if(!e)return null;for(var t=e.folds,s=0;s<t.length;s++){var l=t[s].range;if(l.contains(o,n)){if(i==1&&l.isEnd(o,n)&&!l.isEmpty())continue;if(i==-1&&l.isStart(o,n)&&!l.isEmpty())continue;return t[s]}}},this.getFoldsInRange=function(o){var n=o.start,i=o.end,e=this.$foldData,t=[];n.column+=1,i.column-=1;for(var s=0;s<e.length;s++){var l=e[s].range.compareRange(o);if(l!=2){if(l==-2)break;for(var c=e[s].folds,y=0;y<c.length;y++){var m=c[y];if(l=m.range.compareRange(o),l==-2)break;if(l==2)continue;if(l==42)break;t.push(m)}}}return n.column-=1,i.column+=1,t},this.getFoldsInRangeList=function(o){if(Array.isArray(o)){var n=[];o.forEach(function(i){n=n.concat(this.getFoldsInRange(i))},this)}else var n=this.getFoldsInRange(o);return n},this.getAllFolds=function(){for(var o=[],n=this.$foldData,i=0;i<n.length;i++)for(var e=0;e<n[i].folds.length;e++)o.push(n[i].folds[e]);return o},this.getFoldStringAt=function(o,n,i,e){if(e=e||this.getFoldLine(o),!e)return null;for(var t={end:{column:0}},s,l,c=0;c<e.folds.length;c++){l=e.folds[c];var y=l.range.compareEnd(o,n);if(y==-1){s=this.getLine(l.start.row).substring(t.end.column,l.start.column);break}else if(y===0)return null;t=l}return s||(s=this.getLine(l.start.row).substring(t.end.column)),i==-1?s.substring(0,n-t.end.column):i==1?s.substring(n-t.end.column):s},this.getFoldLine=function(o,n){var i=this.$foldData,e=0;for(n&&(e=i.indexOf(n)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.start.row<=o&&t.end.row>=o)return t;if(t.end.row>o)return null}return null},this.getNextFoldLine=function(o,n){var i=this.$foldData,e=0;for(n&&(e=i.indexOf(n)),e==-1&&(e=0),e;e<i.length;e++){var t=i[e];if(t.end.row>=o)return t}return null},this.getFoldedRowCount=function(o,n){for(var i=this.$foldData,e=n-o+1,t=0;t<i.length;t++){var s=i[t],l=s.end.row,c=s.start.row;if(l>=n){c<n&&(c>=o?e-=n-c:e=0);break}else l>=o&&(c>=o?e-=l-c:e-=l-o+1)}return e},this.$addFoldLine=function(o){return this.$foldData.push(o),this.$foldData.sort(function(n,i){return n.start.row-i.start.row}),o},this.addFold=function(o,n){var i=this.$foldData,e=!1,t;o instanceof C?t=o:(t=new C(n,o),t.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(t.range);var s=t.start.row,l=t.start.column,c=t.end.row,y=t.end.column,m=this.getFoldAt(s,l,1),g=this.getFoldAt(c,y,-1);if(m&&g==m)return m.addSubFold(t);m&&!m.range.isStart(s,l)&&this.removeFold(m),g&&!g.range.isEnd(c,y)&&this.removeFold(g);var d=this.getFoldsInRange(t.range);d.length>0&&(this.removeFolds(d),t.collapseChildren||d.forEach(function(S){t.addSubFold(S)}));for(var b=0;b<i.length;b++){var L=i[b];if(c==L.start.row){L.addFold(t),e=!0;break}else if(s==L.end.row){if(L.addFold(t),e=!0,!t.sameRow){var $=i[b+1];if($&&$.start.row==c){L.merge($);break}}break}else if(c<=L.start.row)break}return e||(L=this.$addFoldLine(new A(this.$foldData,t))),this.$useWrapMode?this.$updateWrapData(L.start.row,L.start.row):this.$updateRowLengthCache(L.start.row,L.start.row),this.$modified=!0,this._signal("changeFold",{data:t,action:"add"}),t},this.addFolds=function(o){o.forEach(function(n){this.addFold(n)},this)},this.removeFold=function(o){var n=o.foldLine,i=n.start.row,e=n.end.row,t=this.$foldData,s=n.folds;if(s.length==1)t.splice(t.indexOf(n),1);else if(n.range.isEnd(o.end.row,o.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(o.start.row,o.start.column))s.shift(),n.start.row=s[0].start.row,n.start.column=s[0].start.column;else if(o.sameRow)s.splice(s.indexOf(o),1);else{var l=n.split(o.start.row,o.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(i,e):this.$updateRowLengthCache(i,e)),this.$modified=!0,this._signal("changeFold",{data:o,action:"remove"})},this.removeFolds=function(o){for(var n=[],i=0;i<o.length;i++)n.push(o[i]);
196n.forEach(function(e){this.removeFold(e)},this),this.$modified=!0},this.expandFold=function(o){this.removeFold(o),o.subFolds.forEach(function(n){o.restoreRange(n),this.addFold(n)},this),o.collapseChildren>0&&this.foldAll(o.start.row+1,o.end.row,o.collapseChildren-1),o.subFolds=[]},this.expandFolds=function(o){o.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(o,n){var i,e;if(o==null)i=new k(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof o=="number")i=new k(o,0,o,this.getLine(o).length);else if("row"in o)i=k.fromPoints(o,o);else{if(Array.isArray(o))return e=[],o.forEach(function(s){e=e.concat(this.unfold(s))},this),e;i=o}e=this.getFoldsInRangeList(i);for(var t=e;e.length==1&&k.comparePoints(e[0].start,i.start)<0&&k.comparePoints(e[0].end,i.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(i);if(n!=!1?this.removeFolds(e):this.expandFolds(e),t.length)return t},this.isRowFolded=function(o,n){return!!this.getFoldLine(o,n)},this.getRowFoldEnd=function(o,n){var i=this.getFoldLine(o,n);return i?i.end.row:o},this.getRowFoldStart=function(o,n){var i=this.getFoldLine(o,n);return i?i.start.row:o},this.getFoldDisplayLine=function(o,n,i,e,t){e==null&&(e=o.start.row),t==null&&(t=0),n==null&&(n=o.end.row),i==null&&(i=this.getLine(n).length);var s=this.doc,l="";return o.walk(function(c,y,m,g){if(!(y<e)){if(y==e){if(m<t)return;g=Math.max(t,g)}c!=null?l+=c:l+=s.getLine(y).substring(g,m)}},n,i),l},this.getDisplayLine=function(o,n,i,e){var t=this.getFoldLine(o);if(t)return this.getFoldDisplayLine(t,o,n,i,e);var s;return s=this.doc.getLine(o),s.substring(e||0,n||s.length)},this.$cloneFoldData=function(){var o=[];return o=this.$foldData.map(function(n){var i=n.folds.map(function(e){return e.clone()});return new A(o,i)}),o},this.toggleFold=function(o){var n=this.selection,i=n.getRange(),e,t;if(i.isEmpty()){var s=i.start;if(e=this.getFoldAt(s.row,s.column),e){this.expandFold(e);return}else if(o){var l=this.getFoldLine(s.row);l&&this.expandFolds(l.folds);return}else(t=this.findMatchingBracket(s))?i.comparePoint(t)==1?i.end=t:(i.start=t,i.start.column++,i.end.column--):(t=this.findMatchingBracket({row:s.row,column:s.column+1}))?(i.comparePoint(t)==1?i.end=t:i.start=t,i.start.column++):i=this.getCommentFoldRange(s.row,s.column)||i}else{var c=this.getFoldsInRange(i);if(o&&c.length){this.expandFolds(c);return}else c.length==1&&(e=c[0])}if(e||(e=this.getFoldAt(i.start.row,i.start.column)),e&&e.range.toString()==i.toString()){this.expandFold(e);return}var y="...";if(!i.isMultiLine()){if(y=this.getTextRange(i),y.length<4)return;y=y.trim().substring(0,2)+".."}this.addFold(y,i)},this.getCommentFoldRange=function(o,n,i){var e=new a(this,o,n),t=e.getCurrentToken(),s=t&&t.type;if(t&&/^comment|string/.test(s)){s=s.match(/comment|string/)[0],s=="comment"&&(s+="|doc-start|\\.doc");var l=new RegExp(s),c=new k;if(i!=1){do t=e.stepBackward();while(t&&l.test(t.type));t=e.stepForward()}c.start.row=e.getCurrentTokenRow(),c.start.column=e.getCurrentTokenColumn()+t.value.length,e=new a(this,o,n);var y=this.getState(e.$row);if(i!=-1){var m=-1;do if(t=e.stepForward(),m==-1){var g=this.getState(e.$row);y.toString()!==g.toString()&&(m=e.$row)}else if(e.$row>m)break;while(t&&l.test(t.type));t=e.stepBackward()}else t=e.getCurrentToken();return c.end.row=e.getCurrentTokenRow(),c.end.column=e.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column?void 0:c}},this.foldAll=function(o,n,i,e){i==null&&(i=1e5);var t=this.foldWidgets;if(t){n=n||this.getLength(),o=o||0;for(var s=o;s<n;s++)if(t[s]==null&&(t[s]=this.getFoldWidget(s)),t[s]=="start"&&!(e&&!e(s))){var l=this.getFoldWidgetRange(s);l&&l.isMultiLine()&&l.end.row<=n&&l.start.row>=o&&(s=l.end.row,l.collapseChildren=i,this.addFold("...",l))}}},this.foldToLevel=function(o){for(this.foldAll();o-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var o=this;this.foldAll(null,null,null,function(n){for(var i=o.getTokens(n),e=0;e<i.length;e++){var t=i[e];if(!(t.type=="text"&&/^\s+$/.test(t.value)))return!!/comment/.test(t.type)}})},this.$foldStyles={manual:1,markbegin:1,markbeginend:1}
196,this.$foldStyle="markbegin",this.setFoldStyle=function(o){if(!this.$foldStyles[o])throw new Error("invalid fold style: "+o+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=o){this.$foldStyle=o,o=="manual"&&this.unfold();var n=this.$foldMode;this.$setFolding(null),this.$setFolding(n)}},this.$setFolding=function(o){if(this.$foldMode!=o){if(this.$foldMode=o,this.off("change",this.$updateFoldWidgets),this.off("tokenizerUpdate",this.$tokenizerUpdateFoldWidgets),this._signal("changeAnnotation"),!o||this.$foldStyle=="manual"){this.foldWidgets=null;return}this.foldWidgets=[],this.getFoldWidget=o.getFoldWidget.bind(o,this,this.$foldStyle),this.getFoldWidgetRange=o.getFoldWidgetRange.bind(o,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(o,n){var i=this.foldWidgets;if(!i||n&&i[o])return{};for(var e=o-1,t;e>=0;){var s=i[e];if(s==null&&(s=i[e]=this.getFoldWidget(e)),s=="start"){var l=this.getFoldWidgetRange(e);if(t||(t=l),l&&l.end.row>=o)break}e--}return{range:e!==-1&&l,firstRange:t}},this.onFoldWidgetClick=function(o,n){n instanceof h&&(n=n.domEvent);var i={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(o,i);if(!e){var t=n.target||n.srcElement;t&&/ace_fold-widget/.test(t.className)&&(t.className+=" ace_invalid")}},this.$toggleFoldWidget=function(o,n){if(this.getFoldWidget){var i=this.getFoldWidget(o),e=this.getLine(o),t=i==="end"?-1:1,s=this.getFoldAt(o,t===-1?0:e.length,t);if(s)return n.children||n.all?this.removeFold(s):this.expandFold(s),s;var l=this.getFoldWidgetRange(o,!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 c=this.getParentFoldRangeData(o);if(c.range)var y=c.range.start.row+1,m=c.range.end.row;this.foldAll(y,m,n.all?1e4:0)}else n.children?(m=l?l.end.row:this.getLength(),this.foldAll(o+1,m,n.all?1e4:0)):l&&(n.all&&(l.collapseChildren=1e4),this.addFold("...",l));return l}},this.toggleFoldWidget=function(o){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var i=this.$toggleFoldWidget(n,{});if(!i){var e=this.getParentFoldRangeData(n,!0);if(i=e.range||e.firstRange,i){n=i.start.row;var t=this.getFoldAt(n,this.getLine(n).length,1);t?this.removeFold(t):this.addFold("...",i)}}},this.updateFoldWidgets=function(o){var n=o.start.row,i=o.end.row-n;if(i===0)this.foldWidgets[n]=null;else if(o.action=="remove")this.foldWidgets.splice(n,i+1,null);else{var e=Array(i+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(o){var n=o.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}x.Folding=r}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(E,x,B){var k=E("../token_iterator").TokenIterator,A=E("../range").Range;function C(){this.findMatchingBracket=function(a,h){if(a.column==0)return null;var r=h||this.getLine(a.row).charAt(a.column-1);if(r=="")return null;var o=r.match(/([\(\[\{])|([\)\]\}])/);return o?o[1]?this.$findClosingBracket(o[1],a):this.$findOpeningBracket(o[2],a):null},this.getBracketRange=function(a){var h=this.getLine(a.row),r=!0,o,n=h.charAt(a.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=h.charAt(a.column),a={row:a.row,column:a.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/),r=!1),!i)return null;if(i[1]){var e=this.$findClosingBracket(i[1],a);if(!e)return null;o=A.fromPoints(a,e),r||(o.end.column++,o.start.column--),o.cursor=o.end}else{var e=this.$findOpeningBracket(i[2],a);if(!e)return null;o=A.fromPoints(e,a),r||(o.start.column++,o.end.column--),o.cursor=o.start}return o},this.getMatchingBracketRanges=function(a,h){var r=this.getLine(a.row),o=/([\(\[\{])|([\)\]\}])/,n=!h&&r.charAt(a.column-1),i=n&&n.match(o);if(i||(n=(h===void 0||h)&&r.charAt(a.column),a={row:a.row,column:a.column+1}
196,i=n&&n.match(o)),!i)return null;var e=new A(a.row,a.column-1,a.row,a.column),t=i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a);if(!t)return[e];var s=new A(t.row,t.column,t.row,t.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,h,r){var o=this.$brackets[a],n=1,i=new k(this,h.row,h.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var t=h.column-i.getCurrentTokenColumn()-2,s=e.value;;){for(;t>=0;){var l=s.charAt(t);if(l==o){if(n-=1,n==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else l==a&&(n+=1);t-=1}do e=i.stepBackward();while(e&&!r.test(e.type));if(e==null)break;s=e.value,t=s.length-1}return null}},this.$findClosingBracket=function(a,h,r){var o=this.$brackets[a],n=1,i=new k(this,h.row,h.column),e=i.getCurrentToken();if(e||(e=i.stepForward()),!!e){r||(r=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var t=h.column-i.getCurrentTokenColumn();;){for(var s=e.value,l=s.length;t<l;){var c=s.charAt(t);if(c==o){if(n-=1,n==0)return{row:i.getCurrentTokenRow(),column:t+i.getCurrentTokenColumn()}}else c==a&&(n+=1);t+=1}do e=i.stepForward();while(e&&!r.test(e.type));if(e==null)break;t=0}return null}},this.getMatchingTags=function(a){var h=new k(this,a.row,a.column),r=this.$findTagName(h);if(r){var o=h.stepBackward();return o.value==="<"?this.$findClosingTag(h,r):this.$findOpeningTag(h,r)}},this.$findTagName=function(a){var h=a.getCurrentToken(),r=!1,o=!1;if(h&&h.type.indexOf("tag-name")===-1)do o?h=a.stepBackward():h=a.stepForward(),h&&(h.value==="/>"?o=!0:h.type.indexOf("tag-name")!==-1&&(r=!0));while(h&&!r);return h},this.$findClosingTag=function(a,h){var r,o=h.value,n=h.value,i=0,e=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);h=a.stepForward();var t=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length),s=!1;do{if(r=h,r.type.indexOf("tag-close")!==-1&&!s){var l=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(h=a.stepForward(),h){if(h.value===">"&&!s){var l=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(h.type.indexOf("tag-name")!==-1){if(o=h.value,n===o){if(r.value==="<")i++;else if(r.value==="</"&&(i--,i<0)){a.stepBackward();var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2);h=a.stepForward();var y=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=a.stepForward()),h&&h.value===">")var m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===o&&h.value==="/>"&&(i--,i<0))var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),y=c,m=y,l=new A(t.end.row,t.end.column,t.end.row,t.end.column+1)}}while(h&&i>=0);if(e&&l&&c&&m&&t&&y)return{openTag:new A(e.start.row,e.start.column,l.end.row,l.end.column),closeTag:new A(c.start.row,c.start.column,m.end.row,m.end.column),openTagName:t,closeTagName:y}},this.$findOpeningTag=function(a,h){var r=a.getCurrentToken(),o=h.value,n=0,i=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),t=e+2,s=new A(i,e,i,t);a.stepForward();var l=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+h.value.length);if(h.type.indexOf("tag-close")===-1&&(h=a.stepForward()),!(!h||h.value!==">")){var c=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(h=r,i=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),t=e+h.value.length,r=a.stepBackward(),h){
196if(h.type.indexOf("tag-name")!==-1){if(o===h.value)if(r.value==="<"){if(n++,n>0){var y=new A(i,e,i,t),m=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do h=a.stepForward();while(h&&h.value!==">");var g=new A(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else r.value==="</"&&n--}else if(h.value==="/>"){for(var d=0,b=r;b;){if(b.type.indexOf("tag-name")!==-1&&b.value===o){n--;break}else if(b.value==="<")break;b=a.stepBackward(),d++}for(var L=0;L<d;L++)a.stepForward()}}while(r&&n<=0);if(m&&g&&s&&c&&y&&l)return{openTag:new A(m.start.row,m.start.column,g.end.row,g.end.column),closeTag:new A(s.start.row,s.start.column,c.end.row,c.end.column),openTagName:y,closeTagName:l}}}}x.BracketMatch=C}),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/line_widgets","ace/document","ace/background_tokenizer","ace/search_highlight","ace/undomanager","ace/edit_session/folding","ace/edit_session/bracket_match"],function(E,x,B){var k=E("./lib/oop"),A=E("./lib/lang"),C=E("./bidihandler").BidiHandler,a=E("./config"),h=E("./lib/event_emitter").EventEmitter,r=E("./selection").Selection,o=E("./mode/text").Mode,n=E("./range").Range,i=E("./line_widgets").LineWidgets,e=E("./document").Document,t=E("./background_tokenizer").BackgroundTokenizer,s=E("./search_highlight").SearchHighlight,l=E("./undomanager").UndoManager,c=function(){function w(v,f){this.doc,this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$editor=null,this.prevOp={},this.$foldData=[],this.id="session"+ ++w.$uid,this.$foldData.toString=function(){return this.join(` 197`)},this.$gutterCustomWidgets={},this.bgTokenizer=new t(new o().getTokenizer(),this);var u=this;this.bgTokenizer.on("update",function(p){u._signal("tokenizerUpdate",p)}),this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),(typeof v!="object"||!v.getLine)&&(v=new e(v)),this.setDocument(v),this.selection=new r(this),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.selection.on("changeCursor",this.$onSelectionChange),this.$bidiHandler=new C(this),a.resetOptions(this),this.setMode(f),a._signal("session",this),this.destroyed=!1,this.$initOperationListeners()}return w.prototype.$initOperationListeners=function(){var v=this;this.curOp=null,this.on("change",function(){v.curOp||(v.startOperation(),v.curOp.selectionBefore=v.$lastSel),v.curOp.docChanged=!0},!0),this.on("changeSelection",function(){v.curOp||(v.startOperation(),v.curOp.selectionBefore=v.$lastSel),v.curOp.selectionChanged=!0},!0),this.$operationResetTimer=A.delayedCall(this.endOperation.bind(this,!0))},w.prototype.startOperation=function(v){if(this.curOp){if(!v||this.curOp.command)return;this.prevOp=this.curOp}v||(v={}),this.$operationResetTimer.schedule(),this.curOp={command:v.command||{},args:v.args},this.curOp.selectionBefore=this.selection.toJSON(),this._signal("startOperation",v)},w.prototype.endOperation=function(v){if(this.curOp){if(v&&v.returnValue===!1){this.curOp=null,this._signal("endOperation",v);return}if(v==!0&&this.curOp.command&&this.curOp.command.name=="mouse")return;var f=this.selection.toJSON();this.curOp.selectionAfter=f,this.$lastSel=this.selection.toJSON(),this.getUndoManager().addSelection(f),this._signal("beforeEndOperation"),this.prevOp=this.curOp,this.curOp=null,this._signal("endOperation",v)}},w.prototype.setDocument=function(v){this.doc&&this.doc.off("change",this.$onChange),this.doc=v,v.on("change",this.$onChange,!0),this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},w.prototype.getDocument=function(){return this.doc},Object.defineProperty(w.prototype,"widgetManager",{get:function(){var v=new i(this);return this.widgetManager=v,this.$editor&&v.attach(this.$editor),v},set:function(v){Object.defineProperty(this,"widgetManager",{writable:!0,enumerable:!0,configurable:!0,value:v})}
197,enumerable:!1,configurable:!0}),w.prototype.$resetRowCache=function(v){if(!v){this.$docRowCache=[],this.$screenRowCache=[];return}var f=this.$docRowCache.length,u=this.$getRowCacheIndex(this.$docRowCache,v)+1;f>u&&(this.$docRowCache.splice(u,f),this.$screenRowCache.splice(u,f))},w.prototype.$getRowCacheIndex=function(v,f){for(var u=0,p=v.length-1;u<=p;){var M=u+p>>1,T=v[M];if(f>T)u=M+1;else if(f<T)p=M-1;else return M}return u-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(v){var f=v.data;this.$resetRowCache(f.start.row)},w.prototype.onChange=function(v){this.$modified=!0,this.$bidiHandler.onChange(v),this.$resetRowCache(v.start.row);var f=this.$updateInternalDataOnChange(v);!this.$fromUndo&&this.$undoManager&&(f&&f.length&&(this.$undoManager.add({action:"removeFolds",folds:f},this.mergeUndoDeltas),this.mergeUndoDeltas=!0),this.$undoManager.add(v,this.mergeUndoDeltas),this.mergeUndoDeltas=!0,this.$informUndoManager.schedule()),this.bgTokenizer.$updateOnChange(v),this._signal("change",v)},w.prototype.onSelectionChange=function(){this._signal("changeSelection")},w.prototype.setValue=function(v){this.doc.setValue(v),this.selection.moveTo(0,0),this.$resetRowCache(0),this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},w.fromJSON=function(v){typeof v=="string"&&(v=JSON.parse(v));var f=new l;f.$undoStack=v.history.undo,f.$redoStack=v.history.redo,f.mark=v.history.mark,f.$rev=v.history.rev;var u=new w(v.value);return v.folds.forEach(function(p){u.addFold("...",n.fromPoints(p.start,p.end))}),u.setAnnotations(v.annotations),u.setBreakpoints(v.breakpoints),u.setMode(v.mode),u.setScrollLeft(v.scrollLeft),u.setScrollTop(v.scrollTop),u.setUndoManager(f),u.selection.fromJSON(v.selection),u},w.prototype.toJSON=function(){return{annotations:this.$annotations,breakpoints:this.$breakpoints,folds:this.getAllFolds().map(function(v){return v.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(v){return this.bgTokenizer.getState(v)},w.prototype.getTokens=function(v){return this.bgTokenizer.getTokens(v)},w.prototype.getTokenAt=function(v,f){var u=this.bgTokenizer.getTokens(v),p,M=0;if(f==null){var T=u.length-1;M=this.getLine(v).length}else for(var T=0;T<u.length&&(M+=u[T].value.length,!(M>=f));T++);return p=u[T],p?(p.index=T,p.start=M-p.value.length,p):null},w.prototype.setUndoManager=function(v){if(this.$undoManager=v,this.$informUndoManager&&this.$informUndoManager.cancel(),v){var f=this;v.addSession(this),this.$syncInformUndoManager=function(){f.$informUndoManager.cancel(),f.mergeUndoDeltas=!1},this.$informUndoManager=A.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()?A.stringRepeat(" ",this.getTabSize()):" "},w.prototype.setUseSoftTabs=function(v){this.setOption("useSoftTabs",v)},w.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},w.prototype.setTabSize=function(v){this.setOption("tabSize",v)},w.prototype.getTabSize=function(){return this.$tabSize},w.prototype.isTabStop=function(v){return this.$useSoftTabs&&v.column%this.$tabSize===0},w.prototype.setNavigateWithinSoftTabs=function(v){this.setOption("navigateWithinSoftTabs",v)},w.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs}
197,w.prototype.setOverwrite=function(v){this.setOption("overwrite",v)},w.prototype.getOverwrite=function(){return this.$overwrite},w.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},w.prototype.addGutterDecoration=function(v,f){this.$decorations[v]||(this.$decorations[v]=""),this.$decorations[v]+=" "+f,this._signal("changeBreakpoint",{})},w.prototype.removeGutterCustomWidget=function(v){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(v)},w.prototype.addGutterCustomWidget=function(v,f){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(v,f)},w.prototype.removeGutterDecoration=function(v,f){this.$decorations[v]=(this.$decorations[v]||"").replace(" "+f,""),this._signal("changeBreakpoint",{})},w.prototype.getBreakpoints=function(){return this.$breakpoints},w.prototype.setBreakpoints=function(v){this.$breakpoints=[];for(var f=0;f<v.length;f++)this.$breakpoints[v[f]]="ace_breakpoint";this._signal("changeBreakpoint",{})},w.prototype.clearBreakpoints=function(){this.$breakpoints=[],this._signal("changeBreakpoint",{})},w.prototype.setBreakpoint=function(v,f){f===void 0&&(f="ace_breakpoint"),f?this.$breakpoints[v]=f:delete this.$breakpoints[v],this._signal("changeBreakpoint",{})},w.prototype.clearBreakpoint=function(v){delete this.$breakpoints[v],this._signal("changeBreakpoint",{})},w.prototype.addMarker=function(v,f,u,p){var M=this.$markerId++,T={range:v,type:u||"line",renderer:typeof u=="function"?u:null,clazz:f,inFront:!!p,id:M};return p?(this.$frontMarkers[M]=T,this._signal("changeFrontMarker")):(this.$backMarkers[M]=T,this._signal("changeBackMarker")),M},w.prototype.addDynamicMarker=function(v,f){if(v.update){var u=this.$markerId++;return v.id=u,v.inFront=!!f,f?(this.$frontMarkers[u]=v,this._signal("changeFrontMarker")):(this.$backMarkers[u]=v,this._signal("changeBackMarker")),v}},w.prototype.removeMarker=function(v){var f=this.$frontMarkers[v]||this.$backMarkers[v];if(f){var u=f.inFront?this.$frontMarkers:this.$backMarkers;delete u[v],this._signal(f.inFront?"changeFrontMarker":"changeBackMarker")}},w.prototype.getMarkers=function(v){return v?this.$frontMarkers:this.$backMarkers},w.prototype.highlight=function(v){if(!this.$searchHighlight){var f=new s(null,"ace_selected-word","text");this.$searchHighlight=this.addDynamicMarker(f)}this.$searchHighlight.setRegexp(v)},w.prototype.highlightLines=function(v,f,u,p){typeof f!="number"&&(u=f,f=v),u||(u="ace_step");var M=new n(v,0,f,1/0);return M.id=this.addMarker(M,u,"fullLine",p),M},w.prototype.setAnnotations=function(v){this.$annotations=v,this._signal("changeAnnotation",{})},w.prototype.getAnnotations=function(){return this.$annotations||[]},w.prototype.clearAnnotations=function(){this.setAnnotations([])},w.prototype.$detectNewLine=function(v){var f=v.match(/^.*?(\r?\n)/m);f?this.$autoNewLine=f[1]:this.$autoNewLine=` 198`},w.prototype.getWordRange=function(v,f){var u=this.getLine(v),p=!1;if(f>0&&(p=!!u.charAt(f-1).match(this.tokenRe)),p||(p=!!u.charAt(f).match(this.tokenRe)),p)var M=this.tokenRe;else if(/^\s+$/.test(u.slice(f-1,f+1)))var M=/\s/;else var M=this.nonTokenRe;var T=f;if(T>0){do T--;while(T>=0&&u.charAt(T).match(M));T++}for(var R=f;R<u.length&&u.charAt(R).match(M);)R++;return new n(v,T,v,R)},w.prototype.getAWordRange=function(v,f){for(var u=this.getWordRange(v,f),p=this.getLine(u.end.row);p.charAt(u.end.column).match(/[ \t]/);)u.end.column+=1;return u},w.prototype.setNewLineMode=function(v){this.doc.setNewLineMode(v)},w.prototype.getNewLineMode=function(){return this.doc.getNewLineMode()},w.prototype.setUseWorker=function(v){this.setOption("useWorker",v)},w.prototype.getUseWorker=function(){return this.$useWorker},w.prototype.onReloadTokenizer=function(v){var f=v.data;this.bgTokenizer.start(f.first),this._signal("tokenizerUpdate",v)},w.prototype.setMode=function(v,f){if(v&&typeof v=="object"){if(v.getTokenizer)return this.$onChangeMode(v);var u=v,p=u.path}else p=v||"ace/mode/text";if(this.$modes["ace/mode/text"]||(this.$modes["ace/mode/text"]=new o),this.$modes[p]&&!u){this.$onChangeMode(this.$modes[p]),f&&f();return}this.$modeId=p,a.loadModule(["mode",p],(function(M){if(!this.destroyed){
198if(this.$modeId!==p)return f&&f();this.$modes[p]&&!u?this.$onChangeMode(this.$modes[p]):M&&M.Mode&&(M=new M.Mode(u),u||(this.$modes[p]=M,M.$id=p),this.$onChangeMode(M)),f&&f()}}).bind(this)),this.$mode||this.$onChangeMode(this.$modes["ace/mode/text"],!0)},w.prototype.$onChangeMode=function(v,f){if(f||(this.$modeId=v.$id),this.$mode!==v){var u=this.$mode;this.$mode=v,this.$stopWorker(),this.$useWorker&&this.$startWorker();var p=v.getTokenizer();if(p.on!==void 0){var M=this.onReloadTokenizer.bind(this);p.on("update",M)}this.bgTokenizer.setTokenizer(p),this.bgTokenizer.setDocument(this.getDocument()),this.tokenRe=v.tokenRe,this.nonTokenRe=v.nonTokenRe,f||(v.attachToSession&&v.attachToSession(this),this.$options.wrapMethod.set.call(this,this.$wrapMethod),this.$setFolding(v.foldingRules),this.bgTokenizer.start(0),this._emit("changeMode",{oldMode:u,mode:v}))}},w.prototype.$stopWorker=function(){this.$worker&&(this.$worker.terminate(),this.$worker=null)},w.prototype.$startWorker=function(){try{this.$worker=this.$mode.createWorker(this)}catch(v){a.warn("Could not load worker",v),this.$worker=null}},w.prototype.getMode=function(){return this.$mode},w.prototype.setScrollTop=function(v){this.$scrollTop===v||isNaN(v)||(this.$scrollTop=v,this._signal("changeScrollTop",v))},w.prototype.getScrollTop=function(){return this.$scrollTop},w.prototype.setScrollLeft=function(v){this.$scrollLeft===v||isNaN(v)||(this.$scrollLeft=v,this._signal("changeScrollLeft",v))},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 v=0;return this.lineWidgets.forEach(function(f){f&&f.screenWidth>v&&(v=f.screenWidth)}),this.lineWidgetWidth=v},w.prototype.$computeWidth=function(v){if(this.$modified||v){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var f=this.doc.getAllLines(),u=this.$rowLengthCache,p=0,M=0,T=this.$foldData[M],R=T?T.start.row:1/0,I=f.length,D=0;D<I;D++){if(D>R){if(D=T.end.row+1,D>=I)break;T=this.$foldData[M++],R=T?T.start.row:1/0}u[D]==null&&(u[D]=this.$getStringScreenWidth(f[D])[0]),u[D]>p&&(p=u[D])}this.screenWidth=p}},w.prototype.getLine=function(v){return this.doc.getLine(v)},w.prototype.getLines=function(v,f){return this.doc.getLines(v,f)},w.prototype.getLength=function(){return this.doc.getLength()},w.prototype.getTextRange=function(v){return this.doc.getTextRange(v||this.selection.getRange())},w.prototype.insert=function(v,f){return this.doc.insert(v,f)},w.prototype.remove=function(v){return this.doc.remove(v)},w.prototype.removeFullLines=function(v,f){return this.doc.removeFullLines(v,f)},w.prototype.undoChanges=function(v,f){if(v.length){this.$fromUndo=!0;for(var u=v.length-1;u!=-1;u--){var p=v[u];p.action=="insert"||p.action=="remove"?this.doc.revertDelta(p):p.folds&&this.addFolds(p.folds)}!f&&this.$undoSelect&&(v.selectionBefore?this.selection.fromJSON(v.selectionBefore):this.selection.setRange(this.$getUndoSelection(v,!0))),this.$fromUndo=!1}},w.prototype.redoChanges=function(v,f){if(v.length){this.$fromUndo=!0;for(var u=0;u<v.length;u++){var p=v[u];(p.action=="insert"||p.action=="remove")&&this.doc.$safeApplyDelta(p)}!f&&this.$undoSelect&&(v.selectionAfter?this.selection.fromJSON(v.selectionAfter):this.selection.setRange(this.$getUndoSelection(v,!1))),this.$fromUndo=!1}},w.prototype.setUndoSelect=function(v){this.$undoSelect=v},w.prototype.$getUndoSelection=function(v,f){function u(I){return f?I.action!=="insert":I.action==="insert"}for(var p,M,T=0;T<v.length;T++){var R=v[T];if(R.start){if(!p){u(R)?p=n.fromPoints(R.start,R.end):p=n.fromPoints(R.start,R.start);continue}u(R)?(M=R.start,p.compare(M.row,M.column)==-1&&p.setStart(M),M=R.end,p.compare(M.row,M.column)==1&&p.setEnd(M)):(M=R.start,p.compare(M.row,M.column)==-1&&(p=n.fromPoints(R.start,R.start)))}}return p},w.prototype.replace=function(v,f){return this.doc.replace(v,f)},w.prototype.moveText=function(v,f,u){var p=this.getTextRange(v),M=this.getFoldsInRange(v),T=n.fromPoints(f,f);if(!u){this.remove(v);var R=v.start.row-v.end.row,I=R?-v.end.column:v.start.column-v.end.column;I&&(T.start.row==v.end.row&&T.start.column>v.end.column&&(T.start.column+=I),T.end.row==v.end.row&&T.end.column>v.end.column&&(T.end.column+=I)),R&&T.start.row>=v.end.row&&(T.start.row+=R,T.end.row+=R)}if(T.end=this.insert(T.start,p),M.length){var D=v.start,H=T.start,R=H.row-D.row,I=H.column-D.column;this.addFolds(M.map(function(F){return F=F.clone(),F.start.row==D.row&&(F.start.column+=I),F.end.row==D.row&&(F.end.column+=I),F.start.row+=R,F.end.row+=R,F}))}return T},w.prototype.indentRows=function(v,f,u){u=u.replace(/\t/g,this.getTabString());for(var p=v;p<=f;p++)this.doc.insertInLine({row:p,column:0},u)},w.prototype.outdentRows=function(v){for(var f=v.collapseRows(),u=new n(0,0,0,0),p=this.getTabSize(),M=f.start.row;M<=f.end.row;++M){var T=this.getLine(M);u.start.row=M,u.end.row=M;for(var R=0;R<p&&T.charAt(R)==" ";++R);R<p&&T.charAt(R)==" "?(u.start.column=R,u.end.column=R+1):(u.start.column=0,u.end.column=R),this.remove(u)}},w.prototype.$moveLines=function(v,f,u){if(v=this.getRowFoldStart(v),f=this.getRowFoldEnd(f),u<0){var p=this.getRowFoldStart(v+u);
198if(p<0)return 0;var M=p-v}else if(u>0){var p=this.getRowFoldEnd(f+u);if(p>this.doc.getLength()-1)return 0;var M=p-f}else{v=this.$clipRowToDocument(v),f=this.$clipRowToDocument(f);var M=f-v+1}var T=new n(v,0,f,Number.MAX_VALUE),R=this.getFoldsInRange(T).map(function(D){return D=D.clone(),D.start.row+=M,D.end.row+=M,D}),I=u==0?this.doc.getLines(v,f):this.doc.removeFullLines(v,f);return this.doc.insertFullLines(v+M,I),R.length&&this.addFolds(R),M},w.prototype.moveLinesUp=function(v,f){return this.$moveLines(v,f,-1)},w.prototype.moveLinesDown=function(v,f){return this.$moveLines(v,f,1)},w.prototype.duplicateLines=function(v,f){return this.$moveLines(v,f,0)},w.prototype.$clipRowToDocument=function(v){return Math.max(0,Math.min(v,this.doc.getLength()-1))},w.prototype.$clipColumnToRow=function(v,f){return f<0?0:Math.min(this.doc.getLine(v).length,f)},w.prototype.$clipPositionToDocument=function(v,f){if(f=Math.max(0,f),v<0)v=0,f=0;else{var u=this.doc.getLength();v>=u?(v=u-1,f=this.doc.getLine(u-1).length):f=Math.min(this.doc.getLine(v).length,f)}return{row:v,column:f}},w.prototype.$clipRangeToDocument=function(v){v.start.row<0?(v.start.row=0,v.start.column=0):v.start.column=this.$clipColumnToRow(v.start.row,v.start.column);var f=this.doc.getLength()-1;return v.end.row>f?(v.end.row=f,v.end.column=this.doc.getLine(f).length):v.end.column=this.$clipColumnToRow(v.end.row,v.end.column),v},w.prototype.setUseWrapMode=function(v){if(v!=this.$useWrapMode){if(this.$useWrapMode=v,this.$modified=!0,this.$resetRowCache(0),v){var f=this.getLength();this.$wrapData=Array(f),this.$updateWrapData(0,f-1)}this._signal("changeWrapMode")}},w.prototype.getUseWrapMode=function(){return this.$useWrapMode},w.prototype.setWrapLimitRange=function(v,f){(this.$wrapLimitRange.min!==v||this.$wrapLimitRange.max!==f)&&(this.$wrapLimitRange={min:v,max:f},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},w.prototype.adjustWrapLimit=function(v,f){var u=this.$wrapLimitRange;u.max<0&&(u={min:f,max:f});var p=this.$constrainWrapLimit(v,u.min,u.max);return p!=this.$wrapLimit&&p>1?(this.$wrapLimit=p,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},w.prototype.$constrainWrapLimit=function(v,f,u){return f&&(v=Math.max(f,v)),u&&(v=Math.min(u,v)),v},w.prototype.getWrapLimit=function(){return this.$wrapLimit},w.prototype.setWrapLimit=function(v){this.setWrapLimitRange(v,v)},w.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},w.prototype.$updateInternalDataOnChange=function(v){var f=this.$useWrapMode,u=v.action,p=v.start,M=v.end,T=p.row,R=M.row,I=R-T,D=null;if(this.$updating=!0,I!=0)if(u==="remove"){this[f?"$wrapData":"$rowLengthCache"].splice(T,I);var H=this.$foldData;D=this.getFoldsInRange(v),this.removeFolds(D);var O=this.getFoldLine(M.row),N=0;if(O){O.addRemoveChars(M.row,M.column,p.column-M.column),O.shiftRow(-I);var F=this.getFoldLine(T);F&&F!==O&&(F.merge(O),O=F),N=H.indexOf(O)+1}for(N;N<H.length;N++){var O=H[N];O.start.row>=M.row&&O.shiftRow(-I)}R=T}else{var W=Array(I);W.unshift(T,0);var z=f?this.$wrapData:this.$rowLengthCache;z.splice.apply(z,W);var H=this.$foldData,O=this.getFoldLine(T),N=0;if(O){var P=O.range.compareInside(p.row,p.column);P==0?(O=O.split(p.row,p.column),O&&(O.shiftRow(I),O.addRemoveChars(R,0,M.column-p.column))):P==-1&&(O.addRemoveChars(T,0,M.column-p.column),O.shiftRow(I)),N=H.indexOf(O)+1}for(N;N<H.length;N++){var O=H[N];O.start.row>=T&&O.shiftRow(I)}}else{I=Math.abs(v.start.column-v.end.column),u==="remove"&&(D=this.getFoldsInRange(v),this.removeFolds(D),I=-I);var O=this.getFoldLine(T);O&&O.addRemoveChars(T,p.column,I)}return f&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,f?this.$updateWrapData(T,R):this.$updateRowLengthCache(T,R),D},w.prototype.$updateRowLengthCache=function(v,f){this.$rowLengthCache[v]=null,this.$rowLengthCache[f]=null},w.prototype.$updateWrapData=function(v,f){var u=this.doc.getAllLines(),p=this.getTabSize(),M=this.$wrapData,T=this.$wrapLimit,R,I,D=v;for(f=Math.min(f,u.length-1);D<=f;)I=this.getFoldLine(D,I),I?(R=[],I.walk((function(H,O,N,F){var W;if(H!=null){W=this.$getDisplayTokens(H,R.length),W[0]=g;for(var z=1;z<W.length;z++)W[z]=d}else W=this.$getDisplayTokens(u[O].substring(F,N),R.length);R=R.concat(W)}).bind(this),I.end.row,u[I.end.row].length+1),M[I.start.row]=this.$computeWrapSplits(R,T,p),D=I.end.row+1):(R=this.$getDisplayTokens(u[D]),M[D]=this.$computeWrapSplits(R,T,p),D++)},w.prototype.$computeWrapSplits=function(v,f,u){if(v.length==0)return[];var p=[],M=v.length,T=0,R=0,I=this.$wrapAsCode,D=this.$indentedSoftWrap,H=f<=Math.max(2*u,8)||D===!1?0:Math.floor(f/2);function O(){var P=0;if(H===0)return P;if(D)for(var U=0;U<v.length;U++){var j=v[U];if(j==L)P+=1;else if(j==$)P+=u;else{if(j==S)continue;break}}return I&&D!==!1&&(P+=u),Math.min(P,H)}function N(P){for(var U=P-T,j=T;j<P;j++){var V=v[j];(V===12||V===2)&&(U-=1)}p.length||(F=O(),p.indent=F),R+=U,p.push(R),T=P}for(var F=0;M-T>f-F;){var W=T+f-F;if(v[W-1]>=L&&v[W]>=L){N(W);continue}if(v[W]==g||v[W]==d){for(W;W!=T-1&&v[W]!=g;W--);if(W>T){N(W);continue}for(W=T+f,W;W<v.length&&v[W]==d;W++);if(W==v.length)break;N(W);continue}for(var z=Math.max(W-(f-(f>>
1982)),T-1);W>z&&v[W]<g;)W--;if(I){for(;W>z&&v[W]<g;)W--;for(;W>z&&v[W]==b;)W--}else for(;W>z&&v[W]<L;)W--;if(W>z){N(++W);continue}W=T+f,v[W]==m&&W--,N(W-F)}return p},w.prototype.$getDisplayTokens=function(v,f){var u=[],p;f=f||0;for(var M=0;M<v.length;M++){var T=v.charCodeAt(M);if(T==9){p=this.getScreenTabSize(u.length+f),u.push($);for(var R=1;R<p;R++)u.push(S)}else T==32?u.push(L):T>39&&T<48||T>57&&T<64?u.push(b):T>=4352&&_(T)?u.push(y,m):u.push(y)}return u},w.prototype.$getStringScreenWidth=function(v,f,u){if(f==0)return[0,0];f==null&&(f=1/0),u=u||0;var p,M;for(M=0;M<v.length&&(p=v.charCodeAt(M),p==9?u+=this.getScreenTabSize(u):p>=4352&&_(p)?u+=2:u+=1,!(u>f));M++);return[u,M]},w.prototype.getRowLength=function(v){var f=1;return this.lineWidgets&&(f+=this.lineWidgets[v]&&this.lineWidgets[v].rowCount||0),!this.$useWrapMode||!this.$wrapData[v]?f:this.$wrapData[v].length+f},w.prototype.getRowLineCount=function(v){return!this.$useWrapMode||!this.$wrapData[v]?1:this.$wrapData[v].length+1},w.prototype.getRowWrapIndent=function(v){if(this.$useWrapMode){var f=this.screenToDocumentPosition(v,Number.MAX_VALUE),u=this.$wrapData[f.row];return u.length&&u[0]<f.column?u.indent:0}else return 0},w.prototype.getScreenLastRowColumn=function(v){var f=this.screenToDocumentPosition(v,Number.MAX_VALUE);return this.documentToScreenColumn(f.row,f.column)},w.prototype.getDocumentLastRowColumn=function(v,f){var u=this.documentToScreenRow(v,f);return this.getScreenLastRowColumn(u)},w.prototype.getDocumentLastRowColumnPosition=function(v,f){var u=this.documentToScreenRow(v,f);return this.screenToDocumentPosition(u,Number.MAX_VALUE/10)},w.prototype.getRowSplitData=function(v){if(this.$useWrapMode)return this.$wrapData[v]},w.prototype.getScreenTabSize=function(v){return this.$tabSize-(v%this.$tabSize|0)},w.prototype.screenToDocumentRow=function(v,f){return this.screenToDocumentPosition(v,f).row},w.prototype.screenToDocumentColumn=function(v,f){return this.screenToDocumentPosition(v,f).column},w.prototype.screenToDocumentPosition=function(v,f,u){if(v<0)return{row:0,column:0};var p,M=0,T=0,R,I=0,D=0,H=this.$screenRowCache,O=this.$getRowCacheIndex(H,v),N=H.length;if(N&&O>=0)var I=H[O],M=this.$docRowCache[O],F=v>H[N-1];else var F=!N;for(var W=this.getLength()-1,z=this.getNextFoldLine(M),P=z?z.start.row:1/0;I<=v&&(D=this.getRowLength(M),!(I+D>v||M>=W));)I+=D,M++,M>P&&(M=z.end.row+1,z=this.getNextFoldLine(M,z),P=z?z.start.row:1/0),F&&(this.$docRowCache.push(M),this.$screenRowCache.push(I));if(z&&z.start.row<=M)p=this.getFoldDisplayLine(z),M=z.start.row;else{if(I+D<=v||M>W)return{row:W,column:this.getLine(W).length};p=this.getLine(M),z=null}var U=0,j=Math.floor(v-I);if(this.$useWrapMode){var V=this.$wrapData[M];V&&(R=V[j],j>0&&V.length&&(U=V.indent,T=V[j-1]||V[V.length-1],p=p.substring(T)))}return u!==void 0&&this.$bidiHandler.isBidiRow(I+j,M,j)&&(f=this.$bidiHandler.offsetToCol(u)),T+=this.$getStringScreenWidth(p,f-U)[1],this.$useWrapMode&&T>=R&&(T=R-1),z?z.idxToPosition(T):{row:M,column:T}},w.prototype.documentToScreenPosition=function(v,f){if(typeof f>"u")var u=this.$clipPositionToDocument(v.row,v.column);else u=this.$clipPositionToDocument(v,f);v=u.row,f=u.column;var p=0,M=null,T=null;T=this.getFoldAt(v,f,1),T&&(v=T.start.row,f=T.start.column);var R,I=0,D=this.$docRowCache,H=this.$getRowCacheIndex(D,v),O=D.length;if(O&&H>=0)var I=D[H],p=this.$screenRowCache[H],N=v>D[O-1];else var N=!O;for(var F=this.getNextFoldLine(I),W=F?F.start.row:1/0;I<v;){if(I>=W){if(R=F.end.row+1,R>v)break;F=this.getNextFoldLine(R,F),W=F?F.start.row:1/0}else R=I+1;p+=this.getRowLength(I),I=R,N&&(this.$docRowCache.push(I),this.$screenRowCache.push(p))}var z="";F&&I>=W?(z=this.getFoldDisplayLine(F,v,f),M=F.start.row):(z=this.getLine(v).substring(0,f),M=v);var P=0;if(this.$useWrapMode){var U=this.$wrapData[M];if(U){for(var j=0;z.length>=U[j];)p++,j++;z=z.substring(U[j-1]||0,z.length),P=j>0?U.indent:0}}return this.lineWidgets&&this.lineWidgets[I]&&this.lineWidgets[I].rowsAbove&&(p+=this.lineWidgets[I].rowsAbove),{row:p,column:P+this.$getStringScreenWidth(z)[0]}},w.prototype.documentToScreenColumn=function(v,f){return this.documentToScreenPosition(v,f).column},w.prototype.documentToScreenRow=function(v,f){return this.documentToScreenPosition(v,f).row},w.prototype.getScreenLength=function(){var v=0,f=null;if(this.$useWrapMode)for(var M=this.$wrapData.length,T=0,p=0,f=this.$foldData[p++],R=f?f.start.row:1/0;T<M;){var I=this.$wrapData[T];v+=I?I.length+1:1,T++,T>R&&(T=f.end.row+1,f=this.$foldData[p++],R=f?f.start.row:1/0)}else{v=this.getLength();for(var u=this.$foldData,p=0;p<u.length;p++)f=u[p],v-=f.end.row-f.start.row}return this.lineWidgets&&(v+=this.$getWidgetScreenLength()),v},w.prototype.$setFontMetrics=function(v){this.$enableVarChar&&(this.$getStringScreenWidth=function(f,u,p){if(u===0)return[0,0];
198u||(u=1/0),p=p||0;var M,T;for(T=0;T<f.length&&(M=f.charAt(T),M===" "?p+=this.getScreenTabSize(p):p+=v.getCharacterWidth(M),!(p>u));T++);return[p,T]})},w.prototype.getPrecedingCharacter=function(){var v=this.selection.getCursor();if(v.column===0)return v.row===0?"":this.doc.getNewLineCharacter();var f=this.getLine(v.row);return f[v.column-1]},w.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},w}();c.$uid=0,c.prototype.$modes=a.$modes,c.prototype.getValue=c.prototype.toString,c.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},c.prototype.$overwrite=!1,c.prototype.$mode=null,c.prototype.$modeId=null,c.prototype.$scrollTop=0,c.prototype.$scrollLeft=0,c.prototype.$wrapLimit=80,c.prototype.$useWrapMode=!1,c.prototype.$wrapLimitRange={min:null,max:null},c.prototype.lineWidgets=null,c.prototype.isFullWidth=_,k.implement(c.prototype,h);var y=1,m=2,g=3,d=4,b=9,L=10,$=11,S=12;function _(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(c.prototype),E("./edit_session/bracket_match").BracketMatch.call(c.prototype),a.defineOptions(c.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 v=typeof w=="number"?w:null;this.setWrapLimitRange(v,v),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=c}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(E,x,B){var k=E("./lib/lang"),A=E("./lib/oop"),C=E("./range").Range,a=function(){function n(){this.$options={}}return n.prototype.set=function(i){return A.mixin(this.$options,i),this},n.prototype.getOptions=function(){return k.copyObject(this.$options)},n.prototype.setOptions=function(i){this.$options=i},n.prototype.find=function(i){var e=this.$options,t=this.$matchIterator(i,e);if(!t)return!1;var s=null;return t.forEach(function(l,c,y,m){return s=new C(l,c,y,m),c==m&&e.start&&e.start.start&&e.skipCurrent!=!1&&s.isEqual(e.start)?(s=null,!1):!0}),s},n.prototype.findAll=function(i){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var t=e.range,s=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),l=[],c=e.re;if(e.$isMultiLine){var y=c.length,m=s.length-y,g;e:for(var d=c.offset||0;d<=m;d++){for(var b=0;b<y;b++)if(s[d+b].search(c[b])==-1)continue e;var L=s[d],$=s[d+y-1],S=L.length-L.match(c[0])[0].length,_=$.match(c[y-1])[0].length;g&&g.end.row===d&&g.end.column>S||(l.push(g=new C(d,S,d+y-1,_)),y>2&&(d=d+y-2))}}else for(var w,v=0;v<s.length;v++)if(this.$isMultilineSearch(e)){var f=s.length-1;if(w=this.$multiLineForward(i,c,v,f),w){var u=w.endRow<=f?w.endRow-1:f;u>v&&(v=u),l.push(new C(w.startRow,w.startCol,w.endRow,w.endCol))}}else{w=k.getMatchOffsets(s[v],c);for(var b=0;b<w.length;b++){var p=w[b];l.push(new C(v,p.offset,v,p.offset+p.length))}}if(t){for(var M=t.start.column,T=t.end.column,v=0,b=l.length-1;v<b&&l[v].start.column<M&&l[v].start.row==0;)v++;for(var R=t.end.row-t.start.row;v<b&&l[b].end.column>T&&l[b].end.row==R;)b--;for(l=l.slice(v,b+1),v=0,b=l.length;v<b;v++)l[v].start.row+=t.start.row,l[v].end.row+=t.start.row}return l},n.prototype.parseReplaceString=function(i){for(var e={DollarSign:36,Ampersand:38,Digit0:48,Digit1:49,Digit9:57,Backslash:92,n:110,t:116},t="",s=0,l=i.length;s<l;s++){var c=i.charCodeAt(s);if(c===e.Backslash){if(s++,s>=l){t+="\\";break}var y=i.charCodeAt(s);switch(y){case e.Backslash:t+="\\";break;case e.n:t+=` 199`;break;case e.t:t+=" ";break}continue}if(c===e.DollarSign){if(s++,s>=l){t+="$";break}var m=i.charCodeAt(s);if(m===e.DollarSign){t+="$$";continue}if(m===e.Digit0||m===e.Ampersand){t+="$&";continue}if(e.Digit1<=m&&m<=e.Digit9){t+="$"+i[s];continue}}t+=i[s]}return t||i},n.prototype.replace=function(i,e){var t=this.$options,s=this.$assembleRegExp(t);if(t.$isMultiLine)return e;if(s){var l=this.$isMultilineSearch(t);l&&(i=i.replace(/\r\n|\r|\n/g,` 200`));var c=s.exec(i);if(!c||!l&&c[0].length!=i.length)return null;if(e=t.regExp?this.parseReplaceString(e):e.replace(/\$/g,"$$$$"),e=i.replace(s,e),t.preserveCase){e=e.split("");for(var y=Math.min(i.length,i.length);y--;){var m=i[y];m&&m.toLowerCase()!=m?e[y]=e[y].toUpperCase():e[y]=e[y].toLowerCase()}e=e.join("")}return e}},n.prototype.$assembleRegExp=function(i,e){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 s=i.caseSensitive?"gm":"gmi";
200try{new RegExp(t,"u"),i.$supportsUnicodeFlag=!0,s+="u"}catch{i.$supportsUnicodeFlag=!1}if(i.wholeWord&&(t=h(t,i)),i.$isMultiLine=!e&&/[\n\r]/.test(t),i.$isMultiLine)return i.re=this.$assembleMultilineRegExp(t,s);try{var l=new RegExp(t,s)}catch{l=!1}return i.re=l},n.prototype.$assembleMultilineRegExp=function(i,e){for(var t=i.replace(/\r\n|\r|\n/g,`$ 201^`).split(` 202`),s=[],l=0;l<t.length;l++)try{s.push(new RegExp(t[l],e))}catch{return!1}return s},n.prototype.$isMultilineSearch=function(i){return i.re&&/\\r\\n|\\r|\\n/.test(i.re.source)&&i.regExp&&!i.$isMultiLine},n.prototype.$multiLineForward=function(i,e,t,s){for(var l,c=o(i,t),y=t;y<=s;){for(var m=0;m<c&&!(y>s);m++){var g=i.getLine(y++);l=l==null?g:l+` 203`+g}var d=e.exec(l);if(e.lastIndex=0,d){var b=l.slice(0,d.index).split(` 204`),L=d[0].split(` 205`),$=t+b.length-1,S=b[b.length-1].length,_=$+L.length-1,w=L.length==1?S+L[0].length:L[L.length-1].length;return{startRow:$,startCol:S,endRow:_,endCol:w}}}return null},n.prototype.$multiLineBackward=function(i,e,t,s,l){for(var c,y=o(i,s),m=i.getLine(s).length-t,g=s;g>=l;){for(var d=0;d<y&&g>=l;d++){var b=i.getLine(g--);c=c==null?b:b+` 206`+c}var L=r(c,e,m);if(L){var $=c.slice(0,L.index).split(` 207`),S=L[0].split(` 208`),_=g+$.length,w=$[$.length-1].length,v=_+S.length-1,f=S.length==1?w+S[0].length:S[S.length-1].length;return{startRow:_,startCol:w,endRow:v,endCol:f}}}return null},n.prototype.$matchIterator=function(i,e){var t=this.$assembleRegExp(e);if(!t)return!1;var s=this.$isMultilineSearch(e),l=this.$multiLineForward,c=this.$multiLineBackward,y=e.backwards==!0,m=e.skipCurrent!=!1,g=t.unicode,d=e.range,b=e.start;b||(b=d?d[y?"end":"start"]:i.selection.getRange()),b.start&&(b=b[m!=y?"end":"start"]);var L=d?d.start.row:0,$=d?d.end.row:i.getLength()-1;if(y)var S=function(v){var f=b.row;if(!w(f,b.column,v)){for(f--;f>=L;f--)if(w(f,Number.MAX_VALUE,v))return;if(e.wrap!=!1){for(f=$,L=b.row;f>=L;f--)if(w(f,Number.MAX_VALUE,v))return}}};else var S=function(f){var u=b.row;if(!w(u,b.column,f)){for(u=u+1;u<=$;u++)if(w(u,0,f))return;if(e.wrap!=!1){for(u=L,$=b.row;u<=$;u++)if(w(u,0,f))return}}};if(e.$isMultiLine)var _=t.length,w=function(v,f,u){var p=y?v-_+1:v;if(!(p<0||p+_>i.getLength())){var M=i.getLine(p),T=M.search(t[0]);if(!(!y&&T<f||T===-1)){for(var R=1;R<_;R++)if(M=i.getLine(p+R),M.search(t[R])==-1)return;var I=M.match(t[_-1])[0].length;if(!(y&&I>f)&&u(p,T,p+_-1,I))return!0}}};else if(y)var w=function(f,u,p){if(s){var M=c(i,t,u,f,L);if(!M)return!1;if(p(M.startRow,M.startCol,M.endRow,M.endCol))return!0}else{var T=i.getLine(f),R=[],I,D=0;for(t.lastIndex=0;I=t.exec(T);){var H=I[0].length;if(D=I.index,!H){if(D>=T.length)break;t.lastIndex=D+=k.skipEmptyMatch(T,D,g)}if(I.index+H>u)break;R.push(I.index,H)}for(var O=R.length-1;O>=0;O-=2){var N=R[O-1],H=R[O];if(p(f,N,f,N+H))return!0}}};else var w=function(f,u,p){if(t.lastIndex=u,s){var M=l(i,t,f,$);if(M){var T=M.endRow<=$?M.endRow-1:$;T>f&&(f=T)}if(!M)return!1;if(p(M.startRow,M.startCol,M.endRow,M.endCol))return!0}else for(var R=i.getLine(f),I,D;D=t.exec(R);){var H=D[0].length;if(I=D.index,p(f,I,f,I+H))return!0;if(!H&&(t.lastIndex=I+=k.skipEmptyMatch(R,I,g),I>=R.length))return!1}};return{forEach:S}},n}();function h(n,i){var e=k.supportsLookbehind();function t(y,m){m===void 0&&(m=!0);var g=e&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return g.test(y)||i.regExp?e&&i.$supportsUnicodeFlag?m?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var s=Array.from(n),l=s[0],c=s[s.length-1];return t(l)+n+t(c,!1)}function r(n,i,e){for(var t=null,s=0;s<=n.length;){i.lastIndex=s;var l=i.exec(n);if(!l)break;var c=l.index+l[0].length;if(c>n.length-e)break;(!t||c>t.index+t[0].length)&&(t=l),s=l.index+1}return t}function o(n,i){var e=5e3,t={row:i,column:0},s=n.doc.positionToIndex(t),l=s+e,c=n.doc.indexToPosition(l),y=c.row;return y+1}x.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,B){var k=this&&this.__extends||function(){var n=function(i,e){return n=Object.
208setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(t[l]=s[l])},n(i,e)};return function(i,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}(),A=E("../lib/keys"),C=E("../lib/useragent"),a=A.KEY_MODS,h=function(){function n(i,e){this.$init(i,e,!1)}return n.prototype.$init=function(i,e,t){this.platform=e||(C.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(i),this.$singleCommand=t},n.prototype.addCommand=function(i){this.commands[i.name]&&this.removeCommand(i),this.commands[i.name]=i,i.bindKey&&this._buildKeyHash(i)},n.prototype.removeCommand=function(i,e){var t=i&&(typeof i=="string"?i:i.name);i=this.commands[t],e||delete this.commands[t];var s=this.commandKeyBinding;for(var l in s){var c=s[l];if(c==i)delete s[l];else if(Array.isArray(c)){var y=c.indexOf(i);y!=-1&&(c.splice(y,1),c.length==1&&(s[l]=c[0]))}}},n.prototype.bindKey=function(i,e,t){if(typeof i=="object"&&i&&(t==null&&(t=i.position),i=i[this.platform]),!!i){if(typeof e=="function")return this.addCommand({exec:e,bindKey:i,name:e.name||i});i.split("|").forEach(function(s){var l="";if(s.indexOf(" ")!=-1){var c=s.split(/\s+/);s=c.pop(),c.forEach(function(g){var d=this.parseKeys(g),b=a[d.hashId]+d.key;l+=(l?" ":"")+b,this._addCommandToBinding(l,"chainKeys")},this),l+=" "}var y=this.parseKeys(s),m=a[y.hashId]+y.key;this._addCommandToBinding(l+m,e,t)},this)}},n.prototype._addCommandToBinding=function(i,e,t){var s=this.commandKeyBinding,l;if(!e)delete s[i];else if(!s[i]||this.$singleCommand)s[i]=e;else{Array.isArray(s[i])?(l=s[i].indexOf(e))!=-1&&s[i].splice(l,1):s[i]=[s[i]],typeof t!="number"&&(t=r(e));var c=s[i];for(l=0;l<c.length;l++){var y=c[l],m=r(y);if(m>t)break}c.splice(l,0,e)}}
208,n.prototype.addCommands=function(i){i&&Object.keys(i).forEach(function(e){var t=i[e];if(t){if(typeof t=="string")return this.bindKey(t,e);typeof t=="function"&&(t={exec:t}),typeof t=="object"&&(t.name||(t.name=e),this.addCommand(t))}},this)},n.prototype.removeCommands=function(i){Object.keys(i).forEach(function(e){this.removeCommand(i[e])},this)},n.prototype.bindKeys=function(i){Object.keys(i).forEach(function(e){this.bindKey(e,i[e])},this)},n.prototype._buildKeyHash=function(i){this.bindKey(i.bindKey,i)},n.prototype.parseKeys=function(i){var e=i.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),t=e.pop(),s=A[t];if(A.FUNCTION_KEYS[s])t=A.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:t.toUpperCase(),hashId:-1}}else return{key:t,hashId:-1};for(var l=0,c=e.length;c--;){var y=A.KEY_MODS[e[c]];if(y==null)return typeof console<"u"&&console.error("invalid modifier "+e[c]+" in "+i),!1;l|=y}return{key:t,hashId:l}},n.prototype.findKeyCommand=function(i,e){var t=a[i]+e;return this.commandKeyBinding[t]},n.prototype.handleKeyboard=function(i,e,t,s){if(!(s<0)){var l=a[e]+t,c=this.commandKeyBinding[l];return i.$keyChain&&(i.$keyChain+=" "+l,c=this.commandKeyBinding[i.$keyChain]||c),c&&(c=="chainKeys"||c[c.length-1]=="chainKeys")?(i.$keyChain=i.$keyChain||l,{command:"null"}):(i.$keyChain&&((!e||e==4)&&t.length==1?i.$keyChain=i.$keyChain.slice(0,-l.length-1):(e==-1||s>0)&&(i.$keyChain="")),{command:c})}},n.prototype.getStatusText=function(i,e){return e.$keyChain||""},n}();function r(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var o=function(n){k(i,n);function i(e,t){var s=n.call(this,e,t)||this;return s.$singleCommand=!0,s}return i}(h);o.call=function(n,i,e){h.prototype.$init.call(n,i,e,!0)},h.call=function(n,i,e){h.prototype.$init.call(n,i,e,!1)},x.HashHandler=o,x.MultiHashHandler=h}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(E,x,B){var k=this&&this.__extends||function(){var r=function(o,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,e){i.__proto__=e}||function(i,e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])},r(o,n)};return function(o,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");r(o,n);function i(){this.constructor=o}o.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)}}(),A=E("../lib/oop"),C=E("../keyboard/hash_handler").MultiHashHandler,a=E("../lib/event_emitter").EventEmitter,h=function(r){k(o,r);function o(n,i){var e=r.call(this,i,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(t){return t.args?t.command.exec(t.editor,t.args,t.event,!1):t.command.exec(t.editor,{},t.event,!0)}),e}return o.prototype.exec=function(n,i,e){if(Array.isArray(n)){for(var t=n.length;t--;)if(this.exec(n[t],i,e))return!0;return!1}typeof n=="string"&&(n=this.commands[n]);var s={editor:i,command:n,args:e};return this.canExecute(n,i)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1):(this._signal("commandUnavailable",s),!1)},o.prototype.canExecute=function(n,i){return typeof n=="string"&&(n=this.commands[n]),!(!n||i&&i.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(i))},o.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(i){this.macro.push([i.command,i.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},o.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(i){typeof i=="string"?this.exec(i,n):this.exec(i[0],n,i[1])},this)}finally{this.$inReplay=!1}}},o.prototype.trimMacro=function(n){return n.map(function(i){return typeof i[0]!="str
208ing"&&(i[0]=i[0].name),i[1]||(i=i[0]),i})},o}(C);A.implement(h.prototype,a),x.CommandManager=h}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(E,x,B){var k=E("../lib/lang"),A=E("../config"),C=E("../range").Range;function a(r,o){return{win:r,mac:o}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(r){A.loadModule("ace/ext/settings_menu",function(o){o.init(r),r.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(r){A.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(r){A.loadModule("ace/ext/error_marker",function(o){o.showErrorMarker(r,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(r){r.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(r){r.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(r,o){typeof o=="number"&&!isNaN(o)&&r.gotoLine(o),r.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(r){r.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(r){r.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(r){r.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(r){r.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(r){r.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(r){r.session.foldAll(),r.session.unfold(r.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(r){r.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(r){r.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(r){r.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(r){r.selection.isEmpty()?r.selection.selectWord():r.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(r){A.loadModule("ace/ext/searchbox",function(o){o.Search(r)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(r){r.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(r){r.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(r){r.navigateFileStart()}
208,multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(r){r.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(r,o){r.navigateUp(o.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(r){r.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(r){r.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(r){r.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(r,o){r.navigateDown(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(r){r.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(r){r.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(r){r.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(r){r.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(r){r.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(r,o){r.navigateLeft(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(r){r.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(r){r.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(r){r.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(r){r.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(r){r.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(r,o){r.navigateRight(o.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(r){r.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(r){r.scrollPageDown()},readOnly:!0}
vendor: 4,495 bytes, line 208
208,{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(r){r.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(r){r.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(r){r.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(r){r.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(r){r.renderer.scrollBy(0,-2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(r){r.renderer.scrollBy(0,2*r.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(r){r.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(r){r.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(r){r.commands.toggleRecording(r)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(r){r.commands.replay(r)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(r){r.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(r){r.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(r){r.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(r){},readOnly:!0},{name:"cut",description:"Cut",exec:function(r){var o=r.$copyWithEmptySelection&&r.selection.isEmpty(),n=o?r.selection.getLineRange():r.selection.getRange();r._emit("cut",n),n.isEmpty()||r.session.remove(n),r.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(r,o){r.$handlePaste(o)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(r){r.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(r){r.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(r){r.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(r){r.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(r){r.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(r){r.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(r){r.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(r){A.loadModule("ace/ext/searchbox",function(o){o.Search(r,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(r){r.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(r){r.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(r){r.copyLine
208sUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(r){r.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(r){r.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(r){r.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(r){r.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(r){r.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(r){if(r.selection.isEmpty())r.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(r){r.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(r){r.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(r){var o=r.selection.getRange();o.start.column=0,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(r){var o=r.selection.getRange();o.end.column=Number.MAX_VALUE,r.session.remove(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(r){r.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(r){r.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(r){r.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(r){r.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(r){r.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(r){r.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(r,o){r.insert(o)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(r,o){r.insert(k.stringRepeat(o.text||"",o.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(r){r.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(r){r.transposeLetters()},multiSelectAction:function(r){r.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(r){r.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(r){r.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(r){r.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(r){var o=r.selection.getRange();o.start.column=o.end.column=0,o.end.row++,r.selection.setRange(o,!1)}
208,multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(r){r.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(r){for(var o=r.selection.isBackwards(),n=o?r.selection.getSelectionLead():r.selection.getSelectionAnchor(),i=o?r.selection.getSelectionAnchor():r.selection.getSelectionLead(),e=r.session.doc.getLine(n.row).length,t=r.session.doc.getTextRange(r.selection.getRange()),s=t.replace(/\n\s*/," ").length,l=r.session.doc.getLine(n.row),c=n.row+1;c<=i.row+1;c++){var y=k.stringTrimLeft(k.stringTrimRight(r.session.doc.getLine(c)));y.length!==0&&(y=" "+y),l+=y}i.row+1<r.session.doc.getLength()-1&&(l+=r.session.doc.getNewLineCharacter()),r.clearSelection(),r.session.doc.replace(new C(n.row,0,i.row+2,0),l),s>0?(r.selection.moveCursorTo(n.row,n.column),r.selection.selectTo(n.row,n.column+s)):(e=r.session.doc.getLine(n.row).length>e?e+1:e,r.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(r){var o=r.session.doc.getLength()-1,n=r.session.doc.getLine(o).length,i=r.selection.rangeList.ranges,e=[];i.length<1&&(i=[r.selection.getRange()]);for(var t=0;t<i.length;t++)t==i.length-1&&(i[t].end.row===o&&i[t].end.column===n||e.push(new C(i[t].end.row,i[t].end.column,o,n))),t===0?i[t].start.row===0&&i[t].start.column===0||e.push(new C(0,0,i[t].start.row,i[t].start.column)):e.push(new C(i[t-1].end.row,i[t-1].end.column,i[t].start.row,i[t].start.column));r.exitMultiSelectMode(),r.clearSelection();for(var t=0;t<e.length;t++)r.selection.addRange(e[t],!1)},readOnly:!0,scrollIntoView:"none"},{name:"addLineAfter",description:"Add new line after the current line",exec:function(r){r.selection.clearSelection(),r.navigateLineEnd(),r.insert(` 209`)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"addLineBefore",description:"Add new line before the current line",exec:function(r){r.selection.clearSelection();var o=r.getCursorPosition();r.selection.moveTo(o.row-1,Number.MAX_VALUE),r.insert(` 210`),o.row===0&&r.navigateUp()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"openCommandPallete",exec:function(r){console.warn("This is an obsolete command. Please use `openCommandPalette` instead."),r.prompt({$type:"commands"})},readOnly:!0},{name:"openCommandPalette",description:"Open command palette",bindKey:a("F1","F1"),exec:function(r){r.prompt({$type:"commands"})},readOnly:!0},{name:"modeSelect",description:"Change language mode...",bindKey:a(null,null),exec:function(r){r.prompt({$type:"modes"})},readOnly:!0}];for(var h=1;h<9;h++)x.commands.push({name:"foldToLevel"+h,description:"Fold To Level "+h,level:h,exec:function(r){r.session.foldToLevel(this.level)},scrollIntoView:"center",readOnly:!0})}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys"],function(E,x,B){var k=E("../lib/keys"),A=function(){function a(h){this.editor=h,this.gutterLayer=h.renderer.$gutterLayer,this.element=h.renderer.$gutter,this.lines=h.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=this.editor.$mouseHandler.$tooltip}return a.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))},a.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))},a.prototype.$onGutterKeyDown=function(h){if(this.annotationTooltip.isOpen){h.preventDefault(),h.keyCode===k.escape&&this.annotationTooltip.hide();return}if(h.target===this.element){if(h.keyCode!=k.enter)return;h.preventDefault();var r=this.editor.getCursorPosition().row;this.editor.isRowVisible(r)||this.editor.scrollToLine(r,!0,!0),setTimeout((function(){var o=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),n=this.$findNearestFoldLaneWidget(o),i=this.$findNearestAnnotation(o);if(!(n===null&&i===null)){var e=this.$findClosestNumber(n,i,o);if(e===n)if(this.activeLane="fold",this.activeRowIndex=n,this.$isCustomWidgetVisible(n)){this.$focusCustomWidget(this.activeRowIndex);return}else{this.$focusFoldWidget(this.activeRowIndex);return}else{this.activeRowIndex=i,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}}}).bind(this),10);return}this.$handleGutterKeyboardInteraction(h),setTimeout((function(){this.editor._signal("gutterkeydown",new C(h,this))}).bind(this),10)},a.prototype.$handleGutterKeyboardInteraction=function(h){if(h.keyCode===k.tab){h.preventDefault();return}if(h.keyCode===k.escape){h.preventDefault(),this.$blurGutter(),this.element.focus(),this.lane=null;return}if(h.keyCode===k.up){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetUp();break;case"annotation":this.$moveAnnotationUp();break}return}if(h.keyCode===k.down){switch(h.preventDefault(),this.activeLane){case"fold":this.$moveFoldWidgetDown();break;case"annotation":this.$moveAnnotationDown();break}return}if(h.keyCode===k.left){h.preventDefault(),this.$switchLane("annotation");return}if(h.keyCode===k.right){h.preventDefault(),this.$switchLane("fold");return}if(h.keyCode===k.enter||h.keyCode===k.space){switch(h.preventDefault(),this.activeLane){case"fold":var r=this.$rowIndexToRow(this.activeRowIndex),o=this.editor.session.$gutterCustomWidgets[r];if(o)o.callbacks&&o.callbacks.onClick&&o.callbacks.onClick(h,r);else if(this.gutterLayer.session.foldWidgets[r]==="start"){this.editor.session.onFoldWidgetClick(this.$rowIndexToRow(this.activeRowIndex),h),setTimeout((function(){this.$rowIndexToRow(this.activeRowIndex)!==r&&(this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=this.$rowToRowIndex(r),this.$focusFoldWidget(this.activeRowIndex))}).bind(this),10);break}else if(this.gutterLayer.session.foldWidgets[this.$rowIndexToRow(this.activeRowIndex)]==="end")break;return;case"annotation":this.annotationTooltip.showTooltip(this.$rowIndexToRow(this.activeRowIndex)),this.annotationTooltip.$fromKeyboard=!0;break}return}},a.prototype.$blurGutter=function(){if(this.activeRowIndex!==null)switch(this.activeLane){case"fold":this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex);break;case"annotation":this.$blurAnnotation(this.activeRowIndex);break}this.annotationTooltip.isOpen&&this.annotationTooltip.hide()},a.prototype.$isFoldWidgetVisible=function(h){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),o=this.$getFoldWidget(h).style.display!=="none";return r&&o},a.prototype.$isCustomWidgetVisible=function(h){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),o=!!this.$getCustomWidget(h);return r&&o},a.prototype.$isAnnotationVisible=function(h){var r=this.editor.isRowFullyVisible(this.$rowIndexToRow(h)),o=this.$getAnnotation(h).style.display!=="none";return r&&o},a.prototype.$getFoldWidget=function(h){var r=this.lines.get(h),o=r.element;return o.childNodes[1]},a.prototype.$getCustomWidget=function(h){var r=this.lines.get(h),o=r.element;return o.childNodes[3]},a.prototype.$getAnnotation=function(h){var r=this.lines.get(h),o=r.element;return o.childNodes[2]},a.prototype.$findNearestFoldLaneWidget=function(h){if(this.$isCustomWidgetVisible(h)||this.$isFoldWidgetVisible(h))return h;for(var r=0;h-r>0||h+r<this.lines.getLength()-1;){if(r++,h-r>=0&&this.$isCustomWidgetVisible(h-r))return h-r;if(h+r<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(h+r))return h+r;if(h-r>=0&&this.$isFoldWidgetVisible(h-r))return h-r;if(h+r<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(h+r))return h+r}return null},a.prototype.$findNearestAnnotation=function(h){if(this.$isAnnotationVisible(h))return h;for(var r=0;h-r>0||h+r<this.lines.getLength()-1;){if(r++,h-r>=0&&this.$isAnnotationVisible(h-r))return h-r;if(h+r<=this.lines.getLength()-1&&this.$isAnnotationVisible(h+r))return h+r}return null},a.prototype.$focusFoldWidget=function(h){if(h!=null){var r=this.$getFoldWidget(h);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$focusCustomWidget=function(h){if(h!=null){var r=this.$getCustomWidget(h);r&&(r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus())}},a.prototype.$focusAnnotation=function(h){if(h!=null){var r=this.$getAnnotation(h);r.classList.add(this.editor.renderer.keyboardFocusClassName),r.focus()}},a.prototype.$blurFoldWidget=function(h){var r=this.$getFoldWidget(h);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$blurCustomWidget=function(h){var r=this.$getCustomWidget(h);r&&(r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur())},a.prototype.$blurAnnotation=function(h){var r=this.$getAnnotation(h);r.classList.remove(this.editor.renderer.keyboardFocusClassName),r.blur()},a.prototype.$moveFoldWidgetUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isFoldWidgetVisible(h)||this.$isCustomWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$isFoldWidgetVisible(h)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveFoldWidgetDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isFoldWidgetVisible(h)||this.$isCustomWidgetVisible(h)){this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=h,this.$isFoldWidgetVisible(h)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex);return}},a.prototype.$moveAnnotationUp=function(){for(var h=this.activeRowIndex;h>0;)if(h--,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$moveAnnotationDown=function(){for(var h=this.activeRowIndex;h<this.lines.getLength()-1;)if(h++,this.$isAnnotationVisible(h)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=h,this.$focusAnnotation(this.activeRowIndex);return}},a.prototype.$findClosestNumber=function(h,r,o){return h===null?r:r===null||Math.abs(o-h)<=Math.abs(o-r)?h:r},a.prototype.$switchLane=function(h){switch(h){case"annotation":if(this.activeLane==="annotation")break;var r=this.$findNearestAnnotation(this.activeRowIndex);if(r==null)break;this.activeLane="annotation",this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=r,this.$focusAnnotation(this.activeRowIndex);break;case"fold":if(this.activeLane==="fold")break;var o=this.$findNearestFoldLaneWidget(this.activeRowIndex);if(o===null)break;this.activeLane="fold",this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$isCustomWidgetVisible(o)?this.$focusCustomWidget(this.activeRowIndex):this.$focusFoldWidget(this.activeRowIndex);break}},a.prototype.$rowIndexToRow=function(h){var r=this.lines.get(h);return r?r.row:null},a.prototype.$rowToRowIndex=function(h){for(var r=0;r<this.lines.getLength();r++){var o=this.lines.get(r);if(o.row==h)return r}return null},a}();x.GutterKeyboardHandler=A;var C=function(){function a(h,r){this.gutterKeyboardHandler=r,this.domEvent=h}return a.prototype.getKey=function(){return k.keyCodeToString(this.domEvent.keyCode)},a.prototype.getRow=function(){return this.gutterKeyboardHandler.$rowIndexToRow(this.gutterKeyboardHandler.activeRowIndex)},a.prototype.isInAnnotationLane=function(){return this.gutterKeyboardHandler.activeLane==="annotation"},a.prototype.isInFoldLane=function(){return this.gutterKeyboardHandler.activeLane==="fold"},a}();x.GutterKeyboardEvent=C}),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/keyboard/gutter_handler","ace/config","ace/clipboard","ace/lib/keys","ace/lib/event","ace/tooltip"],function(E,x,B){var k=this&&this.__values||function(f){var u=typeof Symbol=="function"&&Symbol.iterator,p=u&&f[u],M=0;if(p)return p.call(f);if(f&&typeof f.length=="number")return{next:function(){return f&&M>=f.length&&(f=void 0),{value:f&&f[M++],done:!f}}};throw new TypeError(u?"Object is not iterable.":"Symbol.iterator is not defined.")},A=E("./lib/oop"),C=E("./lib/dom"),a=E("./lib/lang"),h=E("./lib/useragent"),r=E("./keyboard/textinput").TextInput,o=E("./mouse/mouse_handler").MouseHandler,n=E("./mouse/fold_handler").FoldHandler,i=E("./keyboard/keybinding").KeyBinding,e=E("./edit_session").EditSession,t=E("./search").Search,s=E("./range").Range,l=E("./lib/event_emitter").EventEmitter,c=E("./commands/command_manager").CommandManager,y=E("./commands/default_commands").commands,m=E("./config"),g=E("./token_iterator").TokenIterator,d=E("./keyboard/gutter_handler").GutterKeyboardHandler,b=E("./config").nls,L=E("./cl
210ipboard"),$=E("./lib/keys"),S=E("./lib/event"),_=E("./tooltip").HoverTooltip,w=function(){function f(u,p,M){this.id="editor"+ ++f.$uid,this.session,this.$toDestroy=[];var T=u.getContainerElement();this.container=T,this.renderer=u,this.commands=new c(h.isMac?"mac":"win",y),typeof document=="object"&&(this.textInput=new r(u.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new o(this),new n(this)),this.keyBinding=new i(this),this.$search=new t().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,I){I._$emitInputEvent.schedule(31)}),this.setSession(p||M&&M.session||new e("")),m.resetOptions(this),M&&this.setOptions(M),m._signal("editor",this)}return f.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},f.prototype.startOperation=function(u){this.session.startOperation(u)},f.prototype.endOperation=function(u){this.session.endOperation(u)},f.prototype.onStartOperation=function(u){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,u||(this.previousCommand=null)},f.prototype.onEndOperation=function(u){if(this.curOp&&this.session){if(u&&u.returnValue===!1){this.curOp=null;return}if(this._signal("beforeEndOperation"),!this.curOp)return;var p=this.curOp.command,M=p&&p.scrollIntoView;if(M){switch(M){case"center-animate":M="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var T=this.selection.getRange(),R=this.renderer.layerConfig;(T.start.row>=R.lastRow||T.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}M=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},f.prototype.$historyTracker=function(u){if(this.$mergeUndoDeltas){var p=this.prevOp,M=this.$mergeableCommands,T=p.command&&u.command.name==p.command.name;if(u.command.name=="insertstring"){var R=u.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),T=T&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(p.args)),this.mergeNextCommand=!0}else T=T&&M.indexOf(u.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(T=!1),T?this.session.mergeUndoDeltas=!0:M.indexOf(u.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},f.prototype.setKeyboardHandler=function(u,p){if(u&&typeof u=="string"&&u!="ace"){this.$keybindingId=u;var M=this;m.loadModule(["keybinding",u],function(T){M.$keybindingId==u&&M.keyBinding.setKeyboardHandler(T&&T.handler),p&&p()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(u),p&&p()},f.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},f.prototype.setSession=function(u){if(this.session!=u){this.curOp&&this.endOperation(),this.curOp={};var p=this.session;if(p){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("
210changeScrollLeft",this.$onScrollLeftChange),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var M=this.session.getSelection();M.off("changeCursor",this.$onCursorChange),M.off("changeSelection",this.$onSelectionChange)}this.session=u,u?(this.$onDocumentChange=this.onDocumentChange.bind(this),u.on("change",this.$onDocumentChange),this.renderer.setSession(u),this.$onChangeMode=this.onChangeMode.bind(this),u.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),u.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),u.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),u.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),u.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),u.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=u.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),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(u)),this._signal("changeSession",{session:u,oldSession:p}),this.curOp=null,p&&p._signal("changeEditor",{oldEditor:this}),p&&(p.$editor=null),u&&u._signal("changeEditor",{editor:this}),u&&(u.$editor=this),u&&!u.destroyed&&u.bgTokenizer.scheduleStart()}},f.prototype.getSession=function(){return this.session},f.prototype.setValue=function(u,p){return this.session.doc.setValue(u),p?p==1?this.navigateFileEnd():p==-1&&this.navigateFileStart():this.selectAll(),u},f.prototype.getValue=function(){return this.session.getValue()},f.prototype.getSelection=function(){return this.selection},f.prototype.resize=function(u){this.renderer.onResize(u)},f.prototype.setTheme=function(u,p){this.renderer.setTheme(u,p)},f.prototype.getTheme=function(){return this.renderer.getTheme()},f.prototype.setStyle=function(u,p){this.renderer.setStyle(u,p)},f.prototype.unsetStyle=function(u){this.renderer.unsetStyle(u)},f.prototype.getFontSize=function(){return this.getOption("fontSize")||C.computedStyle(this.container).fontSize},f.prototype.setFontSize=function(u){this.setOption("fontSize",u)},f.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var u=this;this.$highlightPending=!0,setTimeout(function(){u.$highlightPending=!1;var p=u.session;if(!(!p||p.destroyed)){p.$bracketHighlight&&(p.$bracketHighlight.markerIds.forEach(function(F){p.removeMarker(F)}),p.$bracketHighlight=null);var M=u.getCursorPosition(),T=u.getKeyboardHandler(),R=T&&T.$getDirectionForHighlight&&T.$getDirectionForHighlight(u),I=p.getMatchingBracketRanges(M,R);if(!I){var D=new g(p,M.row,M.column),H=D.getCurrentToken();if(H&&/\b(?:tag-open|tag-name)/.test(H.type)){var O=p.getMatchingTags(M);
210O&&(I=[O.openTagName.isEmpty()?O.openTag:O.openTagName,O.closeTagName.isEmpty()?O.closeTag:O.closeTagName])}}if(!I&&p.$mode.getMatching&&(I=p.$mode.getMatching(u.session)),!I){u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide();return}var N="ace_bracket";Array.isArray(I)?I.length==1&&(N="ace_error_bracket"):I=[I],I.length==2&&(s.comparePoints(I[0].end,I[1].start)==0?I=[s.fromPoints(I[0].start,I[1].end)]:s.comparePoints(I[0].start,I[1].end)==0&&(I=[s.fromPoints(I[1].start,I[0].end)])),p.$bracketHighlight={ranges:I,markerIds:I.map(function(F){return p.addMarker(F,N,"text")})},u.getHighlightIndentGuides()&&u.renderer.$textLayer.$highlightIndentGuide()}},50)}},f.prototype.focus=function(){this.textInput.focus()},f.prototype.isFocused=function(){return this.textInput.isFocused()},f.prototype.blur=function(){this.textInput.blur()},f.prototype.onFocus=function(u){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",u))},f.prototype.onBlur=function(u){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",u))},f.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},f.prototype.onDocumentChange=function(u){var p=this.session.$useWrapMode,M=u.start.row==u.end.row?u.end.row:1/0;this.renderer.updateLines(u.start.row,M,p),this._signal("change",u),this.$cursorChange()},f.prototype.onTokenizerUpdate=function(u){var p=u.data;this.renderer.updateLines(p.first,p.last)},f.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},f.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},f.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},f.prototype.$updateHighlightActiveLine=function(){var u=this.getSession(),p;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(p=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(p=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(p=!1)),u.$highlightLineMarker&&!p)u.removeMarker(u.$highlightLineMarker.id),u.$highlightLineMarker=null;else if(!u.$highlightLineMarker&&p){var M=new s(p.row,p.column,p.row,1/0);M.id=u.addMarker(M,"ace_active-line","screenLine"),u.$highlightLineMarker=M}else p&&(u.$highlightLineMarker.start.row=p.row,u.$highlightLineMarker.end.row=p.row,u.$highlightLineMarker.start.column=p.column,u._signal("changeBackMarker"))},f.prototype.onSelectionChange=function(u){var p=this.session;if(p.$selectionMarker&&p.removeMarker(p.$selectionMarker),p.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var M=this.selection.getRange(),T=this.getSelectionStyle();p.$selectionMarker=p.addMarker(M,"ace_selection",T)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},f.prototype.$getSelectionHighLightRegexp=function(){var u=this.session,p=this.getSelectionRange();if(!(p.isEmpty()||p.isMultiLine())){var M=p.start.column,T=p.end.column,R=u.getLine(p.start.row),I=R.substring(M,T);if(!(I.length>5e3||!/[\w\d]/.test(I))){var D=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:I}),H=R.substring(M-1,T+1);if(D.test(H))return D}}},f.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},f.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},f.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},f.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},f.prototype.onChangeMode=function(u){this.renderer.updateText(),this._emit("changeMode",u)},f.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},f.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},f.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},f.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},f.prototype.getCopyText=function(){var u=this.getSelectedText(),p=this.session.doc.getNewLineCharacter(),M=!1;if(!u&&this.$copyWithEmptySelection){M=!0;for(var T=this.selection.getAllRanges(),R=0;R<T.length;R++){var I=T[R];R&&T[R-1].start.row==I.start.row||(u+=this.session.getLine(I.start.row)+p)}}var D={text:u};return this._signal("copy",D),L.lineMode=M?D.text:!1,D.text},f.prototype.onCopy=function(){this.commands.exec("copy",this)},f.prototype.onCut=function(){this.commands.exec("cut",this)},f.prototype.onPaste=function(u,p){var M={text:u,event:p};this.commands.exec("paste",this,M)},f.prototype.$handlePaste=function(u){typeof u=="string"&&(u={text:u}),this._signal("paste",u);var p=u.text,M=p===L.lineMode,T=this.session;if(!this.inMultiSelectMode||this.inVirtualSelectionMode)M?T.insert({row:this.selection.lead.row,column:0},p):this.insert(p);
210else if(M)this.selection.rangeList.ranges.forEach(function(N){T.insert({row:N.start.row,column:0},p)});else{var R=p.split(/\r\n|\r|\n/),I=this.selection.rangeList.ranges,D=R.length==2&&(!R[0]||!R[1]);if(R.length!=I.length||D)return this.commands.exec("insertstring",this,p);for(var H=I.length;H--;){var O=I[H];O.isEmpty()||T.remove(O),T.insert(O.start,R[H])}}},f.prototype.execCommand=function(u,p){return this.commands.exec(u,this,p)},f.prototype.insert=function(u,p){var M=this.session,T=M.getMode(),R=this.getCursorPosition();if(this.getBehavioursEnabled()&&!p){var I=T.transformAction(M.getState(R.row),"insertion",this,M,u);I&&(u!==I.text&&(this.inVirtualSelectionMode||(this.session.mergeUndoDeltas=!1,this.mergeNextCommand=!1)),u=I.text)}if(u==" "&&(u=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()&&u.indexOf(` 211`)==-1){var D=s.fromPoints(R,R);D.end.column+=u.length,this.session.remove(D)}}else{var D=this.getSelectionRange();R=this.session.remove(D),this.clearSelection()}if(u==` 212`||u==`\r 213`){var F=M.getLine(R.row);if(R.column>F.search(/\S|$/)){var H=F.substr(R.column).search(/\S|$/);M.doc.removeInLine(R.row,R.column,R.column+H)}}this.clearSelection();var O=R.column,N=M.getState(R.row),F=M.getLine(R.row),W=T.checkOutdent(N,F,u);if(M.insert(R,u),I&&I.selection&&(I.selection.length==2?this.selection.setSelectionRange(new s(R.row,O+I.selection[0],R.row,O+I.selection[1])):this.selection.setSelectionRange(new s(R.row+I.selection[0],I.selection[1],R.row+I.selection[2],I.selection[3]))),this.$enableAutoIndent){if(M.getDocument().isNewLine(u)){var z=T.getNextLineIndent(N,F.slice(0,R.column),M.getTabString());M.insert({row:R.row+1,column:0},z)}W&&T.autoOutdent(N,M,R.row)}},f.prototype.autoIndent=function(){for(var u=this.session,p=u.getMode(),M=this.selection.isEmpty()?[new s(0,0,u.doc.getLength()-1,0)]:this.selection.getAllRanges(),T="",R="",I="",D=u.getTabString(),H=0;H<M.length;H++)for(var O=M[H].start.row,N=M[H].end.row,F=O;F<=N;F++){F>0&&(T=u.getState(F-1),R=u.getLine(F-1),I=p.getNextLineIndent(T,R,D));var W=u.getLine(F),z=p.$getIndent(W);if(I!==z){if(z.length>0){var P=new s(F,0,F,z.length);u.remove(P)}I.length>0&&u.insert({row:F,column:0},I)}p.autoOutdent(T,u,F)}},f.prototype.onTextInput=function(u,p){if(!p)return this.keyBinding.onTextInput(u);this.startOperation({command:{name:"insertstring"}});var M=this.applyComposition.bind(this,u,p);this.selection.rangeCount?this.forEachSelection(M):M(),this.endOperation()},f.prototype.applyComposition=function(u,p){if(p.extendLeft||p.extendRight){var M=this.selection.getRange();M.start.column-=p.extendLeft,M.end.column+=p.extendRight,M.start.column<0&&(M.start.row--,M.start.column+=this.session.getLine(M.start.row).length+1),this.selection.setRange(M),!u&&!M.isEmpty()&&this.remove()}if((u||!this.selection.isEmpty())&&this.insert(u,!0),p.restoreStart||p.restoreEnd){var M=this.selection.getRange();M.start.column-=p.restoreStart,M.end.column-=p.restoreEnd,this.selection.setRange(M)}},f.prototype.onCommandKey=function(u,p,M){return this.keyBinding.onCommandKey(u,p,M)},f.prototype.setOverwrite=function(u){this.session.setOverwrite(u)},f.prototype.getOverwrite=function(){return this.session.getOverwrite()},f.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},f.prototype.setScrollSpeed=function(u){this.setOption("scrollSpeed",u)},f.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},f.prototype.setDragDelay=function(u){this.setOption("dragDelay",u)},f.prototype.getDragDelay=function(){return this.getOption("dragDelay")},f.prototype.setSelectionStyle=function(u){this.setOption("selectionStyle",u)},f.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},f.prototype.setHighlightActiveLine=function(u){this.setOption("highlightActiveLine",u)},f.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},f.prototype.setHighlightGutterLine=function(u){this.setOption("highlightGutterLine",u)},f.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},f.prototype.setHighlightSelectedWord=function(u){this.setOption("highlightSelectedWord",u)},f.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},f.prototype.setAnimatedScroll=function(u){this.renderer.setAnimatedScroll(u)},f.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},f.prototype.setShowInvisibles=function(u){this.renderer.setShowInvisibles(u)},f.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},f.prototype.setDisplayIndentGuides=function(u){this.renderer.setDisplayIndentGuides(u)},f.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},f.prototype.setHighlightIndentGuides=function(u){this.renderer.setHighlightIndentGuides(u)},f.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},f.prototype.setShowPrintMargin=function(u){this.renderer.setShowPrintMargin(u)},f.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},f.prototype.setPrintMarginColumn=function(u){this.renderer.setPrintMarginColumn(u)},f.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},f.prototype.setReadOnly=function(u){this.setOption("readOnly",u)},f.prototype.getReadOnly=function(){return this.getOption("readOnly")},f.prototype.setBehavioursEnabled=function(u){this.setOption("behavioursEnabled",u)},f.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},f.prototype.setWrapBehavioursEnabled=function(u){this.setOption("wrapBehavioursEnabled",u)},f.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},f.prototype.setShowFoldWidgets=function(u){this.setOption("showFoldWidgets",u)},f.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},f.prototype.setFadeFoldWidgets=function(u){this.setOption("fadeFoldWidgets",u)},f.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},f.prototype.remove=function(u){this.selection.isEmpty()&&(u=="left"?this.selection.selectLeft():this.selection.selectRight());var p=this.getSelectionRange();if(this.getBehavioursEnabled()){var M=this.session,T=M.getState(p.start.row),R=M.getMode().transformAction(T,"deletion",this,M,p);if(p.end.column===0){var I=M.getTextRange(p);if(I[I.length-1]==` 214`){var D=M.getLine(p.end.row);/^\s+$/.test(D)&&(p.end.column=D.length)}}R&&(p=R)}this.session.remove(p),this.clearSelection()},f.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},f.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},f.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},f.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var u=this.getSelectionRange();u.start.column==u.end.column&&u.start.row==u.end.row&&(u.end.column=0,u.end.row++),this.session.remove(u),this.clearSelection()},f.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var u=this.getCursorPosition();this.insert(` 215`),this.moveCursorToPosition(u)},f.prototype.setGhostText=function(u,p){this.renderer.setGhostText(u,p)},f.prototype.removeGhostText=function(){this.renderer.removeGhostText()},f.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var u=this.getCursorPosition(),p=u.column;if(p!==0){var M=this.session.getLine(u.row),T,R;p<M.length?(T=M.charAt(p)+M.charAt(p-1),R=new s(u.row,p-1,u.row,p+1)):(T=M.charAt(p-1)+M.charAt(p-2),R=new s(u.row,p-2,u.row,p)),this.session.replace(R,T),this.session.selection.moveToPosition(R.end)}}},f.prototype.toLowerCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var p=this.getSelectionRange(),M=this.session.getTextRange(p);this.session.replace(p,M.toLowerCase()),this.selection.setSelectionRange(u)},f.prototype.toUpperCase=function(){var u=this.getSelectionRange();this.selection.isEmpty()&&this.selection.selectWord();var p=this.getSelectionRange(),M=this.session.getTextRange(p);this.session.replace(p,M.toUpperCase()),this.selection.setSelectionRange(u)},f.prototype.indent=function(){var u=this.session,p=this.getSelectionRange();if(p.start.row<p.end.row){var M=this.$getSelectedRows();u.indentRows(M.first,M.last," ");return}else if(p.start.column<p.end.column){var T=u.getTextRange(p);if(!/^\s+$/.test(T)){var M=this.$getSelectedRows();u.indentRows(M.first,M.last," ");return}}var R=u.getLine(p.start.row),I=p.start,D=u.getTabSize(),H=u.documentToScreenColumn(I.row,I.column);if(this.session.getUseSoftTabs())var O=D-H%D,N=a.stringRepeat(" ",O);else{for(var O=H%D;R[p.start.column-1]==" "&&O;)p.start.column--,O--;this.selection.setSelectionRange(p),N=" "}return this.insert(N)},f.prototype.blockIndent=function(){var u=this.$getSelectedRows();this.session.indentRows(u.first,u.last," ")},f.prototype.blockOutdent=function(){var u=this.session.getSelection();this.session.outdentRows(u.getRange())},f.prototype.sortLines=function(){for(var u=this.$getSelectedRows(),p=this.session,M=[],T=u.first;T<=u.last;T++)M.push(p.getLine(T));M.sort(function(D,H){return D.toLowerCase()<H.toLowerCase()?-1:D.toLowerCase()>H.toLowerCase()?1:0});for(var R=new s(0,0,0,0),T=u.first;T<=u.last;T++){var I=p.getLine(T);R.start.row=T,R.end.row=T,R.end.column=I.length,p.replace(R,M[T-u.first])}},f.prototype.toggleCommentLines=function(){var u=this.session.getState(this.getCursorPosition().row),p=this.$getSelectedRows();this.session.getMode().toggleCommentLines(u,this.session,p.first,p.last)},f.prototype.toggleBlockComment=function(){var u=this.getCursorPosition(),p=this.session.getState(u.row),M=this.getSelectionRange();this.session.getMode().toggleBlockComment(p,this.session,M,u)},f.prototype.getNumberAt=function(u,p){var M=/[\-]?[0-9]+(?:\.[0-9]+)?/g;M.lastIndex=0;for(var T=this.session.getLine(u);M.lastIndex<p;){var R=M.exec(T);if(R.index<=p&&R.index+R[0].length>=p){var I={value:R[0],start:R.index,end:R.index+R[0].length};return I}}return null},f.prototype.modifyNumber=function(u){var p=this.selection.getCursor().row,M=this.selection.getCursor().column,T=new s(p,M-1,p,M),R=this.session.getTextRange(T);if(!isNaN(parseFloat(R))&&isFinite(R)){var I=this.getNumberAt(p,M);
215if(I){var D=I.value.indexOf(".")>=0?I.start+I.value.indexOf(".")+1:I.end,H=I.start+I.value.length-D,O=parseFloat(I.value);O*=Math.pow(10,H),D!==I.end&&M<D?u*=Math.pow(10,I.end-M-1):u*=Math.pow(10,I.end-M),O+=u,O/=Math.pow(10,H);var N=O.toFixed(H),F=new s(p,I.start,p,I.end);this.session.replace(F,N),this.moveCursorTo(p,Math.max(I.start+1,M+N.length-I.value.length))}}else this.toggleWord()},f.prototype.toggleWord=function(){var u=this.selection.getCursor().row,p=this.selection.getCursor().column;this.selection.selectWord();var M=this.getSelectedText(),T=this.selection.getWordRange().start.column,R=M.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g,"$1 ").split(/\s/),I=p-T-1;I<0&&(I=0);var D=0,H=0,O=this;M.match(/[A-Za-z0-9_]+/)&&R.forEach(function(G,Y){H=D+G.length,I>=D&&I<=H&&(M=G,O.selection.clearSelection(),O.moveCursorTo(u,D+T),O.selection.selectTo(u,H+T)),D=H});for(var N=this.$toggleWordPairs,F,W=0;W<N.length;W++)for(var z=N[W],P=0;P<=1;P++){var U=+!P,j=M.match(new RegExp("^\\s?_?("+a.escapeRegExp(z[P])+")\\s?$","i"));if(j){var V=M.match(new RegExp("([_]|^|\\s)("+a.escapeRegExp(j[1])+")($|\\s)","g"));V&&(F=M.replace(new RegExp(a.escapeRegExp(z[P]),"i"),function(G){var Y=z[U];return G.toUpperCase()==G?Y=Y.toUpperCase():G.charAt(0).toUpperCase()==G.charAt(0)&&(Y=Y.substr(0,0)+z[U].charAt(0).toUpperCase()+Y.substr(1)),Y}),this.insert(F),F="")}}},f.prototype.findLinkAt=function(u,p){var M,T,R=this.session.getLine(u),I=R.split(/((?:https?|ftp):\/\/[\S]+)/),D=p;D<0&&(D=0);var H=0,O=0,N;try{for(var F=k(I),W=F.next();!W.done;W=F.next()){var z=W.value;if(O=H+z.length,D>=H&&D<=O&&z.match(/((?:https?|ftp):\/\/[\S]+)/)){N=z.replace(/[\s:.,'";}\]]+$/,"");break}H=O}}catch(P){M={error:P}}finally{try{W&&!W.done&&(T=F.return)&&T.call(F)}finally{if(M)throw M.error}}return N},f.prototype.openLink=function(){var u=this.selection.getCursor(),p=this.findLinkAt(u.row,u.column);return p&&window.open(p,"_blank"),p!=null},f.prototype.removeLines=function(){var u=this.$getSelectedRows();this.session.removeFullLines(u.first,u.last),this.clearSelection()},f.prototype.duplicateSelection=function(){var u=this.selection,p=this.session,M=u.getRange(),T=u.isBackwards();if(M.isEmpty()){var R=M.start.row;p.duplicateLines(R,R)}else{var I=T?M.start:M.end,D=p.insert(I,p.getTextRange(M));M.start=I,M.end=D,u.setSelectionRange(M,T)}},f.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},f.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},f.prototype.moveText=function(u,p,M){return this.session.moveText(u,p,M)},f.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},f.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},f.prototype.$moveLines=function(u,p){var M,T,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var I=R.toOrientedRange();M=this.$getSelectedRows(I),T=this.session.$moveLines(M.first,M.last,p?0:u),p&&u==-1&&(T=0),I.moveBy(T,0),R.fromOrientedRange(I)}else{var D=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var H=0,O=0,N=D.length,F=0;F<N;F++){var W=F;D[F].moveBy(H,0),M=this.$getSelectedRows(D[F]);for(var z=M.first,P=M.last;++F<N;){O&&D[F].moveBy(O,0);var U=this.$getSelectedRows(D[F]);if(p&&U.first!=P)break;if(!p&&U.first>P+1)break;P=U.last}for(F--,H=this.session.$moveLines(z,P,p?0:u),p&&u==-1&&(W=F+1);W<=F;)D[W].moveBy(H,0),W++;p||(H=0),O+=H}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}}
215,f.prototype.$getSelectedRows=function(u){return u=(u||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(u.start.row),last:this.session.getRowFoldEnd(u.end.row)}},f.prototype.onCompositionStart=function(u){this.renderer.showComposition(u)},f.prototype.onCompositionUpdate=function(u){this.renderer.setCompositionText(u)},f.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},f.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},f.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},f.prototype.isRowVisible=function(u){return u>=this.getFirstVisibleRow()&&u<=this.getLastVisibleRow()},f.prototype.isRowFullyVisible=function(u){return u>=this.renderer.getFirstFullyVisibleRow()&&u<=this.renderer.getLastFullyVisibleRow()},f.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},f.prototype.$moveByPage=function(u,p){var M=this.renderer,T=this.renderer.layerConfig,R=u*Math.floor(T.height/T.lineHeight);p===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):p===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var I=M.scrollTop;M.scrollBy(0,R*T.lineHeight),p!=null&&M.scrollCursorIntoView(null,.5),M.animateScrolling(I)},f.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},f.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},f.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},f.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},f.prototype.scrollPageDown=function(){this.$moveByPage(1)},f.prototype.scrollPageUp=function(){this.$moveByPage(-1)},f.prototype.scrollToRow=function(u){this.renderer.scrollToRow(u)},f.prototype.scrollToLine=function(u,p,M,T){this.renderer.scrollToLine(u,p,M,T)},f.prototype.centerSelection=function(){var u=this.getSelectionRange(),p={row:Math.floor(u.start.row+(u.end.row-u.start.row)/2),column:Math.floor(u.start.column+(u.end.column-u.start.column)/2)};this.renderer.alignCursor(p,.5)},f.prototype.getCursorPosition=function(){return this.selection.getCursor()},f.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},f.prototype.getSelectionRange=function(){return this.selection.getRange()},f.prototype.selectAll=function(){this.selection.selectAll()},f.prototype.clearSelection=function(){this.selection.clearSelection()},f.prototype.moveCursorTo=function(u,p){this.selection.moveCursorTo(u,p)},f.prototype.moveCursorToPosition=function(u){this.selection.moveCursorToPosition(u)},f.prototype.jumpToMatching=function(u,p){var M=this.getCursorPosition(),T=new g(this.session,M.row,M.column),R=T.getCurrentToken(),I=0;R&&R.type.indexOf("tag-name")!==-1&&(R=T.stepBackward());var D=R||T.stepForward();if(D){var H,O=!1,N={},F=M.column-D.start,W,z={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(D.value.match(/[{}()\[\]]/g)){for(;F<D.value.length&&!O;F++)if(z[D.value[F]])switch(W=z[D.value[F]]+"."+D.type.replace("rparen","lparen"),isNaN(N[W])&&(N[W]=0),D.value[F]){case"(":case"[":case"{":N[W]++;break;case")":case"]":case"}":N[W]--,N[W]===-1&&(H="bracket",O=!0);break}}else D.type.indexOf("tag-name")!==-1&&(isNaN(N[D.value])&&(N[D.value]=0),R.value==="<"&&I>1?N[D.value]++:R.value==="</"&&N[D.value]--,N[D.value]===-1&&(H="tag",O=!0));O||(R=D,I++,D=T.stepForward(),F=0)}while(D&&!O);if(H){var P,U;if(H==="bracket")P=this.session.getBracketRange(M),P||(P=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1,T.getCurrentTokenRow(),T.getCurrentTokenColumn()+F-1),U=P.start,(p||U.row===M.row&&Math.abs(U.column-M.column)<2)&&(P=this.session.getBracketRange(U)));else if(H==="tag"){if(!D||D.type.indexOf("tag-name")===-1)return;if(P=new s(T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2,T.getCurrentTokenRow(),T.getCurrentTokenColumn()-2),P.compare(M.row,M.column)===0){var j=this.session.getMatchingTags(M);j&&(j.openTag.contains(M.row,M.column)?(P=j.closeTag,U=P.start):(P=j.openTag,j.closeTag.start.row===M.row&&j.closeTag.start.column===M.column?U=P.end:U=P.start))}U=U||P.start}U=P&&P.cursor||U,U&&(u?P&&p?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))}}},f.prototype.gotoLine=function(u,p,M){this.selection.clearSelection(),this.session.unfold({row:u-1,column:p||0}),this.exitMultiSelectMode&&this.exitMultiSelectMode(),this.moveCursorTo(u-1,p||0),this.isRowFullyVisible(u-1)||this.scrollToLine(u-1,!0,M)},f.prototype.navigateTo=function(u,p){this.selection.moveTo(u,p)},f.prototype.navigateUp=function(u){if(this.selection.isMultiLine()&&!this.selection.isBackwards()){var p=this.selection.anchor.getPosition();return this.moveCursorToPosition(p)}this.selection.clearSelection(),this.selection.moveCursorBy(-u||-1,0)},f.prototype.navigateDown=function(u){if(this.selection.isMultiLine()&&this.selection.isBackwards()){var p=this.selection.anchor.getPosition();return this.moveCursorToPosition(p)}this.selection.clearSelection(),this.selection.moveCursorBy(u||1,0)},f.prototype.navigateLeft=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorLeft();else{var p=this.getSelectionRange().start;this.moveCursorToPosition(p)}this.clearSelection()},f.prototype.navigateRight=function(u){if(this.selection.isEmpty())for(u=u||1;u--;)this.selection.moveCursorRight();else{var p=this.getSelectionRange().end;this.moveCursorToPosition(p)}this.clearSelection()},f.prototype.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},f.prototype.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},f.prototype.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},f.prototype.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},f.prototype.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},f.prototype.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},f.prototype.replace=function(u,p){p&&this.$search.set(p);var M=this.$search.find(this.session),T=0;return M&&(this.$tryReplace(M,u)&&(T=1),this.selection.setSelectionRange(M),this.renderer.scrollSelectionIntoView(M.start,M.end)),T},f.prototype.replaceAll=function(u,p){p&&this.$search.set(p);var M=this.$search.findAll(this.session),T=0;if(!M.length)return T;var R=this.getSelectionRange();this.selection.moveTo(0,0);for(var I=M.length-1;I>=0;--I)this.$tryReplace(M[I],u)&&T++;return this.selection.setSelectionRange(R),T},f.prototype.$tryReplace=function(u,p){var M=this.session.getTextRange(u);return p=this.$search.replace(M,p),p!==null?(u.end=this.session.replace(u,p),u):null},f.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},f.prototype.find=function(u,p,M){p||(p={}),typeof u=="string"||u instanceof RegExp?p.needle=u:typeof u=="object"&&A.mixin(p,u);var T=this.selection.getRange();p.needle==null&&(u=this.session.getTextRange(T)||this.$search.$options.needle,u||(T=this.session.getWordRange(T.start.row,T.start.column),u=this.session.getTextRange(T)),this.$search.set({needle:u})),this.$search.set(p),p.start||this.$search.set({start:T});var R=this.$search.find(this.session);if(p.preventScroll)return R;if(R)return this.revealRange(R,M),R;p.backwards?T.start=T.end:T.end=T.start,this.selection.setRange(T)}
215,f.prototype.findNext=function(u,p){this.find({skipCurrent:!0,backwards:!1},u,p)},f.prototype.findPrevious=function(u,p){this.find(u,{skipCurrent:!0,backwards:!0},p)},f.prototype.revealRange=function(u,p){this.session.unfold(u),this.selection.setSelectionRange(u);var M=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(u.start,u.end,.5),p!==!1&&this.renderer.animateScrolling(M)},f.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},f.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},f.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach(function(u){u.destroy()}),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},f.prototype.setAutoScrollEditorIntoView=function(u){if(u){var p,M=this,T=!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 I=this.on("changeSelection",function(){T=!0}),D=this.renderer.on("beforeRender",function(){T&&(p=M.renderer.container.getBoundingClientRect())}),H=this.renderer.on("afterRender",function(){if(T&&p&&(M.isFocused()||M.searchBox&&M.searchBox.isFocused())){var O=M.renderer,N=O.$cursorLayer.$pixelPos,F=O.layerConfig,W=N.top-F.offset;N.top>=0&&W+p.top<0?T=!0:N.top<F.height&&N.top+p.top+F.lineHeight>window.innerHeight?T=!1:T=null,T!=null&&(R.style.top=W+"px",R.style.left=N.left+"px",R.style.height=F.lineHeight+"px",R.scrollIntoView(T)),T=p=null}});this.setAutoScrollEditorIntoView=function(O){O||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",I),this.renderer.off("afterRender",H),this.renderer.off("beforeRender",D))}}},f.prototype.$resetCursorStyle=function(){var u=this.$cursorStyle||"ace",p=this.renderer.$cursorLayer;p&&(p.setSmoothBlinking(/smooth/.test(u)),p.isBlinking=!this.$readOnly&&u!="wide",C.setCssClass(p.element,"ace_slim-cursors",/slim/.test(u)))},f.prototype.prompt=function(u,p,M){var T=this;m.loadModule("ace/ext/prompt",function(R){R.prompt(T,u,p,M)})},Object.defineProperty(f.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new _(this.container))},set:function(u){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=u},enumerable:!1,configurable:!0}),f}();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"],["&&","||"],["==","!="]],A.implement(w.prototype,l),m.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(f){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:f})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(f){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(f){var u=this;if(this.textInput.setReadOnly(f),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(M){var T=!1;if(M&&M.type=="keydown"){if(M&&M.key&&!M.ctrlKey&&!M.metaKey&&(M.key==" "&&M.preventDefault(),T=M.key.length==1),!T)return}else M&&M.type!=="exec"&&(T=!0);if(T){var R=C.createElement("div");R.textContent=b("editor.tooltip.disable-editing","Editing is disabled"),u.hoverTooltip.isOpen||u.hoverTooltip.showForRange(u,u.getSelectionRange(),R)}else u.hoverTooltip&&u.hoverTooltip.isOpen&&u.hoverTooltip.hide()});var p=this.textInput.getElement();
vendor: 6,174 bytes, line 215
215f?(S.addListener(p,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(S.removeListener(p,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(f){this.textInput.setCopyWithEmptySelection(f)},initialValue:!1},cursorStyle:{set:function(f){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(f){this.setAutoScrollEditorIntoView(f)}},keyboardHandler:{set:function(f){this.setKeyboardHandler(f)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(f){this.session.setValue(f)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(f){this.setSession(f)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(f){this.renderer.$gutterLayer.setShowLineNumbers(f),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),f&&this.$relativeLineNumbers?v.attach(this):v.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(f){this.$showLineNumbers&&f?v.attach(this):v.detach(this)}},placeholder:{set:function(f){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var u=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(u&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),C.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!u&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),C.addCssClass(this.container,"ace_hasPlaceholder");var p=C.createElement("div");p.className="ace_placeholder",p.textContent=this.$placeholder||"",this.renderer.placeholderNode=p,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!u&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(f){var u={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(T){T.blur(),T.renderer.scroller.focus()},readOnly:!0},p=function(T){if(T.target==this.renderer.scroller&&T.keyCode===$.enter){T.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},M;f?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(h.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",b("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",b("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",p.bind(this)),this.commands.addCommand(u),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",b("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",b("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),M||(M=new d(this)),M.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",p.bind(this)),this.commands.removeCommand(u),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),M&&M.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(f){this.$textInputAriaLabel=f},initialValue:""},enableMobileMenu:{set:function(f){this.$enableMobileMenu=f},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",focu
215sTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var v={getText:function(f,u){return(Math.abs(f.selection.lead.row-u)||u+1+(u<9?"·":""))+""},getWidth:function(f,u,p){return Math.max(u.toString().length,(p.lastRow+1).toString().length,2)*p.characterWidth},update:function(f,u){u.renderer.$loop.schedule(u.renderer.CHANGE_GUTTER)},attach:function(f){f.renderer.$gutterLayer.$renderer=this,f.on("changeSelection",this.update),this.update(null,f)},detach:function(f){f.renderer.$gutterLayer.$renderer==this&&(f.renderer.$gutterLayer.$renderer=null),f.off("changeSelection",this.update),this.update(null,f)}};x.Editor=w}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(E,x,B){var k=E("../lib/dom"),A=function(){function C(a,h){this.element=a,this.canvasHeight=h||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return C.prototype.moveContainer=function(a){k.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},C.prototype.pageChanged=function(a,h){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(h.firstRowScreen*h.lineHeight/this.canvasHeight)},C.prototype.computeLineTop=function(a,h,r){var o=h.firstRowScreen*h.lineHeight,n=Math.floor(o/this.canvasHeight),i=r.documentToScreenRow(a,0)*h.lineHeight;return i-n*this.canvasHeight},C.prototype.computeLineHeight=function(a,h,r){return h.lineHeight*r.getRowLineCount(a)},C.prototype.getLength=function(){return this.cells.length},C.prototype.get=function(a){return this.cells[a]},C.prototype.shift=function(){this.$cacheCell(this.cells.shift())},C.prototype.pop=function(){this.$cacheCell(this.cells.pop())},C.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var h=k.createFragment(this.element),r=0;r<a.length;r++)h.appendChild(a[r].element);this.element.appendChild(h)}else this.cells.push(a),this.element.appendChild(a.element)},C.prototype.unshift=function(a){if(Array.isArray(a)){this.cells.unshift.apply(this.cells,a);for(var h=k.createFragment(this.element),r=0;r<a.length;r++)h.appendChild(a[r].element);this.element.firstChild?this.element.insertBefore(h,this.element.firstChild):this.element.appendChild(h)}else this.cells.unshift(a),this.element.insertAdjacentElement("afterbegin",a.element)},C.prototype.last=function(){return this.cells.length?this.cells[this.cells.length-1]:null},C.prototype.$cacheCell=function(a){a&&(a.element.remove(),this.cellCache.push(a))},C.prototype.createCell=function(a,h,r,o){var n=this.cellCache.pop();if(!n){var i=k.createElement("div");o&&o(i),this.element.appendChild(i),n={element:i,text:"",row:a}}return n.row=a,n},C}();x.Lines=A}),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,B){var k=E("../lib/dom"),A=E("../lib/oop"),C=E("../lib/lang"),a=E("../lib/event_emitter").EventEmitter,h=E("./lines").Lines,r=E("../config").nls,o=function(){function i(e){this.$showCursorMarker=null,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 h(this.element),this.$lines.$offsetCoefficient=1}return i.prototype.setSession=function(e){this.session&&this.session.off("change",this.$updateAnnotations),this.session=e,e&&e.on("change",this.$updateAnnotations)},i.prototype.addGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(e,t)},i.prototype.removeGutterDecoration=function(e,t){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(e,t)},i.prototype.setAnnotations=function(e){this.$annotations=[];for(var t=0;t<e.length;t++){var s=e[t],l=s.row,c=this.$annotations[l];c||(c=this.$annotations[l]={text:[],type:[],displayText:[]});var y=s.text,m=s.text,g=s.type;y=y?C.escapeHTML(y):s.html||"",m=m||s.html||"",c.text.indexOf(y)===-1&&(c.text.push(y),c.type.pu
215sh(g),c.displayText.push(m));var d=s.className;d?c.className=d:g==="error"?c.className=" ace_error":g==="security"&&!/\bace_error\b/.test(c.className)?c.className=" ace_security":g==="warning"&&!/\bace_(error|security)\b/.test(c.className)?c.className=" ace_warning":g==="info"&&!c.className?c.className=" ace_info":g==="hint"&&!c.className&&(c.className=" ace_hint")}},i.prototype.$updateAnnotations=function(e){if(this.$annotations.length){var t=e.start.row,s=e.end.row-t;if(s!==0)if(e.action=="remove")this.$annotations.splice(t,s+1,null);else{var l=new Array(s+1);l.unshift(t,1),this.$annotations.splice.apply(this.$annotations,l)}}},i.prototype.update=function(e){this.config=e;var t=this.session,s=e.firstRow,l=Math.min(e.lastRow+e.gutterOffset,t.getLength()-1);this.oldLastRow=l,this.config=e,this.$lines.moveContainer(e),this.$updateCursorRow();for(var c=t.getNextFoldLine(s),y=c?c.start.row:1/0,m=null,g=-1,d=s;;){if(d>y&&(d=c.end.row+1,c=t.getNextFoldLine(d,c),y=c?c.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,c,d),d++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},i.prototype.$updateGutterWidth=function(e){var t=this.session,s=t.gutterRenderer||this.$renderer,l=t.$firstLineNumber,c=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(c=t.getLength()+l-1);var y=s?s.getWidth(t,c,e):c.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();y+=m.left+m.right,y!==this.gutterWidth&&!isNaN(y)&&(this.gutterWidth=y,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",y))},i.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},i.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),!!this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var s=0;s<t.length;s++){var l=t[s];if(l.row>=this.$cursorRow){if(l.row>this.$cursorRow){var c=this.session.getFoldLine(this.$cursorRow);if(s>0&&c&&c.start.row==t[s-1].row)l=t[s-1];else break}l.element.className="ace_gutter-active-line "+l.element.className,this.$cursorCell=l;break}}}}},i.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=k.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,s=this.config,l=this.$lines,c=s.firstRowScreen*s.lineHeight,y=Math.floor(c/l.canvasHeight),m=e.documentToScreenRow(t)*s.lineHeight,g=m-y*l.canvasHeight;k.setStyle(this.$highlightElement.style,"height",s.lineHeight+"px"),k.setStyle(this.$highlightElement.style,"top",g+"px")}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),l=this.oldLastRow;if(this.oldLastRow=s,!t||l<e.firstRow)return this.update(e);if(s<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var c=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);c>0;c--)this.$lines.shift();if(l>s)for(var c=this.session.getFoldedRowCount(s+1,l);c>0;c--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLines(e,e.firstRow,t.firstRow-1)),s>l&&this.$lines.push(this.$renderLines(e,l+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},i.prototype.$renderLines=function(e,t,s){for(var l=[],c=t,y=this.session.getNextFoldLine(c),m=y?y.start.row:1/0;c>m&&(c=y.end.row+1,y=this.session.getNextFoldLine(c,y),m=y?y.start.row:1/0),!(c>s);){var g=this.$lines.createCell(c,e,this.session,n);this.$renderCell(g,e,y,c),l.push(g),c++}return l},i.prototype.$renderCell=function(e,t,s,l){var c=e.element,y=this.session,m=c.childNodes[0],g=c.childNodes[1],d=c.childNodes[2],b=c.childNodes[3],L=d.firstChild,$=y.$firstLineNumber,S=y.$breakpoints,_=y.$decorations,w=y.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&y.foldWidgets,f=s?s.start.row:Number.MAX_VALUE,u=t.lineHeight+"px",p=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",M=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",T=(w?w.getText(y,l):l+$).toString();
215if(this.$highlightGutterLine&&(l==this.$cursorRow||s&&l<this.$cursorRow&&l>=f&&this.$cursorRow<=s.end.row)&&(p+="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)),S[l]&&(p+=S[l]),_[l]&&(p+=_[l]),this.$annotations[l]&&l!==f&&(p+=this.$annotations[l].className),v){var R=v[l];R==null&&(R=v[l]=y.getFoldWidget(l))}if(R){var I="ace_fold-widget ace_"+R,D=R=="start"&&l==f&&l<s.end.row;if(D){I+=" ace_closed";for(var H="",O=!1,N=l+1;N<=s.end.row;N++)if(this.$annotations[N]){if(this.$annotations[N].className===" ace_error"){O=!0,H=" ace_error_fold";break}this.$annotations[N].className===" ace_security"?(O=!0,H=" ace_security_fold"):this.$annotations[N].className===" ace_warning"&&H!==" ace_security_fold"&&(O=!0,H=" ace_warning_fold")}p+=H}else I+=" ace_open";g.className!=I&&(g.className=I),k.setStyle(g.style,"height",u),k.setStyle(g.style,"display","inline-block"),g.setAttribute("role","button"),g.setAttribute("tabindex","-1");var F=y.getFoldWidgetRange(l);F?g.setAttribute("aria-label",r("gutter.code-folding.range.aria-label","Toggle code folding, rows $0 through $1",[F.start.row+1,F.end.row+1])):s?g.setAttribute("aria-label",r("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",r("gutter.code-folding.open.aria-label","Toggle code folding, row $0",[l+1])),D?(g.setAttribute("aria-expanded","false"),g.setAttribute("title",r("gutter.code-folding.closed.title","Unfold code"))):(g.setAttribute("aria-expanded","true"),g.setAttribute("title",r("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"));var W=this.session.$gutterCustomWidgets[l];if(W?this.$addCustomWidget(l,W,e):b&&this.$removeCustomWidget(l,e),O&&this.$showFoldedAnnotations){d.className="ace_gutter_annotation",L.className=M,L.className+=H,k.setStyle(L.style,"height",u),k.setStyle(d.style,"display","block"),k.setStyle(d.style,"height",u);var z;switch(H){case" ace_error_fold":z=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security_fold":z=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning_fold":z=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break}d.setAttribute("aria-label",z),d.setAttribute("tabindex","-1"),d.setAttribute("role","button")}else if(this.$annotations[l]){d.className="ace_gutter_annotation",L.className=M,this.$useSvgGutterIcons?L.className+=this.$annotations[l].className:c.classList.add(this.$annotations[l].className.replace(" ","")),k.setStyle(L.style,"height",u),k.setStyle(d.style,"display","block"),k.setStyle(d.style,"height",u);var z;switch(this.$annotations[l].className){case" ace_error":z=r("gutter.annotation.aria-label.error","Error, read annotations row $0",[T]);break;case" ace_security":z=r("gutter.annotation.aria-label.security","Security finding, read annotations row $0",[T]);break;case" ace_warning":z=r("gutter.annotation.aria-label.warning","Warning, read annotations row $0",[T]);break;case" ace_info":z=r("gutter.annotation.aria-label.info","Info, read annotations row $0",[T]);break;case" ace_hint":z=r("gutter.annotation.aria-label.hint","Suggestion, read annotations row $0",[T]);break}d.setAttribute("aria-label",z),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 T!==m.data&&(m.data=T),c.className!=p&&(c.className=p),k.setStyle(e.element.style,"height",this.$lines.computeLineHeight(l,t,y)+"px"),k.setStyle(e.element.style,"top",this.$lines.computeLineTop(l,t,y)+"px"),e.text=T,d.style.display==="none"&&g.style.display==="none"&&!W?e.element.setAttribute("aria-hidden",!0):e.element.setAttribute("aria-hidden",!1),e},i.prototype.setHighlightGutterLine=function(e){this.$highlightGutterLine=e,!e&&this.$highlightElement&&(this.$highlightElement.remove(),this.$highlightElement=null)},i.prototype.setShowLineNumbers=function(e){this.$renderer=!e&&{getWidth:function(){return 0},getText:function(){return""}}},i.prototype.getShowLineNumbers=function(){return this.$showLineNumbers},i.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},i.prototype.getShowFoldWidgets=function(){return this.$showFoldWidgets},i.prototype.$hideFoldWidget=function(e,t){var s=t||this.$getGutterCell(e);if(s&&s.element){var l=s.element.childNodes[1];l&&k.setStyle(l.style,"display","none")}},i.prototype.$showFoldWidget=function(e,t){var s=t||this.$getGutterCell(e);if(s&&s.element){var l=s.element.childNodes[1];l&&this.session.foldWidgets&&this.session.foldWidgets[s.row]&&k.setStyle(l.style,"display","inline-block")}},i.prototype.$getGutterCell=function(e){var t=this.$lines.cells,s=0,l=t.length-1;if(!(e<t[0].row||e>t[l].row)){for(;s<=l;){var c=Math.floor((s+l)/2),y=t[c];if(y.row>e)l=c-1;else if(y.row<e)s=c+1;else return y}return y}},i.prototype.$addCustomWidget=function(e,t,s){var l=t.className,c=t.label,y=t.title,m=t.callbacks;this.session.$gutterCustomWidgets[e]={className:l,label:c,title:y,callbacks:m},this.$hideFoldWidget(e,s);var g=s||this.$getGutterCell(e);if(g&&g.element){var d=g.element.querySelector(".ace_custom-widget");d&&d.remove(),d=k.createElement("span"),d.className="ace_custom-widget ".concat(l),d.setAttribute("tabindex","-1"),d.setAttribute("role","button"),d.setAttribute("aria-label",c),d.setAttribute("title",y),k.setStyle(d.style,"display","inline-block"),k.setStyle(d.style,"height","inherit"),m&&m.onClick&&d.addEventListener("click",function(b){m.onClick(b,e),b.stopPropagation()}),g.element.appendChild(d)}},i.prototype.$removeCustomWidget=function(e,t){delete this.session.$gutterCustomWidgets[e],this.$showFoldWidget(e,t);var s=t||this.$getGutterCell(e);if(s&&s.element){var l=s.element.querySelector(".ace_custom-widget");l&&s.element.removeChild(l)}},i.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},i.prototype.getRegion=function(e){var t=this.$padding||this.$computePadding(),s=this.element.getBoundingClientRect();if(e.x<t.left+s.left)return"markers";if(this.$showFoldWidgets&&e.x>s.right-t.right)return"foldWidgets"},i}();o.prototype.$fixedWidth=!1,o.prototype.$highlightGutterLine=!0,o.prototype.$renderer=void 0,o.prototype.$showLineNumbers=!0,o.prototype.$showFoldWidgets=!0,A.implement(o.prototype,a);function n(i){var e=document.createTextNode("");i.appendChild(e);var t=k.createElement("span");i.appendChild(t);var s=k.createElement("span");i.appendChild(s);var l=k.createElement("span");return s.appendChild(l),i}x.Gutter=o}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(E,x,B){var k=E("../range").Range,A=E("../lib/dom"),C=function(){function h(r){this.element=A.createElement("div"),this.element.className="ace_layer ace_marker-layer",r.appendChild(this.element)}return h.prototype.setPadding=function(r){this.$padding=r},h.prototype.setSession=function(r){this.session=r},h.prototype.setMarkers=function(r){this.markers=r},h.prototype.elt=function(r,o){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=o,n.className=r},h.prototype.update=function(r){if(r){this.config=r,this.i=0;var o;for(var n in this.markers){var i=this.markers[n];if(!i.range){i.update(o,this,this.session,r);continue}var e=i.range.clipRows(r.firstRow,r.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),i.renderer){var t=this.$getTop(e.start.row,r),s=this.$padding+e.start.column*r.characterWidth;i.renderer(o,e,s,t,r)}else i.type=="fullLine"?this.drawFullLineMarker(o,e,i.clazz,r):i.type=="screenLine"?this.drawScreenLineMarker(o,e,i.clazz,r):e.isMultiLine()?i.type=="text"?this.drawTextMarker(o,e,i.clazz,r):this.drawMultiLineMarker(o,e,i.clazz,r):this.drawSingleLineMarker(o,e,i.clazz+" ace_start ace_br15",r)}if(this.i!=-1)for(;this.i<this.element.childElementCount;)this.element.removeChild(this.element.lastChild)}},h.prototype.$getTop=function(r,o){return(r-o.firstRowScreen)*o.lineHeight},h.prototype.drawTextMarker=function(r,o,n,i,e){for(var t=this.session,s=o.start.row,l=o.end.row,c=s,y=0,m=0,g=t.getScreenLastRowColumn(c),d=new k(c,o.start.column,c,m);c<=l;c++)d.start.row=d.end.row=c,d.start.column=c==s?o.start.column:t.getRowWrapIndent(c),d.end.column=g,y=m,m=g,g=c+1<l?t.getScreenLastRowColumn(c+1):c==l?0:o.end.column,this.drawSingleLineMarker(r,d,n+(c==s?" ace_start":"")+" ace_br"+a(c==s||c==s+1&&o.start.column,y<m,m>g,c==l),i,c==l?0:1,e)},h.prototype.drawMultiLineMarker=function(r,o,n,i,e){var t=this.$padding,s=i.lineHeight,l=this.$getTop(o.start.row,i),c=t+o.start.column*i.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(o.start.row)){var y=o.clone();y.end.row=y.start.row,y.end.column=this.session.getLine(y.start.row).length,this.drawBidiSingleLineMarker(r,y,n+" ace_br1 ace_start",i,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+t+"px;top:"+l+"px;left:"+c+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(o.end.row)){var y=o.clone();y.start.row=y.end.row,y.start.column=0,this.drawBidiSingleLineMarker(r,y,n+" ace_br12",i,null,e)}else{l=this.$getTop(o.end.row,i);var m=o.end.column*i.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+m+"px;top:"+l+"px;left:"+t+"px;"+(e||""))}if(s=(o.end.row-o.start.row-1)*i.lineHeight,!(s<=0)){l=this.$getTop(o.start.row+1,i);var g=(o.start.column?1:0)|(o.end.column?0:8);this.elt(n+(g?" ace_br"+g:""),"height:"+s+"px;right:"+t+"px;top:"+l+"px;left:"+t+"px;"+(e||""))}},h.prototype.drawSingleLineMarker=function(r,o,n,i,e,t){if(this.session.$bidiHandler.isBidiRow(o.start.row))return this.drawBidiSingleLineMarker(r,o,n,i,e,t);var s=i.lineHeight,l=(o.end.column+(e||0)-o.start.column)*i.characterWidth,c=this.$getTop(o.start.row,i),y=this.$padding+o.start.column*i.characterWidth;this.elt(n,"height:"+s+"px;width:"+l+"px;top:"+c+"px;left:"+y+"px;"+(t||""))},h.prototype.drawBidiSingleLineMarker=function(r,o,n,i,e,t){var s=i.lineHeight,l=this.$getTop(o.start.row,i),c=this.$padding,y=this.session.$bidiHandler.getSelections(o.start.column,o.end.column);
215y.forEach(function(m){this.elt(n,"height:"+s+"px;width:"+(m.width+(e||0))+"px;top:"+l+"px;left:"+(c+m.left)+"px;"+(t||""))},this)},h.prototype.drawFullLineMarker=function(r,o,n,i,e){var t=this.$getTop(o.start.row,i),s=i.lineHeight;o.start.row!=o.end.row&&(s+=this.$getTop(o.end.row,i)-t),this.elt(n,"height:"+s+"px;top:"+t+"px;left:0;right:0;"+(e||""))},h.prototype.drawScreenLineMarker=function(r,o,n,i,e){var t=this.$getTop(o.start.row,i),s=i.lineHeight;this.elt(n,"height:"+s+"px;top:"+t+"px;left:0;right:0;"+(e||""))},h}();C.prototype.$padding=0;function a(h,r,o,n){return(h?1:0)|(r?2:0)|(o?4:0)|(n?8:0)}x.Marker=C}),ace.define("ace/layer/text_util",["require","exports","module"],function(E,x,B){var k=new Set(["text","rparen","lparen"]);x.isTextToken=function(A){return k.has(A)}}),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,B){var k=E("../lib/oop"),A=E("../lib/dom"),C=E("../lib/lang"),a=E("./lines").Lines,h=E("../lib/event_emitter").EventEmitter,r=E("../config").nls,o=E("./text_util").isTextToken,n=function(){function i(e){this.dom=A,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 i.prototype.$updateEolChar=function(){var e=this.session.doc,t=e.getNewLineCharacter()==` 216`&&e.getNewLineMode()!="windows",s=t?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},i.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},i.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},i.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},i.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},i.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},i.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},i.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},i.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)},i.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},i.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},i.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=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=C.stringRepeat(this.TAB_CHAR,s),t.push(l)}else t.push(this.dom.createTextNode(C.stringRepeat(" ",s),this.element));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var c="ace_indent-guide",y=this.showSpaces?" ace_invisible ace_invisible_space":"",m=this.showSpaces?C.stringRepeat(this.SPACE_CHAR,this.tabSize):C.stringRepeat(" ",this.tabSize),g=this.showTabs?" ace_invisible ace_invisible_tab":"",d=this.showTabs?C.stringRepeat(this.TAB_CHAR,this.tabSize):m,l=this.dom.createElement("span");l.className=c+y,l.textContent=m,this.$tabStrings[" "]=l;var l=this.dom.createElement("span");l.className=c+g,l.textContent=d,this.$tabStrings[" "]=l}},i.prototype.updateLines=function(e,t,s){if(this.config.lastRow!=e.lastRow||this.config.firstRow!=e.firstRow)return this.update(e);this.config=e;for(var l=Math.max(t,e.firstRow),c=Math.min(s,e.lastRow),y=this.element.childNodes,m=0,d=e.firstRow;d<l;d++){var b=this.session.getFoldLine(d);if(b)if(b.containsRow(l)){l=b.start.row;break}else d=b.end.row;m++}for(var g=!1,d=l,b=this.session.getNextFoldLine(d),L=b?b.start.row:1/0;d>L&&(d=b.end.row+1,b=this.session.getNextFoldLine(d,b),L=b?b.start.row:1/0),!(d>c);){var $=y[m++];if($){this.dom.removeChildren($),this.$renderLine($,d,d==L?b:!1),g&&($.style.top=this.$lines.computeLineTop(d,e,this.session)+"px");var S=e.lineHeight*this.session.getRowLength(d)+"px";$.style.height!=S&&(g=!0,$.style.height=S)}d++}if(g)for(;m<this.$lines.cells.length;){var _=this.$lines.cells[m++];_.element.style.top=this.$lines.computeLineTop(_.row,e,this.session)+"px"}},i.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$lines.pageChanged(t,e))return this.update(e);
216this.$lines.moveContainer(e);var s=e.lastRow,l=t?t.lastRow:-1;if(!t||l<e.firstRow)return this.update(e);if(s<t.firstRow)return this.update(e);if(!t||t.lastRow<e.firstRow)return this.update(e);if(e.lastRow<t.firstRow)return this.update(e);if(t.firstRow<e.firstRow)for(var c=this.session.getFoldedRowCount(t.firstRow,e.firstRow-1);c>0;c--)this.$lines.shift();if(t.lastRow>e.lastRow)for(var c=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);c>0;c--)this.$lines.pop();e.firstRow<t.firstRow&&this.$lines.unshift(this.$renderLinesFragment(e,e.firstRow,t.firstRow-1)),e.lastRow>t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},i.prototype.$renderLinesFragment=function(e,t,s){for(var l=[],c=t,y=this.session.getNextFoldLine(c),m=y?y.start.row:1/0;c>m&&(c=y.end.row+1,y=this.session.getNextFoldLine(c,y),m=y?y.start.row:1/0),!(c>s);){var g=this.$lines.createCell(c,e,this.session),d=g.element;this.dom.removeChildren(d),A.setStyle(d.style,"height",this.$lines.computeLineHeight(c,e,this.session)+"px"),A.setStyle(d.style,"top",this.$lines.computeLineTop(c,e,this.session)+"px"),this.$renderLine(d,c,c==m?y:!1),this.$useLineGroups()?d.className="ace_line_group":d.className="ace_line",l.push(g),c++}return l},i.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,s=e.lastRow,l=this.$lines;l.getLength();)l.pop();l.push(this.$renderLinesFragment(e,t,s))},i.prototype.$renderToken=function(e,t,s,l){for(var c=this,y=/(\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\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\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=y.exec(l);){var b=g[1],L=g[2],$=g[3],S=g[4],_=g[5];if(!(!c.showSpaces&&L)){var w=d!=g.index?l.slice(d,g.index):"";if(d=g.index+g[0].length,w&&m.appendChild(this.dom.createTextNode(w,this.element)),b){var v=c.session.getScreenTabSize(t+g.index),f=c.$tabStrings[v].cloneNode(!0);f.charCount=1,m.appendChild(f),t+=v-1}else if(L)if(c.showSpaces){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space",u.textContent=C.stringRepeat(c.SPACE_CHAR,L.length),m.appendChild(u)}else m.appendChild(this.dom.createTextNode(L,this.element));else if($){var u=this.dom.createElement("span");u.className="ace_invisible ace_invisible_space ace_invalid",u.textContent=C.stringRepeat(c.SPACE_CHAR,$.length),m.appendChild(u)}else if(S){t+=1;var u=this.dom.createElement("span");u.style.width=c.config.characterWidth*2+"px",u.className=c.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",u.textContent=c.showSpaces?c.SPACE_CHAR:S,m.appendChild(u)}else if(_){t+=1;var u=this.dom.createElement("span");u.style.width=c.config.characterWidth*2+"px",u.className="ace_cjk",u.textContent=_,m.appendChild(u)}}}if(m.appendChild(this.dom.createTextNode(d?l.slice(d):l,this.element)),o(s.type))e.appendChild(m);else{var p="ace_"+s.type.replace(/\./g," ace_"),u=this.dom.createElement("span");s.type=="fold"&&(u.style.width=s.value.length*this.config.characterWidth+"px",u.setAttribute("title",r("inline-fold.closed.title","Unfold code"))),u.className=p,u.appendChild(m),e.appendChild(u)}return t+l.length},i.prototype.renderIndentGuide=function(e,t,s){var l=t.search(this.$indentGuideRe);if(l<=0||l>=s)return t;if(t[0]==" "){l-=l%this.tabSize;for(var c=l/this.tabSize,y=0;y<c;y++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(l)}else if(t[0]==" "){for(var y=0;y<l;y++)e.appendChild(this.$tabStrings[" "].cloneNode(!0));return this.$highlightIndentGuide(),t.substr(l)}return this.$highlightIndentGuide(),t},i.prototype.$highlightIndentGuide=function(){if(!(!this.$highlightIndentGuides||!this.displayIndentGuides)){this.$highlightIndentGuideMarker={indentLevel:void 0,start:void 0,end:void 0,dir:void 0};var e=this.session.doc.$lines;if(e){var t=this.session.selection.getCursor(),s=/^\s*/.exec(this.session.doc.getLine(t.row))[0].length,l=Math.floor(s/this.tabSize);this.$highlightIndentGuideMarker={indentLevel:l,start:t.row};var c=this.session.$bracketHighlight;if(c){for(var y=this.session.$bracketHighlight.ranges,m=0;m<y.length;m++)if(t.row!==y[m].start.row){this.$highlightIndentGuideMarker.end=y[m].start.row+1,t.row>y[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[t.row]!==""&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=t.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()}}},i.prototype.$clearActiveIndentGuide=function(){for(var e=this.element.querySelectorAll(".ace_indent-guide-active"),t=0;t<e.length;t++)e[t].classList.remove("ace_indent-guide-active")},i.prototype.$setIndentGuideActive=function(e,t){var s=this.session.doc.getLine(e.row);if(s!==""){var l=e.element;if(e.element.classList&&e.element.classList.contains("ace_line_group"))if(e.element.childNodes.length>0)l=e.element.childNodes[0];else return;var c=l.childNodes;if(c){var y=c[t-1];y&&y.classList&&y.classList.contains("ace_indent-guide")&&y.classList.add("ace_indent-guide-active")}}},i.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(t!==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,t)}}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,t)}}}},i.prototype.$createLineElement=function(e){var t=this.dom.createElement("div");return t.className="ace_line",t.style.height=this.config.lineHeight+"px",t},i.prototype.$renderWrappedLine=function(e,t,s){var l=0,c=0,y=s[0],m=0,g=this.$createLineElement();e.appendChild(g);for(var d=0;d<t.length;d++){var b=t[d],L=b.value;if(d==0&&this.displayIndentGuides){if(l=L.length,L=this.renderIndentGuide(g,L,y),!L)continue;l-=L.length}if(l+L.length<y)m=this.$renderToken(g,m,b,L),l+=L.length;else{for(;l+L.length>=y;){m=this.$renderToken(g,m,b,L.substring(0,y-l)),L=L.substring(y-l),l=y,g=this.$createLineElement(),e.appendChild(g);var $=this.dom.createTextNode(C.stringRepeat(" ",s.indent),this.element);$.charCount=0,g.appendChild($),c++,m=0,y=s[c]||Number.MAX_VALUE}L.length!=0&&(l+=L.length,m=this.$renderToken(g,m,b,L))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(g,m,null,"",!0)}
216,i.prototype.$renderSimpleLine=function(e,t){for(var s=0,l=0;l<t.length;l++){var c=t[l],y=c.value;if(!(l==0&&this.displayIndentGuides&&(y=this.renderIndentGuide(e,y),!y))){if(s+y.length>this.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,c,y);s=this.$renderToken(e,s,c,y)}}},i.prototype.$renderOverflowMessage=function(e,t,s,l,c){s&&this.$renderToken(e,t,s,l.slice(0,this.MAX_LINE_LENGTH-t));var y=this.dom.createElement("span");y.className="ace_inline_button ace_keyword ace_toggle_wrap",y.textContent=c?"<hide>":"<click to see more...>",e.appendChild(y)},i.prototype.$renderLine=function(e,t,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(t)),s)var l=this.$getFoldLineTokens(t,s);else var l=this.session.getTokens(t);var c=e;if(l.length){var y=this.session.getRowSplitData(t);if(y&&y.length){this.$renderWrappedLine(e,l,y);var c=e.lastChild}else{var c=e;this.$useLineGroups()&&(c=this.$createLineElement(),e.appendChild(c)),this.$renderSimpleLine(c,l)}}else this.$useLineGroups()&&(c=this.$createLineElement(),e.appendChild(c));if(this.showEOL&&c){s&&(t=s.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,c.appendChild(m)}},i.prototype.$getFoldLineTokens=function(e,t){var s=this.session,l=[];function c(m,g,d){for(var b=0,L=0;L+m[b].value.length<g;)if(L+=m[b].value.length,b++,b==m.length)return;if(L!=g){var $=m[b].value.substring(g-L);$.length>d-g&&($=$.substring(0,d-g)),l.push({type:m[b].type,value:$}),L=g+$.length,b+=1}for(;L<d&&b<m.length;){var $=m[b].value;$.length+L>d?l.push({type:m[b].type,value:$.substring(0,d-L)}):l.push(m[b]),L+=$.length,b+=1}}var y=s.getTokens(e);return t.walk(function(m,g,d,b,L){m!=null?l.push({type:"fold",value:m}):(L&&(y=s.getTokens(g)),y.length&&c(y,b,d))},t.end.row,this.session.getLine(t.end.row).length),l},i.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},i}();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,h),x.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(E,x,B){var k=E("../lib/dom"),A=function(){function C(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 C.prototype.$updateOpacity=function(a){for(var h=this.cursors,r=h.length;r--;)k.setStyle(h[r].style,"opacity",a?"":"0")},C.prototype.$startCssAnimation=function(){for(var a=this.cursors,h=a.length;h--;)a[h].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&k.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},C.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,k.removeCssClass(this.element,"ace_animate-blinking")},C.prototype.setPadding=function(a){this.$padding=a},C.prototype.setSession=function(a){this.session=a},C.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},C.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},C.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,k.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},C.prototype.addCursor=function(){var a=k.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},C.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},C.prototype.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},C.prototype.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},C.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 h=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),h()},this.blinkInterval),h()}}
216,C.prototype.getPixelPosition=function(a,h){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var r=this.session.documentToScreenPosition(a),o=this.$padding+(this.session.$bidiHandler.isBidiRow(r.row,a.row)?this.session.$bidiHandler.getPosLeft(r.column):r.column*this.config.characterWidth),n=(r.row-(h?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:o,top:n}},C.prototype.isCursorInView=function(a,h){return a.top>=0&&a.top<h.maxHeight},C.prototype.update=function(a){this.config=a;var h=this.session.$selectionMarkers,r=0,o=0;(h===void 0||h.length===0)&&(h=[{cursor:null}]);for(var r=0,n=h.length;r<n;r++){var i=this.getPixelPosition(h[r].cursor,!0);if(!((i.top>a.height+a.offset||i.top<0)&&r>1)){var e=this.cursors[o++]||this.addCursor(),t=e.style;this.drawCursor?this.drawCursor(e,i,a,h[r],this.session):this.isCursorInView(i,a)?(k.setStyle(t,"display","block"),k.translate(e,i.left,i.top),k.setStyle(t,"width",Math.round(a.characterWidth)+"px"),k.setStyle(t,"height",a.lineHeight+"px")):k.setStyle(t,"display","none")}}for(;this.cursors.length>o;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=i,this.restartTimer()},C.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"))},C.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},C}();A.prototype.$padding=0,A.prototype.drawCursor=null,x.Cursor=A}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,B){var k=this&&this.__extends||function(){var e=function(t,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,c){l.__proto__=c}||function(l,c){for(var y in c)Object.prototype.hasOwnProperty.call(c,y)&&(l[y]=c[y])},e(t,s)};return function(t,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(t,s);function l(){this.constructor=t}t.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}}(),A=E("./lib/oop"),C=E("./lib/dom"),a=E("./lib/event"),h=E("./lib/event_emitter").EventEmitter,r=32768,o=function(){function e(t,s){this.element=C.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=C.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),t.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(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1},e}();A.implement(o.prototype,h);var n=function(e){k(t,e);function t(s,l){var c=e.call(this,s,"-v")||this;return c.scrollTop=0,c.scrollHeight=0,l.$scrollbarWidth=c.width=C.scrollbarWidth(s.ownerDocument),c.inner.style.width=c.element.style.width=(c.width||15)+5+"px",c.$minWidth=0,c}return t.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},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(s){this.element.style.height=s+"px"},t.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>r?(this.coeff=r/s,s=r):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},t.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},t}(o);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var i=function(e){k(t,e);function t(s,l){var c=e.call(this,s,"-h")||this;return c.scrollLeft=0,c.height=l.$scrollbarWidth,c.inner.style.height=c.element.style.height=(c.height||15)+5+"px",c}return t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(s){this.element.style.width=s+"px"},t.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},t.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},t.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},t}(o);x.ScrollBar=n,x.ScrollBarV=n,x.ScrollBarH=i,x.VScrollBar=n,x.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,B){var k=this&&this.__extends||function(){var i=function(e,t){return i=Object.
216setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(s[c]=l[c])},i(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");i(e,t);function s(){this.constructor=e}e.prototype=t===null?Object.create(t):(s.prototype=t.prototype,new s)}}(),A=E("./lib/oop"),C=E("./lib/dom"),a=E("./lib/event"),h=E("./lib/event_emitter").EventEmitter;C.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ 217 position: absolute; 218 background: rgba(128, 128, 128, 0.6); 219 -moz-box-sizing: border-box; 220 box-sizing: border-box; 221 border: 1px solid #bbb; 222 border-radius: 2px; 223 z-index: 8; 224} 225.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { 226 position: absolute; 227 z-index: 6; 228 background: none; 229 overflow: hidden!important; 230} 231.ace_editor>.ace_sb-v { 232 z-index: 6; 233 right: 0; 234 top: 0; 235 width: 12px; 236} 237.ace_editor>.ace_sb-v div { 238 z-index: 8; 239 right: 0; 240 width: 100%; 241} 242.ace_editor>.ace_sb-h { 243 bottom: 0; 244 left: 0; 245 height: 12px; 246} 247.ace_editor>.ace_sb-h div { 248 bottom: 0; 249 height: 100%; 250} 251.ace_editor>.ace_sb_grabbed { 252 z-index: 8; 253 background: #000; 254}`,"ace_scrollbar.css",!1);var r=function(){function i(e,t){this.element=C.createElement("div"),this.element.className="ace_sb"+t,this.inner=C.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 i.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},i}();A.implement(r.prototype,h);var o=function(i){k(e,i);function e(t,s){var l=i.call(this,t,"-v")||this;return l.scrollTop=0,l.scrollHeight=0,l.parent=t,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(t,s){if(t==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,c=s.clientY,y=function(S){c=S.clientY},m=function(){clearInterval(L)},g=s.clientY,d=this.thumbTop,b=function(){if(c!==void 0){var S=l.scrollTopFromThumbTop(d+c-g);S!==l.scrollTop&&l._emit("scroll",{data:S})}};a.capture(this.inner,y,m);var L=setInterval(b,20);return a.preventDefault(s)}var $=s.clientY-this.element.getBoundingClientRect().top-this.thumbHe
254ight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop($)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(t){var s=t*(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(t){this.height=Math.max(0,t),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(t,s){this.pageHeight===t&&!s||(this.pageHeight=t,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(t){this.scrollTop=t,t<0&&(t=0),this.thumbTop=t*(this.slideHeight-this.thumbHe
254ight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e}(r);o.prototype.setInnerHeight=o.prototype.setScrollHeight;var n=function(i){k(e,i);function e(t,s){var l=i.call(this,t,"-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(t,s){if(t==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,c=s.clientX,y=function(S){c=S.clientX},m=function(){clearInterval(L)},g=s.clientX,d=this.thumbLeft,b=function(){if(c!==void 0){var S=l.scrollLeftFromThumbLeft(d+c-g);S!==l.scrollLeft&&l._emit("scroll",{data:S})}};a.capture(this.inner,y,m);var L=setInterval(b,20);return a.preventDefault(s)}var $=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft($)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(t){var s=t*(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(t){this.width=Math.max(0,t),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(t,s){this.pageWidth===t&&!s||(this.pageWidth=t,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(t){this.scrollLeft=t,t<0&&(t=0),this.thumbLeft=t*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e}(r);n.prototype.setInnerWidth=n.prototype.setScrollWidth,x.ScrollBar=o,x.ScrollBarV=o,x.ScrollBarH=n,x.VScrollBar=o,x.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(E,x,B){var k=E("./lib/event"),A=function(){function C(a,h){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=h||window;var r=this;this._flush=function(o){r.pending=!1;var n=r.changes;if(n&&(k.blockIdle(100),r.changes=0,r.onRender(n)),r.changes){if(r.$recursionLimit--<0)return;r.schedule()}else r.$recursionLimit=2}}return C.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(k.nextFrame(this._flush),this.pending=!0)},C.prototype.clear=function(a){var h=this.changes;return this.changes=0,h},C}();x.RenderLoop=A}),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,B){var k=E("../lib/oop"),A=E("../lib/dom"),C=E("../lib/lang"),a=E("../lib/event"),h=E("../lib/useragent"),r=E("../lib/event_emitter").EventEmitter,o=512,n=typeof ResizeObserver=="function",i=200,e=function(){function t(s){this.el=A.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=A.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=A.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=C.stringRepeat("X",o),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return t.prototype.$setMeasureNodeStyles=function(s,l){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",h.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=l?"hidden":"visible"},t.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})}},t.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(l){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},t.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)},t.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},t.prototype.$measureSizes=function(s){var l={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/o};return l.width===0||l.height===0?null:l},t.prototype.$measureCharWidth=function(s){this.$main.textContent=C.stringRepeat(s,o);var l=this.$main.getBoundingClientRect();return l.width/o},t.prototype.getCharacterWidth=function(s){var l=this.charSizes[s];return l===void 0&&(l=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),l},t.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},t.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},t.prototype.$initTransformMeasureNodes=function(){var s=function(l,c){return["div",{style:"position: absolute;top:"+l+"px;left:"+c+"px;"}]};this.els=A.buildDom([s(0,0),s(i,0),s(0,i),s(i,i)],this.el)},t.prototype.transformCoordinates=function(s,l){if(s){var c=this.$getZoom(this.el);s=d(1/c,s)}
vendor: 4,462 bytes, lines 254-380
254function y(I,D,H){var O=I[1]*D[0]-I[0]*D[1];return[(-D[1]*H[0]+D[0]*H[1])/O,(+I[1]*H[0]-I[0]*H[1])/O]}function m(I,D){return[I[0]-D[0],I[1]-D[1]]}function g(I,D){return[I[0]+D[0],I[1]+D[1]]}function d(I,D){return[I*D[0],I*D[1]]}this.els||this.$initTransformMeasureNodes();function b(I){var D=I.getBoundingClientRect();return[D.left,D.top]}var L=b(this.els[0]),$=b(this.els[1]),S=b(this.els[2]),_=b(this.els[3]),w=y(m(_,$),m(_,S),m(g($,S),g(_,L))),v=d(1+w[0],m($,L)),f=d(1+w[1],m(S,L));if(l){var u=l,p=w[0]*u[0]/i+w[1]*u[1]/i+1,M=g(d(u[0],v),d(u[1],f));return g(d(1/p/i,M),L)}var T=m(s,L),R=y(m(v,d(w[0],T)),m(f,d(w[1],T)),T);return d(i,R)},t}();e.prototype.$characterSize={width:0,height:0},k.implement(e.prototype,r),x.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(E,x,B){B.exports=` 255.ace_br1 {border-top-left-radius : 3px;} 256.ace_br2 {border-top-right-radius : 3px;} 257.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;} 258.ace_br4 {border-bottom-right-radius: 3px;} 259.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;} 260.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;} 261.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;} 262.ace_br8 {border-bottom-left-radius : 3px;} 263.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;} 264.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;} 265.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;} 266.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 267.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 268.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 269.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;} 270 271 272.ace_editor { 273 position: relative; 274 overflow: hidden; 275 padding: 0; 276 font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Source Code Pro', 'source-code-pro', monospace; 277 direction: ltr; 278 text-align: left; 279 -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 280 forced-color-adjust: none; 281} 282 283.ace_scroller { 284 position: absolute; 285 overflow: hidden; 286 top: 0; 287 bottom: 0; 288 background-color: inherit; 289 -ms-user-select: none; 290 -moz-user-select: none; 291 -webkit-user-select: none; 292 user-select: none; 293 cursor: text; 294} 295 296.ace_content { 297 position: absolute; 298 box-sizing: border-box; 299 min-width: 100%; 300 contain: style size layout; 301 font-variant-ligatures: no-common-ligatures; 302} 303.ace_invisible { 304 font-variant-ligatures: none; 305} 306 307.ace_keyboard-focus:focus { 308 box-shadow: inset 0 0 0 2px #5E9ED6; 309 outline: none; 310} 311 312.ace_dragging .ace_scroller:before{ 313 position: absolute; 314 top: 0; 315 left: 0; 316 right: 0; 317 bottom: 0; 318 content: ''; 319 background: rgba(250, 250, 250, 0.01); 320 z-index: 1000; 321} 322.ace_dragging.ace_dark .ace_scroller:before{ 323 background: rgba(0, 0, 0, 0.01); 324} 325 326.ace_gutter { 327 position: absolute; 328 overflow : hidden; 329 width: auto; 330 top: 0; 331 bottom: 0; 332 left: 0; 333 cursor: default; 334 z-index: 4; 335 -ms-user-select: none; 336 -moz-user-select: none; 337 -webkit-user-select: none; 338 user-select: none; 339 contain: style size layout; 340} 341 342.ace_gutter-active-line { 343 position: absolute; 344 left: 0; 345 right: 0; 346} 347 348.ace_scroller.ace_scroll-left:after { 349 content: ""; 350 position: absolute; 351 top: 0; 352 right: 0; 353 bottom: 0; 354 left: 0; 355 box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; 356 pointer-events: none; 357} 358 359.ace_gutter-cell, .ace_gutter-cell_svg-icons { 360 position: absolute; 361 top: 0; 362 left: 0; 363 right: 0; 364 padding-left: 19px; 365 padding-right: 6px; 366 background-repeat: no-repeat; 367} 368 369.ace_gutter-cell_svg-icons .ace_gutter_annotation { 370 margin-left: -14px; 371 float: left; 372} 373 374.ace_gutter-cell .ace_gutter_annotation { 375 margin-left: -19px; 376 float: left; 377} 378 379.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 { 380 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////
380////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=="); 381 background-repeat: no-repeat; 382 background-position: 2px center; 383} 384 385.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold { 386 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=="); 387 background-repeat: no-repeat; 388 background-position: 2px center; 389} 390 391.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint { 392 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); 393 background-repeat: no-repeat; 394 background-position: 2px center; 395} 396 397.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 { 398 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); 399} 400 401.ace_icon_svg.ace_error { 402 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+"); 403 background-color: crimson; 404} 405.ace_icon_svg.ace_security { 406 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+"); 407 background-color: crimson; 408} 409.ace_icon_svg.ace_warning { 410 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg=="); 411 background-color: darkorange; 412} 413.ace_icon_svg.ace_info { 414 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGx
414pbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg=="); 415 background-color: royalblue; 416} 417.ace_icon_svg.ace_hint { 418 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg=="); 419 background-color: silver; 420} 421 422.ace_icon_svg.ace_error_fold { 423 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 424 background-color: crimson; 425} 426.ace_icon_svg.ace_security_fold { 427 -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyM
427DUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4="); 428 background-color: crimson; 429} 430.ace_icon_svg.ace_warning_fold { 431 -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4="); 432 background-color: darkorange; 433} 434 435.ace_scrollbar { 436 contain: strict; 437 position: absolute; 438 right: 0; 439 bottom: 0; 440 z-index: 6; 441} 442 443.ace_scrollbar-inner { 444 position: absolute; 445 cursor: text; 446 left: 0; 447 top: 0; 448} 449 450.ace_scrollbar-v{ 451 overflow-x: hidden; 452 overflow-y: scroll; 453 top: 0; 454} 455 456.ace_scrollbar-h { 457 overflow-x: scroll; 458 overflow-y: hidden; 459 left: 0; 460} 461 462.ace_print-margin { 463 position: absolute; 464 height: 100%; 465} 466 467.ace_text-input { 468 position: absolute; 469 z-index: 0; 470 width: 0.5em; 471 height: 1em; 472 opacity: 0; 473 background: transparent; 474 -moz-appearance: none; 475 appearance: none; 476 border: none; 477 resize: none; 478 outline: none; 479 overflow: hidden; 480 font: inherit; 481 padding: 0 1px; 482 margin: 0 -1px; 483 contain: strict; 484 -ms-user-select: text; 485 -moz-user-select: text; 486 -webkit-user-select: text; 487 user-select: text; 488 /*with \`pre-line\` chrome inserts instead of space*/ 489 white-space: pre!important; 490} 491.ace_text-input.ace_composition { 492 background: transparent; 493 color: inherit; 494 z-index: 1000; 495 opacity: 1; 496} 497.ace_composition_placeholder { color: transparent } 498.ace_composition_marker { 499 border-bottom: 1px solid; 500 position: absolute; 501 border-radius: 0;
502 margin-top: 1px; 503} 504 505[ace_nocontext=true] { 506 transform: none!important; 507 filter: none!important; 508 clip-path: none!important; 509 mask : none!important; 510 contain: none!important; 511 perspective: none!important; 512 mix-blend-mode: initial!important; 513 z-index: auto; 514} 515 516.ace_layer { 517 z-index: 1; 518 position: absolute; 519 overflow: hidden; 520 /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/ 521 word-wrap: normal; 522 white-space: pre; 523 height: 100%; 524 width: 100%; 525 box-sizing: border-box; 526 /* setting pointer-events: auto; on node under the mouse, which changes 527 during scroll, will break mouse wheel scrolling in Safari */ 528 pointer-events: none; 529} 530 531.ace_gutter-layer { 532 position: relative; 533 width: auto; 534 text-align: right; 535 pointer-events: auto; 536 height: 1000000px; 537 contain: style size layout; 538} 539 540.ace_text-layer { 541 font: inherit !important; 542 position: absolute; 543 height: 1000000px; 544 width: 1000000px; 545 contain: style size layout; 546} 547 548.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group { 549 contain: style size layout; 550 position: absolute; 551 top: 0; 552 left: 0; 553 right: 0; 554} 555 556.ace_hidpi .ace_text-layer, 557.ace_hidpi .ace_gutter-layer, 558.ace_hidpi .ace_content, 559.ace_hidpi .ace_gutter { 560 contain: strict; 561} 562.ace_hidpi .ace_text-layer > .ace_line, 563.ace_hidpi .ace_text-layer > .ace_line_group { 564 contain: strict; 565} 566 567.ace_cjk { 568 display: inline-block; 569 text-align: center; 570} 571 572.ace_cursor-layer { 573 z-index: 4; 574} 575 576.ace_cursor { 577 z-index: 4; 578 position: absolute; 579 box-sizing: border-box; 580 border-left: 2px solid; 581 /* workaround for smooth cursor repaintng whole screen in chrome */ 582 transform: translatez(0); 583} 584 585.ace_multiselect .ace_cursor { 586 border-left-width: 1px; 587} 588 589.ace_slim-cursors .ace_cursor { 590 border-left-width: 1px; 591} 592 593.ace_overwrite-cursors .ace_cursor { 594 border-left-width: 0; 595 border-bottom: 1px solid; 596} 597 598.ace_hidden-cursors .ace_cursor { 599 opacity: 0.2; 600} 601 602.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { 603 opacity: 0; 604} 605 606.ace_smooth-blinking .ace_cursor { 607 transition: opacity 0.18s; 608} 609 610.ace_animate-blinking .ace_cursor { 611 animation-duration: 1000ms; 612 animation-timing-function: step-end; 613 animation-name: blink-ace-animate; 614 animation-iteration-count: infinite; 615} 616 617.ace_animate-blinking.ace_smooth-blinking .ace_cursor { 618 animation-duration: 1000ms; 619 animation-timing-function: ease-in-out; 620 animation-name: blink-ace-animate-smooth; 621} 622 623@keyframes blink-ace-animate { 624 from, to { opacity: 1; } 625 60% { opacity: 0; } 626} 627 628@keyframes blink-ace-animate-smooth { 629 from, to { opacity: 1; } 630 45% { opacity: 1; } 631 60% { opacity: 0; } 632 85% { opacity: 0; } 633} 634 635.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { 636 position: absolute; 637 z-index: 3; 638} 639 640.ace_marker-layer .ace_selection { 641 position: absolute; 642 z-index: 5; 643} 644 645.ace_marker-layer .ace_bracket { 646 position: absolute; 647 z-index: 6; 648} 649 650.ace_marker-layer .ace_error_bracket { 651 position: absolute; 652 border-bottom: 1px solid #DE5555; 653 border-radius: 0; 654} 655 656.ace_marker-layer .ace_active-line { 657 position: absolute; 658 z-index: 2; 659} 660 661.ace_marker-layer .ace_selected-word { 662 position: absolute; 663 z-index: 4; 664 box-sizing: border-box; 665} 666 667.ace_line .ace_fold { 668 box-sizing: border-box; 669 670 display: inline-block; 671 height: 11px; 672 margin-top: -2px; 673 vertical-align: middle; 674 675 background-image: 676 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), 677 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); 678 background-repeat: no-repeat, repeat-x; 679 background-position: center center, top left; 680 color: transparent; 681 682 border: 1px solid black; 683 border-radius: 2px; 684 685 cursor: pointer; 686 pointer-events: auto; 687} 688 689.ace_dark .ace_fold { 690} 691 692.ace_fold:hover{ 693 background-image: 694 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), 695 url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); 696} 697 698.ace_tooltip { 699 background-color: #f5f5f5; 700 border: 1px solid gray; 701 border-radius: 1px; 702 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); 703 color: black; 704 padding: 3px 4px; 705 position: fixed; 706 z-index: 999999; 707 box-sizing: border-box; 708 cursor: default; 709 white-space: pre-wrap; 710 word-wrap: break-word; 711 line-height: normal; 712 font-style: normal; 713 font-weight: normal; 714 letter-spacing: normal; 715 pointer-events: none; 716 overflow: auto; 717 max-width: min(33em, 66vw); 718 overscroll-behavior: contain; 719} 720.ace_tooltip pre { 721 white-space: pre-wrap; 722} 723 724.ace_tooltip.ace_dark { 725 background-color: #636363; 726 color: #fff; 727} 728 729.ace_tooltip:focus { 730 outline: 1px solid #5E9ED6; 731} 732 733.ace_icon { 734 display: inline-block; 735 width: 18px; 736 vertical-align: top; 737} 738 739.ace_icon_svg { 740 display: inline-block; 741 width: 12px; 742 vertical-align: top; 743 -webkit-mask-repeat: no-repeat; 744 -webkit-mask-size: 12px; 745 -webkit-mask-position: center; 746} 747 748.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons { 749 padding-right: 13px; 750} 751 752.ace_fold-widget, .ace_custom-widget { 753 box-sizing: border-box; 754 755 margin: 0 -12px 0 1px; 756 display: none; 757 width: 11px; 758 vertical-align: top; 759 760 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVo
760DBUxKAAAAABJRU5ErkJggg=="); 761 background-repeat: no-repeat; 762 background-position: center; 763 764 border-radius: 3px; 765 766 border: 1px solid transparent; 767 cursor: pointer; 768 pointer-events: auto; 769} 770 771.ace_custom-widget { 772 background: none; 773} 774 775.ace_folding-enabled .ace_fold-widget { 776 display: inline-block; 777} 778 779.ace_fold-widget.ace_end { 780 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); 781} 782 783.ace_fold-widget.ace_closed { 784 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); 785} 786 787.ace_fold-widget:hover { 788 border: 1px solid rgba(0, 0, 0, 0.3); 789 background-color: rgba(255, 255, 255, 0.2); 790 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); 791} 792 793.ace_fold-widget:active { 794 border: 1px solid rgba(0, 0, 0, 0.4); 795 background-color: rgba(0, 0, 0, 0.05); 796 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); 797} 798/** 799 * Dark version for fold widgets 800 */ 801.ace_dark .ace_fold-widget { 802 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); 803} 804.ace_dark .ace_fold-widget.ace_end { 805 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); 806} 807.ace_dark .ace_fold-widget.ace_closed { 808 background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); 809} 810.ace_dark .ace_fold-widget:hover { 811 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); 812 background-color: rgba(255, 255, 255, 0.1); 813} 814.ace_dark .ace_fold-widget:active { 815 box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); 816} 817 818.ace_inline_button { 819 border: 1px solid lightgray; 820 display: inline-block; 821 margin: -1px 8px; 822 padding: 0 5px; 823 pointer-events: auto; 824 cursor: pointer; 825} 826.ace_inline_button:hover { 827 border-color: gray; 828 background: rgba(200,200,200,0.2); 829 display: inline-block; 830 pointer-events: auto; 831} 832 833.ace_fold-widget.ace_invalid { 834 background-color: #FFB4B4; 835 border-color: #DE5555; 836} 837 838.ace_fade-fold-widgets .ace_fold-widget { 839 transition: opacity 0.4s ease 0.05s; 840 opacity: 0; 841} 842 843.ace_fade-fold-widgets:hover .ace_fold-widget { 844 transition: opacity 0.05s ease 0.05s; 845 opacity:1; 846} 847 848.ace_underline { 849 text-decoration: underline; 850} 851 852.ace_bold { 853 font-weight: bold; 854} 855 856.ace_nobold .ace_bold { 857 font-weight: normal; 858} 859 860.ace_italic { 861 font-style: italic; 862} 863 864 865.ace_error-marker { 866 background-color: rgba(255, 0, 0,0.2); 867 position: absolute; 868 z-index: 9; 869} 870 871.ace_highlight-marker { 872 background-color: rgba(255, 255, 0,0.2); 873 position: absolute; 874 z-index: 8; 875} 876 877.ace_mobile-menu { 878 position: absolute; 879 line-height: 1.5; 880 border-radius: 4px; 881 -ms-user-select: none; 882 -moz-user-select: none; 883 -webkit-user-select: none; 884 user-select: none; 885 background: white; 886 box-shadow: 1px 3px 2px grey; 887 border: 1px solid #dcdcdc; 888 color: black; 889} 890.ace_dark > .ace_mobile-menu { 891 background: #333; 892 color: #ccc; 893 box-shadow: 1px 3px 2px grey; 894 border: 1px solid #444; 895 896} 897.ace_mobile-button { 898 padding: 2px; 899 cursor: pointer; 900 overflow: hidden; 901} 902.ace_mobile-button:hover { 903 background-color: #eee; 904 opacity:1; 905} 906.ace_mobile-button:active { 907 background-color: #ddd; 908} 909 910.ace_placeholder { 911 position: relative; 912 font-family: arial; 913 transform: scale(0.9); 914 transform-origin: left; 915 white-space: pre; 916 opacity: 0.7; 917 margin: 0 10px; 918 z-index: 1; 919} 920 921.ace_ghost_text { 922 opacity: 0.5; 923 font-style: italic; 924} 925 926.ace_ghost_text_container > div { 927 white-space: pre; 928} 929 930.ghost_text_line_wrapped::after { 931 content: "↩"; 932 position: absolute; 933} 934 935.ace_lineWidgetContainer.ace_ghost_text { 936 margin: 0px 4px 937} 938 939.ace_screenreader-only { 940 position:absolute; 941 left:-10000px; 942 top:auto; 943 width:1px; 944 height:1px; 945 overflow:hidden; 946} 947 948.ace_hidden_token { 949 display: none; 950}`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(E,x,B){var k=E("../lib/dom"),A=E("../lib/oop"),C=E("../lib/event_emitter").EventEmitter,a=function(){function h(r,o){this.renderer=o,this.pixelRatio=1,this.maxHeight=o.layerConfig.maxHeight,this.lineHeight=o.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,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)"},this.setScrollBarV(r)}return h.prototype.$createCanvas=function(){this.canvas=k.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},h.prototype.setScrollBarV=function(r){this.$createCanvas(),this.scrollbarV=r,r.element.appendChild(this.canvas),this.setDimensions()},h.prototype.$updateDecorators=function(r){if(typeof this.canvas.getContext!="function")return;var o=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;this.setDimensions(r);var n=this.canvas.getContext("2d");function i(v,f){return v.priority<f.priority?-1:v.priority>f.priority?1:0}var e=this.renderer.session.$annotations;if(n.clearRect(0,0,this.canvas.width,this.canvas.height),e){var t={info:1,warning:2,error:3};e.forEach(function(v){v.priority=t[v.type]||null}),e=e.sort(i);for(var s=0;s<e.length;s++){var l=e[s].row,c=this.getVerticalOffsetForRow(l),y=c+this.lineHeight,m=Math.round(this.heightRatio*c),g=Math.round(this.heightRatio*y),d=Math.round((m+g)/2),b=g-d;b<this.halfMinDecorationHeight&&(b=this.halfMinDecorationHeight),d-b<0&&(d=b),d+b>this.canvasHeight&&(d=this.canvasHeight-b);var L=d-b,$=d+b,S=$-L;
950n.fillStyle=o[e[s].type]||null,n.fillRect(0,L,Math.round(this.oneZoneWidth-1),S)}}var _=this.renderer.session.selection.getCursor();if(_){var w=Math.round(this.getVerticalOffsetForRow(_.row)*this.heightRatio);n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,w,this.canvasWidth,2)}},h.prototype.getVerticalOffsetForRow=function(r){r=r|0;var o=this.renderer.session.documentToScreenRow(r,0)*this.lineHeight;return o},h.prototype.setDimensions=function(r){r=r||this.renderer.layerConfig,this.maxHeight=r.maxHeight,this.lineHeight=r.lineHeight,this.canvasHeight=r.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeight<this.canvasHeight?this.heightRatio=1:this.heightRatio=this.canvasHeight/this.maxHeight},h.prototype.setZoneWidth=function(){this.oneZoneWidth=this.canvasWidth},h.prototype.destroy=function(){this.canvas.parentNode.removeChild(this.canvas)},h}();A.implement(a.prototype,C),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,B){var k=E("./lib/oop"),A=E("./lib/dom"),C=E("./lib/lang"),a=E("./config"),h=E("./layer/gutter").Gutter,r=E("./layer/marker").Marker,o=E("./layer/text").Text,n=E("./layer/cursor").Cursor,i=E("./scrollbar").HScrollBar,e=E("./scrollbar").VScrollBar,t=E("./scrollbar_custom").HScrollBar,s=E("./scrollbar_custom").VScrollBar,l=E("./renderloop").Ren
vendor: 4,689 bytes, line 950
950derLoop,c=E("./layer/font_metrics").FontMetrics,y=E("./lib/event_emitter").EventEmitter,m=E("./css/editor-css"),g=E("./layer/decorators").Decorator,d=E("./lib/useragent"),b=E("./layer/text_util").isTextToken;A.importCssString(m,"ace_editor.css",!1);var L=function(){function $(S,_){var w=this;this.container=S||A.createElement("div"),A.addCssClass(this.container,"ace_editor"),A.HI_DPI&&A.addCssClass(this.container,"ace_hidpi"),this.setTheme(_),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=A.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=A.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=A.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new r(this.content);var v=this.$textLayer=new o(this.content);this.canvas=v.element,this.$markerFront=new r(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 i(this.container,this),this.scrollBarV.on("scroll",function(f){w.$scrollAnimation||w.session.setScrollTop(f.data-w.scrollMargin.top)}),this.scrollBarH.on("scroll",function(f){w.$scrollAnimation||w.session.setScrollLeft(f.data-w.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new c(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(f){w.updateCharacterSize(),w.onResize(!0,w.gutterWidth,w.$size.width,w.$size.height),w._signal("changeCharacterSize",f)}),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 $.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),A.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},$.prototype.setSession=function(S){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=S,S&&this.scrollMargin.top&&S.getScrollTop()<=0&&S.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(S),this.$markerBack.setSession(S),this.$markerFront.setSession(S),this.$gutterLayer.setSession(S),this.$textLayer.setSession(S),S&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},$.prototype.updateLines=function(S,_,w){if(_===void 0&&(_=1/0),this.$changedLines?(this.$changedLines.firstRow>S&&(this.$changedLines.firstRow=S),this.$changedLines.lastRow<_&&(this.$changedLines.lastRow=_)):this.$changedLines={firstRow:S,lastRow:_},this.$changedLines.lastRow<this.layerConfig.firstRow)if(w)this.$changedLines.lastRow=this.layerConfig.lastRow;else return;this.$changedLines.firstRow>this.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},$.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},$.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},$.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},$.prototype.updateFull=function(S){S?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},$.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()}
950,$.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},$.prototype.onResize=function(S,_,w,v){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=S?1:0;var f=this.container;v||(v=f.clientHeight||f.scrollHeight),!v&&this.$maxLines&&this.lineHeight>1&&(!f.style.height||f.style.height=="0px")&&(f.style.height="1px",v=f.clientHeight||f.scrollHeight),w||(w=f.clientWidth||f.scrollWidth);var u=this.$updateCachedSize(S,_,w,v);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!w&&!v)return this.resizing=0;S&&(this.$gutterLayer.$padding=null),S?this.$renderChanges(u|this.$changes,!0):this.$loop.schedule(u|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},$.prototype.$updateCachedSize=function(S,_,w,v){v-=this.$extraHeight||0;var f=0,u=this.$size,p={width:u.width,height:u.height,scrollerHeight:u.scrollerHeight,scrollerWidth:u.scrollerWidth};if(v&&(S||u.height!=v)&&(u.height=v,f|=this.CHANGE_SIZE,u.scrollerHeight=u.height,this.$horizScroll&&(u.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(u.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",f=f|this.CHANGE_SCROLL),w&&(S||u.width!=w)){f|=this.CHANGE_SIZE,u.width=w,_==null&&(_=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=_,A.setStyle(this.scrollBarH.element.style,"left",_+"px"),A.setStyle(this.scroller.style,"left",_+this.margin.left+"px"),u.scrollerWidth=Math.max(0,w-_-this.scrollBarV.getWidth()-this.margin.h),A.setStyle(this.$gutter.style,"left",this.margin.left+"px");var M=this.scrollBarV.getWidth()+"px";A.setStyle(this.scrollBarH.element.style,"right",M),A.setStyle(this.scroller.style,"right",M),A.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(u.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||S)&&(f|=this.CHANGE_FULL)}return u.$dirty=!w||!v,f&&this._signal("resize",p),f},$.prototype.onGutterResize=function(S){var _=this.$showGutter?S:0;_!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,_,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()},$.prototype.adjustWrapLimit=function(){var S=this.$size.scrollerWidth-this.$padding*2,_=Math.floor(S/this.characterWidth);return this.session.adjustWrapLimit(_,this.$showPrintMargin&&this.$printMarginColumn)},$.prototype.setAnimatedScroll=function(S){this.setOption("animatedScroll",S)},$.prototype.getAnimatedScroll=function(){return this.$animatedScroll},$.prototype.setShowInvisibles=function(S){this.setOption("showInvisibles",S),this.session.$bidiHandler.setShowInvisibles(S)},$.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},$.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},$.prototype.setDisplayIndentGuides=function(S){this.setOption("displayIndentGuides",S)},$.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},$.prototype.setHighlightIndentGuides=function(S){this.setOption("highlightIndentGuides",S)},$.prototype.setShowPrintMargin=function(S){this.setOption("showPrintMargin",S)},$.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},$.prototype.setPrintMarginColumn=function(S){this.setOption("printMarginColumn",S)},$.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},$.prototype.getShowGutter=function(){return this.getOption("showGutter")},$.prototype.setShowGutter=function(S){return this.setOption("showGutter",S)},$.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},$.prototype.setFadeFoldWidgets=function(S){this.setOption("fadeFoldWidgets",S)},$.prototype.setHighlightGutterLine=function(S){this.setOption("highlightGutterLine",S)},$.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},$.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var S=A.createElement("div");S.className="ace_layer ace_print-margin-layer",this.$printMarginEl=A.createElement("div"),this.$printMarginEl.className="ace_print-margin",S.appendChild(this.$printMarginEl),this.content.insertBefore(S,this.content.firstChild)}var _=this.$printMarginEl.style;_.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",_.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},$.prototype.getContainerElement=function(){return this.container},$.prototype.getMouseEventTarget=function(){return this.scroller},$.prototype.getTextAreaContainer=function(){return this.container},$.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var S=this.textarea.style,_=this.$composition;
950if(!this.$keepTextAreaAtCursor&&!_){A.translate(this.textarea,-100,0);return}var w=this.$cursorLayer.$pixelPos;if(w){_&&_.markerRange&&(w=this.$cursorLayer.getPixelPosition(_.markerRange.start,!0));var v=this.layerConfig,f=w.top,u=w.left;f-=v.offset;var p=_&&_.useTextareaForIME||d.isMobile?this.lineHeight:1;if(f<0||f>v.height-p){A.translate(this.textarea,0,0);return}var M=1,T=this.$size.height-p;if(!_)f+=this.lineHeight;else if(_.useTextareaForIME){var R=this.textarea.value;M=this.characterWidth*this.session.$getStringScreenWidth(R)[0]}else f+=this.lineHeight+2;u-=this.scrollLeft,u>this.$size.scrollerWidth-M&&(u=this.$size.scrollerWidth-M),u+=this.gutterWidth+this.margin.left,A.setStyle(S,"height",p+"px"),A.setStyle(S,"width",M+"px"),A.translate(this.textarea,Math.min(u,this.$size.scrollerWidth-M),Math.min(f,T))}}},$.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},$.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},$.prototype.getLastFullyVisibleRow=function(){var S=this.layerConfig,_=S.lastRow,w=this.session.documentToScreenRow(_,0)*S.lineHeight;return w-this.session.getScrollTop()>S.height-S.lineHeight?_-1:_},$.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},$.prototype.setPadding=function(S){this.$padding=S,this.$textLayer.setPadding(S),this.$cursorLayer.setPadding(S),this.$markerFront.setPadding(S),this.$markerBack.setPadding(S),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},$.prototype.setScrollMargin=function(S,_,w,v){var f=this.scrollMargin;f.top=S|0,f.bottom=_|0,f.right=v|0,f.left=w|0,f.v=f.top+f.bottom,f.h=f.left+f.right,f.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-f.top),this.updateFull()},$.prototype.setMargin=function(S,_,w,v){var f=this.margin;f.top=S|0,f.bottom=_|0,f.right=v|0,f.left=w|0,f.v=f.top+f.bottom,f.h=f.left+f.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},$.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},$.prototype.setHScrollBarAlwaysVisible=function(S){this.setOption("hScrollBarAlwaysVisible",S)},$.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},$.prototype.setVScrollBarAlwaysVisible=function(S){this.setOption("vScrollBarAlwaysVisible",S)},$.prototype.$updateScrollBarV=function(){var S=this.layerConfig.maxHeight,_=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(S-=(_-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>S-_&&(S=this.scrollTop+_,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(S+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},$.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},$.prototype.freeze=function(){this.$frozen=!0},$.prototype.unfreeze=function(){this.$frozen=!1},$.prototype.$renderChanges=function(S,_){if(this.$changes&&(S|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!S&&!_){this.$changes|=S;return}if(this.$size.$dirty)return this.$changes|=S,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",S),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var w=this.layerConfig;if(S&this.CHANGE_FULL||S&this.CHANGE_SIZE||S&this.CHANGE_TEXT||S&this.CHANGE_LINES||S&this.CHANGE_SCROLL||S&this.CHANGE_H_SCROLL){if(S|=this.$computeLayerConfig()|this.$loop.clear(),w.firstRow!=this.layerConfig.firstRow&&w.firstRowScreen==this.layerConfig.firstRowScreen){var v=this.scrollTop+(w.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;v>0&&(this.scrollTop=v,S=S|this.CHANGE_SCROLL,S|=this.$computeLayerConfig()|this.$loop.clear())}w=this.layerConfig,this.$updateScrollBarV(),S&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),A.translate(this.content,-this.scrollLeft,-w.offset);var f=w.width+2*this.$padding+"px",u=w.minHeight+"px";A.setStyle(this.content.style,"width",f),A.setStyle(this.content.style,"height",u)}if(S&this.CHANGE_H_SCROLL&&(A.translate(this.content,-this.scrollLeft,-w.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),S&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$curs
950orLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",S);return}if(S&this.CHANGE_SCROLL){this.$changedLines=null,S&this.CHANGE_TEXT||S&this.CHANGE_LINES?this.$textLayer.update(w):this.$textLayer.scrollLines(w),this.$showGutter&&(S&this.CHANGE_GUTTER||S&this.CHANGE_LINES?this.$gutterLayer.update(w):this.$gutterLayer.scrollLines(w)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w),this.$markerBack.update(w),this.$markerFront.update(w),this.$cursorLayer.update(w),this.$moveTextAreaToCursor(),this._signal("afterRender",S);return}S&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(w),this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):S&this.CHANGE_LINES?((this.$updateLines()||S&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):S&this.CHANGE_TEXT||S&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)):S&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(w),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(w)),S&this.CHANGE_CURSOR&&(this.$cursorLayer.update(w),this.$moveTextAreaToCursor()),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(w),S&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(w),this._signal("afterRender",S)},$.prototype.$autosize=function(){var S=this.session.getScreenLength()*this.lineHeight,_=this.$maxLines*this.lineHeight,w=Math.min(_,Math.max((this.$minLines||1)*this.lineHeight,S))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(w+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&w>this.$maxPixelHeight&&(w=this.$maxPixelHeight);var v=w<=2*this.lineHeight,f=!v&&S>_;if(w!=this.desiredHeight||this.$size.height!=this.desiredHeight||f!=this.$vScroll){f!=this.$vScroll&&(this.$vScroll=f,this.scrollBarV.setVisible(f));var u=this.container.clientWidth;this.container.style.height=w+"px",this.$updateCachedSize(!0,this.$gutterWidth,u,w),this.desiredHeight=w,this._signal("autosize")}},$.prototype.$computeLayerConfig=function(){var S=this.session,_=this.$size,w=_.height<=2*this.lineHeight,v=this.session.getScreenLength(),f=v*this.lineHeight,u=this.$getLongestLine(),p=!w&&(this.$hScrollBarAlwaysVisible||_.scrollerWidth-u-2*this.$padding<0),M=this.$horizScroll!==p;M&&(this.$horizScroll=p,this.scrollBarH.setVisible(p));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),w=_.height<=2*this.lineHeight);var R=_.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(_.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;f+=I;var D=this.scrollMargin;this.session.setScrollTop(Math.max(-D.top,Math.min(this.scrollTop,f-_.scrollerHeight+D.bottom))),this.session.setScrollLeft(Math.max(-D.left,Math.min(this.scrollLeft,u+2*this.$padding-_.scrollerWidth+D.right)));var H=!w&&(this.$vScrollBarAlwaysVisible||_.scrollerHeight-f+I<0||this.scrollTop>D.top),O=T!==H;O&&(this.$vScroll=H,this.scrollBarV.setVisible(H));var N=this.scrollTop%this.lineHeight,F=Math.ceil(R/this.lineHeight)-1,W=Math.max(0,Math.round((this.scrollTop-N)/this.lineHeight)),z=W+F,P,U,j=this.lineHeight;W=S.screenToDocumentRow(W,0);var V=S.getFoldLine(W);V&&(W=V.start.row),P=S.documentToScreenRow(W,0),U=S.getRowLength(W)*j,z=Math.min(S.screenToDocumentRow(z,0),S.getLength()-1),R=_.scrollerHeight+S.getRowLength(z)*j+U,N=this.scrollTop-P*j,N<0&&P>0&&(P=Math.max(0,P+Math.floor(N/j)),N=this.scrollTop-P*j);var G=0;return(this.layerConfig.width!=u||M)&&(G=this.CHANGE_H_SCROLL),(M||O)&&(G|=this.$updateCachedSize(!0,this.gutterWidth,_.width,_.height),this._signal("scrollbarVisibilityChanged"),O&&(u=this.$getLongestLine())),this.layerConfig={width:u,padding:this.$padding,firstRow:W,firstRowScreen:P,lastRow:z,lineHeight:j,characterWidth:this.characterWidth,minHeight:R,maxHeight:f,offset:N,gutterOffset:j?Math.max(0,Math.ceil((N+_.height-_.scrollerHeight)/j)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(u-this.$padding),G},$.prototype.$updateLines=function(){if(this.$changedLines){var S=this.$changedLines.firstRow,_=this.$changedLines.lastRow;this.$changedLines=null;var w=this.layerConfig;if(!(S>
950w.lastRow+1)&&!(_<w.firstRow)){if(_===1/0){this.$showGutter&&this.$gutterLayer.update(w),this.$textLayer.update(w);return}return this.$textLayer.updateLines(w,S,_),!0}}},$.prototype.$getLongestLine=function(){var S=this.session.getScreenWidth();return this.showInvisibles&&!this.session.$useWrapMode&&(S+=1),this.$textLayer&&S>this.$textLayer.MAX_LINE_LENGTH&&(S=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(S*this.characterWidth))},$.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},$.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},$.prototype.addGutterDecoration=function(S,_){this.$gutterLayer.addGutterDecoration(S,_)},$.prototype.removeGutterDecoration=function(S,_){this.$gutterLayer.removeGutterDecoration(S,_)},$.prototype.updateBreakpoints=function(S){this._rows=S,this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.setAnnotations=function(S){this.$gutterLayer.setAnnotations(S),this.$loop.schedule(this.CHANGE_GUTTER)},$.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},$.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},$.prototype.showCursor=function(){this.$cursorLayer.showCursor()},$.prototype.scrollSelectionIntoView=function(S,_,w){this.scrollCursorIntoView(S,w),this.scrollCursorIntoView(_,w)},$.prototype.scrollCursorIntoView=function(S,_,w){if(this.$size.scrollerHeight!==0){var v=this.$cursorLayer.getPixelPosition(S),f=v.left,u=v.top,p=w&&w.top||0,M=w&&w.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+p>u?(_&&T+p>u+this.lineHeight&&(u-=_*this.$size.scrollerHeight),u===0&&(u=-this.scrollMargin.top),this.session.setScrollTop(u)):T+this.$size.scrollerHeight-M<u+this.lineHeight&&(_&&T+this.$size.scrollerHeight-M<u-this.lineHeight&&(u+=_*this.$size.scrollerHeight),this.session.setScrollTop(u+this.lineHeight+M-this.$size.scrollerHeight));var R=this.scrollLeft,I=2*this.layerConfig.characterWidth;f-I<R?(f-=I,f<this.$padding+I&&(f=-this.scrollMargin.left),this.session.setScrollLeft(f)):(f+=I,R+this.$size.scrollerWidth<f+this.characterWidth?this.session.setScrollLeft(Math.round(f+this.characterWidth-this.$size.scrollerWidth)):R<=this.$padding&&f-R<this.characterWidth&&this.session.setScrollLeft(0))}},$.prototype.getScrollTop=function(){return this.session.getScrollTop()},$.prototype.getScrollLeft=function(){return this.session.getScrollLeft()},$.prototype.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},$.prototype.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},$.prototype.scrollToRow=function(S){this.session.setScrollTop(S*this.lineHeight)},$.prototype.alignCursor=function(S,_){typeof S=="number"&&(S={row:S,column:0});var w=this.$cursorLayer.getPixelPosition(S),v=this.$size.scrollerHeight-this.lineHeight,f=w.top-v*(_||0);return this.session.setScrollTop(f),f},$.prototype.$calcSteps=function(S,_){var w=0,v=this.STEPS,f=[],u=function(p,M,T){return T*(Math.pow(p-1,3)+1)+M};for(w=0;w<v;++w)f.push(u(w/this.STEPS,S,_-S));return f},$.prototype.scrollToLine=function(S,_,w,v){var f=this.$cursorLayer.getPixelPosition({row:S,column:0}),u=f.top;_&&(u-=this.$size.scrollerHeight/2);var p=this.scrollTop;this.session.setScrollTop(u),w!==!1&&this.animateScrolling(p,v)},$.prototype.animateScrolling=function(S,_){var w=this.scrollTop;if(!this.$animatedScroll)return;var v=this;if(S==w)return;if(this.$scrollAnimation){var f=this.$scrollAnimation.steps;if(f.length&&(S=f[0],S==w))return}var u=v.$calcSteps(S,w);this.$scrollAnimation={from:S,to:w,steps:u},clearInterval(this.$timer),v.session.setScrollTop(u.shift()),v.session.$scrollTop=w;function p(){v.$timer=clearInterval(v.$timer),v.$scrollAnimation=null,v.$stopAnimation=!1,_&&_()}this.$timer=setInterval(function(){if(v.$stopAnimation){p();return}if(!v.session)return clearInterval(v.$timer);u.length?(v.session.setScrollTop(u.shift()),v.session.$scrollTop=w):w!=null?(v.session.$scrollTop=-1,v.session.setScrollTop(w),w=null):p()},10)},$.prototype.scrollToY=function(S){this.scrollTop!==S&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=S)},$.prototype.scrollToX=function(S){this.scrollLeft!==S&&(this.scrollLeft=S),this.$loop.schedule(this.CHANGE_H_SCROLL)},$.prototype.scrollTo=function(S,_){this.session.setScrollTop(_),this.session.setScrollLeft(S)},$.prototype.scrollBy=function(S,_){_&&this.session.setScrollTop(this.session.getScrollTop()+_),S&&this.session.setScrollLeft(this.session.getScrollLeft()+S)},$.prototype.isScrollableBy=function(S,_){if(_<0&&this.session.getScrollTop()>=1-this.scrollMargin.top||_>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||S<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||S>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},$.prototype.pixelToScreenCoordinates=function(S,_){var w;if(this.$hasCssTransforms){w={top:0,left:0};var v=this.$fontMetrics.transformCoordinates([S,_]);S=v[1]-this.gutterWidth-this.margin.left,_=v[0]}else w=this.scroller.getBoundingClientRect();var f=S+this.scrollLeft-w.left-this.$padding,u=f/this.characterWidth,p=Math.floor((_+this.scrollTop-w.top)/this.lineHeight),M=this.$blockCursor?Math.floor(u):Math.round(u);return{row:p,column:M,side:u-M>0?1:-1,offsetX:f}},$.prototype.screenToTextCoordinates=function(S,_){var w;if(this.$hasCssTransforms){w={top:0,left:0};var v=this.$fontMetrics.transformCoordinates([S,_]);S=v[1]-this.gutterWidth-this.margin.left,_=v[0]}else w=this.scroller.getBoundingClientRect();var f=S+this.scrollLeft-w.left-this.$padding,u=f/this.characterWidth,p=this.$blockCursor?Math.floor(u):Math.round(u),M=Math.floor((_+this.scrollTop-w.top)/this.lineHeight);return this.session.screenToDocumentPosition(M,Math.max(p,0),f)},$.prototype.textToScreenCoordinates=function(S,_){var w=this.scroller.getBoundingClientRect(),v=this.session.documentToScreenPosition(S,_),f=this.$padding+(this.session.$bidiHandler.isBidiRow(v.row,S)?this.session.$bidiHandler.getPosLeft(v.column):Math.round(v.column*this.characterWidth)),u=v.row*this.lineHeight;return{pageX:w.left+f-this.scrollLeft,pageY:w.top+u-this.scrollTop}},$.prototype.visualizeFocus=function(){A.addCssClass(this.container,"ace_focus")},$.prototype.visualizeBlur=function(){A.removeCssClass(this.container,"ace_focus")},$.prototype.showComposition=function(S){this.$composition=S,S.cssText||(S.cssText=this.textarea.style.cssText),S.useTextareaForIME==null&&(S.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(A.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$curs
950orLayer.element.style.display="none"):S.markerId=this.session.addMarker(S.markerRange,"ace_composition_marker","text")},$.prototype.setCompositionText=function(S){var _=this.session.selection.cursor;this.addToken(S,"composition_placeholder",_.row,_.column),this.$moveTextAreaToCursor()},$.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),A.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var S=this.session.selection.cursor;this.removeExtraToken(S.row,S.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},$.prototype.setGhostText=function(S,_){var w=this.session.selection.cursor,v=_||{row:w.row,column:w.column};this.removeGhostText();var f=this.$calculateWrappedTextChunks(S,v);this.addToken(f[0].text,"ghost_text",v.row,v.column),this.$ghostText={text:S,position:{row:v.row,column:v.column}};var u=A.createElement("div");if(f.length>1){var p=this.hideTokensAfterPosition(v.row,v.column),M;f.slice(1).forEach(function(O){var N=A.createElement("div"),F=A.createElement("span");F.className="ace_ghost_text",O.wrapped&&(N.className="ghost_text_line_wrapped"),O.text.length===0&&(O.text=" "),F.appendChild(A.createTextNode(O.text)),N.appendChild(F),u.appendChild(N),M=N}),p.forEach(function(O){var N=A.createElement("span");b(O.type)||(N.className="ace_"+O.type.replace(/\./g," ace_")),N.appendChild(A.createTextNode(O.value)),M.appendChild(N)}),this.$ghostTextWidget={el:u,row:v.row,column:v.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var T=this.$cursorLayer.getPixelPosition(v,!0),R=this.container,I=R.getBoundingClientRect().height,D=f.length*this.lineHeight,H=D<I-T.top;if(H)return;D<I?this.scrollBy(0,(f.length-1)*this.lineHeight):this.scrollToRow(v.row)}},$.prototype.$calculateWrappedTextChunks=function(S,_){var w=this.$size.scrollerWidth-this.$padding*2,v=Math.floor(w/this.characterWidth)-2;v=v<=0?60:v;for(var f=S.split(/\r?\n/),u=[],p=0;p<f.length;p++){var M=this.session.$getDisplayTokens(f[p],_.column),T=this.session.$computeWrapSplits(M,v,this.session.$tabSize);if(T.length>0){var R=0;T.push(f[p].length);for(var I=0;I<T.length;I++){var D=f[p].slice(R,T[I]);u.push({text:D,wrapped:!0}),R=T[I]}}else u.push({text:f[p],wrapped:!1})}return u},$.prototype.removeGhostText=function(){if(this.$ghostText){var S=this.$ghostText.position;this.removeExtraToken(S.row,S.column),this.$ghostTextWidget&&(this.session.widgetManager.removeLineWidget(this.$ghostTextWidget),this.$ghostTextWidget=null),this.$ghostText=null}},$.prototype.addToken=function(S,_,w,v){var f=this.session;f.bgTokenizer.lines[w]=null;var u={type:_,value:S},p=f.getTokens(w);if(v==null||!p.length)p.push(u);else for(var M=0,T=0;T<p.length;T++){var R=p[T];if(M+=R.value.length,v<=M){var I=R.value.length-(M-v),D=R.value.slice(0,I),H=R.value.slice(I);p.splice(T,1,{type:R.type,value:D},u,{type:R.type,value:H});break}}this.updateLines(w,w)},$.prototype.hideTokensAfterPosition=function(S,_){for(var w=this.session.getTokens(S),v=0,f=!1,u=[],p=0;p<w.length;p++){var M=w[p];if(v+=M.value.length,M.type!=="ghost_text"){if(f){u.push({type:M.type,value:M.value}),M.type="hidden_token";continue}v===_&&(f=!0)}}return this.updateLines(S,S),u},$.prototype.removeExtraToken=function(S,_){this.session.bgTokenizer.lines[S]=null,this.updateLines(S,S)},$.prototype.setTheme=function(S,_){var w=this;if(this.$themeId=S,w._dispatchEvent("themeChange",{theme:S}),!S||typeof S=="string"){var v=S||this.$options.theme.initialValue;a.loadModule(["theme",v],f)}else f(S);function f(u){if(w.$themeId!=S)return _&&_();if(!u||!u.cssClass)throw new Error("couldn't load module "+S+" or it didn't call define");u.$id&&(w.$themeId=u.$id),A.importCssString(u.cssText,u.cssClass,w.container),w.theme&&A.removeCssClass(w.container,w.theme.cssClass);var p="padding"in u?u.padding:"padding"in(w.theme||{})?4:w.$padding;if(w.$padding&&p!=w.$padding&&w.setPadding(p),w.$gutterLayer){var M=u.$showGutterCursorMarker;M&&!w.$gutterLayer.$showCursorMarker?w.$gutterLayer.$showCursorMarker="theme":!M&&w.$gutterLayer.$showCursorMarker=="theme"&&(w.$gutterLayer.$showCursorMarker=null)}w.$theme=u.cssClass,w.theme=u,A.addCssClass(w.container,u.cssClass),A.setCssClass(w.container,"ace_dark",u.isDark),w.$size&&(w.$size.width=0,w.$updateSizeAsync()),w._dispatchEvent("themeLoaded",{theme:u}),_&&_(),d.isSafari&&w.scroller&&(w.scroller.style.background="red",w.scroller.style.background="")}},$.prototype.getTheme=function(){return this.$themeId},$.prototype.setStyle=function(S,_){A.setCssClass(this.container,S,_!==!1)},$.prototype.unsetStyle=function(S){A.removeCssClass(this.container,S)},$.prototype.setCursorStyle=function(S){A.setStyle(this.scroller.style,"cursor",S)},$.prototype.setMouseCursor=function(S){A.setStyle(this.scroller.style,"cursor",S)},$.prototype.attachToShadowRoot=function(){A.importCssString(m,"ace_editor.css",this.container)},$.prototype.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$curs
950orLayer.destroy(),this.removeAllListeners(),this.container.textContent="",this.setOption("useResizeObserver",!1)},$.prototype.$updateCustomScrollbar=function(S){var _=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),S===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(w){_.$scrollAnimation||_.session.setScrollTop(w.data-_.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(w){_.$scrollAnimation||_.session.setScrollLeft(w.data-_.scrollMargin.left)}),this.$scrollDecorator?(this.$scrollDecorator.setScrollBarV(this.scrollBarV),this.$scrollDecorator.$updateDecorators()):(this.$scrollDecorator=new g(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators())):(this.scrollBarV=new e(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(w){_.$scrollAnimation||_.session.setScrollTop(w.data-_.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(w){_.$scrollAnimation||_.session.setScrollLeft(w.data-_.scrollMargin.left)}))},$.prototype.$addResizeObserver=function(){if(!(!window.ResizeObserver||this.$resizeObserver)){var S=this;this.$resizeTimer=C.delayedCall(function(){S.destroyed||S.onResize()},50),this.$resizeObserver=new window.ResizeObserver(function(_){var w=_[0].contentRect.width,v=_[0].contentRect.height;Math.abs(S.$size.width-w)>1||Math.abs(S.$size.height-v)>1?S.$resizeTimer.delay():S.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},$}();L.prototype.CHANGE_CURSOR=1,L.prototype.CHANGE_MARKER=2,L.prototype.CHANGE_GUTTER=4,L.prototype.CHANGE_SCROLL=8,L.prototype.CHANGE_LINES=16,L.prototype.CHANGE_TEXT=32,L.prototype.CHANGE_SIZE=64,L.prototype.CHANGE_MARKER_BACK=128,L.prototype.CHANGE_MARKER_FRONT=256,L.prototype.CHANGE_FULL=512,L.prototype.CHANGE_H_SCROLL=1024,L.prototype.$changes=0,L.prototype.$padding=null,L.prototype.$frozen=!1,L.prototype.STEPS=8,k.implement(L.prototype,y),a.defineOptions(L.prototype,"renderer",{useResizeObserver:{set:function($){!$&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):$&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function($){this.$textLayer.setShowInvisibles($)&&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($){typeof $=="number"&&(this.$printMarginColumn=$),this.$showPrintMargin=!!$,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function($){this.$gutter.style.display=$?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function($){this.$gutterLayer.$useSvgGutterIcons=$},initialValue:!1},showFoldedAnnotations:{set:function($){this.$gutterLayer.$showFoldedAnnotations=$},initialValue:!1},fadeFoldWidgets:{set:function($){A.setCssClass(this.$gutter,"ace_fade-fold-widgets",$)},initialValue:!1},showFoldWidgets:{set:function($){this.$gutterLayer.setShowFoldWidgets($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function($){this.$textLayer.setDisplayIndentGuides($)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function($){this.$textLayer.setHighlightIndentGuides($)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function($){this.$gutterLayer.setHighlightGutterLine($),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function($){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function($){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function($){typeof $=="number"&&($=$+"px"),this.container.style.fontSize=$,this.updateFontSize()},initialValue:12},fontFamily:{set:function($){this.container.style.fontFamily=$,this.updateFontSize()}},maxLines:{set:function($){this.updateFull()}},minLines:{set:function($){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function($){this.updateFull()},initialValue:0},scrollPastEnd:{set:function($){$=+$||0,this.$scrollPastEnd!=$&&(this.$scrollPastEnd=$,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function($){this.$gutterLayer.$fixedWidth=!!$,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function($){this.$updateCustomScrollbar($)},initialValue:!1},theme:{set:function($){this.setTheme($)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),x.VirtualRenderer=L}
vendor: 4,982 bytes, line 950
950),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(E,x,B){var k=E("../lib/oop"),A=E("../lib/net"),C=E("../lib/event_emitter").EventEmitter,a=E("../config");function h(i){var e="importScripts('"+A.qualifyURL(i)+"');";try{return new Blob([e],{type:"application/javascript"})}catch{var t=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new t;return s.append(e),s.getBlob("application/javascript")}}function r(i){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=h(i),t=window.URL||window.webkitURL,s=t.createObjectURL(e);return new Worker(s)}return new Worker(i)}var o=function(i){i.postMessage||(i=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=i,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,C),this.$createWorkerFromOldConfig=function(i,e,t,s,l){if(E.nameToUrl&&!E.toUrl&&(E.toUrl=E.nameToUrl),a.get("packaged")||!E.toUrl)s=s||a.moduleUrl(e,"worker");else{var c=this.$normalizePath;s=s||c(E.toUrl("ace/worker/worker.js",null,"_"));var y={};i.forEach(function(m){y[m]=c(E.toUrl(m,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=r(s),l&&this.send("importScripts",l),this.$worker.postMessage({init:!0,tlns:y,module:e,classname:t}),this.$worker},this.onMessage=function(i){var e=i.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var t=this.callbacks[e.id];t&&(t(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(i){window.console&&console.error&&console.error(i)},this.$normalizePath=function(i){return A.qualifyURL(i)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(i){i.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(i,e){this.$worker.postMessage({command:i,args:e})},this.call=function(i,e,t){if(t){var s=this.callbackId++;this.callbacks[s]=t,e.push(s)}this.send(i,e)},this.emit=function(i,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:i,data:{data:e.data}})}catch(t){console.error(t.stack)}},this.attachToDocument=function(i){this.$doc&&this.terminate(),this.$doc=i,this.call("setValue",[i.getValue()]),i.on("change",this.changeListener,!0)},this.changeListener=function(i){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),i.action=="insert"?this.deltaQueue.push(i.start,i.lines):this.deltaQueue.push(i.start,i.end)},this.$sendDeltaQueue=function(){var i=this.deltaQueue;i&&(this.deltaQueue=null,i.length>50&&i.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:i}))}}).call(o.prototype);var n=function(i,e,t){var s=null,l=!1,c=Object.create(C),y=[],m=new o({messageBuffer:y,terminate:function(){},postMessage:function(d){y.push(d),s&&(l?setTimeout(g):g())}});m.setEmitSync=function(d){l=d};var g=function(){var d=y.shift();d.command?s[d.command].apply(s,d.args):d.event&&c._signal(d.event,d.data)};return c.postMessage=function(d){m.onMessage({data:d})},c.callback=function(d,b){this.postMessage({type:"call",id:b,data:d})},c.emit=function(d,b){this.postMessage({type:"event",name:d,data:b})},a.loadModule(["worker",e],function(d){for(s=new d[t](c);y.length;)g()}),m};x.UIWorkerClient=n,x.WorkerClient=o,x.createWorker=r}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(E,x,B){var k=E("./range").Range,A=E("./lib/event_emitter").EventEmitter,C=E("./lib/oop"),a=function(){function h(r,o,n,i,e,t){var s=this;this.length=o,this.session=r,this.doc=r.getDocument(),this.mainClass=e,this.othersClass=t,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var l=r.getUndoManager().$undoStack||r.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=l.length,this.setup(),r.selection.on("changeCursor",this.$onCursorChange)}return h.prototype.setup=function(){var r=this,o=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=o.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=n.addMarker(new k(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEac
950h(function(e){var t=o.createAnchor(e.row,e.column);t.$insertRight=!0,t.detach(),r.others.push(t)}),n.setUndoSelect(!1)},h.prototype.showOtherMarkers=function(){if(!this.othersActive){var r=this.session,o=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=r.addMarker(new k(n.row,n.column,n.row,n.column+o.length),o.othersClass,null,!1)})}},h.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var r=0;r<this.others.length;r++)this.session.removeMarker(this.others[r].markerId)}},h.prototype.onUpdate=function(r){if(this.$updating)return this.updateAnchors(r);var o=r;if(o.start.row===o.end.row&&o.start.row===this.pos.row){this.$updating=!0;var n=r.action==="insert"?o.end.column-o.start.column:o.start.column-o.end.column,i=o.start.column>=this.pos.column&&o.start.column<=this.pos.column+this.length+1,e=o.start.column-this.pos.column;if(this.updateAnchors(r),i&&(this.length+=n),i&&!this.session.$fromUndo){if(r.action==="insert")for(var t=this.others.length-1;t>=0;t--){var s=this.others[t],l={row:s.row,column:s.column+e};this.doc.insertMergedLines(l,r.lines)}else if(r.action==="remove")for(var t=this.others.length-1;t>=0;t--){var s=this.others[t],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()}},h.prototype.updateAnchors=function(r){this.pos.onChange(r);for(var o=this.others.length;o--;)this.others[o].onChange(r);this.updateMarkers()},h.prototype.updateMarkers=function(){if(!this.$updating){var r=this,o=this.session,n=function(e,t){o.removeMarker(e.markerId),e.markerId=o.addMarker(new k(e.row,e.column,e.row,e.column+r.length),t,null,!1)};n(this.pos,this.mainClass);for(var i=this.others.length;i--;)n(this.others[i],this.othersClass)}},h.prototype.onCursorChange=function(r){if(!(this.$updating||!this.session)){var o=this.session.selection.getCursor();o.row===this.pos.row&&o.column>=this.pos.column&&o.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",r)):(this.hideOtherMarkers(),this._emit("cursorLeave",r))}},h.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},h.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var r=this.session.getUndoManager(),o=(r.$undoStack||r.$undostack).length-this.$undoStackDepth,n=0;n<o;n++)r.undo(this.session,!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}},h}();C.implement(a.prototype,A),x.PlaceHolder=a}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(E,x,B){var k=E("../lib/event"),A=E("../lib/useragent");function C(h,r){return h.row==r.row&&h.column==r.column}function a(h){var r=h.domEvent,o=r.altKey,n=r.shiftKey,i=r.ctrlKey,e=h.getAccelKey(),t=h.getButton();if(i&&A.isMac&&(t=r.button),h.editor.inMultiSelectMode&&t==2){h.editor.textInput.onContextMenu(h.domEvent);return}if(!i&&!o&&!e){t===0&&h.editor.inMultiSelectMode&&h.editor.exitMultiSelectMode();return}if(t===0){var s=h.editor,l=s.selection,c=s.inMultiSelectMode,y=h.getDocumentPosition(),m=l.getCursor(),g=h.inSelection()||l.isEmpty()&&C(y,m),d=h.x,b=h.y,L=function(D){d=D.clientX,b=D.clientY},$=s.session,S=s.renderer.pixelToScreenCoordinates(d,b),_=S,w;if(s.$mouseHandler.$enableJumpToDef)i&&o||e&&o?w=n?"block":"add":o&&s.$blockSelectEnabled&&(w="block");else if(e&&!o){if(w="add",!c&&n)return}else o&&s.$blockSelectEnabled&&(w="block");if(w&&A.isMac&&r.ctrlKey&&s.$mouseHandler.cancelContextMenu(),w=="add"){if(!c&&g)return;if(!c){var v=l.toOrientedRange();s.addSelectionMarker(v)}var f=l.rangeList.rangeAtPoint(y);s.inVirtualSelectionMode=!0,n&&(f=null,v=l.ranges[0]||v,s.removeSelectionMarker(v)),s.once("mouseup",function(){var D=l.toOrientedRange();f&&D.isEmpty()&&C(f.cursor,D.cursor)?l.substractPoint(D.cursor):(n?l.substractPoint(v.cursor):v&&(s.removeSelectionMarker(v),l.addRange(v)),l.addRange(D)),s.inVirtualSelectionMode=!1})}else if(w=="block"){h.stop(),s.inVirtualSelectionMode=!0;var u,p=[],M=function(){var D=s.renderer.pixelToScreenCoordinates(d,b),H=$.screenToDocumentPosition(D.row,D.column,D.offsetX);C(_,D)&&C(H,l.lead)||(_=D,s.selection.moveToPosition(H),s.renderer.scrollCursorIntoView(),s.removeSelectionMarkers(p),p=l.rectangularRangeBlock(_,S),s.$mouseHandler.$clickSelection&&p.length==1&&p[0].isEmpty()&&(p[0]=s.$mouseHandler.$clickSelection.clone()),p.forEach(s.addSelectionMarker,s),s.updateSelectionMarkers())};c&&!e?l.toSingleRange():!c&&e&&(u=l.toOrientedRange(),s.addSelectionMarker(u)),n?S=$.documentToScreenPosition(l.lead):l.moveToPosition(y),_={row:-1,
950column:-1};var T=function(D){M(),clearInterval(I),s.removeSelectionMarkers(p),p.length||(p=[l.toOrientedRange()]),u&&(s.removeSelectionMarker(u),l.toSingleRange(u));for(var H=0;H<p.length;H++)l.addRange(p[H]);s.inVirtualSelectionMode=!1,s.$mouseHandler.$clickSelection=null},R=M;k.capture(s.container,L,T);var I=setInterval(function(){R()},20);return h.preventDefault()}}}x.onMouseDown=a}),ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"],function(E,x,B){x.defaultCommands=[{name:"addCursorAbove",description:"Add cursor above",exec:function(A){A.selectMoreLines(-1)},bindKey:{win:"Ctrl-Alt-Up",mac:"Ctrl-Alt-Up"},scrollIntoView:"cursor",readOnly:!0},{name:"addCursorBelow",description:"Add cursor below",exec:function(A){A.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(A){A.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(A){A.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(A){A.selectMore(-1)},bindKey:{win:"Ctrl-Alt-Left",mac:"Ctrl-Alt-Left"},scrollIntoView:"cursor",readOnly:!0},{name:"selectMoreAfter",description:"Select more after",exec:function(A){A.selectMore(1)},bindKey:{win:"Ctrl-Alt-Right",mac:"Ctrl-Alt-Right"},scrollIntoView:"cursor",readOnly:!0},{name:"selectNextBefore",description:"Select next before",exec:function(A){A.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(A){A.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(A){A.multiSelect.rangeCount>1?A.multiSelect.joinSelections():A.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(A){A.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(A){A.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(A){A.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(A){A.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(A){return A&&A.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,B){var k=E("./range_list").RangeList,A=E("./range").Range,C=E("./selection").Selection,a=E("./mouse/multi_select_handler").onMouseDown,h=E("./lib/event"),r=E("./lib/lang"),o=E("./commands/multi_select_commands");x.commands=o.defaultCommands.concat(o.multiSelectCommands);var n=E("./search").Search,i=new n;function e(m,g,d){return i.$options.wrap=!0,i.$options.needle=g,i.$options.backwards=d==-1,i.find(m)}var t=E("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(t.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 b=this.rangeList.add(m);return this.$onAddRange(m),b.length&&this.$onRemoveRange(b),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 b=this.ranges.indexOf(m[d]);this.ranges.splice(b,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 b=m[d],L=b.start.row,$=b.end.row;if(L===$)g.push(b.clone());else{for(g.push(new A(L,b.start.column,L,this.session.getLine(L).length));++L<$;)g.push(this.getLineRange(L,!0));g.push(new A($,0,$,b.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=A.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=A.fromPoints(m[0].start,g.end);this.toSingleRange(),this.setSelectionRange(d,g.cursor==g.start)}else{var b=this.session.documentToScreenPosition(this.cursor),L=this.session.documentToScreenPosition(this.anchor),$=this.rectangularRangeBlock(b,L);$.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(m,g,d){var b=[],L=m.column<g.column;if(L)var $=m.column,S=g.column,_=m.offsetX,w=g.offsetX;else var $=g.column,S=m.column,_=g.offsetX,w=m.offsetX;var v=m.row<g.row;if(v)var f=m.row,u=g.row;else var f=g.row,u=m.row;$<0&&($=0),f<0&&(f=0),f==u&&(d=!0);for(var p,M=f;M<=u;M++){var T=A.fromPoints(this.session.screenToDocumentPosition(M,$,_),this.session.screenToDocumentPosition(M,S,w));if(T.isEmpty()){if(p&&l(T.end,p))break;p=T.end}T.cursor=L?T.start:T.end,b.push(T)}if(v&&b.reverse(),!d){for(var R=b.length-1;b[R].isEmpty()&&R>0;)R--;if(R>0)for(var I=0;b[I].isEmpty();)I++;for(var D=R;D>=I;D--)b[D].isEmpty()&&b.splice(D,1)}return b}}).call(C.prototype);var s=E("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(
950),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 b=m[d];if(b.marker){this.session.removeMarker(b.marker);var L=g.indexOf(b);L!=-1&&g.splice(L,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(o.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(o.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"?b=d.forEachSelection(g,m.args):g.multiSelectAction=="forEachLine"?b=d.forEachSelection(g,m.args,!0):g.multiSelectAction=="single"?(d.exitMultiSelectMode(),b=g.exec(d,m.args||{})):b=g.multiSelectAction(d,m.args||{});else{var b=g.exec(d,m.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return b}},this.forEachSelection=function(m,g,d){if(!this.inVirtualSelectionMode){var b=d&&d.keepOrder,L=d==!0||d&&d.$byLines,$=this.session,S=this.selection,_=S.rangeList,w=(b?S:_).ranges,v;if(!w.length)return m.exec?m.exec(this,g||{}):m(this,g||{});var f=S._eventRegistry;S._eventRegistry={};var u=new C($);this.inVirtualSelectionMode=!0;for(var p=w.length;p--;){if(L)for(;p>0&&w[p].start.row==w[p-1].end.row;)p--;u.fromOrientedRange(w[p]),u.index=p,this.selection=$.selection=u;var M=m.exec?m.exec(this,g||{}):m(this,g||{});!v&&M!==void 0&&(v=M),u.toOrientedRange(w[p])}u.detach(),this.selection=$.selection=S,this.inVirtualSelectionMode=!1,S._eventRegistry=f,S.mergeOverlappingRanges(),S.ranges[0]&&S.fromOrientedRange(S.ranges[0]);var T=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),T&&T.from==T.to&&this.renderer.animateScrolling(T.from),v}},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=[],b=0;b<g.length;b++)d.push(this.session.getTextRange(g[b]));var L=this.session.getDocument().getNewLineCharacter();m=d.join(L),m.length==(d.length-1)*L.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 b=g==this.multiSelect.anchor?d.cursor==d.start?d.end:d.start:d.cursor;b.row!=g.row||this.session.$clipPositionToDocument(b.row,b.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 b=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();g.needle=this.session.getTextRange(b)}this.$search.set(g);var L=this.$search.findAll(this.session);if(!L.length)return 0;var $=this.multiSelect;d||$.toSingleRange(L[0]);for(var S=L.length;S--;)$.addRange(L[S],!0);return b&&$.rangeList.rangeAtPoint(b.start)&&$.addRange(b,!0),L.length},this.selectMoreLines=function(m,g){var d=this.selection.toOrientedRange(),b=d.cursor==d.end,L=this.session.documentToScreenPosition(d.cursor);this.selection.$desiredColumn&&(L.column=this.selection.$desiredColumn);var $=this.session.screenToDocumentPosition(L.row+m,L.column);if(d.isEmpty())var _=$;else var S=this.session.documentToScreenPosition(b?d.end:d.start),_=this.session.screenToDocumentPosition(S.row+m,S.column);if(b){var w=A.fromPoints($,_);w.cursor=w.start}else{var w=A.fromPoints(_,$);w.cursor=w.end}if(w.desiredColumn=L.column,!this.selection.inMultiSelectMode)this.selection.addRange(d);else if(g)var v=d.cursor;this.selection.addRange(w),v&&this.selection.substractPoint(v)},this.transposeSelections=function(m){for(var g=this.session,d=g.multiSelect,b=d.ranges,L=b.length;L--;){var $=b[L];if($.isEmpty()){var S=g.getWordRange($.start.row,$.start.column);$.start.row=S.start.row,$.start.column=S.start.column,$.end.row=S.end.row,$.end.column=S.end.column}}d.mergeOverlappingRanges();for(var _=[],L=b.length;L--;){var $=b[L];_.unshift(g.getTextRange($))}m<0?_.unshift(_.pop()):_.push(_.shift());for(var L=b.length;L--;){var $=b[L],w=$.clone();g.replace($,_[L]),$.start.row=w.start.row,$.start.column=w.start.column}d.fromOrientedRange(d.ranges[0])},this.selectMore=function(m,g,d){var b=this.session,L=b.multiSelect,$=L.toOrientedRange();if(!($.isEmpty()&&($=b.getWordRange($.start.row,$.start.column),$.cursor=m==-1?$.start:$.end,this.multiSelect.addRange($),d))){var S=b.getTextRange($),_=e(b,S,m);_&&(_.cursor=m==-1?_.start:_.end,this.session.unfold(_),this.multiSelect.addRange(_),this.renderer.scrollCursorIntoView(null,.5)),g&&this.multiSelect.substractPoint($.cursor)}},this.alignCursors=function(){var m=this.session,g=m.multiSelect,d=g.ranges,b=-1,L=d.filter(function(R){if(R.cursor.row==b)return!0;b=R.cursor.row});if(!d.length||L.length==d.length-1){var $=this.selection.getRange(),S=$.start.row,_=$.end.row,w=S==_;if(w){var v=this.session.getLength(),f;do f=this.session.getLine(_);while(/[=:]/.test(f)&&++_<v);do f=this.session.getLine(S);while(/[=:]/.test(f)&&--S>0);S<0&&(S=0),_>=v&&(_=v-1)}var u=this.session.removeFullLines(S,_);u=this.$reAlignText(u,w),this.session.insert({row:S,column:0},u.join(` 951`)+` 952`),w||($.start.column=0,$.end.column=u[u.length-1].length),this.selection.setRange($)}
952else{L.forEach(function(R){g.substractPoint(R.cursor)});var p=0,M=1/0,T=d.map(function(R){var I=R.cursor,D=m.getLine(I.row),H=D.substr(I.column).search(/\S/g);return H==-1&&(H=0),I.column>p&&(p=I.column),H<M&&(M=H),H});d.forEach(function(R,I){var D=R.cursor,H=p-D.column,O=T[I]-M;H>O?m.insert(D,r.stringRepeat(" ",H-O)):m.remove(new A(D.row,D.column,D.row,D.column-H+O)),R.start.column=R.end.column=p,R.start.row=R.end.row=D.row,R.cursor=R.end}),g.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(m,g){var d=!0,b=!0,L,$,S;return m.map(function(u){var p=u.match(/(\s*)(.*?)(\s*)([=:].*)/);return p?L==null?(L=p[1].length,$=p[2].length,S=p[3].length,p):(L+$+S!=p[1].length+p[2].length+p[3].length&&(b=!1),L!=p[1].length&&(d=!1),L>p[1].length&&(L=p[1].length),$<p[2].length&&($=p[2].length),S>p[3].length&&(S=p[3].length),p):[u]}).map(g?w:d?b?v:w:f);function _(u){return r.stringRepeat(" ",u)}function w(u){return u[2]?_(L)+u[2]+_($-u[2].length+S)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function v(u){return u[2]?_(L+$-u[2].length)+u[2]+_(S)+u[4].replace(/^([=:])\s+/,"$1 "):u[0]}function f(u){return u[2]?_(L)+u[2]+_(S)+u[4].replace(/^([=:])\s+/,"$1 "):u[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 c(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(o.defaultCommands),y(m))}function y(m){if(!m.textInput)return;var g=m.textInput.getElement(),d=!1;h.addListener(g,"keydown",function(L){var $=L.keyCode==18&&!(L.ctrlKey||L.shiftKey||L.metaKey);m.$blockSelectEnabled&&$?d||(m.renderer.setMouseCursor("crosshair"),d=!0):d&&b()},m),h.addListener(g,"keyup",b,m),h.addListener(g,"blur",b,m);function b(L){d&&(m.renderer.setMouseCursor(""),d=!1)}}x.MultiSelect=c,E("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(m){c(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,B){var k=E("../../range").Range,A=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(C,a,h){var r=C.getLine(h);return this.foldingStartMarker.test(r)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(r)?"end":""},this.getFoldWidgetRange=function(C,a,h){return null},this.indentationBlock=function(C,a,h){var r=/\S/,o=C.getLine(a),n=o.search(r);if(n!=-1){for(var i=h||o.length,e=C.getLength(),t=a,s=a;++a<e;){var l=C.getLine(a).search(r);if(l!=-1){if(l<=n){var c=C.getTokenAt(a,0);if(!c||c.type!=="string")break}s=a}}if(s>t){var y=C.getLine(s).length;return new k(t,i,s,y)}}},this.openingBracketBlock=function(C,a,h,r,o){var n={row:h,column:r+1}
952,i=C.$findClosingBracket(a,n,o);if(i){var e=C.foldWidgets[i.row];return e==null&&(e=C.getFoldWidget(i.row)),e=="start"&&i.row>n.row&&(i.row--,i.column=C.getLine(i.row).length),k.fromPoints(n,i)}},this.closingBracketBlock=function(C,a,h,r,o){var n={row:h,column:r},i=C.$findOpeningBracket(a,n);if(i)return i.column++,n.column--,k.fromPoints(i,n)}}).call(A.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],function(E,x,B){var k=E("../lib/dom"),A=E("../range").Range,C=E("../config").nls;function a(r,o,n){for(var i=0,e=r.length-1;i<=e;){var t=i+e>>1,s=n(o,r[t]);if(s>0)i=t+1;else if(s<0)e=t-1;else return t}return-(i+1)}function h(r,o,n){var i=r.getAnnotations().sort(A.comparePoints);if(i.length){var e=a(i,{row:o,column:-1},A.comparePoints);e<0&&(e=-e-1),e>=i.length?e=n>0?0:i.length-1:e===0&&n<0&&(e=i.length-1);var t=i[e];if(!(!t||!n)){if(t.row===o){do t=i[e+=n];while(t&&t.row===o);if(!t)return i.slice()}var s=[];o=t.row;do s[n<0?"unshift":"push"](t),t=i[e+=n];while(t&&t.row==o);return s.length&&s}}}x.showErrorMarker=function(r,o){var n=r.session,i=r.getCursorPosition(),e=i.row,t=n.widgetManager.getWidgetsAtRow(e).filter(function(L){return L.type=="errorMarker"})[0];t?t.destroy():e-=o;var s=h(n,e,o),l;if(s){var c=s[0];i.column=(c.pos&&typeof c.column!="number"?c.pos.sc:c.column)||0,i.row=c.row,l=r.renderer.$gutterLayer.$annotations[i.row]}else{if(t)return;l={displayText:[C("error-marker.good-state","Looks good!")],className:"ace_ok"}}r.session.unfold(i.row),r.selection.moveToPosition(i);var y={row:i.row,fixedWidth:!0,coverGutter:!0,el:k.createElement("div"),type:"errorMarker"},m=y.el.appendChild(k.createElement("div")),g=y.el.appendChild(k.createElement("div"));g.className="error_widget_arrow "+l.className;var d=r.renderer.$cursorLayer.getPixelPosition(i).left;g.style.left=d+r.renderer.gutterWidth-5+"px",y.el.className="error_widget_wrapper",m.className="error_widget "+l.className,l.displayText.forEach(function(L,$){m.appendChild(k.createTextNode(L)),$<l.displayText.length-1&&m.appendChild(k.createElement("br"))}),m.appendChild(k.createElement("div"));var b=function(L,$,S){if($===0&&(S==="esc"||S==="return"))return y.destroy(),{command:"null"}};y.destroy=function(){r.$mouseHandler.isMousePressed||(r.keyBinding.removeKeyboardHandler(b),n.widgetManager.removeLineWidget(y),r.off("changeSelection",y.destroy),r.off("changeSession",y.destroy),r.off("mouseup",y.destroy),r.off("change",y.destroy))},r.keyBinding.addKeyboardHandler(b),r.on("changeSelection",y.destroy),r.on("changeSession",y.destroy),r.on("mouseup",y.destroy),r.on("change",y.destroy),r.session.widgetManager.addLineWidget(y),y.el.onmousedown=r.focus.bind(r),r.renderer.scrollCursorIntoView(null,.5,{bottom:y.el.offsetHeight})},k.importCssString(` 953 .error_widget_wrapper { 954 background: inherit; 955 color: inherit; 956 border:none 957 } 958 .error_widget { 959 border-top: solid 2px; 960 border-bottom: solid 2px; 961 margin: 5px 0; 962 padding: 10px 40px; 963 white-space: pre-wrap; 964 } 965 .error_widget.ace_error, .error_widget_arrow.ace_error{ 966 border-color: #ff5a5a 967 } 968 .error_widget.ace_warning, .error_widget_arrow.ace_warning{ 969 border-color: #F1D817 970 } 971 .error_widget.ace_info, .error_widget_arrow.ace_info{ 972 border-color: #5a5a5a 973 } 974 .error_widget.ace_ok, .error_widget_arrow.ace_ok{ 975 border-color: #5aaa5a 976 } 977 .error_widget_arrow { 978 position: absolute; 979 border: solid 5px; 980 border-top-color: transparent!important; 981 border-right-color: transparent!important; 982 border-left-color: transparent!important; 983 top: -5px; 984 } 985`,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(E,x,B){E("./loader_build")(x);var k=E("./lib/dom"),A=E("./range").Range,C=E("./editor").Editor,a=E("./edit_session").EditSession,h=E("./un
985domanager").UndoManager,r=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(n,i){if(typeof n=="string"){var e=n;if(n=document.getElementById(e),!n)throw new Error("ace.edit can't find div #"+e)}if(n&&n.env&&n.env.editor instanceof C)return n.env.editor;var t="";if(n&&/input|textarea/i.test(n.tagName)){var s=n;t=s.value,n=k.createElement("pre"),s.parentNode.replaceChild(n,s)}else n&&(t=n.textContent,n.innerHTML="");var l=x.createEditSession(t),c=new C(new r(n),l,i),y={document:l,editor:c,onResize:c.resize.bind(c,null)};return s&&(y.textarea=s),c.on("destroy",function(){y.editor.container.env=null}),c.container.env=c.env=y,c},x.createEditSession=function(n,i){var e=new a(n,i);return e.setUndoManager(new h),e},x.Range=A,x.Editor=C,x.EditSession=a,x.UndoManager=h,x.VirtualRenderer=r;var o=x.config.version;x.version=o}),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 B in E)E.hasOwnProperty(B)&&(x.ace[B]=E[B]);x.ace.default=x.ace,Q&&(Q.exports=x.ace)})}()})(te);var re=te.exports;const ae=ne(re);var ie={exports:{}};(function(Q,J){ace.define("ace/ext/modelist",["require","exports","module"],function(E,x,B){var k=[];function A(s){for(var l=r.text,c=s.split(/[\/\\]/).pop(),y=0;y<k.length;y++)if(k[y].supportsFile(c)){l=k[y];break}return l}var C=function(){function s(l,c,y){this.name=l,this.caption=c,this.mode="ace/mode/"+l,this.extensions=y;var m;/\^/.test(y)?m=y.replace(/\|(\^)?/g,function(g,d){return"$|"+(d?"^":"^.*\\.")})+"$":m="\\.("+y+")$",this.extRe=new RegExp(m,"gi")}return s.prototype.supportsFile=function(l){return l.match(this.extRe)},s}(),a={ABAP:["abap"],ABC:["abc"],ActionScript:["as"],ADA:["ada|adb"],Alda:["alda"],Apache_Conf:["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"],Apex:["apex|cls|trigger|tgr"],AQL:["aql"],AsciiDoc:["asciidoc|adoc"],ASL:["dsl|asl|asl.json"],Assembly_ARM32:["s"],Assembly_x86:["asm|a"],Astro:["astro"],AutoHotKey:["ahk"],Basic:["bas|bak"],BatchFile:["bat|cmd"],BibTeX:["bib"],C_Cpp:["cpp|c|cc|cxx|h|hh|hpp|ino"],C9Search:["c9search_results"],Cirru:["cirru|cr"],Clojure:["clj|cljs"],Clue:["clue"],Cobol:["CBL|COB"],coffee:["coffee|cf|cson|^Cakefile"],ColdFusion:["cfm|cfc"],Crystal:["cr"],CSharp:["cs"],Csound_Document:["csd"],Csound_Orchestra:["orc"],Csound_Score:["sco"],CSS:["css"],CSV:["csv"],Curly:["curly"],Cuttlefish:["conf"],D:["d|di"],Dart:["dart"],Diff:["diff|patch"],Django:["djt|html.djt|dj.html|djhtml"],Dockerfile:["^Dockerfile"],Dot:["dot"],Drools:["drl"],Edifact:["edi"],Eiffel:["e|ge"],EJS:["ejs"],Elixir:["ex|exs"],Elm:["elm"],Erlang:["erl|hrl"],Flix:["flix"],Forth:["frt|fs|ldr|fth|4th"],Fortran:["f|f90"],FSharp:["fsi|fs|ml|mli|fsx|fsscript"],FSL:["fsl"],FTL:["ftl"],Gcode:["gcode"],Gherkin:["feature"],Gitignore:["^.gitignore"],Glsl:["glsl|frag|vert"],Gobstones:["gbs"],golang:["go"],GraphQLSchema:["gql"],Groovy:["groovy"],HAML:["haml"],Handlebars:["hbs|handlebars|tpl|mustache"],Haskell:["hs"],Haskell_Cabal:["cabal"],haXe:["hx"],Hjson:["hjson"],HTML:["html|htm|xhtml|we|wpy"],HTML_Elixir:["eex|html.eex"],HTML_Ruby:["erb|rhtml|html.erb"],INI:["ini|conf|cfg|prefs"],Io:["io"],Ion:["ion"],Jack:["jack"],Jade:["jade|pug"],Java:["java"],JavaScript:["js|jsm|cjs|mjs"],JEXL:["jexl"],JSON:["json"],JSON5:["json5"],JSONiq:["jq"],JSP:["jsp"],JSSM:["jssm|jssm_state"],JSX:["jsx"],Julia:["jl"],Kotlin:["kt|kts"],LaTeX:["tex|latex|ltx|bib"],Latte:["latte"],LESS:["less"],Liquid:["liquid"],Lisp:["lisp"],LiveScript:["ls"],Log:["log"],LogiQL:["logic|lql"],Logtalk:["lgt"],LSL:["lsl"],Lua:["lua"],LuaPage:["lp"],Lucene:["lucene"],Makefile:["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"],Markdown:["md|markdown"],Mask:["mask"],MATLAB:["matlab"],Maze:["mz"],MediaWiki:["wiki|mediawiki"],MEL:["mel"],MIPS:["s|asm"],MIXAL:["mixal"],MUSHCode:["mc|mush"],MySQL:["mysql"],Nasal:["nas"],Nginx:["nginx|conf"],Nim:["nim"],Nix:["nix"],NSIS:["nsi|nsh"],Nunjucks:["nunjucks|nunjs|nj|njk"],ObjectiveC:["m|mm"],OCaml:["ml|mli"],Odin:["odin"],PartiQL:["partiql|pql"],Pascal:["pas|p"],Perl:["pl|pm"],pgSQL:["pgsql"],PHP:["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"],PHP_Laravel_blade:["blade.php"],Pig:["pig"],PLSQL:["plsql"],Powershell:["ps1"],Praat:["praat|praatscript|psc|proc"],Prisma:["prisma"],Prolog:["plg|prolog"],Properties:["properties"],Protobuf:["proto"],PRQL:["prql"],Puppet:["epp|pp"],Python:["py"],QML:["qml"],R:["r"],Raku:["raku|rakumod|rakutest|p6|pl6|pm6"],Razor:["cshtml|asp"],RDoc:["Rd"],Red:["red|reds"],RHTML:["Rhtml"],Robot:["robot|resource"],RST:["rst"],Ruby:["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"],Rust:["rs"],SaC:["sac"],SASS:["sass"],SCAD:["scad"],Scala:["scala|sbt"],Scheme:["scm|sm|rkt|oak|scheme"],Scrypt:["scrypt"],SCSS:["scss"],SH:["sh|bash|^.bashrc"],SJS:["sjs"],Slim:["slim|skim"],Smarty:["smarty|tpl"],Smithy:["smithy"],snippets:["snippets"],Soy_Template:["soy"],Space:["space"],SPARQL:["rq"],SQL:["sql"],SQLServer:["sqlserver"],Stylus:["styl|stylus"],SVG:["svg"],Swift:["swift"],Tcl:["tcl"],Terraform:["tf","tfvars","terragrunt"],Tex:["tex"],Text:["txt"],Textile:["textile"],Toml:["toml"],TSV:["tsv"],TSX:["tsx"],Turtle:["ttl"],Twig:["twig|swig"],Typescript:["ts|mts|cts|typescript|str"],Vala:["vala"],VBScript:["vbs|vb"],Velocity:["vm"],Verilog:["v|vh|sv|svh"],VHDL:["vhd|vhdl"],Visualforce:["vfp|component|page"],Vue:["vue"],Wollok:["wlk|wpgm|wtest"],XML:["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"],XQuery:["xq"],YAML:["yaml|yml"],Zeek:["zeek|bro"],Zig:["zig"]},h={ObjectiveC:"Objective-C",CSharp:"C#",golang:"Go",C_Cpp:"C and C++",Csound_Document:"Csound Document",Csound_Orchestra:"Csound",Csound_Score:"Csound Score",coffee:"CoffeeScript",HTML_Ruby:"HTML (Ruby)",HTML_Elixir:"HTML (Elixir)",FTL:"FreeMarker",PHP_Laravel_blade:"PHP (Blade Template)",Perl6:"Perl 6",AutoHotKey:"AutoHotkey / AutoIt"},r={};for(var o in a){var n=a[o],i=(h[o]||o).replace(/_/g," "),e=o.toLowerCase(),t=new C(e,i,n[0]);r[e]=t,k.push(t)}x.getModeForPath=A,x.modes=k,x.modesByName=r}),function(){ace.require(["ace/ext/modelist"],function(E){Q&&(Q.exports=E)})}()})(ie);var le=ie.exports;export{se as a,ae as b,oe as c,le as e,ne as g};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.