import{a as Ce}from"./prismjs-BZPoR7_J.js?v=1773287522785";var pe={exports:{}},we;function Se(){return we||(we=1,(function(me,Me){(function(){var E="ace",x=(function(){return this})();!x&&typeof window<"u"&&(x=window);var z=function(o,i,n){if(typeof o!="string"){z.original?z.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(n=i),z.modules[o]||(z.payloads[o]=n,z.modules[o]=null)};z.modules={},z.payloads={};var k=function(o,i,n){if(typeof i=="string"){var t=a(o,i);if(t!=null)return n&&n(),t}else if(Object.prototype.toString.call(i)==="[object Array]"){for(var e=[],r=0,s=i.length;ra.length)&&(S=a.length),S-=M.length;var c=a.indexOf(M,S);return c!==-1&&c===S}),String.prototype.repeat||k(String.prototype,"repeat",function(M){for(var S="",a=this;M>0;)M&1&&(S+=a),(M>>=1)&&(a+=a);return S}),String.prototype.includes||k(String.prototype,"includes",function(M,S){return this.indexOf(M,S)!=-1}),Object.assign||(Object.assign=function(M){if(M==null)throw new TypeError("Cannot convert undefined or null to object");for(var S=Object(M),a=1;a>>0,c=arguments[1],o=c>>0,i=o<0?Math.max(a+o,0):Math.min(o,a),n=arguments[2],t=n===void 0?a:n>>0,e=t<0?Math.max(a+t,0):Math.min(t,a);i0;)a&1&&(c+=S),(a>>=1)&&(S+=S);return c};var k=/^\s\s*/,M=/\s\s*$/;x.stringTrimLeft=function(S){return S.replace(k,"")},x.stringTrimRight=function(S){return S.replace(M,"")},x.copyObject=function(S){var a={};for(var c in S)a[c]=S[c];return a},x.copyArray=function(S){for(var a=[],c=0,o=S.length;c65535?2:1}}),ace.define("ace/lib/useragent",["require","exports","module"],function(E,x,z){x.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},x.getOS=function(){return x.isMac?x.OS.MAC:x.isLinux?x.OS.LINUX:x.OS.WINDOWS};var k=typeof navigator=="object"?navigator:{},M=(/mac|win|linux/i.exec(k.platform)||["other"])[0].toLowerCase(),S=k.userAgent||"",a=k.appName||"";x.isWin=M=="win",x.isMac=M=="mac",x.isLinux=M=="linux",x.isIE=a=="Microsoft Internet Explorer"||a.indexOf("MSAppHost")>=0?parseFloat((S.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((S.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),x.isOldIE=x.isIE&&x.isIE<9,x.isGecko=x.isMozilla=S.match(/ Gecko\/\d+/),x.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",x.isWebKit=parseFloat(S.split("WebKit/")[1])||void 0,x.isChrome=parseFloat(S.split(" Chrome/")[1])||void 0,x.isSafari=parseFloat(S.split(" Safari/")[1])&&!x.isChrome||void 0,x.isEdge=parseFloat(S.split(" Edge/")[1])||void 0,x.isAIR=S.indexOf("AdobeAIR")>=0,x.isAndroid=S.indexOf("Android")>=0,x.isChromeOS=S.indexOf(" CrOS ")>=0,x.isIOS=/iPad|iPhone|iPod/.test(S)&&!window.MSStream,x.isIOS&&(x.isMac=!0),x.isMobile=x.isIOS||x.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(E,x,z){var k=E("./useragent"),M="http://www.w3.org/1999/xhtml";x.buildDom=function n(t,e,r){if(typeof t=="string"&&t){var s=document.createTextNode(t);return e&&e.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&e&&e.appendChild(t),t;if(typeof t[0]!="string"||!t[0]){for(var l=[],u=0;u"u")){if(a){if(e)c();else if(e===!1)return a.push([n,t])}if(!S){var r=e;!e||!e.getRootNode?r=document:(r=e.getRootNode(),(!r||r==e)&&(r=document));var s=r.ownerDocument||r;if(t&&x.hasCssString(t,r))return null;t&&(n+="\n/*# sourceURL=ace/css/"+t+" */");var l=x.createElement("style");l.appendChild(s.createTextNode(n)),t&&(l.id=t),r==s&&(r=x.getDocumentHead(s)),r.insertBefore(l,r.firstChild)}}}if(x.importCssString=o,x.importCssStylsheet=function(n,t){x.buildDom(["link",{rel:"stylesheet",href:n}],x.getDocumentHead(t))},x.scrollbarWidth=function(n){var t=x.createElement("ace_inner");t.style.width="100%",t.style.minWidth="0px",t.style.height="200px",t.style.display="block";var e=x.createElement("ace_outer"),r=e.style;r.position="absolute",r.left="-10000px",r.overflow="hidden",r.width="200px",r.minWidth="0px",r.height="150px",r.display="block",e.appendChild(t);var s=n&&n.documentElement||document&&document.documentElement;if(!s)return 0;s.appendChild(e);var l=t.offsetWidth;r.overflow="scroll";var u=t.offsetWidth;return l===u&&(u=e.clientWidth),s.removeChild(e),l-u},x.computedStyle=function(n,t){return window.getComputedStyle(n,"")||{}},x.setStyle=function(n,t,e){n[t]!==e&&(n[t]=e)},x.HAS_CSS_ANIMATION=!1,x.HAS_CSS_TRANSFORMS=!1,x.HI_DPI=k.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,k.isChromeOS&&(x.HI_DPI=!1),typeof document<"u"){var i=document.createElement("div");x.HI_DPI&&i.style.transform!==void 0&&(x.HAS_CSS_TRANSFORMS=!0),!k.isEdge&&typeof i.style.animationName<"u"&&(x.HAS_CSS_ANIMATION=!0),i=null}x.HAS_CSS_TRANSFORMS?x.translate=function(n,t,e){n.style.transform="translate("+Math.round(t)+"px, "+Math.round(e)+"px)"}:x.translate=function(n,t,e){n.style.top=Math.round(e)+"px",n.style.left=Math.round(t)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("./dom");x.get=function(M,S){var a=new XMLHttpRequest;a.open("GET",M,!0),a.onreadystatechange=function(){a.readyState===4&&S(a.responseText)},a.send(null)},x.loadScript=function(M,S){var a=k.getDocumentHead(),c=document.createElement("script");c.src=M,a.appendChild(c),c.onload=c.onreadystatechange=function(o,i){(i||!c.readyState||c.readyState=="loaded"||c.readyState=="complete")&&(c=c.onload=c.onreadystatechange=null,i||S())}},x.qualifyURL=function(M){var S=document.createElement("a");return S.href=M,S.href}}),ace.define("ace/lib/oop",["require","exports","module"],function(E,x,z){x.inherits=function(k,M){k.super_=M,k.prototype=Object.create(M.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}})},x.mixin=function(k,M){for(var S in M)k[S]=M[S];return k},x.implement=function(k,M){x.mixin(k,M)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(E,x,z){var k={},M=function(){this.propagationStopped=!0},S=function(){this.defaultPrevented=!0};k._emit=k._dispatchEvent=function(a,c){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var o=this._eventRegistry[a]||[],i=this._defaultHandlers[a];if(!(!o.length&&!i)){(typeof c!="object"||!c)&&(c={}),c.type||(c.type=a),c.stopPropagation||(c.stopPropagation=M),c.preventDefault||(c.preventDefault=S),o=o.slice();for(var n=0;n1&&(l=r[r.length-2]);var b=c[e+"Path"];return b==null?b=c.basePath:s=="/"&&(e=s=""),b&&b.slice(-1)!="/"&&(b+="/"),b+e+s+l+this.get("suffix")},x.setModuleUrl=function(t,e){return c.$moduleUrls[t]=e};var o=function(t,e){if(t==="ace/theme/textmate"||t==="./theme/textmate")return e(null,E("./theme/textmate"));if(i)return i(t,e);console.error("loader is not configured")},i;x.setLoader=function(t){i=t},x.dynamicModules=Object.create(null),x.$loading={},x.$loaded={},x.loadModule=function(t,e){var r;if(Array.isArray(t))var s=t[0],l=t[1];else if(typeof t=="string")var l=t;var u=function(b){if(b&&!x.$loading[l])return e&&e(b);if(x.$loading[l]||(x.$loading[l]=[]),x.$loading[l].push(e),!(x.$loading[l].length>1)){var m=function(){o(l,function(g,d){d&&(x.$loaded[l]=d),x._emit("load.module",{name:l,module:d});var $=x.$loading[l];x.$loading[l]=null,$.forEach(function(T){T&&T(d)})})};if(!x.get("packaged"))return m();M.loadScript(x.moduleUrl(l,s),m),n()}};if(x.dynamicModules[l])x.dynamicModules[l]().then(function(b){b.default?u(b.default):u(b)});else{try{r=this.$require(l)}catch(b){}u(r||x.$loaded[l])}},x.$require=function(t){if(typeof z.require=="function"){var e="require";return z[e](t)}},x.setModuleLoader=function(t,e){x.dynamicModules[t]=e};var n=function(){!c.basePath&&!c.workerPath&&!c.modePath&&!c.themePath&&!Object.keys(c.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),n=function(){})};x.version="1.36.2"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(E,x,z){E("./lib/fixoldbrowsers");var k=E("./config");k.setLoader(function(c,o){E([c],function(i){o(null,i)})});var M=(function(){return this||typeof window<"u"&&window})();z.exports=function(c){k.init=S,k.$require=E,c.require=E},S(!0);function S(c){if(!(!M||!M.document)){k.set("packaged",c||E.packaged||z.packaged||M.define&&(void 0).packaged);var o={},i="",n=document.currentScript||document._currentScript,t=n&&n.ownerDocument||document;n&&n.src&&(i=n.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var e=t.getElementsByTagName("script"),r=0;r ["+this.end.row+"/"+this.end.column+"]"},M.prototype.contains=function(S,a){return this.compare(S,a)==0},M.prototype.compareRange=function(S){var a,c=S.end,o=S.start;return a=this.compare(c.row,c.column),a==1?(a=this.compare(o.row,o.column),a==1?2:a==0?1:0):a==-1?-2:(a=this.compare(o.row,o.column),a==-1?-1:a==1?42:0)},M.prototype.comparePoint=function(S){return this.compare(S.row,S.column)},M.prototype.containsRange=function(S){return this.comparePoint(S.start)==0&&this.comparePoint(S.end)==0},M.prototype.intersects=function(S){var a=this.compareRange(S);return a==-1||a==0||a==1},M.prototype.isEnd=function(S,a){return this.end.row==S&&this.end.column==a},M.prototype.isStart=function(S,a){return this.start.row==S&&this.start.column==a},M.prototype.setStart=function(S,a){typeof S=="object"?(this.start.column=S.column,this.start.row=S.row):(this.start.row=S,this.start.column=a)},M.prototype.setEnd=function(S,a){typeof S=="object"?(this.end.column=S.column,this.end.row=S.row):(this.end.row=S,this.end.column=a)},M.prototype.inside=function(S,a){return this.compare(S,a)==0?!(this.isEnd(S,a)||this.isStart(S,a)):!1},M.prototype.insideStart=function(S,a){return this.compare(S,a)==0?!this.isEnd(S,a):!1},M.prototype.insideEnd=function(S,a){return this.compare(S,a)==0?!this.isStart(S,a):!1},M.prototype.compare=function(S,a){return!this.isMultiLine()&&S===this.start.row?athis.end.column?1:0:Sthis.end.row?1:this.start.row===S?a>=this.start.column?0:-1:this.end.row===S?a<=this.end.column?0:1:0},M.prototype.compareStart=function(S,a){return this.start.row==S&&this.start.column==a?-1:this.compare(S,a)},M.prototype.compareEnd=function(S,a){return this.end.row==S&&this.end.column==a?1:this.compare(S,a)},M.prototype.compareInside=function(S,a){return this.end.row==S&&this.end.column==a?1:this.start.row==S&&this.start.column==a?-1:this.compare(S,a)},M.prototype.clipRows=function(S,a){if(this.end.row>a)var c={row:a+1,column:0};else if(this.end.rowa)var o={row:a+1,column:0};else if(this.start.row1?(T++,T>4&&(T=1)):T=1,M.isIE){var v=Math.abs(h.clientX-A)>5||Math.abs(h.clientY-C)>5;(!w||v)&&(T=1),w&&clearTimeout(w),w=setTimeout(function(){w=null},m[T-1]||600),T==1&&(A=h.clientX,C=h.clientY)}if(h._clicks=T,g[d]("mousedown",h),T>4)T=0;else if(T>1)return g[d](f[T],h)}Array.isArray(b)||(b=[b]),b.forEach(function(h){t(h,"mousedown",p,$)})};function r(b){return 0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0)}x.getModifierString=function(b){return k.KEY_MODS[r(b)]};function s(b,m,g){var d=r(m);if(!g&&m.code&&(g=k.$codeToKeyCode[m.code]||g),!M.isMac&&S){if(m.getModifierState&&(m.getModifierState("OS")||m.getModifierState("Win"))&&(d|=8),S.altGr)if((3&d)!=3)S.altGr=0;else return;if(g===18||g===17){var $=m.location;if(g===17&&$===1)S[g]==1&&(a=m.timeStamp);else if(g===18&&d===3&&$===2){var T=m.timeStamp-a;T<50&&(S.altGr=!0)}}}if(g in k.MODIFIER_KEYS&&(g=-1),!(!d&&g===13&&m.location===3&&(b(m,d,-g),m.defaultPrevented))){if(M.isChromeOS&&d&8){if(b(m,d,g),m.defaultPrevented)return;d&=-9}return!d&&!(g in k.FUNCTION_KEYS)&&!(g in k.PRINTABLE_KEYS)?!1:b(m,d,g)}}x.addCommandKeyListener=function(b,m,g){var d=null;t(b,"keydown",function($){S[$.keyCode]=(S[$.keyCode]||0)+1;var T=s(m,$,$.keyCode);return d=$.defaultPrevented,T},g),t(b,"keypress",function($){d&&($.ctrlKey||$.altKey||$.shiftKey||$.metaKey)&&(x.stopEvent($),d=null)},g),t(b,"keyup",function($){S[$.keyCode]=null},g),S||(l(),t(window,"focus",l))};function l(){S=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!M.isOldIE){var u=1;x.nextTick=function(b,m){m=m||window;var g="zero-timeout-message-"+u++,d=function($){$.data==g&&(x.stopPropagation($),e(m,"message",d),b())};t(m,"message",d),m.postMessage(g,"*")}}x.$idleBlocked=!1,x.onIdle=function(b,m){return setTimeout(function g(){x.$idleBlocked?setTimeout(g,100):b()},m)},x.$idleBlockId=null,x.blockIdle=function(b){x.$idleBlockId&&clearTimeout(x.$idleBlockId),x.$idleBlocked=!0,x.$idleBlockId=setTimeout(function(){x.$idleBlocked=!1},b||100)},x.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),x.nextFrame?x.nextFrame=x.nextFrame.bind(window):x.nextFrame=function(b){setTimeout(b,17)}}),ace.define("ace/clipboard",["require","exports","module"],function(E,x,z){var k;z.exports={lineMode:!1,pasteCancelled:function(){return k&&k>Date.now()-50?!0:k=!1},cancel:function(){k=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(E,x,z){var k=E("../lib/event"),M=E("../config").nls,S=E("../lib/useragent"),a=E("../lib/dom"),c=E("../lib/lang"),o=E("../clipboard"),i=S.isChrome<18,n=S.isIE,t=S.isChrome>63,e=400,r=E("../lib/keys"),s=r.KEY_MODS,l=S.isIOS,u=l?/\s/:/\n/,b=S.isMobile,m;m=function(g,d){var $=a.createElement("textarea");$.className="ace_text-input",$.setAttribute("wrap","off"),$.setAttribute("autocorrect","off"),$.setAttribute("autocapitalize","off"),$.setAttribute("spellcheck","false"),$.style.opacity="0",g.insertBefore($,g.firstChild);var T=!1,A=!1,C=!1,w=!1,f="";b||($.style.fontSize="1px");var p=!1,h=!1,v="",y=0,L=0,R=0,_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,N=0;try{var W=document.activeElement===$}catch(B){}this.setNumberOfExtraLines=function(B){if(_=Number.MAX_SAFE_INTEGER,I=Number.MIN_SAFE_INTEGER,B<0){N=0;return}N=B},this.setAriaOptions=function(B){if(B.activeDescendant?($.setAttribute("aria-haspopup","true"),$.setAttribute("aria-autocomplete",B.inline?"both":"list"),$.setAttribute("aria-activedescendant",B.activeDescendant)):($.setAttribute("aria-haspopup","false"),$.setAttribute("aria-autocomplete","both"),$.removeAttribute("aria-activedescendant")),B.role&&$.setAttribute("role",B.role),B.setLabel){$.setAttribute("aria-roledescription",M("text-input.aria-roledescription","editor"));var G="";if(d.$textInputAriaLabel&&(G+="".concat(d.$textInputAriaLabel,", ")),d.session){var K=d.session.selection.cursor.row;G+=M("text-input.aria-label","Cursor at row $0",[K+1])}$.setAttribute("aria-label",G)}},this.setAriaOptions({role:"textbox"}),k.addListener($,"blur",function(B){h||(d.onBlur(B),W=!1)},d),k.addListener($,"focus",function(B){if(!h){if(W=!0,S.isEdge)try{if(!document.hasFocus())return}catch(G){}d.onFocus(B),S.isEdge?setTimeout(D):D()}},d),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:d.renderer.enableKeyboardAccessibility}),f||t||this.$focusScroll=="browser")return $.focus({preventScroll:!0});var B=$.style.top;$.style.position="fixed",$.style.top="0px";try{var G=$.getBoundingClientRect().top!=0}catch(X){return}var K=[];if(G)for(var Q=$.parentElement;Q&&Q.nodeType==1;)K.push(Q),Q.setAttribute("ace_nocontext","true"),!Q.parentElement&&Q.getRootNode?Q=Q.getRootNode().host:Q=Q.parentElement;$.focus({preventScroll:!0}),G&&K.forEach(function(X){X.removeAttribute("ace_nocontext")}),setTimeout(function(){$.style.position="",$.style.top=="0px"&&($.style.top=B)},0)},this.blur=function(){$.blur()},this.isFocused=function(){return W},d.on("beforeEndOperation",function(){var B=d.curOp,G=B&&B.command&&B.command.name;if(G!="insertstring"){var K=G&&(B.docChanged||B.selectionChanged);C&&K&&(v=$.value="",ce()),D()}});var O=function(B,G){for(var K=G,Q=1;Q<=B-_&&Q<2*N+1;Q++)K+=d.session.getLine(B-Q).length+1;return K},D=l?function(B){if(!(!W||T&&!B||w)){B||(B="");var G="\n ab"+B+"cde fg\n";G!=$.value&&($.value=v=G);var K=4,Q=4+(B.length||(d.selection.isEmpty()?0:1));(y!=K||L!=Q)&&$.setSelectionRange(K,Q),y=K,L=Q}}:function(){if(!(C||w)&&!(!W&&!U)){C=!0;var B=0,G=0,K="";if(d.session){var Q=d.selection,X=Q.getRange(),te=Q.cursor.row;te===I+1?(_=I+1,I=_+2*N):te===_-1?(I=_-1,_=I-2*N):(te<_-1||te>I+1)&&(_=te>N?te-N:0,I=te>N?te+N:2*N);for(var ne=[],ie=_;ie<=I;ie++)ne.push(d.session.getLine(ie));if(K=ne.join("\n"),B=O(X.start.row,X.start.column),G=O(X.end.row,X.end.column),X.start.row<_){var ee=d.session.getLine(_-1);B=X.start.row<_-1?0:B,G+=ee.length+1,K=ee+"\n"+K}else if(X.end.row>I){var J=d.session.getLine(I+1);G=X.end.row>I+1?J.length:X.end.column,G+=K.length+1,K=K+"\n"+J}else b&&te>0&&(K="\n"+K,G+=1,B+=1);K.length>e&&(B=v.length&&B.value===v&&v&&B.selectionEnd!==L},H=function(B){C||(T?T=!1:F($)?(d.selectAll(),D()):b&&$.selectionStart!=y&&D())},P=null;this.setInputHandler=function(B){P=B},this.getInputHandler=function(){return P};var U=!1,j=function(B,G){if(U&&(U=!1),A)return D(),B&&d.onPaste(B),A=!1,"";for(var K=$.selectionStart,Q=$.selectionEnd,X=y,te=v.length-L,ne=B,ie=B.length-K,ee=B.length-Q,J=0;X>0&&v[J]==B[J];)J++,X--;for(ne=ne.slice(J),J=1;te>0&&v.length-J>y-1&&v[v.length-J]==B[B.length-J];)J++,te--;ie-=J-1,ee-=J-1;var se=ne.length-J+1;if(se<0&&(X=-se,se=0),ne=ne.slice(0,se),!G&&!ne&&!ie&&!X&&!te&&!ee)return"";w=!0;var he=!1;return S.isAndroid&&ne==". "&&(ne=" ",he=!0),ne&&!X&&!te&&!ie&&!ee||p?d.onTextInput(ne):d.onTextInput(ne,{extendLeft:X,extendRight:te,restoreStart:ie,restoreEnd:ee}),w=!1,v=B,y=K,L=Q,R=ee,he?"\n":ne},V=function(B){if(C)return le();if(B&&B.inputType){if(B.inputType=="historyUndo")return d.execCommand("undo");if(B.inputType=="historyRedo")return d.execCommand("redo")}var G=$.value,K=j(G,!0);(G.length>e+100||u.test(K)||b&&y<1&&y==L)&&D()},Y=function(B,G,K){var Q=B.clipboardData||window.clipboardData;if(!(!Q||i)){var X=n||K?"Text":"text/plain";try{return G?Q.setData(X,G)!==!1:Q.getData(X)}catch(te){if(!K)return Y(te,G,!0)}}},Z=function(B,G){var K=d.getCopyText();if(!K)return k.preventDefault(B);Y(B,K)?(l&&(D(K),T=K,setTimeout(function(){T=!1},10)),G?d.onCut():d.onCopy(),k.preventDefault(B)):(T=!0,$.value=K,$.select(),setTimeout(function(){T=!1,D(),G?d.onCut():d.onCopy()}))},oe=function(B){Z(B,!0)},re=function(B){Z(B,!1)},q=function(B){var G=Y(B);o.pasteCancelled()||(typeof G=="string"?(G&&d.onPaste(G,B),S.isIE&&setTimeout(D),k.preventDefault(B)):($.value="",A=!0))};k.addCommandKeyListener($,function(B,G,K){if(!C)return d.onCommandKey(B,G,K)},d),k.addListener($,"select",H,d),k.addListener($,"input",V,d),k.addListener($,"cut",oe,d),k.addListener($,"copy",re,d),k.addListener($,"paste",q,d),(!("oncut"in $)||!("oncopy"in $)||!("onpaste"in $))&&k.addListener(g,"keydown",function(B){if(!(S.isMac&&!B.metaKey||!B.ctrlKey))switch(B.keyCode){case 67:re(B);break;case 86:q(B);break;case 88:oe(B);break}},d);var ae=function(B){if(!(C||!d.onCompositionStart||d.$readOnly)&&(C={},!p)){B.data&&(C.useTextareaForIME=!1),setTimeout(le,0),d._signal("compositionStart"),d.on("mousedown",de);var G=d.getSelectionRange();G.end.row=G.start.row,G.end.column=G.start.column,C.markerRange=G,C.selectionStart=y,d.onCompositionStart(C),C.useTextareaForIME?(v=$.value="",y=0,L=0):($.msGetInputContext&&(C.context=$.msGetInputContext()),$.getInputContext&&(C.context=$.getInputContext()))}},le=function(){if(!(!C||!d.onCompositionUpdate||d.$readOnly)){if(p)return de();if(C.useTextareaForIME)d.onCompositionUpdate($.value);else{var B=$.value;j(B),C.markerRange&&(C.context&&(C.markerRange.start.column=C.selectionStart=C.context.compositionStartOffset),C.markerRange.end.column=C.markerRange.start.column+L-C.selectionStart+R)}}},ce=function(B){!d.onCompositionEnd||d.$readOnly||(C=!1,d.onCompositionEnd(),d.off("mousedown",de),B&&V())};function de(){h=!0,$.blur(),$.focus(),h=!1}var ve=c.delayedCall(le,50).schedule.bind(null,null);function be(B){B.keyCode==27&&$.value.length<$.selectionStart&&(C||(v=$.value),y=L=-1,D()),ve()}k.addListener($,"compositionstart",ae,d),k.addListener($,"compositionupdate",le,d),k.addListener($,"keyup",be,d),k.addListener($,"keydown",ve,d),k.addListener($,"compositionend",ce,d),this.getElement=function(){return $},this.setCommandMode=function(B){p=B,$.readOnly=!1},this.setReadOnly=function(B){p||($.readOnly=B)},this.setCopyWithEmptySelection=function(B){},this.onContextMenu=function(B){U=!0,D(),d._emit("nativecontextmenu",{target:d,domEvent:B}),this.moveToMouse(B,!0)},this.moveToMouse=function(B,G){f||(f=$.style.cssText),$.style.cssText=(G?"z-index:100000;":"")+(S.isIE?"opacity:0.1;":"")+"text-indent: -"+(y+L)*d.renderer.characterWidth*.5+"px;";var K=d.container.getBoundingClientRect(),Q=a.computedStyle(d.container),X=K.top+(parseInt(Q.borderTopWidth)||0),te=K.left+(parseInt(K.borderLeftWidth)||0),ne=K.bottom-X-$.clientHeight-2,ie=function(ee){a.translate($,ee.clientX-te-2,Math.min(ee.clientY-X-2,ne))};ie(B),B.type=="mousedown"&&(d.renderer.$isMousePressed=!0,clearTimeout(fe),S.isWin&&k.capture(d.container,ie,ue))},this.onContextMenuClose=ue;var fe;function ue(){clearTimeout(fe),fe=setTimeout(function(){f&&($.style.cssText=f,f=""),d.renderer.$isMousePressed=!1,d.renderer.$keepTextAreaAtCursor&&d.renderer.$moveTextAreaToCursor()},0)}var ge=function(B){d.textInput.onContextMenu(B),ue()};k.addListener($,"mouseup",ge,d),k.addListener($,"mousedown",function(B){B.preventDefault(),ue()},d),k.addListener(d.renderer.scroller,"contextmenu",ge,d),k.addListener($,"contextmenu",ge,d),l&&$e(g,d,$);function $e(B,G,K){var Q=null,X=!1;K.addEventListener("keydown",function(ne){Q&&clearTimeout(Q),X=!0},!0),K.addEventListener("keyup",function(ne){Q=setTimeout(function(){X=!1},100)},!0);var te=function(ne){if(document.activeElement===K&&!(X||C||G.$mouseHandler.isMousePressed)&&!T){var ie=K.selectionStart,ee=K.selectionEnd,J=null,se=0;if(ie==0?J=r.up:ie==1?J=r.home:ee>L&&v[ee]=="\n"?J=r.end:ieL&&v.slice(0,ee).split("\n").length>2?J=r.down:ee>L&&v[ee-1]==" "?(J=r.right,se=s.option):(ee>L||ee==L&&L!=y&&ie==ee)&&(J=r.right),ie!==ee&&(se|=s.shift),J){var he=G.onCommandKey({},se,J);if(!he&&G.commands){J=r.keyCodeToString(J);var ye=G.commands.findKeyCommand(se,J);ye&&G.execCommand(ye)}y=ie,L=ee,D("")}}};document.addEventListener("selectionchange",te),G.on("destroy",function(){document.removeEventListener("selectionchange",te)})}this.destroy=function(){$.parentElement&&$.parentElement.removeChild($)}},x.TextInput=m,x.$setUserAgentForTests=function(g,d){b=g,l=d}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(E,x,z){var k=E("../lib/useragent"),M=0,S=550,a=(function(){function i(n){n.$clickSelection=null;var t=n.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(n)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(n)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(n)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(n)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(n));var e=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];e.forEach(function(r){n[r]=this[r]},this),n.selectByLines=this.extendSelectionBy.bind(n,"getLineRange"),n.selectByWords=this.extendSelectionBy.bind(n,"getWordRange")}return i.prototype.onMouseDown=function(n){var t=n.inSelection(),e=n.getDocumentPosition();this.mousedownEvent=n;var r=this.editor,s=n.getButton();if(s!==0){var l=r.getSelectionRange(),u=l.isEmpty();(u||s==1)&&r.selection.moveToPosition(e),s==2&&(r.textInput.onContextMenu(n.domEvent),k.isMozilla||n.preventDefault());return}if(this.mousedownEvent.time=Date.now(),t&&!r.isFocused()&&(r.focus(),this.$focusTimeout&&!this.$clickSelection&&!r.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(n);return}return this.captureMouse(n),this.startSelect(e,n.domEvent._clicks>1),n.preventDefault()},i.prototype.startSelect=function(n,t){n=n||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var e=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?e.selection.selectToPosition(n):t||e.selection.moveToPosition(n),t||this.select(),e.setStyle("ace_selecting"),this.setState("select"))},i.prototype.select=function(){var n,t=this.editor,e=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(e);if(r==-1)n=this.$clickSelection.end;else if(r==1)n=this.$clickSelection.start;else{var s=o(this.$clickSelection,e);e=s.cursor,n=s.anchor}t.selection.setSelectionAnchor(n.row,n.column)}t.selection.selectToPosition(e),t.renderer.scrollCursorIntoView()},i.prototype.extendSelectionBy=function(n){var t,e=this.editor,r=e.renderer.screenToTextCoordinates(this.x,this.y),s=e.selection[n](r.row,r.column);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s.start),u=this.$clickSelection.comparePoint(s.end);if(l==-1&&u<=0)t=this.$clickSelection.end,(s.end.row!=r.row||s.end.column!=r.column)&&(r=s.start);else if(u==1&&l>=0)t=this.$clickSelection.start,(s.start.row!=r.row||s.start.column!=r.column)&&(r=s.end);else if(l==-1&&u==1)r=s.end,t=s.start;else{var b=o(this.$clickSelection,r);r=b.cursor,t=b.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(r),e.renderer.scrollCursorIntoView()},i.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},i.prototype.focusWait=function(){var n=c(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),t=Date.now();(n>M||t-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(n){var t=n.getDocumentPosition(),e=this.editor,r=e.session,s=r.getBracketRange(t);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=e.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},i.prototype.onTripleClick=function(n){var t=n.getDocumentPosition(),e=this.editor;this.setState("selectByLines");var r=e.getSelectionRange();r.isMultiLine()&&r.contains(t.row,t.column)?(this.$clickSelection=e.selection.getLineRange(r.start.row),this.$clickSelection.end=e.selection.getLineRange(r.end.row).end):this.$clickSelection=e.selection.getLineRange(t.row),this.select()},i.prototype.onQuadClick=function(n){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(n){if(!n.getAccelKey()){n.getShiftKey()&&n.wheelY&&!n.wheelX&&(n.wheelX=n.wheelY,n.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var e=this.$lastScroll,r=n.domEvent.timeStamp,s=r-e.t,l=s?n.wheelX/s:e.vx,u=s?n.wheelY/s:e.vy;s=1&&t.renderer.isScrollableBy(n.wheelX*n.speed,0)&&(m=!0),b<=1&&t.renderer.isScrollableBy(0,n.wheelY*n.speed)&&(m=!0),m)e.allowed=r;else if(r-e.allowedS.clientHeight;a||M.preventDefault()}}),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],function(E,x,z){var k=this&&this.__extends||(function(){var r=function(s,l){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,b){u.__proto__=b}||function(u,b){for(var m in b)Object.prototype.hasOwnProperty.call(b,m)&&(u[m]=b[m])},r(s,l)};return function(s,l){if(typeof l!="function"&&l!==null)throw new TypeError("Class extends value "+String(l)+" is not a constructor or null");r(s,l);function u(){this.constructor=s}s.prototype=l===null?Object.create(l):(u.prototype=l.prototype,new u)}})(),M=this&&this.__values||function(r){var s=typeof Symbol=="function"&&Symbol.iterator,l=s&&r[s],u=0;if(l)return l.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&u>=r.length&&(r=void 0),{value:r&&r[u++],done:!r}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")},S=E("./lib/dom");E("./lib/event");var a=E("./range").Range,c=E("./lib/scroll").preventParentScroll,o="ace_tooltip",i=(function(){function r(s){this.isOpen=!1,this.$element=null,this.$parentNode=s}return r.prototype.$init=function(){return this.$element=S.createElement("div"),this.$element.className=o,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},r.prototype.getElement=function(){return this.$element||this.$init()},r.prototype.setText=function(s){this.getElement().textContent=s},r.prototype.setHtml=function(s){this.getElement().innerHTML=s},r.prototype.setPosition=function(s,l){this.getElement().style.left=s+"px",this.getElement().style.top=l+"px"},r.prototype.setClassName=function(s){S.addCssClass(this.getElement(),s)},r.prototype.setTheme=function(s){this.$element.className=o+" "+(s.isDark?"ace_dark ":"")+(s.cssClass||"")},r.prototype.show=function(s,l,u){s!=null&&this.setText(s),l!=null&&u!=null&&this.setPosition(l,u),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},r.prototype.hide=function(s){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=o,this.isOpen=!1)},r.prototype.getHeight=function(){return this.getElement().offsetHeight},r.prototype.getWidth=function(){return this.getElement().offsetWidth},r.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},r})(),n=(function(){function r(){this.popups=[]}return r.prototype.addPopup=function(s){this.popups.push(s),this.updatePopups()},r.prototype.removePopup=function(s){var l=this.popups.indexOf(s);l!==-1&&(this.popups.splice(l,1),this.updatePopups())},r.prototype.updatePopups=function(){var s,l,u,b;this.popups.sort(function(f,p){return p.priority-f.priority});var m=[];try{for(var g=M(this.popups),d=g.next();!d.done;d=g.next()){var $=d.value,T=!0;try{for(var A=(u=void 0,M(m)),C=A.next();!C.done;C=A.next()){var w=C.value;if(this.doPopupsOverlap(w,$)){T=!1;break}}}catch(f){u={error:f}}finally{try{C&&!C.done&&(b=A.return)&&b.call(A)}finally{if(u)throw u.error}}T?m.push($):$.hide()}}catch(f){s={error:f}}finally{try{d&&!d.done&&(l=g.return)&&l.call(g)}finally{if(s)throw s.error}}},r.prototype.doPopupsOverlap=function(s,l){var u=s.getElement().getBoundingClientRect(),b=l.getElement().getBoundingClientRect();return u.leftb.left&&u.topb.top},r})(),t=new n;x.popupManager=t,x.Tooltip=i;var e=(function(r){k(s,r);function s(l){l===void 0&&(l=document.body);var u=r.call(this,l)||this;u.timeout=void 0,u.lastT=0,u.idleTime=350,u.lastEvent=void 0,u.onMouseOut=u.onMouseOut.bind(u),u.onMouseMove=u.onMouseMove.bind(u),u.waitForHover=u.waitForHover.bind(u),u.hide=u.hide.bind(u);var b=u.getElement();return b.style.whiteSpace="pre-wrap",b.style.pointerEvents="auto",b.addEventListener("mouseout",u.onMouseOut),b.tabIndex=-1,b.addEventListener("blur",(function(){b.contains(document.activeElement)||this.hide()}).bind(u)),b.addEventListener("wheel",c),u}return s.prototype.addToEditor=function(l){l.on("mousemove",this.onMouseMove),l.on("mousedown",this.hide),l.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},s.prototype.removeFromEditor=function(l){l.off("mousemove",this.onMouseMove),l.off("mousedown",this.hide),l.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},s.prototype.onMouseMove=function(l,u){this.lastEvent=l,this.lastT=Date.now();var b=u.$mouseHandler.isMousePressed;if(this.isOpen){var m=this.lastEvent&&this.lastEvent.getDocumentPosition();(!this.range||!this.range.contains(m.row,m.column)||b||this.isOutsideOfText(this.lastEvent))&&this.hide()}this.timeout||b||(this.lastEvent=l,this.timeout=setTimeout(this.waitForHover,this.idleTime))},s.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var l=Date.now()-this.lastT;if(this.idleTime-l>10){this.timeout=setTimeout(this.waitForHover,this.idleTime-l);return}this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor)},s.prototype.isOutsideOfText=function(l){var u=l.editor,b=l.getDocumentPosition(),m=u.session.getLine(b.row);if(b.column==m.length){var g=u.renderer.pixelToScreenCoordinates(l.clientX,l.clientY),d=u.session.documentToScreenPosition(b.row,b.column);if(d.column!=g.column||d.row!=g.row)return!0}return!1},s.prototype.setDataProvider=function(l){this.$gatherData=l},s.prototype.showForRange=function(l,u,b,m){var g=10;if(!(m&&m!=this.lastEvent)&&!(this.isOpen&&document.activeElement==this.getElement())){var d=l.renderer;this.isOpen||(t.addPopup(this),this.$registerCloseEvents(),this.setTheme(d.theme)),this.isOpen=!0,this.addMarker(u,l.session),this.range=a.fromPoints(u.start,u.end);var $=d.textToScreenCoordinates(u.start.row,u.start.column),T=d.scroller.getBoundingClientRect();$.pageX=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},S=E("../lib/dom"),a=E("../lib/event"),c=E("../tooltip").Tooltip,o=E("../config").nls;E("../lib/lang");function i(t){var e=t.editor,r=e.renderer.$gutterLayer,s=new n(e);t.editor.setDefaultHandler("guttermousedown",function(d){if(!(!e.isFocused()||d.getButton()!=0)){var $=r.getRegion(d);if($!="foldWidgets"){var T=d.getDocumentPosition().row,A=e.session.selection;if(d.getShiftKey())A.selectTo(T,0);else{if(d.domEvent.detail==2)return e.selectAll(),d.preventDefault();t.$clickSelection=e.selection.getLineRange(T)}return t.setState("selectByLines"),t.captureMouse(d),d.preventDefault()}}});var l,u;function b(){var d=u.getDocumentPosition().row,$=e.session.getLength();if(d==$){var T=e.renderer.pixelToScreenCoordinates(0,u.y).row,A=u.$pos;if(T>e.session.documentToScreenRow(A.row,A.column))return m()}if(s.showTooltip(d),!!s.isOpen)if(e.on("mousewheel",m),t.$tooltipFollowsMouse)g(u);else{var C=u.getGutterRow(),w=r.$lines.get(C);if(w){var f=w.element.querySelector(".ace_gutter_annotation"),p=f.getBoundingClientRect(),h=s.getElement().style;h.left=p.right+"px",h.top=p.bottom+"px"}else g(u)}}function m(){l&&(l=clearTimeout(l)),s.isOpen&&(s.hideTooltip(),e.off("mousewheel",m))}function g(d){s.setPosition(d.x,d.y)}t.editor.setDefaultHandler("guttermousemove",function(d){var $=d.domEvent.target||d.domEvent.srcElement;if(S.hasCssClass($,"ace_fold-widget"))return m();s.isOpen&&t.$tooltipFollowsMouse&&g(d),u=d,!l&&(l=setTimeout(function(){l=null,u&&!t.isMousePressed?b():m()},50))}),a.addListener(e.renderer.$gutter,"mouseout",function(d){u=null,!(!s.isOpen||l)&&(l=setTimeout(function(){l=null,m()},50))},e),e.on("changeSession",m),e.on("input",m)}x.GutterHandler=i;var n=(function(t){k(e,t);function e(r){var s=t.call(this,r.container)||this;return s.editor=r,s}return e.prototype.setPosition=function(r,s){var l=window.innerWidth||document.documentElement.clientWidth,u=window.innerHeight||document.documentElement.clientHeight,b=this.getWidth(),m=this.getHeight();r+=15,s+=15,r+b>l&&(r-=r+b-l),s+m>u&&(s-=20+m),c.prototype.setPosition.call(this,r,s)},Object.defineProperty(e,"annotationLabels",{get:function(){return{error:{singular:o("gutter-tooltip.aria-label.error.singular","error"),plural:o("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:o("gutter-tooltip.aria-label.security.singular","security finding"),plural:o("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:o("gutter-tooltip.aria-label.warning.singular","warning"),plural:o("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:o("gutter-tooltip.aria-label.info.singular","information message"),plural:o("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:o("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:o("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),e.prototype.showTooltip=function(r){var s,l=this.editor.renderer.$gutterLayer,u=l.$annotations[r],b;u?b={displayText:Array.from(u.displayText),type:Array.from(u.type)}:b={displayText:[],type:[]};var m=l.session.getFoldLine(r);if(m&&l.$showFoldedAnnotations){for(var g={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},$,T=r+1;T<=m.end.row;T++)if(l.$annotations[T])for(var A=0;Ao?f=null:F-f>=c&&(e.renderer.scrollCursorIntoView(),f=null)}}function v(O,D){var F=Date.now(),H=e.renderer.layerConfig.lineHeight,P=e.renderer.layerConfig.characterWidth,U=e.renderer.scroller.getBoundingClientRect(),j={x:{left:b-U.left,right:U.right-b},y:{top:m-U.top,bottom:U.bottom-m}},V=Math.min(j.x.left,j.x.right),Y=Math.min(j.y.top,j.y.bottom),Z={row:O.row,column:O.column};V/P<=2&&(Z.column+=j.x.left=a&&e.renderer.scrollCursorIntoView(Z):w=F:w=null}function y(){var O=$;$=e.renderer.screenToTextCoordinates(b,m),h($,O),v($,O)}function L(){d=e.selection.toOrientedRange(),u=e.session.addMarker(d,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(g),y(),g=setInterval(y,20),T=0,M.addListener(document,"mousemove",I)}function R(){clearInterval(g),e.session.removeMarker(u),u=null,e.selection.fromOrientedRange(d),e.isFocused()&&!C&&e.$resetCursorStyle(),d=null,$=null,T=0,w=null,f=null,M.removeListener(document,"mousemove",I)}var _=null;function I(){_==null&&(_=setTimeout(function(){_!=null&&u&&R()},20))}function N(O){var D=O.types;return!D||Array.prototype.some.call(D,function(F){return F=="text/plain"||F=="Text"})}function W(O){var D=["copy","copymove","all","uninitialized"],F=["move","copymove","linkmove","all","uninitialized"],H=S.isMac?O.altKey:O.ctrlKey,P="uninitialized";try{P=O.dataTransfer.effectAllowed.toLowerCase()}catch(j){}var U="none";return H&&D.indexOf(P)>=0?U="copy":F.indexOf(P)>=0?U="move":D.indexOf(P)>=0&&(U="copy"),U}}(function(){this.dragWait=function(){var t=Date.now()-this.mousedownEvent.time;t>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var t=this.editor.container;t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor,e=t.container;e.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging");var r=S.isWin?"default":"move";t.renderer.setCursorStyle(r),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;if(S.isIE&&this.state=="dragReady"){var r=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);r>3&&e.dragDrop()}if(this.state==="dragWait"){var r=n(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);r>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,r=t.inSelection(),s=t.getButton(),l=t.domEvent.detail||1;if(l===1&&s===0&&r){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var u=t.domEvent.target||t.domEvent.srcElement;if("unselectable"in u&&(u.unselectable="on"),e.getDragDelay()){if(S.isWebKit){this.cancelDrag=!0;var b=e.container;b.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(i.prototype);function n(t,e,r,s){return Math.sqrt(Math.pow(r-t,2)+Math.pow(s-e,2))}x.DragdropHandler=i}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(E,x,z){var k=E("./mouse_event").MouseEvent,M=E("../lib/event"),S=E("../lib/dom");x.addTouchListeners=function(a,c){var o="scroll",i,n,t,e,r,s,l=0,u,b=0,m=0,g=0,d,$;function T(){var h=window.navigator&&window.navigator.clipboard,v=!1,y=function(){var _=c.getCopyText(),I=c.session.getUndoManager().hasUndo();$.replaceChild(S.buildDom(v?["span",!_&&L("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],_&&L("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],_&&L("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],h&&L("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],I&&L("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],L("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],L("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),$.firstChild)},L=function(_){return c.commands.canExecute(_,c)},R=function(_){var I=_.target.getAttribute("action");if(I=="more"||!v)return v=!v,y();I=="paste"?h.readText().then(function(N){c.execCommand(I,N)}):I&&((I=="cut"||I=="copy")&&(h?h.writeText(c.getCopyText()):document.execCommand("copy")),c.execCommand(I)),$.firstChild.style.display="none",v=!1,I!="openCommandPalette"&&c.focus()};$=S.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(_){o="menu",_.stopPropagation(),_.preventDefault(),c.textInput.focus()},ontouchend:function(_){_.stopPropagation(),_.preventDefault(),R(_)},onclick:R},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],c.container)}function A(){if(!c.getOption("enableMobileMenu")){$&&C();return}$||T();var h=c.selection.cursor,v=c.renderer.textToScreenCoordinates(h.row,h.column),y=c.renderer.textToScreenCoordinates(0,0).pageX,L=c.renderer.scrollLeft,R=c.container.getBoundingClientRect();$.style.top=v.pageY-R.top-3+"px",v.pageX-R.left=2?c.selection.getLineRange(u.row):c.session.getBracketRange(u);h&&!h.isEmpty()?c.selection.setRange(h):c.selection.selectWord(),o="wait"}M.addListener(a,"contextmenu",function(h){if(d){var v=c.textInput.getElement();v.focus()}},c),M.addListener(a,"touchstart",function(h){var v=h.touches;if(r||v.length>1){clearTimeout(r),r=null,t=-1,o="zoom";return}d=c.$mouseHandler.isMousePressed=!0;var y=c.renderer.layerConfig.lineHeight,L=c.renderer.layerConfig.lineHeight,R=h.timeStamp;e=R;var _=v[0],I=_.clientX,N=_.clientY;Math.abs(i-I)+Math.abs(n-N)>y&&(t=-1),i=h.clientX=I,n=h.clientY=N,m=g=0;var W=new k(h,c);if(u=W.getDocumentPosition(),R-t<500&&v.length==1&&!l)b++,h.preventDefault(),h.button=0,f();else{b=0;var O=c.selection.cursor,D=c.selection.isEmpty()?O:c.selection.anchor,F=c.renderer.$cursorLayer.getPixelPosition(O,!0),H=c.renderer.$cursorLayer.getPixelPosition(D,!0),P=c.renderer.scroller.getBoundingClientRect(),U=c.renderer.layerConfig.offset,j=c.renderer.scrollLeft,V=function(oe,re){return oe=oe/L,re=re/y-.75,oe*oe+re*re};if(h.clientXZ?"cursor":"anchor"),Z<3.5?o="anchor":Y<3.5?o="cursor":o="scroll",r=setTimeout(w,450)}t=R},c),M.addListener(a,"touchend",function(h){d=c.$mouseHandler.isMousePressed=!1,s&&clearInterval(s),o=="zoom"?(o="",l=0):r?(c.selection.moveToPosition(u),l=0,A()):o=="scroll"?(p(),C()):A(),clearTimeout(r),r=null},c),M.addListener(a,"touchmove",function(h){r&&(clearTimeout(r),r=null);var v=h.touches;if(!(v.length>1||o=="zoom")){var y=v[0],L=i-y.clientX,R=n-y.clientY;if(o=="wait")if(L*L+R*R>4)o="cursor";else return h.preventDefault();i=y.clientX,n=y.clientY,h.clientX=y.clientX,h.clientY=y.clientY;var _=h.timeStamp,I=_-e;if(e=_,o=="scroll"){var N=new k(h,c);N.speed=1,N.wheelX=L,N.wheelY=R,10*Math.abs(L)0)if(Z==16){for(q=re;q-1){for(q=re;q=0&&H[ce]==d;ce--)D[ce]=k}}}function I(O,D,F){if(!(M=O){for(U=P+1;U=O;)U++;for(j=P,V=U-1;j=D.length||(U=F[H-1])!=s&&U!=l||(j=D[H+1])!=s&&j!=l?u:(S&&(j=l),j==U?j:u);case T:return U=H>0?F[H-1]:b,U==s&&H+10&&F[H-1]==s)return s;if(S)return u;for(Y=H+1,V=D.length;Y=1425&&Z<=2303||Z==64286;if(U=D[Y],oe&&(U==r||U==g))return r}return H<1||(U=D[H-1])==b?u:F[H-1];case b:return S=!1,a=!0,k;case m:return c=!0,u;case w:case f:case h:case v:case p:S=!1;case y:return u}}function W(O){var D=O.charCodeAt(0),F=D>>8;return F==0?D>191?e:L[D]:F==5?/[\u0591-\u05f4]/.test(O)?r:e:F==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(O)?C:/[\u0660-\u0669\u066b-\u066c]/.test(O)?l:D==1642?A:/[\u06f0-\u06f9]/.test(O)?s:g:F==32&&D<=8287?R[D&255]:F==254&&D>=65136?g:u}x.L=e,x.R=r,x.EN=s,x.ON_R=3,x.AN=4,x.R_H=5,x.B=6,x.RLE=7,x.DOT="·",x.doBidiReorder=function(O,D,F){if(O.length<2)return{};var H=O.split(""),P=new Array(H.length),U=new Array(H.length),j=[];k=F?t:n,_(H,j,H.length,D);for(var V=0;Vg&&D[V]0&&H[V-1]==="Ù„"&&/\u0622|\u0623|\u0625|\u0627/.test(H[V])&&(j[V-1]=j[V]=x.R_H,V++);H[H.length-1]===x.DOT&&(j[H.length-1]=x.B),H[0]==="‫"&&(j[0]=x.RLE);for(var V=0;V=0&&(o=this.session.$docRowCache[n])}return o},c.prototype.getSplitIndex=function(){var o=0,i=this.session.$screenRowCache;if(i.length)for(var n,t=this.session.$getRowCacheIndex(i,this.currentRow);this.currentRow-o>0&&(n=this.session.$getRowCacheIndex(i,this.currentRow-o-1),n===t);)t=n,o++;else o=this.currentRow;return o},c.prototype.updateRowLine=function(o,i){o===void 0&&(o=this.getDocumentRow());var n=o===this.session.getLength()-1,t=n?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(o),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var e=this.session.$wrapData[o];e&&(i===void 0&&(i=this.getSplitIndex()),i>0&&e.length?(this.wrapIndent=e.indent,this.wrapOffset=this.wrapIndent*this.charWidths[k.L],this.line=ii?this.session.getOverwrite()?o:o-1:i,t=k.getVisualFromLogicalIdx(n,this.bidiMap),e=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&o<=i&&e[t]%2!==0&&t++;for(var s=0;si&&e[t]%2===0&&(r+=this.charWidths[e[t]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},c.prototype.getSelections=function(o,i){var n=this.bidiMap,t=n.bidiLevels,e,r=[],s=0,l=Math.min(o,i)-this.wrapIndent,u=Math.max(o,i)-this.wrapIndent,b=!1,m=!1,g=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,$=0;$=l&&dt+s/2;){if(t+=s,e===r.length-1){s=0;break}s=this.charWidths[r[++e]]}return e>0&&r[e-1]%2!==0&&r[e]%2===0?(n0&&r[e-1]%2===0&&r[e]%2!==0?i=1+(n>t?this.bidiMap.logicalFromVisual[e]:this.bidiMap.logicalFromVisual[e-1]):this.isRtlDir&&e===r.length-1&&s===0&&r[e-1]%2===0||!this.isRtlDir&&e===0&&r[e]%2!==0?i=1+this.bidiMap.logicalFromVisual[e]:(e>0&&r[e-1]%2!==0&&s!==0&&e--,i=this.bidiMap.logicalFromVisual[e]),i===0&&this.isRtlDir&&i++,i+this.wrapIndent},c})();x.BidiHandler=a}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/lang"),S=E("./lib/event_emitter").EventEmitter,a=E("./range").Range,c=(function(){function o(i){this.session=i,this.doc=i.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var n=this;this.cursor.on("change",function(t){n.$cursorChanged=!0,n.$silent||n._emit("changeCursor"),!n.$isEmpty&&!n.$silent&&n._emit("changeSelection"),!n.$keepDesiredColumnOnChange&&t.old.column!=t.value.column&&(n.$desiredColumn=null)}),this.anchor.on("change",function(){n.$anchorChanged=!0,!n.$isEmpty&&!n.$silent&&n._emit("changeSelection")})}return o.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},o.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},o.prototype.getCursor=function(){return this.lead.getPosition()},o.prototype.setAnchor=function(i,n){this.$isEmpty=!1,this.anchor.setPosition(i,n)},o.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},o.prototype.getSelectionLead=function(){return this.lead.getPosition()},o.prototype.isBackwards=function(){var i=this.anchor,n=this.lead;return i.row>n.row||i.row==n.row&&i.column>n.column},o.prototype.getRange=function(){var i=this.anchor,n=this.lead;return this.$isEmpty?a.fromPoints(n,n):this.isBackwards()?a.fromPoints(n,i):a.fromPoints(i,n)},o.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},o.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},o.prototype.setRange=function(i,n){var t=n?i.end:i.start,e=n?i.start:i.end;this.$setSelection(t.row,t.column,e.row,e.column)},o.prototype.$setSelection=function(i,n,t,e){if(!this.$silent){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(i,n),this.cursor.setPosition(t,e),this.$isEmpty=!a.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")}},o.prototype.$moveSelection=function(i){var n=this.lead;this.$isEmpty&&this.setSelectionAnchor(n.row,n.column),i.call(this)},o.prototype.selectTo=function(i,n){this.$moveSelection(function(){this.moveCursorTo(i,n)})},o.prototype.selectToPosition=function(i){this.$moveSelection(function(){this.moveCursorToPosition(i)})},o.prototype.moveTo=function(i,n){this.clearSelection(),this.moveCursorTo(i,n)},o.prototype.moveToPosition=function(i){this.clearSelection(),this.moveCursorToPosition(i)},o.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},o.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},o.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},o.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},o.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},o.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},o.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},o.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},o.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},o.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},o.prototype.getWordRange=function(i,n){if(typeof n>"u"){var t=i||this.lead;i=t.row,n=t.column}return this.session.getWordRange(i,n)},o.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},o.prototype.selectAWord=function(){var i=this.getCursor(),n=this.session.getAWordRange(i.row,i.column);this.setSelectionRange(n)},o.prototype.getLineRange=function(i,n){var t=typeof i=="number"?i:this.lead.row,e,r=this.session.getFoldLine(t);return r?(t=r.start.row,e=r.end.row):e=t,n===!0?new a(t,0,e,this.session.getLine(e).length):new a(t,0,e+1,0)},o.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},o.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},o.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},o.prototype.wouldMoveIntoSoftTab=function(i,n,t){var e=i.column,r=i.column+n;return t<0&&(e=i.column-n,r=i.column),this.session.isTabStop(i)&&this.doc.getLine(i.row).slice(e,r).split(" ").length-1==n},o.prototype.moveCursorLeft=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,-1))this.moveCursorTo(n.start.row,n.start.column);else if(i.column===0)i.row>0&&this.moveCursorTo(i.row-1,this.doc.getLine(i.row-1).length);else{var t=this.session.getTabSize();this.wouldMoveIntoSoftTab(i,t,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-t):this.moveCursorBy(0,-1)}},o.prototype.moveCursorRight=function(){var i=this.lead.getPosition(),n;if(n=this.session.getFoldAt(i.row,i.column,1))this.moveCursorTo(n.end.row,n.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(n.column=e)}}this.moveCursorTo(n.row,n.column)},o.prototype.moveCursorFileEnd=function(){var i=this.doc.getLength()-1,n=this.doc.getLine(i).length;this.moveCursorTo(i,n)},o.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},o.prototype.moveCursorLongWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(i,n,1);if(r){this.moveCursorTo(r.end.row,r.end.column);return}if(this.session.nonTokenRe.exec(e)&&(n+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=t.substring(n)),n>=t.length){this.moveCursorTo(i,t.length),this.moveCursorRight(),i0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(r)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(i,n)},o.prototype.$shortWordEndIndex=function(i){var n=0,t,e=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(i))n=this.session.tokenRe.lastIndex;else{for(;(t=i[n])&&e.test(t);)n++;if(n<1){for(r.lastIndex=0;(t=i[n])&&!r.test(t);)if(r.lastIndex=0,n++,e.test(t))if(n>2){n--;break}else{for(;(t=i[n])&&e.test(t);)n++;if(n>2)break}}}return r.lastIndex=0,n},o.prototype.moveCursorShortWordRight=function(){var i=this.lead.row,n=this.lead.column,t=this.doc.getLine(i),e=t.substring(n),r=this.session.getFoldAt(i,n,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(n==t.length){var s=this.doc.getLength();do i++,e=this.doc.getLine(i);while(i0&&/^\s*$/.test(e));n=e.length,/\s+$/.test(e)||(e="")}var r=M.stringReverse(e),s=this.$shortWordEndIndex(r);return this.moveCursorTo(i,n-s)},o.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},o.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},o.prototype.moveCursorBy=function(i,n){var t=this.session.documentToScreenPosition(this.lead.row,this.lead.column),e;if(n===0&&(i!==0&&(this.session.$bidiHandler.isBidiRow(t.row,this.lead.row)?(e=this.session.$bidiHandler.getPosLeft(t.column),t.column=Math.round(e/this.session.$bidiHandler.charWidths[0])):e=t.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?t.column=this.$desiredColumn:this.$desiredColumn=t.column),i!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];i<0?i-=r.rowsAbove||0:i>0&&(i+=r.rowCount-(r.rowsAbove||0))}var s=this.session.screenToDocumentPosition(t.row+i,t.column,e);i!==0&&n===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+n,n===0)},o.prototype.moveCursorToPosition=function(i){this.moveCursorTo(i.row,i.column)},o.prototype.moveCursorTo=function(i,n,t){var e=this.session.getFoldAt(i,n,1);e&&(i=e.start.row,n=e.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(i);/[\uDC00-\uDFFF]/.test(r.charAt(n))&&r.charAt(n-1)&&(this.lead.row==i&&this.lead.column==n+1?n=n-1:n=n+1),this.lead.setPosition(i,n),this.$keepDesiredColumnOnChange=!1,t||(this.$desiredColumn=null)},o.prototype.moveCursorToScreen=function(i,n,t){var e=this.session.screenToDocumentPosition(i,n);this.moveCursorTo(e.row,e.column,t)},o.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},o.prototype.fromOrientedRange=function(i){this.setSelectionRange(i,i.cursor==i.start),this.$desiredColumn=i.desiredColumn||this.$desiredColumn},o.prototype.toOrientedRange=function(i){var n=this.getRange();return i?(i.start.column=n.start.column,i.start.row=n.start.row,i.end.column=n.end.column,i.end.row=n.end.row):i=n,i.cursor=this.isBackwards()?i.start:i.end,i.desiredColumn=this.$desiredColumn,i},o.prototype.getRangeOfMovements=function(i){var n=this.getCursor();try{i(this);var t=this.getCursor();return a.fromPoints(n,t)}catch(e){return a.fromPoints(n,n)}finally{this.moveCursorToPosition(n)}},o.prototype.toJSON=function(){if(this.rangeCount)var i=this.ranges.map(function(n){var t=n.clone();return t.isBackwards=n.cursor==n.start,t});else{var i=this.getRange();i.isBackwards=this.isBackwards()}return i},o.prototype.fromJSON=function(i){if(i.start==null)if(this.rangeList&&i.length>1){this.toSingleRange(i[0]);for(var n=i.length;n--;){var t=a.fromPoints(i[n].start,i[n].end);i[n].isBackwards&&(t.cursor=t.start),this.addRange(t,!0)}return}else i=i[0];this.rangeList&&this.toSingleRange(i),this.setSelectionRange(i,i.isBackwards)},o.prototype.isEqual=function(i){if((i.length||this.rangeCount)&&i.length!=this.rangeCount)return!1;if(!i.length||!this.ranges)return this.getRange().isEqual(i);for(var n=this.ranges.length;n--;)if(!this.ranges[n].isEqual(i[n]))return!1;return!0},o})();c.prototype.setSelectionAnchor=c.prototype.setAnchor,c.prototype.getSelectionAnchor=c.prototype.getAnchor,c.prototype.setSelectionRange=c.prototype.setRange,k.implement(c.prototype,S),x.Selection=c}),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],function(E,x,z){var k=E("./lib/report_error").reportError,M=2e3,S=(function(){function a(c){this.splitRegex,this.states=c,this.regExps={},this.matchMappings={};for(var o in this.states){for(var i=this.states[o],n=[],t=0,e=this.matchMappings[o]={defaultToken:"text"},r="g",s=[],l=0;l1?u.onMatch=this.$applyToken:u.onMatch=u.token),m>1&&(/\\\d/.test(u.regex)?b=u.regex.replace(/\\([0-9]+)/g,function(g,d){return"\\"+(parseInt(d,10)+t+1)}):(m=1,b=this.removeCapturingGroups(u.regex)),!u.splitRegex&&typeof u.token!="string"&&s.push(u)),e[t]=l,t+=m,n.push(b),u.onMatch||(u.onMatch=null)}}n.length||(e[0]=0,n.push("$")),s.forEach(function(g){g.splitRegex=this.createSplitterRegexp(g.regex,r)},this),this.regExps[o]=new RegExp("("+n.join(")|(")+")|($)",r)}}return a.prototype.$setMaxTokenCount=function(c){M=c|0},a.prototype.$applyToken=function(c){var o=this.splitRegex.exec(c).slice(1),i=this.token.apply(this,o);if(typeof i=="string")return[{type:i,value:c}];for(var n=[],t=0,e=i.length;tu){var A=c.substring(u,T-$.length);m.type==g?m.value+=A:(m.type&&l.push(m),m={type:g,value:A})}for(var C=0;CM){for(b>2*c.length&&this.reportError("infinite loop with in ace tokenizer",{startState:o,line:c});u1&&i[0]!==n&&i.unshift("#tmp",n),{tokens:l,state:i.length?i:n}},a})();S.prototype.reportError=k,x.Tokenizer=S}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],function(E,x,z){var k=E("../lib/deep_copy").deepCopy,M;M=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}},(function(){this.addRules=function(c,o){if(!o){for(var i in c)this.$rules[i]=c[i];return}for(var i in c){for(var n=c[i],t=0;t=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},S.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},S.prototype.getCurrentTokenRow=function(){return this.$row},S.prototype.getCurrentTokenColumn=function(){var a=this.$rowTokens,c=this.$tokenIndex,o=a[c].start;if(o!==void 0)return o;for(o=0;c>0;)c-=1,o+=a[c].value.length;return o},S.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},S.prototype.getCurrentTokenRange=function(){var a=this.$rowTokens[this.$tokenIndex],c=this.getCurrentTokenColumn();return new k(this.$row,c,this.$row,c+a.value.length)},S})();x.TokenIterator=M}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(E,x,z){var k=E("../../lib/oop"),M=E("../behaviour").Behaviour,S=E("../../token_iterator").TokenIterator,a=E("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],o=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],i,n={},t={'"':'"',"'":"'"},e=function(l){var u=-1;if(l.multiSelect&&(u=l.selection.index,n.rangeCount!=l.multiSelect.rangeCount&&(n={rangeCount:l.multiSelect.rangeCount})),n[u])return i=n[u];i=n[u]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},r=function(l,u,b,m){var g=l.end.row-l.start.row;return{text:b+u+m,selection:[0,l.start.column+1,g,l.end.column+(g?0:1)]}},s;s=function(l){l=l||{},this.add("braces","insertion",function(u,b,m,g,d){var $=m.getCursorPosition(),T=g.doc.getLine($.row);if(d=="{"){e(m);var A=m.getSelectionRange(),C=g.doc.getTextRange(A),w=g.getTokenAt($.row,$.column);if(C!==""&&C!=="{"&&m.getWrapBehavioursEnabled())return r(A,C,"{","}");if(w&&/(?:string)\.quasi|\.xml/.test(w.type)){var f=[/tag\-(?:open|name)/,/attribute\-name/];return f.some(function(_){return _.test(w.type)})||/(string)\.quasi/.test(w.type)&&w.value[$.column-w.start-1]!=="$"?void 0:(s.recordAutoInsert(m,g,"}"),{text:"{}",selection:[1,1]})}else if(s.isSaneInsertion(m,g))return/[\]\}\)]/.test(T[$.column])||m.inMultiSelectMode||l.braces?(s.recordAutoInsert(m,g,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(m,g,"{"),{text:"{",selection:[1,1]})}else if(d=="}"){e(m);var p=T.substring($.column,$.column+1);if(p=="}"){var h=g.$findOpeningBracket("}",{column:$.column+1,row:$.row});if(h!==null&&s.isAutoInsertedClosing($,T,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(d=="\n"||d=="\r\n"){e(m);var v="";s.isMaybeInsertedClosing($,T)&&(v=a.stringRepeat("}",i.maybeInsertedBrackets),s.clearMaybeInsertedClosing());var p=T.substring($.column,$.column+1);if(p==="}"){var y=g.findMatchingBracket({row:$.row,column:$.column+1},"}");if(!y)return null;var L=this.$getIndent(g.getLine(y.row))}else if(v)var L=this.$getIndent(T);else{s.clearMaybeInsertedClosing();return}var R=L+g.getTabString();return{text:"\n"+R+"\n"+L+v,selection:[1,R.length,1,R.length]}}else s.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(u,b,m,g,d){var $=g.doc.getTextRange(d);if(!d.isMultiLine()&&$=="{"){e(m);var T=g.doc.getLine(d.start.row),A=T.substring(d.end.column,d.end.column+1);if(A=="}")return d.end.column++,d;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(u,b,m,g,d){if(d=="("){e(m);var $=m.getSelectionRange(),T=g.doc.getTextRange($);if(T!==""&&m.getWrapBehavioursEnabled())return r($,T,"(",")");if(s.isSaneInsertion(m,g))return s.recordAutoInsert(m,g,")"),{text:"()",selection:[1,1]}}else if(d==")"){e(m);var A=m.getCursorPosition(),C=g.doc.getLine(A.row),w=C.substring(A.column,A.column+1);if(w==")"){var f=g.$findOpeningBracket(")",{column:A.column+1,row:A.row});if(f!==null&&s.isAutoInsertedClosing(A,C,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(u,b,m,g,d){var $=g.doc.getTextRange(d);if(!d.isMultiLine()&&$=="("){e(m);var T=g.doc.getLine(d.start.row),A=T.substring(d.start.column+1,d.start.column+2);if(A==")")return d.end.column++,d}}),this.add("brackets","insertion",function(u,b,m,g,d){if(d=="["){e(m);var $=m.getSelectionRange(),T=g.doc.getTextRange($);if(T!==""&&m.getWrapBehavioursEnabled())return r($,T,"[","]");if(s.isSaneInsertion(m,g))return s.recordAutoInsert(m,g,"]"),{text:"[]",selection:[1,1]}}else if(d=="]"){e(m);var A=m.getCursorPosition(),C=g.doc.getLine(A.row),w=C.substring(A.column,A.column+1);if(w=="]"){var f=g.$findOpeningBracket("]",{column:A.column+1,row:A.row});if(f!==null&&s.isAutoInsertedClosing(A,C,d))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(u,b,m,g,d){var $=g.doc.getTextRange(d);if(!d.isMultiLine()&&$=="["){e(m);var T=g.doc.getLine(d.start.row),A=T.substring(d.start.column+1,d.start.column+2);if(A=="]")return d.end.column++,d}}),this.add("string_dquotes","insertion",function(u,b,m,g,d){var $=g.$mode.$quotes||t;if(d.length==1&&$[d]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(d)!=-1)return;e(m);var T=d,A=m.getSelectionRange(),C=g.doc.getTextRange(A);if(C!==""&&(C.length!=1||!$[C])&&m.getWrapBehavioursEnabled())return r(A,C,T,T);if(!C){var w=m.getCursorPosition(),f=g.doc.getLine(w.row),p=f.substring(w.column-1,w.column),h=f.substring(w.column,w.column+1),v=g.getTokenAt(w.row,w.column),y=g.getTokenAt(w.row,w.column+1);if(p=="\\"&&v&&/escape/.test(v.type))return null;var L=v&&/string|escape/.test(v.type),R=!y||/string|escape/.test(y.type),_;if(h==T)_=L!==R,_&&/string\.end/.test(y.type)&&(_=!1);else{if(L&&!R||L&&R)return null;var I=g.$mode.tokenRe;I.lastIndex=0;var N=I.test(p);I.lastIndex=0;var W=I.test(h),O=g.$mode.$pairQuotesAfter,D=O&&O[T]&&O[T].test(p);if(!D&&N||W||h&&!/[\s;,.})\]\\]/.test(h))return null;var F=f[w.column-2];if(p==T&&(F==T||I.test(F)))return null;_=!0}return{text:_?T+T:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(u,b,m,g,d){var $=g.$mode.$quotes||t,T=g.doc.getTextRange(d);if(!d.isMultiLine()&&$.hasOwnProperty(T)){e(m);var A=g.doc.getLine(d.start.row),C=A.substring(d.start.column+1,d.start.column+2);if(C==T)return d.end.column++,d}}),l.closeDocComment!==!1&&this.add("doc comment end","insertion",function(u,b,m,g,d){if(u==="doc-start"&&(d==="\n"||d==="\r\n")&&m.selection.isEmpty()){var $=m.getCursorPosition();if($.column===0)return;for(var T=g.doc.getLine($.row),A=g.doc.getLine($.row+1),C=g.getTokens($.row),w=0,f=0;f=$.column){if(w===$.column){if(!/\.doc/.test(p.type))return;if(/\*\//.test(p.value)){var h=C[f+1];if(!h||!/\.doc/.test(h.type))return}}var v=$.column-(w-p.value.length),y=p.value.indexOf("*/"),L=p.value.indexOf("/**",y>-1?y+2:0);if(L!==-1&&v>L&&v=y&&v<=L||!/\.doc/.test(p.type))return;break}}var R=this.$getIndent(T);if(/\s*\*/.test(A))return/^\s*\*/.test(T)?{text:d+R+"* ",selection:[1,2+R.length,1,2+R.length]}:{text:d+R+" * ",selection:[1,3+R.length,1,3+R.length]};if(/\/\*\*/.test(T.substring(0,$.column)))return{text:d+R+" * "+d+" "+R+"*/",selection:[1,4+R.length,1,4+R.length]}}})},s.isSaneInsertion=function(l,u){var b=l.getCursorPosition(),m=new S(u,b.row,b.column);if(!this.$matchTokenType(m.getCurrentToken()||"text",c)){if(/[)}\]]/.test(l.session.getLine(b.row)[b.column]))return!0;var g=new S(u,b.row,b.column+1);if(!this.$matchTokenType(g.getCurrentToken()||"text",c))return!1}return m.stepForward(),m.getCurrentTokenRow()!==b.row||this.$matchTokenType(m.getCurrentToken()||"text",o)},s.$matchTokenType=function(l,u){return u.indexOf(l.type||l)>-1},s.recordAutoInsert=function(l,u,b){var m=l.getCursorPosition(),g=u.doc.getLine(m.row);this.isAutoInsertedClosing(m,g,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=m.row,i.autoInsertedLineEnd=b+g.substr(m.column),i.autoInsertedBrackets++},s.recordMaybeInsert=function(l,u,b){var m=l.getCursorPosition(),g=u.doc.getLine(m.row);this.isMaybeInsertedClosing(m,g)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=m.row,i.maybeInsertedLineStart=g.substr(0,m.column)+b,i.maybeInsertedLineEnd=g.substr(m.column),i.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(l,u,b){return i.autoInsertedBrackets>0&&l.row===i.autoInsertedRow&&b===i.autoInsertedLineEnd[0]&&u.substr(l.column)===i.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(l,u){return i.maybeInsertedBrackets>0&&l.row===i.maybeInsertedRow&&u.substr(l.column)===i.maybeInsertedLineEnd&&u.substr(0,l.column)==i.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},k.inherits(s,M),x.CstyleBehaviour=s}),ace.define("ace/unicode",["require","exports","module"],function(E,x,z){for(var k=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],M=0,S=[],a=0;a2?F%d!=d-1:F%d==0}}else{if(!this.blockComment)return!1;var T=this.blockComment.start,A=this.blockComment.end,C=new RegExp("^(\\s*)(?:"+o.escapeRegExp(T)+")"),w=new RegExp("(?:"+o.escapeRegExp(A)+")\\s*$"),f=function(_,I){h(_,I)||(!b||/\S/.test(_))&&(u.insertInLine({row:I,column:_.length},A),u.insertInLine({row:I,column:g},T))},p=function(_,I){var N;(N=_.match(w))&&u.removeInLine(I,_.length-N[0].length,_.length),(N=_.match(C))&&u.removeInLine(I,N[1].length,N[0].length)},h=function(_,I){if(C.test(_))return!0;for(var N=r.getTokens(I),W=0;W_.length&&(R=_.length)}),g==1/0&&(g=R,b=!1,m=!1),$&&g%d!=0&&(g=Math.floor(g/d)*d),L(m?p:f)},this.toggleBlockComment=function(e,r,s,l){var u=this.blockComment;if(u){!u.start&&u[0]&&(u=u[0]);var b=new i(r,l.row,l.column),m=b.getCurrentToken();r.selection;var g=r.selection.toOrientedRange(),d,$;if(m&&/comment/.test(m.type)){for(var T,A;m&&/comment/.test(m.type);){var C=m.value.indexOf(u.start);if(C!=-1){var w=b.getCurrentTokenRow(),f=b.getCurrentTokenColumn()+C;T=new n(w,f,w,f+u.start.length);break}m=b.stepBackward()}for(var b=new i(r,l.row,l.column),m=b.getCurrentToken();m&&/comment/.test(m.type);){var C=m.value.indexOf(u.end);if(C!=-1){var w=b.getCurrentTokenRow(),f=b.getCurrentTokenColumn()+C;A=new n(w,f,w,f+u.end.length);break}m=b.stepForward()}A&&r.remove(A),T&&(r.remove(T),d=T.start.row,$=-u.start.length)}else $=u.start.length,d=s.start.row,r.insert(s.end,u.end),r.insert(s.start,u.start);g.start.row==d&&(g.start.column+=$),g.end.row==d&&(g.end.column+=$),r.selection.fromOrientedRange(g)}},this.getNextLineIndent=function(e,r,s){return this.$getIndent(r)},this.checkOutdent=function(e,r,s){return!1},this.autoOutdent=function(e,r,s){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){this.$embeds=[],this.$modes={};for(var r in e)if(e[r]){var s=e[r],l=s.prototype.$id,u=k.$modes[l];u||(k.$modes[l]=u=new s),k.$modes[r]||(k.$modes[r]=u),this.$embeds.push(r),this.$modes[r]=u}for(var b=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],m=function(d){(function($){var T=b[d],A=$[T];$[b[d]]=function(){return this.$delegator(T,arguments,A)}})(g)},g=this,r=0;rthis.row)){var n=c(i,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},o.prototype.setPosition=function(i,n,t){var e;if(t?e={row:i,column:n}:e=this.$clipPositionToDocument(i,n),!(this.row==e.row&&this.column==e.column)){var r={row:this.row,column:this.column};this.row=e.row,this.column=e.column,this._signal("change",{old:r,value:e})}},o.prototype.detach=function(){this.document.off("change",this.$onChange)},o.prototype.attach=function(i){this.document=i||this.document,this.document.on("change",this.$onChange)},o.prototype.$clipPositionToDocument=function(i,n){var t={};return i>=this.document.getLength()?(t.row=Math.max(0,this.document.getLength()-1),t.column=this.document.getLine(t.row).length):i<0?(t.row=0,t.column=0):(t.row=i,t.column=Math.min(this.document.getLine(t.row).length,Math.max(0,n))),n<0&&(t.column=0),t},o})();S.prototype.$insertRight=!1,k.implement(S.prototype,M);function a(o,i,n){var t=n?o.column<=i.column:o.column=e&&(n=e-1,t=void 0);var r=this.getLine(n);return t==null&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:n,column:t}},i.prototype.clonePos=function(n){return{row:n.row,column:n.column}},i.prototype.pos=function(n,t){return{row:n,column:t}},i.prototype.$clipPosition=function(n){var t=this.getLength();return n.row>=t?(n.row=Math.max(0,t-1),n.column=this.getLine(t-1).length):(n.row=Math.max(0,n.row),n.column=Math.min(Math.max(n.column,0),this.getLine(n.row).length)),n},i.prototype.insertFullLines=function(n,t){n=Math.min(Math.max(n,0),this.getLength());var e=0;n0,r=t=0&&this.applyDelta({start:this.pos(n,this.getLine(n).length),end:this.pos(n+1,0),action:"remove",lines:["",""]})},i.prototype.replace=function(n,t){if(n instanceof a||(n=a.fromPoints(n.start,n.end)),t.length===0&&n.isEmpty())return n.start;if(t==this.getTextRange(n))return n.end;this.remove(n);var e;return t?e=this.insert(n.start,t):e=n.start,e},i.prototype.applyDeltas=function(n){for(var t=0;t=0;t--)this.revertDelta(n[t])},i.prototype.applyDelta=function(n,t){var e=n.action=="insert";(e?n.lines.length<=1&&!n.lines[0]:!a.comparePoints(n.start,n.end))||(e&&n.lines.length>2e4?this.$splitAndapplyLargeDelta(n,2e4):(M(this.$lines,n,t),this._signal("change",n)))},i.prototype.$safeApplyDelta=function(n){var t=this.$lines.length;(n.action=="remove"&&n.start.row20){i.running=setTimeout(i.$worker,20);break}}i.currentLine=t,e==-1&&(e=t),s<=e&&i.fireUpdateEvent(s,e)}}}return a.prototype.setTokenizer=function(c){this.tokenizer=c,this.lines=[],this.states=[],this.start(0)},a.prototype.setDocument=function(c){this.doc=c,this.lines=[],this.states=[],this.stop()},a.prototype.fireUpdateEvent=function(c,o){var i={first:c,last:o};this._signal("update",{data:i})},a.prototype.start=function(c){this.currentLine=Math.min(c||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},a.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},a.prototype.$updateOnChange=function(c){var o=c.start.row,i=c.end.row-o;if(i===0)this.lines[o]=null;else if(c.action=="remove")this.lines.splice(o,i+1,null),this.states.splice(o,i+1,null);else{var n=Array(i+1);n.unshift(o,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(o,this.currentLine,this.doc.getLength()),this.stop()},a.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},a.prototype.getTokens=function(c){return this.lines[c]||this.$tokenizeRow(c)},a.prototype.getState=function(c){return this.currentLine==c&&this.$tokenizeRow(c),this.states[c]||"start"},a.prototype.$tokenizeRow=function(c){var o=this.doc.getLine(c),i=this.states[c-1],n=this.tokenizer.getLineTokens(o,i,c);return this.states[c]+""!=n.state+""?(this.states[c]=n.state,this.lines[c+1]=null,this.currentLine>c+1&&(this.currentLine=c+1)):this.currentLine==c&&(this.currentLine=c+1),this.lines[c]=n.tokens},a.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},a})();k.implement(S.prototype,M),x.BackgroundTokenizer=S}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],function(E,x,z){var k=E("./lib/lang"),M=E("./range").Range,S=(function(){function a(c,o,i){i===void 0&&(i="text"),this.setRegexp(c),this.clazz=o,this.type=i}return a.prototype.setRegexp=function(c){this.regExp+""!=c+""&&(this.regExp=c,this.cache=[])},a.prototype.update=function(c,o,i,n){if(this.regExp)for(var t=n.firstRow,e=n.lastRow,r={},s=t;s<=e;s++){var l=this.cache[s];l==null&&(l=k.getMatchOffsets(i.getLine(s),this.regExp),l.length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map(function(g){return new M(s,g.offset,s,g.offset+g.length)}),this.cache[s]=l.length?l:"");for(var u=l.length;u--;){var b=l[u].toScreenRange(i),m=b.toString();r[m]||(r[m]=!0,o.drawSingleLineMarker(c,b,this.clazz,n))}}},a})();S.prototype.MAX_RANGES=500,x.SearchHighlight=S}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(E,x,z){var k=(function(){function g(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return g.prototype.addSession=function(d){this.$session=d},g.prototype.add=function(d,$,T){if(!this.$fromUndo&&d!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),$===!1||!this.lastDeltas){this.lastDeltas=[];var A=this.$undoStack.length;A>this.$undoDepth-1&&this.$undoStack.splice(0,A-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),d.id=this.$rev=++this.$maxRev}(d.action=="remove"||d.action=="insert")&&(this.$lastDelta=d),this.lastDeltas.push(d)}},g.prototype.addSelection=function(d,$){this.selections.push({value:d,rev:$||this.$rev})},g.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},g.prototype.markIgnored=function(d,$){$==null&&($=this.$rev+1);for(var T=this.$undoStack,A=T.length;A--;){var C=T[A][0];if(C.id<=d)break;C.id<$&&(C.ignore=!0)}this.lastDeltas=null},g.prototype.getSelection=function(d,$){for(var T=this.selections,A=T.length;A--;){var C=T[A];if(C.rev0},g.prototype.canRedo=function(){return this.$redoStack.length>0},g.prototype.bookmark=function(d){d==null&&(d=this.$rev),this.mark=d},g.prototype.isAtBookmark=function(){return this.$rev===this.mark},g.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},g.prototype.fromJSON=function(d){this.reset(),this.$undoStack=d.$undoStack,this.$redoStack=d.$redoStack},g.prototype.$prettyPrint=function(d){return d?i(d):i(this.$undoStack)+"\n---\n"+i(this.$redoStack)},g})();k.prototype.hasUndo=k.prototype.canUndo,k.prototype.hasRedo=k.prototype.canRedo,k.prototype.isClean=k.prototype.isAtBookmark,k.prototype.markClean=k.prototype.bookmark;function M(g,d){for(var $=d;$--;){var T=g[$];if(T&&!T[0].ignore){for(;$"+g.end.row+":"+g.end.column}function t(g,d){var $=g.action=="insert",T=d.action=="insert";if($&&T)if(a(d.start,g.end)>=0)s(d,g,-1);else if(a(d.start,g.start)<=0)s(g,d,1);else return null;else if($&&!T)if(a(d.start,g.end)>=0)s(d,g,-1);else if(a(d.end,g.start)<=0)s(g,d,-1);else return null;else if(!$&&T)if(a(d.start,g.start)>=0)s(d,g,1);else if(a(d.start,g.start)<=0)s(g,d,1);else return null;else if(!$&&!T)if(a(d.start,g.start)>=0)s(d,g,1);else if(a(d.end,g.start)<=0)s(g,d,-1);else return null;return[d,g]}function e(g,d){for(var $=g.length;$--;)for(var T=0;T=0?s(g,d,-1):(a(g.start,d.start)<=0||s(g,S.fromPoints(d.start,g.start),-1),s(d,g,1));else if(!$&&T)a(d.start,g.end)>=0?s(d,g,-1):(a(d.start,g.start)<=0||s(d,S.fromPoints(g.start,d.start),-1),s(g,d,1));else if(!$&&!T)if(a(d.start,g.end)>=0)s(d,g,-1);else if(a(d.end,g.start)<=0)s(g,d,-1);else{var A,C;return a(g.start,d.start)<0&&(A=g,g=u(g,d.start)),a(g.end,d.end)>0&&(C=u(g,d.end)),l(d.end,g.start,g.end,-1),C&&!A&&(g.lines=C.lines,g.start=C.start,g.end=C.end,C=g),[d,A,C].filter(Boolean)}return[d,g]}function s(g,d,$){l(g.start,d.start,d.end,$),l(g.end,d.start,d.end,$)}function l(g,d,$,T){g.row==(T==1?d:$).row&&(g.column+=T*($.column-d.column)),g.row+=T*($.row-d.row)}function u(g,d){var $=g.lines,T=g.end;g.end=c(d);var A=g.end.row-g.start.row,C=$.splice(A,$.length),w=A?d.column:d.column-g.start.column;$.push(C[0].substring(0,w)),C[0]=C[0].substr(w);var f={start:c(d),end:T,lines:C,action:g.action};return f}function b(g,d){d=o(d);for(var $=g.length;$--;){for(var T=g[$],A=0;Athis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(c,o){return-c.range.compareEnd(o.start.row,o.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");a.foldLine=this},S.prototype.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},S.prototype.walk=function(a,c,o){var i=0,n=this.folds,t,e,r,s=!0;c==null&&(c=this.end.row,o=this.end.column);for(var l=0;l0)){var s=M(c,e.start);return r===0?o&&s!==0?-t-2:t:s>0||s===0&&!o?t:-t-1}}return-t-1},a.prototype.add=function(c){var o=!c.isEmpty(),i=this.pointIndex(c.start,o);i<0&&(i=-i-1);var n=this.pointIndex(c.end,o,i);return n<0?n=-n-1:n++,this.ranges.splice(i,n-i,c)},a.prototype.addList=function(c){for(var o=[],i=c.length;i--;)o.push.apply(o,this.add(c[i]));return o},a.prototype.substractPoint=function(c){var o=this.pointIndex(c);if(o>=0)return this.ranges.splice(o,1)},a.prototype.merge=function(){var c=[],o=this.ranges;o=o.sort(function(r,s){return M(r.start,s.start)});for(var i=o[0],n,t=1;t=0},a.prototype.containsPoint=function(c){return this.pointIndex(c)>=0},a.prototype.rangeAtPoint=function(c){var o=this.pointIndex(c);if(o>=0)return this.ranges[o]},a.prototype.clipRows=function(c,o){var i=this.ranges;if(i[0].start.row>o||i[i.length-1].start.row=n)break}if(c.action=="insert")for(var u=t-n,b=-o.column+i.column;rn)break;if(l.start.row==n&&l.start.column>=o.column&&(l.start.column==o.column&&this.$bias<=0||(l.start.column+=b,l.start.row+=u)),l.end.row==n&&l.end.column>=o.column){if(l.end.column==o.column&&this.$bias<0)continue;l.end.column==o.column&&b>0&&rl.start.column&&l.end.column==e[r+1].start.column&&(l.end.column-=b),l.end.column+=b,l.end.row+=u}}else for(var u=n-t,b=o.column-i.column;rt)break;l.end.rowo.column)&&(l.end.column=o.column,l.end.row=o.row):(l.end.column+=b,l.end.row+=u):l.end.row>t&&(l.end.row+=u),l.start.rowo.column)&&(l.start.column=o.column,l.start.row=o.row):(l.start.column+=b,l.start.row+=u):l.start.row>t&&(l.start.row+=u)}if(u!=0&&r=i)return r;if(r.end.row>i)return null}return null},this.getNextFoldLine=function(i,n){var t=this.$foldData,e=0;for(n&&(e=t.indexOf(n)),e==-1&&(e=0),e;e=i)return r}return null},this.getFoldedRowCount=function(i,n){for(var t=this.$foldData,e=n-i+1,r=0;r=n){u=i?e-=n-u:e=0);break}else l>=i&&(u>=i?e-=l-u:e-=l-i+1)}return e},this.$addFoldLine=function(i){return this.$foldData.push(i),this.$foldData.sort(function(n,t){return n.start.row-t.start.row}),i},this.addFold=function(i,n){var t=this.$foldData,e=!1,r;i instanceof S?r=i:(r=new S(n,i),r.collapseChildren=n.collapseChildren),this.$clipRangeToDocument(r.range);var s=r.start.row,l=r.start.column,u=r.end.row,b=r.end.column,m=this.getFoldAt(s,l,1),g=this.getFoldAt(u,b,-1);if(m&&g==m)return m.addSubFold(r);m&&!m.range.isStart(s,l)&&this.removeFold(m),g&&!g.range.isEnd(u,b)&&this.removeFold(g);var d=this.getFoldsInRange(r.range);d.length>0&&(this.removeFolds(d),r.collapseChildren||d.forEach(function(C){r.addSubFold(C)}));for(var $=0;$0&&this.foldAll(i.start.row+1,i.end.row,i.collapseChildren-1),i.subFolds=[]},this.expandFolds=function(i){i.forEach(function(n){this.expandFold(n)},this)},this.unfold=function(i,n){var t,e;if(i==null)t=new k(0,0,this.getLength(),0),n==null&&(n=!0);else if(typeof i=="number")t=new k(i,0,i,this.getLine(i).length);else if("row"in i)t=k.fromPoints(i,i);else{if(Array.isArray(i))return e=[],i.forEach(function(s){e=e.concat(this.unfold(s))},this),e;t=i}e=this.getFoldsInRangeList(t);for(var r=e;e.length==1&&k.comparePoints(e[0].start,t.start)<0&&k.comparePoints(e[0].end,t.end)>0;)this.expandFolds(e),e=this.getFoldsInRangeList(t);if(n!=!1?this.removeFolds(e):this.expandFolds(e),r.length)return r},this.isRowFolded=function(i,n){return!!this.getFoldLine(i,n)},this.getRowFoldEnd=function(i,n){var t=this.getFoldLine(i,n);return t?t.end.row:i},this.getRowFoldStart=function(i,n){var t=this.getFoldLine(i,n);return t?t.start.row:i},this.getFoldDisplayLine=function(i,n,t,e,r){e==null&&(e=i.start.row),r==null&&(r=0),n==null&&(n=i.end.row),t==null&&(t=this.getLine(n).length);var s=this.doc,l="";return i.walk(function(u,b,m,g){if(!(bm)break;while(r&&l.test(r.type));r=e.stepBackward()}else r=e.getCurrentToken();return u.end.row=e.getCurrentTokenRow(),u.end.column=e.getCurrentTokenColumn(),u}},this.foldAll=function(i,n,t,e){t==null&&(t=1e5);var r=this.foldWidgets;if(r){n=n||this.getLength(),i=i||0;for(var s=i;s=i&&(s=l.end.row,l.collapseChildren=t,this.addFold("...",l))}}},this.foldToLevel=function(i){for(this.foldAll();i-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var i=this;this.foldAll(null,null,null,function(n){for(var t=i.getTokens(n),e=0;e=0;){var s=t[e];if(s==null&&(s=t[e]=this.getFoldWidget(e)),s=="start"){var l=this.getFoldWidgetRange(e);if(r||(r=l),l&&l.end.row>=i)break}e--}return{range:e!==-1&&l,firstRange:r}},this.onFoldWidgetClick=function(i,n){n instanceof c&&(n=n.domEvent);var t={children:n.shiftKey,all:n.ctrlKey||n.metaKey,siblings:n.altKey},e=this.$toggleFoldWidget(i,t);if(!e){var r=n.target||n.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(i,n){if(this.getFoldWidget){var t=this.getFoldWidget(i),e=this.getLine(i),r=t==="end"?-1:1,s=this.getFoldAt(i,r===-1?0:e.length,r);if(s)return n.children||n.all?this.removeFold(s):this.expandFold(s),s;var l=this.getFoldWidgetRange(i,!0);if(l&&!l.isMultiLine()&&(s=this.getFoldAt(l.start.row,l.start.column,1),s&&l.isEqual(s.range)))return this.removeFold(s),s;if(n.siblings){var u=this.getParentFoldRangeData(i);if(u.range)var b=u.range.start.row+1,m=u.range.end.row;this.foldAll(b,m,n.all?1e4:0)}else n.children?(m=l?l.end.row:this.getLength(),this.foldAll(i+1,m,n.all?1e4:0)):l&&(n.all&&(l.collapseChildren=1e4),this.addFold("...",l));return l}},this.toggleFoldWidget=function(i){var n=this.selection.getCursor().row;n=this.getRowFoldStart(n);var t=this.$toggleFoldWidget(n,{});if(!t){var e=this.getParentFoldRangeData(n,!0);if(t=e.range||e.firstRange,t){n=t.start.row;var r=this.getFoldAt(n,this.getLine(n).length,1);r?this.removeFold(r):this.addFold("...",t)}}},this.updateFoldWidgets=function(i){var n=i.start.row,t=i.end.row-n;if(t===0)this.foldWidgets[n]=null;else if(i.action=="remove")this.foldWidgets.splice(n,t+1,null);else{var e=Array(t+1);e.unshift(n,1),this.foldWidgets.splice.apply(this.foldWidgets,e)}},this.tokenizerUpdateFoldWidgets=function(i){var n=i.data;n.first!=n.last&&this.foldWidgets.length>n.first&&this.foldWidgets.splice(n.first,this.foldWidgets.length)}}x.Folding=o}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(E,x,z){var k=E("../token_iterator").TokenIterator,M=E("../range").Range;function S(){this.findMatchingBracket=function(a,c){if(a.column==0)return null;var o=c||this.getLine(a.row).charAt(a.column-1);if(o=="")return null;var i=o.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],a):this.$findOpeningBracket(i[2],a):null},this.getBracketRange=function(a){var c=this.getLine(a.row),o=!0,i,n=c.charAt(a.column-1),t=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(t||(n=c.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(/([\(\[\{])|([\)\]\}])/),o=!1),!t)return null;if(t[1]){var e=this.$findClosingBracket(t[1],a);if(!e)return null;i=M.fromPoints(a,e),o||(i.end.column++,i.start.column--),i.cursor=i.end}else{var e=this.$findOpeningBracket(t[2],a);if(!e)return null;i=M.fromPoints(e,a),o||(i.start.column++,i.end.column--),i.cursor=i.start}return i},this.getMatchingBracketRanges=function(a,c){var o=this.getLine(a.row),i=/([\(\[\{])|([\)\]\}])/,n=!c&&o.charAt(a.column-1),t=n&&n.match(i);if(t||(n=(c===void 0||c)&&o.charAt(a.column),a={row:a.row,column:a.column+1},t=n&&n.match(i)),!t)return null;var e=new M(a.row,a.column-1,a.row,a.column),r=t[1]?this.$findClosingBracket(t[1],a):this.$findOpeningBracket(t[2],a);if(!r)return[e];var s=new M(r.row,r.column,r.row,r.column+1);return[e,s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(a,c,o){var i=this.$brackets[a],n=1,t=new k(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var r=c.column-t.getCurrentTokenColumn()-2,s=e.value;;){for(;r>=0;){var l=s.charAt(r);if(l==i){if(n-=1,n==0)return{row:t.getCurrentTokenRow(),column:r+t.getCurrentTokenColumn()}}else l==a&&(n+=1);r-=1}do e=t.stepBackward();while(e&&!o.test(e.type));if(e==null)break;s=e.value,r=s.length-1}return null}},this.$findClosingBracket=function(a,c,o){var i=this.$brackets[a],n=1,t=new k(this,c.row,c.column),e=t.getCurrentToken();if(e||(e=t.stepForward()),!!e){o||(o=new RegExp("(\\.?"+e.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var r=c.column-t.getCurrentTokenColumn();;){for(var s=e.value,l=s.length;r"?i=!0:c.type.indexOf("tag-name")!==-1&&(o=!0));while(c&&!o);return c},this.$findClosingTag=function(a,c){var o,i=c.value,n=c.value,t=0,e=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);c=a.stepForward();var r=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length),s=!1;do{if(o=c,o.type.indexOf("tag-close")!==-1&&!s){var l=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(c=a.stepForward(),c){if(c.value===">"&&!s){var l=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);s=!0}if(c.type.indexOf("tag-name")!==-1){if(i=c.value,n===i){if(o.value==="<")t++;else if(o.value==="")var m=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);else return}}}else if(n===i&&c.value==="/>"&&(t--,t<0))var u=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+2),b=u,m=b,l=new M(r.end.row,r.end.column,r.end.row,r.end.column+1)}}while(c&&t>=0);if(e&&l&&u&&m&&r&&b)return{openTag:new M(e.start.row,e.start.column,l.end.row,l.end.column),closeTag:new M(u.start.row,u.start.column,m.end.row,m.end.column),openTagName:r,closeTagName:b}},this.$findOpeningTag=function(a,c){var o=a.getCurrentToken(),i=c.value,n=0,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),r=e+2,s=new M(t,e,t,r);a.stepForward();var l=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+c.value.length);if(c.type.indexOf("tag-close")===-1&&(c=a.stepForward()),!(!c||c.value!==">")){var u=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);a.stepBackward(),a.stepBackward();do if(c=o,t=a.getCurrentTokenRow(),e=a.getCurrentTokenColumn(),r=e+c.value.length,o=a.stepBackward(),c){if(c.type.indexOf("tag-name")!==-1){if(i===c.value)if(o.value==="<"){if(n++,n>0){var b=new M(t,e,t,r),m=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1);do c=a.stepForward();while(c&&c.value!==">");var g=new M(a.getCurrentTokenRow(),a.getCurrentTokenColumn(),a.getCurrentTokenRow(),a.getCurrentTokenColumn()+1)}}else o.value===""){for(var d=0,$=o;$;){if($.type.indexOf("tag-name")!==-1&&$.value===i){n--;break}else if($.value==="<")break;$=a.stepBackward(),d++}for(var T=0;Th&&(this.$docRowCache.splice(h,p),this.$screenRowCache.splice(h,p))},w.prototype.$getRowCacheIndex=function(f,p){for(var h=0,v=f.length-1;h<=v;){var y=h+v>>1,L=f[y];if(p>L)h=y+1;else if(p=p));L++);return v=h[L],v?(v.index=L,v.start=y-v.value.length,v):null},w.prototype.setUndoManager=function(f){if(this.$undoManager=f,this.$informUndoManager&&this.$informUndoManager.cancel(),f){var p=this;f.addSession(this),this.$syncInformUndoManager=function(){p.$informUndoManager.cancel(),p.mergeUndoDeltas=!1},this.$informUndoManager=M.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},w.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},w.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},w.prototype.getTabString=function(){return this.getUseSoftTabs()?M.stringRepeat(" ",this.getTabSize()):" "},w.prototype.setUseSoftTabs=function(f){this.setOption("useSoftTabs",f)},w.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},w.prototype.setTabSize=function(f){this.setOption("tabSize",f)},w.prototype.getTabSize=function(){return this.$tabSize},w.prototype.isTabStop=function(f){return this.$useSoftTabs&&f.column%this.$tabSize===0},w.prototype.setNavigateWithinSoftTabs=function(f){this.setOption("navigateWithinSoftTabs",f)},w.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},w.prototype.setOverwrite=function(f){this.setOption("overwrite",f)},w.prototype.getOverwrite=function(){return this.$overwrite},w.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},w.prototype.addGutterDecoration=function(f,p){this.$decorations[f]||(this.$decorations[f]=""),this.$decorations[f]+=" "+p,this._signal("changeBreakpoint",{})},w.prototype.removeGutterDecoration=function(f,p){this.$decorations[f]=(this.$decorations[f]||"").replace(" "+p,""),this._signal("changeBreakpoint",{})},w.prototype.getBreakpoints=function(){return this.$breakpoints},w.prototype.setBreakpoints=function(f){this.$breakpoints=[];for(var p=0;p0&&(v=!!h.charAt(p-1).match(this.tokenRe)),v||(v=!!h.charAt(p).match(this.tokenRe)),v)var y=this.tokenRe;else if(/^\s+$/.test(h.slice(p-1,p+1)))var y=/\s/;else var y=this.nonTokenRe;var L=p;if(L>0){do L--;while(L>=0&&h.charAt(L).match(y));L++}for(var R=p;Rf&&(f=p.screenWidth)}),this.lineWidgetWidth=f},w.prototype.$computeWidth=function(f){if(this.$modified||f){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var p=this.doc.getAllLines(),h=this.$rowLengthCache,v=0,y=0,L=this.$foldData[y],R=L?L.start.row:1/0,_=p.length,I=0;I<_;I++){if(I>R){if(I=L.end.row+1,I>=_)break;L=this.$foldData[y++],R=L?L.start.row:1/0}h[I]==null&&(h[I]=this.$getStringScreenWidth(p[I])[0]),h[I]>v&&(v=h[I])}this.screenWidth=v}},w.prototype.getLine=function(f){return this.doc.getLine(f)},w.prototype.getLines=function(f,p){return this.doc.getLines(f,p)},w.prototype.getLength=function(){return this.doc.getLength()},w.prototype.getTextRange=function(f){return this.doc.getTextRange(f||this.selection.getRange())},w.prototype.insert=function(f,p){return this.doc.insert(f,p)},w.prototype.remove=function(f){return this.doc.remove(f)},w.prototype.removeFullLines=function(f,p){return this.doc.removeFullLines(f,p)},w.prototype.undoChanges=function(f,p){if(f.length){this.$fromUndo=!0;for(var h=f.length-1;h!=-1;h--){var v=f[h];v.action=="insert"||v.action=="remove"?this.doc.revertDelta(v):v.folds&&this.addFolds(v.folds)}!p&&this.$undoSelect&&(f.selectionBefore?this.selection.fromJSON(f.selectionBefore):this.selection.setRange(this.$getUndoSelection(f,!0))),this.$fromUndo=!1}},w.prototype.redoChanges=function(f,p){if(f.length){this.$fromUndo=!0;for(var h=0;hf.end.column&&(L.start.column+=_),L.end.row==f.end.row&&L.end.column>f.end.column&&(L.end.column+=_)),R&&L.start.row>=f.end.row&&(L.start.row+=R,L.end.row+=R)}if(L.end=this.insert(L.start,v),y.length){var I=f.start,N=L.start,R=N.row-I.row,_=N.column-I.column;this.addFolds(y.map(function(D){return D=D.clone(),D.start.row==I.row&&(D.start.column+=_),D.end.row==I.row&&(D.end.column+=_),D.start.row+=R,D.end.row+=R,D}))}return L},w.prototype.indentRows=function(f,p,h){h=h.replace(/\t/g,this.getTabString());for(var v=f;v<=p;v++)this.doc.insertInLine({row:v,column:0},h)},w.prototype.outdentRows=function(f){for(var p=f.collapseRows(),h=new n(0,0,0,0),v=this.getTabSize(),y=p.start.row;y<=p.end.row;++y){var L=this.getLine(y);h.start.row=y,h.end.row=y;for(var R=0;R0){var v=this.getRowFoldEnd(p+h);if(v>this.doc.getLength()-1)return 0;var y=v-p}else{f=this.$clipRowToDocument(f),p=this.$clipRowToDocument(p);var y=p-f+1}var L=new n(f,0,p,Number.MAX_VALUE),R=this.getFoldsInRange(L).map(function(I){return I=I.clone(),I.start.row+=y,I.end.row+=y,I}),_=h==0?this.doc.getLines(f,p):this.doc.removeFullLines(f,p);return this.doc.insertFullLines(f+y,_),R.length&&this.addFolds(R),y},w.prototype.moveLinesUp=function(f,p){return this.$moveLines(f,p,-1)},w.prototype.moveLinesDown=function(f,p){return this.$moveLines(f,p,1)},w.prototype.duplicateLines=function(f,p){return this.$moveLines(f,p,0)},w.prototype.$clipRowToDocument=function(f){return Math.max(0,Math.min(f,this.doc.getLength()-1))},w.prototype.$clipColumnToRow=function(f,p){return p<0?0:Math.min(this.doc.getLine(f).length,p)},w.prototype.$clipPositionToDocument=function(f,p){if(p=Math.max(0,p),f<0)f=0,p=0;else{var h=this.doc.getLength();f>=h?(f=h-1,p=this.doc.getLine(h-1).length):p=Math.min(this.doc.getLine(f).length,p)}return{row:f,column:p}},w.prototype.$clipRangeToDocument=function(f){f.start.row<0?(f.start.row=0,f.start.column=0):f.start.column=this.$clipColumnToRow(f.start.row,f.start.column);var p=this.doc.getLength()-1;return f.end.row>p?(f.end.row=p,f.end.column=this.doc.getLine(p).length):f.end.column=this.$clipColumnToRow(f.end.row,f.end.column),f},w.prototype.setUseWrapMode=function(f){if(f!=this.$useWrapMode){if(this.$useWrapMode=f,this.$modified=!0,this.$resetRowCache(0),f){var p=this.getLength();this.$wrapData=Array(p),this.$updateWrapData(0,p-1)}this._signal("changeWrapMode")}},w.prototype.getUseWrapMode=function(){return this.$useWrapMode},w.prototype.setWrapLimitRange=function(f,p){(this.$wrapLimitRange.min!==f||this.$wrapLimitRange.max!==p)&&(this.$wrapLimitRange={min:f,max:p},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},w.prototype.adjustWrapLimit=function(f,p){var h=this.$wrapLimitRange;h.max<0&&(h={min:p,max:p});var v=this.$constrainWrapLimit(f,h.min,h.max);return v!=this.$wrapLimit&&v>1?(this.$wrapLimit=v,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},w.prototype.$constrainWrapLimit=function(f,p,h){return p&&(f=Math.max(p,f)),h&&(f=Math.min(h,f)),f},w.prototype.getWrapLimit=function(){return this.$wrapLimit},w.prototype.setWrapLimit=function(f){this.setWrapLimitRange(f,f)},w.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},w.prototype.$updateInternalDataOnChange=function(f){var p=this.$useWrapMode,h=f.action,v=f.start,y=f.end,L=v.row,R=y.row,_=R-L,I=null;if(this.$updating=!0,_!=0)if(h==="remove"){this[p?"$wrapData":"$rowLengthCache"].splice(L,_);var N=this.$foldData;I=this.getFoldsInRange(f),this.removeFolds(I);var W=this.getFoldLine(y.row),O=0;if(W){W.addRemoveChars(y.row,y.column,v.column-y.column),W.shiftRow(-_);var D=this.getFoldLine(L);D&&D!==W&&(D.merge(W),W=D),O=N.indexOf(W)+1}for(O;O=y.row&&W.shiftRow(-_)}R=L}else{var F=Array(_);F.unshift(L,0);var H=p?this.$wrapData:this.$rowLengthCache;H.splice.apply(H,F);var N=this.$foldData,W=this.getFoldLine(L),O=0;if(W){var P=W.range.compareInside(v.row,v.column);P==0?(W=W.split(v.row,v.column),W&&(W.shiftRow(_),W.addRemoveChars(R,0,y.column-v.column))):P==-1&&(W.addRemoveChars(L,0,y.column-v.column),W.shiftRow(_)),O=N.indexOf(W)+1}for(O;O=L&&W.shiftRow(_)}}else{_=Math.abs(f.start.column-f.end.column),h==="remove"&&(I=this.getFoldsInRange(f),this.removeFolds(I),_=-_);var W=this.getFoldLine(L);W&&W.addRemoveChars(L,v.column,_)}return p&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,p?this.$updateWrapData(L,R):this.$updateRowLengthCache(L,R),I},w.prototype.$updateRowLengthCache=function(f,p){this.$rowLengthCache[f]=null,this.$rowLengthCache[p]=null},w.prototype.$updateWrapData=function(f,p){var h=this.doc.getAllLines(),v=this.getTabSize(),y=this.$wrapData,L=this.$wrapLimit,R,_,I=f;for(p=Math.min(p,h.length-1);I<=p;)_=this.getFoldLine(I,_),_?(R=[],_.walk((function(N,W,O,D){var F;if(N!=null){F=this.$getDisplayTokens(N,R.length),F[0]=m;for(var H=1;Hp-D;){var F=L+p-D;if(f[F-1]>=$&&f[F]>=$){O(F);continue}if(f[F]==m||f[F]==g){for(F;F!=L-1&&f[F]!=m;F--);if(F>L){O(F);continue}for(F=L+p,F;F>2)),L-1);F>H&&f[F]H&&f[F]H&&f[F]==d;)F--}else for(;F>H&&f[F]<$;)F--;if(F>H){O(++F);continue}F=L+p,f[F]==b&&F--,O(F-D)}return v},w.prototype.$getDisplayTokens=function(f,p){var h=[],v;p=p||0;for(var y=0;y39&&L<48||L>57&&L<64?h.push(d):L>=4352&&C(L)?h.push(u,b):h.push(u)}return h},w.prototype.$getStringScreenWidth=function(f,p,h){if(p==0)return[0,0];p==null&&(p=1/0),h=h||0;var v,y;for(y=0;y=4352&&C(v)?h+=2:h+=1,!(h>p));y++);return[h,y]},w.prototype.getRowLength=function(f){var p=1;return this.lineWidgets&&(p+=this.lineWidgets[f]&&this.lineWidgets[f].rowCount||0),!this.$useWrapMode||!this.$wrapData[f]?p:this.$wrapData[f].length+p},w.prototype.getRowLineCount=function(f){return!this.$useWrapMode||!this.$wrapData[f]?1:this.$wrapData[f].length+1},w.prototype.getRowWrapIndent=function(f){if(this.$useWrapMode){var p=this.screenToDocumentPosition(f,Number.MAX_VALUE),h=this.$wrapData[p.row];return h.length&&h[0]=0)var _=N[W],y=this.$docRowCache[W],D=f>N[O-1];else var D=!O;for(var F=this.getLength()-1,H=this.getNextFoldLine(y),P=H?H.start.row:1/0;_<=f&&(I=this.getRowLength(y),!(_+I>f||y>=F));)_+=I,y++,y>P&&(y=H.end.row+1,H=this.getNextFoldLine(y,H),P=H?H.start.row:1/0),D&&(this.$docRowCache.push(y),this.$screenRowCache.push(_));if(H&&H.start.row<=y)v=this.getFoldDisplayLine(H),y=H.start.row;else{if(_+I<=f||y>F)return{row:F,column:this.getLine(F).length};v=this.getLine(y),H=null}var U=0,j=Math.floor(f-_);if(this.$useWrapMode){var V=this.$wrapData[y];V&&(R=V[j],j>0&&V.length&&(U=V.indent,L=V[j-1]||V[V.length-1],v=v.substring(L)))}return h!==void 0&&this.$bidiHandler.isBidiRow(_+j,y,j)&&(p=this.$bidiHandler.offsetToCol(h)),L+=this.$getStringScreenWidth(v,p-U)[1],this.$useWrapMode&&L>=R&&(L=R-1),H?H.idxToPosition(L):{row:y,column:L}},w.prototype.documentToScreenPosition=function(f,p){if(typeof p>"u")var h=this.$clipPositionToDocument(f.row,f.column);else h=this.$clipPositionToDocument(f,p);f=h.row,p=h.column;var v=0,y=null,L=null;L=this.getFoldAt(f,p,1),L&&(f=L.start.row,p=L.start.column);var R,_=0,I=this.$docRowCache,N=this.$getRowCacheIndex(I,f),W=I.length;if(W&&N>=0)var _=I[N],v=this.$screenRowCache[N],O=f>I[W-1];else var O=!W;for(var D=this.getNextFoldLine(_),F=D?D.start.row:1/0;_=F){if(R=D.end.row+1,R>f)break;D=this.getNextFoldLine(R,D),F=D?D.start.row:1/0}else R=_+1;v+=this.getRowLength(_),_=R,O&&(this.$docRowCache.push(_),this.$screenRowCache.push(v))}var H="";D&&_>=F?(H=this.getFoldDisplayLine(D,f,p),y=D.start.row):(H=this.getLine(f).substring(0,p),y=f);var P=0;if(this.$useWrapMode){var U=this.$wrapData[y];if(U){for(var j=0;H.length>=U[j];)v++,j++;H=H.substring(U[j-1]||0,H.length),P=j>0?U.indent:0}}return this.lineWidgets&&this.lineWidgets[_]&&this.lineWidgets[_].rowsAbove&&(v+=this.lineWidgets[_].rowsAbove),{row:v,column:P+this.$getStringScreenWidth(H)[0]}},w.prototype.documentToScreenColumn=function(f,p){return this.documentToScreenPosition(f,p).column},w.prototype.documentToScreenRow=function(f,p){return this.documentToScreenPosition(f,p).row},w.prototype.getScreenLength=function(){var f=0,p=null;if(this.$useWrapMode)for(var y=this.$wrapData.length,L=0,v=0,p=this.$foldData[v++],R=p?p.start.row:1/0;LR&&(L=p.end.row+1,p=this.$foldData[v++],R=p?p.start.row:1/0)}else{f=this.getLength();for(var h=this.$foldData,v=0;vh));L++);return[v,L]})},w.prototype.getPrecedingCharacter=function(){var f=this.selection.getCursor();if(f.column===0)return f.row===0?"":this.doc.getNewLineCharacter();var p=this.getLine(f.row);return p[f.column-1]},w.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection.detach()},w})();l.$uid=0,l.prototype.$modes=a.$modes,l.prototype.getValue=l.prototype.toString,l.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},l.prototype.$overwrite=!1,l.prototype.$mode=null,l.prototype.$modeId=null,l.prototype.$scrollTop=0,l.prototype.$scrollLeft=0,l.prototype.$wrapLimit=80,l.prototype.$useWrapMode=!1,l.prototype.$wrapLimitRange={min:null,max:null},l.prototype.lineWidgets=null,l.prototype.isFullWidth=C,k.implement(l.prototype,c);var u=1,b=2,m=3,g=4,d=9,$=10,T=11,A=12;function C(w){return w<4352?!1:w>=4352&&w<=4447||w>=4515&&w<=4519||w>=4602&&w<=4607||w>=9001&&w<=9002||w>=11904&&w<=11929||w>=11931&&w<=12019||w>=12032&&w<=12245||w>=12272&&w<=12283||w>=12288&&w<=12350||w>=12353&&w<=12438||w>=12441&&w<=12543||w>=12549&&w<=12589||w>=12593&&w<=12686||w>=12688&&w<=12730||w>=12736&&w<=12771||w>=12784&&w<=12830||w>=12832&&w<=12871||w>=12880&&w<=13054||w>=13056&&w<=19903||w>=19968&&w<=42124||w>=42128&&w<=42182||w>=43360&&w<=43388||w>=44032&&w<=55203||w>=55216&&w<=55238||w>=55243&&w<=55291||w>=63744&&w<=64255||w>=65040&&w<=65049||w>=65072&&w<=65106||w>=65108&&w<=65126||w>=65128&&w<=65131||w>=65281&&w<=65376||w>=65504&&w<=65510}E("./edit_session/folding").Folding.call(l.prototype),E("./edit_session/bracket_match").BracketMatch.call(l.prototype),a.defineOptions(l.prototype,"session",{wrap:{set:function(w){if(!w||w=="off"?w=!1:w=="free"?w=!0:w=="printMargin"?w=-1:typeof w=="string"&&(w=parseInt(w,10)||!1),this.$wrap!=w)if(this.$wrap=w,!w)this.setUseWrapMode(!1);else{var f=typeof w=="number"?w:null;this.setWrapLimitRange(f,f),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(w){w=w=="auto"?this.$mode.type!="text":w!="text",w!=this.$wrapAsCode&&(this.$wrapAsCode=w,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(w){this.$useWorker=w,this.$stopWorker(),w&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(w){w=parseInt(w),w>0&&this.$tabSize!==w&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=w,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(w){this.setFoldStyle(w)},handlesSet:!0},overwrite:{set:function(w){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(w){this.doc.setNewLineMode(w)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(w){this.setMode(w)},get:function(){return this.$modeId},handlesSet:!0}}),x.EditSession=l}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(E,x,z){var k=E("./lib/lang"),M=E("./lib/oop"),S=E("./range").Range,a=(function(){function o(){this.$options={}}return o.prototype.set=function(i){return M.mixin(this.$options,i),this},o.prototype.getOptions=function(){return k.copyObject(this.$options)},o.prototype.setOptions=function(i){this.$options=i},o.prototype.find=function(i){var n=this.$options,t=this.$matchIterator(i,n);if(!t)return!1;var e=null;return t.forEach(function(r,s,l,u){return e=new S(r,s,l,u),s==u&&n.start&&n.start.start&&n.skipCurrent!=!1&&e.isEqual(n.start)?(e=null,!1):!0}),e},o.prototype.findAll=function(i){var n=this.$options;if(!n.needle)return[];this.$assembleRegExp(n);var t=n.range,e=t?i.getLines(t.start.row,t.end.row):i.doc.getAllLines(),r=[],s=n.re;if(n.$isMultiLine){var l=s.length,u=e.length-l,b;e:for(var m=s.offset||0;m<=u;m++){for(var g=0;gT||(r.push(b=new S(m,T,m+l-1,A)),l>2&&(m=m+l-2))}}else for(var C=0;Ch&&r[g].end.row==v;)g--;for(r=r.slice(C,g+1),C=0,g=r.length;C=b;A--)if($(A,Number.MAX_VALUE,T))return;if(n.wrap!=!1){for(A=m,b=u.row;A>=b;A--)if($(A,Number.MAX_VALUE,T))return}}};else var g=function(A){var C=u.row;if(!$(C,u.column,A)){for(C=C+1;C<=m;C++)if($(C,0,A))return;if(n.wrap!=!1){for(C=b,m=u.row;C<=m;C++)if($(C,0,A))return}}};if(n.$isMultiLine)var d=t.length,$=function(T,A,C){var w=e?T-d+1:T;if(!(w<0||w+d>i.getLength())){var f=i.getLine(w),p=f.search(t[0]);if(!(!e&&pA)&&C(w,p,w+d-1,v))return!0}}};else if(e)var $=function(A,C,w){var f=i.getLine(A),p=[],h,v=0;for(t.lastIndex=0;h=t.exec(f);){var y=h[0].length;if(v=h.index,!y){if(v>=f.length)break;t.lastIndex=v+=k.skipEmptyMatch(f,v,s)}if(h.index+y>C)break;p.push(h.index,y)}for(var L=p.length-1;L>=0;L-=2){var R=p[L-1],y=p[L];if(w(A,R,A,R+y))return!0}};else var $=function(A,C,w){var f=i.getLine(A),p,h;for(t.lastIndex=C;h=t.exec(f);){var v=h[0].length;if(p=h.index,w(A,p,A,p+v))return!0;if(!v&&(t.lastIndex=p+=k.skipEmptyMatch(f,p,s),p>=f.length))return!1}};return{forEach:g}},o})();function c(o,i){var n=k.supportsLookbehind();function t(l,u){u===void 0&&(u=!0);var b=n&&i.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w");return b.test(l)||i.regExp?n&&i.$supportsUnicodeFlag?u?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var e=Array.from(o),r=e[0],s=e[e.length-1];return t(r)+o+t(s,!1)}x.Search=a}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(E,x,z){var k=this&&this.__extends||(function(){var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,s){r.__proto__=s}||function(r,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(r[l]=s[l])},n(t,e)};return function(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");n(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}})(),M=E("../lib/keys"),S=E("../lib/useragent"),a=M.KEY_MODS,c=(function(){function n(t,e){this.$init(t,e,!1)}return n.prototype.$init=function(t,e,r){this.platform=e||(S.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=r},n.prototype.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},n.prototype.removeCommand=function(t,e){var r=t&&(typeof t=="string"?t:t.name);t=this.commands[r],e||delete this.commands[r];var s=this.commandKeyBinding;for(var l in s){var u=s[l];if(u==t)delete s[l];else if(Array.isArray(u)){var b=u.indexOf(t);b!=-1&&(u.splice(b,1),u.length==1&&(s[l]=u[0]))}}},n.prototype.bindKey=function(t,e,r){if(typeof t=="object"&&t&&(r==null&&(r=t.position),t=t[this.platform]),!!t){if(typeof e=="function")return this.addCommand({exec:e,bindKey:t,name:e.name||t});t.split("|").forEach(function(s){var l="";if(s.indexOf(" ")!=-1){var u=s.split(/\s+/);s=u.pop(),u.forEach(function(g){var d=this.parseKeys(g),$=a[d.hashId]+d.key;l+=(l?" ":"")+$,this._addCommandToBinding(l,"chainKeys")},this),l+=" "}var b=this.parseKeys(s),m=a[b.hashId]+b.key;this._addCommandToBinding(l+m,e,r)},this)}},n.prototype._addCommandToBinding=function(t,e,r){var s=this.commandKeyBinding,l;if(!e)delete s[t];else if(!s[t]||this.$singleCommand)s[t]=e;else{Array.isArray(s[t])?(l=s[t].indexOf(e))!=-1&&s[t].splice(l,1):s[t]=[s[t]],typeof r!="number"&&(r=o(e));var u=s[t];for(l=0;lr)break}u.splice(l,0,e)}},n.prototype.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var r=t[e];if(r){if(typeof r=="string")return this.bindKey(r,e);typeof r=="function"&&(r={exec:r}),typeof r=="object"&&(r.name||(r.name=e),this.addCommand(r))}},this)},n.prototype.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},n.prototype.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},n.prototype._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},n.prototype.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(m){return m}),r=e.pop(),s=M[r];if(M.FUNCTION_KEYS[s])r=M.FUNCTION_KEYS[s].toLowerCase();else if(e.length){if(e.length==1&&e[0]=="shift")return{key:r.toUpperCase(),hashId:-1}}else return{key:r,hashId:-1};for(var l=0,u=e.length;u--;){var b=M.KEY_MODS[e[u]];if(b==null)return typeof console<"u"&&console.error("invalid modifier "+e[u]+" in "+t),!1;l|=b}return{key:r,hashId:l}},n.prototype.findKeyCommand=function(t,e){var r=a[t]+e;return this.commandKeyBinding[r]},n.prototype.handleKeyboard=function(t,e,r,s){if(!(s<0)){var l=a[e]+r,u=this.commandKeyBinding[l];return t.$keyChain&&(t.$keyChain+=" "+l,u=this.commandKeyBinding[t.$keyChain]||u),u&&(u=="chainKeys"||u[u.length-1]=="chainKeys")?(t.$keyChain=t.$keyChain||l,{command:"null"}):(t.$keyChain&&((!e||e==4)&&r.length==1?t.$keyChain=t.$keyChain.slice(0,-l.length-1):(e==-1||s>0)&&(t.$keyChain="")),{command:u})}},n.prototype.getStatusText=function(t,e){return e.$keyChain||""},n})();function o(n){return typeof n=="object"&&n.bindKey&&n.bindKey.position||(n.isDefault?-100:0)}var i=(function(n){k(t,n);function t(e,r){var s=n.call(this,e,r)||this;return s.$singleCommand=!0,s}return t})(c);i.call=function(n,t,e){c.prototype.$init.call(n,t,e,!0)},c.call=function(n,t,e){c.prototype.$init.call(n,t,e,!1)},x.HashHandler=i,x.MultiHashHandler=c}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(E,x,z){var k=this&&this.__extends||(function(){var o=function(i,n){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},o(i,n)};return function(i,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");o(i,n);function t(){this.constructor=i}i.prototype=n===null?Object.create(n):(t.prototype=n.prototype,new t)}})(),M=E("../lib/oop"),S=E("../keyboard/hash_handler").MultiHashHandler,a=E("../lib/event_emitter").EventEmitter,c=(function(o){k(i,o);function i(n,t){var e=o.call(this,t,n)||this;return e.byName=e.commands,e.setDefaultHandler("exec",function(r){return r.args?r.command.exec(r.editor,r.args,r.event,!1):r.command.exec(r.editor,{},r.event,!0)}),e}return i.prototype.exec=function(n,t,e){if(Array.isArray(n)){for(var r=n.length;r--;)if(this.exec(n[r],t,e))return!0;return!1}if(typeof n=="string"&&(n=this.commands[n]),!this.canExecute(n,t))return!1;var s={editor:t,command:n,args:e};return s.returnValue=this._emit("exec",s),this._signal("afterExec",s),s.returnValue!==!1},i.prototype.canExecute=function(n,t){return typeof n=="string"&&(n=this.commands[n]),!(!n||t&&t.$readOnly&&!n.readOnly||this.$checkCommandState!=!1&&n.isAvailable&&!n.isAvailable(t))},i.prototype.toggleRecording=function(n){if(!this.$inReplay)return n&&n._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},i.prototype.replay=function(n){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(n);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,n):this.exec(t[0],n,t[1])},this)}finally{this.$inReplay=!1}}},i.prototype.trimMacro=function(n){return n.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})},i})(S);M.implement(c.prototype,a),x.CommandManager=c}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(E,x,z){var k=E("../lib/lang"),M=E("../config"),S=E("../range").Range;function a(o,i){return{win:o,mac:i}}x.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:a("Ctrl-,","Command-,"),exec:function(o){M.loadModule("ace/ext/settings_menu",function(i){i.init(o),o.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:a("Alt-E","F4"),exec:function(o){M.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:a("Alt-Shift-E","Shift-F4"),exec:function(o){M.loadModule("ace/ext/error_marker",function(i){i.showErrorMarker(o,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:a("Ctrl-A","Command-A"),exec:function(o){o.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:a(null,"Ctrl-L"),exec:function(o){o.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:a("Ctrl-L","Command-L"),exec:function(o,i){typeof i=="number"&&!isNaN(i)&&o.gotoLine(i),o.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:a("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(o){o.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:a("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(o){o.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:a("F2","F2"),exec:function(o){o.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:a("Alt-F2","Alt-F2"),exec:function(o){o.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:a(null,"Ctrl-Command-Option-0"),exec:function(o){o.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:a("Alt-0","Command-Option-0"),exec:function(o){o.session.foldAll(),o.session.unfold(o.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:a("Alt-Shift-0","Command-Option-Shift-0"),exec:function(o){o.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:a("Ctrl-K","Command-G"),exec:function(o){o.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:a("Ctrl-Shift-K","Command-Shift-G"),exec:function(o){o.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:a("Alt-K","Ctrl-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:a("Alt-Shift-K","Ctrl-Shift-G"),exec:function(o){o.selection.isEmpty()?o.selection.selectWord():o.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:a("Ctrl-F","Command-F"),exec:function(o){M.loadModule("ace/ext/searchbox",function(i){i.Search(o)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(o){o.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:a("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(o){o.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:a("Ctrl-Home","Command-Home|Command-Up"),exec:function(o){o.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:a("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(o){o.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:a("Up","Up|Ctrl-P"),exec:function(o,i){o.navigateUp(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:a("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(o){o.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:a("Ctrl-End","Command-End|Command-Down"),exec:function(o){o.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:a("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(o){o.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:a("Down","Down|Ctrl-N"),exec:function(o,i){o.navigateDown(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:a("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(o){o.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:a("Ctrl-Left","Option-Left"),exec:function(o){o.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:a("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:a("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(o){o.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:a("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(o){o.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:a("Left","Left|Ctrl-B"),exec:function(o,i){o.navigateLeft(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:a("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(o){o.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:a("Ctrl-Right","Option-Right"),exec:function(o){o.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:a("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:a("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(o){o.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:a("Shift-Right","Shift-Right"),exec:function(o){o.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:a("Right","Right|Ctrl-F"),exec:function(o,i){o.navigateRight(i.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(o){o.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:a(null,"Option-PageDown"),exec:function(o){o.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:a("PageDown","PageDown|Ctrl-V"),exec:function(o){o.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(o){o.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:a(null,"Option-PageUp"),exec:function(o){o.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(o){o.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:a("Ctrl-Up",null),exec:function(o){o.renderer.scrollBy(0,-2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:a("Ctrl-Down",null),exec:function(o){o.renderer.scrollBy(0,2*o.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(o){o.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(o){o.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:a("Ctrl-Alt-E","Command-Option-E"),exec:function(o){o.commands.toggleRecording(o)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:a("Ctrl-Shift-E","Command-Shift-E"),exec:function(o){o.commands.replay(o)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:a("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(o){o.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:a("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(o){o.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:a("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(o){o.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:a(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(o){},readOnly:!0},{name:"cut",description:"Cut",exec:function(o){var i=o.$copyWithEmptySelection&&o.selection.isEmpty(),n=i?o.selection.getLineRange():o.selection.getRange();o._emit("cut",n),n.isEmpty()||o.session.remove(n),o.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(o,i){o.$handlePaste(i)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:a("Ctrl-D","Command-D"),exec:function(o){o.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:a("Ctrl-Shift-D","Command-Shift-D"),exec:function(o){o.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:a("Ctrl-Alt-S","Command-Alt-S"),exec:function(o){o.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:a("Ctrl-/","Command-/"),exec:function(o){o.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:a("Ctrl-Shift-/","Command-Shift-/"),exec:function(o){o.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:a("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(o){o.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:a("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(o){o.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:a("Ctrl-H","Command-Option-F"),exec:function(o){M.loadModule("ace/ext/searchbox",function(i){i.Search(o,!0)})}},{name:"undo",description:"Undo",bindKey:a("Ctrl-Z","Command-Z"),exec:function(o){o.undo()}},{name:"redo",description:"Redo",bindKey:a("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(o){o.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:a("Alt-Shift-Up","Command-Option-Up"),exec:function(o){o.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:a("Alt-Up","Option-Up"),exec:function(o){o.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:a("Alt-Shift-Down","Command-Option-Down"),exec:function(o){o.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:a("Alt-Down","Option-Down"),exec:function(o){o.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:a("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(o){o.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:a("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(o){o.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:a("Shift-Delete",null),exec:function(o){if(o.selection.isEmpty())o.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:a("Alt-Backspace","Command-Backspace"),exec:function(o){o.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:a("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(o){o.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:a("Ctrl-Shift-Backspace",null),exec:function(o){var i=o.selection.getRange();i.start.column=0,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:a("Ctrl-Shift-Delete",null),exec:function(o){var i=o.selection.getRange();i.end.column=Number.MAX_VALUE,o.session.remove(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:a("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(o){o.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:a("Ctrl-Delete","Alt-Delete"),exec:function(o){o.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:a("Shift-Tab","Shift-Tab"),exec:function(o){o.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:a("Tab","Tab"),exec:function(o){o.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:a("Ctrl-[","Ctrl-["),exec:function(o){o.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:a("Ctrl-]","Ctrl-]"),exec:function(o){o.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(o,i){o.insert(i)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(o,i){o.insert(k.stringRepeat(i.text||"",i.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:a(null,"Ctrl-O"),exec:function(o){o.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:a("Alt-Shift-X","Ctrl-T"),exec:function(o){o.transposeLetters()},multiSelectAction:function(o){o.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:a("Ctrl-U","Ctrl-U"),exec:function(o){o.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:a("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(o){o.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:a(null,null),exec:function(o){o.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:a("Ctrl-Shift-L","Command-Shift-L"),exec:function(o){var i=o.selection.getRange();i.start.column=i.end.column=0,i.end.row++,o.selection.setRange(i,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:a("Ctrl+F3","F3"),exec:function(o){o.openLink()}},{name:"joinlines",description:"Join lines",bindKey:a(null,null),exec:function(o){for(var i=o.selection.isBackwards(),n=i?o.selection.getSelectionLead():o.selection.getSelectionAnchor(),t=i?o.selection.getSelectionAnchor():o.selection.getSelectionLead(),e=o.session.doc.getLine(n.row).length,r=o.session.doc.getTextRange(o.selection.getRange()),s=r.replace(/\n\s*/," ").length,l=o.session.doc.getLine(n.row),u=n.row+1;u<=t.row+1;u++){var b=k.stringTrimLeft(k.stringTrimRight(o.session.doc.getLine(u)));b.length!==0&&(b=" "+b),l+=b}t.row+10?(o.selection.moveCursorTo(n.row,n.column),o.selection.selectTo(n.row,n.column+s)):(e=o.session.doc.getLine(n.row).length>e?e+1:e,o.selection.moveCursorTo(n.row,e))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:a(null,null),exec:function(o){var i=o.session.doc.getLength()-1,n=o.session.doc.getLine(i).length,t=o.selection.rangeList.ranges,e=[];t.length<1&&(t=[o.selection.getRange()]);for(var r=0;rc[o].column&&o++,t.unshift(o,0),c.splice.apply(c,t),this.$updateRows()}}},S.prototype.$updateRows=function(){var a=this.session.lineWidgets;if(a){var c=!0;a.forEach(function(o,i){if(o)for(c=!1,o.row=i;o.$oldWidget;)o.$oldWidget.row=i,o=o.$oldWidget}),c&&(this.session.lineWidgets=null)}},S.prototype.$registerLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var c=this.session.lineWidgets[a.row];return c&&(a.$oldWidget=c,c.el&&c.el.parentNode&&(c.el.parentNode.removeChild(c.el),c._inDocument=!1)),this.session.lineWidgets[a.row]=a,a},S.prototype.addLineWidget=function(a){if(this.$registerLineWidget(a),a.session=this.session,!this.editor)return a;var c=this.editor.renderer;a.html&&!a.el&&(a.el=k.createElement("div"),a.el.innerHTML=a.html),a.text&&!a.el&&(a.el=k.createElement("div"),a.el.textContent=a.text),a.el&&(k.addCssClass(a.el,"ace_lineWidgetContainer"),a.className&&k.addCssClass(a.el,a.className),a.el.style.position="absolute",a.el.style.zIndex="5",c.container.appendChild(a.el),a._inDocument=!0,a.coverGutter||(a.el.style.zIndex="3"),a.pixelHeight==null&&(a.pixelHeight=a.el.offsetHeight)),a.rowCount==null&&(a.rowCount=a.pixelHeight/c.layerConfig.lineHeight);var o=this.session.getFoldAt(a.row,0);if(a.$fold=o,o){var i=this.session.lineWidgets;a.row==o.end.row&&!i[o.start.row]?i[o.start.row]=a:a.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,c),this.onWidgetChanged(a),a},S.prototype.removeLineWidget=function(a){if(a._inDocument=!1,a.session=null,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch(o){}if(this.session.lineWidgets){var c=this.session.lineWidgets[a.row];if(c==a)this.session.lineWidgets[a.row]=a.$oldWidget,a.$oldWidget&&this.onWidgetChanged(a.$oldWidget);else for(;c;){if(c.$oldWidget==a){c.$oldWidget=a.$oldWidget;break}c=c.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},S.prototype.getWidgetsAtRow=function(a){for(var c=this.session.lineWidgets,o=c&&c[a],i=[];o;)i.push(o),o=o.$oldWidget;return i},S.prototype.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},S.prototype.measureWidgets=function(a,c){var o=this.session._changedWidgets,i=c.layerConfig;if(!(!o||!o.length)){for(var n=1/0,t=0;t0&&!i[n];)n--;this.firstRow=o.firstRow,this.lastRow=o.lastRow,c.$cursorLayer.config=o;for(var e=n;e<=t;e++){var r=i[e];if(!(!r||!r.el)){if(r.hidden){r.el.style.top=-100-(r.pixelHeight||0)+"px";continue}r._inDocument||(r._inDocument=!0,c.container.appendChild(r.el));var s=c.$cursorLayer.getPixelPosition({row:e,column:0},!0).top;r.coverLine||(s+=o.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=s-o.offset+"px";var l=r.coverGutter?0:c.gutterWidth;r.fixedWidth||(l-=c.scrollLeft),r.el.style.left=l+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=o.width+2*o.padding+"px"),r.fixedWidth?r.el.style.right=c.scrollBar.getWidth()+"px":r.el.style.right=""}}}},S})();x.LineWidgets=M}),ace.define("ace/keyboard/gutter_handler",["require","exports","module","ace/lib/keys","ace/mouse/default_gutter_handler"],function(E,x,z){var k=E("../lib/keys"),M=E("../mouse/default_gutter_handler").GutterTooltip,S=(function(){function c(o){this.editor=o,this.gutterLayer=o.renderer.$gutterLayer,this.element=o.renderer.$gutter,this.lines=o.renderer.$gutterLayer.$lines,this.activeRowIndex=null,this.activeLane=null,this.annotationTooltip=new M(this.editor)}return c.prototype.addListener=function(){this.element.addEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.addEventListener("focusout",this.$blurGutter.bind(this)),this.editor.on("mousewheel",this.$blurGutter.bind(this))},c.prototype.removeListener=function(){this.element.removeEventListener("keydown",this.$onGutterKeyDown.bind(this)),this.element.removeEventListener("focusout",this.$blurGutter.bind(this)),this.editor.off("mousewheel",this.$blurGutter.bind(this))},c.prototype.$onGutterKeyDown=function(o){if(this.annotationTooltip.isOpen){o.preventDefault(),o.keyCode===k.escape&&this.annotationTooltip.hideTooltip();return}if(o.target===this.element){if(o.keyCode!=k.enter)return;o.preventDefault();var i=this.editor.getCursorPosition().row;this.editor.isRowVisible(i)||this.editor.scrollToLine(i,!0,!0),setTimeout((function(){var n=this.$rowToRowIndex(this.gutterLayer.$cursorCell.row),t=this.$findNearestFoldWidget(n),e=this.$findNearestAnnotation(n);if(!(t===null&&e===null)){if(t===null&&e!==null){this.activeRowIndex=e,this.activeLane="annotation",this.$focusAnnotation(this.activeRowIndex);return}if(t!==null&&e===null){this.activeRowIndex=t,this.activeLane="fold",this.$focusFoldWidget(this.activeRowIndex);return}if(Math.abs(e-n)0||o+i=0&&this.$isFoldWidgetVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(o+i))return o+i}return null},c.prototype.$findNearestAnnotation=function(o){if(this.$isAnnotationVisible(o))return o;for(var i=0;o-i>0||o+i=0&&this.$isAnnotationVisible(o-i))return o-i;if(o+i<=this.lines.getLength()-1&&this.$isAnnotationVisible(o+i))return o+i}return null},c.prototype.$focusFoldWidget=function(o){if(o!=null){var i=this.$getFoldWidget(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$focusAnnotation=function(o){if(o!=null){var i=this.$getAnnotation(o);i.classList.add(this.editor.renderer.keyboardFocusClassName),i.focus()}},c.prototype.$blurFoldWidget=function(o){var i=this.$getFoldWidget(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$blurAnnotation=function(o){var i=this.$getAnnotation(o);i.classList.remove(this.editor.renderer.keyboardFocusClassName),i.blur()},c.prototype.$moveFoldWidgetUp=function(){for(var o=this.activeRowIndex;o>0;)if(o--,this.$isFoldWidgetVisible(o)){this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=o,this.$focusFoldWidget(this.activeRowIndex);return}},c.prototype.$moveFoldWidgetDown=function(){for(var o=this.activeRowIndex;o0;)if(o--,this.$isAnnotationVisible(o)){this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=o,this.$focusAnnotation(this.activeRowIndex);return}},c.prototype.$moveAnnotationDown=function(){for(var o=this.activeRowIndex;o=p.length&&(p=void 0),{value:p&&p[y++],done:!p}}};throw new TypeError(h?"Object is not iterable.":"Symbol.iterator is not defined.")},M=E("./lib/oop"),S=E("./lib/dom"),a=E("./lib/lang"),c=E("./lib/useragent"),o=E("./keyboard/textinput").TextInput,i=E("./mouse/mouse_handler").MouseHandler,n=E("./mouse/fold_handler").FoldHandler,t=E("./keyboard/keybinding").KeyBinding,e=E("./edit_session").EditSession,r=E("./search").Search,s=E("./range").Range,l=E("./lib/event_emitter").EventEmitter,u=E("./commands/command_manager").CommandManager,b=E("./commands/default_commands").commands,m=E("./config"),g=E("./token_iterator").TokenIterator,d=E("./line_widgets").LineWidgets,$=E("./keyboard/gutter_handler").GutterKeyboardHandler,T=E("./config").nls,A=E("./clipboard"),C=E("./lib/keys"),w=(function(){function p(h,v,y){this.session,this.$toDestroy=[];var L=h.getContainerElement();this.container=L,this.renderer=h,this.id="editor"+ ++p.$uid,this.commands=new u(c.isMac?"mac":"win",b),typeof document=="object"&&(this.textInput=new o(h.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new i(this),new n(this)),this.keyBinding=new t(this),this.$search=new r().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=a.delayedCall((function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}).bind(this)),this.on("change",function(R,_){_._$emitInputEvent.schedule(31)}),this.setSession(v||y&&y.session||new e("")),m.resetOptions(this),y&&this.setOptions(y),m._signal("editor",this)}return p.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=a.delayedCall(this.endOperation.bind(this,!0)),this.on("change",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}).bind(this),!0),this.on("changeSelection",(function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}).bind(this),!0)},p.prototype.startOperation=function(h){if(this.curOp){if(!h||this.curOp.command)return;this.prevOp=this.curOp}h||(this.previousCommand=null,h={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:h.command||{},args:h.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},p.prototype.endOperation=function(h){if(this.curOp&&this.session){if(h&&h.returnValue===!1||!this.session)return this.curOp=null;if(h==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var v=this.curOp.command,y=v&&v.scrollIntoView;if(y){switch(y){case"center-animate":y="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var L=this.selection.getRange(),R=this.renderer.layerConfig;(L.start.row>=R.lastRow||L.end.row<=R.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}y=="animate"&&this.renderer.animateScrolling(this.curOp.scrollTop)}var _=this.selection.toJSON();this.curOp.selectionAfter=_,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(_),this.prevOp=this.curOp,this.curOp=null}},p.prototype.$historyTracker=function(h){if(this.$mergeUndoDeltas){var v=this.prevOp,y=this.$mergeableCommands,L=v.command&&h.command.name==v.command.name;if(h.command.name=="insertstring"){var R=h.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),L=L&&this.mergeNextCommand&&(!/\s/.test(R)||/\s/.test(v.args)),this.mergeNextCommand=!0}else L=L&&y.indexOf(h.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(L=!1),L?this.session.mergeUndoDeltas=!0:y.indexOf(h.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},p.prototype.setKeyboardHandler=function(h,v){if(h&&typeof h=="string"&&h!="ace"){this.$keybindingId=h;var y=this;m.loadModule(["keybinding",h],function(L){y.$keybindingId==h&&y.keyBinding.setKeyboardHandler(L&&L.handler),v&&v()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(h),v&&v()},p.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},p.prototype.setSession=function(h){if(this.session!=h){this.curOp&&this.endOperation(),this.curOp={};var v=this.session;if(v){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var y=this.session.getSelection();y.off("changeCursor",this.$onCursorChange),y.off("changeSelection",this.$onSelectionChange)}this.session=h,h?(this.$onDocumentChange=this.onDocumentChange.bind(this),h.on("change",this.$onDocumentChange),this.renderer.setSession(h),this.$onChangeMode=this.onChangeMode.bind(this),h.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),h.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),h.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),h.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),h.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),h.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=h.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(h)),this._signal("changeSession",{session:h,oldSession:v}),this.curOp=null,v&&v._signal("changeEditor",{oldEditor:this}),h&&h._signal("changeEditor",{editor:this}),h&&!h.destroyed&&h.bgTokenizer.scheduleStart()}},p.prototype.getSession=function(){return this.session},p.prototype.setValue=function(h,v){return this.session.doc.setValue(h),v?v==1?this.navigateFileEnd():v==-1&&this.navigateFileStart():this.selectAll(),h},p.prototype.getValue=function(){return this.session.getValue()},p.prototype.getSelection=function(){return this.selection},p.prototype.resize=function(h){this.renderer.onResize(h)},p.prototype.setTheme=function(h,v){this.renderer.setTheme(h,v)},p.prototype.getTheme=function(){return this.renderer.getTheme()},p.prototype.setStyle=function(h){this.renderer.setStyle(h)},p.prototype.unsetStyle=function(h){this.renderer.unsetStyle(h)},p.prototype.getFontSize=function(){return this.getOption("fontSize")||S.computedStyle(this.container).fontSize},p.prototype.setFontSize=function(h){this.setOption("fontSize",h)},p.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var h=this;this.$highlightPending=!0,setTimeout(function(){h.$highlightPending=!1;var v=h.session;if(!(!v||v.destroyed)){v.$bracketHighlight&&(v.$bracketHighlight.markerIds.forEach(function(D){v.removeMarker(D)}),v.$bracketHighlight=null);var y=h.getCursorPosition(),L=h.getKeyboardHandler(),R=L&&L.$getDirectionForHighlight&&L.$getDirectionForHighlight(h),_=v.getMatchingBracketRanges(y,R);if(!_){var I=new g(v,y.row,y.column),N=I.getCurrentToken();if(N&&/\b(?:tag-open|tag-name)/.test(N.type)){var W=v.getMatchingTags(y);W&&(_=[W.openTagName.isEmpty()?W.openTag:W.openTagName,W.closeTagName.isEmpty()?W.closeTag:W.closeTagName])}}if(!_&&v.$mode.getMatching&&(_=v.$mode.getMatching(h.session)),!_){h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide();return}var O="ace_bracket";Array.isArray(_)?_.length==1&&(O="ace_error_bracket"):_=[_],_.length==2&&(s.comparePoints(_[0].end,_[1].start)==0?_=[s.fromPoints(_[0].start,_[1].end)]:s.comparePoints(_[0].start,_[1].end)==0&&(_=[s.fromPoints(_[1].start,_[0].end)])),v.$bracketHighlight={ranges:_,markerIds:_.map(function(D){return v.addMarker(D,O,"text")})},h.getHighlightIndentGuides()&&h.renderer.$textLayer.$highlightIndentGuide()}},50)}},p.prototype.focus=function(){this.textInput.focus()},p.prototype.isFocused=function(){return this.textInput.isFocused()},p.prototype.blur=function(){this.textInput.blur()},p.prototype.onFocus=function(h){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",h))},p.prototype.onBlur=function(h){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",h))},p.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},p.prototype.onDocumentChange=function(h){var v=this.session.$useWrapMode,y=h.start.row==h.end.row?h.end.row:1/0;this.renderer.updateLines(h.start.row,y,v),this._signal("change",h),this.$cursorChange()},p.prototype.onTokenizerUpdate=function(h){var v=h.data;this.renderer.updateLines(v.first,v.last)},p.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},p.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},p.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},p.prototype.$updateHighlightActiveLine=function(){var h=this.getSession(),v;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(v=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(v=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(v=!1)),h.$highlightLineMarker&&!v)h.removeMarker(h.$highlightLineMarker.id),h.$highlightLineMarker=null;else if(!h.$highlightLineMarker&&v){var y=new s(v.row,v.column,v.row,1/0);y.id=h.addMarker(y,"ace_active-line","screenLine"),h.$highlightLineMarker=y}else v&&(h.$highlightLineMarker.start.row=v.row,h.$highlightLineMarker.end.row=v.row,h.$highlightLineMarker.start.column=v.column,h._signal("changeBackMarker"))},p.prototype.onSelectionChange=function(h){var v=this.session;if(v.$selectionMarker&&v.removeMarker(v.$selectionMarker),v.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var y=this.selection.getRange(),L=this.getSelectionStyle();v.$selectionMarker=v.addMarker(y,"ace_selection",L)}var R=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(R),this._signal("changeSelection")},p.prototype.$getSelectionHighLightRegexp=function(){var h=this.session,v=this.getSelectionRange();if(!(v.isEmpty()||v.isMultiLine())){var y=v.start.column,L=v.end.column,R=h.getLine(v.start.row),_=R.substring(y,L);if(!(_.length>5e3||!/[\w\d]/.test(_))){var I=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),N=R.substring(y-1,L+1);if(I.test(N))return I}}},p.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},p.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},p.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},p.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},p.prototype.onChangeMode=function(h){this.renderer.updateText(),this._emit("changeMode",h)},p.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},p.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},p.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},p.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},p.prototype.getCopyText=function(){var h=this.getSelectedText(),v=this.session.doc.getNewLineCharacter(),y=!1;if(!h&&this.$copyWithEmptySelection){y=!0;for(var L=this.selection.getAllRanges(),R=0;RD.search(/\S|$/)){var N=D.substr(R.column).search(/\S|$/);y.doc.removeInLine(R.row,R.column,R.column+N)}}this.clearSelection();var W=R.column,O=y.getState(R.row),D=y.getLine(R.row),F=L.checkOutdent(O,D,h);if(y.insert(R,h),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new s(R.row,W+_.selection[0],R.row,W+_.selection[1])):this.selection.setSelectionRange(new s(R.row+_.selection[0],_.selection[1],R.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(y.getDocument().isNewLine(h)){var H=L.getNextLineIndent(O,D.slice(0,R.column),y.getTabString());y.insert({row:R.row+1,column:0},H)}F&&L.autoOutdent(O,y,R.row)}},p.prototype.autoIndent=function(){for(var h=this.session,v=h.getMode(),y=this.selection.isEmpty()?[new s(0,0,h.doc.getLength()-1,0)]:this.selection.getAllRanges(),L="",R="",_="",I=h.getTabString(),N=0;N0&&(L=h.getState(D-1),R=h.getLine(D-1),_=v.getNextLineIndent(L,R,I));var F=h.getLine(D),H=v.$getIndent(F);if(_!==H){if(H.length>0){var P=new s(D,0,D,H.length);h.remove(P)}_.length>0&&h.insert({row:D,column:0},_)}v.autoOutdent(L,h,D)}},p.prototype.onTextInput=function(h,v){if(!v)return this.keyBinding.onTextInput(h);this.startOperation({command:{name:"insertstring"}});var y=this.applyComposition.bind(this,h,v);this.selection.rangeCount?this.forEachSelection(y):y(),this.endOperation()},p.prototype.applyComposition=function(h,v){if(v.extendLeft||v.extendRight){var y=this.selection.getRange();y.start.column-=v.extendLeft,y.end.column+=v.extendRight,y.start.column<0&&(y.start.row--,y.start.column+=this.session.getLine(y.start.row).length+1),this.selection.setRange(y),!h&&!y.isEmpty()&&this.remove()}if((h||!this.selection.isEmpty())&&this.insert(h,!0),v.restoreStart||v.restoreEnd){var y=this.selection.getRange();y.start.column-=v.restoreStart,y.end.column-=v.restoreEnd,this.selection.setRange(y)}},p.prototype.onCommandKey=function(h,v,y){return this.keyBinding.onCommandKey(h,v,y)},p.prototype.setOverwrite=function(h){this.session.setOverwrite(h)},p.prototype.getOverwrite=function(){return this.session.getOverwrite()},p.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},p.prototype.setScrollSpeed=function(h){this.setOption("scrollSpeed",h)},p.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},p.prototype.setDragDelay=function(h){this.setOption("dragDelay",h)},p.prototype.getDragDelay=function(){return this.getOption("dragDelay")},p.prototype.setSelectionStyle=function(h){this.setOption("selectionStyle",h)},p.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},p.prototype.setHighlightActiveLine=function(h){this.setOption("highlightActiveLine",h)},p.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},p.prototype.setHighlightGutterLine=function(h){this.setOption("highlightGutterLine",h)},p.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},p.prototype.setHighlightSelectedWord=function(h){this.setOption("highlightSelectedWord",h)},p.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},p.prototype.setAnimatedScroll=function(h){this.renderer.setAnimatedScroll(h)},p.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},p.prototype.setShowInvisibles=function(h){this.renderer.setShowInvisibles(h)},p.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},p.prototype.setDisplayIndentGuides=function(h){this.renderer.setDisplayIndentGuides(h)},p.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},p.prototype.setHighlightIndentGuides=function(h){this.renderer.setHighlightIndentGuides(h)},p.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},p.prototype.setShowPrintMargin=function(h){this.renderer.setShowPrintMargin(h)},p.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},p.prototype.setPrintMarginColumn=function(h){this.renderer.setPrintMarginColumn(h)},p.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},p.prototype.setReadOnly=function(h){this.setOption("readOnly",h)},p.prototype.getReadOnly=function(){return this.getOption("readOnly")},p.prototype.setBehavioursEnabled=function(h){this.setOption("behavioursEnabled",h)},p.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},p.prototype.setWrapBehavioursEnabled=function(h){this.setOption("wrapBehavioursEnabled",h)},p.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},p.prototype.setShowFoldWidgets=function(h){this.setOption("showFoldWidgets",h)},p.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},p.prototype.setFadeFoldWidgets=function(h){this.setOption("fadeFoldWidgets",h)},p.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},p.prototype.remove=function(h){this.selection.isEmpty()&&(h=="left"?this.selection.selectLeft():this.selection.selectRight());var v=this.getSelectionRange();if(this.getBehavioursEnabled()){var y=this.session,L=y.getState(v.start.row),R=y.getMode().transformAction(L,"deletion",this,y,v);if(v.end.column===0){var _=y.getTextRange(v);if(_[_.length-1]=="\n"){var I=y.getLine(v.end.row);/^\s+$/.test(I)&&(v.end.column=I.length)}}R&&(v=R)}this.session.remove(v),this.clearSelection()},p.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},p.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var h=this.getSelectionRange();h.start.column==h.end.column&&h.start.row==h.end.row&&(h.end.column=0,h.end.row++),this.session.remove(h),this.clearSelection()},p.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var h=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(h)},p.prototype.setGhostText=function(h,v){this.session.widgetManager||(this.session.widgetManager=new d(this.session),this.session.widgetManager.attach(this)),this.renderer.setGhostText(h,v)},p.prototype.removeGhostText=function(){this.session.widgetManager&&this.renderer.removeGhostText()},p.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var h=this.getCursorPosition(),v=h.column;if(v!==0){var y=this.session.getLine(h.row),L,R;vN.toLowerCase()?1:0});for(var R=new s(0,0,0,0),L=h.first;L<=h.last;L++){var _=v.getLine(L);R.start.row=L,R.end.row=L,R.end.column=_.length,v.replace(R,y[L-h.first])}},p.prototype.toggleCommentLines=function(){var h=this.session.getState(this.getCursorPosition().row),v=this.$getSelectedRows();this.session.getMode().toggleCommentLines(h,this.session,v.first,v.last)},p.prototype.toggleBlockComment=function(){var h=this.getCursorPosition(),v=this.session.getState(h.row),y=this.getSelectionRange();this.session.getMode().toggleBlockComment(v,this.session,y,h)},p.prototype.getNumberAt=function(h,v){var y=/[\-]?[0-9]+(?:\.[0-9]+)?/g;y.lastIndex=0;for(var L=this.session.getLine(h);y.lastIndex=v){var _={value:R[0],start:R.index,end:R.index+R[0].length};return _}}return null},p.prototype.modifyNumber=function(h){var v=this.selection.getCursor().row,y=this.selection.getCursor().column,L=new s(v,y-1,v,y),R=this.session.getTextRange(L);if(!isNaN(parseFloat(R))&&isFinite(R)){var _=this.getNumberAt(v,y);if(_){var I=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,N=_.start+_.value.length-I,W=parseFloat(_.value);W*=Math.pow(10,N),I!==_.end&&y=I&&_<=N&&(y=Y,W.selection.clearSelection(),W.moveCursorTo(h,I+L),W.selection.selectTo(h,N+L)),I=N});for(var O=this.$toggleWordPairs,D,F=0;F=N&&I<=W&&H.match(/((?:https?|ftp):\/\/[\S]+)/)){O=H.replace(/[\s:.,'";}\]]+$/,"");break}N=W}}catch(P){y={error:P}}finally{try{F&&!F.done&&(L=D.return)&&L.call(D)}finally{if(y)throw y.error}}return O},p.prototype.openLink=function(){var h=this.selection.getCursor(),v=this.findLinkAt(h.row,h.column);return v&&window.open(v,"_blank"),v!=null},p.prototype.removeLines=function(){var h=this.$getSelectedRows();this.session.removeFullLines(h.first,h.last),this.clearSelection()},p.prototype.duplicateSelection=function(){var h=this.selection,v=this.session,y=h.getRange(),L=h.isBackwards();if(y.isEmpty()){var R=y.start.row;v.duplicateLines(R,R)}else{var _=L?y.start:y.end,I=v.insert(_,v.getTextRange(y));y.start=_,y.end=I,h.setSelectionRange(y,L)}},p.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},p.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},p.prototype.moveText=function(h,v,y){return this.session.moveText(h,v,y)},p.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},p.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},p.prototype.$moveLines=function(h,v){var y,L,R=this.selection;if(!R.inMultiSelectMode||this.inVirtualSelectionMode){var _=R.toOrientedRange();y=this.$getSelectedRows(_),L=this.session.$moveLines(y.first,y.last,v?0:h),v&&h==-1&&(L=0),_.moveBy(L,0),R.fromOrientedRange(_)}else{var I=R.rangeList.ranges;R.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var N=0,W=0,O=I.length,D=0;DP+1)break;P=U.last}for(D--,N=this.session.$moveLines(H,P,v?0:h),v&&h==-1&&(F=D+1);F<=D;)I[F].moveBy(N,0),F++;v||(N=0),W+=N}R.fromOrientedRange(R.ranges[0]),R.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},p.prototype.$getSelectedRows=function(h){return h=(h||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(h.start.row),last:this.session.getRowFoldEnd(h.end.row)}},p.prototype.onCompositionStart=function(h){this.renderer.showComposition(h)},p.prototype.onCompositionUpdate=function(h){this.renderer.setCompositionText(h)},p.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},p.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},p.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},p.prototype.isRowVisible=function(h){return h>=this.getFirstVisibleRow()&&h<=this.getLastVisibleRow()},p.prototype.isRowFullyVisible=function(h){return h>=this.renderer.getFirstFullyVisibleRow()&&h<=this.renderer.getLastFullyVisibleRow()},p.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},p.prototype.$moveByPage=function(h,v){var y=this.renderer,L=this.renderer.layerConfig,R=h*Math.floor(L.height/L.lineHeight);v===!0?this.selection.$moveSelection(function(){this.moveCursorBy(R,0)}):v===!1&&(this.selection.moveCursorBy(R,0),this.selection.clearSelection());var _=y.scrollTop;y.scrollBy(0,R*L.lineHeight),v!=null&&y.scrollCursorIntoView(null,.5),y.animateScrolling(_)},p.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},p.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},p.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},p.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},p.prototype.scrollPageDown=function(){this.$moveByPage(1)},p.prototype.scrollPageUp=function(){this.$moveByPage(-1)},p.prototype.scrollToRow=function(h){this.renderer.scrollToRow(h)},p.prototype.scrollToLine=function(h,v,y,L){this.renderer.scrollToLine(h,v,y,L)},p.prototype.centerSelection=function(){var h=this.getSelectionRange(),v={row:Math.floor(h.start.row+(h.end.row-h.start.row)/2),column:Math.floor(h.start.column+(h.end.column-h.start.column)/2)};this.renderer.alignCursor(v,.5)},p.prototype.getCursorPosition=function(){return this.selection.getCursor()},p.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},p.prototype.getSelectionRange=function(){return this.selection.getRange()},p.prototype.selectAll=function(){this.selection.selectAll()},p.prototype.clearSelection=function(){this.selection.clearSelection()},p.prototype.moveCursorTo=function(h,v){this.selection.moveCursorTo(h,v)},p.prototype.moveCursorToPosition=function(h){this.selection.moveCursorToPosition(h)},p.prototype.jumpToMatching=function(h,v){var y=this.getCursorPosition(),L=new g(this.session,y.row,y.column),R=L.getCurrentToken(),_=0;R&&R.type.indexOf("tag-name")!==-1&&(R=L.stepBackward());var I=R||L.stepForward();if(I){var N,W=!1,O={},D=y.column-I.start,F,H={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(I.value.match(/[{}()\[\]]/g)){for(;D1?O[I.value]++:R.value==="=0;--_)this.$tryReplace(y[_],h)&&L++;return this.selection.setSelectionRange(R),L},p.prototype.$tryReplace=function(h,v){var y=this.session.getTextRange(h);return v=this.$search.replace(y,v),v!==null?(h.end=this.session.replace(h,v),h):null},p.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},p.prototype.find=function(h,v,y){v||(v={}),typeof h=="string"||h instanceof RegExp?v.needle=h:typeof h=="object"&&M.mixin(v,h);var L=this.selection.getRange();v.needle==null&&(h=this.session.getTextRange(L)||this.$search.$options.needle,h||(L=this.session.getWordRange(L.start.row,L.start.column),h=this.session.getTextRange(L)),this.$search.set({needle:h})),this.$search.set(v),v.start||this.$search.set({start:L});var R=this.$search.find(this.session);if(v.preventScroll)return R;if(R)return this.revealRange(R,y),R;v.backwards?L.start=L.end:L.end=L.start,this.selection.setRange(L)},p.prototype.findNext=function(h,v){this.find({skipCurrent:!0,backwards:!1},h,v)},p.prototype.findPrevious=function(h,v){this.find(h,{skipCurrent:!0,backwards:!0},v)},p.prototype.revealRange=function(h,v){this.session.unfold(h),this.selection.setSelectionRange(h);var y=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(h.start,h.end,.5),v!==!1&&this.renderer.animateScrolling(y)},p.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},p.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(h){h.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},p.prototype.setAutoScrollEditorIntoView=function(h){if(h){var v,y=this,L=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var R=this.$scrollAnchor;R.style.cssText="position:absolute",this.container.insertBefore(R,this.container.firstChild);var _=this.on("changeSelection",function(){L=!0}),I=this.renderer.on("beforeRender",function(){L&&(v=y.renderer.container.getBoundingClientRect())}),N=this.renderer.on("afterRender",function(){if(L&&v&&(y.isFocused()||y.searchBox&&y.searchBox.isFocused())){var W=y.renderer,O=W.$cursorLayer.$pixelPos,D=W.layerConfig,F=O.top-D.offset;O.top>=0&&F+v.top<0?L=!0:O.topwindow.innerHeight?L=!1:L=null,L!=null&&(R.style.top=F+"px",R.style.left=O.left+"px",R.style.height=D.lineHeight+"px",R.scrollIntoView(L)),L=v=null}});this.setAutoScrollEditorIntoView=function(W){W||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",N),this.renderer.off("beforeRender",I))}}},p.prototype.$resetCursorStyle=function(){var h=this.$cursorStyle||"ace",v=this.renderer.$cursorLayer;v&&(v.setSmoothBlinking(/smooth/.test(h)),v.isBlinking=!this.$readOnly&&h!="wide",S.setCssClass(v.element,"ace_slim-cursors",/slim/.test(h)))},p.prototype.prompt=function(h,v,y){var L=this;m.loadModule("ace/ext/prompt",function(R){R.prompt(L,h,v,y)})},p})();w.$uid=0,w.prototype.curOp=null,w.prototype.prevOp={},w.prototype.$mergeableCommands=["backspace","del","insertstring"],w.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],M.implement(w.prototype,l),m.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(p){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:p})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(p){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(p){this.textInput.setReadOnly(p),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(p){this.textInput.setCopyWithEmptySelection(p)},initialValue:!1},cursorStyle:{set:function(p){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(p){this.setAutoScrollEditorIntoView(p)}},keyboardHandler:{set:function(p){this.setKeyboardHandler(p)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(p){this.session.setValue(p)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(p){this.setSession(p)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(p){this.renderer.$gutterLayer.setShowLineNumbers(p),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),p&&this.$relativeLineNumbers?f.attach(this):f.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(p){this.$showLineNumbers&&p?f.attach(this):f.detach(this)}},placeholder:{set:function(p){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var h=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(h&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),S.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!h&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),S.addCssClass(this.container,"ace_hasPlaceholder");var v=S.createElement("div");v.className="ace_placeholder",v.textContent=this.$placeholder||"",this.renderer.placeholderNode=v,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!h&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(p){var h={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(L){L.blur(),L.renderer.scroller.focus()},readOnly:!0},v=function(L){if(L.target==this.renderer.scroller&&L.keyCode===C.enter){L.preventDefault();var R=this.getCursorPosition().row;this.isRowVisible(R)||this.scrollToLine(R,!0,!0),this.focus()}},y;p?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(c.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",T("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",T("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",v.bind(this)),this.commands.addCommand(h),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",T("editor.gutter.aria-roledescription","editor")),this.renderer.$gutter.setAttribute("aria-label",T("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),y||(y=new $(this)),y.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",v.bind(this)),this.commands.removeCommand(h),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),y&&y.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(p){this.$textInputAriaLabel=p},initialValue:""},enableMobileMenu:{set:function(p){this.$enableMobileMenu=p},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var f={getText:function(p,h){return(Math.abs(p.selection.lead.row-h)||h+1+(h<9?"·":""))+""},getWidth:function(p,h,v){return Math.max(h.toString().length,(v.lastRow+1).toString().length,2)*v.characterWidth},update:function(p,h){h.renderer.$loop.schedule(h.renderer.CHANGE_GUTTER)},attach:function(p){p.renderer.$gutterLayer.$renderer=this,p.on("changeSelection",this.update),this.update(null,p)},detach:function(p){p.renderer.$gutterLayer.$renderer==this&&(p.renderer.$gutterLayer.$renderer=null),p.off("changeSelection",this.update),this.update(null,p)}};x.Editor=w}),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("../lib/dom"),M=(function(){function S(a,c){this.element=a,this.canvasHeight=c||5e5,this.element.style.height=this.canvasHeight*2+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return S.prototype.moveContainer=function(a){k.translate(this.element,0,-(a.firstRowScreen*a.lineHeight%this.canvasHeight)-a.offset*this.$offsetCoefficient)},S.prototype.pageChanged=function(a,c){return Math.floor(a.firstRowScreen*a.lineHeight/this.canvasHeight)!==Math.floor(c.firstRowScreen*c.lineHeight/this.canvasHeight)},S.prototype.computeLineTop=function(a,c,o){var i=c.firstRowScreen*c.lineHeight,n=Math.floor(i/this.canvasHeight),t=o.documentToScreenRow(a,0)*c.lineHeight;return t-n*this.canvasHeight},S.prototype.computeLineHeight=function(a,c,o){return c.lineHeight*o.getRowLineCount(a)},S.prototype.getLength=function(){return this.cells.length},S.prototype.get=function(a){return this.cells[a]},S.prototype.shift=function(){this.$cacheCell(this.cells.shift())},S.prototype.pop=function(){this.$cacheCell(this.cells.pop())},S.prototype.push=function(a){if(Array.isArray(a)){this.cells.push.apply(this.cells,a);for(var c=k.createFragment(this.element),o=0;ob&&(d=u.end.row+1,u=r.getNextFoldLine(d,u),b=u?u.start.row:1/0),d>l){for(;this.$lines.getLength()>g+1;)this.$lines.pop();break}m=this.$lines.get(++g),m?m.row=d:(m=this.$lines.createCell(d,e,this.session,n),this.$lines.push(m)),this.$renderCell(m,e,u,d),d++}this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$updateGutterWidth=function(e){var r=this.session,s=r.gutterRenderer||this.$renderer,l=r.$firstLineNumber,u=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||r.$useWrapMode)&&(u=r.getLength()+l-1);var b=s?s.getWidth(r,u,e):u.toString().length*e.characterWidth,m=this.$padding||this.$computePadding();b+=m.left+m.right,b!==this.gutterWidth&&!isNaN(b)&&(this.gutterWidth=b,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",b))},t.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},t.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!(this.$cursorCell&&this.$cursorCell.row==e)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var r=this.$lines.cells;this.$cursorCell=null;for(var s=0;s=this.$cursorRow){if(l.row>this.$cursorRow){var u=this.session.getFoldLine(this.$cursorRow);if(s>0&&u&&u.start.row==r[s-1].row)l=r[s-1];else break}l.element.className="ace_gutter-active-line "+l.element.className,this.$cursorCell=l;break}}}}},t.prototype.scrollLines=function(e){var r=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(r,e))return this.update(e);this.$lines.moveContainer(e);var s=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),l=this.oldLastRow;if(this.oldLastRow=s,!r||l0;u--)this.$lines.shift();if(l>s)for(var u=this.session.getFoldedRowCount(s+1,l);u>0;u--)this.$lines.pop();e.firstRowl&&this.$lines.push(this.$renderLines(e,l+1,s)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},t.prototype.$renderLines=function(e,r,s){for(var l=[],u=r,b=this.session.getNextFoldLine(u),m=b?b.start.row:1/0;u>m&&(u=b.end.row+1,b=this.session.getNextFoldLine(u,b),m=b?b.start.row:1/0),!(u>s);){var g=this.$lines.createCell(u,e,this.session,n);this.$renderCell(g,e,b,u),l.push(g),u++}return l},t.prototype.$renderCell=function(e,r,s,l){var u=e.element,b=this.session,m=u.childNodes[0],g=u.childNodes[1],d=u.childNodes[2],$=d.firstChild,T=b.$firstLineNumber,A=b.$breakpoints,C=b.$decorations,w=b.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&b.foldWidgets,p=s?s.start.row:Number.MAX_VALUE,h=r.lineHeight+"px",v=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",y=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",L=(w?w.getText(b,l):l+T).toString();if(this.$highlightGutterLine&&(l==this.$cursorRow||s&&l=p&&this.$cursorRow<=s.end.row)&&(v+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),A[l]&&(v+=A[l]),C[l]&&(v+=C[l]),this.$annotations[l]&&l!==p&&(v+=this.$annotations[l].className),f){var R=f[l];R==null&&(R=f[l]=b.getFoldWidget(l))}if(R){var _="ace_fold-widget ace_"+R,I=R=="start"&&l==p&&ls.right-r.right)return"foldWidgets"},t})();i.prototype.$fixedWidth=!1,i.prototype.$highlightGutterLine=!0,i.prototype.$renderer="",i.prototype.$showLineNumbers=!0,i.prototype.$showFoldWidgets=!0,M.implement(i.prototype,a);function n(t){var e=document.createTextNode("");t.appendChild(e);var r=k.createElement("span");t.appendChild(r);var s=k.createElement("span");t.appendChild(s);var l=k.createElement("span");return s.appendChild(l),t}x.Gutter=i}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(E,x,z){var k=E("../range").Range,M=E("../lib/dom"),S=(function(){function c(o){this.element=M.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)}return c.prototype.setPadding=function(o){this.$padding=o},c.prototype.setSession=function(o){this.session=o},c.prototype.setMarkers=function(o){this.markers=o},c.prototype.elt=function(o,i){var n=this.i!=-1&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=i,n.className=o},c.prototype.update=function(o){if(o){this.config=o,this.i=0;var i;for(var n in this.markers){var t=this.markers[n];if(!t.range){t.update(i,this,this.session,o);continue}var e=t.range.clipRows(o.firstRow,o.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),t.renderer){var r=this.$getTop(e.start.row,o),s=this.$padding+e.start.column*o.characterWidth;t.renderer(i,e,s,r,o)}else t.type=="fullLine"?this.drawFullLineMarker(i,e,t.clazz,o):t.type=="screenLine"?this.drawScreenLineMarker(i,e,t.clazz,o):e.isMultiLine()?t.type=="text"?this.drawTextMarker(i,e,t.clazz,o):this.drawMultiLineMarker(i,e,t.clazz,o):this.drawSingleLineMarker(i,e,t.clazz+" ace_start ace_br15",o)}if(this.i!=-1)for(;this.ig,u==l),t,u==l?0:1,e)},c.prototype.drawMultiLineMarker=function(o,i,n,t,e){var r=this.$padding,s=t.lineHeight,l=this.$getTop(i.start.row,t),u=r+i.start.column*t.characterWidth;if(e=e||"",this.session.$bidiHandler.isBidiRow(i.start.row)){var b=i.clone();b.end.row=b.start.row,b.end.column=this.session.getLine(b.start.row).length,this.drawBidiSingleLineMarker(o,b,n+" ace_br1 ace_start",t,null,e)}else this.elt(n+" ace_br1 ace_start","height:"+s+"px;right:"+r+"px;top:"+l+"px;left:"+u+"px;"+(e||""));if(this.session.$bidiHandler.isBidiRow(i.end.row)){var b=i.clone();b.start.row=b.end.row,b.start.column=0,this.drawBidiSingleLineMarker(o,b,n+" ace_br12",t,null,e)}else{l=this.$getTop(i.end.row,t);var m=i.end.column*t.characterWidth;this.elt(n+" ace_br12","height:"+s+"px;width:"+m+"px;top:"+l+"px;left:"+r+"px;"+(e||""))}if(s=(i.end.row-i.start.row-1)*t.lineHeight,!(s<=0)){l=this.$getTop(i.start.row+1,t);var g=(i.start.column?1:0)|(i.end.column?0:8);this.elt(n+(g?" ace_br"+g:""),"height:"+s+"px;right:"+r+"px;top:"+l+"px;left:"+r+"px;"+(e||""))}},c.prototype.drawSingleLineMarker=function(o,i,n,t,e,r){if(this.session.$bidiHandler.isBidiRow(i.start.row))return this.drawBidiSingleLineMarker(o,i,n,t,e,r);var s=t.lineHeight,l=(i.end.column+(e||0)-i.start.column)*t.characterWidth,u=this.$getTop(i.start.row,t),b=this.$padding+i.start.column*t.characterWidth;this.elt(n,"height:"+s+"px;width:"+l+"px;top:"+u+"px;left:"+b+"px;"+(r||""))},c.prototype.drawBidiSingleLineMarker=function(o,i,n,t,e,r){var s=t.lineHeight,l=this.$getTop(i.start.row,t),u=this.$padding,b=this.session.$bidiHandler.getSelections(i.start.column,i.end.column);b.forEach(function(m){this.elt(n,"height:"+s+"px;width:"+(m.width+(e||0))+"px;top:"+l+"px;left:"+(u+m.left)+"px;"+(r||""))},this)},c.prototype.drawFullLineMarker=function(o,i,n,t,e){var r=this.$getTop(i.start.row,t),s=t.lineHeight;i.start.row!=i.end.row&&(s+=this.$getTop(i.end.row,t)-r),this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(e||""))},c.prototype.drawScreenLineMarker=function(o,i,n,t,e){var r=this.$getTop(i.start.row,t),s=t.lineHeight;this.elt(n,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(e||""))},c})();S.prototype.$padding=0;function a(c,o,i,n){return(c?1:0)|(o?2:0)|(i?4:0)|(n?8:0)}x.Marker=S}),ace.define("ace/layer/text_util",["require","exports","module"],function(E,x,z){var k=new Set(["text","rparen","lparen"]);x.isTextToken=function(M){return k.has(M)}}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],function(E,x,z){var k=E("../lib/oop"),M=E("../lib/dom"),S=E("../lib/lang"),a=E("./lines").Lines,c=E("../lib/event_emitter").EventEmitter,o=E("../config").nls,i=E("./text_util").isTextToken,n=(function(){function t(e){this.dom=M,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new a(this.element)}return t.prototype.$updateEolChar=function(){var e=this.session.doc,r=e.getNewLineCharacter()=="\n"&&e.getNewLineMode()!="windows",s=r?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=s)return this.EOL_CHAR=s,!0},t.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},t.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},t.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},t.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",(function(r){this._signal("changeCharacterSize",r)}).bind(this)),this.$pollSizeChanges()},t.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},t.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},t.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},t.prototype.setShowInvisibles=function(e){return this.showInvisibles==e?!1:(this.showInvisibles=e,typeof e=="string"?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},t.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},t.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},t.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var r=this.$tabStrings=[0],s=1;sT&&(d=$.end.row+1,$=this.session.getNextFoldLine(d,$),T=$?$.start.row:1/0),!(d>u);){var A=b[m++];if(A){this.dom.removeChildren(A),this.$renderLine(A,d,d==T?$:!1),g&&(A.style.top=this.$lines.computeLineTop(d,e,this.session)+"px");var C=e.lineHeight*this.session.getRowLength(d)+"px";A.style.height!=C&&(g=!0,A.style.height=C)}d++}if(g)for(;m0;u--)this.$lines.shift();if(r.lastRow>e.lastRow)for(var u=this.session.getFoldedRowCount(e.lastRow+1,r.lastRow);u>0;u--)this.$lines.pop();e.firstRowr.lastRow&&this.$lines.push(this.$renderLinesFragment(e,r.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},t.prototype.$renderLinesFragment=function(e,r,s){for(var l=[],u=r,b=this.session.getNextFoldLine(u),m=b?b.start.row:1/0;u>m&&(u=b.end.row+1,b=this.session.getNextFoldLine(u,b),m=b?b.start.row:1/0),!(u>s);){var g=this.$lines.createCell(u,e,this.session),d=g.element;this.dom.removeChildren(d),M.setStyle(d.style,"height",this.$lines.computeLineHeight(u,e,this.session)+"px"),M.setStyle(d.style,"top",this.$lines.computeLineTop(u,e,this.session)+"px"),this.$renderLine(d,u,u==m?b:!1),this.$useLineGroups()?d.className="ace_line_group":d.className="ace_line",l.push(g),u++}return l},t.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var r=e.firstRow,s=e.lastRow,l=this.$lines;l.getLength();)l.pop();l.push(this.$renderLinesFragment(e,r,s))},t.prototype.$renderToken=function(e,r,s,l){for(var u=this,b=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,m=this.dom.createFragment(this.element),g,d=0;g=b.exec(l);){var $=g[1],T=g[2],A=g[3],C=g[4],w=g[5];if(!(!u.showSpaces&&T)){var f=d!=g.index?l.slice(d,g.index):"";if(d=g.index+g[0].length,f&&m.appendChild(this.dom.createTextNode(f,this.element)),$){var p=u.session.getScreenTabSize(r+g.index);m.appendChild(u.$tabStrings[p].cloneNode(!0)),r+=p-1}else if(T)if(u.showSpaces){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_space",h.textContent=S.stringRepeat(u.SPACE_CHAR,T.length),m.appendChild(h)}else m.appendChild(this.dom.createTextNode(T,this.element));else if(A){var h=this.dom.createElement("span");h.className="ace_invisible ace_invisible_space ace_invalid",h.textContent=S.stringRepeat(u.SPACE_CHAR,A.length),m.appendChild(h)}else if(C){r+=1;var h=this.dom.createElement("span");h.style.width=u.config.characterWidth*2+"px",h.className=u.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",h.textContent=u.showSpaces?u.SPACE_CHAR:C,m.appendChild(h)}else if(w){r+=1;var h=this.dom.createElement("span");h.style.width=u.config.characterWidth*2+"px",h.className="ace_cjk",h.textContent=w,m.appendChild(h)}}}if(m.appendChild(this.dom.createTextNode(d?l.slice(d):l,this.element)),i(s.type))e.appendChild(m);else{var v="ace_"+s.type.replace(/\./g," ace_"),h=this.dom.createElement("span");s.type=="fold"&&(h.style.width=s.value.length*this.config.characterWidth+"px",h.setAttribute("title",o("inline-fold.closed.title","Unfold code"))),h.className=v,h.appendChild(m),e.appendChild(h)}return r+l.length},t.prototype.renderIndentGuide=function(e,r,s){var l=r.search(this.$indentGuideRe);if(l<=0||l>=s)return r;if(r[0]==" "){l-=l%this.tabSize;for(var u=l/this.tabSize,b=0;bb[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[r.row]!==""&&r.column===e[r.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=r.row+1;m0){for(var u=0;u=this.$highlightIndentGuideMarker.start+1){if(l.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(l,r)}}else for(var s=e.length-1;s>=0;s--){var l=e[s];if(this.$highlightIndentGuideMarker.end&&l.row=b;)m=this.$renderToken(g,m,$,T.substring(0,b-l)),T=T.substring(b-l),l=b,g=this.$createLineElement(),e.appendChild(g),g.appendChild(this.dom.createTextNode(S.stringRepeat(" ",s.indent),this.element)),u++,m=0,b=s[u]||Number.MAX_VALUE;T.length!=0&&(l+=T.length,m=this.$renderToken(g,m,$,T))}}s[s.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(g,m,null,"",!0)},t.prototype.$renderSimpleLine=function(e,r){for(var s=0,l=0;lthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,s,u,b);s=this.$renderToken(e,s,u,b)}}},t.prototype.$renderOverflowMessage=function(e,r,s,l,u){s&&this.$renderToken(e,r,s,l.slice(0,this.MAX_LINE_LENGTH-r));var b=this.dom.createElement("span");b.className="ace_inline_button ace_keyword ace_toggle_wrap",b.textContent=u?"":"",e.appendChild(b)},t.prototype.$renderLine=function(e,r,s){if(!s&&s!=!1&&(s=this.session.getFoldLine(r)),s)var l=this.$getFoldLineTokens(r,s);else var l=this.session.getTokens(r);var u=e;if(l.length){var b=this.session.getRowSplitData(r);if(b&&b.length){this.$renderWrappedLine(e,l,b);var u=e.lastChild}else{var u=e;this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u)),this.$renderSimpleLine(u,l)}}else this.$useLineGroups()&&(u=this.$createLineElement(),e.appendChild(u));if(this.showEOL&&u){s&&(r=s.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=r==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,u.appendChild(m)}},t.prototype.$getFoldLineTokens=function(e,r){var s=this.session,l=[];function u(m,g,d){for(var $=0,T=0;T+m[$].value.lengthd-g&&(A=A.substring(0,d-g)),l.push({type:m[$].type,value:A}),T=g+A.length,$+=1}for(;Td?l.push({type:m[$].type,value:A.substring(0,d-T)}):l.push(m[$]),T+=A.length,$+=1}}var b=s.getTokens(e);return r.walk(function(m,g,d,$,T){m!=null?l.push({type:"fold",value:m}):(T&&(b=s.getTokens(g)),b.length&&u(b,$,d))},r.end.row,this.session.getLine(r.end.row).length),l},t.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},t})();n.prototype.EOF_CHAR="¶",n.prototype.EOL_CHAR_LF="¬",n.prototype.EOL_CHAR_CRLF="¤",n.prototype.EOL_CHAR=n.prototype.EOL_CHAR_LF,n.prototype.TAB_CHAR="—",n.prototype.SPACE_CHAR="·",n.prototype.$padding=0,n.prototype.MAX_LINE_LENGTH=1e4,n.prototype.showInvisibles=!1,n.prototype.showSpaces=!1,n.prototype.showTabs=!1,n.prototype.showEOL=!1,n.prototype.displayIndentGuides=!0,n.prototype.$highlightIndentGuides=!0,n.prototype.$tabStrings=[],n.prototype.destroy={},n.prototype.onChangeTabSize=n.prototype.$computeTabString,k.implement(n.prototype,c),x.Text=n}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(E,x,z){var k=E("../lib/dom"),M=(function(){function S(a){this.element=k.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),k.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return S.prototype.$updateOpacity=function(a){for(var c=this.cursors,o=c.length;o--;)k.setStyle(c[o].style,"opacity",a?"":"0")},S.prototype.$startCssAnimation=function(){for(var a=this.cursors,c=a.length;c--;)a[c].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout((function(){this.$isAnimating&&k.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},S.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,k.removeCssClass(this.element,"ace_animate-blinking")},S.prototype.setPadding=function(a){this.$padding=a},S.prototype.setSession=function(a){this.session=a},S.prototype.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},S.prototype.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},S.prototype.setSmoothBlinking=function(a){a!=this.smoothBlinking&&(this.smoothBlinking=a,k.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.restartTimer())},S.prototype.addCursor=function(){var a=k.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},S.prototype.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},S.prototype.hideCursor=function(){this.isVisible=!1,k.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},S.prototype.showCursor=function(){this.isVisible=!0,k.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},S.prototype.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,k.removeCssClass(this.element,"ace_smooth-blinking")),a(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout((function(){this.$isSmoothBlinking&&k.addCssClass(this.element,"ace_smooth-blinking")}).bind(this))),k.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var c=(function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){a(!0),c()},this.blinkInterval),c()}},S.prototype.getPixelPosition=function(a,c){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var o=this.session.documentToScreenPosition(a),i=this.$padding+(this.session.$bidiHandler.isBidiRow(o.row,a.row)?this.session.$bidiHandler.getPosLeft(o.column):o.column*this.config.characterWidth),n=(o.row-(c?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:i,top:n}},S.prototype.isCursorInView=function(a,c){return a.top>=0&&a.topa.height+a.offset||t.top<0)&&o>1)){var e=this.cursors[i++]||this.addCursor(),r=e.style;this.drawCursor?this.drawCursor(e,t,a,c[o],this.session):this.isCursorInView(t,a)?(k.setStyle(r,"display","block"),k.translate(e,t.left,t.top),k.setStyle(r,"width",Math.round(a.characterWidth)+"px"),k.setStyle(r,"height",a.lineHeight+"px")):k.setStyle(r,"display","none")}}for(;this.cursors.length>i;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=t,this.restartTimer()},S.prototype.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?k.addCssClass(this.element,"ace_overwrite-cursors"):k.removeCssClass(this.element,"ace_overwrite-cursors"))},S.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},S})();M.prototype.$padding=0,M.prototype.drawCursor=null,x.Cursor=M}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,z){var k=this&&this.__extends||(function(){var e=function(r,s){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(l,u){l.__proto__=u}||function(l,u){for(var b in u)Object.prototype.hasOwnProperty.call(u,b)&&(l[b]=u[b])},e(r,s)};return function(r,s){if(typeof s!="function"&&s!==null)throw new TypeError("Class extends value "+String(s)+" is not a constructor or null");e(r,s);function l(){this.constructor=r}r.prototype=s===null?Object.create(s):(l.prototype=s.prototype,new l)}})(),M=E("./lib/oop"),S=E("./lib/dom"),a=E("./lib/event"),c=E("./lib/event_emitter").EventEmitter,o=32768,i=(function(){function e(r,s){this.element=S.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+s,this.inner=S.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),r.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}return e.prototype.setVisible=function(r){this.element.style.display=r?"":"none",this.isVisible=r,this.coeff=1},e})();M.implement(i.prototype,c);var n=(function(e){k(r,e);function r(s,l){var u=e.call(this,s,"-v")||this;return u.scrollTop=0,u.scrollHeight=0,l.$scrollbarWidth=u.width=S.scrollbarWidth(s.ownerDocument),u.inner.style.width=u.element.style.width=(u.width||15)+5+"px",u.$minWidth=0,u}return r.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var s=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-s)/(this.coeff-s)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},r.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},r.prototype.setHeight=function(s){this.element.style.height=s+"px"},r.prototype.setScrollHeight=function(s){this.scrollHeight=s,s>o?(this.coeff=o/s,s=o):this.coeff!=1&&(this.coeff=1),this.inner.style.height=s+"px"},r.prototype.setScrollTop=function(s){this.scrollTop!=s&&(this.skipEvent=!0,this.scrollTop=s,this.element.scrollTop=s*this.coeff)},r})(i);n.prototype.setInnerHeight=n.prototype.setScrollHeight;var t=(function(e){k(r,e);function r(s,l){var u=e.call(this,s,"-h")||this;return u.scrollLeft=0,u.height=l.$scrollbarWidth,u.inner.style.height=u.element.style.height=(u.height||15)+5+"px",u}return r.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},r.prototype.getHeight=function(){return this.isVisible?this.height:0},r.prototype.setWidth=function(s){this.element.style.width=s+"px"},r.prototype.setInnerWidth=function(s){this.inner.style.width=s+"px"},r.prototype.setScrollWidth=function(s){this.inner.style.width=s+"px"},r.prototype.setScrollLeft=function(s){this.scrollLeft!=s&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=s)},r})(i);x.ScrollBar=n,x.ScrollBarV=n,x.ScrollBarH=t,x.VScrollBar=n,x.HScrollBar=t}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(E,x,z){var k=this&&this.__extends||(function(){var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(s,l){s.__proto__=l}||function(s,l){for(var u in l)Object.prototype.hasOwnProperty.call(l,u)&&(s[u]=l[u])},t(e,r)};return function(e,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(e,r);function s(){this.constructor=e}e.prototype=r===null?Object.create(r):(s.prototype=r.prototype,new s)}})(),M=E("./lib/oop"),S=E("./lib/dom"),a=E("./lib/event"),c=E("./lib/event_emitter").EventEmitter;S.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css?v=1773287522785",!1);var o=(function(){function t(e,r){this.element=S.createElement("div"),this.element.className="ace_sb"+r,this.inner=S.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return t.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},t})();M.implement(o.prototype,c);var i=(function(t){k(e,t);function e(r,s){var l=t.call(this,r,"-v")||this;return l.scrollTop=0,l.scrollHeight=0,l.parent=r,l.width=l.VScrollWidth,l.renderer=s,l.inner.style.width=l.element.style.width=(l.width||15)+"px",l.$minWidth=0,l}return e.prototype.onMouseDown=function(r,s){if(r==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,u=s.clientY,b=function(C){u=C.clientY},m=function(){clearInterval(T)},g=s.clientY,d=this.thumbTop,$=function(){if(u!==void 0){var C=l.scrollTopFromThumbTop(d+u-g);C!==l.scrollTop&&l._emit("scroll",{data:C})}};a.capture(this.inner,b,m);var T=setInterval($,20);return a.preventDefault(s)}var A=s.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(A)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.height},e.prototype.scrollTopFromThumbTop=function(r){var s=r*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return s=s>>0,s<0?s=0:s>this.pageHeight-this.viewHeight&&(s=this.pageHeight-this.viewHeight),s},e.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},e.prototype.setHeight=function(r){this.height=Math.max(0,r),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},e.prototype.setScrollHeight=function(r,s){this.pageHeight===r&&!s||(this.pageHeight=r,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},e.prototype.setScrollTop=function(r){this.scrollTop=r,r<0&&(r=0),this.thumbTop=r*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},e})(o);i.prototype.setInnerHeight=i.prototype.setScrollHeight;var n=(function(t){k(e,t);function e(r,s){var l=t.call(this,r,"-h")||this;return l.scrollLeft=0,l.scrollWidth=0,l.height=l.HScrollHeight,l.inner.style.height=l.element.style.height=(l.height||12)+"px",l.renderer=s,l}return e.prototype.onMouseDown=function(r,s){if(r==="mousedown"&&!(a.getButton(s)!==0||s.detail===2)){if(s.target===this.inner){var l=this,u=s.clientX,b=function(C){u=C.clientX},m=function(){clearInterval(T)},g=s.clientX,d=this.thumbLeft,$=function(){if(u!==void 0){var C=l.scrollLeftFromThumbLeft(d+u-g);C!==l.scrollLeft&&l._emit("scroll",{data:C})}};a.capture(this.inner,b,m);var T=setInterval($,20);return a.preventDefault(s)}var A=s.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(A)}),a.preventDefault(s)}},e.prototype.getHeight=function(){return this.isVisible?this.height:0},e.prototype.scrollLeftFromThumbLeft=function(r){var s=r*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return s=s>>0,s<0?s=0:s>this.pageWidth-this.viewWidth&&(s=this.pageWidth-this.viewWidth),s},e.prototype.setWidth=function(r){this.width=Math.max(0,r),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},e.prototype.setScrollWidth=function(r,s){this.pageWidth===r&&!s||(this.pageWidth=r,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},e.prototype.setScrollLeft=function(r){this.scrollLeft=r,r<0&&(r=0),this.thumbLeft=r*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},e})(o);n.prototype.setInnerWidth=n.prototype.setScrollWidth,x.ScrollBar=i,x.ScrollBarV=i,x.ScrollBarH=n,x.VScrollBar=i,x.HScrollBar=n}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(E,x,z){var k=E("./lib/event"),M=(function(){function S(a,c){this.onRender=a,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=c||window;var o=this;this._flush=function(i){o.pending=!1;var n=o.changes;if(n&&(k.blockIdle(100),o.changes=0,o.onRender(n)),o.changes){if(o.$recursionLimit--<0)return;o.schedule()}else o.$recursionLimit=2}}return S.prototype.schedule=function(a){this.changes=this.changes|a,this.changes&&!this.pending&&(k.nextFrame(this._flush),this.pending=!0)},S.prototype.clear=function(a){var c=this.changes;return this.changes=0,c},S})();x.RenderLoop=M}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(E,x,z){var k=E("../lib/oop"),M=E("../lib/dom"),S=E("../lib/lang"),a=E("../lib/event"),c=E("../lib/useragent"),o=E("../lib/event_emitter").EventEmitter,i=512,n=typeof ResizeObserver=="function",t=200,e=(function(){function r(s){this.el=M.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=M.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=M.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=S.stringRepeat("X",i),this.$characterSize={width:0,height:0},n?this.$addObserver():this.checkForSizeChanges()}return r.prototype.$setMeasureNodeStyles=function(s,l){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",c.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=l?"hidden":"visible"},r.prototype.checkForSizeChanges=function(s){if(s===void 0&&(s=this.$measureSizes()),s&&(this.$characterSize.width!==s.width||this.$characterSize.height!==s.height)){this.$measureNode.style.fontWeight="bold";var l=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=l&&l.width===s.width&&l.height===s.height,this._emit("changeCharacterSize",{data:s})}},r.prototype.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(l){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},r.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=a.onIdle(function l(){s.checkForSizeChanges(),a.onIdle(l,500)},500)},r.prototype.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},r.prototype.$measureSizes=function(s){var l={height:(s||this.$measureNode).clientHeight,width:(s||this.$measureNode).clientWidth/i};return l.width===0||l.height===0?null:l},r.prototype.$measureCharWidth=function(s){this.$main.textContent=S.stringRepeat(s,i);var l=this.$main.getBoundingClientRect();return l.width/i},r.prototype.getCharacterWidth=function(s){var l=this.charSizes[s];return l===void 0&&(l=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),l},r.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},r.prototype.$getZoom=function(s){return!s||!s.parentElement?1:(Number(window.getComputedStyle(s).zoom)||1)*this.$getZoom(s.parentElement)},r.prototype.$initTransformMeasureNodes=function(){var s=function(l,u){return["div",{style:"position: absolute;top:"+l+"px;left:"+u+"px;"}]};this.els=M.buildDom([s(0,0),s(t,0),s(0,t),s(t,t)],this.el)},r.prototype.transformCoordinates=function(s,l){if(s){var u=this.$getZoom(this.el);s=d(1/u,s)}function b(I,N,W){var O=I[1]*N[0]-I[0]*N[1];return[(-N[1]*W[0]+N[0]*W[1])/O,(+I[1]*W[0]-I[0]*W[1])/O]}function m(I,N){return[I[0]-N[0],I[1]-N[1]]}function g(I,N){return[I[0]+N[0],I[1]+N[1]]}function d(I,N){return[I*N[0],I*N[1]]}this.els||this.$initTransformMeasureNodes();function $(I){var N=I.getBoundingClientRect();return[N.left,N.top]}var T=$(this.els[0]),A=$(this.els[1]),C=$(this.els[2]),w=$(this.els[3]),f=b(m(w,A),m(w,C),m(g(A,C),g(w,T))),p=d(1+f[0],m(A,T)),h=d(1+f[1],m(C,T));if(l){var v=l,y=f[0]*v[0]/t+f[1]*v[1]/t+1,L=g(d(v[0],p),d(v[1],h));return g(d(1/y/t,L),T)}var R=m(s,T),_=b(m(p,d(f[0],R)),m(h,d(f[1],R)),R);return d(t,_)},r})();e.prototype.$characterSize={width:0,height:0},k.implement(e.prototype,o),x.FontMetrics=e}),ace.define("ace/css/editor-css",["require","exports","module"],function(E,x,z){z.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(E,x,z){var k=E("../lib/dom"),M=E("../lib/oop"),S=E("../lib/event_emitter").EventEmitter,a=(function(){function c(o,i){this.canvas=k.createElement("canvas"),this.renderer=i,this.pixelRatio=1,this.maxHeight=i.layerConfig.maxHeight,this.lineHeight=i.layerConfig.lineHeight,this.canvasHeight=o.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=o.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},o.element.appendChild(this.canvas)}return c.prototype.$updateDecorators=function(o){var i=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(o){this.maxHeight=o.maxHeight,this.lineHeight=o.lineHeight,this.canvasHeight=o.height;var n=(o.lastRow+1)*this.lineHeight;nf.priority?1:0}var r=this.renderer.session.$annotations;if(t.clearRect(0,0,this.canvas.width,this.canvas.height),r){var s={info:1,warning:2,error:3};r.forEach(function(w){w.priority=s[w.type]||null}),r=r.sort(e);for(var l=this.renderer.session.$foldData,u=0;uthis.canvasHeight&&(A=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(A-this.halfMinDecorationHeight),$=Math.round(A+this.halfMinDecorationHeight)}t.fillStyle=i[r[u].type]||null,t.fillRect(0,g,this.canvasWidth,$-d)}}var C=this.renderer.session.selection.getCursor();if(C){var m=this.compensateFoldRows(C.row,l),g=Math.round((C.row-m)*this.lineHeight*this.heightRatio);t.fillStyle="rgba(0, 0, 0, 0.5)",t.fillRect(0,g,this.canvasWidth,2)}},c.prototype.compensateFoldRows=function(o,i){var n=0;if(i&&i.length>0)for(var t=0;ti[t].start.row&&o=i[t].end.row&&(n+=i[t].end.row-i[t].start.row);return n},c})();M.implement(a.prototype,S),x.Decorator=a}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],function(E,x,z){var k=E("./lib/oop"),M=E("./lib/dom"),S=E("./lib/lang"),a=E("./config"),c=E("./layer/gutter").Gutter,o=E("./layer/marker").Marker,i=E("./layer/text").Text,n=E("./layer/cursor").Cursor,t=E("./scrollbar").HScrollBar,e=E("./scrollbar").VScrollBar,r=E("./scrollbar_custom").HScrollBar,s=E("./scrollbar_custom").VScrollBar,l=E("./renderloop").RenderLoop,u=E("./layer/font_metrics").FontMetrics,b=E("./lib/event_emitter").EventEmitter,m=E("./css/editor-css"),g=E("./layer/decorators").Decorator,d=E("./lib/useragent"),$=E("./layer/text_util").isTextToken;M.importCssString(m,"ace_editor.css?v=1773287522785",!1);var T=(function(){function A(C,w){var f=this;this.container=C||M.createElement("div"),M.addCssClass(this.container,"ace_editor"),M.HI_DPI&&M.addCssClass(this.container,"ace_hidpi"),this.setTheme(w),a.get("useStrictCSP")==null&&a.set("useStrictCSP",!1),this.$gutter=M.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=M.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=M.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new c(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new o(this.content);var p=this.$textLayer=new i(this.content);this.canvas=p.element,this.$markerFront=new o(this.content),this.$cursorLayer=new n(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new e(this.container,this),this.scrollBarH=new t(this.container,this),this.scrollBarV.on("scroll",function(h){f.$scrollAnimation||f.session.setScrollTop(h.data-f.scrollMargin.top)}),this.scrollBarH.on("scroll",function(h){f.$scrollAnimation||f.session.setScrollLeft(h.data-f.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new u(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(h){f.updateCharacterSize(),f.onResize(!0,f.gutterWidth,f.$size.width,f.$size.height),f._signal("changeCharacterSize",h)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!d.isIOS,this.$loop=new l(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),a.resetOptions(this),a._signal("renderer",this)}return A.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),M.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},A.prototype.setSession=function(C){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=C,C&&this.scrollMargin.top&&C.getScrollTop()<=0&&C.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(C),this.$markerBack.setSession(C),this.$markerFront.setSession(C),this.$gutterLayer.setSession(C),this.$textLayer.setSession(C),C&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},A.prototype.updateLines=function(C,w,f){if(w===void 0&&(w=1/0),this.$changedLines?(this.$changedLines.firstRow>C&&(this.$changedLines.firstRow=C),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},A.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},A.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},A.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},A.prototype.updateFull=function(C){C?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},A.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},A.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},A.prototype.onResize=function(C,w,f,p){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=C?1:0;var h=this.container;p||(p=h.clientHeight||h.scrollHeight),!p&&this.$maxLines&&this.lineHeight>1&&(!h.style.height||h.style.height=="0px")&&(h.style.height="1px",p=h.clientHeight||h.scrollHeight),f||(f=h.clientWidth||h.scrollWidth);var v=this.$updateCachedSize(C,w,f,p);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!f&&!p)return this.resizing=0;C&&(this.$gutterLayer.$padding=null),C?this.$renderChanges(v|this.$changes,!0):this.$loop.schedule(v|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},A.prototype.$updateCachedSize=function(C,w,f,p){p-=this.$extraHeight||0;var h=0,v=this.$size,y={width:v.width,height:v.height,scrollerHeight:v.scrollerHeight,scrollerWidth:v.scrollerWidth};if(p&&(C||v.height!=p)&&(v.height=p,h|=this.CHANGE_SIZE,v.scrollerHeight=v.height,this.$horizScroll&&(v.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(v.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",h=h|this.CHANGE_SCROLL),f&&(C||v.width!=f)){h|=this.CHANGE_SIZE,v.width=f,w==null&&(w=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=w,M.setStyle(this.scrollBarH.element.style,"left",w+"px"),M.setStyle(this.scroller.style,"left",w+this.margin.left+"px"),v.scrollerWidth=Math.max(0,f-w-this.scrollBarV.getWidth()-this.margin.h),M.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";M.setStyle(this.scrollBarH.element.style,"right",L),M.setStyle(this.scroller.style,"right",L),M.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(v.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||C)&&(h|=this.CHANGE_FULL)}return v.$dirty=!f||!p,h&&this._signal("resize",y),h},A.prototype.onGutterResize=function(C){var w=this.$showGutter?C:0;w!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,w,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},A.prototype.adjustWrapLimit=function(){var C=this.$size.scrollerWidth-this.$padding*2,w=Math.floor(C/this.characterWidth);return this.session.adjustWrapLimit(w,this.$showPrintMargin&&this.$printMarginColumn)},A.prototype.setAnimatedScroll=function(C){this.setOption("animatedScroll",C)},A.prototype.getAnimatedScroll=function(){return this.$animatedScroll},A.prototype.setShowInvisibles=function(C){this.setOption("showInvisibles",C),this.session.$bidiHandler.setShowInvisibles(C)},A.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},A.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},A.prototype.setDisplayIndentGuides=function(C){this.setOption("displayIndentGuides",C)},A.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},A.prototype.setHighlightIndentGuides=function(C){this.setOption("highlightIndentGuides",C)},A.prototype.setShowPrintMargin=function(C){this.setOption("showPrintMargin",C)},A.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},A.prototype.setPrintMarginColumn=function(C){this.setOption("printMarginColumn",C)},A.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},A.prototype.getShowGutter=function(){return this.getOption("showGutter")},A.prototype.setShowGutter=function(C){return this.setOption("showGutter",C)},A.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},A.prototype.setFadeFoldWidgets=function(C){this.setOption("fadeFoldWidgets",C)},A.prototype.setHighlightGutterLine=function(C){this.setOption("highlightGutterLine",C)},A.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},A.prototype.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var C=M.createElement("div");C.className="ace_layer ace_print-margin-layer",this.$printMarginEl=M.createElement("div"),this.$printMarginEl.className="ace_print-margin",C.appendChild(this.$printMarginEl),this.content.insertBefore(C,this.content.firstChild)}var w=this.$printMarginEl.style;w.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",w.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},A.prototype.getContainerElement=function(){return this.container},A.prototype.getMouseEventTarget=function(){return this.scroller},A.prototype.getTextAreaContainer=function(){return this.container},A.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var C=this.textarea.style,w=this.$composition;if(!this.$keepTextAreaAtCursor&&!w){M.translate(this.textarea,-100,0);return}var f=this.$cursorLayer.$pixelPos;if(f){w&&w.markerRange&&(f=this.$cursorLayer.getPixelPosition(w.markerRange.start,!0));var p=this.layerConfig,h=f.top,v=f.left;h-=p.offset;var y=w&&w.useTextareaForIME||d.isMobile?this.lineHeight:1;if(h<0||h>p.height-y){M.translate(this.textarea,0,0);return}var L=1,R=this.$size.height-y;if(!w)h+=this.lineHeight;else if(w.useTextareaForIME){var _=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(_)[0]}else h+=this.lineHeight+2;v-=this.scrollLeft,v>this.$size.scrollerWidth-L&&(v=this.$size.scrollerWidth-L),v+=this.gutterWidth+this.margin.left,M.setStyle(C,"height",y+"px"),M.setStyle(C,"width",L+"px"),M.translate(this.textarea,Math.min(v,this.$size.scrollerWidth-L),Math.min(h,R))}}},A.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},A.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},A.prototype.getLastFullyVisibleRow=function(){var C=this.layerConfig,w=C.lastRow,f=this.session.documentToScreenRow(w,0)*C.lineHeight;return f-this.session.getScrollTop()>C.height-C.lineHeight?w-1:w},A.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},A.prototype.setPadding=function(C){this.$padding=C,this.$textLayer.setPadding(C),this.$cursorLayer.setPadding(C),this.$markerFront.setPadding(C),this.$markerBack.setPadding(C),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},A.prototype.setScrollMargin=function(C,w,f,p){var h=this.scrollMargin;h.top=C|0,h.bottom=w|0,h.right=p|0,h.left=f|0,h.v=h.top+h.bottom,h.h=h.left+h.right,h.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-h.top),this.updateFull()},A.prototype.setMargin=function(C,w,f,p){var h=this.margin;h.top=C|0,h.bottom=w|0,h.right=p|0,h.left=f|0,h.v=h.top+h.bottom,h.h=h.left+h.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},A.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},A.prototype.setHScrollBarAlwaysVisible=function(C){this.setOption("hScrollBarAlwaysVisible",C)},A.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},A.prototype.setVScrollBarAlwaysVisible=function(C){this.setOption("vScrollBarAlwaysVisible",C)},A.prototype.$updateScrollBarV=function(){var C=this.layerConfig.maxHeight,w=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(C-=(w-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>C-w&&(C=this.scrollTop+w,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(C+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},A.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},A.prototype.freeze=function(){this.$frozen=!0},A.prototype.unfreeze=function(){this.$frozen=!1},A.prototype.$renderChanges=function(C,w){if(this.$changes&&(C|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!C&&!w){this.$changes|=C;return}if(this.$size.$dirty)return this.$changes|=C,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",C),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var f=this.layerConfig;if(C&this.CHANGE_FULL||C&this.CHANGE_SIZE||C&this.CHANGE_TEXT||C&this.CHANGE_LINES||C&this.CHANGE_SCROLL||C&this.CHANGE_H_SCROLL){if(C|=this.$computeLayerConfig()|this.$loop.clear(),f.firstRow!=this.layerConfig.firstRow&&f.firstRowScreen==this.layerConfig.firstRowScreen){var p=this.scrollTop+(f.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;p>0&&(this.scrollTop=p,C=C|this.CHANGE_SCROLL,C|=this.$computeLayerConfig()|this.$loop.clear())}f=this.layerConfig,this.$updateScrollBarV(),C&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),M.translate(this.content,-this.scrollLeft,-f.offset);var h=f.width+2*this.$padding+"px",v=f.minHeight+"px";M.setStyle(this.content.style,"width",h),M.setStyle(this.content.style,"height",v)}if(C&this.CHANGE_H_SCROLL&&(M.translate(this.content,-this.scrollLeft,-f.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),C&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(f),this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f),this.$markerBack.update(f),this.$markerFront.update(f),this.$cursorLayer.update(f),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}if(C&this.CHANGE_SCROLL){this.$changedLines=null,C&this.CHANGE_TEXT||C&this.CHANGE_LINES?this.$textLayer.update(f):this.$textLayer.scrollLines(f),this.$showGutter&&(C&this.CHANGE_GUTTER||C&this.CHANGE_LINES?this.$gutterLayer.update(f):this.$gutterLayer.scrollLines(f)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f),this.$markerBack.update(f),this.$markerFront.update(f),this.$cursorLayer.update(f),this.$moveTextAreaToCursor(),this._signal("afterRender",C);return}C&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(f),this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):C&this.CHANGE_LINES?((this.$updateLines()||C&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):C&this.CHANGE_TEXT||C&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)):C&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(f),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(f)),C&this.CHANGE_CURSOR&&(this.$cursorLayer.update(f),this.$moveTextAreaToCursor()),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(f),C&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(f),this._signal("afterRender",C)},A.prototype.$autosize=function(){var C=this.session.getScreenLength()*this.lineHeight,w=this.$maxLines*this.lineHeight,f=Math.min(w,Math.max((this.$minLines||1)*this.lineHeight,C))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(f+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&f>this.$maxPixelHeight&&(f=this.$maxPixelHeight);var p=f<=2*this.lineHeight,h=!p&&C>w;if(f!=this.desiredHeight||this.$size.height!=this.desiredHeight||h!=this.$vScroll){h!=this.$vScroll&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var v=this.container.clientWidth;this.container.style.height=f+"px",this.$updateCachedSize(!0,this.$gutterWidth,v,f),this.desiredHeight=f,this._signal("autosize")}},A.prototype.$computeLayerConfig=function(){var C=this.session,w=this.$size,f=w.height<=2*this.lineHeight,p=this.session.getScreenLength(),h=p*this.lineHeight,v=this.$getLongestLine(),y=!f&&(this.$hScrollBarAlwaysVisible||w.scrollerWidth-v-2*this.$padding<0),L=this.$horizScroll!==y;L&&(this.$horizScroll=y,this.scrollBarH.setVisible(y));var R=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var _=w.scrollerHeight+this.lineHeight,I=!this.$maxLines&&this.$scrollPastEnd?(w.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;h+=I;var N=this.scrollMargin;this.session.setScrollTop(Math.max(-N.top,Math.min(this.scrollTop,h-w.scrollerHeight+N.bottom))),this.session.setScrollLeft(Math.max(-N.left,Math.min(this.scrollLeft,v+2*this.$padding-w.scrollerWidth+N.right)));var W=!f&&(this.$vScrollBarAlwaysVisible||w.scrollerHeight-h+I<0||this.scrollTop>N.top),O=R!==W;O&&(this.$vScroll=W,this.scrollBarV.setVisible(W));var D=this.scrollTop%this.lineHeight,F=Math.ceil(_/this.lineHeight)-1,H=Math.max(0,Math.round((this.scrollTop-D)/this.lineHeight)),P=H+F,U,j,V=this.lineHeight;H=C.screenToDocumentRow(H,0);var Y=C.getFoldLine(H);Y&&(H=Y.start.row),U=C.documentToScreenRow(H,0),j=C.getRowLength(H)*V,P=Math.min(C.screenToDocumentRow(P,0),C.getLength()-1),_=w.scrollerHeight+C.getRowLength(P)*V+j,D=this.scrollTop-U*V;var Z=0;return(this.layerConfig.width!=v||L)&&(Z=this.CHANGE_H_SCROLL),(L||O)&&(Z|=this.$updateCachedSize(!0,this.gutterWidth,w.width,w.height),this._signal("scrollbarVisibilityChanged"),O&&(v=this.$getLongestLine())),this.layerConfig={width:v,padding:this.$padding,firstRow:H,firstRowScreen:U,lastRow:P,lineHeight:V,characterWidth:this.characterWidth,minHeight:_,maxHeight:h,offset:D,gutterOffset:V?Math.max(0,Math.ceil((D+w.height-w.scrollerHeight)/V)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(v-this.$padding),Z},A.prototype.$updateLines=function(){if(this.$changedLines){var C=this.$changedLines.firstRow,w=this.$changedLines.lastRow;this.$changedLines=null;var f=this.layerConfig;if(!(C>f.lastRow+1)&&!(wthis.$textLayer.MAX_LINE_LENGTH&&(C=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(C*this.characterWidth))},A.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},A.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},A.prototype.addGutterDecoration=function(C,w){this.$gutterLayer.addGutterDecoration(C,w)},A.prototype.removeGutterDecoration=function(C,w){this.$gutterLayer.removeGutterDecoration(C,w)},A.prototype.updateBreakpoints=function(C){this._rows=C,this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.setAnnotations=function(C){this.$gutterLayer.setAnnotations(C),this.$loop.schedule(this.CHANGE_GUTTER)},A.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},A.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},A.prototype.showCursor=function(){this.$cursorLayer.showCursor()},A.prototype.scrollSelectionIntoView=function(C,w,f){this.scrollCursorIntoView(C,f),this.scrollCursorIntoView(w,f)},A.prototype.scrollCursorIntoView=function(C,w,f){if(this.$size.scrollerHeight!==0){var p=this.$cursorLayer.getPixelPosition(C),h=p.left,v=p.top,y=f&&f.top||0,L=f&&f.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var R=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;R+y>v?(w&&R+y>v+this.lineHeight&&(v-=w*this.$size.scrollerHeight),v===0&&(v=-this.scrollMargin.top),this.session.setScrollTop(v)):R+this.$size.scrollerHeight-L=1-this.scrollMargin.top||w>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||C<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||C>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},A.prototype.pixelToScreenCoordinates=function(C,w){var f;if(this.$hasCssTransforms){f={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([C,w]);C=p[1]-this.gutterWidth-this.margin.left,w=p[0]}else f=this.scroller.getBoundingClientRect();var h=C+this.scrollLeft-f.left-this.$padding,v=h/this.characterWidth,y=Math.floor((w+this.scrollTop-f.top)/this.lineHeight),L=this.$blockCursor?Math.floor(v):Math.round(v);return{row:y,column:L,side:v-L>0?1:-1,offsetX:h}},A.prototype.screenToTextCoordinates=function(C,w){var f;if(this.$hasCssTransforms){f={top:0,left:0};var p=this.$fontMetrics.transformCoordinates([C,w]);C=p[1]-this.gutterWidth-this.margin.left,w=p[0]}else f=this.scroller.getBoundingClientRect();var h=C+this.scrollLeft-f.left-this.$padding,v=h/this.characterWidth,y=this.$blockCursor?Math.floor(v):Math.round(v),L=Math.floor((w+this.scrollTop-f.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(y,0),h)},A.prototype.textToScreenCoordinates=function(C,w){var f=this.scroller.getBoundingClientRect(),p=this.session.documentToScreenPosition(C,w),h=this.$padding+(this.session.$bidiHandler.isBidiRow(p.row,C)?this.session.$bidiHandler.getPosLeft(p.column):Math.round(p.column*this.characterWidth)),v=p.row*this.lineHeight;return{pageX:f.left+h-this.scrollLeft,pageY:f.top+v-this.scrollTop}},A.prototype.visualizeFocus=function(){M.addCssClass(this.container,"ace_focus")},A.prototype.visualizeBlur=function(){M.removeCssClass(this.container,"ace_focus")},A.prototype.showComposition=function(C){this.$composition=C,C.cssText||(C.cssText=this.textarea.style.cssText),C.useTextareaForIME==null&&(C.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(M.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):C.markerId=this.session.addMarker(C.markerRange,"ace_composition_marker","text")},A.prototype.setCompositionText=function(C){var w=this.session.selection.cursor;this.addToken(C,"composition_placeholder",w.row,w.column),this.$moveTextAreaToCursor()},A.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),M.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var C=this.session.selection.cursor;this.removeExtraToken(C.row,C.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},A.prototype.setGhostText=function(C,w){var f=this.session.selection.cursor,p=w||{row:f.row,column:f.column};this.removeGhostText();var h=this.$calculateWrappedTextChunks(C,p);this.addToken(h[0].text,"ghost_text",p.row,p.column),this.$ghostText={text:C,position:{row:p.row,column:p.column}};var v=M.createElement("div");if(h.length>1){var y=this.hideTokensAfterPosition(p.row,p.column),L;h.slice(1).forEach(function(O){var D=M.createElement("div"),F=M.createElement("span");F.className="ace_ghost_text",O.wrapped&&(D.className="ghost_text_line_wrapped"),O.text.length===0&&(O.text=" "),F.appendChild(M.createTextNode(O.text)),D.appendChild(F),v.appendChild(D),L=D}),y.forEach(function(O){var D=M.createElement("span");$(O.type)||(D.className="ace_"+O.type.replace(/\./g," ace_")),D.appendChild(M.createTextNode(O.value)),L.appendChild(D)}),this.$ghostTextWidget={el:v,row:p.row,column:p.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var R=this.$cursorLayer.getPixelPosition(p,!0),_=this.container,I=_.getBoundingClientRect().height,N=h.length*this.lineHeight,W=N0){var _=0;R.push(h[y].length);for(var I=0;I1||Math.abs(C.$size.height-p)>1?C.$resizeTimer.delay():C.$resizeTimer.cancel()}),this.$resizeObserver.observe(this.container)}},A})();T.prototype.CHANGE_CURSOR=1,T.prototype.CHANGE_MARKER=2,T.prototype.CHANGE_GUTTER=4,T.prototype.CHANGE_SCROLL=8,T.prototype.CHANGE_LINES=16,T.prototype.CHANGE_TEXT=32,T.prototype.CHANGE_SIZE=64,T.prototype.CHANGE_MARKER_BACK=128,T.prototype.CHANGE_MARKER_FRONT=256,T.prototype.CHANGE_FULL=512,T.prototype.CHANGE_H_SCROLL=1024,T.prototype.$changes=0,T.prototype.$padding=null,T.prototype.$frozen=!1,T.prototype.STEPS=8,k.implement(T.prototype,b),a.defineOptions(T.prototype,"renderer",{useResizeObserver:{set:function(A){!A&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):A&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(A){this.$textLayer.setShowInvisibles(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(A){typeof A=="number"&&(this.$printMarginColumn=A),this.$showPrintMargin=!!A,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(A){this.$gutter.style.display=A?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(A){this.$gutterLayer.$useSvgGutterIcons=A},initialValue:!1},showFoldedAnnotations:{set:function(A){this.$gutterLayer.$showFoldedAnnotations=A},initialValue:!1},fadeFoldWidgets:{set:function(A){M.setCssClass(this.$gutter,"ace_fade-fold-widgets",A)},initialValue:!1},showFoldWidgets:{set:function(A){this.$gutterLayer.setShowFoldWidgets(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(A){this.$textLayer.setDisplayIndentGuides(A)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(A){this.$textLayer.setHighlightIndentGuides(A)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(A){this.$gutterLayer.setHighlightGutterLine(A),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(A){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(A){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(A){typeof A=="number"&&(A=A+"px"),this.container.style.fontSize=A,this.updateFontSize()},initialValue:12},fontFamily:{set:function(A){this.container.style.fontFamily=A,this.updateFontSize()}},maxLines:{set:function(A){this.updateFull()}},minLines:{set:function(A){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(A){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(A){A=+A||0,this.$scrollPastEnd!=A&&(this.$scrollPastEnd=A,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(A){this.$gutterLayer.$fixedWidth=!!A,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(A){this.$updateCustomScrollbar(A)},initialValue:!1},theme:{set:function(A){this.setTheme(A)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!d.isMobile&&!d.isIE}}),x.VirtualRenderer=T}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(E,x,z){var k=E("../lib/oop"),M=E("../lib/net"),S=E("../lib/event_emitter").EventEmitter,a=E("../config");function c(t){var e="importScripts('"+M.qualifyURL(t)+"');";try{return new Blob([e],{type:"application/javascript"})}catch(l){var r=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,s=new r;return s.append(e),s.getBlob("application/javascript")}}function o(t){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(a.get("loadWorkerFromBlob")){var e=c(t),r=window.URL||window.webkitURL,s=r.createObjectURL(e);return new Worker(s)}return new Worker(t)}var i=function(t){t.postMessage||(t=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=t,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){k.implement(this,S),this.$createWorkerFromOldConfig=function(t,e,r,s,l){if(E.nameToUrl&&!E.toUrl&&(E.toUrl=E.nameToUrl),a.get("packaged")||!E.toUrl)s=s||a.moduleUrl(e,"worker");else{var u=this.$normalizePath;s=s||u(E.toUrl("ace/worker/worker.js?v=1773287522785",null,"_"));var b={};t.forEach(function(m){b[m]=u(E.toUrl(m,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=o(s),l&&this.send("importScripts",l),this.$worker.postMessage({init:!0,tlns:b,module:e,classname:r}),this.$worker},this.onMessage=function(t){var e=t.data;switch(e.type){case"event":this._signal(e.name,{data:e.data});break;case"call":var r=this.callbacks[e.id];r&&(r(e.data),delete this.callbacks[e.id]);break;case"error":this.reportError(e.data);break;case"log":window.console&&console.log&&console.log.apply(console,e.data);break}},this.reportError=function(t){window.console&&console.error&&console.error(t)},this.$normalizePath=function(t){return M.qualifyURL(t)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(t){t.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(t,e){this.$worker.postMessage({command:t,args:e})},this.call=function(t,e,r){if(r){var s=this.callbackId++;this.callbacks[s]=r,e.push(s)}this.send(t,e)},this.emit=function(t,e){try{e.data&&e.data.err&&(e.data.err={message:e.data.err.message,stack:e.data.err.stack,code:e.data.err.code}),this.$worker&&this.$worker.postMessage({event:t,data:{data:e.data}})}catch(r){console.error(r.stack)}},this.attachToDocument=function(t){this.$doc&&this.terminate(),this.$doc=t,this.call("setValue",[t.getValue()]),t.on("change",this.changeListener,!0)},this.changeListener=function(t){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),t.action=="insert"?this.deltaQueue.push(t.start,t.lines):this.deltaQueue.push(t.start,t.end)},this.$sendDeltaQueue=function(){var t=this.deltaQueue;t&&(this.deltaQueue=null,t.length>50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(i.prototype);var n=function(t,e,r){var s=null,l=!1,u=Object.create(S),b=[],m=new i({messageBuffer:b,terminate:function(){},postMessage:function(d){b.push(d),s&&(l?setTimeout(g):g())}});m.setEmitSync=function(d){l=d};var g=function(){var d=b.shift();d.command?s[d.command].apply(s,d.args):d.event&&u._signal(d.event,d.data)};return u.postMessage=function(d){m.onMessage({data:d})},u.callback=function(d,$){this.postMessage({type:"call",id:$,data:d})},u.emit=function(d,$){this.postMessage({type:"event",name:d,data:$})},a.loadModule(["worker",e],function(d){for(s=new d[r](u);b.length;)g()}),m};x.UIWorkerClient=n,x.WorkerClient=i,x.createWorker=o}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(E,x,z){var k=E("./range").Range,M=E("./lib/event_emitter").EventEmitter,S=E("./lib/oop"),a=(function(){function c(o,i,n,t,e,r){var s=this;this.length=i,this.session=o,this.doc=o.getDocument(),this.mainClass=e,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=t,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=n;var l=o.getUndoManager().$undoStack||o.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=l.length,this.setup(),o.selection.on("changeCursor",this.$onCursorChange)}return c.prototype.setup=function(){var o=this,i=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=i.createAnchor(this.$pos.row,this.$pos.column);var t=this.pos;t.$insertRight=!0,t.detach(),t.markerId=n.addMarker(new k(t.row,t.column,t.row,t.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){var r=i.createAnchor(e.row,e.column);r.$insertRight=!0,r.detach(),o.others.push(r)}),n.setUndoSelect(!1)},c.prototype.showOtherMarkers=function(){if(!this.othersActive){var o=this.session,i=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=o.addMarker(new k(n.row,n.column,n.row,n.column+i.length),i.othersClass,null,!1)})}},c.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var o=0;o=this.pos.column&&i.start.column<=this.pos.column+this.length+1,e=i.start.column-this.pos.column;if(this.updateAnchors(o),t&&(this.length+=n),t&&!this.session.$fromUndo){if(o.action==="insert")for(var r=this.others.length-1;r>=0;r--){var s=this.others[r],l={row:s.row,column:s.column+e};this.doc.insertMergedLines(l,o.lines)}else if(o.action==="remove")for(var r=this.others.length-1;r>=0;r--){var s=this.others[r],l={row:s.row,column:s.column+e};this.doc.remove(new k(l.row,l.column,l.row,l.column-n))}}this.$updating=!1,this.updateMarkers()}},c.prototype.updateAnchors=function(o){this.pos.onChange(o);for(var i=this.others.length;i--;)this.others[i].onChange(o);this.updateMarkers()},c.prototype.updateMarkers=function(){if(!this.$updating){var o=this,i=this.session,n=function(e,r){i.removeMarker(e.markerId),e.markerId=i.addMarker(new k(e.row,e.column,e.row,e.column+o.length),r,null,!1)};n(this.pos,this.mainClass);for(var t=this.others.length;t--;)n(this.others[t],this.othersClass)}},c.prototype.onCursorChange=function(o){if(!(this.$updating||!this.session)){var i=this.session.selection.getCursor();i.row===this.pos.row&&i.column>=this.pos.column&&i.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",o)):(this.hideOtherMarkers(),this._emit("cursorLeave",o))}},c.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},c.prototype.cancel=function(){if(this.$undoStackDepth!==-1){for(var o=this.session.getUndoManager(),i=(o.$undoStack||o.$undostack).length-this.$undoStackDepth,n=0;n1?M.multiSelect.joinSelections():M.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(M){M.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(M){M.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(M){M.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],x.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(M){M.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(M){return M&&M.inMultiSelectMode}}];var k=E("../keyboard/hash_handler").HashHandler;x.keyboardHandler=new k(x.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(E,x,z){var k=E("./range_list").RangeList,M=E("./range").Range,S=E("./selection").Selection,a=E("./mouse/multi_select_handler").onMouseDown,c=E("./lib/event"),o=E("./lib/lang"),i=E("./commands/multi_select_commands");x.commands=i.defaultCommands.concat(i.multiSelectCommands);var n=E("./search").Search,t=new n;function e(m,g,d){return t.$options.wrap=!0,t.$options.needle=g,t.$options.backwards=d==-1,t.find(m)}var r=E("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(r.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(m,g){if(m){if(!this.inMultiSelectMode&&this.rangeCount===0){var d=this.toOrientedRange();if(this.rangeList.add(d),this.rangeList.add(m),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),g||this.fromOrientedRange(m);this.rangeList.removeAll(),this.rangeList.add(d),this.$onAddRange(d)}m.cursor||(m.cursor=m.end);var $=this.rangeList.add(m);return this.$onAddRange(m),$.length&&this.$onRemoveRange($),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),g||this.fromOrientedRange(m)}},this.toSingleRange=function(m){m=m||this.ranges[0];var g=this.rangeList.removeAll();g.length&&this.$onRemoveRange(g),m&&this.fromOrientedRange(m)},this.substractPoint=function(m){var g=this.rangeList.substractPoint(m);if(g)return this.$onRemoveRange(g),g[0]},this.mergeOverlappingRanges=function(){var m=this.rangeList.merge();m.length&&this.$onRemoveRange(m)},this.$onAddRange=function(m){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(m),this._signal("addRange",{range:m})},this.$onRemoveRange=function(m){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var g=this.rangeList.ranges.pop();m.push(g),this.rangeCount=0}for(var d=m.length;d--;){var $=this.ranges.indexOf(m[d]);this.ranges.splice($,1)}this._signal("removeRange",{ranges:m}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),g=g||this.ranges[0],g&&!g.isEqual(this.getRange())&&this.fromOrientedRange(g)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new k,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var m=this.ranges.length?this.ranges:[this.getRange()],g=[],d=0;d1){var m=this.rangeList.ranges,g=m[m.length-1],d=M.fromPoints(m[0].start,g.end);this.toSingleRange(),this.setSelectionRange(d,g.cursor==g.start)}else{var $=this.session.documentToScreenPosition(this.cursor),T=this.session.documentToScreenPosition(this.anchor),A=this.rectangularRangeBlock($,T);A.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(m,g,d){var $=[],T=m.column0;)_--;if(_>0)for(var I=0;$[I].isEmpty();)I++;for(var N=_;N>=I;N--)$[N].isEmpty()&&$.splice(N,1)}return $}}).call(S.prototype);var s=E("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(m){m.cursor||(m.cursor=m.end);var g=this.getSelectionStyle();return m.marker=this.session.addMarker(m,"ace_selection",g),this.session.$selectionMarkers.push(m),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,m},this.removeSelectionMarker=function(m){if(m.marker){this.session.removeMarker(m.marker);var g=this.session.$selectionMarkers.indexOf(m);g!=-1&&this.session.$selectionMarkers.splice(g,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(m){for(var g=this.session.$selectionMarkers,d=m.length;d--;){var $=m[d];if($.marker){this.session.removeMarker($.marker);var T=g.indexOf($);T!=-1&&g.splice(T,1)}}this.session.selectionMarkerCount=g.length},this.$onAddRange=function(m){this.addSelectionMarker(m.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(m){this.removeSelectionMarkers(m.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(m){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(i.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(m){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(i.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(m){var g=m.command,d=m.editor;if(d.multiSelect){if(g.multiSelectAction)g.multiSelectAction=="forEach"?$=d.forEachSelection(g,m.args):g.multiSelectAction=="forEachLine"?$=d.forEachSelection(g,m.args,!0):g.multiSelectAction=="single"?(d.exitMultiSelectMode(),$=g.exec(d,m.args||{})):$=g.multiSelectAction(d,m.args||{});else{var $=g.exec(d,m.args||{});d.multiSelect.addRange(d.multiSelect.toOrientedRange()),d.multiSelect.mergeOverlappingRanges()}return $}},this.forEachSelection=function(m,g,d){if(!this.inVirtualSelectionMode){var $=d&&d.keepOrder,T=d==!0||d&&d.$byLines,A=this.session,C=this.selection,w=C.rangeList,f=($?C:w).ranges,p;if(!f.length)return m.exec?m.exec(this,g||{}):m(this,g||{});var h=C._eventRegistry;C._eventRegistry={};var v=new S(A);this.inVirtualSelectionMode=!0;for(var y=f.length;y--;){if(T)for(;y>0&&f[y].start.row==f[y-1].end.row;)y--;v.fromOrientedRange(f[y]),v.index=y,this.selection=A.selection=v;var L=m.exec?m.exec(this,g||{}):m(this,g||{});!p&&L!==void 0&&(p=L),v.toOrientedRange(f[y])}v.detach(),this.selection=A.selection=C,this.inVirtualSelectionMode=!1,C._eventRegistry=h,C.mergeOverlappingRanges(),C.ranges[0]&&C.fromOrientedRange(C.ranges[0]);var R=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),R&&R.from==R.to&&this.renderer.animateScrolling(R.from),p}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var m="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var g=this.multiSelect.rangeList.ranges,d=[],$=0;$0);C<0&&(C=0),w>=p&&(w=p-1)}var v=this.session.removeFullLines(C,w);v=this.$reAlignText(v,f),this.session.insert({row:C,column:0},v.join("\n")+"\n"),f||(A.start.column=0,A.end.column=v[v.length-1].length),this.selection.setRange(A)}else{T.forEach(function(_){g.substractPoint(_.cursor)});var y=0,L=1/0,R=d.map(function(_){var I=_.cursor,N=m.getLine(I.row),W=N.substr(I.column).search(/\S/g);return W==-1&&(W=0),I.column>y&&(y=I.column),WO?m.insert(N,o.stringRepeat(" ",W-O)):m.remove(new M(N.row,N.column,N.row,N.column-W+O)),_.start.column=_.end.column=y,_.start.row=_.end.row=N.row,_.cursor=_.end}),g.fromOrientedRange(d[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(m,g){var d=!0,$=!0,T,A,C;return m.map(function(v){var y=v.match(/(\s*)(.*?)(\s*)([=:].*)/);return y?T==null?(T=y[1].length,A=y[2].length,C=y[3].length,y):(T+A+C!=y[1].length+y[2].length+y[3].length&&($=!1),T!=y[1].length&&(d=!1),T>y[1].length&&(T=y[1].length),Ay[3].length&&(C=y[3].length),y):[v]}).map(g?f:d?$?p:f:h);function w(v){return o.stringRepeat(" ",v)}function f(v){return v[2]?w(T)+v[2]+w(A-v[2].length+C)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function p(v){return v[2]?w(T+A-v[2].length)+v[2]+w(C)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}function h(v){return v[2]?w(T)+v[2]+w(C)+v[4].replace(/^([=:])\s+/,"$1 "):v[0]}}}).call(s.prototype);function l(m,g){return m.row==g.row&&m.column==g.column}x.onSessionChange=function(m){var g=m.session;g&&!g.multiSelect&&(g.$selectionMarkers=[],g.selection.$initRangeList(),g.multiSelect=g.selection),this.multiSelect=g&&g.multiSelect;var d=m.oldSession;d&&(d.multiSelect.off("addRange",this.$onAddRange),d.multiSelect.off("removeRange",this.$onRemoveRange),d.multiSelect.off("multiSelect",this.$onMultiSelect),d.multiSelect.off("singleSelect",this.$onSingleSelect),d.multiSelect.lead.off("change",this.$checkMultiselectChange),d.multiSelect.anchor.off("change",this.$checkMultiselectChange)),g&&(g.multiSelect.on("addRange",this.$onAddRange),g.multiSelect.on("removeRange",this.$onRemoveRange),g.multiSelect.on("multiSelect",this.$onMultiSelect),g.multiSelect.on("singleSelect",this.$onSingleSelect),g.multiSelect.lead.on("change",this.$checkMultiselectChange),g.multiSelect.anchor.on("change",this.$checkMultiselectChange)),g&&this.inMultiSelectMode!=g.selection.inMultiSelectMode&&(g.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function u(m){m.$multiselectOnSessionChange||(m.$onAddRange=m.$onAddRange.bind(m),m.$onRemoveRange=m.$onRemoveRange.bind(m),m.$onMultiSelect=m.$onMultiSelect.bind(m),m.$onSingleSelect=m.$onSingleSelect.bind(m),m.$multiselectOnSessionChange=x.onSessionChange.bind(m),m.$checkMultiselectChange=m.$checkMultiselectChange.bind(m),m.$multiselectOnSessionChange(m),m.on("changeSession",m.$multiselectOnSessionChange),m.on("mousedown",a),m.commands.addCommands(i.defaultCommands),b(m))}function b(m){if(!m.textInput)return;var g=m.textInput.getElement(),d=!1;c.addListener(g,"keydown",function(T){var A=T.keyCode==18&&!(T.ctrlKey||T.shiftKey||T.metaKey);m.$blockSelectEnabled&&A?d||(m.renderer.setMouseCursor("crosshair"),d=!0):d&&$()},m),c.addListener(g,"keyup",$,m),c.addListener(g,"blur",$,m);function $(T){d&&(m.renderer.setMouseCursor(""),d=!1)}}x.MultiSelect=u,E("./config").defineOptions(s.prototype,"editor",{enableMultiselect:{set:function(m){u(this),m?this.on("mousedown",a):this.off("mousedown",a)},value:!0},enableBlockSelect:{set:function(m){this.$blockSelectEnabled=m},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(E,x,z){var k=E("../../range").Range,M=x.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(S,a,c){var o=S.getLine(c);return this.foldingStartMarker.test(o)?"start":a=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(o)?"end":""},this.getFoldWidgetRange=function(S,a,c){return null},this.indentationBlock=function(S,a,c){var o=/\S/,i=S.getLine(a),n=i.search(o);if(n!=-1){for(var t=c||i.length,e=S.getLength(),r=a,s=a;++ar){var b=S.getLine(s).length;return new k(r,t,s,b)}}},this.openingBracketBlock=function(S,a,c,o,i){var n={row:c,column:o+1},t=S.$findClosingBracket(a,n,i);if(t){var e=S.foldWidgets[t.row];return e==null&&(e=S.getFoldWidget(t.row)),e=="start"&&t.row>n.row&&(t.row--,t.column=S.getLine(t.row).length),k.fromPoints(n,t)}},this.closingBracketBlock=function(S,a,c,o,i){var n={row:c,column:o},t=S.$findOpeningBracket(a,n);if(t)return t.column++,n.column--,k.fromPoints(t,n)}}).call(M.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(E,x,z){var k=E("../line_widgets").LineWidgets,M=E("../lib/dom"),S=E("../range").Range,a=E("../config").nls;function c(i,n,t){for(var e=0,r=i.length-1;e<=r;){var s=e+r>>1,l=t(n,i[s]);if(l>0)e=s+1;else if(l<0)r=s-1;else return s}return-(e+1)}function o(i,n,t){var e=i.getAnnotations().sort(S.comparePoints);if(e.length){var r=c(e,{row:n,column:-1},S.comparePoints);r<0&&(r=-r-1),r>=e.length?r=t>0?0:e.length-1:r===0&&t<0&&(r=e.length-1);var s=e[r];if(!(!s||!t)){if(s.row===n){do s=e[r+=t];while(s&&s.row===n);if(!s)return e.slice()}var l=[];n=s.row;do l[t<0?"unshift":"push"](s),s=e[r+=t];while(s&&s.row==n);return l.length&&l}}}x.showErrorMarker=function(i,n){var t=i.session;t.widgetManager||(t.widgetManager=new k(t),t.widgetManager.attach(i));var e=i.getCursorPosition(),r=e.row,s=t.widgetManager.getWidgetsAtRow(r).filter(function(A){return A.type=="errorMarker"})[0];s?s.destroy():r-=n;var l=o(t,r,n),u;if(l){var b=l[0];e.column=(b.pos&&typeof b.column!="number"?b.pos.sc:b.column)||0,e.row=b.row,u=i.renderer.$gutterLayer.$annotations[e.row]}else{if(s)return;u={displayText:[a("error-marker.good-state","Looks good!")],className:"ace_ok"}}i.session.unfold(e.row),i.selection.moveToPosition(e);var m={row:e.row,fixedWidth:!0,coverGutter:!0,el:M.createElement("div"),type:"errorMarker"},g=m.el.appendChild(M.createElement("div")),d=m.el.appendChild(M.createElement("div"));d.className="error_widget_arrow "+u.className;var $=i.renderer.$cursorLayer.getPixelPosition(e).left;d.style.left=$+i.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",g.className="error_widget "+u.className,u.displayText.forEach(function(A,C){g.appendChild(M.createTextNode(A)),C