4a5feb12465f66947af2f40a4785344e/******/////*///// 请勿使用非法用途


过安全狗、云锁、阿里云、360、护卫神、D盾、百度云、各种杀软!

iamH4CKEERRRRRRRRRRRS

I am a hacker in the dark of a very cold night

path :/home/drive/domains/drive.vcenetwork.com/public_html/public

upload file:

List of files:

name file size edit permission action
.htaccess1125 KBFebruary 26 2023 04:58:260644
1.zip1856 KBMay 26 2025 03:52:060644
arl.txt1 KBMay 26 2025 03:58:190644
build-August 19 2024 20:27:470755
cabs.jpg.phtml34996 KBMay 25 2025 13:50:430644
cool30203 KBMay 26 2025 03:49:270644
cool.php44 KBMay 26 2025 03:50:140644
favicon-May 26 2025 07:38:380755
favicon.ico502 KBAugust 19 2024 21:12:300644
htaccess.example1125 KBMay 20 2024 07:03:520755
images-August 19 2024 20:27:470755
index.php1949 KBMay 20 2024 07:03:520755
install_files-July 31 2023 19:05:060755
invoice.css99133 KBMay 20 2024 07:03:520644
manifest.json1055 KBAugust 19 2024 21:25:160644
robots.txt1154 KBJune 07 2025 12:24:520755
storage-May 25 2025 13:49:550755
style.php26 KBMay 26 2025 03:52:280644
swagger.yaml33646 KBMay 20 2024 07:03:520755
web.config914 KBMay 20 2024 07:03:520755
import{ck as mn,cB as vn,bY as we,r as nt,cu as bn,a as wn}from"./main.b7d280d4.js";import{p as Rt}from"./index.9b3ee2f7.js";var Xe={exports:{}};(function(I,M){(function(){var y="ace",$=function(){return this}();!$&&typeof window<"u"&&($=window);var R=function(t,e,i){if(typeof t!="string"){R.original?R.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace());return}arguments.length==2&&(i=e),R.modules[t]||(R.payloads[t]=i,R.modules[t]=null)};R.modules={},R.payloads={};var g=function(t,e,i){if(typeof e=="string"){var n=o(t,e);if(n!=null)return i&&i(),n}else if(Object.prototype.toString.call(e)==="[object Array]"){for(var r=[],s=0,c=e.length;so.length)&&(h=o.length),h-=b.length;var a=o.indexOf(b,h);return a!==-1&&a===h}),String.prototype.repeat||g(String.prototype,"repeat",function(b){for(var h="",o=this;b>0;)b&1&&(h+=o),(b>>=1)&&(o+=o);return h}),String.prototype.includes||g(String.prototype,"includes",function(b,h){return this.indexOf(b,h)!=-1}),Object.assign||(Object.assign=function(b){if(b==null)throw new TypeError("Cannot convert undefined or null to object");for(var h=Object(b),o=1;o>>0,a=arguments[1],t=a>>0,e=t<0?Math.max(o+t,0):Math.min(t,o),i=arguments[2],n=i===void 0?o:i>>0,r=n<0?Math.max(o+n,0):Math.min(n,o);e0;)o&1&&(a+=h),(o>>=1)&&(h+=h);return a};var g=/^\s\s*/,b=/\s\s*$/;$.stringTrimLeft=function(h){return h.replace(g,"")},$.stringTrimRight=function(h){return h.replace(b,"")},$.copyObject=function(h){var o={};for(var a in h)o[a]=h[a];return o},$.copyArray=function(h){for(var o=[],a=0,t=h.length;a=0?parseFloat((h.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((h.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),$.isOldIE=$.isIE&&$.isIE<9,$.isGecko=$.isMozilla=h.match(/ Gecko\/\d+/),$.isOpera=typeof opera=="object"&&Object.prototype.toString.call(window.opera)=="[object Opera]",$.isWebKit=parseFloat(h.split("WebKit/")[1])||void 0,$.isChrome=parseFloat(h.split(" Chrome/")[1])||void 0,$.isEdge=parseFloat(h.split(" Edge/")[1])||void 0,$.isAIR=h.indexOf("AdobeAIR")>=0,$.isAndroid=h.indexOf("Android")>=0,$.isChromeOS=h.indexOf(" CrOS ")>=0,$.isIOS=/iPad|iPhone|iPod/.test(h)&&!window.MSStream,$.isIOS&&($.isMac=!0),$.isMobile=$.isIOS||$.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(y,$,R){var g=y("./useragent"),b="http://www.w3.org/1999/xhtml";$.buildDom=function i(n,r,s){if(typeof n=="string"&&n){var c=document.createTextNode(n);return r&&r.appendChild(c),c}if(!Array.isArray(n))return n&&n.appendChild&&r&&r.appendChild(n),n;if(typeof n[0]!="string"||!n[0]){for(var m=[],w=0;w"u")){if(o){if(r)a();else if(r===!1)return o.push([i,n])}if(!h){var s=r;!r||!r.getRootNode?s=document:(s=r.getRootNode(),(!s||s==r)&&(s=document));var c=s.ownerDocument||s;if(n&&$.hasCssString(n,s))return null;n&&(i+=` /*# sourceURL=ace/css/`+n+" */");var m=$.createElement("style");m.appendChild(c.createTextNode(i)),n&&(m.id=n),s==c&&(s=$.getDocumentHead(c)),s.insertBefore(m,s.firstChild)}}}if($.importCssString=t,$.importCssStylsheet=function(i,n){$.buildDom(["link",{rel:"stylesheet",href:i}],$.getDocumentHead(n))},$.scrollbarWidth=function(i){var n=$.createElement("ace_inner");n.style.width="100%",n.style.minWidth="0px",n.style.height="200px",n.style.display="block";var r=$.createElement("ace_outer"),s=r.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",r.appendChild(n);var c=i&&i.documentElement||document&&document.documentElement;if(!c)return 0;c.appendChild(r);var m=n.offsetWidth;s.overflow="scroll";var w=n.offsetWidth;return m===w&&(w=r.clientWidth),c.removeChild(r),m-w},$.computedStyle=function(i,n){return window.getComputedStyle(i,"")||{}},$.setStyle=function(i,n,r){i[n]!==r&&(i[n]=r)},$.HAS_CSS_ANIMATION=!1,$.HAS_CSS_TRANSFORMS=!1,$.HI_DPI=g.isWin?typeof window<"u"&&window.devicePixelRatio>=1.5:!0,g.isChromeOS&&($.HI_DPI=!1),typeof document<"u"){var e=document.createElement("div");$.HI_DPI&&e.style.transform!==void 0&&($.HAS_CSS_TRANSFORMS=!0),!g.isEdge&&typeof e.style.animationName<"u"&&($.HAS_CSS_ANIMATION=!0),e=null}$.HAS_CSS_TRANSFORMS?$.translate=function(i,n,r){i.style.transform="translate("+Math.round(n)+"px, "+Math.round(r)+"px)"}:$.translate=function(i,n,r){i.style.top=Math.round(r)+"px",i.style.left=Math.round(n)+"px"}}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(y,$,R){/* * based on code from: * * @license RequireJS text 0.25.0 Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. * Available via the MIT or new BSD license. * see: http://github.com/jrburke/requirejs for details */var g=y("./dom");$.get=function(b,h){var o=new XMLHttpRequest;o.open("GET",b,!0),o.onreadystatechange=function(){o.readyState===4&&h(o.responseText)},o.send(null)},$.loadScript=function(b,h){var o=g.getDocumentHead(),a=document.createElement("script");a.src=b,o.appendChild(a),a.onload=a.onreadystatechange=function(t,e){(e||!a.readyState||a.readyState=="loaded"||a.readyState=="complete")&&(a=a.onload=a.onreadystatechange=null,e||h())}},$.qualifyURL=function(b){var h=document.createElement("a");return h.href=b,h.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(y,$,R){var g={},b=function(){this.propagationStopped=!0},h=function(){this.defaultPrevented=!0};g._emit=g._dispatchEvent=function(o,a){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var t=this._eventRegistry[o]||[],e=this._defaultHandlers[o];if(!(!t.length&&!e)){(typeof a!="object"||!a)&&(a={}),a.type||(a.type=o),a.stopPropagation||(a.stopPropagation=b),a.preventDefault||(a.preventDefault=h),t=t.slice();for(var i=0;i1&&(c=r[r.length-2]);var w=a[n+"Path"];return w==null?w=a.basePath:s=="/"&&(n=s=""),w&&w.slice(-1)!="/"&&(w+="/"),w+n+s+c+this.get("suffix")},$.setModuleUrl=function(i,n){return a.$moduleUrls[i]=n};var t=function(i,n){return i=="ace/theme/textmate"?n(null,y("./theme/textmate")):console.error("loader is not configured")};$.setLoader=function(i){t=i},$.$loading={},$.loadModule=function(i,n){var r,s;Array.isArray(i)&&(s=i[0],i=i[1]);try{r=y(i)}catch{}if(r&&!$.$loading[i])return n&&n(r);if($.$loading[i]||($.$loading[i]=[]),$.$loading[i].push(n),!($.$loading[i].length>1)){var c=function(){t(i,function(m,w){$._emit("load.module",{name:i,module:w});var S=$.$loading[i];$.$loading[i]=null,S.forEach(function(C){C&&C(w)})})};if(!$.get("packaged"))return c();b.loadScript($.moduleUrl(i,s),c),e()}};var e=function(){!a.basePath&&!a.workerPath&&!a.modePath&&!a.themePath&&!Object.keys(a.$moduleUrls).length&&(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),e=function(){})};$.version="1.13.1"}),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],function(y,$,R){y("./lib/fixoldbrowsers");var g=y("./config");g.setLoader(function(a,t){y([a],function(e){t(null,e)})});var b=function(){return this||typeof window<"u"&&window}();R.exports=function(a){g.init=h,a.require=y},h(!0);function h(a){if(!(!b||!b.document)){g.set("packaged",a||y.packaged||R.packaged||b.define&&(void 0).packaged);for(var t={},e="",i=document.currentScript||document._currentScript,n=i&&i.ownerDocument||document,r=n.getElementsByTagName("script"),s=0;s1?(v++,v>4&&(v=1)):v=1,b.isIE){var L=Math.abs(_.clientX-d)>5||Math.abs(_.clientY-l)>5;(!f||L)&&(v=1),f&&clearTimeout(f),f=setTimeout(function(){f=null},C[v-1]||600),v==1&&(d=_.clientX,l=_.clientY)}if(_._clicks=v,u[p]("mousedown",_),v>4)v=0;else if(v>1)return u[p](x[v],_)}Array.isArray(S)||(S=[S]),S.forEach(function(_){n(_,"mousedown",A,k)})};var s=function(S){return 0|(S.ctrlKey?1:0)|(S.altKey?2:0)|(S.shiftKey?4:0)|(S.metaKey?8:0)};$.getModifierString=function(S){return g.KEY_MODS[s(S)]};function c(S,C,u){var p=s(C);if(!b.isMac&&h){if(C.getModifierState&&(C.getModifierState("OS")||C.getModifierState("Win"))&&(p|=8),h.altGr)if((3&p)!=3)h.altGr=0;else return;if(u===18||u===17){var k="location"in C?C.location:C.keyLocation;if(u===17&&k===1)h[u]==1&&(o=C.timeStamp);else if(u===18&&p===3&&k===2){var v=C.timeStamp-o;v<50&&(h.altGr=!0)}}}if(u in g.MODIFIER_KEYS&&(u=-1),!p&&u===13){var k="location"in C?C.location:C.keyLocation;if(k===3&&(S(C,p,-u),C.defaultPrevented))return}if(b.isChromeOS&&p&8){if(S(C,p,u),C.defaultPrevented)return;p&=-9}return!p&&!(u in g.FUNCTION_KEYS)&&!(u in g.PRINTABLE_KEYS)?!1:S(C,p,u)}$.addCommandKeyListener=function(S,C,u){if(b.isOldGecko||b.isOpera&&!("KeyboardEvent"in window)){var p=null;n(S,"keydown",function(v){p=v.keyCode},u),n(S,"keypress",function(v){return c(C,v,p)},u)}else{var k=null;n(S,"keydown",function(v){h[v.keyCode]=(h[v.keyCode]||0)+1;var d=c(C,v,v.keyCode);return k=v.defaultPrevented,d},u),n(S,"keypress",function(v){k&&(v.ctrlKey||v.altKey||v.shiftKey||v.metaKey)&&($.stopEvent(v),k=null)},u),n(S,"keyup",function(v){h[v.keyCode]=null},u),h||(m(),n(window,"focus",m))}};function m(){h=Object.create(null)}if(typeof window=="object"&&window.postMessage&&!b.isOldIE){var w=1;$.nextTick=function(S,C){C=C||window;var u="zero-timeout-message-"+w++,p=function(k){k.data==u&&($.stopPropagation(k),r(C,"message",p),S())};n(C,"message",p),C.postMessage(u,"*")}}$.$idleBlocked=!1,$.onIdle=function(S,C){return setTimeout(function u(){$.$idleBlocked?setTimeout(u,100):S()},C)},$.$idleBlockId=null,$.blockIdle=function(S){$.$idleBlockId&&clearTimeout($.$idleBlockId),$.$idleBlocked=!0,$.$idleBlockId=setTimeout(function(){$.$idleBlocked=!1},S||100)},$.nextFrame=typeof window=="object"&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),$.nextFrame?$.nextFrame=$.nextFrame.bind(window):$.nextFrame=function(S){setTimeout(S,17)}}),ace.define("ace/range",["require","exports","module"],function(y,$,R){var g=function(h,o){return h.row-o.row||h.column-o.column},b=function(h,o,a,t){this.start={row:h,column:o},this.end={row:a,column:t}};(function(){this.isEqual=function(h){return this.start.row===h.start.row&&this.end.row===h.end.row&&this.start.column===h.start.column&&this.end.column===h.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(h,o){return this.compare(h,o)==0},this.compareRange=function(h){var o,a=h.end,t=h.start;return o=this.compare(a.row,a.column),o==1?(o=this.compare(t.row,t.column),o==1?2:o==0?1:0):o==-1?-2:(o=this.compare(t.row,t.column),o==-1?-1:o==1?42:0)},this.comparePoint=function(h){return this.compare(h.row,h.column)},this.containsRange=function(h){return this.comparePoint(h.start)==0&&this.comparePoint(h.end)==0},this.intersects=function(h){var o=this.compareRange(h);return o==-1||o==0||o==1},this.isEnd=function(h,o){return this.end.row==h&&this.end.column==o},this.isStart=function(h,o){return this.start.row==h&&this.start.column==o},this.setStart=function(h,o){typeof h=="object"?(this.start.column=h.column,this.start.row=h.row):(this.start.row=h,this.start.column=o)},this.setEnd=function(h,o){typeof h=="object"?(this.end.column=h.column,this.end.row=h.row):(this.end.row=h,this.end.column=o)},this.inside=function(h,o){return this.compare(h,o)==0?!(this.isEnd(h,o)||this.isStart(h,o)):!1},this.insideStart=function(h,o){return this.compare(h,o)==0?!this.isEnd(h,o):!1},this.insideEnd=function(h,o){return this.compare(h,o)==0?!this.isStart(h,o):!1},this.compare=function(h,o){return!this.isMultiLine()&&h===this.start.row?othis.end.column?1:0:hthis.end.row?1:this.start.row===h?o>=this.start.column?0:-1:this.end.row===h?o<=this.end.column?0:1:0},this.compareStart=function(h,o){return this.start.row==h&&this.start.column==o?-1:this.compare(h,o)},this.compareEnd=function(h,o){return this.end.row==h&&this.end.column==o?1:this.compare(h,o)},this.compareInside=function(h,o){return this.end.row==h&&this.end.column==o?1:this.start.row==h&&this.start.column==o?-1:this.compare(h,o)},this.clipRows=function(h,o){if(this.end.row>o)var a={row:o+1,column:0};else if(this.end.rowo)var t={row:o+1,column:0};else if(this.start.rowDate.now()-50?!0:g=!1},cancel:function(){g=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(y,$,R){var g=y("../lib/event"),b=y("../lib/useragent"),h=y("../lib/dom"),o=y("../lib/lang"),a=y("../clipboard"),t=b.isChrome<18,e=b.isIE,i=b.isChrome>63,n=400,r=y("../lib/keys"),s=r.KEY_MODS,c=b.isIOS,m=c?/\s/:/\n/,w=b.isMobile,S=function(C,u){var p=h.createElement("textarea");p.className="ace_text-input",p.setAttribute("wrap","off"),p.setAttribute("autocorrect","off"),p.setAttribute("autocapitalize","off"),p.setAttribute("spellcheck",!1),p.style.opacity="0",C.insertBefore(p,C.firstChild);var k=!1,v=!1,d=!1,l=!1,f="";w||(p.style.fontSize="1px");var x=!1,A=!1,_="",L=0,T=0,F=0;try{var O=document.activeElement===p}catch{}g.addListener(p,"blur",function(K){A||(u.onBlur(K),O=!1)},u),g.addListener(p,"focus",function(K){if(!A){if(O=!0,b.isEdge)try{if(!document.hasFocus())return}catch{}u.onFocus(K),b.isEdge?setTimeout(B):B()}},u),this.$focusScroll=!1,this.focus=function(){if(f||i||this.$focusScroll=="browser")return p.focus({preventScroll:!0});var K=p.style.top;p.style.position="fixed",p.style.top="0px";try{var Z=p.getBoundingClientRect().top!=0}catch{return}var ie=[];if(Z)for(var se=p.parentElement;se&&se.nodeType==1;)ie.push(se),se.setAttribute("ace_nocontext",!0),!se.parentElement&&se.getRootNode?se=se.getRootNode().host:se=se.parentElement;p.focus({preventScroll:!0}),Z&&ie.forEach(function(he){he.removeAttribute("ace_nocontext")}),setTimeout(function(){p.style.position="",p.style.top=="0px"&&(p.style.top=K)},0)},this.blur=function(){p.blur()},this.isFocused=function(){return O},u.on("beforeEndOperation",function(){var K=u.curOp,Z=K&&K.command&&K.command.name;if(Z!="insertstring"){var ie=Z&&(K.docChanged||K.selectionChanged);d&&ie&&(_=p.value="",ve()),B()}});var B=c?function(K){if(!(!O||k&&!K||l)){K||(K="");var Z=` ab`+K+`cde fg `;Z!=p.value&&(p.value=_=Z);var ie=4,se=4+(K.length||(u.selection.isEmpty()?0:1));(L!=ie||T!=se)&&p.setSelectionRange(ie,se),L=ie,T=se}}:function(){if(!(d||l)&&!(!O&&!D)){d=!0;var K=0,Z=0,ie="";if(u.session){var se=u.selection,he=se.getRange(),pe=se.cursor.row;if(K=he.start.column,Z=he.end.column,ie=u.session.getLine(pe),he.start.row!=pe){var ue=u.session.getLine(pe-1);K=he.start.rowpe+1?de.length:Z,Z+=ie.length+1,ie=ie+` `+de}else w&&pe>0&&(ie=` `+ie,Z+=1,K+=1);ie.length>n&&(K=_.length&&K.value===_&&_&&K.selectionEnd!==T},N=function(K){d||(k?k=!1:W(p)?(u.selectAll(),B()):w&&p.selectionStart!=L&&B())},z=null;this.setInputHandler=function(K){z=K},this.getInputHandler=function(){return z};var D=!1,P=function(K,Z){if(D&&(D=!1),v)return B(),K&&u.onPaste(K),v=!1,"";for(var ie=p.selectionStart,se=p.selectionEnd,he=L,pe=_.length-T,ue=K,de=K.length-ie,ce=K.length-se,re=0;he>0&&_[re]==K[re];)re++,he--;for(ue=ue.slice(re),re=1;pe>0&&_.length-re>L-1&&_[_.length-re]==K[K.length-re];)re++,pe--;de-=re-1,ce-=re-1;var xe=ue.length-re+1;if(xe<0&&(he=-xe,xe=0),ue=ue.slice(0,xe),!Z&&!ue&&!de&&!he&&!pe&&!ce)return"";l=!0;var He=!1;return b.isAndroid&&ue==". "&&(ue=" ",He=!0),ue&&!he&&!pe&&!de&&!ce||x?u.onTextInput(ue):u.onTextInput(ue,{extendLeft:he,extendRight:pe,restoreStart:de,restoreEnd:ce}),l=!1,_=K,L=ie,T=se,F=ce,He?` `:ue},U=function(K){if(d)return oe();if(K&&K.inputType){if(K.inputType=="historyUndo")return u.execCommand("undo");if(K.inputType=="historyRedo")return u.execCommand("redo")}var Z=p.value,ie=P(Z,!0);(Z.length>n+100||m.test(ie)||w&&L<1&&L==T)&&B()},G=function(K,Z,ie){var se=K.clipboardData||window.clipboardData;if(!(!se||t)){var he=e||ie?"Text":"text/plain";try{return Z?se.setData(he,Z)!==!1:se.getData(he)}catch(pe){if(!ie)return G(pe,Z,!0)}}},Y=function(K,Z){var ie=u.getCopyText();if(!ie)return g.preventDefault(K);G(K,ie)?(c&&(B(ie),k=ie,setTimeout(function(){k=!1},10)),Z?u.onCut():u.onCopy(),g.preventDefault(K)):(k=!0,p.value=ie,p.select(),setTimeout(function(){k=!1,B(),Z?u.onCut():u.onCopy()}))},j=function(K){Y(K,!0)},J=function(K){Y(K,!1)},X=function(K){var Z=G(K);a.pasteCancelled()||(typeof Z=="string"?(Z&&u.onPaste(Z,K),b.isIE&&setTimeout(B),g.preventDefault(K)):(p.value="",v=!0))};g.addCommandKeyListener(p,u.onCommandKey.bind(u),u),g.addListener(p,"select",N,u),g.addListener(p,"input",U,u),g.addListener(p,"cut",j,u),g.addListener(p,"copy",J,u),g.addListener(p,"paste",X,u),(!("oncut"in p)||!("oncopy"in p)||!("onpaste"in p))&&g.addListener(C,"keydown",function(K){if(!(b.isMac&&!K.metaKey||!K.ctrlKey))switch(K.keyCode){case 67:J(K);break;case 86:X(K);break;case 88:j(K);break}},u);var q=function(K){if(!(d||!u.onCompositionStart||u.$readOnly)&&(d={},!x)){K.data&&(d.useTextareaForIME=!1),setTimeout(oe,0),u._signal("compositionStart"),u.on("mousedown",ge);var Z=u.getSelectionRange();Z.end.row=Z.start.row,Z.end.column=Z.start.column,d.markerRange=Z,d.selectionStart=L,u.onCompositionStart(d),d.useTextareaForIME?(_=p.value="",L=0,T=0):(p.msGetInputContext&&(d.context=p.msGetInputContext()),p.getInputContext&&(d.context=p.getInputContext()))}},oe=function(){if(!(!d||!u.onCompositionUpdate||u.$readOnly)){if(x)return ge();if(d.useTextareaForIME)u.onCompositionUpdate(p.value);else{var K=p.value;P(K),d.markerRange&&(d.context&&(d.markerRange.start.column=d.selectionStart=d.context.compositionStartOffset),d.markerRange.end.column=d.markerRange.start.column+T-d.selectionStart+F)}}},ve=function(K){!u.onCompositionEnd||u.$readOnly||(d=!1,u.onCompositionEnd(),u.off("mousedown",ge),K&&U())};function ge(){A=!0,p.blur(),p.focus(),A=!1}var le=o.delayedCall(oe,50).schedule.bind(null,null);function Se(K){K.keyCode==27&&p.value.lengthT&&_[ce]==` `?re=r.end:deT&&_.slice(0,ce).split(` `).length>2?re=r.down:ce>T&&_[ce-1]==" "?(re=r.right,xe=s.option):(ce>T||ce==T&&T!=L&&de==ce)&&(re=r.right),de!==ce&&(xe|=s.shift),re){var He=Z.onCommandKey({},xe,re);if(!He&&Z.commands){re=r.keyCodeToString(re);var st=Z.commands.findKeyCommand(xe,re);st&&Z.execCommand(st)}L=de,T=ce,B("")}}};document.addEventListener("selectionchange",pe),Z.on("destroy",function(){document.removeEventListener("selectionchange",pe)})}this.destroy=function(){p.parentElement&&p.parentElement.removeChild(p)}};$.TextInput=S,$.$setUserAgentForTests=function(C,u){w=C,c=u}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(y,$,R){var g=y("../lib/useragent"),b=0,h=550;function o(e){e.$clickSelection=null;var i=e.editor;i.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),i.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),i.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),i.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),i.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e));var n=["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"];n.forEach(function(r){e[r]=this[r]},this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}(function(){this.onMouseDown=function(e){var i=e.inSelection(),n=e.getDocumentPosition();this.mousedownEvent=e;var r=this.editor,s=e.getButton();if(s!==0){var c=r.getSelectionRange(),m=c.isEmpty();(m||s==1)&&r.selection.moveToPosition(n),s==2&&(r.textInput.onContextMenu(e.domEvent),g.isMozilla||e.preventDefault());return}if(this.mousedownEvent.time=Date.now(),i&&!r.isFocused()&&(r.focus(),this.$focusTimeout&&!this.$clickSelection&&!r.inMultiSelectMode)){this.setState("focusWait"),this.captureMouse(e);return}return this.captureMouse(e),this.startSelect(n,e.domEvent._clicks>1),e.preventDefault()},this.startSelect=function(e,i){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;!this.mousedownEvent||(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(e):i||n.selection.moveToPosition(e),i||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var e,i=this.editor,n=i.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var r=this.$clickSelection.comparePoint(n);if(r==-1)e=this.$clickSelection.end;else if(r==1)e=this.$clickSelection.start;else{var s=t(this.$clickSelection,n);n=s.cursor,e=s.anchor}i.selection.setSelectionAnchor(e.row,e.column)}i.selection.selectToPosition(n),i.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(e){var i,n=this.editor,r=n.renderer.screenToTextCoordinates(this.x,this.y),s=n.selection[e](r.row,r.column);if(this.$clickSelection){var c=this.$clickSelection.comparePoint(s.start),m=this.$clickSelection.comparePoint(s.end);if(c==-1&&m<=0)i=this.$clickSelection.end,(s.end.row!=r.row||s.end.column!=r.column)&&(r=s.start);else if(m==1&&c>=0)i=this.$clickSelection.start,(s.start.row!=r.row||s.start.column!=r.column)&&(r=s.end);else if(c==-1&&m==1)r=s.end,i=s.start;else{var w=t(this.$clickSelection,r);r=w.cursor,i=w.anchor}n.selection.setSelectionAnchor(i.row,i.column)}n.selection.selectToPosition(r),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var e=a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),i=Date.now();(e>b||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(e){var i=e.getDocumentPosition(),n=this.editor,r=n.session,s=r.getBracketRange(i);s?(s.isEmpty()&&(s.start.column--,s.end.column++),this.setState("select")):(s=n.selection.getWordRange(i.row,i.column),this.setState("selectByWords")),this.$clickSelection=s,this.select()},this.onTripleClick=function(e){var i=e.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var r=n.getSelectionRange();r.isMultiLine()&&r.contains(i.row,i.column)?(this.$clickSelection=n.selection.getLineRange(r.start.row),this.$clickSelection.end=n.selection.getLineRange(r.end.row).end):this.$clickSelection=n.selection.getLineRange(i.row),this.select()},this.onQuadClick=function(e){var i=this.editor;i.selectAll(),this.$clickSelection=i.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var i=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,r=e.domEvent.timeStamp,s=r-n.t,c=s?e.wheelX/s:n.vx,m=s?e.wheelY/s:n.vy;s=1&&i.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(S=!0),w<=1&&i.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(S=!0),S)n.allowed=r;else if(r-n.allowedi.session.documentToScreenRow(d.row,d.column))return S()}if(m!=p){m=p.text.join("
"),r.setHtml(m);var l=p.className;if(l&&r.setClassName(l.trim()),r.show(),i._signal("showGutterTooltip",r),i.on("mousewheel",S),e.$tooltipFollowsMouse)C(c);else{var f=c.domEvent.target,x=f.getBoundingClientRect(),A=r.getElement().style;A.left=x.right+"px",A.top=x.bottom+"px"}}}function S(){s&&(s=clearTimeout(s)),m&&(r.hide(),m=null,i._signal("hideGutterTooltip",r),i.off("mousewheel",S))}function C(u){r.setPosition(u.x,u.y)}e.editor.setDefaultHandler("guttermousemove",function(u){var p=u.domEvent.target||u.domEvent.srcElement;if(g.hasCssClass(p,"ace_fold-widget"))return S();m&&e.$tooltipFollowsMouse&&C(u),c=u,!s&&(s=setTimeout(function(){s=null,c&&!e.isMousePressed?w():S()},50))}),h.addListener(i.renderer.$gutter,"mouseout",function(u){c=null,!(!m||s)&&(s=setTimeout(function(){s=null,S()},50))},i),i.on("changeSession",S)}function t(e){o.call(this,e)}b.inherits(t,o),function(){this.setPosition=function(e,i){var n=window.innerWidth||document.documentElement.clientWidth,r=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),c=this.getHeight();e+=15,i+=15,e+s>n&&(e-=e+s-n),i+c>r&&(i-=20+c),o.prototype.setPosition.call(this,e,i)}}.call(t.prototype),$.GutterHandler=a}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(y,$,R){var g=y("../lib/event"),b=y("../lib/useragent"),h=$.MouseEvent=function(o,a){this.domEvent=o,this.editor=a,this.x=this.clientX=o.clientX,this.y=this.clientY=o.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){g.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){g.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(this.$inSelection!==null)return this.$inSelection;var o=this.editor,a=o.getSelectionRange();if(a.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=a.contains(t.row,t.column)}return this.$inSelection},this.getButton=function(){return g.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=b.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(h.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(y,$,R){var g=y("../lib/dom"),b=y("../lib/event"),h=y("../lib/useragent"),o=200,a=200,t=5;function e(n){var r=n.editor,s=g.createElement("div");s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent="\xA0";var c=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];c.forEach(function(D){n[D]=this[D]},this),r.on("mousedown",this.onMouseDown.bind(n));var m=r.container,w,S,C,u,p,k,v=0,d,l,f,x,A;this.onDragStart=function(D){if(this.cancelDrag||!m.draggable){var P=this;return setTimeout(function(){P.startSelect(),P.captureMouse(D)},0),D.preventDefault()}p=r.getSelectionRange();var U=D.dataTransfer;U.effectAllowed=r.getReadOnly()?"copy":"copyMove",r.container.appendChild(s),U.setDragImage&&U.setDragImage(s,0,0),setTimeout(function(){r.container.removeChild(s)}),U.clearData(),U.setData("Text",r.session.getTextRange()),l=!0,this.setState("drag")},this.onDragEnd=function(D){if(m.draggable=!1,l=!1,this.setState(null),!r.getReadOnly()){var P=D.dataTransfer.dropEffect;!d&&P=="move"&&r.session.remove(r.getSelectionRange()),r.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(D){if(!(r.getReadOnly()||!N(D.dataTransfer)))return S=D.clientX,C=D.clientY,w||F(),v++,D.dataTransfer.dropEffect=d=z(D),b.preventDefault(D)},this.onDragOver=function(D){if(!(r.getReadOnly()||!N(D.dataTransfer)))return S=D.clientX,C=D.clientY,w||(F(),v++),B!==null&&(B=null),D.dataTransfer.dropEffect=d=z(D),b.preventDefault(D)},this.onDragLeave=function(D){if(v--,v<=0&&w)return O(),d=null,b.preventDefault(D)},this.onDrop=function(D){if(!!k){var P=D.dataTransfer;if(l)switch(d){case"move":p.contains(k.row,k.column)?p={start:k,end:k}:p=r.moveText(p,k);break;case"copy":p=r.moveText(p,k,!0);break}else{var U=P.getData("Text");p={start:k,end:r.session.insert(k,U)},r.focus(),d=null}return O(),b.preventDefault(D)}},b.addListener(m,"dragstart",this.onDragStart.bind(n),r),b.addListener(m,"dragend",this.onDragEnd.bind(n),r),b.addListener(m,"dragenter",this.onDragEnter.bind(n),r),b.addListener(m,"dragover",this.onDragOver.bind(n),r),b.addListener(m,"dragleave",this.onDragLeave.bind(n),r),b.addListener(m,"drop",this.onDrop.bind(n),r);function _(D,P){var U=Date.now(),G=!P||D.row!=P.row,Y=!P||D.column!=P.column;if(!x||G||Y)r.moveCursorToPosition(D),x=U,A={x:S,y:C};else{var j=i(A.x,A.y,S,C);j>t?x=null:U-x>=a&&(r.renderer.scrollCursorIntoView(),x=null)}}function L(D,P){var U=Date.now(),G=r.renderer.layerConfig.lineHeight,Y=r.renderer.layerConfig.characterWidth,j=r.renderer.scroller.getBoundingClientRect(),J={x:{left:S-j.left,right:j.right-S},y:{top:C-j.top,bottom:j.bottom-C}},X=Math.min(J.x.left,J.x.right),q=Math.min(J.y.top,J.y.bottom),oe={row:D.row,column:D.column};X/Y<=2&&(oe.column+=J.x.left=o&&r.renderer.scrollCursorIntoView(oe):f=U:f=null}function T(){var D=k;k=r.renderer.screenToTextCoordinates(S,C),_(k,D),L(k,D)}function F(){p=r.selection.toOrientedRange(),w=r.session.addMarker(p,"ace_selection",r.getSelectionStyle()),r.clearSelection(),r.isFocused()&&r.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),T(),u=setInterval(T,20),v=0,b.addListener(document,"mousemove",W)}function O(){clearInterval(u),r.session.removeMarker(w),w=null,r.selection.fromOrientedRange(p),r.isFocused()&&!l&&r.$resetCursorStyle(),p=null,k=null,v=0,f=null,x=null,b.removeListener(document,"mousemove",W)}var B=null;function W(){B==null&&(B=setTimeout(function(){B!=null&&w&&O()},20))}function N(D){var P=D.types;return!P||Array.prototype.some.call(P,function(U){return U=="text/plain"||U=="Text"})}function z(D){var P=["copy","copymove","all","uninitialized"],U=["move","copymove","linkmove","all","uninitialized"],G=h.isMac?D.altKey:D.ctrlKey,Y="uninitialized";try{Y=D.dataTransfer.effectAllowed.toLowerCase()}catch{}var j="none";return G&&P.indexOf(Y)>=0?j="copy":U.indexOf(Y)>=0?j="move":P.indexOf(Y)>=0&&(j="copy"),j}}(function(){this.dragWait=function(){var n=Date.now()-this.mousedownEvent.time;n>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var n=this.editor.container;n.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(n){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var n=this.editor,r=n.container;r.draggable=!0,n.renderer.$cursorLayer.setBlinking(!1),n.setStyle("ace_dragging");var s=h.isWin?"default":"move";n.renderer.setCursorStyle(s),this.setState("dragReady")},this.onMouseDrag=function(n){var r=this.editor.container;if(h.isIE&&this.state=="dragReady"){var s=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>3&&r.dragDrop()}if(this.state==="dragWait"){var s=i(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);s>0&&(r.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(n){if(!!this.$dragEnabled){this.mousedownEvent=n;var r=this.editor,s=n.inSelection(),c=n.getButton(),m=n.domEvent.detail||1;if(m===1&&c===0&&s){if(n.editor.inMultiSelectMode&&(n.getAccelKey()||n.getShiftKey()))return;this.mousedownEvent.time=Date.now();var w=n.domEvent.target||n.domEvent.srcElement;if("unselectable"in w&&(w.unselectable="on"),r.getDragDelay()){if(h.isWebKit){this.cancelDrag=!0;var S=r.container;S.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(n,this.onMouseDrag.bind(this)),n.defaultPrevented=!0}}}}).call(e.prototype);function i(n,r,s,c){return Math.sqrt(Math.pow(s-n,2)+Math.pow(c-r,2))}$.DragdropHandler=e}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(y,$,R){var g=y("./mouse_event").MouseEvent,b=y("../lib/event"),h=y("../lib/dom");$.addTouchListeners=function(o,a){var t="scroll",e,i,n,r,s,c,m=0,w,S=0,C=0,u=0,p,k;function v(){var _=window.navigator&&window.navigator.clipboard,L=!1,T=function(){var O=a.getCopyText(),B=a.session.getUndoManager().hasUndo();k.replaceChild(h.buildDom(L?["span",!O&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],O&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],O&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],_&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],B&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Palette"]]:["span"]),k.firstChild)},F=function(O){var B=O.target.getAttribute("action");if(B=="more"||!L)return L=!L,T();B=="paste"?_.readText().then(function(W){a.execCommand(B,W)}):B&&((B=="cut"||B=="copy")&&(_?_.writeText(a.getCopyText()):document.execCommand("copy")),a.execCommand(B)),k.firstChild.style.display="none",L=!1,B!="openCommandPallete"&&a.focus()};k=h.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(O){t="menu",O.stopPropagation(),O.preventDefault(),a.textInput.focus()},ontouchend:function(O){O.stopPropagation(),O.preventDefault(),F(O)},onclick:F},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],a.container)}function d(){k||v();var _=a.selection.cursor,L=a.renderer.textToScreenCoordinates(_.row,_.column),T=a.renderer.textToScreenCoordinates(0,0).pageX,F=a.renderer.scrollLeft,O=a.container.getBoundingClientRect();k.style.top=L.pageY-O.top-3+"px",L.pageX-O.left=2?a.selection.getLineRange(w.row):a.session.getBracketRange(w);_&&!_.isEmpty()?a.selection.setRange(_):a.selection.selectWord(),t="wait"}b.addListener(o,"contextmenu",function(_){if(!!p){var L=a.textInput.getElement();L.focus()}},a),b.addListener(o,"touchstart",function(_){var L=_.touches;if(s||L.length>1){clearTimeout(s),s=null,n=-1,t="zoom";return}p=a.$mouseHandler.isMousePressed=!0;var T=a.renderer.layerConfig.lineHeight,F=a.renderer.layerConfig.lineHeight,O=_.timeStamp;r=O;var B=L[0],W=B.clientX,N=B.clientY;Math.abs(e-W)+Math.abs(i-N)>T&&(n=-1),e=_.clientX=W,i=_.clientY=N,C=u=0;var z=new g(_,a);if(w=z.getDocumentPosition(),O-n<500&&L.length==1&&!m)S++,_.preventDefault(),_.button=0,x();else{S=0;var D=a.selection.cursor,P=a.selection.isEmpty()?D:a.selection.anchor,U=a.renderer.$cursorLayer.getPixelPosition(D,!0),G=a.renderer.$cursorLayer.getPixelPosition(P,!0),Y=a.renderer.scroller.getBoundingClientRect(),j=a.renderer.layerConfig.offset,J=a.renderer.scrollLeft,X=function(ve,ge){return ve=ve/F,ge=ge/T-.75,ve*ve+ge*ge};if(_.clientXoe?"cursor":"anchor"),oe<3.5?t="anchor":q<3.5?t="cursor":t="scroll",s=setTimeout(f,450)}n=O},a),b.addListener(o,"touchend",function(_){p=a.$mouseHandler.isMousePressed=!1,c&&clearInterval(c),t=="zoom"?(t="",m=0):s?(a.selection.moveToPosition(w),m=0,d()):t=="scroll"?(A(),l()):d(),clearTimeout(s),s=null},a),b.addListener(o,"touchmove",function(_){s&&(clearTimeout(s),s=null);var L=_.touches;if(!(L.length>1||t=="zoom")){var T=L[0],F=e-T.clientX,O=i-T.clientY;if(t=="wait")if(F*F+O*O>4)t="cursor";else return _.preventDefault();e=T.clientX,i=T.clientY,_.clientX=T.clientX,_.clientY=T.clientY;var B=_.timeStamp,W=B-r;if(r=B,t=="scroll"){var N=new g(_,a);N.speed=1,N.wheelX=F,N.wheelY=O,10*Math.abs(F)0)if(oe==16){for(le=ge;le-1){for(le=ge;le=0&&G[Le]==p;Le--)P[Le]=g}}}function W(D,P,U){if(!(b=D){for(j=Y+1;j=D;)j++;for(J=Y,X=j-1;J=P.length||(j=U[G-1])!=c&&j!=m||(J=P[G+1])!=c&&J!=m?w:(h&&(J=m),J==j?J:w);case v:return j=G>0?U[G-1]:S,j==c&&G+10&&U[G-1]==c)return c;if(h)return w;for(q=G+1,X=P.length;q=1425&&oe<=2303||oe==64286;if(j=P[q],ve&&(j==s||j==u))return s}return G<1||(j=P[G-1])==S?w:U[G-1];case S:return h=!1,o=!0,g;case C:return a=!0,w;case f:case x:case _:case L:case A:h=!1;case T:return w}}function z(D){var P=D.charCodeAt(0),U=P>>8;return U==0?P>191?r:F[P]:U==5?/[\u0591-\u05f4]/.test(D)?s:r:U==6?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(D)?l:/[\u0660-\u0669\u066b-\u066c]/.test(D)?m:P==1642?d:/[\u06f0-\u06f9]/.test(D)?c:u:U==32&&P<=8287?O[P&255]:U==254&&P>=65136?u:w}$.L=r,$.R=s,$.EN=c,$.ON_R=3,$.AN=4,$.R_H=5,$.B=6,$.RLE=7,$.DOT="\xB7",$.doBidiReorder=function(D,P,U){if(D.length<2)return{};var G=D.split(""),Y=new Array(G.length),j=new Array(G.length),J=[];g=U?n:i,B(G,J,G.length,P);for(var X=0;Xu&&P[X]0&&G[X-1]==="\u0644"&&/\u0622|\u0623|\u0625|\u0627/.test(G[X])&&(J[X-1]=J[X]=$.R_H,X++);G[G.length-1]===$.DOT&&(J[G.length-1]=$.B),G[0]==="\u202B"&&(J[0]=$.RLE);for(var X=0;X=0&&(a=this.session.$docRowCache[e])}return a},this.getSplitIndex=function(){var a=0,t=this.session.$screenRowCache;if(t.length)for(var e,i=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-a>0&&(e=this.session.$getRowCacheIndex(t,this.currentRow-a-1),e===i);)i=e,a++;else a=this.currentRow;return a},this.updateRowLine=function(a,t){a===void 0&&(a=this.getDocumentRow());var e=a===this.session.getLength()-1,i=e?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(a),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var n=this.session.$wrapData[a];n&&(t===void 0&&(t=this.getSplitIndex()),t>0&&n.length?(this.wrapIndent=n.indent,this.wrapOffset=this.wrapIndent*this.charWidths[g.L],this.line=tt?this.session.getOverwrite()?a:a-1:t,i=g.getVisualFromLogicalIdx(e,this.bidiMap),n=this.bidiMap.bidiLevels,r=0;!this.session.getOverwrite()&&a<=t&&n[i]%2!==0&&i++;for(var s=0;st&&n[i]%2===0&&(r+=this.charWidths[n[i]]),this.wrapIndent&&(r+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(r+=this.rtlLineOffset),r},this.getSelections=function(a,t){var e=this.bidiMap,i=e.bidiLevels,n,r=[],s=0,c=Math.min(a,t)-this.wrapIndent,m=Math.max(a,t)-this.wrapIndent,w=!1,S=!1,C=0;this.wrapIndent&&(s+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var u,p=0;p=c&&ui+s/2;){if(i+=s,n===r.length-1){s=0;break}s=this.charWidths[r[++n]]}return n>0&&r[n-1]%2!==0&&r[n]%2===0?(e0&&r[n-1]%2===0&&r[n]%2!==0?t=1+(e>i?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===r.length-1&&s===0&&r[n-1]%2===0||!this.isRtlDir&&n===0&&r[n]%2!==0?t=1+this.bidiMap.logicalFromVisual[n]:(n>0&&r[n-1]%2!==0&&s!==0&&n--,t=this.bidiMap.logicalFromVisual[n]),t===0&&this.isRtlDir&&t++,t+this.wrapIndent}}).call(o.prototype),$.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(y,$,R){var g=y("./lib/oop"),b=y("./lib/lang"),h=y("./lib/event_emitter").EventEmitter,o=y("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",function(i){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),!e.$isEmpty&&!e.$silent&&e._emit("changeSelection"),!e.$keepDesiredColumnOnChange&&i.old.column!=i.value.column&&(e.$desiredColumn=null)}),this.anchor.on("change",function(){e.$anchorChanged=!0,!e.$isEmpty&&!e.$silent&&e._emit("changeSelection")})};(function(){g.implement(this,h),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?o.fromPoints(e,e):this.isBackwards()?o.fromPoints(e,t):o.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,e){var i=e?t.end:t.start,n=e?t.start:t.end;this.$setSelection(i.row,i.column,n.row,n.column)},this.$setSelection=function(t,e,i,n){if(!this.$silent){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(i,n),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")}},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection(function(){this.moveCursorTo(t,e)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if(typeof e>"u"){var i=t||this.lead;t=i.row,e=i.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var i=typeof t=="number"?t:this.lead.row,n,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,e===!0?new o(i,0,n,this.session.getLine(n).length):new o(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,i){var n=t.column,r=t.column+e;return i<0&&(n=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(n,r).split(" ").length-1==e},this.moveCursorLeft=function(){var t=this.lead.getPosition(),e;if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(t.column===0)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var i=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,i,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-i):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t=this.lead.getPosition(),e;if(e=this.session.getFoldAt(t.row,t.column,1))this.moveCursorTo(e.end.row,e.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(e.column=n)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,i=this.doc.getLine(t),n=i.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r){this.moveCursorTo(r.end.row,r.end.column);return}if(this.session.nonTokenRe.exec(n)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=i.substring(e)),e>=i.length){this.moveCursorTo(t,i.length),this.moveCursorRight(),t0&&this.moveCursorWordLeft();return}this.session.tokenRe.exec(r)&&(e-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,e)},this.$shortWordEndIndex=function(t){var e=0,i,n=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))e=this.session.tokenRe.lastIndex;else{for(;(i=t[e])&&n.test(i);)e++;if(e<1){for(r.lastIndex=0;(i=t[e])&&!r.test(i);)if(r.lastIndex=0,e++,n.test(i))if(e>2){e--;break}else{for(;(i=t[e])&&n.test(i);)e++;if(e>2)break}}}return r.lastIndex=0,e},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,i=this.doc.getLine(t),n=i.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==i.length){var s=this.doc.getLength();do t++,n=this.doc.getLine(t);while(t0&&/^\s*$/.test(n));e=n.length,/\s+$/.test(n)||(n="")}var r=b.stringReverse(n),s=this.$shortWordEndIndex(r);return this.moveCursorTo(t,e-s)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var i=this.session.documentToScreenPosition(this.lead.row,this.lead.column),n;if(e===0&&(t!==0&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),t!=0&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];t<0?t-=r.rowsAbove||0:t>0&&(t+=r.rowCount-(r.rowsAbove||0))}var s=this.session.screenToDocumentPosition(i.row+t,i.column,n);t!==0&&e===0&&s.row===this.lead.row&&(s.column,this.lead.column),this.moveCursorTo(s.row,s.column+e,e===0)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,i){var n=this.session.getFoldAt(t,e,1);n&&(t=n.start.row,e=n.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e=e-1:e=e+1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,i||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,i){var n=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(n.row,n.column,i)},this.detach=function(){this.lead.detach(),this.anchor.detach()},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var i=this.getCursor();return o.fromPoints(e,i)}catch{return o.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(e){var i=e.clone();return i.isBackwards=e.cursor==e.start,i});else{var t=this.getRange();t.isBackwards=this.isBackwards()}return t},this.fromJSON=function(t){if(t.start==null)if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var i=o.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(i.cursor=i.start),this.addRange(i,!0)}return}else t=t[0];this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),$.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(y,$,R){var g=y("./config"),b=2e3,h=function(o){this.states=o,this.regExps={},this.matchMappings={};for(var a in this.states){for(var t=this.states[a],e=[],i=0,n=this.matchMappings[a]={defaultToken:"text"},r="g",s=[],c=0;c1?m.onMatch=this.$applyToken:m.onMatch=m.token),S>1&&(/\\\d/.test(m.regex)?w=m.regex.replace(/\\([0-9]+)/g,function(C,u){return"\\"+(parseInt(u,10)+i+1)}):(S=1,w=this.removeCapturingGroups(m.regex)),!m.splitRegex&&typeof m.token!="string"&&s.push(m)),n[i]=c,i+=S,e.push(w),m.onMatch||(m.onMatch=null)}}e.length||(n[0]=0,e.push("$")),s.forEach(function(C){C.splitRegex=this.createSplitterRegexp(C.regex,r)},this),this.regExps[a]=new RegExp("("+e.join(")|(")+")|($)",r)}};(function(){this.$setMaxTokenCount=function(o){b=o|0},this.$applyToken=function(o){var a=this.splitRegex.exec(o).slice(1),t=this.token.apply(this,a);if(typeof t=="string")return[{type:t,value:o}];for(var e=[],i=0,n=t.length;im){var v=o.substring(m,k-p.length);S.type==C?S.value+=v:(S.type&&c.push(S),S={type:C,value:v})}for(var d=0;db){for(w>2*o.length&&this.reportError("infinite loop with in ace tokenizer",{startState:a,line:o});m1&&t[0]!==e&&t.unshift("#tmp",e),{tokens:c,state:t.length?t:e}},this.reportError=g.reportError}).call(h.prototype),$.Tokenizer=h}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(y,$,R){var g=y("../lib/lang"),b=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,t){if(!t){for(var e in a)this.$rules[e]=a[e];return}for(var e in a){for(var i=a[e],n=0;n=this.$rowTokens.length;){if(this.$row+=1,h||(h=this.$session.getLength()),this.$row>=h)return this.$row=h-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var h=this.$rowTokens,o=this.$tokenIndex,a=h[o].start;if(a!==void 0)return a;for(a=0;o>0;)o-=1,a+=h[o].value.length;return a},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var h=this.$rowTokens[this.$tokenIndex],o=this.getCurrentTokenColumn();return new g(this.$row,o,this.$row,o+h.value.length)}}).call(b.prototype),$.TokenIterator=b}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(y,$,R){var g=y("../../lib/oop"),b=y("../behaviour").Behaviour,h=y("../../token_iterator").TokenIterator,o=y("../../lib/lang"),a=["text","paren.rparen","rparen","paren","punctuation.operator"],t=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],e,i={},n={'"':'"',"'":"'"},r=function(m){var w=-1;if(m.multiSelect&&(w=m.selection.index,i.rangeCount!=m.multiSelect.rangeCount&&(i={rangeCount:m.multiSelect.rangeCount})),i[w])return e=i[w];e=i[w]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},s=function(m,w,S,C){var u=m.end.row-m.start.row;return{text:S+w+C,selection:[0,m.start.column+1,u,m.end.column+(u?0:1)]}},c=function(m){this.add("braces","insertion",function(w,S,C,u,p){var k=C.getCursorPosition(),v=u.doc.getLine(k.row);if(p=="{"){r(C);var d=C.getSelectionRange(),l=u.doc.getTextRange(d);if(l!==""&&l!=="{"&&C.getWrapBehavioursEnabled())return s(d,l,"{","}");if(c.isSaneInsertion(C,u))return/[\]\}\)]/.test(v[k.column])||C.inMultiSelectMode||m&&m.braces?(c.recordAutoInsert(C,u,"}"),{text:"{}",selection:[1,1]}):(c.recordMaybeInsert(C,u,"{"),{text:"{",selection:[1,1]})}else if(p=="}"){r(C);var f=v.substring(k.column,k.column+1);if(f=="}"){var x=u.$findOpeningBracket("}",{column:k.column+1,row:k.row});if(x!==null&&c.isAutoInsertedClosing(k,v,p))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else if(p==` `||p==`\r `){r(C);var A="";c.isMaybeInsertedClosing(k,v)&&(A=o.stringRepeat("}",e.maybeInsertedBrackets),c.clearMaybeInsertedClosing());var f=v.substring(k.column,k.column+1);if(f==="}"){var _=u.findMatchingBracket({row:k.row,column:k.column+1},"}");if(!_)return null;var L=this.$getIndent(u.getLine(_.row))}else if(A)var L=this.$getIndent(v);else{c.clearMaybeInsertedClosing();return}var T=L+u.getTabString();return{text:` `+T+` `+L+A,selection:[1,T.length,1,T.length]}}else c.clearMaybeInsertedClosing()}),this.add("braces","deletion",function(w,S,C,u,p){var k=u.doc.getTextRange(p);if(!p.isMultiLine()&&k=="{"){r(C);var v=u.doc.getLine(p.start.row),d=v.substring(p.end.column,p.end.column+1);if(d=="}")return p.end.column++,p;e.maybeInsertedBrackets--}}),this.add("parens","insertion",function(w,S,C,u,p){if(p=="("){r(C);var k=C.getSelectionRange(),v=u.doc.getTextRange(k);if(v!==""&&C.getWrapBehavioursEnabled())return s(k,v,"(",")");if(c.isSaneInsertion(C,u))return c.recordAutoInsert(C,u,")"),{text:"()",selection:[1,1]}}else if(p==")"){r(C);var d=C.getCursorPosition(),l=u.doc.getLine(d.row),f=l.substring(d.column,d.column+1);if(f==")"){var x=u.$findOpeningBracket(")",{column:d.column+1,row:d.row});if(x!==null&&c.isAutoInsertedClosing(d,l,p))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(w,S,C,u,p){var k=u.doc.getTextRange(p);if(!p.isMultiLine()&&k=="("){r(C);var v=u.doc.getLine(p.start.row),d=v.substring(p.start.column+1,p.start.column+2);if(d==")")return p.end.column++,p}}),this.add("brackets","insertion",function(w,S,C,u,p){if(p=="["){r(C);var k=C.getSelectionRange(),v=u.doc.getTextRange(k);if(v!==""&&C.getWrapBehavioursEnabled())return s(k,v,"[","]");if(c.isSaneInsertion(C,u))return c.recordAutoInsert(C,u,"]"),{text:"[]",selection:[1,1]}}else if(p=="]"){r(C);var d=C.getCursorPosition(),l=u.doc.getLine(d.row),f=l.substring(d.column,d.column+1);if(f=="]"){var x=u.$findOpeningBracket("]",{column:d.column+1,row:d.row});if(x!==null&&c.isAutoInsertedClosing(d,l,p))return c.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(w,S,C,u,p){var k=u.doc.getTextRange(p);if(!p.isMultiLine()&&k=="["){r(C);var v=u.doc.getLine(p.start.row),d=v.substring(p.start.column+1,p.start.column+2);if(d=="]")return p.end.column++,p}}),this.add("string_dquotes","insertion",function(w,S,C,u,p){var k=u.$mode.$quotes||n;if(p.length==1&&k[p]){if(this.lineCommentStart&&this.lineCommentStart.indexOf(p)!=-1)return;r(C);var v=p,d=C.getSelectionRange(),l=u.doc.getTextRange(d);if(l!==""&&(l.length!=1||!k[l])&&C.getWrapBehavioursEnabled())return s(d,l,v,v);if(!l){var f=C.getCursorPosition(),x=u.doc.getLine(f.row),A=x.substring(f.column-1,f.column),_=x.substring(f.column,f.column+1),L=u.getTokenAt(f.row,f.column),T=u.getTokenAt(f.row,f.column+1);if(A=="\\"&&L&&/escape/.test(L.type))return null;var F=L&&/string|escape/.test(L.type),O=!T||/string|escape/.test(T.type),B;if(_==v)B=F!==O,B&&/string\.end/.test(T.type)&&(B=!1);else{if(F&&!O||F&&O)return null;var W=u.$mode.tokenRe;W.lastIndex=0;var N=W.test(A);W.lastIndex=0;var z=W.test(A);if(N||z||_&&!/[\s;,.})\]\\]/.test(_))return null;var D=x[f.column-2];if(A==v&&(D==v||W.test(D)))return null;B=!0}return{text:B?v+v:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(w,S,C,u,p){var k=u.$mode.$quotes||n,v=u.doc.getTextRange(p);if(!p.isMultiLine()&&k.hasOwnProperty(v)){r(C);var d=u.doc.getLine(p.start.row),l=d.substring(p.start.column+1,p.start.column+2);if(l==v)return p.end.column++,p}})};c.isSaneInsertion=function(m,w){var S=m.getCursorPosition(),C=new h(w,S.row,S.column);if(!this.$matchTokenType(C.getCurrentToken()||"text",a)){if(/[)}\]]/.test(m.session.getLine(S.row)[S.column]))return!0;var u=new h(w,S.row,S.column+1);if(!this.$matchTokenType(u.getCurrentToken()||"text",a))return!1}return C.stepForward(),C.getCurrentTokenRow()!==S.row||this.$matchTokenType(C.getCurrentToken()||"text",t)},c.$matchTokenType=function(m,w){return w.indexOf(m.type||m)>-1},c.recordAutoInsert=function(m,w,S){var C=m.getCursorPosition(),u=w.doc.getLine(C.row);this.isAutoInsertedClosing(C,u,e.autoInsertedLineEnd[0])||(e.autoInsertedBrackets=0),e.autoInsertedRow=C.row,e.autoInsertedLineEnd=S+u.substr(C.column),e.autoInsertedBrackets++},c.recordMaybeInsert=function(m,w,S){var C=m.getCursorPosition(),u=w.doc.getLine(C.row);this.isMaybeInsertedClosing(C,u)||(e.maybeInsertedBrackets=0),e.maybeInsertedRow=C.row,e.maybeInsertedLineStart=u.substr(0,C.column)+S,e.maybeInsertedLineEnd=u.substr(C.column),e.maybeInsertedBrackets++},c.isAutoInsertedClosing=function(m,w,S){return e.autoInsertedBrackets>0&&m.row===e.autoInsertedRow&&S===e.autoInsertedLineEnd[0]&&w.substr(m.column)===e.autoInsertedLineEnd},c.isMaybeInsertedClosing=function(m,w){return e.maybeInsertedBrackets>0&&m.row===e.maybeInsertedRow&&w.substr(m.column)===e.maybeInsertedLineEnd&&w.substr(0,m.column)==e.maybeInsertedLineStart},c.popAutoInsertedClosing=function(){e.autoInsertedLineEnd=e.autoInsertedLineEnd.substr(1),e.autoInsertedBrackets--},c.clearMaybeInsertedClosing=function(){e&&(e.maybeInsertedBrackets=0,e.maybeInsertedRow=-1)},g.inherits(c,b),$.CstyleBehaviour=c}),ace.define("ace/unicode",["require","exports","module"],function(y,$,R){for(var g=[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],b=0,h=[],o=0;o2?U%p!=p-1:U%p==0}}else{if(!this.blockComment)return!1;var v=this.blockComment.start,d=this.blockComment.end,l=new RegExp("^(\\s*)(?:"+t.escapeRegExp(v)+")"),f=new RegExp("(?:"+t.escapeRegExp(d)+")\\s*$"),x=function(B,W){_(B,W)||(!S||/\S/.test(B))&&(w.insertInLine({row:W,column:B.length},d),w.insertInLine({row:W,column:u},v))},A=function(B,W){var N;(N=B.match(f))&&w.removeInLine(W,B.length-N[0].length,B.length),(N=B.match(l))&&w.removeInLine(W,N[1].length,N[0].length)},_=function(B,W){if(l.test(B))return!0;for(var N=s.getTokens(W),z=0;zB.length&&(O=B.length)}),u==1/0&&(u=O,S=!1,C=!1),k&&u%p!=0&&(u=Math.floor(u/p)*p),F(C?A:x)},this.toggleBlockComment=function(r,s,c,m){var w=this.blockComment;if(!!w){!w.start&&w[0]&&(w=w[0]);var S=new e(s,m.row,m.column),C=S.getCurrentToken();s.selection;var u=s.selection.toOrientedRange(),p,k;if(C&&/comment/.test(C.type)){for(var v,d;C&&/comment/.test(C.type);){var l=C.value.indexOf(w.start);if(l!=-1){var f=S.getCurrentTokenRow(),x=S.getCurrentTokenColumn()+l;v=new i(f,x,f,x+w.start.length);break}C=S.stepBackward()}for(var S=new e(s,m.row,m.column),C=S.getCurrentToken();C&&/comment/.test(C.type);){var l=C.value.indexOf(w.end);if(l!=-1){var f=S.getCurrentTokenRow(),x=S.getCurrentTokenColumn()+l;d=new i(f,x,f,x+w.end.length);break}C=S.stepForward()}d&&s.remove(d),v&&(s.remove(v),p=v.start.row,k=-w.start.length)}else k=w.start.length,p=c.start.row,s.insert(c.end,w.end),s.insert(c.start,w.start);u.start.row==p&&(u.start.column+=k),u.end.row==p&&(u.end.column+=k),s.selection.fromOrientedRange(u)}},this.getNextLineIndent=function(r,s,c){return this.$getIndent(s)},this.checkOutdent=function(r,s,c){return!1},this.autoOutdent=function(r,s,c){},this.$getIndent=function(r){return r.match(/^\s*/)[0]},this.createWorker=function(r){return null},this.createModeDelegates=function(r){this.$embeds=[],this.$modes={};for(var s in r)if(r[s]){var c=r[s],m=c.prototype.$id,w=g.$modes[m];w||(g.$modes[m]=w=new c),g.$modes[s]||(g.$modes[s]=w),this.$embeds.push(s),this.$modes[s]=w}for(var S=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=0;s"u"?this.setPosition(a.row,a.column):this.setPosition(a,t)};(function(){g.implement(this,b),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(t){if(!(t.start.row==t.end.row&&t.start.row!=this.row)&&!(t.start.row>this.row)){var e=a(t,{row:this.row,column:this.column},this.$insertRight);this.setPosition(e.row,e.column,!0)}};function o(t,e,i){var n=i?t.column<=e.column:t.column=this.document.getLength()?(i.row=Math.max(0,this.document.getLength()-1),i.column=this.document.getLine(i.row).length):t<0?(i.row=0,i.column=0):(i.row=t,i.column=Math.min(this.document.getLine(i.row).length,Math.max(0,e))),e<0&&(i.column=0),i}}).call(h.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(y,$,R){var g=y("./lib/oop"),b=y("./apply_delta").applyDelta,h=y("./lib/event_emitter").EventEmitter,o=y("./range").Range,a=y("./anchor").Anchor,t=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){g.implement(this,h),this.setValue=function(e){var i=this.getLength()-1;this.remove(new o(0,0,i,this.getLine(i).length)),this.insert({row:0,column:0},e||"")},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,i){return new a(this,e,i)},"aaa".split(/a/).length===0?this.$split=function(e){return e.replace(/\r\n|\r/g,` `).split(` `)}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var i=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=i?i[1]:` `,this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return`\r `;case"unix":return` `;default:return this.$autoNewLine||` `}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){this.$newLineMode!==e&&(this.$newLineMode=e,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e==`\r `||e=="\r"||e==` `},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,i){return this.$lines.slice(e,i+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){return this.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){var i;if(e.start.row===e.end.row)i=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{i=this.getLines(e.start.row,e.end.row),i[0]=(i[0]||"").substring(e.start.column);var n=i.length-1;e.end.row-e.start.row==n&&(i[n]=i[n].substring(0,e.end.column))}return i},this.insertLines=function(e,i){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,i)},this.removeLines=function(e,i){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,i)},this.insertNewLine=function(e){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,i){return this.getLength()<=1&&this.$detectNewLine(i),this.insertMergedLines(e,this.$split(i))},this.insertInLine=function(e,i){var n=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+i.length);return this.applyDelta({start:n,end:r,action:"insert",lines:[i]},!0),this.clonePos(r)},this.clippedPos=function(e,i){var n=this.getLength();e===void 0?e=n:e<0?e=0:e>=n&&(e=n-1,i=void 0);var r=this.getLine(e);return i==null&&(i=r.length),i=Math.min(Math.max(i,0),r.length),{row:e,column:i}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,i){return{row:e,column:i}},this.$clipPosition=function(e){var i=this.getLength();return e.row>=i?(e.row=Math.max(0,i-1),e.column=this.getLine(i-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,i){e=Math.min(Math.max(e,0),this.getLength());var n=0;e0,r=i=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,i){if(e instanceof o||(e=o.fromPoints(e.start,e.end)),i.length===0&&e.isEmpty())return e.start;if(i==this.getTextRange(e))return e.end;this.remove(e);var n;return i?n=this.insert(e.start,i):n=e.start,n},this.applyDeltas=function(e){for(var i=0;i=0;i--)this.revertDelta(e[i])},this.applyDelta=function(e,i){var n=e.action=="insert";(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))||(n&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(b(this.$lines,e,i),this._signal("change",e)))},this.$safeApplyDelta=function(e){var i=this.$lines.length;(e.action=="remove"&&e.start.row20){t.running=setTimeout(t.$worker,20);break}}t.currentLine=i,n==-1&&(n=i),s<=n&&t.fireUpdateEvent(s,n)}}};(function(){g.implement(this,b),this.setTokenizer=function(o){this.tokenizer=o,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(o){this.doc=o,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(o,a){var t={first:o,last:a};this._signal("update",{data:t})},this.start=function(o){this.currentLine=Math.min(o||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)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(o){var a=o.start.row,t=o.end.row-a;if(t===0)this.lines[a]=null;else if(o.action=="remove")this.lines.splice(a,t+1,null),this.states.splice(a,t+1,null);else{var e=Array(t+1);e.unshift(a,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(a,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(o){return this.lines[o]||this.$tokenizeRow(o)},this.getState=function(o){return this.currentLine==o&&this.$tokenizeRow(o),this.states[o]||"start"},this.$tokenizeRow=function(o){var a=this.doc.getLine(o),t=this.states[o-1],e=this.tokenizer.getLineTokens(a,t,o);return this.states[o]+""!=e.state+""?(this.states[o]=e.state,this.lines[o+1]=null,this.currentLine>o+1&&(this.currentLine=o+1)):this.currentLine==o&&(this.currentLine=o+1),this.lines[o]=e.tokens},this.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()}}).call(h.prototype),$.BackgroundTokenizer=h}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(y,$,R){var g=y("./lib/lang");y("./lib/oop");var b=y("./range").Range,h=function(o,a,t){this.setRegexp(o),this.clazz=a,this.type=t||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(o){this.regExp+""!=o+""&&(this.regExp=o,this.cache=[])},this.update=function(o,a,t,e){if(!!this.regExp)for(var i=e.firstRow,n=e.lastRow,r={},s=i;s<=n;s++){var c=this.cache[s];c==null&&(c=g.getMatchOffsets(t.getLine(s),this.regExp),c.length>this.MAX_RANGES&&(c=c.slice(0,this.MAX_RANGES)),c=c.map(function(C){return new b(s,C.offset,s,C.offset+C.length)}),this.cache[s]=c.length?c:"");for(var m=c.length;m--;){var w=c[m].toScreenRange(t),S=w.toString();r[S]||(r[S]=!0,a.drawSingleLineMarker(o,w,this.clazz,e))}}}}).call(h.prototype),$.SearchHighlight=h}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(y,$,R){var g=y("../range").Range;function b(h,o){this.foldData=h,Array.isArray(o)?this.folds=o:o=this.folds=[o];var a=o[o.length-1];this.range=new g(o[0].start.row,o[0].start.column,a.end.row,a.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}(function(){this.shiftRow=function(h){this.start.row+=h,this.end.row+=h,this.folds.forEach(function(o){o.start.row+=h,o.end.row+=h})},this.addFold=function(h){if(h.sameRow){if(h.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(h),this.folds.sort(function(o,a){return-o.range.compareEnd(a.start.row,a.start.column)}),this.range.compareEnd(h.start.row,h.start.column)>0?(this.end.row=h.end.row,this.end.column=h.end.column):this.range.compareStart(h.end.row,h.end.column)<0&&(this.start.row=h.start.row,this.start.column=h.start.column)}else if(h.start.row==this.end.row)this.folds.push(h),this.end.row=h.end.row,this.end.column=h.end.column;else if(h.end.row==this.start.row)this.folds.unshift(h),this.start.row=h.start.row,this.start.column=h.start.column;else throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");h.foldLine=this},this.containsRow=function(h){return h>=this.start.row&&h<=this.end.row},this.walk=function(h,o,a){var t=0,e=this.folds,i,n,r,s=!0;o==null&&(o=this.end.row,a=this.end.column);for(var c=0;c0)){var s=b(o,n.start);return r===0?a&&s!==0?-i-2:i:s>0||s===0&&!a?i:-i-1}}return-i-1},this.add=function(o){var a=!o.isEmpty(),t=this.pointIndex(o.start,a);t<0&&(t=-t-1);var e=this.pointIndex(o.end,a,t);return e<0?e=-e-1:e++,this.ranges.splice(t,e-t,o)},this.addList=function(o){for(var a=[],t=o.length;t--;)a.push.apply(a,this.add(o[t]));return a},this.substractPoint=function(o){var a=this.pointIndex(o);if(a>=0)return this.ranges.splice(a,1)},this.merge=function(){var o=[],a=this.ranges;a=a.sort(function(r,s){return b(r.start,s.start)});for(var t=a[0],e,i=1;i=0},this.containsPoint=function(o){return this.pointIndex(o)>=0},this.rangeAtPoint=function(o){var a=this.pointIndex(o);if(a>=0)return this.ranges[a]},this.clipRows=function(o,a){var t=this.ranges;if(t[0].start.row>a||t[t.length-1].start.row=e)break}if(o.action=="insert")for(var m=i-e,w=-a.column+t.column;re)break;if(c.start.row==e&&c.start.column>=a.column&&(c.start.column==a.column&&this.$bias<=0||(c.start.column+=w,c.start.row+=m)),c.end.row==e&&c.end.column>=a.column){if(c.end.column==a.column&&this.$bias<0)continue;c.end.column==a.column&&w>0&&rc.start.column&&c.end.column==n[r+1].start.column&&(c.end.column-=w),c.end.column+=w,c.end.row+=m}}else for(var m=e-i,w=a.column-t.column;ri)break;c.end.rowa.column)&&(c.end.column=a.column,c.end.row=a.row):(c.end.column+=w,c.end.row+=m):c.end.row>i&&(c.end.row+=m),c.start.rowa.column)&&(c.start.column=a.column,c.start.row=a.row):(c.start.column+=w,c.start.row+=m):c.start.row>i&&(c.start.row+=m)}if(m!=0&&r=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var i=this.$foldData,n=0;for(e&&(n=i.indexOf(e)),n==-1&&(n=0),n;n=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var i=this.$foldData,n=e-t+1,r=0;r=e){m=t?n-=e-m:n=0);break}else c>=t&&(m>=t?n-=c-m:n-=c-t+1)}return n},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(e,i){return e.start.row-i.start.row}),t},this.addFold=function(t,e){var i=this.$foldData,n=!1,r;t instanceof h?r=t:(r=new h(e,t),r.collapseChildren=e.collapseChildren),this.$clipRangeToDocument(r.range);var s=r.start.row,c=r.start.column,m=r.end.row,w=r.end.column,S=this.getFoldAt(s,c,1),C=this.getFoldAt(m,w,-1);if(S&&C==S)return S.addSubFold(r);S&&!S.range.isStart(s,c)&&this.removeFold(S),C&&!C.range.isEnd(m,w)&&this.removeFold(C);var u=this.getFoldsInRange(r.range);u.length>0&&(this.removeFolds(u),r.collapseChildren||u.forEach(function(d){r.addSubFold(d)}));for(var p=0;p0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(e){this.expandFold(e)},this)},this.unfold=function(t,e){var i,n;if(t==null)i=new g(0,0,this.getLength(),0),e==null&&(e=!0);else if(typeof t=="number")i=new g(t,0,t,this.getLine(t).length);else if("row"in t)i=g.fromPoints(t,t);else{if(Array.isArray(t))return n=[],t.forEach(function(s){n=n.concat(this.unfold(s))},this),n;i=t}n=this.getFoldsInRangeList(i);for(var r=n;n.length==1&&g.comparePoints(n[0].start,i.start)<0&&g.comparePoints(n[0].end,i.end)>0;)this.expandFolds(n),n=this.getFoldsInRangeList(i);if(e!=!1?this.removeFolds(n):this.expandFolds(n),r.length)return r},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var i=this.getFoldLine(t,e);return i?i.end.row:t},this.getRowFoldStart=function(t,e){var i=this.getFoldLine(t,e);return i?i.start.row:t},this.getFoldDisplayLine=function(t,e,i,n,r){n==null&&(n=t.start.row),r==null&&(r=0),e==null&&(e=t.end.row),i==null&&(i=this.getLine(e).length);var s=this.doc,c="";return t.walk(function(m,w,S,C){if(!(ww)break;while(r&&c.test(r.type)&&!/^comment.start/.test(r.type));r=n.stepBackward()}else r=n.getCurrentToken();return m.end.row=n.getCurrentTokenRow(),m.end.column=n.getCurrentTokenColumn(),/^comment.end/.test(r.type)||(m.end.column+=r.value.length-2),m}},this.foldAll=function(t,e,i,n){i==null&&(i=1e5);var r=this.foldWidgets;if(!!r){e=e||this.getLength(),t=t||0;for(var s=t;s=t&&(s=c.end.row,c.collapseChildren=i,this.addFold("...",c))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(e){for(var i=t.getTokens(e),n=0;n=0;){var s=i[n];if(s==null&&(s=i[n]=this.getFoldWidget(n)),s=="start"){var c=this.getFoldWidgetRange(n);if(r||(r=c),c&&c.end.row>=t)break}n--}return{range:n!==-1&&c,firstRange:r}},this.onFoldWidgetClick=function(t,e){e=e.domEvent;var i={children:e.shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey},n=this.$toggleFoldWidget(t,i);if(!n){var r=e.target||e.srcElement;r&&/ace_fold-widget/.test(r.className)&&(r.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(!!this.getFoldWidget){var i=this.getFoldWidget(t),n=this.getLine(t),r=i==="end"?-1:1,s=this.getFoldAt(t,r===-1?0:n.length,r);if(s)return e.children||e.all?this.removeFold(s):this.expandFold(s),s;var c=this.getFoldWidgetRange(t,!0);if(c&&!c.isMultiLine()&&(s=this.getFoldAt(c.start.row,c.start.column,1),s&&c.isEqual(s.range)))return this.removeFold(s),s;if(e.siblings){var m=this.getParentFoldRangeData(t);if(m.range)var w=m.range.start.row+1,S=m.range.end.row;this.foldAll(w,S,e.all?1e4:0)}else e.children?(S=c?c.end.row:this.getLength(),this.foldAll(t+1,S,e.all?1e4:0)):c&&(e.all&&(c.collapseChildren=1e4),this.addFold("...",c));return c}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var i=this.$toggleFoldWidget(e,{});if(!i){var n=this.getParentFoldRangeData(e,!0);if(i=n.range||n.firstRange,i){e=i.start.row;var r=this.getFoldAt(e,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",i)}}},this.updateFoldWidgets=function(t){var e=t.start.row,i=t.end.row-e;if(i===0)this.foldWidgets[e]=null;else if(t.action=="remove")this.foldWidgets.splice(e,i+1,null);else{var n=Array(i+1);n.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}$.Folding=a}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(y,$,R){var g=y("../token_iterator").TokenIterator,b=y("../range").Range;function h(){this.findMatchingBracket=function(o,a){if(o.column==0)return null;var t=a||this.getLine(o.row).charAt(o.column-1);if(t=="")return null;var e=t.match(/([\(\[\{])|([\)\]\}])/);return e?e[1]?this.$findClosingBracket(e[1],o):this.$findOpeningBracket(e[2],o):null},this.getBracketRange=function(o){var a=this.getLine(o.row),t=!0,e,i=a.charAt(o.column-1),n=i&&i.match(/([\(\[\{])|([\)\]\}])/);if(n||(i=a.charAt(o.column),o={row:o.row,column:o.column+1},n=i&&i.match(/([\(\[\{])|([\)\]\}])/),t=!1),!n)return null;if(n[1]){var r=this.$findClosingBracket(n[1],o);if(!r)return null;e=b.fromPoints(o,r),t||(e.end.column++,e.start.column--),e.cursor=e.end}else{var r=this.$findOpeningBracket(n[2],o);if(!r)return null;e=b.fromPoints(r,o),t||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(o,a){var t=this.getLine(o.row),e=/([\(\[\{])|([\)\]\}])/,i=!a&&t.charAt(o.column-1),n=i&&i.match(e);if(n||(i=(a===void 0||a)&&t.charAt(o.column),o={row:o.row,column:o.column+1},n=i&&i.match(e)),!n)return null;var r=new b(o.row,o.column-1,o.row,o.column),s=n[1]?this.$findClosingBracket(n[1],o):this.$findOpeningBracket(n[2],o);if(!s)return[r];var c=new b(s.row,s.column,s.row,s.column+1);return[r,c]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(o,a,t){var e=this.$brackets[o],i=1,n=new g(this,a.row,a.column),r=n.getCurrentToken();if(r||(r=n.stepForward()),!!r){t||(t=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var s=a.column-n.getCurrentTokenColumn()-2,c=r.value;;){for(;s>=0;){var m=c.charAt(s);if(m==e){if(i-=1,i==0)return{row:n.getCurrentTokenRow(),column:s+n.getCurrentTokenColumn()}}else m==o&&(i+=1);s-=1}do r=n.stepBackward();while(r&&!t.test(r.type));if(r==null)break;c=r.value,s=c.length-1}return null}},this.$findClosingBracket=function(o,a,t){var e=this.$brackets[o],i=1,n=new g(this,a.row,a.column),r=n.getCurrentToken();if(r||(r=n.stepForward()),!!r){t||(t=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var s=a.column-n.getCurrentTokenColumn();;){for(var c=r.value,m=c.length;s"?e=!0:a.type.indexOf("tag-name")!==-1&&(t=!0));while(a&&!t);return a},this.$findClosingTag=function(o,a){var t,e=a.value,i=a.value,n=0,r=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);a=o.stepForward();var s=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+a.value.length),c=!1;do if(t=a,a=o.stepForward(),a){if(a.value===">"&&!c){var m=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);c=!0}if(a.type.indexOf("tag-name")!==-1){if(e=a.value,i===e){if(t.value==="<")n++;else if(t.value==="")var C=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);else return}}}else if(i===e&&a.value==="/>"&&(n--,n<0))var w=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+2),S=w,C=S,m=new b(s.end.row,s.end.column,s.end.row,s.end.column+1)}while(a&&n>=0);if(r&&m&&w&&C&&s&&S)return{openTag:new b(r.start.row,r.start.column,m.end.row,m.end.column),closeTag:new b(w.start.row,w.start.column,C.end.row,C.end.column),openTagName:s,closeTagName:S}},this.$findOpeningTag=function(o,a){var t=o.getCurrentToken(),e=a.value,i=0,n=o.getCurrentTokenRow(),r=o.getCurrentTokenColumn(),s=r+2,c=new b(n,r,n,s);o.stepForward();var m=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+a.value.length);if(a=o.stepForward(),!(!a||a.value!==">")){var w=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);o.stepBackward(),o.stepBackward();do if(a=t,n=o.getCurrentTokenRow(),r=o.getCurrentTokenColumn(),s=r+a.value.length,t=o.stepBackward(),a){if(a.type.indexOf("tag-name")!==-1){if(e===a.value)if(t.value==="<"){if(i++,i>0){var S=new b(n,r,n,s),C=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1);do a=o.stepForward();while(a&&a.value!==">");var u=new b(o.getCurrentTokenRow(),o.getCurrentTokenColumn(),o.getCurrentTokenRow(),o.getCurrentTokenColumn()+1)}}else t.value===""){for(var p=0,k=t;k;){if(k.type.indexOf("tag-name")!==-1&&k.value===e){i--;break}else if(k.value==="<")break;k=o.stepBackward(),p++}for(var v=0;vx&&(this.$docRowCache.splice(x,f),this.$screenRowCache.splice(x,f))},this.$getRowCacheIndex=function(l,f){for(var x=0,A=l.length-1;x<=A;){var _=x+A>>1,L=l[_];if(f>L)x=_+1;else if(f=f));L++);return A=x[L],A?(A.index=L,A.start=_-A.value.length,A):null},this.setUndoManager=function(l){if(this.$undoManager=l,this.$informUndoManager&&this.$informUndoManager.cancel(),l){var f=this;l.addSession(this),this.$syncInformUndoManager=function(){f.$informUndoManager.cancel(),f.mergeUndoDeltas=!1},this.$informUndoManager=b.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?b.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(l){this.setOption("useSoftTabs",l)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(l){this.setOption("tabSize",l)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(l){return this.$useSoftTabs&&l.column%this.$tabSize===0},this.setNavigateWithinSoftTabs=function(l){this.setOption("navigateWithinSoftTabs",l)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(l){this.setOption("overwrite",l)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(l,f){this.$decorations[l]||(this.$decorations[l]=""),this.$decorations[l]+=" "+f,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(l,f){this.$decorations[l]=(this.$decorations[l]||"").replace(" "+f,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(l){this.$breakpoints=[];for(var f=0;f0&&(A=!!x.charAt(f-1).match(this.tokenRe)),A||(A=!!x.charAt(f).match(this.tokenRe)),A)var _=this.tokenRe;else if(/^\s+$/.test(x.slice(f-1,f+1)))var _=/\s/;else var _=this.nonTokenRe;var L=f;if(L>0){do L--;while(L>=0&&x.charAt(L).match(_));L++}for(var T=f;Tl&&(l=f.screenWidth)}),this.lineWidgetWidth=l},this.$computeWidth=function(l){if(this.$modified||l){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var f=this.doc.getAllLines(),x=this.$rowLengthCache,A=0,_=0,L=this.$foldData[_],T=L?L.start.row:1/0,F=f.length,O=0;OT){if(O=L.end.row+1,O>=F)break;L=this.$foldData[_++],T=L?L.start.row:1/0}x[O]==null&&(x[O]=this.$getStringScreenWidth(f[O])[0]),x[O]>A&&(A=x[O])}this.screenWidth=A}},this.getLine=function(l){return this.doc.getLine(l)},this.getLines=function(l,f){return this.doc.getLines(l,f)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(l){return this.doc.getTextRange(l||this.selection.getRange())},this.insert=function(l,f){return this.doc.insert(l,f)},this.remove=function(l){return this.doc.remove(l)},this.removeFullLines=function(l,f){return this.doc.removeFullLines(l,f)},this.undoChanges=function(l,f){if(!!l.length){this.$fromUndo=!0;for(var x=l.length-1;x!=-1;x--){var A=l[x];A.action=="insert"||A.action=="remove"?this.doc.revertDelta(A):A.folds&&this.addFolds(A.folds)}!f&&this.$undoSelect&&(l.selectionBefore?this.selection.fromJSON(l.selectionBefore):this.selection.setRange(this.$getUndoSelection(l,!0))),this.$fromUndo=!1}},this.redoChanges=function(l,f){if(!!l.length){this.$fromUndo=!0;for(var x=0;xl.end.column&&(L.start.column+=F),L.end.row==l.end.row&&L.end.column>l.end.column&&(L.end.column+=F)),T&&L.start.row>=l.end.row&&(L.start.row+=T,L.end.row+=T)}if(L.end=this.insert(L.start,A),_.length){var O=l.start,B=L.start,T=B.row-O.row,F=B.column-O.column;this.addFolds(_.map(function(z){return z=z.clone(),z.start.row==O.row&&(z.start.column+=F),z.end.row==O.row&&(z.end.column+=F),z.start.row+=T,z.end.row+=T,z}))}return L},this.indentRows=function(l,f,x){x=x.replace(/\t/g,this.getTabString());for(var A=l;A<=f;A++)this.doc.insertInLine({row:A,column:0},x)},this.outdentRows=function(l){for(var f=l.collapseRows(),x=new i(0,0,0,0),A=this.getTabSize(),_=f.start.row;_<=f.end.row;++_){var L=this.getLine(_);x.start.row=_,x.end.row=_;for(var T=0;T0){var A=this.getRowFoldEnd(f+x);if(A>this.doc.getLength()-1)return 0;var _=A-f}else{l=this.$clipRowToDocument(l),f=this.$clipRowToDocument(f);var _=f-l+1}var L=new i(l,0,f,Number.MAX_VALUE),T=this.getFoldsInRange(L).map(function(O){return O=O.clone(),O.start.row+=_,O.end.row+=_,O}),F=x==0?this.doc.getLines(l,f):this.doc.removeFullLines(l,f);return this.doc.insertFullLines(l+_,F),T.length&&this.addFolds(T),_},this.moveLinesUp=function(l,f){return this.$moveLines(l,f,-1)},this.moveLinesDown=function(l,f){return this.$moveLines(l,f,1)},this.duplicateLines=function(l,f){return this.$moveLines(l,f,0)},this.$clipRowToDocument=function(l){return Math.max(0,Math.min(l,this.doc.getLength()-1))},this.$clipColumnToRow=function(l,f){return f<0?0:Math.min(this.doc.getLine(l).length,f)},this.$clipPositionToDocument=function(l,f){if(f=Math.max(0,f),l<0)l=0,f=0;else{var x=this.doc.getLength();l>=x?(l=x-1,f=this.doc.getLine(x-1).length):f=Math.min(this.doc.getLine(l).length,f)}return{row:l,column:f}},this.$clipRangeToDocument=function(l){l.start.row<0?(l.start.row=0,l.start.column=0):l.start.column=this.$clipColumnToRow(l.start.row,l.start.column);var f=this.doc.getLength()-1;return l.end.row>f?(l.end.row=f,l.end.column=this.doc.getLine(f).length):l.end.column=this.$clipColumnToRow(l.end.row,l.end.column),l},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(l){if(l!=this.$useWrapMode){if(this.$useWrapMode=l,this.$modified=!0,this.$resetRowCache(0),l){var f=this.getLength();this.$wrapData=Array(f),this.$updateWrapData(0,f-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(l,f){(this.$wrapLimitRange.min!==l||this.$wrapLimitRange.max!==f)&&(this.$wrapLimitRange={min:l,max:f},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(l,f){var x=this.$wrapLimitRange;x.max<0&&(x={min:f,max:f});var A=this.$constrainWrapLimit(l,x.min,x.max);return A!=this.$wrapLimit&&A>1?(this.$wrapLimit=A,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(l,f,x){return f&&(l=Math.max(f,l)),x&&(l=Math.min(x,l)),l},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(l){this.setWrapLimitRange(l,l)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(l){var f=this.$useWrapMode,x=l.action,A=l.start,_=l.end,L=A.row,T=_.row,F=T-L,O=null;if(this.$updating=!0,F!=0)if(x==="remove"){this[f?"$wrapData":"$rowLengthCache"].splice(L,F);var B=this.$foldData;O=this.getFoldsInRange(l),this.removeFolds(O);var W=this.getFoldLine(_.row),N=0;if(W){W.addRemoveChars(_.row,_.column,A.column-_.column),W.shiftRow(-F);var z=this.getFoldLine(L);z&&z!==W&&(z.merge(W),W=z),N=B.indexOf(W)+1}for(N;N=_.row&&W.shiftRow(-F)}T=L}else{var D=Array(F);D.unshift(L,0);var P=f?this.$wrapData:this.$rowLengthCache;P.splice.apply(P,D);var B=this.$foldData,W=this.getFoldLine(L),N=0;if(W){var U=W.range.compareInside(A.row,A.column);U==0?(W=W.split(A.row,A.column),W&&(W.shiftRow(F),W.addRemoveChars(T,0,_.column-A.column))):U==-1&&(W.addRemoveChars(L,0,_.column-A.column),W.shiftRow(F)),N=B.indexOf(W)+1}for(N;N=L&&W.shiftRow(F)}}else{F=Math.abs(l.start.column-l.end.column),x==="remove"&&(O=this.getFoldsInRange(l),this.removeFolds(O),F=-F);var W=this.getFoldLine(L);W&&W.addRemoveChars(L,A.column,F)}return f&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,f?this.$updateWrapData(L,T):this.$updateRowLengthCache(L,T),O},this.$updateRowLengthCache=function(l,f,x){this.$rowLengthCache[l]=null,this.$rowLengthCache[f]=null},this.$updateWrapData=function(l,f){var x=this.doc.getAllLines(),A=this.getTabSize(),_=this.$wrapData,L=this.$wrapLimit,T,F,O=l;for(f=Math.min(f,x.length-1);O<=f;)F=this.getFoldLine(O,F),F?(T=[],F.walk(function(B,W,N,z){var D;if(B!=null){D=this.$getDisplayTokens(B,T.length),D[0]=S;for(var P=1;Pf-z;){var D=L+f-z;if(l[D-1]>=p&&l[D]>=p){N(D);continue}if(l[D]==S||l[D]==C){for(D;D!=L-1&&l[D]!=S;D--);if(D>L){N(D);continue}for(D=L+f,D;D>2)),L-1);D>P&&l[D]P&&l[D]P&&l[D]==u;)D--}else for(;D>P&&l[D]P){N(++D);continue}D=L+f,l[D]==w&&D--,N(D-z)}return A},this.$getDisplayTokens=function(l,f){var x=[],A;f=f||0;for(var _=0;_39&&L<48||L>57&&L<64?x.push(u):L>=4352&&d(L)?x.push(m,w):x.push(m)}return x},this.$getStringScreenWidth=function(l,f,x){if(f==0)return[0,0];f==null&&(f=1/0),x=x||0;var A,_;for(_=0;_=4352&&d(A)?x+=2:x+=1,!(x>f));_++);return[x,_]},this.lineWidgets=null,this.getRowLength=function(l){var f=1;return this.lineWidgets&&(f+=this.lineWidgets[l]&&this.lineWidgets[l].rowCount||0),!this.$useWrapMode||!this.$wrapData[l]?f:this.$wrapData[l].length+f},this.getRowLineCount=function(l){return!this.$useWrapMode||!this.$wrapData[l]?1:this.$wrapData[l].length+1},this.getRowWrapIndent=function(l){if(this.$useWrapMode){var f=this.screenToDocumentPosition(l,Number.MAX_VALUE),x=this.$wrapData[f.row];return x.length&&x[0]=0)var F=B[W],_=this.$docRowCache[W],z=l>B[N-1];else var z=!N;for(var D=this.getLength()-1,P=this.getNextFoldLine(_),U=P?P.start.row:1/0;F<=l&&(O=this.getRowLength(_),!(F+O>l||_>=D));)F+=O,_++,_>U&&(_=P.end.row+1,P=this.getNextFoldLine(_,P),U=P?P.start.row:1/0),z&&(this.$docRowCache.push(_),this.$screenRowCache.push(F));if(P&&P.start.row<=_)A=this.getFoldDisplayLine(P),_=P.start.row;else{if(F+O<=l||_>D)return{row:D,column:this.getLine(D).length};A=this.getLine(_),P=null}var G=0,Y=Math.floor(l-F);if(this.$useWrapMode){var j=this.$wrapData[_];j&&(T=j[Y],Y>0&&j.length&&(G=j.indent,L=j[Y-1]||j[j.length-1],A=A.substring(L)))}return x!==void 0&&this.$bidiHandler.isBidiRow(F+Y,_,Y)&&(f=this.$bidiHandler.offsetToCol(x)),L+=this.$getStringScreenWidth(A,f-G)[1],this.$useWrapMode&&L>=T&&(L=T-1),P?P.idxToPosition(L):{row:_,column:L}},this.documentToScreenPosition=function(l,f){if(typeof f>"u")var x=this.$clipPositionToDocument(l.row,l.column);else x=this.$clipPositionToDocument(l,f);l=x.row,f=x.column;var A=0,_=null,L=null;L=this.getFoldAt(l,f,1),L&&(l=L.start.row,f=L.start.column);var T,F=0,O=this.$docRowCache,B=this.$getRowCacheIndex(O,l),W=O.length;if(W&&B>=0)var F=O[B],A=this.$screenRowCache[B],N=l>O[W-1];else var N=!W;for(var z=this.getNextFoldLine(F),D=z?z.start.row:1/0;F=D){if(T=z.end.row+1,T>l)break;z=this.getNextFoldLine(T,z),D=z?z.start.row:1/0}else T=F+1;A+=this.getRowLength(F),F=T,N&&(this.$docRowCache.push(F),this.$screenRowCache.push(A))}var P="";z&&F>=D?(P=this.getFoldDisplayLine(z,l,f),_=z.start.row):(P=this.getLine(l).substring(0,f),_=l);var U=0;if(this.$useWrapMode){var G=this.$wrapData[_];if(G){for(var Y=0;P.length>=G[Y];)A++,Y++;P=P.substring(G[Y-1]||0,P.length),U=Y>0?G.indent:0}}return this.lineWidgets&&this.lineWidgets[F]&&this.lineWidgets[F].rowsAbove&&(A+=this.lineWidgets[F].rowsAbove),{row:A,column:U+this.$getStringScreenWidth(P)[0]}},this.documentToScreenColumn=function(l,f){return this.documentToScreenPosition(l,f).column},this.documentToScreenRow=function(l,f){return this.documentToScreenPosition(l,f).row},this.getScreenLength=function(){var l=0,f=null;if(this.$useWrapMode)for(var _=this.$wrapData.length,L=0,A=0,f=this.$foldData[A++],T=f?f.start.row:1/0;L<_;){var F=this.$wrapData[L];l+=F?F.length+1:1,L++,L>T&&(L=f.end.row+1,f=this.$foldData[A++],T=f?f.start.row:1/0)}else{l=this.getLength();for(var x=this.$foldData,A=0;Ax));L++);return[A,L]})},this.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()},this.isFullWidth=d;function d(l){return l<4352?!1:l>=4352&&l<=4447||l>=4515&&l<=4519||l>=4602&&l<=4607||l>=9001&&l<=9002||l>=11904&&l<=11929||l>=11931&&l<=12019||l>=12032&&l<=12245||l>=12272&&l<=12283||l>=12288&&l<=12350||l>=12353&&l<=12438||l>=12441&&l<=12543||l>=12549&&l<=12589||l>=12593&&l<=12686||l>=12688&&l<=12730||l>=12736&&l<=12771||l>=12784&&l<=12830||l>=12832&&l<=12871||l>=12880&&l<=13054||l>=13056&&l<=19903||l>=19968&&l<=42124||l>=42128&&l<=42182||l>=43360&&l<=43388||l>=44032&&l<=55203||l>=55216&&l<=55238||l>=55243&&l<=55291||l>=63744&&l<=64255||l>=65040&&l<=65049||l>=65072&&l<=65106||l>=65108&&l<=65126||l>=65128&&l<=65131||l>=65281&&l<=65376||l>=65504&&l<=65510}}.call(c.prototype),y("./edit_session/folding").Folding.call(c.prototype),y("./edit_session/bracket_match").BracketMatch.call(c.prototype),o.defineOptions(c.prototype,"session",{wrap:{set:function(m){if(!m||m=="off"?m=!1:m=="free"?m=!0:m=="printMargin"?m=-1:typeof m=="string"&&(m=parseInt(m,10)||!1),this.$wrap!=m)if(this.$wrap=m,!m)this.setUseWrapMode(!1);else{var w=typeof m=="number"?m:null;this.setWrapLimitRange(w,w),this.setUseWrapMode(!0)}},get:function(){return this.getUseWrapMode()?this.$wrap==-1?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(m){m=m=="auto"?this.$mode.type!="text":m!="text",m!=this.$wrapAsCode&&(this.$wrapAsCode=m,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(m){this.$useWorker=m,this.$stopWorker(),m&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(m){m=parseInt(m),m>0&&this.$tabSize!==m&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=m,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(m){this.setFoldStyle(m)},handlesSet:!0},overwrite:{set:function(m){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(m){this.doc.setNewLineMode(m)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(m){this.setMode(m)},get:function(){return this.$modeId},handlesSet:!0}}),$.EditSession=c}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(y,$,R){var g=y("./lib/lang"),b=y("./lib/oop"),h=y("./range").Range,o=function(){this.$options={}};(function(){this.set=function(t){return b.mixin(this.$options,t),this},this.getOptions=function(){return g.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,i=this.$matchIterator(t,e);if(!i)return!1;var n=null;return i.forEach(function(r,s,c,m){return n=new h(r,s,c,m),s==m&&e.start&&e.start.start&&e.skipCurrent!=!1&&n.isEqual(e.start)?(n=null,!1):!0}),n},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var i=e.range,n=i?t.getLines(i.start.row,i.end.row):t.doc.getAllLines(),r=[],s=e.re;if(e.$isMultiLine){var c=s.length,m=n.length-c,w;e:for(var S=s.offset||0;S<=m;S++){for(var C=0;Ck||(r.push(w=new h(S,k,S+c-1,v)),c>2&&(S=S+c-2))}}else for(var d=0;dA&&r[C].end.row==_;)C--;for(r=r.slice(d,C+1),d=0,C=r.length;d=m;k--)if(u(k,Number.MAX_VALUE,p))return;if(e.wrap!=!1){for(k=w,m=c.row;k>=m;k--)if(u(k,Number.MAX_VALUE,p))return}}};else var S=function(k){var v=c.row;if(!u(v,c.column,k)){for(v=v+1;v<=w;v++)if(u(v,0,k))return;if(e.wrap!=!1){for(v=m,w=c.row;v<=w;v++)if(u(v,0,k))return}}};if(e.$isMultiLine)var C=i.length,u=function(p,k,v){var d=n?p-C+1:p;if(!(d<0||d+C>t.getLength())){var l=t.getLine(d),f=l.search(i[0]);if(!(!n&&fk)&&v(d,f,d+C-1,A))return!0}}};else if(n)var u=function(k,v,d){var l=t.getLine(k),f=[],x,A=0;for(i.lastIndex=0;x=i.exec(l);){var _=x[0].length;if(A=x.index,!_){if(A>=l.length)break;i.lastIndex=A+=1}if(x.index+_>v)break;f.push(x.index,_)}for(var L=f.length-1;L>=0;L-=2){var T=f[L-1],_=f[L];if(d(k,T,k,T+_))return!0}};else var u=function(k,v,d){var l=t.getLine(k),f,x;for(i.lastIndex=v;x=i.exec(l);){var A=x[0].length;if(f=x.index,d(k,f,k,f+A))return!0;if(!A&&(i.lastIndex=f+=1,f>=l.length))return!1}};return{forEach:S}}}).call(o.prototype);function a(t,e){function i(n){return/\w/.test(n)||e.regExp?"\\b":""}return i(t[0])+t+i(t[t.length-1])}$.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(y,$,R){var g=y("../lib/keys"),b=y("../lib/useragent"),h=g.KEY_MODS;function o(t,e){this.platform=e||(b.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,e){o.call(this,t,e),this.$singleCommand=!1}a.prototype=o.prototype,function(){this.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},this.removeCommand=function(e,i){var n=e&&(typeof e=="string"?e:e.name);e=this.commands[n],i||delete this.commands[n];var r=this.commandKeyBinding;for(var s in r){var c=r[s];if(c==e)delete r[s];else if(Array.isArray(c)){var m=c.indexOf(e);m!=-1&&(c.splice(m,1),c.length==1&&(r[s]=c[0]))}}},this.bindKey=function(e,i,n){if(typeof e=="object"&&e&&(n==null&&(n=e.position),e=e[this.platform]),!!e){if(typeof i=="function")return this.addCommand({exec:i,bindKey:e,name:i.name||e});e.split("|").forEach(function(r){var s="";if(r.indexOf(" ")!=-1){var c=r.split(/\s+/);r=c.pop(),c.forEach(function(S){var C=this.parseKeys(S),u=h[C.hashId]+C.key;s+=(s?" ":"")+u,this._addCommandToBinding(s,"chainKeys")},this),s+=" "}var m=this.parseKeys(r),w=h[m.hashId]+m.key;this._addCommandToBinding(s+w,i,n)},this)}};function t(e){return typeof e=="object"&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}this._addCommandToBinding=function(e,i,n){var r=this.commandKeyBinding,s;if(!i)delete r[e];else if(!r[e]||this.$singleCommand)r[e]=i;else{Array.isArray(r[e])?(s=r[e].indexOf(i))!=-1&&r[e].splice(s,1):r[e]=[r[e]],typeof n!="number"&&(n=t(i));var c=r[e];for(s=0;sn)break}c.splice(s,0,i)}},this.addCommands=function(e){e&&Object.keys(e).forEach(function(i){var n=e[i];if(!!n){if(typeof n=="string")return this.bindKey(n,i);typeof n=="function"&&(n={exec:n}),typeof n=="object"&&(n.name||(n.name=i),this.addCommand(n))}},this)},this.removeCommands=function(e){Object.keys(e).forEach(function(i){this.removeCommand(e[i])},this)},this.bindKeys=function(e){Object.keys(e).forEach(function(i){this.bindKey(i,e[i])},this)},this._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},this.parseKeys=function(e){var i=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(w){return w}),n=i.pop(),r=g[n];if(g.FUNCTION_KEYS[r])n=g.FUNCTION_KEYS[r].toLowerCase();else if(i.length){if(i.length==1&&i[0]=="shift")return{key:n.toUpperCase(),hashId:-1}}else return{key:n,hashId:-1};for(var s=0,c=i.length;c--;){var m=g.KEY_MODS[i[c]];if(m==null)return typeof console<"u"&&console.error("invalid modifier "+i[c]+" in "+e),!1;s|=m}return{key:n,hashId:s}},this.findKeyCommand=function(i,n){var r=h[i]+n;return this.commandKeyBinding[r]},this.handleKeyboard=function(e,i,n,r){if(!(r<0)){var s=h[i]+n,c=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,c=this.commandKeyBinding[e.$keyChain]||c),c&&(c=="chainKeys"||c[c.length-1]=="chainKeys")?(e.$keyChain=e.$keyChain||s,{command:"null"}):(e.$keyChain&&((!i||i==4)&&n.length==1?e.$keyChain=e.$keyChain.slice(0,-s.length-1):(i==-1||r>0)&&(e.$keyChain="")),{command:c})}},this.getStatusText=function(e,i){return i.$keyChain||""}}.call(o.prototype),$.HashHandler=o,$.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(y,$,R){var g=y("../lib/oop"),b=y("../keyboard/hash_handler").MultiHashHandler,h=y("../lib/event_emitter").EventEmitter,o=function(a,t){b.call(this,t,a),this.byName=this.commands,this.setDefaultHandler("exec",function(e){return e.args?e.command.exec(e.editor,e.args,e.event,!1):e.command.exec(e.editor,{},e.event,!0)})};g.inherits(o,b),function(){g.implement(this,h),this.exec=function(a,t,e){if(Array.isArray(a)){for(var i=a.length;i--;)if(this.exec(a[i],t,e))return!0;return!1}if(typeof a=="string"&&(a=this.commands[a]),!a||t&&t.$readOnly&&!a.readOnly||this.$checkCommandState!=!1&&a.isAvailable&&!a.isAvailable(t))return!1;var n={editor:t,command:a,args:e};return n.returnValue=this._emit("exec",n),this._signal("afterExec",n),n.returnValue!==!1},this.toggleRecording=function(a){if(!this.$inReplay)return a&&a._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)},this.replay=function(a){if(!(this.$inReplay||!this.macro)){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(t){typeof t=="string"?this.exec(t,a):this.exec(t[0],a,t[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(t){return typeof t[0]!="string"&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}.call(o.prototype),$.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(y,$,R){var g=y("../lib/lang"),b=y("../config"),h=y("../range").Range;function o(t,e){return{win:t,mac:e}}$.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:o("Ctrl-,","Command-,"),exec:function(t){b.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:o("Alt-E","F4"),exec:function(t){b.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(t){b.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(t,e){typeof e=="number"&&!isNaN(e)&&t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:o("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:o("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(t){b.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty(),i=e?t.selection.getLineRange():t.selection.getRange();t._emit("cut",i),i.isEmpty()||t.session.remove(i),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(t){b.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(t){if(t.selection.isEmpty())t.remove("left");else return!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(g.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:o("Ctrl+F3","F3"),exec:function(t){t.openLink()}},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(t){for(var e=t.selection.isBackwards(),i=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),n=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),r=t.session.doc.getLine(i.row).length,s=t.session.doc.getTextRange(t.selection.getRange()),c=s.replace(/\n\s*/," ").length,m=t.session.doc.getLine(i.row),w=i.row+1;w<=n.row+1;w++){var S=g.stringTrimLeft(g.stringTrimRight(t.session.doc.getLine(w)));S.length!==0&&(S=" "+S),m+=S}n.row+10?(t.selection.moveCursorTo(i.row,i.column),t.selection.selectTo(i.row,i.column+c)):(r=t.session.doc.getLine(i.row).length>r?r+1:r,t.selection.moveCursorTo(i.row,r))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(t){var e=t.session.doc.getLength()-1,i=t.session.doc.getLine(e).length,n=t.selection.rangeList.ranges,r=[];n.length<1&&(n=[t.selection.getRange()]);for(var s=0;s=d.length&&(d=void 0),{value:d&&d[x++],done:!d}}};throw new TypeError(l?"Object is not iterable.":"Symbol.iterator is not defined.")},b=y("./lib/oop"),h=y("./lib/dom"),o=y("./lib/lang"),a=y("./lib/useragent"),t=y("./keyboard/textinput").TextInput,e=y("./mouse/mouse_handler").MouseHandler,i=y("./mouse/fold_handler").FoldHandler,n=y("./keyboard/keybinding").KeyBinding,r=y("./edit_session").EditSession,s=y("./search").Search,c=y("./range").Range,m=y("./lib/event_emitter").EventEmitter,w=y("./commands/command_manager").CommandManager,S=y("./commands/default_commands").commands,C=y("./config"),u=y("./token_iterator").TokenIterator,p=y("./clipboard"),k=function(d,l,f){this.$toDestroy=[];var x=d.getContainerElement();this.container=x,this.renderer=d,this.id="editor"+ ++k.$uid,this.commands=new w(a.isMac?"mac":"win",S),typeof document=="object"&&(this.textInput=new t(d.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new e(this),new i(this)),this.keyBinding=new n(this),this.$search=new s().set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=o.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",function(A,_){_._$emitInputEvent.schedule(31)}),this.setSession(l||f&&f.session||new r("")),C.resetOptions(this),f&&this.setOptions(f),C._signal("editor",this)};k.$uid=0,function(){b.implement(this,m),this.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=o.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)},this.curOp=null,this.prevOp={},this.startOperation=function(d){if(this.curOp){if(!d||this.curOp.command)return;this.prevOp=this.curOp}d||(this.previousCommand=null,d={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:d.command||{},args:d.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},this.endOperation=function(d){if(this.curOp&&this.session){if(d&&d.returnValue===!1||!this.session)return this.curOp=null;if(d==!0&&this.curOp.command&&this.curOp.command.name=="mouse"||(this._signal("beforeEndOperation"),!this.curOp))return;var l=this.curOp.command,f=l&&l.scrollIntoView;if(f){switch(f){case"center-animate":f="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var x=this.selection.getRange(),A=this.renderer.layerConfig;(x.start.row>=A.lastRow||x.end.row<=A.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead);break}f=="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}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(d){if(!!this.$mergeUndoDeltas){var l=this.prevOp,f=this.$mergeableCommands,x=l.command&&d.command.name==l.command.name;if(d.command.name=="insertstring"){var A=d.args;this.mergeNextCommand===void 0&&(this.mergeNextCommand=!0),x=x&&this.mergeNextCommand&&(!/\s/.test(A)||/\s/.test(l.args)),this.mergeNextCommand=!0}else x=x&&f.indexOf(d.command.name)!==-1;this.$mergeUndoDeltas!="always"&&Date.now()-this.sequenceStartTime>2e3&&(x=!1),x?this.session.mergeUndoDeltas=!0:f.indexOf(d.command.name)!==-1&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(d,l){if(d&&typeof d=="string"&&d!="ace"){this.$keybindingId=d;var f=this;C.loadModule(["keybinding",d],function(x){f.$keybindingId==d&&f.keyBinding.setKeyboardHandler(x&&x.handler),l&&l()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(d),l&&l()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(d){if(this.session!=d){this.curOp&&this.endOperation(),this.curOp={};var l=this.session;if(l){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 f=this.session.getSelection();f.off("changeCursor",this.$onCursorChange),f.off("changeSelection",this.$onSelectionChange)}this.session=d,d?(this.$onDocumentChange=this.onDocumentChange.bind(this),d.on("change",this.$onDocumentChange),this.renderer.setSession(d),this.$onChangeMode=this.onChangeMode.bind(this),d.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),d.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),d.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),d.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),d.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),d.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=d.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(d)),this._signal("changeSession",{session:d,oldSession:l}),this.curOp=null,l&&l._signal("changeEditor",{oldEditor:this}),d&&d._signal("changeEditor",{editor:this}),d&&!d.destroyed&&d.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(d,l){return this.session.doc.setValue(d),l?l==1?this.navigateFileEnd():l==-1&&this.navigateFileStart():this.selectAll(),d},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(d){this.renderer.onResize(d)},this.setTheme=function(d,l){this.renderer.setTheme(d,l)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(d){this.renderer.setStyle(d)},this.unsetStyle=function(d){this.renderer.unsetStyle(d)},this.getFontSize=function(){return this.getOption("fontSize")||h.computedStyle(this.container).fontSize},this.setFontSize=function(d){this.setOption("fontSize",d)},this.$highlightBrackets=function(){if(!this.$highlightPending){var d=this;this.$highlightPending=!0,setTimeout(function(){d.$highlightPending=!1;var l=d.session;if(!(!l||l.destroyed)){l.$bracketHighlight&&(l.$bracketHighlight.markerIds.forEach(function(B){l.removeMarker(B)}),l.$bracketHighlight=null);var f=d.getCursorPosition(),x=d.getKeyboardHandler(),A=x&&x.$getDirectionForHighlight&&x.$getDirectionForHighlight(d),_=l.getMatchingBracketRanges(f,A);if(!_){var L=new u(l,f.row,f.column),T=L.getCurrentToken();if(T&&/\b(?:tag-open|tag-name)/.test(T.type)){var F=l.getMatchingTags(f);F&&(_=[F.openTagName,F.closeTagName])}}if(!_&&l.$mode.getMatching&&(_=l.$mode.getMatching(d.session)),!_){d.getHighlightIndentGuides()&&d.renderer.$textLayer.$highlightIndentGuide();return}var O="ace_bracket";Array.isArray(_)?_.length==1&&(O="ace_error_bracket"):_=[_],_.length==2&&(c.comparePoints(_[0].end,_[1].start)==0?_=[c.fromPoints(_[0].start,_[1].end)]:c.comparePoints(_[0].start,_[1].end)==0&&(_=[c.fromPoints(_[1].start,_[0].end)])),l.$bracketHighlight={ranges:_,markerIds:_.map(function(B){return l.addMarker(B,O,"text")})},d.getHighlightIndentGuides()&&d.renderer.$textLayer.$highlightIndentGuide()}},50)}},this.focus=function(){this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(d){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",d))},this.onBlur=function(d){!this.$isFocused||(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",d))},this.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.onDocumentChange=function(d){var l=this.session.$useWrapMode,f=d.start.row==d.end.row?d.end.row:1/0;this.renderer.updateLines(d.start.row,f,l),this._signal("change",d),this.$cursorChange()},this.onTokenizerUpdate=function(d){var l=d.data;this.renderer.updateLines(l.first,l.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var d=this.getSession(),l;if(this.$highlightActiveLine&&((this.$selectionStyle!="line"||!this.selection.isMultiLine())&&(l=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(l=!1),this.renderer.$maxLines&&this.session.getLength()===1&&!(this.renderer.$minLines>1)&&(l=!1)),d.$highlightLineMarker&&!l)d.removeMarker(d.$highlightLineMarker.id),d.$highlightLineMarker=null;else if(!d.$highlightLineMarker&&l){var f=new c(l.row,l.column,l.row,1/0);f.id=d.addMarker(f,"ace_active-line","screenLine"),d.$highlightLineMarker=f}else l&&(d.$highlightLineMarker.start.row=l.row,d.$highlightLineMarker.end.row=l.row,d.$highlightLineMarker.start.column=l.column,d._signal("changeBackMarker"))},this.onSelectionChange=function(d){var l=this.session;if(l.$selectionMarker&&l.removeMarker(l.$selectionMarker),l.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var f=this.selection.getRange(),x=this.getSelectionStyle();l.$selectionMarker=l.addMarker(f,"ace_selection",x)}var A=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(A),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var d=this.session,l=this.getSelectionRange();if(!(l.isEmpty()||l.isMultiLine())){var f=l.start.column,x=l.end.column,A=d.getLine(l.start.row),_=A.substring(f,x);if(!(_.length>5e3||!/[\w\d]/.test(_))){var L=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:_}),T=A.substring(f-1,x+1);if(!!L.test(T))return L}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(d){this.renderer.updateText(),this._emit("changeMode",d)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var d=this.getSelectedText(),l=this.session.doc.getNewLineCharacter(),f=!1;if(!d&&this.$copyWithEmptySelection){f=!0;for(var x=this.selection.getAllRanges(),A=0;AB.search(/\S|$/)){var T=B.substr(A.column).search(/\S|$/);f.doc.removeInLine(A.row,A.column,A.column+T)}}this.clearSelection();var F=A.column,O=f.getState(A.row),B=f.getLine(A.row),W=x.checkOutdent(O,B,d);if(f.insert(A,d),_&&_.selection&&(_.selection.length==2?this.selection.setSelectionRange(new c(A.row,F+_.selection[0],A.row,F+_.selection[1])):this.selection.setSelectionRange(new c(A.row+_.selection[0],_.selection[1],A.row+_.selection[2],_.selection[3]))),this.$enableAutoIndent){if(f.getDocument().isNewLine(d)){var N=x.getNextLineIndent(O,B.slice(0,A.column),f.getTabString());f.insert({row:A.row+1,column:0},N)}W&&x.autoOutdent(O,f,A.row)}},this.autoIndent=function(){var d=this.session,l=d.getMode(),f,x;if(this.selection.isEmpty())f=0,x=d.doc.getLength()-1;else{var A=this.getSelectionRange();f=A.start.row,x=A.end.row}for(var _="",L="",T="",F,O,B,W=d.getTabString(),N=f;N<=x;N++)N>0&&(_=d.getState(N-1),L=d.getLine(N-1),T=l.getNextLineIndent(_,L,W)),F=d.getLine(N),O=l.$getIndent(F),T!==O&&(O.length>0&&(B=new c(N,0,N,O.length),d.remove(B)),T.length>0&&d.insert({row:N,column:0},T)),l.autoOutdent(_,d,N)},this.onTextInput=function(d,l){if(!l)return this.keyBinding.onTextInput(d);this.startOperation({command:{name:"insertstring"}});var f=this.applyComposition.bind(this,d,l);this.selection.rangeCount?this.forEachSelection(f):f(),this.endOperation()},this.applyComposition=function(d,l){if(l.extendLeft||l.extendRight){var f=this.selection.getRange();f.start.column-=l.extendLeft,f.end.column+=l.extendRight,f.start.column<0&&(f.start.row--,f.start.column+=this.session.getLine(f.start.row).length+1),this.selection.setRange(f),!d&&!f.isEmpty()&&this.remove()}if((d||!this.selection.isEmpty())&&this.insert(d,!0),l.restoreStart||l.restoreEnd){var f=this.selection.getRange();f.start.column-=l.restoreStart,f.end.column-=l.restoreEnd,this.selection.setRange(f)}},this.onCommandKey=function(d,l,f){return this.keyBinding.onCommandKey(d,l,f)},this.setOverwrite=function(d){this.session.setOverwrite(d)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(d){this.setOption("scrollSpeed",d)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(d){this.setOption("dragDelay",d)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(d){this.setOption("selectionStyle",d)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(d){this.setOption("highlightActiveLine",d)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(d){this.setOption("highlightGutterLine",d)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(d){this.setOption("highlightSelectedWord",d)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(d){this.renderer.setAnimatedScroll(d)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(d){this.renderer.setShowInvisibles(d)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(d){this.renderer.setDisplayIndentGuides(d)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setHighlightIndentGuides=function(d){this.renderer.setHighlightIndentGuides(d)},this.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},this.setShowPrintMargin=function(d){this.renderer.setShowPrintMargin(d)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(d){this.renderer.setPrintMarginColumn(d)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(d){this.setOption("readOnly",d)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(d){this.setOption("behavioursEnabled",d)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(d){this.setOption("wrapBehavioursEnabled",d)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(d){this.setOption("showFoldWidgets",d)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(d){this.setOption("fadeFoldWidgets",d)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(d){this.selection.isEmpty()&&(d=="left"?this.selection.selectLeft():this.selection.selectRight());var l=this.getSelectionRange();if(this.getBehavioursEnabled()){var f=this.session,x=f.getState(l.start.row),A=f.getMode().transformAction(x,"deletion",this,f,l);if(l.end.column===0){var _=f.getTextRange(l);if(_[_.length-1]==` `){var L=f.getLine(l.end.row);/^\s+$/.test(L)&&(l.end.column=L.length)}}A&&(l=A)}this.session.remove(l),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var d=this.getSelectionRange();d.start.column==d.end.column&&d.start.row==d.end.row&&(d.end.column=0,d.end.row++),this.session.remove(d),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var d=this.getCursorPosition();this.insert(` `),this.moveCursorToPosition(d)},this.transposeLetters=function(){if(!!this.selection.isEmpty()){var d=this.getCursorPosition(),l=d.column;if(l!==0){var f=this.session.getLine(d.row),x,A;lT.toLowerCase()?1:0});for(var A=new c(0,0,0,0),x=d.first;x<=d.last;x++){var _=l.getLine(x);A.start.row=x,A.end.row=x,A.end.column=_.length,l.replace(A,f[x-d.first])}},this.toggleCommentLines=function(){var d=this.session.getState(this.getCursorPosition().row),l=this.$getSelectedRows();this.session.getMode().toggleCommentLines(d,this.session,l.first,l.last)},this.toggleBlockComment=function(){var d=this.getCursorPosition(),l=this.session.getState(d.row),f=this.getSelectionRange();this.session.getMode().toggleBlockComment(l,this.session,f,d)},this.getNumberAt=function(d,l){var f=/[\-]?[0-9]+(?:\.[0-9]+)?/g;f.lastIndex=0;for(var x=this.session.getLine(d);f.lastIndex=l){var _={value:A[0],start:A.index,end:A.index+A[0].length};return _}}return null},this.modifyNumber=function(d){var l=this.selection.getCursor().row,f=this.selection.getCursor().column,x=new c(l,f-1,l,f),A=this.session.getTextRange(x);if(!isNaN(parseFloat(A))&&isFinite(A)){var _=this.getNumberAt(l,f);if(_){var L=_.value.indexOf(".")>=0?_.start+_.value.indexOf(".")+1:_.end,T=_.start+_.value.length-L,F=parseFloat(_.value);F*=Math.pow(10,T),L!==_.end&&f=L&&_<=T&&(f=G,F.selection.clearSelection(),F.moveCursorTo(d,L+x),F.selection.selectTo(d,T+x)),L=T});for(var O=this.$toggleWordPairs,B,W=0;W=T&&L<=F&&N.match(/((?:https?|ftp):\/\/[\S]+)/)){O=N.replace(/[\s:.,'";}\]]+$/,"");break}T=F}}catch(z){f={error:z}}finally{try{W&&!W.done&&(x=B.return)&&x.call(B)}finally{if(f)throw f.error}}return O},this.openLink=function(){var d=this.selection.getCursor(),l=this.findLinkAt(d.row,d.column);return l&&window.open(l,"_blank"),l!=null},this.removeLines=function(){var d=this.$getSelectedRows();this.session.removeFullLines(d.first,d.last),this.clearSelection()},this.duplicateSelection=function(){var d=this.selection,l=this.session,f=d.getRange(),x=d.isBackwards();if(f.isEmpty()){var A=f.start.row;l.duplicateLines(A,A)}else{var _=x?f.start:f.end,L=l.insert(_,l.getTextRange(f),!1);f.start=_,f.end=L,d.setSelectionRange(f,x)}},this.moveLinesDown=function(){this.$moveLines(1,!1)},this.moveLinesUp=function(){this.$moveLines(-1,!1)},this.moveText=function(d,l,f){return this.session.moveText(d,l,f)},this.copyLinesUp=function(){this.$moveLines(-1,!0)},this.copyLinesDown=function(){this.$moveLines(1,!0)},this.$moveLines=function(d,l){var f,x,A=this.selection;if(!A.inMultiSelectMode||this.inVirtualSelectionMode){var _=A.toOrientedRange();f=this.$getSelectedRows(_),x=this.session.$moveLines(f.first,f.last,l?0:d),l&&d==-1&&(x=0),_.moveBy(x,0),A.fromOrientedRange(_)}else{var L=A.rangeList.ranges;A.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var T=0,F=0,O=L.length,B=0;Bz+1)break;z=D.last}for(B--,T=this.session.$moveLines(N,z,l?0:d),l&&d==-1&&(W=B+1);W<=B;)L[W].moveBy(T,0),W++;l||(T=0),F+=T}A.fromOrientedRange(A.ranges[0]),A.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(d){return d=(d||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(d.start.row),last:this.session.getRowFoldEnd(d.end.row)}},this.onCompositionStart=function(d){this.renderer.showComposition(d)},this.onCompositionUpdate=function(d){this.renderer.setCompositionText(d)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(d){return d>=this.getFirstVisibleRow()&&d<=this.getLastVisibleRow()},this.isRowFullyVisible=function(d){return d>=this.renderer.getFirstFullyVisibleRow()&&d<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(d,l){var f=this.renderer,x=this.renderer.layerConfig,A=d*Math.floor(x.height/x.lineHeight);l===!0?this.selection.$moveSelection(function(){this.moveCursorBy(A,0)}):l===!1&&(this.selection.moveCursorBy(A,0),this.selection.clearSelection());var _=f.scrollTop;f.scrollBy(0,A*x.lineHeight),l!=null&&f.scrollCursorIntoView(null,.5),f.animateScrolling(_)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(d){this.renderer.scrollToRow(d)},this.scrollToLine=function(d,l,f,x){this.renderer.scrollToLine(d,l,f,x)},this.centerSelection=function(){var d=this.getSelectionRange(),l={row:Math.floor(d.start.row+(d.end.row-d.start.row)/2),column:Math.floor(d.start.column+(d.end.column-d.start.column)/2)};this.renderer.alignCursor(l,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(d,l){this.selection.moveCursorTo(d,l)},this.moveCursorToPosition=function(d){this.selection.moveCursorToPosition(d)},this.jumpToMatching=function(d,l){var f=this.getCursorPosition(),x=new u(this.session,f.row,f.column),A=x.getCurrentToken(),_=0;A&&A.type.indexOf("tag-name")!==-1&&(A=x.stepBackward());var L=A||x.stepForward();if(!!L){var T,F=!1,O={},B=f.column-L.start,W,N={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(L.value.match(/[{}()\[\]]/g)){for(;B1?O[L.value]++:A.value==="=0;--_)this.$tryReplace(f[_],d)&&x++;return this.selection.setSelectionRange(A),x},this.$tryReplace=function(d,l){var f=this.session.getTextRange(d);return l=this.$search.replace(f,l),l!==null?(d.end=this.session.replace(d,l),d):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(d,l,f){l||(l={}),typeof d=="string"||d instanceof RegExp?l.needle=d:typeof d=="object"&&b.mixin(l,d);var x=this.selection.getRange();l.needle==null&&(d=this.session.getTextRange(x)||this.$search.$options.needle,d||(x=this.session.getWordRange(x.start.row,x.start.column),d=this.session.getTextRange(x)),this.$search.set({needle:d})),this.$search.set(l),l.start||this.$search.set({start:x});var A=this.$search.find(this.session);if(l.preventScroll)return A;if(A)return this.revealRange(A,f),A;l.backwards?x.start=x.end:x.end=x.start,this.selection.setRange(x)},this.findNext=function(d,l){this.find({skipCurrent:!0,backwards:!1},d,l)},this.findPrevious=function(d,l){this.find(d,{skipCurrent:!0,backwards:!0},l)},this.revealRange=function(d,l){this.session.unfold(d),this.selection.setSelectionRange(d);var f=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(d.start,d.end,.5),l!==!1&&this.renderer.animateScrolling(f)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(d){d.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()},this.setAutoScrollEditorIntoView=function(d){if(!!d){var l,f=this,x=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var A=this.$scrollAnchor;A.style.cssText="position:absolute",this.container.insertBefore(A,this.container.firstChild);var _=this.on("changeSelection",function(){x=!0}),L=this.renderer.on("beforeRender",function(){x&&(l=f.renderer.container.getBoundingClientRect())}),T=this.renderer.on("afterRender",function(){if(x&&l&&(f.isFocused()||f.searchBox&&f.searchBox.isFocused())){var F=f.renderer,O=F.$cursorLayer.$pixelPos,B=F.layerConfig,W=O.top-B.offset;O.top>=0&&W+l.top<0?x=!0:O.topwindow.innerHeight?x=!1:x=null,x!=null&&(A.style.top=W+"px",A.style.left=O.left+"px",A.style.height=B.lineHeight+"px",A.scrollIntoView(x)),x=l=null}});this.setAutoScrollEditorIntoView=function(F){F||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",_),this.renderer.off("afterRender",T),this.renderer.off("beforeRender",L))}}},this.$resetCursorStyle=function(){var d=this.$cursorStyle||"ace",l=this.renderer.$cursorLayer;!l||(l.setSmoothBlinking(/smooth/.test(d)),l.isBlinking=!this.$readOnly&&d!="wide",h.setCssClass(l.element,"ace_slim-cursors",/slim/.test(d)))},this.prompt=function(d,l,f){var x=this;C.loadModule("./ext/prompt",function(A){A.prompt(x,d,l,f)})}}.call(k.prototype),C.defineOptions(k.prototype,"editor",{selectionStyle:{set:function(d){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:d})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(d){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(d){this.textInput.setReadOnly(d),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(d){this.textInput.setCopyWithEmptySelection(d)},initialValue:!1},cursorStyle:{set:function(d){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(d){this.setAutoScrollEditorIntoView(d)}},keyboardHandler:{set:function(d){this.setKeyboardHandler(d)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(d){this.session.setValue(d)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(d){this.setSession(d)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(d){this.renderer.$gutterLayer.setShowLineNumbers(d),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),d&&this.$relativeLineNumbers?v.attach(this):v.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(d){this.$showLineNumbers&&d?v.attach(this):v.detach(this)}},placeholder:{set:function(d){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var l=this.session&&(this.renderer.$composition||this.getValue());if(l&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),h.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(!l&&!this.renderer.placeholderNode){this.renderer.on("afterRender",this.$updatePlaceholder),h.addCssClass(this.container,"ace_hasPlaceholder");var f=h.createElement("div");f.className="ace_placeholder",f.textContent=this.$placeholder||"",this.renderer.placeholderNode=f,this.renderer.content.appendChild(this.renderer.placeholderNode)}else!l&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"")}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},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",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 v={getText:function(d,l){return(Math.abs(d.selection.lead.row-l)||l+1+(l<9?"\xB7":""))+""},getWidth:function(d,l,f){return Math.max(l.toString().length,(f.lastRow+1).toString().length,2)*f.characterWidth},update:function(d,l){l.renderer.$loop.schedule(l.renderer.CHANGE_GUTTER)},attach:function(d){d.renderer.$gutterLayer.$renderer=this,d.on("changeSelection",this.update),this.update(null,d)},detach:function(d){d.renderer.$gutterLayer.$renderer==this&&(d.renderer.$gutterLayer.$renderer=null),d.off("changeSelection",this.update),this.update(null,d)}};$.Editor=k}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(y,$,R){var g=function(){this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()};(function(){this.addSession=function(u){this.$session=u},this.add=function(u,p,k){if(!this.$fromUndo&&u!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),p===!1||!this.lastDeltas){this.lastDeltas=[];var v=this.$undoStack.length;v>this.$undoDepth-1&&this.$undoStack.splice(0,v-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),u.id=this.$rev=++this.$maxRev}(u.action=="remove"||u.action=="insert")&&(this.$lastDelta=u),this.lastDeltas.push(u)}},this.addSelection=function(u,p){this.selections.push({value:u,rev:p||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(u,p){p==null&&(p=this.$rev+1);for(var k=this.$undoStack,v=k.length;v--;){var d=k[v][0];if(d.id<=u)break;d.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(u){u==null&&(u=this.$rev),this.mark=u},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(u){return u?e(u):e(this.$undoStack)+` --- `+e(this.$redoStack)}}).call(g.prototype);function b(u,p){for(var k=p;k--;){var v=u[k];if(v&&!v[0].ignore){for(;k"+u.end.row+":"+u.end.column}function n(u,p){var k=u.action=="insert",v=p.action=="insert";if(k&&v)if(o(p.start,u.end)>=0)c(p,u,-1);else if(o(p.start,u.start)<=0)c(u,p,1);else return null;else if(k&&!v)if(o(p.start,u.end)>=0)c(p,u,-1);else if(o(p.end,u.start)<=0)c(u,p,-1);else return null;else if(!k&&v)if(o(p.start,u.start)>=0)c(p,u,1);else if(o(p.start,u.start)<=0)c(u,p,1);else return null;else if(!k&&!v)if(o(p.start,u.start)>=0)c(p,u,1);else if(o(p.end,u.start)<=0)c(u,p,-1);else return null;return[p,u]}function r(u,p){for(var k=u.length;k--;)for(var v=0;v=0?c(u,p,-1):(o(u.start,p.start)<=0||c(u,h.fromPoints(p.start,u.start),-1),c(p,u,1));else if(!k&&v)o(p.start,u.end)>=0?c(p,u,-1):(o(p.start,u.start)<=0||c(p,h.fromPoints(u.start,p.start),-1),c(u,p,1));else if(!k&&!v)if(o(p.start,u.end)>=0)c(p,u,-1);else if(o(p.end,u.start)<=0)c(u,p,-1);else{var d,l;return o(u.start,p.start)<0&&(d=u,u=w(u,p.start)),o(u.end,p.end)>0&&(l=w(u,p.end)),m(p.end,u.start,u.end,-1),l&&!d&&(u.lines=l.lines,u.start=l.start,u.end=l.end,l=u),[p,d,l].filter(Boolean)}return[p,u]}function c(u,p,k){m(u.start,p.start,p.end,k),m(u.end,p.start,p.end,k)}function m(u,p,k,v){u.row==(v==1?p:k).row&&(u.column+=v*(k.column-p.column)),u.row+=v*(k.row-p.row)}function w(u,p){var k=u.lines,v=u.end;u.end=a(p);var d=u.end.row-u.start.row,l=k.splice(d,k.length),f=d?p.column:p.column-u.start.column;k.push(l[0].substring(0,f)),l[0]=l[0].substr(f);var x={start:a(p),end:v,lines:l,action:u.action};return x}function S(u,p){p=t(p);for(var k=u.length;k--;){for(var v=u[k],d=0;dm&&(C=c.end.row+1,c=n.getNextFoldLine(C,c),m=c?c.start.row:1/0),C>s){for(;this.$lines.getLength()>S+1;)this.$lines.pop();break}w=this.$lines.get(++S),w?w.row=C:(w=this.$lines.createCell(C,i,this.session,e),this.$lines.push(w)),this.$renderCell(w,i,c,C),C++}this._signal("afterRender"),this.$updateGutterWidth(i)},this.$updateGutterWidth=function(i){var n=this.session,r=n.gutterRenderer||this.$renderer,s=n.$firstLineNumber,c=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||n.$useWrapMode)&&(c=n.getLength()+s-1);var m=r?r.getWidth(n,c,i):c.toString().length*i.characterWidth,w=this.$padding||this.$computePadding();m+=w.left+w.right,m!==this.gutterWidth&&!isNaN(m)&&(this.gutterWidth=m,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",m))},this.$updateCursorRow=function(){if(!!this.$highlightGutterLine){var i=this.session.selection.getCursor();this.$cursorRow!==i.row&&(this.$cursorRow=i.row)}},this.updateLineHighlight=function(){if(!!this.$highlightGutterLine){var i=this.session.selection.cursor.row;if(this.$cursorRow=i,!(this.$cursorCell&&this.$cursorCell.row==i)){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var n=this.$lines.cells;this.$cursorCell=null;for(var r=0;r=this.$cursorRow){if(s.row>this.$cursorRow){var c=this.session.getFoldLine(this.$cursorRow);if(r>0&&c&&c.start.row==n[r-1].row)s=n[r-1];else break}s.element.className="ace_gutter-active-line "+s.element.className,this.$cursorCell=s;break}}}}},this.scrollLines=function(i){var n=this.config;if(this.config=i,this.$updateCursorRow(),this.$lines.pageChanged(n,i))return this.update(i);this.$lines.moveContainer(i);var r=Math.min(i.lastRow+i.gutterOffset,this.session.getLength()-1),s=this.oldLastRow;if(this.oldLastRow=r,!n||s0;c--)this.$lines.shift();if(s>r)for(var c=this.session.getFoldedRowCount(r+1,s);c>0;c--)this.$lines.pop();i.firstRows&&this.$lines.push(this.$renderLines(i,s+1,r)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(i)},this.$renderLines=function(i,n,r){for(var s=[],c=n,m=this.session.getNextFoldLine(c),w=m?m.start.row:1/0;c>w&&(c=m.end.row+1,m=this.session.getNextFoldLine(c,m),w=m?m.start.row:1/0),!(c>r);){var S=this.$lines.createCell(c,i,this.session,e);this.$renderCell(S,i,m,c),s.push(S),c++}return s},this.$renderCell=function(i,n,r,s){var c=i.element,m=this.session,w=c.childNodes[0],S=c.childNodes[1],C=m.$firstLineNumber,u=m.$breakpoints,p=m.$decorations,k=m.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&m.foldWidgets,d=r?r.start.row:Number.MAX_VALUE,l="ace_gutter-cell ";if(this.$highlightGutterLine&&(s==this.$cursorRow||r&&s=d&&this.$cursorRow<=r.end.row)&&(l+="ace_gutter-active-line ",this.$cursorCell!=i&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=i)),u[s]&&(l+=u[s]),p[s]&&(l+=p[s]),this.$annotations[s]&&(l+=this.$annotations[s].className),c.className!=l&&(c.className=l),v){var f=v[s];f==null&&(f=v[s]=m.getFoldWidget(s))}if(f){var l="ace_fold-widget ace_"+f;f=="start"&&s==d&&sr.right-n.right)return"foldWidgets"}}).call(t.prototype);function e(i){var n=document.createTextNode("");i.appendChild(n);var r=g.createElement("span");return i.appendChild(r),i}$.Gutter=t}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(y,$,R){var g=y("../range").Range,b=y("../lib/dom"),h=function(o){this.element=b.createElement("div"),this.element.className="ace_layer ace_marker-layer",o.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.elt=function(a,t){var e=this.i!=-1&&this.element.childNodes[this.i];e?this.i++:(e=document.createElement("div"),this.element.appendChild(e),this.i=-1),e.style.cssText=t,e.className=a},this.update=function(a){if(!!a){this.config=a,this.i=0;var t;for(var e in this.markers){var i=this.markers[e];if(!i.range){i.update(t,this,this.session,a);continue}var n=i.range.clipRows(a.firstRow,a.lastRow);if(!n.isEmpty())if(n=n.toScreenRange(this.session),i.renderer){var r=this.$getTop(n.start.row,a),s=this.$padding+n.start.column*a.characterWidth;i.renderer(t,n,s,r,a)}else i.type=="fullLine"?this.drawFullLineMarker(t,n,i.clazz,a):i.type=="screenLine"?this.drawScreenLineMarker(t,n,i.clazz,a):n.isMultiLine()?i.type=="text"?this.drawTextMarker(t,n,i.clazz,a):this.drawMultiLineMarker(t,n,i.clazz,a):this.drawSingleLineMarker(t,n,i.clazz+" ace_start ace_br15",a)}if(this.i!=-1)for(;this.iC,m==c),i,m==c?0:1,n)},this.drawMultiLineMarker=function(a,t,e,i,n){var r=this.$padding,s=i.lineHeight,c=this.$getTop(t.start.row,i),m=r+t.start.column*i.characterWidth;if(n=n||"",this.session.$bidiHandler.isBidiRow(t.start.row)){var w=t.clone();w.end.row=w.start.row,w.end.column=this.session.getLine(w.start.row).length,this.drawBidiSingleLineMarker(a,w,e+" ace_br1 ace_start",i,null,n)}else this.elt(e+" ace_br1 ace_start","height:"+s+"px;right:0;top:"+c+"px;left:"+m+"px;"+(n||""));if(this.session.$bidiHandler.isBidiRow(t.end.row)){var w=t.clone();w.start.row=w.end.row,w.start.column=0,this.drawBidiSingleLineMarker(a,w,e+" ace_br12",i,null,n)}else{c=this.$getTop(t.end.row,i);var S=t.end.column*i.characterWidth;this.elt(e+" ace_br12","height:"+s+"px;width:"+S+"px;top:"+c+"px;left:"+r+"px;"+(n||""))}if(s=(t.end.row-t.start.row-1)*i.lineHeight,!(s<=0)){c=this.$getTop(t.start.row+1,i);var C=(t.start.column?1:0)|(t.end.column?0:8);this.elt(e+(C?" ace_br"+C:""),"height:"+s+"px;right:0;top:"+c+"px;left:"+r+"px;"+(n||""))}},this.drawSingleLineMarker=function(a,t,e,i,n,r){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(a,t,e,i,n,r);var s=i.lineHeight,c=(t.end.column+(n||0)-t.start.column)*i.characterWidth,m=this.$getTop(t.start.row,i),w=this.$padding+t.start.column*i.characterWidth;this.elt(e,"height:"+s+"px;width:"+c+"px;top:"+m+"px;left:"+w+"px;"+(r||""))},this.drawBidiSingleLineMarker=function(a,t,e,i,n,r){var s=i.lineHeight,c=this.$getTop(t.start.row,i),m=this.$padding,w=this.session.$bidiHandler.getSelections(t.start.column,t.end.column);w.forEach(function(S){this.elt(e,"height:"+s+"px;width:"+S.width+(n||0)+"px;top:"+c+"px;left:"+(m+S.left)+"px;"+(r||""))},this)},this.drawFullLineMarker=function(a,t,e,i,n){var r=this.$getTop(t.start.row,i),s=i.lineHeight;t.start.row!=t.end.row&&(s+=this.$getTop(t.end.row,i)-r),this.elt(e,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(n||""))},this.drawScreenLineMarker=function(a,t,e,i,n){var r=this.$getTop(t.start.row,i),s=i.lineHeight;this.elt(e,"height:"+s+"px;top:"+r+"px;left:0;right:0;"+(n||""))}}).call(h.prototype),$.Marker=h}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(y,$,R){var g=y("../lib/oop"),b=y("../lib/dom"),h=y("../lib/lang"),o=y("./lines").Lines,a=y("../lib/event_emitter").EventEmitter,t=function(e){this.dom=b,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)};(function(){g.implement(this,a),this.EOF_CHAR="\xB6",this.EOL_CHAR_LF="\xAC",this.EOL_CHAR_CRLF="\xA4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xB7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.MAX_CHUNK_LENGTH=250,this.$updateEolChar=function(){var e=this.session.doc,i=e.getNewLineCharacter()==` `&&e.getNewLineMode()!="windows",n=i?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=n)return this.EOL_CHAR=n,!0},this.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(i){this._signal("changeCharacterSize",i)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(e){this.session=e,e&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.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)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(e){return this.displayIndentGuides==e?!1:(this.displayIndentGuides=e,this.$computeTabString(),!0)},this.$highlightIndentGuides=!0,this.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides===e?!1:(this.$highlightIndentGuides=e,e)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var i=this.$tabStrings=[0],n=1;nu&&(S=C.end.row+1,C=this.session.getNextFoldLine(S,C),u=C?C.start.row:1/0),!(S>s);){var p=c[m++];if(p){this.dom.removeChildren(p),this.$renderLine(p,S,S==u?C:!1),w&&(p.style.top=this.$lines.computeLineTop(S,e,this.session)+"px");var k=e.lineHeight*this.session.getRowLength(S)+"px";p.style.height!=k&&(w=!0,p.style.height=k)}S++}if(w)for(;m0;s--)this.$lines.shift();if(i.lastRow>e.lastRow)for(var s=this.session.getFoldedRowCount(e.lastRow+1,i.lastRow);s>0;s--)this.$lines.pop();e.firstRowi.lastRow&&this.$lines.push(this.$renderLinesFragment(e,i.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},this.$renderLinesFragment=function(e,i,n){for(var r=[],s=i,c=this.session.getNextFoldLine(s),m=c?c.start.row:1/0;s>m&&(s=c.end.row+1,c=this.session.getNextFoldLine(s,c),m=c?c.start.row:1/0),!(s>n);){var w=this.$lines.createCell(s,e,this.session),S=w.element;this.dom.removeChildren(S),b.setStyle(S.style,"height",this.$lines.computeLineHeight(s,e,this.session)+"px"),b.setStyle(S.style,"top",this.$lines.computeLineTop(s,e,this.session)+"px"),this.$renderLine(S,s,s==m?c:!1),this.$useLineGroups()?S.className="ace_line_group":S.className="ace_line",r.push(w),s++}return r},this.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var i=e.firstRow,n=e.lastRow,r=this.$lines;r.getLength();)r.pop();r.push(this.$renderLinesFragment(e,i,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderTokenInChunks=function(e,i,n,r){for(var s,c=0;c=n)return i;if(i[0]==" "){r-=r%this.tabSize;for(var s=r/this.tabSize,c=0;cc[m].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}}if(!this.$highlightIndentGuideMarker.end&&e[i.row]!==""&&i.column===e[i.row].length){this.$highlightIndentGuideMarker.dir=1;for(var m=i.row+1;m0){for(var s=0;s=this.$highlightIndentGuideMarker.start+1){if(r.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(r,i)}}else for(var n=e.length-1;n>=0;n--){var r=e[n];if(this.$highlightIndentGuideMarker.end&&r.row=c;)m=this.$renderTokenInChunks(w,m,C,u.substring(0,c-r)),u=u.substring(c-r),r=c,w=this.$createLineElement(),e.appendChild(w),w.appendChild(this.dom.createTextNode(h.stringRepeat("\xA0",n.indent),this.element)),s++,m=0,c=n[s]||Number.MAX_VALUE;u.length!=0&&(r+=u.length,m=this.$renderTokenInChunks(w,m,C,u))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(w,m,null,"",!0)},this.$renderSimpleLine=function(e,i){for(var n=0,r=0;rthis.MAX_LINE_LENGTH){this.$renderOverflowMessage(e,n,s,c);return}n=this.$renderTokenInChunks(e,n,s,c)}}},this.$renderOverflowMessage=function(e,i,n,r,s){n&&this.$renderTokenInChunks(e,i,n,r.slice(0,this.MAX_LINE_LENGTH-i));var c=this.dom.createElement("span");c.className="ace_inline_button ace_keyword ace_toggle_wrap",c.textContent=s?"":"",e.appendChild(c)},this.$renderLine=function(e,i,n){if(!n&&n!=!1&&(n=this.session.getFoldLine(i)),n)var r=this.$getFoldLineTokens(i,n);else var r=this.session.getTokens(i);var s=e;if(r.length){var c=this.session.getRowSplitData(i);if(c&&c.length){this.$renderWrappedLine(e,r,c);var s=e.lastChild}else{var s=e;this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,r)}}else this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s));if(this.showEOL&&s){n&&(i=n.end.row);var m=this.dom.createElement("span");m.className="ace_invisible ace_invisible_eol",m.textContent=i==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(m)}},this.$getFoldLineTokens=function(e,i){var n=this.session,r=[];function s(m,w,S){for(var C=0,u=0;u+m[C].value.lengthS-w&&(p=p.substring(0,S-w)),r.push({type:m[C].type,value:p}),u=w+p.length,C+=1}for(;uS?r.push({type:m[C].type,value:p.substring(0,S-u)}):r.push(m[C]),u+=p.length,C+=1}}var c=n.getTokens(e);return i.walk(function(m,w,S,C,u){m!=null?r.push({type:"fold",value:m}):(u&&(c=n.getTokens(w)),c.length&&s(c,C,S))},i.end.row,this.session.getLine(i.end.row).length),r},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(t.prototype),$.Text=t}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(y,$,R){var g=y("../lib/dom"),b=function(h){this.element=g.createElement("div"),this.element.className="ace_layer ace_cursor-layer",h.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),g.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(h){for(var o=this.cursors,a=o.length;a--;)g.setStyle(o[a].style,"opacity",h?"":"0")},this.$startCssAnimation=function(){for(var h=this.cursors,o=h.length;o--;)h[o].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&g.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},this.$stopCssAnimation=function(){this.$isAnimating=!1,g.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(h){this.$padding=h},this.setSession=function(h){this.session=h},this.setBlinking=function(h){h!=this.isBlinking&&(this.isBlinking=h,this.restartTimer())},this.setBlinkInterval=function(h){h!=this.blinkInterval&&(this.blinkInterval=h,this.restartTimer())},this.setSmoothBlinking=function(h){h!=this.smoothBlinking&&(this.smoothBlinking=h,g.setCssClass(this.element,"ace_smooth-blinking",h),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var h=g.createElement("div");return h.className="ace_cursor",this.element.appendChild(h),this.cursors.push(h),h},this.removeCursor=function(){if(this.cursors.length>1){var h=this.cursors.pop();return h.parentNode.removeChild(h),h}},this.hideCursor=function(){this.isVisible=!1,g.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,g.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var h=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,g.removeCssClass(this.element,"ace_smooth-blinking")),h(!0),!this.isBlinking||!this.blinkInterval||!this.isVisible){this.$stopCssAnimation();return}if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&g.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),g.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var o=function(){this.timeoutId=setTimeout(function(){h(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){h(!0),o()},this.blinkInterval),o()}},this.getPixelPosition=function(h,o){if(!this.config||!this.session)return{left:0,top:0};h||(h=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(h),t=this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,h.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),e=(a.row-(o?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:t,top:e}},this.isCursorInView=function(h,o){return h.top>=0&&h.toph.height+h.offset||i.top<0)&&a>1)){var n=this.cursors[t++]||this.addCursor(),r=n.style;this.drawCursor?this.drawCursor(n,i,h,o[a],this.session):this.isCursorInView(i,h)?(g.setStyle(r,"display","block"),g.translate(n,i.left,i.top),g.setStyle(r,"width",Math.round(h.characterWidth)+"px"),g.setStyle(r,"height",h.lineHeight+"px")):g.setStyle(r,"display","none")}}for(;this.cursors.length>t;)this.removeCursor();var s=this.session.getOverwrite();this.$setOverwrite(s),this.$pixelPos=i,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(h){h!=this.overwrite&&(this.overwrite=h,h?g.addCssClass(this.element,"ace_overwrite-cursors"):g.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(b.prototype),$.Cursor=b}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(y,$,R){var g=y("./lib/oop"),b=y("./lib/dom"),h=y("./lib/event"),o=y("./lib/event_emitter").EventEmitter,a=32768,t=function(n){this.element=b.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=b.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xA0",this.element.appendChild(this.inner),n.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addListener(this.element,"scroll",this.onScroll.bind(this)),h.addListener(this.element,"mousedown",h.preventDefault)};(function(){g.implement(this,o),this.setVisible=function(n){this.element.style.display=n?"":"none",this.isVisible=n,this.coeff=1}}).call(t.prototype);var e=function(n,r){t.call(this,n),this.scrollTop=0,this.scrollHeight=0,r.$scrollbarWidth=this.width=b.scrollbarWidth(n.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};g.inherits(e,t),function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,this.coeff!=1){var n=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-n)/(this.coeff-n)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(n){this.element.style.height=n+"px"},this.setInnerHeight=this.setScrollHeight=function(n){this.scrollHeight=n,n>a?(this.coeff=a/n,n=a):this.coeff!=1&&(this.coeff=1),this.inner.style.height=n+"px"},this.setScrollTop=function(n){this.scrollTop!=n&&(this.skipEvent=!0,this.scrollTop=n,this.element.scrollTop=n*this.coeff)}}.call(e.prototype);var i=function(n,r){t.call(this,n),this.scrollLeft=0,this.height=r.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};g.inherits(i,t),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(n){this.element.style.width=n+"px"},this.setInnerWidth=function(n){this.inner.style.width=n+"px"},this.setScrollWidth=function(n){this.inner.style.width=n+"px"},this.setScrollLeft=function(n){this.scrollLeft!=n&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=n)}}.call(i.prototype),$.ScrollBar=e,$.ScrollBarV=e,$.ScrollBarH=i,$.VScrollBar=e,$.HScrollBar=i}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(y,$,R){var g=y("./lib/oop"),b=y("./lib/dom"),h=y("./lib/event"),o=y("./lib/event_emitter").EventEmitter;b.importCssString(`.ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{ position: absolute; background: rgba(128, 128, 128, 0.6); -moz-box-sizing: border-box; box-sizing: border-box; border: 1px solid #bbb; border-radius: 2px; z-index: 8; } .ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h { position: absolute; z-index: 6; background: none; overflow: hidden!important; } .ace_editor>.ace_sb-v { z-index: 6; right: 0; top: 0; width: 12px; } .ace_editor>.ace_sb-v div { z-index: 8; right: 0; width: 100%; } .ace_editor>.ace_sb-h { bottom: 0; left: 0; height: 12px; } .ace_editor>.ace_sb-h div { bottom: 0; height: 100%; } .ace_editor>.ace_sb_grabbed { z-index: 8; background: #000; }`,"ace_scrollbar.css",!1);var a=function(i){this.element=b.createElement("div"),this.element.className="ace_sb"+this.classSuffix,this.inner=b.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,i.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,h.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")};(function(){g.implement(this,o),this.setVisible=function(i){this.element.style.display=i?"":"none",this.isVisible=i,this.coeff=1}}).call(a.prototype);var t=function(i,n){a.call(this,i),this.scrollTop=0,this.scrollHeight=0,this.parent=i,this.width=this.VScrollWidth,this.renderer=n,this.inner.style.width=this.element.style.width=(this.width||15)+"px",this.$minWidth=0};g.inherits(t,a),function(){this.classSuffix="-v",g.implement(this,o),this.onMouseDown=function(i,n){if(i==="mousedown"&&!(h.getButton(n)!==0||n.detail===2)){if(n.target===this.inner){var r=this,s=n.clientY,c=function(k){s=k.clientY},m=function(){clearInterval(u)},w=n.clientY,S=this.thumbTop,C=function(){if(s!==void 0){var k=r.scrollTopFromThumbTop(S+s-w);k!==r.scrollTop&&r._emit("scroll",{data:k})}};h.capture(this.inner,c,m);var u=setInterval(C,20);return h.preventDefault(n)}var p=n.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(p)}),h.preventDefault(n)}},this.getHeight=function(){return this.height},this.scrollTopFromThumbTop=function(i){var n=i*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return n=n>>0,n<0?n=0:n>this.pageHeight-this.viewHeight&&(n=this.pageHeight-this.viewHeight),n},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(i){this.height=Math.max(0,i),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},this.setInnerHeight=this.setScrollHeight=function(i,n){this.pageHeight===i&&!n||(this.pageHeight=i,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})))},this.setScrollTop=function(i){this.scrollTop=i,i<0&&(i=0),this.thumbTop=i*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"}}.call(t.prototype);var e=function(i,n){a.call(this,i),this.scrollLeft=0,this.scrollWidth=0,this.height=this.HScrollHeight,this.inner.style.height=this.element.style.height=(this.height||12)+"px",this.renderer=n};g.inherits(e,a),function(){this.classSuffix="-h",g.implement(this,o),this.onMouseDown=function(i,n){if(i==="mousedown"&&!(h.getButton(n)!==0||n.detail===2)){if(n.target===this.inner){var r=this,s=n.clientX,c=function(k){s=k.clientX},m=function(){clearInterval(u)},w=n.clientX,S=this.thumbLeft,C=function(){if(s!==void 0){var k=r.scrollLeftFromThumbLeft(S+s-w);k!==r.scrollLeft&&r._emit("scroll",{data:k})}};h.capture(this.inner,c,m);var u=setInterval(C,20);return h.preventDefault(n)}var p=n.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(p)}),h.preventDefault(n)}},this.getHeight=function(){return this.isVisible?this.height:0},this.scrollLeftFromThumbLeft=function(i){var n=i*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return n=n>>0,n<0?n=0:n>this.pageWidth-this.viewWidth&&(n=this.pageWidth-this.viewWidth),n},this.setWidth=function(i){this.width=Math.max(0,i),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},this.setInnerWidth=this.setScrollWidth=function(i,n){this.pageWidth===i&&!n||(this.pageWidth=i,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})))},this.setScrollLeft=function(i){this.scrollLeft=i,i<0&&(i=0),this.thumbLeft=i*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"}}.call(e.prototype),$.ScrollBar=t,$.ScrollBarV=t,$.ScrollBarH=e,$.VScrollBar=t,$.HScrollBar=e}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(y,$,R){var g=y("./lib/event"),b=function(h,o){this.onRender=h,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=o||window;var a=this;this._flush=function(t){a.pending=!1;var e=a.changes;if(e&&(g.blockIdle(100),a.changes=0,a.onRender(e)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}};(function(){this.schedule=function(h){this.changes=this.changes|h,this.changes&&!this.pending&&(g.nextFrame(this._flush),this.pending=!0)},this.clear=function(h){var o=this.changes;return this.changes=0,o}}).call(b.prototype),$.RenderLoop=b}),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(y,$,R){var g=y("../lib/oop"),b=y("../lib/dom"),h=y("../lib/lang"),o=y("../lib/event"),a=y("../lib/useragent"),t=y("../lib/event_emitter").EventEmitter,e=250,i=typeof ResizeObserver=="function",n=200,r=$.FontMetrics=function(s,c){this.charCount=c||e,this.el=b.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=b.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=b.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),s.appendChild(this.el),this.$measureNode.textContent=h.stringRepeat("X",this.charCount),this.$characterSize={width:0,height:0},i?this.$addObserver():this.checkForSizeChanges()};(function(){g.implement(this,t),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(s,c){s.width=s.height="auto",s.left=s.top="0px",s.visibility="hidden",s.position="absolute",s.whiteSpace="pre",a.isIE<8?s["font-family"]="inherit":s.font="inherit",s.overflow=c?"hidden":"visible"},this.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 c=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=s,this.charSizes=Object.create(null),this.allowBoldFonts=c&&c.width===s.width&&c.height===s.height,this._emit("changeCharacterSize",{data:s})}},this.$addObserver=function(){var s=this;this.$observer=new window.ResizeObserver(function(c){s.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var s=this;return this.$pollSizeChangesTimer=o.onIdle(function c(){s.checkForSizeChanges(),o.onIdle(c,500)},500)},this.setPolling=function(s){s?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(s){s=s||this.$measureNode;var c=s.getBoundingClientRect(),m={height:c.height,width:c.width/this.charCount};return m.width===0||m.height===0?null:m},this.$measureCharWidth=function(s){this.$main.textContent=h.stringRepeat(s,this.charCount);var c=this.$main.getBoundingClientRect();return c.width/this.charCount},this.getCharacterWidth=function(s){var c=this.charSizes[s];return c===void 0&&(c=this.charSizes[s]=this.$measureCharWidth(s)/this.$characterSize.width),c},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function s(c){return!c||!c.parentElement?1:(window.getComputedStyle(c).zoom||1)*s(c.parentElement)},this.$initTransformMeasureNodes=function(){var s=function(c,m){return["div",{style:"position: absolute;top:"+c+"px;left:"+m+"px;"}]};this.els=b.buildDom([s(0,0),s(n,0),s(0,n),s(n,n)],this.el)},this.transformCoordinates=function(s,c){if(s){var m=this.$getZoom(this.el);s=u(1/m,s)}function w(B,W,N){var z=B[1]*W[0]-B[0]*W[1];return[(-W[1]*N[0]+W[0]*N[1])/z,(+B[1]*N[0]-B[0]*N[1])/z]}function S(B,W){return[B[0]-W[0],B[1]-W[1]]}function C(B,W){return[B[0]+W[0],B[1]+W[1]]}function u(B,W){return[B*W[0],B*W[1]]}this.els||this.$initTransformMeasureNodes();function p(B){var W=B.getBoundingClientRect();return[W.left,W.top]}var k=p(this.els[0]),v=p(this.els[1]),d=p(this.els[2]),l=p(this.els[3]),f=w(S(l,v),S(l,d),S(C(v,d),C(l,k))),x=u(1+f[0],S(v,k)),A=u(1+f[1],S(d,k));if(c){var _=c,L=f[0]*_[0]/n+f[1]*_[1]/n+1,T=C(u(_[0],x),u(_[1],A));return C(u(1/L/n,T),k)}var F=S(s,k),O=w(S(x,u(f[0],F)),S(A,u(f[1],F)),F);return u(n,O)}}).call(r.prototype)}),ace.define("ace/css/editor.css",["require","exports","module"],function(y,$,R){R.exports=`/* styles = [] for (var i = 1; i < 16; i++) { styles.push(".ace_br" + i + "{" + ( ["top-left", "top-right", "bottom-right", "bottom-left"] ).map(function(x, j) { return i & (1< .ace_line, .ace_text-layer > .ace_line_group { contain: style size layout; position: absolute; top: 0; left: 0; right: 0; } .ace_hidpi .ace_text-layer, .ace_hidpi .ace_gutter-layer, .ace_hidpi .ace_content, .ace_hidpi .ace_gutter { contain: strict; will-change: transform; } .ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group { contain: strict; } .ace_cjk { display: inline-block; text-align: center; } .ace_cursor-layer { z-index: 4; } .ace_cursor { z-index: 4; position: absolute; box-sizing: border-box; border-left: 2px solid; /* workaround for smooth cursor repaintng whole screen in chrome */ transform: translatez(0); } .ace_multiselect .ace_cursor { border-left-width: 1px; } .ace_slim-cursors .ace_cursor { border-left-width: 1px; } .ace_overwrite-cursors .ace_cursor { border-left-width: 0; border-bottom: 1px solid; } .ace_hidden-cursors .ace_cursor { opacity: 0.2; } .ace_hasPlaceholder .ace_hidden-cursors .ace_cursor { opacity: 0; } .ace_smooth-blinking .ace_cursor { transition: opacity 0.18s; } .ace_animate-blinking .ace_cursor { animation-duration: 1000ms; animation-timing-function: step-end; animation-name: blink-ace-animate; animation-iteration-count: infinite; } .ace_animate-blinking.ace_smooth-blinking .ace_cursor { animation-duration: 1000ms; animation-timing-function: ease-in-out; animation-name: blink-ace-animate-smooth; } @keyframes blink-ace-animate { from, to { opacity: 1; } 60% { opacity: 0; } } @keyframes blink-ace-animate-smooth { from, to { opacity: 1; } 45% { opacity: 1; } 60% { opacity: 0; } 85% { opacity: 0; } } .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { position: absolute; z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; z-index: 5; } .ace_marker-layer .ace_bracket { position: absolute; z-index: 6; } .ace_marker-layer .ace_error_bracket { position: absolute; border-bottom: 1px solid #DE5555; border-radius: 0; } .ace_marker-layer .ace_active-line { position: absolute; z-index: 2; } .ace_marker-layer .ace_selected-word { position: absolute; z-index: 4; box-sizing: border-box; } .ace_line .ace_fold { box-sizing: border-box; display: inline-block; height: 11px; margin-top: -2px; vertical-align: middle; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); background-repeat: no-repeat, repeat-x; background-position: center center, top left; color: transparent; border: 1px solid black; border-radius: 2px; cursor: pointer; pointer-events: auto; } .ace_dark .ace_fold { } .ace_fold:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); } .ace_tooltip { background-color: #FFF; background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1)); border: 1px solid gray; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; max-width: 100%; padding: 3px 4px; position: fixed; z-index: 999999; box-sizing: border-box; cursor: default; white-space: pre; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; } .ace_folding-enabled > .ace_gutter-cell { padding-right: 13px; } .ace_fold-widget { box-sizing: border-box; margin: 0 -12px 0 1px; display: none; width: 11px; vertical-align: top; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; } .ace_folding-enabled .ace_fold-widget { display: inline-block; } .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); } .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); } .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } /** * Dark version for fold widgets */ .ace_dark .ace_fold-widget { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); } .ace_dark .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget:hover { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } .ace_inline_button { border: 1px solid lightgray; display: inline-block; margin: -1px 8px; padding: 0 5px; pointer-events: auto; cursor: pointer; } .ace_inline_button:hover { border-color: gray; background: rgba(200,200,200,0.2); display: inline-block; pointer-events: auto; } .ace_fold-widget.ace_invalid { background-color: #FFB4B4; border-color: #DE5555; } .ace_fade-fold-widgets .ace_fold-widget { transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { transition: opacity 0.05s ease 0.05s; opacity:1; } .ace_underline { text-decoration: underline; } .ace_bold { font-weight: bold; } .ace_nobold .ace_bold { font-weight: normal; } .ace_italic { font-style: italic; } .ace_error-marker { background-color: rgba(255, 0, 0,0.2); position: absolute; z-index: 9; } .ace_highlight-marker { background-color: rgba(255, 255, 0,0.2); position: absolute; z-index: 8; } .ace_mobile-menu { position: absolute; line-height: 1.5; border-radius: 4px; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; background: white; box-shadow: 1px 3px 2px grey; border: 1px solid #dcdcdc; color: black; } .ace_dark > .ace_mobile-menu { background: #333; color: #ccc; box-shadow: 1px 3px 2px grey; border: 1px solid #444; } .ace_mobile-button { padding: 2px; cursor: pointer; overflow: hidden; } .ace_mobile-button:hover { background-color: #eee; opacity:1; } .ace_mobile-button:active { background-color: #ddd; } .ace_placeholder { font-family: arial; transform: scale(0.9); transform-origin: left; white-space: pre; opacity: 0.7; margin: 0 10px; }`}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(y,$,R){var g=y("../lib/dom"),b=y("../lib/oop"),h=y("../lib/event_emitter").EventEmitter,o=function(a,t){this.canvas=g.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=a.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=a.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=0+"px",this.canvas.style.right=0+"px",this.canvas.style.zIndex=7+"px",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)"},a.element.appendChild(this.canvas)};(function(){b.implement(this,h),this.$updateDecorators=function(a){var t=this.renderer.theme.isDark===!0?this.colors.dark:this.colors.light;if(a){this.maxHeight=a.maxHeight,this.lineHeight=a.lineHeight,this.canvasHeight=a.height;var e=(a.lastRow+1)*this.lineHeight;ef.priority?1:0}var r=this.renderer.session.$annotations;if(i.clearRect(0,0,this.canvas.width,this.canvas.height),r){var s={info:1,warning:2,error:3};r.forEach(function(l){l.priority=s[l.type]||null}),r=r.sort(n);for(var c=this.renderer.session.$foldData,m=0;mthis.canvasHeight&&(v=this.canvasHeight-this.halfMinDecorationHeight),u=Math.round(v-this.halfMinDecorationHeight),p=Math.round(v+this.halfMinDecorationHeight)}i.fillStyle=t[r[m].type]||null,i.fillRect(0,C,this.canvasWidth,p-u)}}var d=this.renderer.session.selection.getCursor();if(d){var S=this.compensateFoldRows(d.row,c),C=Math.round((d.row-S)*this.lineHeight*this.heightRatio);i.fillStyle="rgba(0, 0, 0, 0.5)",i.fillRect(0,C,this.canvasWidth,2)}},this.compensateFoldRows=function(a,t){var e=0;if(t&&t.length>0)for(var i=0;it[i].start.row&&a=t[i].end.row&&(e+=t[i].end.row-t[i].start.row);return e}}).call(o.prototype),$.Decorator=o}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor.css","ace/layer/decorators","ace/lib/useragent"],function(y,$,R){var g=y("./lib/oop"),b=y("./lib/dom"),h=y("./config"),o=y("./layer/gutter").Gutter,a=y("./layer/marker").Marker,t=y("./layer/text").Text,e=y("./layer/cursor").Cursor,i=y("./scrollbar").HScrollBar,n=y("./scrollbar").VScrollBar,r=y("./scrollbar_custom").HScrollBar,s=y("./scrollbar_custom").VScrollBar,c=y("./renderloop").RenderLoop,m=y("./layer/font_metrics").FontMetrics,w=y("./lib/event_emitter").EventEmitter,S=y("./css/editor.css"),C=y("./layer/decorators").Decorator,u=y("./lib/useragent"),p=u.isIE;b.importCssString(S,"ace_editor.css",!1);var k=function(v,d){var l=this;this.container=v||b.createElement("div"),b.addCssClass(this.container,"ace_editor"),b.HI_DPI&&b.addCssClass(this.container,"ace_hidpi"),this.setTheme(d),h.get("useStrictCSP")==null&&h.set("useStrictCSP",!1),this.$gutter=b.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=b.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=b.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var f=this.$textLayer=new t(this.content);this.canvas=f.element,this.$markerFront=new a(this.content),this.$cursorLayer=new e(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new n(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.on("scroll",function(x){l.$scrollAnimation||l.session.setScrollTop(x.data-l.scrollMargin.top)}),this.scrollBarH.on("scroll",function(x){l.$scrollAnimation||l.session.setScrollLeft(x.data-l.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new m(this.container,this.$textLayer.MAX_CHUNK_LENGTH),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(x){l.updateCharacterSize(),l.onResize(!0,l.gutterWidth,l.$size.width,l.$size.height),l._signal("changeCharacterSize",x)}),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=!u.isIOS,this.$loop=new c(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),h.resetOptions(this),h._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,g.implement(this,w),this.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(),b.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(v){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=v,v&&this.scrollMargin.top&&v.getScrollTop()<=0&&v.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(v),this.$markerBack.setSession(v),this.$markerFront.setSession(v),this.$gutterLayer.setSession(v),this.$textLayer.setSession(v),v&&(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))},this.updateLines=function(v,d,l){if(d===void 0&&(d=1/0),this.$changedLines?(this.$changedLines.firstRow>v&&(this.$changedLines.firstRow=v),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(v){v?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(v,d,l,f){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=v?1:0;var x=this.container;f||(f=x.clientHeight||x.scrollHeight),l||(l=x.clientWidth||x.scrollWidth);var A=this.$updateCachedSize(v,d,l,f);if(!this.$size.scrollerHeight||!l&&!f)return this.resizing=0;v&&(this.$gutterLayer.$padding=null),v?this.$renderChanges(A|this.$changes,!0):this.$loop.schedule(A|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},this.$updateCachedSize=function(v,d,l,f){f-=this.$extraHeight||0;var x=0,A=this.$size,_={width:A.width,height:A.height,scrollerHeight:A.scrollerHeight,scrollerWidth:A.scrollerWidth};if(f&&(v||A.height!=f)&&(A.height=f,x|=this.CHANGE_SIZE,A.scrollerHeight=A.height,this.$horizScroll&&(A.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(A.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",x=x|this.CHANGE_SCROLL),l&&(v||A.width!=l)){x|=this.CHANGE_SIZE,A.width=l,d==null&&(d=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=d,b.setStyle(this.scrollBarH.element.style,"left",d+"px"),b.setStyle(this.scroller.style,"left",d+this.margin.left+"px"),A.scrollerWidth=Math.max(0,l-d-this.scrollBarV.getWidth()-this.margin.h),b.setStyle(this.$gutter.style,"left",this.margin.left+"px");var L=this.scrollBarV.getWidth()+"px";b.setStyle(this.scrollBarH.element.style,"right",L),b.setStyle(this.scroller.style,"right",L),b.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(A.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||v)&&(x|=this.CHANGE_FULL)}return A.$dirty=!l||!f,x&&this._signal("resize",_),x},this.onGutterResize=function(v){var d=this.$showGutter?v:0;d!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,d,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()},this.adjustWrapLimit=function(){var v=this.$size.scrollerWidth-this.$padding*2,d=Math.floor(v/this.characterWidth);return this.session.adjustWrapLimit(d,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(v){this.setOption("animatedScroll",v)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(v){this.setOption("showInvisibles",v),this.session.$bidiHandler.setShowInvisibles(v)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(v){this.setOption("displayIndentGuides",v)},this.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},this.setHighlightIndentGuides=function(v){this.setOption("highlightIndentGuides",v)},this.setShowPrintMargin=function(v){this.setOption("showPrintMargin",v)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(v){this.setOption("printMarginColumn",v)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(v){return this.setOption("showGutter",v)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(v){this.setOption("fadeFoldWidgets",v)},this.setHighlightGutterLine=function(v){this.setOption("highlightGutterLine",v)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(!(!this.$showPrintMargin&&!this.$printMarginEl)){if(!this.$printMarginEl){var v=b.createElement("div");v.className="ace_layer ace_print-margin-layer",this.$printMarginEl=b.createElement("div"),this.$printMarginEl.className="ace_print-margin",v.appendChild(this.$printMarginEl),this.content.insertBefore(v,this.content.firstChild)}var d=this.$printMarginEl.style;d.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",d.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&this.session.$wrap==-1&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var v=this.textarea.style,d=this.$composition;if(!this.$keepTextAreaAtCursor&&!d){b.translate(this.textarea,-100,0);return}var l=this.$cursorLayer.$pixelPos;if(!!l){d&&d.markerRange&&(l=this.$cursorLayer.getPixelPosition(d.markerRange.start,!0));var f=this.layerConfig,x=l.top,A=l.left;x-=f.offset;var _=d&&d.useTextareaForIME?this.lineHeight:p?0:1;if(x<0||x>f.height-_){b.translate(this.textarea,0,0);return}var L=1,T=this.$size.height-_;if(!d)x+=this.lineHeight;else if(d.useTextareaForIME){var F=this.textarea.value;L=this.characterWidth*this.session.$getStringScreenWidth(F)[0]}else x+=this.lineHeight+2;A-=this.scrollLeft,A>this.$size.scrollerWidth-L&&(A=this.$size.scrollerWidth-L),A+=this.gutterWidth+this.margin.left,b.setStyle(v,"height",_+"px"),b.setStyle(v,"width",L+"px"),b.translate(this.textarea,Math.min(A,this.$size.scrollerWidth-L),Math.min(x,T))}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(this.layerConfig.offset===0?0:1)},this.getLastFullyVisibleRow=function(){var v=this.layerConfig,d=v.lastRow,l=this.session.documentToScreenRow(d,0)*v.lineHeight;return l-this.session.getScrollTop()>v.height-v.lineHeight?d-1:d},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(v){this.$padding=v,this.$textLayer.setPadding(v),this.$cursorLayer.setPadding(v),this.$markerFront.setPadding(v),this.$markerBack.setPadding(v),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(v,d,l,f){var x=this.scrollMargin;x.top=v|0,x.bottom=d|0,x.right=f|0,x.left=l|0,x.v=x.top+x.bottom,x.h=x.left+x.right,x.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-x.top),this.updateFull()},this.setMargin=function(v,d,l,f){var x=this.margin;x.top=v|0,x.bottom=d|0,x.right=f|0,x.left=l|0,x.v=x.top+x.bottom,x.h=x.left+x.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(v){this.setOption("hScrollBarAlwaysVisible",v)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(v){this.setOption("vScrollBarAlwaysVisible",v)},this.$updateScrollBarV=function(){var v=this.layerConfig.maxHeight,d=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(v-=(d-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>v-d&&(v=this.scrollTop+d,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(v+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(v,d){if(this.$changes&&(v|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!v&&!d){this.$changes|=v;return}if(this.$size.$dirty)return this.$changes|=v,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",v),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var l=this.layerConfig;if(v&this.CHANGE_FULL||v&this.CHANGE_SIZE||v&this.CHANGE_TEXT||v&this.CHANGE_LINES||v&this.CHANGE_SCROLL||v&this.CHANGE_H_SCROLL){if(v|=this.$computeLayerConfig()|this.$loop.clear(),l.firstRow!=this.layerConfig.firstRow&&l.firstRowScreen==this.layerConfig.firstRowScreen){var f=this.scrollTop+(l.firstRow-this.layerConfig.firstRow)*this.lineHeight;f>0&&(this.scrollTop=f,v=v|this.CHANGE_SCROLL,v|=this.$computeLayerConfig()|this.$loop.clear())}l=this.layerConfig,this.$updateScrollBarV(),v&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),b.translate(this.content,-this.scrollLeft,-l.offset);var x=l.width+2*this.$padding+"px",A=l.minHeight+"px";b.setStyle(this.content.style,"width",x),b.setStyle(this.content.style,"height",A)}if(v&this.CHANGE_H_SCROLL&&(b.translate(this.content,-this.scrollLeft,-l.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),v&this.CHANGE_FULL){this.$changedLines=null,this.$textLayer.update(l),this.$showGutter&&this.$gutterLayer.update(l),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(l),this.$markerBack.update(l),this.$markerFront.update(l),this.$cursorLayer.update(l),this.$moveTextAreaToCursor(),this._signal("afterRender",v);return}if(v&this.CHANGE_SCROLL){this.$changedLines=null,v&this.CHANGE_TEXT||v&this.CHANGE_LINES?this.$textLayer.update(l):this.$textLayer.scrollLines(l),this.$showGutter&&(v&this.CHANGE_GUTTER||v&this.CHANGE_LINES?this.$gutterLayer.update(l):this.$gutterLayer.scrollLines(l)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(l),this.$markerBack.update(l),this.$markerFront.update(l),this.$cursorLayer.update(l),this.$moveTextAreaToCursor(),this._signal("afterRender",v);return}v&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(l),this.$showGutter&&this.$gutterLayer.update(l),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(l)):v&this.CHANGE_LINES?((this.$updateLines()||v&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(l),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(l)):v&this.CHANGE_TEXT||v&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(l),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(l)):v&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(l),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(l)),v&this.CHANGE_CURSOR&&(this.$cursorLayer.update(l),this.$moveTextAreaToCursor()),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(l),v&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(l),this._signal("afterRender",v)},this.$autosize=function(){var v=this.session.getScreenLength()*this.lineHeight,d=this.$maxLines*this.lineHeight,l=Math.min(d,Math.max((this.$minLines||1)*this.lineHeight,v))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(l+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&l>this.$maxPixelHeight&&(l=this.$maxPixelHeight);var f=l<=2*this.lineHeight,x=!f&&v>d;if(l!=this.desiredHeight||this.$size.height!=this.desiredHeight||x!=this.$vScroll){x!=this.$vScroll&&(this.$vScroll=x,this.scrollBarV.setVisible(x));var A=this.container.clientWidth;this.container.style.height=l+"px",this.$updateCachedSize(!0,this.$gutterWidth,A,l),this.desiredHeight=l,this._signal("autosize")}},this.$computeLayerConfig=function(){var v=this.session,d=this.$size,l=d.height<=2*this.lineHeight,f=this.session.getScreenLength(),x=f*this.lineHeight,A=this.$getLongestLine(),_=!l&&(this.$hScrollBarAlwaysVisible||d.scrollerWidth-A-2*this.$padding<0),L=this.$horizScroll!==_;L&&(this.$horizScroll=_,this.scrollBarH.setVisible(_));var T=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var F=d.scrollerHeight+this.lineHeight,O=!this.$maxLines&&this.$scrollPastEnd?(d.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;x+=O;var B=this.scrollMargin;this.session.setScrollTop(Math.max(-B.top,Math.min(this.scrollTop,x-d.scrollerHeight+B.bottom))),this.session.setScrollLeft(Math.max(-B.left,Math.min(this.scrollLeft,A+2*this.$padding-d.scrollerWidth+B.right)));var W=!l&&(this.$vScrollBarAlwaysVisible||d.scrollerHeight-x+O<0||this.scrollTop>B.top),N=T!==W;N&&(this.$vScroll=W,this.scrollBarV.setVisible(W));var z=this.scrollTop%this.lineHeight,D=Math.ceil(F/this.lineHeight)-1,P=Math.max(0,Math.round((this.scrollTop-z)/this.lineHeight)),U=P+D,G,Y,j=this.lineHeight;P=v.screenToDocumentRow(P,0);var J=v.getFoldLine(P);J&&(P=J.start.row),G=v.documentToScreenRow(P,0),Y=v.getRowLength(P)*j,U=Math.min(v.screenToDocumentRow(U,0),v.getLength()-1),F=d.scrollerHeight+v.getRowLength(U)*j+Y,z=this.scrollTop-G*j;var X=0;return(this.layerConfig.width!=A||L)&&(X=this.CHANGE_H_SCROLL),(L||N)&&(X|=this.$updateCachedSize(!0,this.gutterWidth,d.width,d.height),this._signal("scrollbarVisibilityChanged"),N&&(A=this.$getLongestLine())),this.layerConfig={width:A,padding:this.$padding,firstRow:P,firstRowScreen:G,lastRow:U,lineHeight:j,characterWidth:this.characterWidth,minHeight:F,maxHeight:x,offset:z,gutterOffset:j?Math.max(0,Math.ceil((z+d.height-d.scrollerHeight)/j)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(A-this.$padding),X},this.$updateLines=function(){if(!!this.$changedLines){var v=this.$changedLines.firstRow,d=this.$changedLines.lastRow;this.$changedLines=null;var l=this.layerConfig;if(!(v>l.lastRow+1)&&!(dthis.$textLayer.MAX_LINE_LENGTH&&(v=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(v*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(v,d){this.$gutterLayer.addGutterDecoration(v,d)},this.removeGutterDecoration=function(v,d){this.$gutterLayer.removeGutterDecoration(v,d)},this.updateBreakpoints=function(v){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(v){this.$gutterLayer.setAnnotations(v),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(v,d,l){this.scrollCursorIntoView(v,l),this.scrollCursorIntoView(d,l)},this.scrollCursorIntoView=function(v,d,l){if(this.$size.scrollerHeight!==0){var f=this.$cursorLayer.getPixelPosition(v),x=f.left,A=f.top,_=l&&l.top||0,L=l&&l.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var T=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;T+_>A?(d&&T+_>A+this.lineHeight&&(A-=d*this.$size.scrollerHeight),A===0&&(A=-this.scrollMargin.top),this.session.setScrollTop(A)):T+this.$size.scrollerHeight-Lx?(x=1-this.scrollMargin.top||d>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||v<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||v>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right)return!0},this.pixelToScreenCoordinates=function(v,d){var l;if(this.$hasCssTransforms){l={top:0,left:0};var f=this.$fontMetrics.transformCoordinates([v,d]);v=f[1]-this.gutterWidth-this.margin.left,d=f[0]}else l=this.scroller.getBoundingClientRect();var x=v+this.scrollLeft-l.left-this.$padding,A=x/this.characterWidth,_=Math.floor((d+this.scrollTop-l.top)/this.lineHeight),L=this.$blockCursor?Math.floor(A):Math.round(A);return{row:_,column:L,side:A-L>0?1:-1,offsetX:x}},this.screenToTextCoordinates=function(v,d){var l;if(this.$hasCssTransforms){l={top:0,left:0};var f=this.$fontMetrics.transformCoordinates([v,d]);v=f[1]-this.gutterWidth-this.margin.left,d=f[0]}else l=this.scroller.getBoundingClientRect();var x=v+this.scrollLeft-l.left-this.$padding,A=x/this.characterWidth,_=this.$blockCursor?Math.floor(A):Math.round(A),L=Math.floor((d+this.scrollTop-l.top)/this.lineHeight);return this.session.screenToDocumentPosition(L,Math.max(_,0),x)},this.textToScreenCoordinates=function(v,d){var l=this.scroller.getBoundingClientRect(),f=this.session.documentToScreenPosition(v,d),x=this.$padding+(this.session.$bidiHandler.isBidiRow(f.row,v)?this.session.$bidiHandler.getPosLeft(f.column):Math.round(f.column*this.characterWidth)),A=f.row*this.lineHeight;return{pageX:l.left+x-this.scrollLeft,pageY:l.top+A-this.scrollTop}},this.visualizeFocus=function(){b.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){b.removeCssClass(this.container,"ace_focus")},this.showComposition=function(v){this.$composition=v,v.cssText||(v.cssText=this.textarea.style.cssText),v.useTextareaForIME==null&&(v.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(b.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):v.markerId=this.session.addMarker(v.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(v){var d=this.session.selection.cursor;this.addToken(v,"composition_placeholder",d.row,d.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(!!this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),b.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var v=this.session.selection.cursor;this.removeExtraToken(v.row,v.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(v,d,l,f){var x=this.session;x.bgTokenizer.lines[l]=null;var A={type:d,value:v},_=x.getTokens(l);if(f==null)_.push(A);else for(var L=0,T=0;T<_.length;T++){var F=_[T];if(L+=F.value.length,f<=L){var O=F.value.length-(L-f),B=F.value.slice(0,O),W=F.value.slice(O);_.splice(T,1,{type:F.type,value:B},A,{type:F.type,value:W});break}}this.updateLines(l,l)},this.removeExtraToken=function(v,d){this.updateLines(v,v)},this.setTheme=function(v,d){var l=this;if(this.$themeId=v,l._dispatchEvent("themeChange",{theme:v}),!v||typeof v=="string"){var f=v||this.$options.theme.initialValue;h.loadModule(["theme",f],x)}else x(v);function x(A){if(l.$themeId!=v)return d&&d();if(!A||!A.cssClass)throw new Error("couldn't load module "+v+" or it didn't call define");A.$id&&(l.$themeId=A.$id),b.importCssString(A.cssText,A.cssClass,l.container),l.theme&&b.removeCssClass(l.container,l.theme.cssClass);var _="padding"in A?A.padding:"padding"in(l.theme||{})?4:l.$padding;l.$padding&&_!=l.$padding&&l.setPadding(_),l.$theme=A.cssClass,l.theme=A,b.addCssClass(l.container,A.cssClass),b.setCssClass(l.container,"ace_dark",A.isDark),l.$size&&(l.$size.width=0,l.$updateSizeAsync()),l._dispatchEvent("themeLoaded",{theme:A}),d&&d()}},this.getTheme=function(){return this.$themeId},this.setStyle=function(v,d){b.setCssClass(this.container,v,d!==!1)},this.unsetStyle=function(v){b.removeCssClass(this.container,v)},this.setCursorStyle=function(v){b.setStyle(this.scroller.style,"cursor",v)},this.setMouseCursor=function(v){b.setStyle(this.scroller.style,"cursor",v)},this.attachToShadowRoot=function(){b.importCssString(S,"ace_editor.css",this.container)},this.destroy=function(){this.freeze(),this.$fontMetrics.destroy(),this.$cursorLayer.destroy(),this.removeAllListeners(),this.container.textContent=""},this.$updateCustomScrollbar=function(v){var d=this;this.$horizScroll=this.$vScroll=null,this.scrollBarV.element.remove(),this.scrollBarH.element.remove(),this.$scrollDecorator&&delete this.$scrollDecorator,v===!0?(this.scrollBarV=new s(this.container,this),this.scrollBarH=new r(this.container,this),this.scrollBarV.setHeight(this.$size.scrollerHeight),this.scrollBarH.setWidth(this.$size.scrollerWidth),this.scrollBarV.addEventListener("scroll",function(l){d.$scrollAnimation||d.session.setScrollTop(l.data-d.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(l){d.$scrollAnimation||d.session.setScrollLeft(l.data-d.scrollMargin.left)}),this.$scrollDecorator=new C(this.scrollBarV,this),this.$scrollDecorator.$updateDecorators()):(this.scrollBarV=new n(this.container,this),this.scrollBarH=new i(this.container,this),this.scrollBarV.addEventListener("scroll",function(l){d.$scrollAnimation||d.session.setScrollTop(l.data-d.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(l){d.$scrollAnimation||d.session.setScrollLeft(l.data-d.scrollMargin.left)}))}}).call(k.prototype),h.defineOptions(k.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(v){this.$textLayer.setShowInvisibles(v)&&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(v){typeof v=="number"&&(this.$printMarginColumn=v),this.$showPrintMargin=!!v,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(v){this.$gutter.style.display=v?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(v){b.setCssClass(this.$gutter,"ace_fade-fold-widgets",v)},initialValue:!1},showFoldWidgets:{set:function(v){this.$gutterLayer.setShowFoldWidgets(v),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(v){this.$textLayer.setDisplayIndentGuides(v)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(v){this.$textLayer.setHighlightIndentGuides(v)==!0?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(v){this.$gutterLayer.setHighlightGutterLine(v),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(v){(!this.$hScrollBarAlwaysVisible||!this.$horizScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(v){(!this.$vScrollBarAlwaysVisible||!this.$vScroll)&&this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(v){typeof v=="number"&&(v=v+"px"),this.container.style.fontSize=v,this.updateFontSize()},initialValue:12},fontFamily:{set:function(v){this.container.style.fontFamily=v,this.updateFontSize()}},maxLines:{set:function(v){this.updateFull()}},minLines:{set:function(v){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(v){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(v){v=+v||0,this.$scrollPastEnd!=v&&(this.$scrollPastEnd=v,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(v){this.$gutterLayer.$fixedWidth=!!v,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(v){this.$updateCustomScrollbar(v)},initialValue:!1},theme:{set:function(v){this.setTheme(v)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!u.isMobile&&!u.isIE}}),$.VirtualRenderer=k}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(y,$,R){var g=y("../lib/oop"),b=y("../lib/net"),h=y("../lib/event_emitter").EventEmitter,o=y("../config");function a(n){var r="importScripts('"+b.qualifyURL(n)+"');";try{return new Blob([r],{type:"application/javascript"})}catch{var s=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,c=new s;return c.append(r),c.getBlob("application/javascript")}}function t(n){if(typeof Worker>"u")return{postMessage:function(){},terminate:function(){}};if(o.get("loadWorkerFromBlob")){var r=a(n),s=window.URL||window.webkitURL,c=s.createObjectURL(r);return new Worker(c)}return new Worker(n)}var e=function(n){n.postMessage||(n=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=n,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(){g.implement(this,h),this.$createWorkerFromOldConfig=function(n,r,s,c,m){if(y.nameToUrl&&!y.toUrl&&(y.toUrl=y.nameToUrl),o.get("packaged")||!y.toUrl)c=c||o.moduleUrl(r,"worker");else{var w=this.$normalizePath;c=c||w(y.toUrl("ace/worker/worker.js",null,"_"));var S={};n.forEach(function(C){S[C]=w(y.toUrl(C,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}return this.$worker=t(c),m&&this.send("importScripts",m),this.$worker.postMessage({init:!0,tlns:S,module:r,classname:s}),this.$worker},this.onMessage=function(n){var r=n.data;switch(r.type){case"event":this._signal(r.name,{data:r.data});break;case"call":var s=this.callbacks[r.id];s&&(s(r.data),delete this.callbacks[r.id]);break;case"error":this.reportError(r.data);break;case"log":window.console&&console.log&&console.log.apply(console,r.data);break}},this.reportError=function(n){window.console&&console.error&&console.error(n)},this.$normalizePath=function(n){return b.qualifyURL(n)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(n,r){this.$worker.postMessage({command:n,args:r})},this.call=function(n,r,s){if(s){var c=this.callbackId++;this.callbacks[c]=s,r.push(c)}this.send(n,r)},this.emit=function(n,r){try{r.data&&r.data.err&&(r.data.err={message:r.data.err.message,stack:r.data.err.stack,code:r.data.err.code}),this.$worker&&this.$worker.postMessage({event:n,data:{data:r.data}})}catch(s){console.error(s.stack)}},this.attachToDocument=function(n){this.$doc&&this.terminate(),this.$doc=n,this.call("setValue",[n.getValue()]),n.on("change",this.changeListener,!0)},this.changeListener=function(n){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),n.action=="insert"?this.deltaQueue.push(n.start,n.lines):this.deltaQueue.push(n.start,n.end)},this.$sendDeltaQueue=function(){var n=this.deltaQueue;!n||(this.deltaQueue=null,n.length>50&&n.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:n}))}}).call(e.prototype);var i=function(n,r,s){var c=null,m=!1,w=Object.create(h),S=[],C=new e({messageBuffer:S,terminate:function(){},postMessage:function(p){S.push(p),c&&(m?setTimeout(u):u())}});C.setEmitSync=function(p){m=p};var u=function(){var p=S.shift();p.command?c[p.command].apply(c,p.args):p.event&&w._signal(p.event,p.data)};return w.postMessage=function(p){C.onMessage({data:p})},w.callback=function(p,k){this.postMessage({type:"call",id:k,data:p})},w.emit=function(p,k){this.postMessage({type:"event",name:p,data:k})},o.loadModule(["worker",r],function(p){for(c=new p[s](w);S.length;)u()}),C};$.UIWorkerClient=i,$.WorkerClient=e,$.createWorker=t}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(y,$,R){var g=y("./range").Range,b=y("./lib/event_emitter").EventEmitter,h=y("./lib/oop"),o=function(a,t,e,i,n,r){var s=this;this.length=t,this.session=a,this.doc=a.getDocument(),this.mainClass=n,this.othersClass=r,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){s.onCursorChange()})},this.$pos=e;var c=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=c.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};(function(){h.implement(this,b),this.setup=function(){var a=this,t=this.doc,e=this.session;this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var i=this.pos;i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new g(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var r=t.createAnchor(n.row,n.column);r.$insertRight=!0,r.detach(),a.others.push(r)}),e.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,t=this;this.othersActive=!0,this.others.forEach(function(e){e.markerId=a.addMarker(new g(e.row,e.column,e.row,e.column+t.length),t.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(!!this.othersActive){this.othersActive=!1;for(var a=0;a=this.pos.column&&t.start.column<=this.pos.column+this.length+1,n=t.start.column-this.pos.column;if(this.updateAnchors(a),i&&(this.length+=e),i&&!this.session.$fromUndo){if(a.action==="insert")for(var r=this.others.length-1;r>=0;r--){var s=this.others[r],c={row:s.row,column:s.column+n};this.doc.insertMergedLines(c,a.lines)}else if(a.action==="remove")for(var r=this.others.length-1;r>=0;r--){var s=this.others[r],c={row:s.row,column:s.column+n};this.doc.remove(new g(c.row,c.column,c.row,c.column-e))}}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(a){this.pos.onChange(a);for(var t=this.others.length;t--;)this.others[t].onChange(a);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var a=this,t=this.session,e=function(n,r){t.removeMarker(n.markerId),n.markerId=t.addMarker(new g(n.row,n.column,n.row,n.column+a.length),r,null,!1)};e(this.pos,this.mainClass);for(var i=this.others.length;i--;)e(this.others[i],this.othersClass)}},this.onCursorChange=function(a){if(!(this.$updating||!this.session)){var t=this.session.selection.getCursor();t.row===this.pos.row&&t.column>=this.pos.column&&t.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.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},this.cancel=function(){if(this.$undoStackDepth!==-1){for(var a=this.session.getUndoManager(),t=(a.$undoStack||a.$undostack).length-this.$undoStackDepth,e=0;e1?b.multiSelect.joinSelections():b.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(b){b.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(b){b.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(b){b.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],$.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(b){b.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(b){return b&&b.inMultiSelectMode}}];var g=y("../keyboard/hash_handler").HashHandler;$.keyboardHandler=new g($.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(y,$,R){var g=y("./range_list").RangeList,b=y("./range").Range,h=y("./selection").Selection,o=y("./mouse/multi_select_handler").onMouseDown,a=y("./lib/event"),t=y("./lib/lang"),e=y("./commands/multi_select_commands");$.commands=e.defaultCommands.concat(e.multiSelectCommands);var i=y("./search").Search,n=new i;function r(C,u,p){return n.$options.wrap=!0,n.$options.needle=u,n.$options.backwards=p==-1,n.find(C)}var s=y("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(s.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(C,u){if(!!C){if(!this.inMultiSelectMode&&this.rangeCount===0){var p=this.toOrientedRange();if(this.rangeList.add(p),this.rangeList.add(C),this.rangeList.ranges.length!=2)return this.rangeList.removeAll(),u||this.fromOrientedRange(C);this.rangeList.removeAll(),this.rangeList.add(p),this.$onAddRange(p)}C.cursor||(C.cursor=C.end);var k=this.rangeList.add(C);return this.$onAddRange(C),k.length&&this.$onRemoveRange(k),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),u||this.fromOrientedRange(C)}},this.toSingleRange=function(C){C=C||this.ranges[0];var u=this.rangeList.removeAll();u.length&&this.$onRemoveRange(u),C&&this.fromOrientedRange(C)},this.substractPoint=function(C){var u=this.rangeList.substractPoint(C);if(u)return this.$onRemoveRange(u),u[0]},this.mergeOverlappingRanges=function(){var C=this.rangeList.merge();C.length&&this.$onRemoveRange(C)},this.$onAddRange=function(C){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(C),this._signal("addRange",{range:C})},this.$onRemoveRange=function(C){if(this.rangeCount=this.rangeList.ranges.length,this.rangeCount==1&&this.inMultiSelectMode){var u=this.rangeList.ranges.pop();C.push(u),this.rangeCount=0}for(var p=C.length;p--;){var k=this.ranges.indexOf(C[p]);this.ranges.splice(k,1)}this._signal("removeRange",{ranges:C}),this.rangeCount===0&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),u=u||this.ranges[0],u&&!u.isEqual(this.getRange())&&this.fromOrientedRange(u)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new g,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var C=this.ranges.length?this.ranges:[this.getRange()],u=[],p=0;p1){var C=this.rangeList.ranges,u=C[C.length-1],p=b.fromPoints(C[0].start,u.end);this.toSingleRange(),this.setSelectionRange(p,u.cursor==u.start)}else{var k=this.session.documentToScreenPosition(this.cursor),v=this.session.documentToScreenPosition(this.anchor),d=this.rectangularRangeBlock(k,v);d.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(C,u,p){var k=[],v=C.column0;)B--;if(B>0)for(var W=0;k[W].isEmpty();)W++;for(var N=B;N>=W;N--)k[N].isEmpty()&&k.splice(N,1)}return k}}.call(h.prototype);var c=y("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(C){C.cursor||(C.cursor=C.end);var u=this.getSelectionStyle();return C.marker=this.session.addMarker(C,"ace_selection",u),this.session.$selectionMarkers.push(C),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,C},this.removeSelectionMarker=function(C){if(!!C.marker){this.session.removeMarker(C.marker);var u=this.session.$selectionMarkers.indexOf(C);u!=-1&&this.session.$selectionMarkers.splice(u,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(C){for(var u=this.session.$selectionMarkers,p=C.length;p--;){var k=C[p];if(!!k.marker){this.session.removeMarker(k.marker);var v=u.indexOf(k);v!=-1&&u.splice(v,1)}}this.session.selectionMarkerCount=u.length},this.$onAddRange=function(C){this.addSelectionMarker(C.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(C){this.removeSelectionMarkers(C.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(C){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(e.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(C){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(e.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(C){var u=C.command,p=C.editor;if(!!p.multiSelect){if(u.multiSelectAction)u.multiSelectAction=="forEach"?k=p.forEachSelection(u,C.args):u.multiSelectAction=="forEachLine"?k=p.forEachSelection(u,C.args,!0):u.multiSelectAction=="single"?(p.exitMultiSelectMode(),k=u.exec(p,C.args||{})):k=u.multiSelectAction(p,C.args||{});else{var k=u.exec(p,C.args||{});p.multiSelect.addRange(p.multiSelect.toOrientedRange()),p.multiSelect.mergeOverlappingRanges()}return k}},this.forEachSelection=function(C,u,p){if(!this.inVirtualSelectionMode){var k=p&&p.keepOrder,v=p==!0||p&&p.$byLines,d=this.session,l=this.selection,f=l.rangeList,x=(k?l:f).ranges,A;if(!x.length)return C.exec?C.exec(this,u||{}):C(this,u||{});var _=l._eventRegistry;l._eventRegistry={};var L=new h(d);this.inVirtualSelectionMode=!0;for(var T=x.length;T--;){if(v)for(;T>0&&x[T].start.row==x[T-1].end.row;)T--;L.fromOrientedRange(x[T]),L.index=T,this.selection=d.selection=L;var F=C.exec?C.exec(this,u||{}):C(this,u||{});!A&&F!==void 0&&(A=F),L.toOrientedRange(x[T])}L.detach(),this.selection=d.selection=l,this.inVirtualSelectionMode=!1,l._eventRegistry=_,l.mergeOverlappingRanges(),l.ranges[0]&&l.fromOrientedRange(l.ranges[0]);var O=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),O&&O.from==O.to&&this.renderer.animateScrolling(O.from),A}},this.exitMultiSelectMode=function(){!this.inMultiSelectMode||this.inVirtualSelectionMode||this.multiSelect.toSingleRange()},this.getSelectedText=function(){var C="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var u=this.multiSelect.rangeList.ranges,p=[],k=0;k0);l<0&&(l=0),f>=A&&(f=A-1)}var L=this.session.removeFullLines(l,f);L=this.$reAlignText(L,x),this.session.insert({row:l,column:0},L.join(` `)+` `),x||(d.start.column=0,d.end.column=L[L.length-1].length),this.selection.setRange(d)}else{v.forEach(function(B){u.substractPoint(B.cursor)});var T=0,F=1/0,O=p.map(function(B){var W=B.cursor,N=C.getLine(W.row),z=N.substr(W.column).search(/\S/g);return z==-1&&(z=0),W.column>T&&(T=W.column),zD?C.insert(N,t.stringRepeat(" ",z-D)):C.remove(new b(N.row,N.column,N.row,N.column-z+D)),B.start.column=B.end.column=T,B.start.row=B.end.row=N.row,B.cursor=B.end}),u.fromOrientedRange(p[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}},this.$reAlignText=function(C,u){var p=!0,k=!0,v,d,l;return C.map(function(L){var T=L.match(/(\s*)(.*?)(\s*)([=:].*)/);return T?v==null?(v=T[1].length,d=T[2].length,l=T[3].length,T):(v+d+l!=T[1].length+T[2].length+T[3].length&&(k=!1),v!=T[1].length&&(p=!1),v>T[1].length&&(v=T[1].length),dT[3].length&&(l=T[3].length),T):[L]}).map(u?x:p?k?A:x:_);function f(L){return t.stringRepeat(" ",L)}function x(L){return L[2]?f(v)+L[2]+f(d-L[2].length+l)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function A(L){return L[2]?f(v+d-L[2].length)+L[2]+f(l)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}function _(L){return L[2]?f(v)+L[2]+f(l)+L[4].replace(/^([=:])\s+/,"$1 "):L[0]}}}).call(c.prototype);function m(C,u){return C.row==u.row&&C.column==u.column}$.onSessionChange=function(C){var u=C.session;u&&!u.multiSelect&&(u.$selectionMarkers=[],u.selection.$initRangeList(),u.multiSelect=u.selection),this.multiSelect=u&&u.multiSelect;var p=C.oldSession;p&&(p.multiSelect.off("addRange",this.$onAddRange),p.multiSelect.off("removeRange",this.$onRemoveRange),p.multiSelect.off("multiSelect",this.$onMultiSelect),p.multiSelect.off("singleSelect",this.$onSingleSelect),p.multiSelect.lead.off("change",this.$checkMultiselectChange),p.multiSelect.anchor.off("change",this.$checkMultiselectChange)),u&&(u.multiSelect.on("addRange",this.$onAddRange),u.multiSelect.on("removeRange",this.$onRemoveRange),u.multiSelect.on("multiSelect",this.$onMultiSelect),u.multiSelect.on("singleSelect",this.$onSingleSelect),u.multiSelect.lead.on("change",this.$checkMultiselectChange),u.multiSelect.anchor.on("change",this.$checkMultiselectChange)),u&&this.inMultiSelectMode!=u.selection.inMultiSelectMode&&(u.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())};function w(C){C.$multiselectOnSessionChange||(C.$onAddRange=C.$onAddRange.bind(C),C.$onRemoveRange=C.$onRemoveRange.bind(C),C.$onMultiSelect=C.$onMultiSelect.bind(C),C.$onSingleSelect=C.$onSingleSelect.bind(C),C.$multiselectOnSessionChange=$.onSessionChange.bind(C),C.$checkMultiselectChange=C.$checkMultiselectChange.bind(C),C.$multiselectOnSessionChange(C),C.on("changeSession",C.$multiselectOnSessionChange),C.on("mousedown",o),C.commands.addCommands(e.defaultCommands),S(C))}function S(C){if(!C.textInput)return;var u=C.textInput.getElement(),p=!1;a.addListener(u,"keydown",function(v){var d=v.keyCode==18&&!(v.ctrlKey||v.shiftKey||v.metaKey);C.$blockSelectEnabled&&d?p||(C.renderer.setMouseCursor("crosshair"),p=!0):p&&k()},C),a.addListener(u,"keyup",k,C),a.addListener(u,"blur",k,C);function k(v){p&&(C.renderer.setMouseCursor(""),p=!1)}}$.MultiSelect=w,y("./config").defineOptions(c.prototype,"editor",{enableMultiselect:{set:function(C){w(this),C?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(C){this.$blockSelectEnabled=C},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(y,$,R){var g=y("../../range").Range,b=$.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(h,o,a){var t=h.getLine(a);return this.foldingStartMarker.test(t)?"start":o=="markbeginend"&&this.foldingStopMarker&&this.foldingStopMarker.test(t)?"end":""},this.getFoldWidgetRange=function(h,o,a){return null},this.indentationBlock=function(h,o,a){var t=/\S/,e=h.getLine(o),i=e.search(t);if(i!=-1){for(var n=a||e.length,r=h.getLength(),s=o,c=o;++os){var S=h.getLine(c).length;return new g(s,n,c,S)}}},this.openingBracketBlock=function(h,o,a,t,e){var i={row:a,column:t+1},n=h.$findClosingBracket(o,i,e);if(!!n){var r=h.foldWidgets[n.row];return r==null&&(r=h.getFoldWidget(n.row)),r=="start"&&n.row>i.row&&(n.row--,n.column=h.getLine(n.row).length),g.fromPoints(i,n)}},this.closingBracketBlock=function(h,o,a,t,e){var i={row:a,column:t},n=h.$findOpeningBracket(o,i);if(!!n)return n.column++,i.column--,g.fromPoints(n,i)}}).call(b.prototype)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(y,$,R){var g=y("./lib/dom");function b(h){this.session=h,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(h){var o;return this.lineWidgets?o=this.lineWidgets[h]&&this.lineWidgets[h].rowCount||0:o=0,!this.$useWrapMode||!this.$wrapData[h]?1+o:this.$wrapData[h].length+1+o},this.$getWidgetScreenLength=function(){var h=0;return this.lineWidgets.forEach(function(o){o&&o.rowCount&&!o.hidden&&(h+=o.rowCount)}),h},this.$onChangeEditor=function(h){this.attach(h.editor)},this.attach=function(h){h&&h.widgetManager&&h.widgetManager!=this&&h.widgetManager.detach(),this.editor!=h&&(this.detach(),this.editor=h,h&&(h.widgetManager=this,h.renderer.on("beforeRender",this.measureWidgets),h.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(h){var o=this.editor;if(!!o){this.editor=null,o.widgetManager=null,o.renderer.off("beforeRender",this.measureWidgets),o.renderer.off("afterRender",this.renderWidgets);var a=this.session.lineWidgets;a&&a.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})}},this.updateOnFold=function(h,o){var a=o.lineWidgets;if(!(!a||!h.action)){for(var t=h.data,e=t.start.row,i=t.end.row,n=h.action=="add",r=e+1;ro[a].column&&a++,i.unshift(a,0),o.splice.apply(o,i),this.$updateRows()}}},this.$updateRows=function(){var h=this.session.lineWidgets;if(!!h){var o=!0;h.forEach(function(a,t){if(a)for(o=!1,a.row=t;a.$oldWidget;)a.$oldWidget.row=t,a=a.$oldWidget}),o&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(h){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var o=this.session.lineWidgets[h.row];return o&&(h.$oldWidget=o,o.el&&o.el.parentNode&&(o.el.parentNode.removeChild(o.el),o._inDocument=!1)),this.session.lineWidgets[h.row]=h,h},this.addLineWidget=function(h){if(this.$registerLineWidget(h),h.session=this.session,!this.editor)return h;var o=this.editor.renderer;h.html&&!h.el&&(h.el=g.createElement("div"),h.el.innerHTML=h.html),h.el&&(g.addCssClass(h.el,"ace_lineWidgetContainer"),h.el.style.position="absolute",h.el.style.zIndex=5,o.container.appendChild(h.el),h._inDocument=!0,h.coverGutter||(h.el.style.zIndex=3),h.pixelHeight==null&&(h.pixelHeight=h.el.offsetHeight)),h.rowCount==null&&(h.rowCount=h.pixelHeight/o.layerConfig.lineHeight);var a=this.session.getFoldAt(h.row,0);if(h.$fold=a,a){var t=this.session.lineWidgets;h.row==a.end.row&&!t[a.start.row]?t[a.start.row]=h:h.hidden=!0}return this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows(),this.renderWidgets(null,o),this.onWidgetChanged(h),h},this.removeLineWidget=function(h){if(h._inDocument=!1,h.session=null,h.el&&h.el.parentNode&&h.el.parentNode.removeChild(h.el),h.editor&&h.editor.destroy)try{h.editor.destroy()}catch{}if(this.session.lineWidgets){var o=this.session.lineWidgets[h.row];if(o==h)this.session.lineWidgets[h.row]=h.$oldWidget,h.$oldWidget&&this.onWidgetChanged(h.$oldWidget);else for(;o;){if(o.$oldWidget==h){o.$oldWidget=h.$oldWidget;break}o=o.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:h.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(h){for(var o=this.session.lineWidgets,a=o&&o[h],t=[];a;)t.push(a),a=a.$oldWidget;return t},this.onWidgetChanged=function(h){this.session._changedWidgets.push(h),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(h,o){var a=this.session._changedWidgets,t=o.layerConfig;if(!(!a||!a.length)){for(var e=1/0,i=0;i0&&!t[e];)e--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,o.$cursorLayer.config=a;for(var n=e;n<=i;n++){var r=t[n];if(!(!r||!r.el)){if(r.hidden){r.el.style.top=-100-(r.pixelHeight||0)+"px";continue}r._inDocument||(r._inDocument=!0,o.container.appendChild(r.el));var s=o.$cursorLayer.getPixelPosition({row:n,column:0},!0).top;r.coverLine||(s+=a.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=s-a.offset+"px";var c=r.coverGutter?0:o.gutterWidth;r.fixedWidth||(c-=o.scrollLeft),r.el.style.left=c+"px",r.fullWidth&&r.screenWidth&&(r.el.style.minWidth=a.width+2*a.padding+"px"),r.fixedWidth?r.el.style.right=o.scrollBar.getWidth()+"px":r.el.style.right=""}}}}}).call(b.prototype),$.LineWidgets=b}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(y,$,R){var g=y("../line_widgets").LineWidgets,b=y("../lib/dom"),h=y("../range").Range;function o(t,e,i){for(var n=0,r=t.length-1;n<=r;){var s=n+r>>1,c=i(e,t[s]);if(c>0)n=s+1;else if(c<0)r=s-1;else return s}return-(n+1)}function a(t,e,i){var n=t.getAnnotations().sort(h.comparePoints);if(!!n.length){var r=o(n,{row:e,column:-1},h.comparePoints);r<0&&(r=-r-1),r>=n.length?r=i>0?0:n.length-1:r===0&&i<0&&(r=n.length-1);var s=n[r];if(!(!s||!i)){if(s.row===e){do s=n[r+=i];while(s&&s.row===e);if(!s)return n.slice()}var c=[];e=s.row;do c[i<0?"unshift":"push"](s),s=n[r+=i];while(s&&s.row==e);return c.length&&c}}}$.showErrorMarker=function(t,e){var i=t.session;i.widgetManager||(i.widgetManager=new g(i),i.widgetManager.attach(t));var n=t.getCursorPosition(),r=n.row,s=i.widgetManager.getWidgetsAtRow(r).filter(function(v){return v.type=="errorMarker"})[0];s?s.destroy():r-=e;var c=a(i,r,e),m;if(c){var w=c[0];n.column=(w.pos&&typeof w.column!="number"?w.pos.sc:w.column)||0,n.row=w.row,m=t.renderer.$gutterLayer.$annotations[n.row]}else{if(s)return;m={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(n.row),t.selection.moveToPosition(n);var S={row:n.row,fixedWidth:!0,coverGutter:!0,el:b.createElement("div"),type:"errorMarker"},C=S.el.appendChild(b.createElement("div")),u=S.el.appendChild(b.createElement("div"));u.className="error_widget_arrow "+m.className;var p=t.renderer.$cursorLayer.getPixelPosition(n).left;u.style.left=p+t.renderer.gutterWidth-5+"px",S.el.className="error_widget_wrapper",C.className="error_widget "+m.className,C.innerHTML=m.text.join("
"),C.appendChild(b.createElement("div"));var k=function(v,d,l){if(d===0&&(l==="esc"||l==="return"))return S.destroy(),{command:"null"}};S.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(k),i.widgetManager.removeLineWidget(S),t.off("changeSelection",S.destroy),t.off("changeSession",S.destroy),t.off("mouseup",S.destroy),t.off("change",S.destroy))},t.keyBinding.addKeyboardHandler(k),t.on("changeSelection",S.destroy),t.on("changeSession",S.destroy),t.on("mouseup",S.destroy),t.on("change",S.destroy),t.session.widgetManager.addLineWidget(S),S.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:S.el.offsetHeight})},b.importCssString(` .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; } `,"error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(y,$,R){y("./loader_build")($);var g=y("./lib/dom"),b=y("./lib/event"),h=y("./range").Range,o=y("./editor").Editor,a=y("./edit_session").EditSession,t=y("./undomanager").UndoManager,e=y("./virtual_renderer").VirtualRenderer;y("./worker/worker_client"),y("./keyboard/hash_handler"),y("./placeholder"),y("./multi_select"),y("./mode/folding/fold_mode"),y("./theme/textmate"),y("./ext/error_marker"),$.config=y("./config"),$.edit=function(i,n){if(typeof i=="string"){var r=i;if(i=document.getElementById(r),!i)throw new Error("ace.edit can't find div #"+r)}if(i&&i.env&&i.env.editor instanceof o)return i.env.editor;var s="";if(i&&/input|textarea/i.test(i.tagName)){var c=i;s=c.value,i=g.createElement("pre"),c.parentNode.replaceChild(i,c)}else i&&(s=i.textContent,i.innerHTML="");var m=$.createEditSession(s),w=new o(new e(i),m,n),S={document:m,editor:w,onResize:w.resize.bind(w,null)};return c&&(S.textarea=c),b.addListener(window,"resize",S.onResize),w.on("destroy",function(){b.removeListener(window,"resize",S.onResize),S.editor.container.env=null}),w.container.env=w.env=S,w},$.createEditSession=function(i,n){var r=new a(i,n);return r.setUndoManager(new t),r},$.Range=h,$.Editor=o,$.EditSession=a,$.UndoManager=t,$.VirtualRenderer=e,$.version=$.config.version}),function(){ace.require(["ace/ace"],function(y){y&&(y.config.init(!0),y.define=ace.define),window.ace||(window.ace=y);for(var $ in y)y.hasOwnProperty($)&&(window.ace[$]=y[$]);window.ace.default=window.ace,I&&(I.exports=window.ace)})}()})(Xe);const Mt=Xe.exports,yn=""+new URL("worker-css.01905699.js",import.meta.url).href,$n=""+new URL("worker-html.ca2d0aac.js",import.meta.url).href,Cn=""+new URL("worker-javascript.38a4e986.js",import.meta.url).href;var Qe={},Et={};const oi=mn(vn);var gt={exports:{}};(function(I,M){var y=200,$="__lodash_hash_undefined__",R=1,g=2,b=9007199254740991,h="[object Arguments]",o="[object Array]",a="[object AsyncFunction]",t="[object Boolean]",e="[object Date]",i="[object Error]",n="[object Function]",r="[object GeneratorFunction]",s="[object Map]",c="[object Number]",m="[object Null]",w="[object Object]",S="[object Promise]",C="[object Proxy]",u="[object RegExp]",p="[object Set]",k="[object String]",v="[object Symbol]",d="[object Undefined]",l="[object WeakMap]",f="[object ArrayBuffer]",x="[object DataView]",A="[object Float32Array]",_="[object Float64Array]",L="[object Int8Array]",T="[object Int16Array]",F="[object Int32Array]",O="[object Uint8Array]",B="[object Uint8ClampedArray]",W="[object Uint16Array]",N="[object Uint32Array]",z=/[\\^$.*+?()[\]{}|]/g,D=/^\[object .+?Constructor\]$/,P=/^(?:0|[1-9]\d*)$/,U={};U[A]=U[_]=U[L]=U[T]=U[F]=U[O]=U[B]=U[W]=U[N]=!0,U[h]=U[o]=U[f]=U[t]=U[x]=U[e]=U[i]=U[n]=U[s]=U[c]=U[w]=U[u]=U[p]=U[k]=U[l]=!1;var G=typeof we=="object"&&we&&we.Object===Object&&we,Y=typeof self=="object"&&self&&self.Object===Object&&self,j=G||Y||Function("return this")(),J=M&&!M.nodeType&&M,X=J&&!0&&I&&!I.nodeType&&I,q=X&&X.exports===J,oe=q&&G.process,ve=function(){try{return oe&&oe.binding&&oe.binding("util")}catch{}}(),ge=ve&&ve.isTypedArray;function le(E,H){for(var V=-1,Q=E==null?0:E.length,fe=0,ne=[];++V-1}function Ii(E,H){var V=this.__data__,Q=lt(V,E);return Q<0?(++this.size,V.push([E,H])):V[Q][1]=H,this}Me.prototype.clear=Mi,Me.prototype.delete=Ei,Me.prototype.get=Fi,Me.prototype.has=Oi,Me.prototype.set=Ii;function Ne(E){var H=-1,V=E==null?0:E.length;for(this.clear();++Hye))return!1;var me=ne.get(E);if(me&&ne.get(H))return me==H;var ke=-1,Te=!0,Ce=V&g?new at:void 0;for(ne.set(E,H),ne.set(H,E);++ke-1&&E%1==0&&E-1&&E%1==0&&E<=b}function Qt(E){var H=typeof E;return E!=null&&(H=="object"||H=="function")}function it(E){return E!=null&&typeof E=="object"}var Jt=ge?Ze(ge):Zi;function fn(E){return un(E)?Yi(E):qi(E)}function gn(){return[]}function pn(){return!1}I.exports=dn})(gt,gt.exports);var Re={};Object.defineProperty(Re,"__esModule",{value:!0});Re.getAceInstance=Re.debounce=Re.editorEvents=Re.editorOptions=void 0;var Sn=["minLines","maxLines","readOnly","highlightActiveLine","tabSize","enableBasicAutocompletion","enableLiveAutocompletion","enableSnippets"];Re.editorOptions=Sn;var xn=["onChange","onFocus","onInput","onBlur","onCopy","onPaste","onSelectionChange","onCursorChange","onScroll","handleOptions","updateRef"];Re.editorEvents=xn;var kn=function(){var I;return typeof window>"u"?(we.window={},I=Xe.exports,delete we.window):window.ace?(I=window.ace,I.acequire=window.ace.require||window.ace.acequire):I=Xe.exports,I};Re.getAceInstance=kn;var An=function(I,M){var y=null;return function(){var $=this,R=arguments;clearTimeout(y),y=setTimeout(function(){I.apply($,R)},M)}};Re.debounce=An;var _n=oi.jsx,Ln=we&&we.__extends||function(){var I=function(M,y){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function($,R){$.__proto__=R}||function($,R){for(var g in R)Object.prototype.hasOwnProperty.call(R,g)&&($[g]=R[g])},I(M,y)};return function(M,y){if(typeof y!="function"&&y!==null)throw new TypeError("Class extends value "+String(y)+" is not a constructor or null");I(M,y);function $(){this.constructor=M}M.prototype=y===null?Object.create(y):($.prototype=y.prototype,new $)}}(),Lt=we&&we.__assign||function(){return Lt=Object.assign||function(I){for(var M,y=1,$=arguments.length;y<$;y++){M=arguments[y];for(var R in M)Object.prototype.hasOwnProperty.call(M,R)&&(I[R]=M[R])}return I},Lt.apply(this,arguments)};Object.defineProperty(Et,"__esModule",{value:!0});var Tn=Xe.exports,ee=Rt.exports,Rn=nt.exports,ft=gt.exports,Ye=Re,qt=(0,Ye.getAceInstance)(),Mn=function(I){Ln(M,I);function M(y){var $=I.call(this,y)||this;return Ye.editorEvents.forEach(function(R){$[R]=$[R].bind($)}),$.debounce=Ye.debounce,$}return M.prototype.isInShadow=function(y){for(var $=y&&y.parentNode;$;){if($.toString()==="[object ShadowRoot]")return!0;$=$.parentNode}return!1},M.prototype.componentDidMount=function(){var y=this,$=this.props,R=$.className,g=$.onBeforeLoad,b=$.onValidate,h=$.mode,o=$.focus,a=$.theme,t=$.fontSize,e=$.value,i=$.defaultValue,n=$.showGutter,r=$.wrapEnabled,s=$.showPrintMargin,c=$.scrollMargin,m=c===void 0?[0,0,0,0]:c,w=$.keyboardHandler,S=$.onLoad,C=$.commands,u=$.annotations,p=$.markers,k=$.placeholder;this.editor=qt.edit(this.refEditor),g&&g(qt);for(var v=Object.keys(this.props.editorProps),d=0;d0&&this.handleMarkers(p);var l=this.editor.$options;Ye.editorOptions.forEach(function(f){l.hasOwnProperty(f)?y.editor.setOption(f,y.props[f]):y.props[f]&&console.warn("ReactAce: editor option ".concat(f," was activated but not found. Did you need to import a related tool or did you possibly mispell the option?"))}),this.handleOptions(this.props),Array.isArray(C)&&C.forEach(function(f){typeof f.exec=="string"?y.editor.commands.bindKey(f.bindKey,f.exec):y.editor.commands.addCommand(f)}),w&&this.editor.setKeyboardHandler("ace/keyboard/"+w),R&&(this.refEditor.className+=" "+R),S&&S(this.editor),this.editor.resize(),o&&this.editor.focus()},M.prototype.componentDidUpdate=function(y){for(var $=y,R=this.props,g=0;g 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)i=this.$editors[this.$splits-1],this.$container.removeChild(i.container),this.$splits--;this.resize()}},this.getSplits=function(){return this.$splits},this.getEditor=function(e){return this.$editors[e]},this.getCurrentEditor=function(){return this.$cEditor},this.focus=function(){this.$cEditor.focus()},this.blur=function(){this.$cEditor.blur()},this.setTheme=function(e){this.$editors.forEach(function(i){i.setTheme(e)})},this.setKeyboardHandler=function(e){this.$editors.forEach(function(i){i.setKeyboardHandler(e)})},this.forEach=function(e,i){this.$editors.forEach(e,i)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach(function(i){i.setFontSize(e)})},this.$cloneSession=function(e){var i=new a(e.getDocument(),e.getMode()),n=e.getUndoManager();return i.setUndoManager(n),i.setTabSize(e.getTabSize()),i.setUseSoftTabs(e.getUseSoftTabs()),i.setOverwrite(e.getOverwrite()),i.setBreakpoints(e.getBreakpoints()),i.setUseWrapMode(e.getUseWrapMode()),i.setUseWorker(e.getUseWorker()),i.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),i.$foldData=e.$cloneFoldData(),i},this.setSession=function(e,i){var n;i==null?n=this.$cEditor:n=this.$editors[i];var r=this.$editors.some(function(s){return s.session===e});return r&&(e=this.$cloneSession(e)),n.setSession(e),e},this.getOrientation=function(){return this.$orientation},this.setOrientation=function(e){this.$orientation!=e&&(this.$orientation=e,this.resize())},this.resize=function(){var e=this.$container.clientWidth,i=this.$container.clientHeight,n;if(this.$orientation==this.BESIDE)for(var r=e/this.$splits,s=0;s-1}function ar(I,M){var y=this.__data__,$=mt(y,I);return $<0?y.push([I,M]):y[$][1]=M,this}Je.prototype.clear=nr;Je.prototype.delete=rr;Je.prototype.get=sr;Je.prototype.has=or;Je.prototype.set=ar;function Ke(I){var M=-1,y=I?I.length:0;for(this.clear();++M0&&y.handleMarkers(O,x);for(var _=0;_"u"&&(this.Diff_Timeout<=0?o=Number.MAX_VALUE:o=new Date().getTime()+this.Diff_Timeout*1e3);var a=o;if(g==null||b==null)throw new Error("Null input. (diff_main)");if(g==b)return g?[new M.Diff(R,g)]:[];typeof h>"u"&&(h=!0);var t=h,e=this.diff_commonPrefix(g,b),i=g.substring(0,e);g=g.substring(e),b=b.substring(e),e=this.diff_commonSuffix(g,b);var n=g.substring(g.length-e);g=g.substring(0,g.length-e),b=b.substring(0,b.length-e);var r=this.diff_compute_(g,b,t,a);return i&&r.unshift(new M.Diff(R,i)),n&&r.push(new M.Diff(R,n)),this.diff_cleanupMerge(r),r},M.prototype.diff_compute_=function(g,b,h,o){var a;if(!g)return[new M.Diff($,b)];if(!b)return[new M.Diff(y,g)];var t=g.length>b.length?g:b,e=g.length>b.length?b:g,i=t.indexOf(e);if(i!=-1)return a=[new M.Diff($,t.substring(0,i)),new M.Diff(R,e),new M.Diff($,t.substring(i+e.length))],g.length>b.length&&(a[0][0]=a[2][0]=y),a;if(e.length==1)return[new M.Diff(y,g),new M.Diff($,b)];var n=this.diff_halfMatch_(g,b);if(n){var r=n[0],s=n[1],c=n[2],m=n[3],w=n[4],S=this.diff_main(r,c,h,o),C=this.diff_main(s,m,h,o);return S.concat([new M.Diff(R,w)],C)}return h&&g.length>100&&b.length>100?this.diff_lineMode_(g,b,o):this.diff_bisect_(g,b,o)},M.prototype.diff_lineMode_=function(g,b,h){var o=this.diff_linesToChars_(g,b);g=o.chars1,b=o.chars2;var a=o.lineArray,t=this.diff_main(g,b,!1,h);this.diff_charsToLines_(t,a),this.diff_cleanupSemantic(t),t.push(new M.Diff(R,""));for(var e=0,i=0,n=0,r="",s="";e=1&&n>=1){t.splice(e-i-n,i+n),e=e-i-n;for(var c=this.diff_main(r,s,!1,h),m=c.length-1;m>=0;m--)t.splice(e,0,c[m]);e=e+c.length}n=0,i=0,r="",s="";break}e++}return t.pop(),t},M.prototype.diff_bisect_=function(g,b,h){for(var o=g.length,a=b.length,t=Math.ceil((o+a)/2),e=t,i=2*t,n=new Array(i),r=new Array(i),s=0;sh);p++){for(var k=-p+w;k<=p-S;k+=2){var v=e+k,d;k==-p||k!=p&&n[v-1]o)S+=2;else if(l>a)w+=2;else if(m){var f=e+c-k;if(f>=0&&f=x)return this.diff_bisectSplit_(g,b,d,l,h)}}}for(var A=-p+C;A<=p-u;A+=2){var f=e+A,x;A==-p||A!=p&&r[f-1]o)u+=2;else if(_>a)C+=2;else if(!m){var v=e+c-A;if(v>=0&&v=x)return this.diff_bisectSplit_(g,b,d,l,h)}}}}return[new M.Diff(y,g),new M.Diff($,b)]},M.prototype.diff_bisectSplit_=function(g,b,h,o,a){var t=g.substring(0,h),e=b.substring(0,o),i=g.substring(h),n=b.substring(o),r=this.diff_main(t,e,!1,a),s=this.diff_main(i,n,!1,a);return r.concat(s)},M.prototype.diff_linesToChars_=function(g,b){var h=[],o={};h[0]="";function a(n){for(var r="",s=0,c=-1,m=h.length;co?g=g.substring(h-o):hb.length?g:b,o=g.length>b.length?b:g;if(h.length<4||o.length*2=S.length?[d,l,f,x,v]:null}var e=t(h,o,Math.ceil(h.length/4)),i=t(h,o,Math.ceil(h.length/2)),n;if(!e&&!i)return null;i?e?n=e[4].length>i[4].length?e:i:n=i:n=e;var r,s,c,m;g.length>b.length?(r=n[0],s=n[1],c=n[2],m=n[3]):(c=n[0],m=n[1],r=n[2],s=n[3]);var w=n[4];return[r,s,c,m,w]},M.prototype.diff_cleanupSemantic=function(g){for(var b=!1,h=[],o=0,a=null,t=0,e=0,i=0,n=0,r=0;t0?h[o-1]:-1,e=0,i=0,n=0,r=0,a=null,b=!0)),t++;for(b&&this.diff_cleanupMerge(g),this.diff_cleanupSemanticLossless(g),t=1;t=w?(m>=s.length/2||m>=c.length/2)&&(g.splice(t,0,new M.Diff(R,c.substring(0,m))),g[t-1][1]=s.substring(0,s.length-m),g[t+1][1]=c.substring(m),t++):(w>=s.length/2||w>=c.length/2)&&(g.splice(t,0,new M.Diff(R,s.substring(0,w))),g[t-1][0]=$,g[t-1][1]=c.substring(0,c.length-w),g[t+1][0]=y,g[t+1][1]=s.substring(w),t++),t++}t++}},M.prototype.diff_cleanupSemanticLossless=function(g){function b(w,S){if(!w||!S)return 6;var C=w.charAt(w.length-1),u=S.charAt(0),p=C.match(M.nonAlphaNumericRegex_),k=u.match(M.nonAlphaNumericRegex_),v=p&&C.match(M.whitespaceRegex_),d=k&&u.match(M.whitespaceRegex_),l=v&&C.match(M.linebreakRegex_),f=d&&u.match(M.linebreakRegex_),x=l&&w.match(M.blanklineEndRegex_),A=f&&S.match(M.blanklineStartRegex_);return x||A?5:l||f?4:p&&!v&&d?3:v||d?2:p||k?1:0}for(var h=1;h=c&&(c=m,n=o,r=a,s=t)}g[h-1][1]!=n&&(n?g[h-1][1]=n:(g.splice(h-1,1),h--),g[h][1]=r,s?g[h+1][1]=s:(g.splice(h+1,1),h--))}h++}},M.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,M.whitespaceRegex_=/\s/,M.linebreakRegex_=/[\r\n]/,M.blanklineEndRegex_=/\n\r?\n$/,M.blanklineStartRegex_=/^\r?\n\r?\n/,M.prototype.diff_cleanupEfficiency=function(g){for(var b=!1,h=[],o=0,a=null,t=0,e=!1,i=!1,n=!1,r=!1;t0?h[o-1]:-1,n=r=!1),b=!0)),t++;b&&this.diff_cleanupMerge(g)},M.prototype.diff_cleanupMerge=function(g){g.push(new M.Diff(R,""));for(var b=0,h=0,o=0,a="",t="",e;b1?(h!==0&&o!==0&&(e=this.diff_commonPrefix(t,a),e!==0&&(b-h-o>0&&g[b-h-o-1][0]==R?g[b-h-o-1][1]+=t.substring(0,e):(g.splice(0,0,new M.Diff(R,t.substring(0,e))),b++),t=t.substring(e),a=a.substring(e)),e=this.diff_commonSuffix(t,a),e!==0&&(g[b][1]=t.substring(t.length-e)+g[b][1],t=t.substring(0,t.length-e),a=a.substring(0,a.length-e))),b-=h+o,g.splice(b,h+o),a.length&&(g.splice(b,0,new M.Diff(y,a)),b++),t.length&&(g.splice(b,0,new M.Diff($,t)),b++),b++):b!==0&&g[b-1][0]==R?(g[b-1][1]+=g[b][1],g.splice(b,1)):b++,o=0,h=0,a="",t="";break}g[g.length-1][1]===""&&g.pop();var i=!1;for(b=1;bb));e++)a=h,t=o;return g.length!=e&&g[e][0]===y?t:t+(b-a)},M.prototype.diff_prettyHtml=function(g){for(var b=[],h=/&/g,o=//g,t=/\n/g,e=0;e");switch(i){case $:b[e]=''+r+"";break;case y:b[e]=''+r+"";break;case R:b[e]=""+r+"";break}}return b.join("")},M.prototype.diff_text1=function(g){for(var b=[],h=0;hthis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var o=this.match_alphabet_(b),a=this;function t(d,l){var f=d/b.length,x=Math.abs(h-l);return a.Match_Distance?f+x/a.Match_Distance:x?1:f}var e=this.Match_Threshold,i=g.indexOf(b,h);i!=-1&&(e=Math.min(t(0,i),e),i=g.lastIndexOf(b,h+b.length),i!=-1&&(e=Math.min(t(0,i),e)));var n=1<=S;p--){var k=o[g.charAt(p-1)];if(w===0?u[p]=(u[p+1]<<1|1)&k:u[p]=(u[p+1]<<1|1)&k|((m[p+1]|m[p])<<1|1)|m[p+1],u[p]&n){var v=t(w,p-1);if(v<=e)if(e=v,i=p-1,i>h)S=Math.max(1,2*h-i);else break}}if(t(w+1,h)>e)break;m=u}return i},M.prototype.match_alphabet_=function(g){for(var b={},h=0;h"u")o=g,a=this.diff_main(o,b,!0),a.length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(g&&typeof g=="object"&&typeof b>"u"&&typeof h>"u")a=g,o=this.diff_text1(a);else if(typeof g=="string"&&b&&typeof b=="object"&&typeof h>"u")o=g,a=b;else if(typeof g=="string"&&typeof b=="string"&&h&&typeof h=="object")o=g,a=h;else throw new Error("Unknown call format to patch_make.");if(a.length===0)return[];for(var t=[],e=new M.patch_obj,i=0,n=0,r=0,s=o,c=o,m=0;m=2*this.Patch_Margin&&i&&(this.patch_addContext_(e,s),t.push(e),e=new M.patch_obj,i=0,s=c,n=r);break}w!==$&&(n+=S.length),w!==y&&(r+=S.length)}return i&&(this.patch_addContext_(e,s),t.push(e)),t},M.prototype.patch_deepCopy=function(g){for(var b=[],h=0;hthis.Match_MaxBits?(n=this.match_main(b,i.substring(0,this.Match_MaxBits),e),n!=-1&&(r=this.match_main(b,i.substring(i.length-this.Match_MaxBits),e+i.length-this.Match_MaxBits),(r==-1||n>=r)&&(n=-1))):n=this.match_main(b,i,e),n==-1)a[t]=!1,o-=g[t].length2-g[t].length1;else{a[t]=!0,o=n-e;var s;if(r==-1?s=b.substring(n,n+i.length):s=b.substring(n,r+this.Match_MaxBits),i==s)b=b.substring(0,n)+this.diff_text2(g[t].diffs)+b.substring(n+i.length);else{var c=this.diff_main(i,s,!1);if(i.length>this.Match_MaxBits&&this.diff_levenshtein(c)/i.length>this.Patch_DeleteThreshold)a[t]=!1;else{this.diff_cleanupSemanticLossless(c);for(var m=0,w,S=0;St[0][1].length){var e=b-t[0][1].length;t[0][1]=h.substring(t[0][1].length)+t[0][1],a.start1-=e,a.start2-=e,a.length1+=e,a.length2+=e}if(a=g[g.length-1],t=a.diffs,t.length==0||t[t.length-1][0]!=R)t.push(new M.Diff(R,h)),a.length1+=b,a.length2+=b;else if(b>t[t.length-1][1].length){var e=b-t[t.length-1][1].length;t[t.length-1][1]+=h.substring(0,e),a.length1+=e,a.length2+=e}return h},M.prototype.patch_splitMax=function(g){for(var b=this.Match_MaxBits,h=0;h2*b?(i.length1+=s.length,a+=s.length,n=!1,i.diffs.push(new M.Diff(r,s)),o.diffs.shift()):(s=s.substring(0,b-i.length1-this.Patch_Margin),i.length1+=s.length,a+=s.length,r===R?(i.length2+=s.length,t+=s.length):n=!1,i.diffs.push(new M.Diff(r,s)),s==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(s.length))}e=this.diff_text2(i.diffs),e=e.substring(e.length-this.Patch_Margin);var c=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);c!==""&&(i.length1+=c.length,i.length2+=c.length,i.diffs.length!==0&&i.diffs[i.diffs.length-1][0]===R?i.diffs[i.diffs.length-1][1]+=c:i.diffs.push(new M.Diff(R,c))),n||g.splice(++h,0,i)}}},M.prototype.patch_toText=function(g){for(var b=[],h=0;hm)break;var w=this.getFoldWidgetRange(a,"all",t);if(w){if(w.start.row<=n)break;if(w.isMultiLine())t=w.end.row;else if(i==m)break}s=t}}return new b(n,r,s,a.getLine(s).length)},this.getCommentRegionBlock=function(a,t,e){for(var i=t.search(/\s*$/),n=a.getLength(),r=e,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++er)return new b(r,i,w,t.length)}}.call(o.prototype)}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(y,$,R){var g=y("../lib/oop"),b=y("./text").Mode,h=y("./css_highlight_rules").CssHighlightRules,o=y("./matching_brace_outdent").MatchingBraceOutdent,a=y("../worker/worker_client").WorkerClient,t=y("./css_completions").CssCompletions,e=y("./behaviour/css").CssBehaviour,i=y("./folding/cstyle").FoldMode,n=function(){this.HighlightRules=h,this.$outdent=new o,this.$behaviour=new e,this.$completer=new t,this.foldingRules=new i};g.inherits(n,b),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(r,s,c){var m=this.$getIndent(s),w=this.getTokenizer().getLineTokens(s,r).tokens;if(w.length&&w[w.length-1].type=="comment")return m;var S=s.match(/^.*\{\s*$/);return S&&(m+=c),m},this.checkOutdent=function(r,s,c){return this.$outdent.checkOutdent(s,c)},this.autoOutdent=function(r,s,c){this.$outdent.autoOutdent(s,c)},this.getCompletions=function(r,s,c,m){return this.$completer.getCompletions(r,s,c,m)},this.createWorker=function(r){var s=new a(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(r.getDocument()),s.on("annotate",function(c){r.setAnnotations(c.data)}),s.on("terminate",function(){r.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(n.prototype),$.Mode=n}),function(){ace.require(["ace/mode/css"],function(y){I&&(I.exports=y)})}()})(Ur);var Vr={exports:{}};(function(I,M){ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(y,$,R){var g=y("../lib/oop"),b=y("./text_highlight_rules").TextHighlightRules,h=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},h.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};g.inherits(h,b),h.getTagRule=function(o){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},h.getStartRule=function(o){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:o}},h.getEndRule=function(o){return{token:"comment.doc",regex:"\\*\\/",next:o}},$.DocCommentHighlightRules=h}),ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(y,$,R){var g=y("../lib/oop"),b=y("./doc_comment_highlight_rules").DocCommentHighlightRules,h=y("./text_highlight_rules").TextHighlightRules,o="[a-zA-Z\\$_\xA1-\uFFFF][a-zA-Z\\d\\$_\xA1-\uFFFF]*",a=function(i){var n=this.createKeywordMapper({"variable.language":"Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|Namespace|QName|XML|XMLList|ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt|JSON|Math|this|arguments|prototype|window|document",keyword:"const|yield|import|get|set|async|await|break|case|catch|continue|default|delete|do|else|finally|for|function|if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|__parent__|__count__|escape|unescape|with|__proto__|class|enum|extends|super|export|implements|private|public|interface|package|protected|static","storage.type":"const|let|var|function","constant.language":"null|Infinity|NaN|undefined","support.function":"alert","constant.language.boolean":"true|false"},"identifier"),r="case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void",s="\\\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|u{[0-9a-fA-F]{1,6}}|[0-2][0-7]{0,2}|3[0-7][0-7]?|[4-7][0-7]?|.)";this.$rules={no_regex:[b.getStartRule("doc-start"),e("no_regex"),{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/},{token:"constant.numeric",regex:/(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/},{token:["storage.type","punctuation.operator","support.function","punctuation.operator","entity.name.function","text","keyword.operator"],regex:"("+o+")(\\.)(prototype)(\\.)("+o+")(\\s*)(=)",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","keyword.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(=)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()",next:"function_arguments"},{token:["storage.type","text","entity.name.function","text","paren.lparen"],regex:"(function)(\\s+)("+o+")(\\s*)(\\()",next:"function_arguments"},{token:["entity.name.function","text","punctuation.operator","text","storage.type","text","paren.lparen"],regex:"("+o+")(\\s*)(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:["text","text","storage.type","text","paren.lparen"],regex:"(:)(\\s*)(function)(\\s*)(\\()",next:"function_arguments"},{token:"keyword",regex:`from(?=\\s*('|"))`},{token:"keyword",regex:"(?:"+r+")\\b",next:"start"},{token:["support.constant"],regex:/that\b/},{token:["storage.type","punctuation.operator","support.function.firebug"],regex:/(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/},{token:n,regex:o},{token:"punctuation.operator",regex:/[.](?![.])/,next:"property"},{token:"storage.type",regex:/=>/,next:"start"},{token:"keyword.operator",regex:/--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/,next:"start"},{token:"punctuation.operator",regex:/[?:,;.]/,next:"start"},{token:"paren.lparen",regex:/[\[({]/,next:"start"},{token:"paren.rparen",regex:/[\])}]/},{token:"comment",regex:/^#!.*$/}],property:[{token:"text",regex:"\\s+"},{token:["storage.type","punctuation.operator","entity.name.function","text","keyword.operator","text","storage.type","text","entity.name.function","text","paren.lparen"],regex:"("+o+")(\\.)("+o+")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()",next:"function_arguments"},{token:"punctuation.operator",regex:/[.](?![.])/},{token:"support.function",regex:/(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/},{token:"support.function.dom",regex:/(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/},{token:"support.constant",regex:/(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/},{token:"identifier",regex:o},{regex:"",token:"empty",next:"no_regex"}],start:[b.getStartRule("doc-start"),e("start"),{token:"string.regexp",regex:"\\/",next:"regex"},{token:"text",regex:"\\s+|^$",next:"start"},{token:"empty",regex:"",next:"no_regex"}],regex:[{token:"regexp.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"string.regexp",regex:"/[sxngimy]*",next:"no_regex"},{token:"invalid",regex:/\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/},{token:"constant.language.escape",regex:/\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/},{token:"constant.language.delimiter",regex:/\|/},{token:"constant.language.escape",regex:/\[\^?/,next:"regex_character_class"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp"}],regex_character_class:[{token:"regexp.charclass.keyword.operator",regex:"\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)"},{token:"constant.language.escape",regex:"]",next:"regex"},{token:"constant.language.escape",regex:"-"},{token:"empty",regex:"$",next:"no_regex"},{defaultToken:"string.regexp.charachterclass"}],function_arguments:[{token:"variable.parameter",regex:o},{token:"punctuation.operator",regex:"[, ]+"},{token:"punctuation.operator",regex:"$"},{token:"empty",regex:"",next:"no_regex"}],qqstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:'"|$',next:"no_regex"},{defaultToken:"string"}],qstring:[{token:"constant.language.escape",regex:s},{token:"string",regex:"\\\\$",consumeLineEnd:!0},{token:"string",regex:"'|$",next:"no_regex"},{defaultToken:"string"}]},(!i||!i.noES6)&&(this.$rules.no_regex.unshift({regex:"[{}]",onMatch:function(c,m,w){if(this.next=c=="{"?this.nextState:"",c=="{"&&w.length)w.unshift("start",m);else if(c=="}"&&w.length&&(w.shift(),this.next=w.shift(),this.next.indexOf("string")!=-1||this.next.indexOf("jsx")!=-1))return"paren.quasi.end";return c=="{"?"paren.lparen":"paren.rparen"},nextState:"start"},{token:"string.quasi.start",regex:/`/,push:[{token:"constant.language.escape",regex:s},{token:"paren.quasi.start",regex:/\${/,push:"start"},{token:"string.quasi.end",regex:/`/,next:"pop"},{defaultToken:"string.quasi"}]}),(!i||i.jsx!=!1)&&t.call(this)),this.embedRules(b,"doc-",[b.getEndRule("no_regex")]),this.normalizeRules()};g.inherits(a,h);function t(){var i=o.replace("\\d","\\d\\-"),n={onMatch:function(s,c,m){var w=s.charAt(1)=="/"?2:1;return w==1?(c!=this.nextState?m.unshift(this.next,this.nextState,0):m.unshift(this.next),m[2]++):w==2&&c==this.nextState&&(m[1]--,(!m[1]||m[1]<0)&&(m.shift(),m.shift())),[{type:"meta.tag.punctuation."+(w==1?"":"end-")+"tag-open.xml",value:s.slice(0,w)},{type:"meta.tag.tag-name.xml",value:s.substr(w)}]},regex:"",onMatch:function(s,c,m){return c==m[0]&&m.shift(),s.length==2&&(m[0]==this.nextState&&m[1]--,(!m[1]||m[1]<0)&&m.splice(0,2)),this.next=m[0]||"start",[{type:this.token,value:s}]},nextState:"jsx"},r,e("jsxAttributes"),{token:"entity.other.attribute-name.xml",regex:i},{token:"keyword.operator.attribute-equals.xml",regex:"="},{token:"text.tag-whitespace.xml",regex:"\\s+"},{token:"string.attribute-value.xml",regex:"'",stateName:"jsx_attr_q",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',stateName:"jsx_attr_qq",push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"reference"},{defaultToken:"string.attribute-value.xml"}]},n],this.$rules.reference=[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}]}function e(i){return[{token:"comment",regex:/\/\*/,next:[b.getTagRule(),{token:"comment",regex:"\\*\\/",next:i||"pop"},{defaultToken:"comment",caseInsensitive:!0}]},{token:"comment",regex:"\\/\\/",next:[b.getTagRule(),{token:"comment",regex:"$|^",next:i||"pop"},{defaultToken:"comment",caseInsensitive:!0}]}]}$.JavaScriptHighlightRules=a}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(y,$,R){var g=y("../range").Range,b=function(){};(function(){this.checkOutdent=function(h,o){return/^\s+$/.test(h)?/^\s*\}/.test(o):!1},this.autoOutdent=function(h,o){var a=h.getLine(o),t=a.match(/^(\s*\})/);if(!t)return 0;var e=t[1].length,i=h.findMatchingBracket({row:o,column:e});if(!i||i.row==o)return 0;var n=this.$getIndent(h.getLine(i.row));h.replace(new g(o,0,o,e-1),n)},this.$getIndent=function(h){return h.match(/^\s*/)[0]}}).call(b.prototype),$.MatchingBraceOutdent=b}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(y,$,R){var g=y("../../lib/oop"),b=y("../../range").Range,h=y("./fold_mode").FoldMode,o=$.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};g.inherits(o,h),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(a,t,e){var i=a.getLine(e);if(this.singleLineBlockCommentRe.test(i)&&!this.startRegionRe.test(i)&&!this.tripleStarBlockCommentRe.test(i))return"";var n=this._getFoldWidgetBase(a,t,e);return!n&&this.startRegionRe.test(i)?"start":n},this.getFoldWidgetRange=function(a,t,e,i){var n=a.getLine(e);if(this.startRegionRe.test(n))return this.getCommentRegionBlock(a,n,e);var c=n.match(this.foldingStartMarker);if(c){var r=c.index;if(c[1])return this.openingBracketBlock(a,c[1],e,r);var s=a.getCommentFoldRange(e,r+c[0].length,1);return s&&!s.isMultiLine()&&(i?s=this.getSectionRange(a,e):t!="all"&&(s=null)),s}if(t!=="markbegin"){var c=n.match(this.foldingStopMarker);if(c){var r=c.index+c[0].length;return c[1]?this.closingBracketBlock(a,c[1],e,r):a.getCommentFoldRange(e,r,-1)}}},this.getSectionRange=function(a,t){var e=a.getLine(t),i=e.search(/\S/),n=t,r=e.length;t=t+1;for(var s=t,c=a.getLength();++tm)break;var w=this.getFoldWidgetRange(a,"all",t);if(w){if(w.start.row<=n)break;if(w.isMultiLine())t=w.end.row;else if(i==m)break}s=t}}return new b(n,r,s,a.getLine(s).length)},this.getCommentRegionBlock=function(a,t,e){for(var i=t.search(/\s*$/),n=a.getLength(),r=e,s=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,c=1;++er)return new b(r,i,w,t.length)}}.call(o.prototype)}),ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"],function(y,$,R){var g=y("../lib/oop"),b=y("./text").Mode,h=y("./javascript_highlight_rules").JavaScriptHighlightRules,o=y("./matching_brace_outdent").MatchingBraceOutdent,a=y("../worker/worker_client").WorkerClient,t=y("./behaviour/cstyle").CstyleBehaviour,e=y("./folding/cstyle").FoldMode,i=function(){this.HighlightRules=h,this.$outdent=new o,this.$behaviour=new t,this.foldingRules=new e};g.inherits(i,b),function(){this.lineCommentStart="//",this.blockComment={start:"/*",end:"*/"},this.$quotes={'"':'"',"'":"'","`":"`"},this.getNextLineIndent=function(n,r,s){var c=this.$getIndent(r),m=this.getTokenizer().getLineTokens(r,n),w=m.tokens,S=m.state;if(w.length&&w[w.length-1].type=="comment")return c;if(n=="start"||n=="no_regex"){var C=r.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/);C&&(c+=s)}else if(n=="doc-start"){if(S=="start"||S=="no_regex")return"";var C=r.match(/^\s*(\/?)\*/);C&&(C[1]&&(c+=" "),c+="* ")}return c},this.checkOutdent=function(n,r,s){return this.$outdent.checkOutdent(r,s)},this.autoOutdent=function(n,r,s){this.$outdent.autoOutdent(r,s)},this.createWorker=function(n){var r=new a(["ace"],"ace/mode/javascript_worker","JavaScriptWorker");return r.attachToDocument(n.getDocument()),r.on("annotate",function(s){n.setAnnotations(s.data)}),r.on("terminate",function(){n.clearAnnotations()}),r},this.$id="ace/mode/javascript",this.snippetFileId="ace/snippets/javascript"}.call(i.prototype),$.Mode=i}),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],function(y,$,R){var g=y("../lib/oop");y("../lib/lang");var b=y("./text_highlight_rules").TextHighlightRules,h=$.supportType="align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index",o=$.supportFunction="rgb|rgba|url|attr|counter|counters",a=$.supportConstant="absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|flex-end|flex-start|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom",t=$.supportConstantColor="aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen",e=$.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",i=$.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",n=$.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",r=$.pseudoClasses="(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b",s=function(){var c=this.createKeywordMapper({"support.function":o,"support.constant":a,"support.type":h,"support.constant.color":t,"support.constant.fonts":e},"text",!0);this.$rules={start:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"ruleset"},{token:"paren.rparen",regex:"\\}"},{token:"string",regex:"@(?!viewport)",next:"media"},{token:"keyword",regex:"#[a-z0-9-_]+"},{token:"keyword",regex:"%"},{token:"variable",regex:"\\.[a-z0-9-_]+"},{token:"string",regex:":[a-z0-9-_]+"},{token:"constant.numeric",regex:i},{token:"constant",regex:"[a-z0-9-_]+"},{caseInsensitive:!0}],media:[{include:["strings","url","comments"]},{token:"paren.lparen",regex:"\\{",next:"start"},{token:"paren.rparen",regex:"\\}",next:"start"},{token:"string",regex:";",next:"start"},{token:"keyword",regex:"(?:media|supports|document|charset|import|namespace|media|supports|document|page|font|keyframes|viewport|counter-style|font-feature-values|swash|ornaments|annotation|stylistic|styleset|character-variant)"}],comments:[{token:"comment",regex:"\\/\\*",push:[{token:"comment",regex:"\\*\\/",next:"pop"},{defaultToken:"comment"}]}],ruleset:[{regex:"-(webkit|ms|moz|o)-",token:"text"},{token:"punctuation.operator",regex:"[:;]"},{token:"paren.rparen",regex:"\\}",next:"start"},{include:["strings","url","comments"]},{token:["constant.numeric","keyword"],regex:"("+i+")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)"},{token:"constant.numeric",regex:i},{token:"constant.numeric",regex:"#[a-f0-9]{6}"},{token:"constant.numeric",regex:"#[a-f0-9]{3}"},{token:["punctuation","entity.other.attribute-name.pseudo-element.css"],regex:n},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:r},{include:"url"},{token:c,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{caseInsensitive:!0}],url:[{token:"support.function",regex:"(?:url(:?-prefix)?|domain|regexp)\\(",push:[{token:"support.function",regex:"\\)",next:"pop"},{defaultToken:"string"}]}],strings:[{token:"string.start",regex:"'",push:[{token:"string.end",regex:"'|$",next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]},{token:"string.start",regex:'"',push:[{token:"string.end",regex:'"|$',next:"pop"},{include:"escapes"},{token:"constant.language.escape",regex:/\\$/,consumeLineEnd:!0},{defaultToken:"string"}]}],escapes:[{token:"constant.language.escape",regex:/\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/}]},this.normalizeRules()};g.inherits(s,b),$.CssHighlightRules=s}),ace.define("ace/mode/css_completions",["require","exports","module"],function(y,$,R){var g={background:{"#$0":1},"background-color":{"#$0":1,transparent:1,fixed:1},"background-image":{"url('/$0')":1},"background-repeat":{repeat:1,"repeat-x":1,"repeat-y":1,"no-repeat":1,inherit:1},"background-position":{bottom:2,center:2,left:2,right:2,top:2,inherit:2},"background-attachment":{scroll:1,fixed:1},"background-size":{cover:1,contain:1},"background-clip":{"border-box":1,"padding-box":1,"content-box":1},"background-origin":{"border-box":1,"padding-box":1,"content-box":1},border:{"solid $0":1,"dashed $0":1,"dotted $0":1,"#$0":1},"border-color":{"#$0":1},"border-style":{solid:2,dashed:2,dotted:2,double:2,groove:2,hidden:2,inherit:2,inset:2,none:2,outset:2,ridged:2},"border-collapse":{collapse:1,separate:1},bottom:{px:1,em:1,"%":1},clear:{left:1,right:1,both:1,none:1},color:{"#$0":1,"rgb(#$00,0,0)":1},cursor:{default:1,pointer:1,move:1,text:1,wait:1,help:1,progress:1,"n-resize":1,"ne-resize":1,"e-resize":1,"se-resize":1,"s-resize":1,"sw-resize":1,"w-resize":1,"nw-resize":1},display:{none:1,block:1,inline:1,"inline-block":1,"table-cell":1},"empty-cells":{show:1,hide:1},float:{left:1,right:1,none:1},"font-family":{Arial:2,"Comic Sans MS":2,Consolas:2,"Courier New":2,Courier:2,Georgia:2,Monospace:2,"Sans-Serif":2,"Segoe UI":2,Tahoma:2,"Times New Roman":2,"Trebuchet MS":2,Verdana:1},"font-size":{px:1,em:1,"%":1},"font-weight":{bold:1,normal:1},"font-style":{italic:1,normal:1},"font-variant":{normal:1,"small-caps":1},height:{px:1,em:1,"%":1},left:{px:1,em:1,"%":1},"letter-spacing":{normal:1},"line-height":{normal:1},"list-style-type":{none:1,disc:1,circle:1,square:1,decimal:1,"decimal-leading-zero":1,"lower-roman":1,"upper-roman":1,"lower-greek":1,"lower-latin":1,"upper-latin":1,georgian:1,"lower-alpha":1,"upper-alpha":1},margin:{px:1,em:1,"%":1},"margin-right":{px:1,em:1,"%":1},"margin-left":{px:1,em:1,"%":1},"margin-top":{px:1,em:1,"%":1},"margin-bottom":{px:1,em:1,"%":1},"max-height":{px:1,em:1,"%":1},"max-width":{px:1,em:1,"%":1},"min-height":{px:1,em:1,"%":1},"min-width":{px:1,em:1,"%":1},overflow:{hidden:1,visible:1,auto:1,scroll:1},"overflow-x":{hidden:1,visible:1,auto:1,scroll:1},"overflow-y":{hidden:1,visible:1,auto:1,scroll:1},padding:{px:1,em:1,"%":1},"padding-top":{px:1,em:1,"%":1},"padding-right":{px:1,em:1,"%":1},"padding-bottom":{px:1,em:1,"%":1},"padding-left":{px:1,em:1,"%":1},"page-break-after":{auto:1,always:1,avoid:1,left:1,right:1},"page-break-before":{auto:1,always:1,avoid:1,left:1,right:1},position:{absolute:1,relative:1,fixed:1,static:1},right:{px:1,em:1,"%":1},"table-layout":{fixed:1,auto:1},"text-decoration":{none:1,underline:1,"line-through":1,blink:1},"text-align":{left:1,right:1,center:1,justify:1},"text-transform":{capitalize:1,uppercase:1,lowercase:1,none:1},top:{px:1,em:1,"%":1},"vertical-align":{top:1,bottom:1},visibility:{hidden:1,visible:1},"white-space":{nowrap:1,normal:1,pre:1,"pre-line":1,"pre-wrap":1},width:{px:1,em:1,"%":1},"word-spacing":{normal:1},filter:{"alpha(opacity=$0100)":1},"text-shadow":{"$02px 2px 2px #777":1},"text-overflow":{"ellipsis-word":1,clip:1,ellipsis:1},"-moz-border-radius":1,"-moz-border-radius-topright":1,"-moz-border-radius-bottomright":1,"-moz-border-radius-topleft":1,"-moz-border-radius-bottomleft":1,"-webkit-border-radius":1,"-webkit-border-top-right-radius":1,"-webkit-border-top-left-radius":1,"-webkit-border-bottom-right-radius":1,"-webkit-border-bottom-left-radius":1,"-moz-box-shadow":1,"-webkit-box-shadow":1,transform:{"rotate($00deg)":1,"skew($00deg)":1},"-moz-transform":{"rotate($00deg)":1,"skew($00deg)":1},"-webkit-transform":{"rotate($00deg)":1,"skew($00deg)":1}},b=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var h=document.createElement("c").style;for(var o in h)if(typeof h[o]=="string"){var a=o.replace(/[A-Z]/g,function(t){return"-"+t.toLowerCase()});g.hasOwnProperty(a)||(g[a]=1)}}this.completionsDefined=!0},this.getCompletions=function(h,o,a,t){if(this.completionsDefined||this.defineCompletions(),h==="ruleset"||o.$mode.$id=="ace/mode/scss"){var e=o.getLine(a.row).substr(0,a.column),i=/\([^)]*$/.test(e);return i&&(e=e.substr(e.lastIndexOf("(")+1)),/:[^;]+$/.test(e)?(/([\w\-]+):[^:]*$/.test(e),this.getPropertyValueCompletions(h,o,a,t)):this.getPropertyCompletions(h,o,a,t,i)}return[]},this.getPropertyCompletions=function(h,o,a,t,e){e=e||!1;var i=Object.keys(g);return i.map(function(n){return{caption:n,snippet:n+": $0"+(e?"":";"),meta:"property",score:1e6}})},this.getPropertyValueCompletions=function(h,o,a,t){var e=o.getLine(a.row).substr(0,a.column),i=(/([\w\-]+):[^:]*$/.exec(e)||{})[1];if(!i)return[];var n=[];return i in g&&typeof g[i]=="object"&&(n=Object.keys(g[i])),n.map(function(r){return{caption:r,snippet:r,meta:"property value",score:1e6}})}}).call(b.prototype),$.CssCompletions=b}),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],function(y,$,R){var g=y("../../lib/oop");y("../behaviour").Behaviour;var b=y("./cstyle").CstyleBehaviour,h=y("../../token_iterator").TokenIterator,o=function(){this.inherit(b),this.add("colon","insertion",function(a,t,e,i,n){if(n===":"&&e.selection.isEmpty()){var r=e.getCursorPosition(),s=new h(i,r.row,r.column),c=s.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=s.stepBackward()),c&&c.type==="support.type"){var m=i.doc.getLine(r.row),w=m.substring(r.column,r.column+1);if(w===":")return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(m.substring(r.column)))return{text:":;",selection:[1,1]}}}}),this.add("colon","deletion",function(a,t,e,i,n){var r=i.doc.getTextRange(n);if(!n.isMultiLine()&&r===":"){var s=e.getCursorPosition(),c=new h(i,s.row,s.column),m=c.getCurrentToken();if(m&&m.value.match(/\s+/)&&(m=c.stepBackward()),m&&m.type==="support.type"){var w=i.doc.getLine(n.start.row),S=w.substring(n.end.column,n.end.column+1);if(S===";")return n.end.column++,n}}}),this.add("semicolon","insertion",function(a,t,e,i,n){if(n===";"&&e.selection.isEmpty()){var r=e.getCursorPosition(),s=i.doc.getLine(r.row),c=s.substring(r.column,r.column+1);if(c===";")return{text:"",selection:[1,1]}}}),this.add("!important","insertion",function(a,t,e,i,n){if(n==="!"&&e.selection.isEmpty()){var r=e.getCursorPosition(),s=i.doc.getLine(r.row);if(/^\s*(;|}|$)/.test(s.substring(r.column)))return{text:"!important",selection:[10,10]}}})};g.inherits(o,b),$.CssBehaviour=o}),ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"],function(y,$,R){var g=y("../lib/oop"),b=y("./text").Mode,h=y("./css_highlight_rules").CssHighlightRules,o=y("./matching_brace_outdent").MatchingBraceOutdent,a=y("../worker/worker_client").WorkerClient,t=y("./css_completions").CssCompletions,e=y("./behaviour/css").CssBehaviour,i=y("./folding/cstyle").FoldMode,n=function(){this.HighlightRules=h,this.$outdent=new o,this.$behaviour=new e,this.$completer=new t,this.foldingRules=new i};g.inherits(n,b),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(r,s,c){var m=this.$getIndent(s),w=this.getTokenizer().getLineTokens(s,r).tokens;if(w.length&&w[w.length-1].type=="comment")return m;var S=s.match(/^.*\{\s*$/);return S&&(m+=c),m},this.checkOutdent=function(r,s,c){return this.$outdent.checkOutdent(s,c)},this.autoOutdent=function(r,s,c){this.$outdent.autoOutdent(s,c)},this.getCompletions=function(r,s,c,m){return this.$completer.getCompletions(r,s,c,m)},this.createWorker=function(r){var s=new a(["ace"],"ace/mode/css_worker","Worker");return s.attachToDocument(r.getDocument()),s.on("annotate",function(c){r.setAnnotations(c.data)}),s.on("terminate",function(){r.clearAnnotations()}),s},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(n.prototype),$.Mode=n}),ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(y,$,R){var g=y("../lib/oop"),b=y("./text_highlight_rules").TextHighlightRules,h=function(o){var a="[_:a-zA-Z\xC0-\uFFFF][-_:.a-zA-Z0-9\xC0-\uFFFF]*";this.$rules={start:[{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:["punctuation.instruction.xml","keyword.instruction.xml"],regex:"(<\\?)("+a+")",next:"processing_instruction"},{token:"comment.start.xml",regex:"<\\!--",next:"comment"},{token:["xml-pe.doctype.xml","xml-pe.doctype.xml"],regex:"(<\\!)(DOCTYPE)(?=[\\s])",next:"doctype",caseInsensitive:!0},{include:"tag"},{token:"text.end-tag-open.xml",regex:"",next:"start"}],doctype:[{include:"whitespace"},{include:"string"},{token:"xml-pe.doctype.xml",regex:">",next:"start"},{token:"xml-pe.xml",regex:"[-_a-zA-Z0-9:]+"},{token:"punctuation.int-subset",regex:"\\[",push:"int_subset"}],int_subset:[{token:"text.xml",regex:"\\s+"},{token:"punctuation.int-subset.xml",regex:"]",next:"pop"},{token:["punctuation.markup-decl.xml","keyword.markup-decl.xml"],regex:"(<\\!)("+a+")",push:[{token:"text",regex:"\\s+"},{token:"punctuation.markup-decl.xml",regex:">",next:"pop"},{include:"string"}]}],cdata:[{token:"string.cdata.xml",regex:"\\]\\]>",next:"start"},{token:"text.xml",regex:"\\s+"},{token:"text.xml",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment.end.xml",regex:"-->",next:"start"},{defaultToken:"comment.xml"}],reference:[{token:"constant.language.escape.reference.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],attr_reference:[{token:"constant.language.escape.reference.attribute-value.xml",regex:"(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)"}],tag:[{token:["meta.tag.punctuation.tag-open.xml","meta.tag.punctuation.end-tag-open.xml","meta.tag.tag-name.xml"],regex:"(?:(<)|(",next:"start"}]}],tag_whitespace:[{token:"text.tag-whitespace.xml",regex:"\\s+"}],whitespace:[{token:"text.whitespace.xml",regex:"\\s+"}],string:[{token:"string.xml",regex:"'",push:[{token:"string.xml",regex:"'",next:"pop"},{defaultToken:"string.xml"}]},{token:"string.xml",regex:'"',push:[{token:"string.xml",regex:'"',next:"pop"},{defaultToken:"string.xml"}]}],attributes:[{token:"entity.other.attribute-name.xml",regex:a},{token:"keyword.operator.attribute-equals.xml",regex:"="},{include:"tag_whitespace"},{include:"attribute_value"}],attribute_value:[{token:"string.attribute-value.xml",regex:"'",push:[{token:"string.attribute-value.xml",regex:"'",next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]},{token:"string.attribute-value.xml",regex:'"',push:[{token:"string.attribute-value.xml",regex:'"',next:"pop"},{include:"attr_reference"},{defaultToken:"string.attribute-value.xml"}]}]},this.constructor===h&&this.normalizeRules()};(function(){this.embedTagRules=function(o,a,t){this.$rules.tag.unshift({token:["meta.tag.punctuation.tag-open.xml","meta.tag."+t+".tag-name.xml"],regex:"(<)("+t+"(?=\\s|>|$))",next:[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:a+"start"}]}),this.$rules[t+"-end"]=[{include:"attributes"},{token:"meta.tag.punctuation.tag-close.xml",regex:"/?>",next:"start",onMatch:function(e,i,n){return n.splice(0),this.token}}],this.embedRules(o,a,[{token:["meta.tag.punctuation.end-tag-open.xml","meta.tag."+t+".tag-name.xml"],regex:"(|$))",next:t+"-end"},{token:"string.cdata.xml",regex:"<\\!\\[CDATA\\["},{token:"string.cdata.xml",regex:"\\]\\]>"}])}}).call(b.prototype),g.inherits(h,b),$.XmlHighlightRules=h}),ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(y,$,R){var g=y("../lib/oop"),b=y("../lib/lang"),h=y("./css_highlight_rules").CssHighlightRules,o=y("./javascript_highlight_rules").JavaScriptHighlightRules,a=y("./xml_highlight_rules").XmlHighlightRules,t=b.createMap({a:"anchor",button:"form",form:"form",img:"image",input:"form",label:"form",option:"form",script:"script",select:"form",textarea:"form",style:"style",table:"table",tbody:"table",td:"table",tfoot:"table",th:"table",tr:"table"}),e=function(){a.call(this),this.addRules({attributes:[{include:"tag_whitespace"},{token:"entity.other.attribute-name.xml",regex:"[-_a-zA-Z0-9:.]+"},{token:"keyword.operator.attribute-equals.xml",regex:"=",push:[{include:"tag_whitespace"},{token:"string.unquoted.attribute-value.html",regex:"[^<>='\"`\\s]+",next:"pop"},{token:"empty",regex:"",next:"pop"}]},{include:"attribute_value"}],tag:[{token:function(i,n){var r=t[n];return["meta.tag.punctuation."+(i=="<"?"":"end-")+"tag-open.xml","meta.tag"+(r?"."+r:"")+".tag-name.xml"]},regex:"(",next:"start"}]}),this.embedTagRules(h,"css-","style"),this.embedTagRules(new o({jsx:!1}).getRules(),"js-","script"),this.constructor===e&&this.normalizeRules()};g.inherits(e,a),$.HtmlHighlightRules=e}),ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(y,$,R){var g=y("../../lib/oop"),b=y("../behaviour").Behaviour,h=y("../../token_iterator").TokenIterator;y("../../lib/lang");function o(t,e){return t&&t.type.lastIndexOf(e+".xml")>-1}var a=function(){this.add("string_dquotes","insertion",function(t,e,i,n,r){if(r=='"'||r=="'"){var s=r,c=n.doc.getTextRange(i.getSelectionRange());if(c!==""&&c!=="'"&&c!='"'&&i.getWrapBehavioursEnabled())return{text:s+c+s,selection:!1};var m=i.getCursorPosition(),w=n.doc.getLine(m.row),S=w.substring(m.column,m.column+1),C=new h(n,m.row,m.column),u=C.getCurrentToken();if(S==s&&(o(u,"attribute-value")||o(u,"string")))return{text:"",selection:[1,1]};if(u||(u=C.stepBackward()),!u)return;for(;o(u,"tag-whitespace")||o(u,"whitespace");)u=C.stepBackward();var p=!S||S.match(/\s/);if(o(u,"attribute-equals")&&(p||S==">")||o(u,"decl-attribute-equals")&&(p||S=="?"))return{text:s+s,selection:[1,1]}}}),this.add("string_dquotes","deletion",function(t,e,i,n,r){var s=n.doc.getTextRange(r);if(!r.isMultiLine()&&(s=='"'||s=="'")){var c=n.doc.getLine(r.start.row),m=c.substring(r.start.column+1,r.start.column+2);if(m==s)return r.end.column++,r}}),this.add("autoclosing","insertion",function(t,e,i,n,r){if(r==">"){var s=i.getSelectionRange().start,c=new h(n,s.row,s.column),m=c.getCurrentToken()||c.stepBackward();if(!m||!(o(m,"tag-name")||o(m,"tag-whitespace")||o(m,"attribute-name")||o(m,"attribute-equals")||o(m,"attribute-value"))||o(m,"reference.attribute-value"))return;if(o(m,"attribute-value")){var w=c.getCurrentTokenColumn()+m.value.length;if(s.column/.test(n.getLine(s.row).slice(s.column)))return;for(;!o(m,"tag-name");)if(m=c.stepBackward(),m.value=="<"){m=c.stepForward();break}var C=c.getCurrentTokenRow(),u=c.getCurrentTokenColumn();if(o(c.stepBackward(),"end-tag-open"))return;var p=m.value;return C==s.row&&(p=p.substring(0,s.column-u)),this.voidElements.hasOwnProperty(p.toLowerCase())?void 0:{text:">",selection:[1,1]}}}),this.add("autoindent","insertion",function(t,e,i,n,r){if(r==` `){var s=i.getCursorPosition(),c=n.getLine(s.row),m=new h(n,s.row,s.column),w=m.getCurrentToken();if(w&&w.type.indexOf("tag-close")!==-1){if(w.value=="/>")return;for(;w&&w.type.indexOf("tag-name")===-1;)w=m.stepBackward();if(!w)return;var S=w.value,C=m.getCurrentTokenRow();if(w=m.stepBackward(),!w||w.type.indexOf("end-tag")!==-1)return;if(this.voidElements&&!this.voidElements[S]){var u=n.getTokenAt(s.row,s.column+1),c=n.getLine(C),p=this.$getIndent(c),k=p+n.getTabString();return u&&u.value==="-1}(function(){this.getFoldWidget=function(e,i,n){var r=this._getFirstTagInLine(e,n);return r?r.closing||!r.tagName&&r.selfClosing?i==="markbeginend"?"end":"":!r.tagName||r.selfClosing||this.voidElements.hasOwnProperty(r.tagName.toLowerCase())||this._findEndTagInLine(e,n,r.tagName,r.end.column)?"":"start":this.getCommentFoldWidget(e,n)},this.getCommentFoldWidget=function(e,i){return/comment/.test(e.getState(i))&&/";break}return r}else if(t(c,"tag-close"))return r.selfClosing=c.value=="/>",r;r.start.column+=c.value.length}return null},this._findEndTagInLine=function(e,i,n,r){for(var s=e.getTokens(i),c=0,m=0;m-1}function i(s,c){for(var m=new g(s,c.row,c.column),w=m.getCurrentToken();w&&!e(w,"tag-name");)w=m.stepBackward();if(w)return w.value}function n(s,c){for(var m=new g(s,c.row,c.column),w=m.getCurrentToken();w&&!e(w,"attribute-name");)w=m.stepBackward();if(w)return w.value}var r=function(){};(function(){this.getCompletions=function(s,c,m,w){var S=c.getTokenAt(m.row,m.column);if(!S)return[];if(e(S,"tag-name")||e(S,"tag-open")||e(S,"end-tag-open"))return this.getTagCompletions(s,c,m,w);if(e(S,"tag-whitespace")||e(S,"attribute-name"))return this.getAttributeCompletions(s,c,m,w);if(e(S,"attribute-value"))return this.getAttributeValueCompletions(s,c,m,w);var C=c.getLine(m.row).substr(0,m.column);return/&[a-z]*$/i.test(C)?this.getHTMLEntityCompletions(s,c,m,w):[]},this.getTagCompletions=function(s,c,m,w){return t.map(function(S){return{value:S,meta:"tag",score:1e6}})},this.getAttributeCompletions=function(s,c,m,w){var S=i(c,m);if(!S)return[];var C=o;return S in a&&(C=C.concat(Object.keys(a[S]))),C.map(function(u){return{caption:u,snippet:u+'="$0"',meta:"attribute",score:1e6}})},this.getAttributeValueCompletions=function(s,c,m,w){var S=i(c,m),C=n(c,m);if(!S)return[];var u=[];return S in a&&C in a[S]&&typeof a[S][C]=="object"&&(u=Object.keys(a[S][C])),u.map(function(p){return{caption:p,snippet:p,meta:"attribute value",score:1e6}})},this.getHTMLEntityCompletions=function(s,c,m,w){var S=["Aacute;","aacute;","Acirc;","acirc;","acute;","AElig;","aelig;","Agrave;","agrave;","alefsym;","Alpha;","alpha;","amp;","and;","ang;","Aring;","aring;","asymp;","Atilde;","atilde;","Auml;","auml;","bdquo;","Beta;","beta;","brvbar;","bull;","cap;","Ccedil;","ccedil;","cedil;","cent;","Chi;","chi;","circ;","clubs;","cong;","copy;","crarr;","cup;","curren;","Dagger;","dagger;","dArr;","darr;","deg;","Delta;","delta;","diams;","divide;","Eacute;","eacute;","Ecirc;","ecirc;","Egrave;","egrave;","empty;","emsp;","ensp;","Epsilon;","epsilon;","equiv;","Eta;","eta;","ETH;","eth;","Euml;","euml;","euro;","exist;","fnof;","forall;","frac12;","frac14;","frac34;","frasl;","Gamma;","gamma;","ge;","gt;","hArr;","harr;","hearts;","hellip;","Iacute;","iacute;","Icirc;","icirc;","iexcl;","Igrave;","igrave;","image;","infin;","int;","Iota;","iota;","iquest;","isin;","Iuml;","iuml;","Kappa;","kappa;","Lambda;","lambda;","lang;","laquo;","lArr;","larr;","lceil;","ldquo;","le;","lfloor;","lowast;","loz;","lrm;","lsaquo;","lsquo;","lt;","macr;","mdash;","micro;","middot;","minus;","Mu;","mu;","nabla;","nbsp;","ndash;","ne;","ni;","not;","notin;","nsub;","Ntilde;","ntilde;","Nu;","nu;","Oacute;","oacute;","Ocirc;","ocirc;","OElig;","oelig;","Ograve;","ograve;","oline;","Omega;","omega;","Omicron;","omicron;","oplus;","or;","ordf;","ordm;","Oslash;","oslash;","Otilde;","otilde;","otimes;","Ouml;","ouml;","para;","part;","permil;","perp;","Phi;","phi;","Pi;","pi;","piv;","plusmn;","pound;","Prime;","prime;","prod;","prop;","Psi;","psi;","quot;","radic;","rang;","raquo;","rArr;","rarr;","rceil;","rdquo;","real;","reg;","rfloor;","Rho;","rho;","rlm;","rsaquo;","rsquo;","sbquo;","Scaron;","scaron;","sdot;","sect;","shy;","Sigma;","sigma;","sigmaf;","sim;","spades;","sub;","sube;","sum;","sup;","sup1;","sup2;","sup3;","supe;","szlig;","Tau;","tau;","there4;","Theta;","theta;","thetasym;","thinsp;","THORN;","thorn;","tilde;","times;","trade;","Uacute;","uacute;","uArr;","uarr;","Ucirc;","ucirc;","Ugrave;","ugrave;","uml;","upsih;","Upsilon;","upsilon;","Uuml;","uuml;","weierp;","Xi;","xi;","Yacute;","yacute;","yen;","Yuml;","yuml;","Zeta;","zeta;","zwj;","zwnj;"];return S.map(function(C){return{caption:C,snippet:C,meta:"html entity",score:1e6}})}}).call(r.prototype),$.HtmlCompletions=r}),ace.define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"],function(y,$,R){var g=y("../lib/oop"),b=y("../lib/lang"),h=y("./text").Mode,o=y("./javascript").Mode,a=y("./css").Mode,t=y("./html_highlight_rules").HtmlHighlightRules,e=y("./behaviour/xml").XmlBehaviour,i=y("./folding/html").FoldMode,n=y("./html_completions").HtmlCompletions,r=y("../worker/worker_client").WorkerClient,s=["area","base","br","col","embed","hr","img","input","keygen","link","meta","menuitem","param","source","track","wbr"],c=["li","dt","dd","p","rt","rp","optgroup","option","colgroup","td","th"],m=function(w){this.fragmentContext=w&&w.fragmentContext,this.HighlightRules=t,this.$behaviour=new e,this.$completer=new n,this.createModeDelegates({"js-":o,"css-":a}),this.foldingRules=new i(this.voidElements,b.arrayToMap(c))};g.inherits(m,h),function(){this.blockComment={start:""},this.voidElements=b.arrayToMap(s),this.getNextLineIndent=function(w,S,C){return this.$getIndent(S)},this.checkOutdent=function(w,S,C){return!1},this.getCompletions=function(w,S,C,u){return this.$completer.getCompletions(w,S,C,u)},this.createWorker=function(w){if(this.constructor==m){var S=new r(["ace"],"ace/mode/html_worker","Worker");return S.attachToDocument(w.getDocument()),this.fragmentContext&&S.call("setOptions",[{context:this.fragmentContext}]),S.on("error",function(C){w.setAnnotations(C.data)}),S.on("terminate",function(){w.clearAnnotations()}),S}},this.$id="ace/mode/html",this.snippetFileId="ace/snippets/html"}.call(m.prototype),$.Mode=m}),function(){ace.require(["ace/mode/html"],function(y){I&&(I.exports=y)})}()})(Vr);var Gr={exports:{}};(function(I,M){ace.define("ace/theme/chrome.css",["require","exports","module"],function(y,$,R){R.exports=`.ace-chrome .ace_gutter { background: #ebebeb; color: #333; overflow : hidden; } .ace-chrome .ace_print-margin { width: 1px; background: #e8e8e8; } .ace-chrome { background-color: #FFFFFF; color: black; } .ace-chrome .ace_cursor { color: black; } .ace-chrome .ace_invisible { color: rgb(191, 191, 191); } .ace-chrome .ace_constant.ace_buildin { color: rgb(88, 72, 246); } .ace-chrome .ace_constant.ace_language { color: rgb(88, 92, 246); } .ace-chrome .ace_constant.ace_library { color: rgb(6, 150, 14); } .ace-chrome .ace_invalid { background-color: rgb(153, 0, 0); color: white; } .ace-chrome .ace_fold { } .ace-chrome .ace_support.ace_function { color: rgb(60, 76, 114); } .ace-chrome .ace_support.ace_constant { color: rgb(6, 150, 14); } .ace-chrome .ace_support.ace_type, .ace-chrome .ace_support.ace_class .ace-chrome .ace_support.ace_other { color: rgb(109, 121, 222); } .ace-chrome .ace_variable.ace_parameter { font-style:italic; color:#FD971F; } .ace-chrome .ace_keyword.ace_operator { color: rgb(104, 118, 135); } .ace-chrome .ace_comment { color: #236e24; } .ace-chrome .ace_comment.ace_doc { color: #236e24; } .ace-chrome .ace_comment.ace_doc.ace_tag { color: #236e24; } .ace-chrome .ace_constant.ace_numeric { color: rgb(0, 0, 205); } .ace-chrome .ace_variable { color: rgb(49, 132, 149); } .ace-chrome .ace_xml-pe { color: rgb(104, 104, 91); } .ace-chrome .ace_entity.ace_name.ace_function { color: #0000A2; } .ace-chrome .ace_heading { color: rgb(12, 7, 255); } .ace-chrome .ace_list { color:rgb(185, 6, 144); } .ace-chrome .ace_marker-layer .ace_selection { background: rgb(181, 213, 255); } .ace-chrome .ace_marker-layer .ace_step { background: rgb(252, 255, 0); } .ace-chrome .ace_marker-layer .ace_stack { background: rgb(164, 229, 101); } .ace-chrome .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192); } .ace-chrome .ace_marker-layer .ace_active-line { background: rgba(0, 0, 0, 0.07); } .ace-chrome .ace_gutter-active-line { background-color : #dcdcdc; } .ace-chrome .ace_marker-layer .ace_selected-word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250); } .ace-chrome .ace_storage, .ace-chrome .ace_keyword, .ace-chrome .ace_meta.ace_tag { color: rgb(147, 15, 128); } .ace-chrome .ace_string.ace_regex { color: rgb(255, 0, 0) } .ace-chrome .ace_string { color: #1A1AA6; } .ace-chrome .ace_entity.ace_other.ace_attribute-name { color: #994409; } .ace-chrome .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; } .ace-chrome .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } `}),ace.define("ace/theme/chrome",["require","exports","module","ace/theme/chrome.css","ace/lib/dom"],function(y,$,R){$.isDark=!1,$.cssClass="ace-chrome",$.cssText=y("./chrome.css");var g=y("../lib/dom");g.importCssString($.cssText,$.cssClass,!1)}),function(){ace.require(["ace/theme/chrome"],function(y){I&&(I.exports=y)})}()})(Gr);var Kr={exports:{}};(function(I,M){ace.define("ace/theme/tomorrow_night.css",["require","exports","module"],function(y,$,R){R.exports=`.ace-tomorrow-night .ace_gutter { background: #25282c; color: #C5C8C6 } .ace-tomorrow-night .ace_print-margin { width: 1px; background: #25282c } .ace-tomorrow-night { background-color: #1D1F21; color: #C5C8C6 } .ace-tomorrow-night .ace_cursor { color: #AEAFAD } .ace-tomorrow-night .ace_marker-layer .ace_selection { background: #373B41 } .ace-tomorrow-night.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px #1D1F21; } .ace-tomorrow-night .ace_marker-layer .ace_step { background: rgb(102, 82, 0) } .ace-tomorrow-night .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #4B4E55 } .ace-tomorrow-night .ace_marker-layer .ace_active-line { background: #282A2E } .ace-tomorrow-night .ace_gutter-active-line { background-color: #282A2E } .ace-tomorrow-night .ace_marker-layer .ace_selected-word { border: 1px solid #373B41 } .ace-tomorrow-night .ace_invisible { color: #4B4E55 } .ace-tomorrow-night .ace_keyword, .ace-tomorrow-night .ace_meta, .ace-tomorrow-night .ace_storage, .ace-tomorrow-night .ace_storage.ace_type, .ace-tomorrow-night .ace_support.ace_type { color: #B294BB } .ace-tomorrow-night .ace_keyword.ace_operator { color: #8ABEB7 } .ace-tomorrow-night .ace_constant.ace_character, .ace-tomorrow-night .ace_constant.ace_language, .ace-tomorrow-night .ace_constant.ace_numeric, .ace-tomorrow-night .ace_keyword.ace_other.ace_unit, .ace-tomorrow-night .ace_support.ace_constant, .ace-tomorrow-night .ace_variable.ace_parameter { color: #DE935F } .ace-tomorrow-night .ace_constant.ace_other { color: #CED1CF } .ace-tomorrow-night .ace_invalid { color: #CED2CF; background-color: #DF5F5F } .ace-tomorrow-night .ace_invalid.ace_deprecated { color: #CED2CF; background-color: #B798BF } .ace-tomorrow-night .ace_fold { background-color: #81A2BE; border-color: #C5C8C6 } .ace-tomorrow-night .ace_entity.ace_name.ace_function, .ace-tomorrow-night .ace_support.ace_function, .ace-tomorrow-night .ace_variable { color: #81A2BE } .ace-tomorrow-night .ace_support.ace_class, .ace-tomorrow-night .ace_support.ace_type { color: #F0C674 } .ace-tomorrow-night .ace_heading, .ace-tomorrow-night .ace_markup.ace_heading, .ace-tomorrow-night .ace_string { color: #B5BD68 } .ace-tomorrow-night .ace_entity.ace_name.ace_tag, .ace-tomorrow-night .ace_entity.ace_other.ace_attribute-name, .ace-tomorrow-night .ace_meta.ace_tag, .ace-tomorrow-night .ace_string.ace_regexp, .ace-tomorrow-night .ace_variable { color: #CC6666 } .ace-tomorrow-night .ace_comment { color: #969896 } .ace-tomorrow-night .ace_indent-guide { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y } .ace-tomorrow-night .ace_indent-guide-active { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAZSURBVHjaYvj///9/hivKyv8BAAAA//8DACLqBhbvk+/eAAAAAElFTkSuQmCC") right repeat-y; } `}),ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/theme/tomorrow_night.css","ace/lib/dom"],function(y,$,R){$.isDark=!0,$.cssClass="ace-tomorrow-night",$.cssText=y("./tomorrow_night.css");var g=y("../lib/dom");g.importCssString($.cssText,$.cssClass,!1)}),function(){ace.require(["ace/theme/tomorrow_night"],function(y){I&&(I.exports=y)})}()})(Kr);var jr={exports:{}};(function(I,M){ace.define("ace/snippets",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/editor"],function(y,$,R){var g=y("./lib/dom"),b=y("./lib/oop"),h=y("./lib/event_emitter").EventEmitter,o=y("./lib/lang"),a=y("./range").Range,t=y("./range_list").RangeList,e=y("./keyboard/hash_handler").HashHandler,i=y("./tokenizer").Tokenizer,n=y("./clipboard"),r={CURRENT_WORD:function(u){return u.session.getTextRange(u.session.getWordRange())},SELECTION:function(u,p,k){var v=u.session.getTextRange();return k?v.replace(/\n\r?([ \t]*\S)/g,` `+k+"$1"):v},CURRENT_LINE:function(u){return u.session.getLine(u.getCursorPosition().row)},PREV_LINE:function(u){return u.session.getLine(u.getCursorPosition().row-1)},LINE_INDEX:function(u){return u.getCursorPosition().row},LINE_NUMBER:function(u){return u.getCursorPosition().row+1},SOFT_TABS:function(u){return u.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(u){return u.session.getTabSize()},CLIPBOARD:function(u){return n.getText&&n.getText()},FILENAME:function(u){return/[^/\\]*$/.exec(this.FILEPATH(u))[0]},FILENAME_BASE:function(u){return/[^/\\]*$/.exec(this.FILEPATH(u))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(u){return this.FILEPATH(u).replace(/[^/\\]*$/,"")},FILEPATH:function(u){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(u){var p=u.session.$mode||{};return p.blockComment&&p.blockComment.start||""},BLOCK_COMMENT_END:function(u){var p=u.session.$mode||{};return p.blockComment&&p.blockComment.end||""},LINE_COMMENT:function(u){var p=u.session.$mode||{};return p.lineCommentStart||""},CURRENT_YEAR:s.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:s.bind(null,{year:"2-digit"}),CURRENT_MONTH:s.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:s.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:s.bind(null,{month:"short"}),CURRENT_DATE:s.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:s.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:s.bind(null,{weekday:"short"}),CURRENT_HOUR:s.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:s.bind(null,{minute:"2-digit"}),CURRENT_SECOND:s.bind(null,{second:"2-digit"})};r.SELECTED_TEXT=r.SELECTION;function s(u){var p=new Date().toLocaleString("en-us",u);return p.length==1?"0"+p:p}var c=function(){this.snippetMap={},this.snippetNameMap={}};(function(){b.implement(this,h),this.getTokenizer=function(){return c.$tokenizer||this.createTokenizer()},this.createTokenizer=function(){function u(v){return v=v.substr(1),/^\d+$/.test(v)?[{tabstopId:parseInt(v,10)}]:[{text:v}]}function p(v){return"(?:[^\\\\"+v+"]|\\\\.)"}var k={regex:"/("+p("/")+"+)/",onMatch:function(v,d,l){var f=l[0];return f.fmtString=!0,f.guard=v.slice(1,-1),f.flag="",""},next:"formatString"};return c.$tokenizer=new i({start:[{regex:/\\./,onMatch:function(v,d,l){var f=v[1];return(f=="}"&&l.length||"`$\\".indexOf(f)!=-1)&&(v=f),[v]}},{regex:/}/,onMatch:function(v,d,l){return[l.length?l.shift():v]}},{regex:/\$(?:\d+|\w+)/,onMatch:u},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(v,d,l){var f=u(v.substr(1));return l.unshift(f[0]),f},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+p("\\|")+"*\\|",onMatch:function(v,d,l){var f=v.slice(1,-1).replace(/\\[,|\\]|,/g,function(x){return x.length==2?x[1]:"\0"}).split("\0").map(function(x){return{value:x}});return l[0].choices=f,[f[0]]},next:"start"},k,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(v,d,l){return l.length&&l[0].expectElse?(l[0].expectElse=!1,l[0].ifEnd={elseEnd:l[0]},[l[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(v,d,l){var f=v[1];return f=="}"&&l.length||"`$\\".indexOf(f)!=-1?v=f:f=="n"?v=` `:f=="t"?v=" ":"ulULE".indexOf(f)!=-1&&(v={changeCase:f,local:f>"a"}),[v]}},{regex:"/\\w*}",onMatch:function(v,d,l){var f=l.shift();return f&&(f.flag=v.slice(1,-1)),this.next=f&&f.tabstopId?"start":"",[f||v]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(v,d,l){return[{text:v.slice(1)}]}},{regex:/\${\w+/,onMatch:function(v,d,l){var f={text:v.slice(2)};return l.unshift(f),[f]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(v,d,l){var f=l.shift();return this.next=f&&f.tabstopId?"start":"",[f||v]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(v,d,l){var f=l[0];return f.formatFunction=v.slice(2,-1),[l.shift()]},next:"formatString"},k,{regex:/:[\?\-+]?/,onMatch:function(v,d,l){v[1]=="+"&&(l[0].ifEnd=l[0]),v[1]=="?"&&(l[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),c.$tokenizer},this.tokenizeTmSnippet=function(u,p){return this.getTokenizer().getLineTokens(u,p).tokens.map(function(k){return k.value||k})},this.getVariableValue=function(u,p,k){if(/^\d+$/.test(p))return(this.variables.__||{})[p]||"";if(/^[A-Z]\d+$/.test(p))return(this.variables[p[0]+"__"]||{})[p.substr(1)]||"";if(p=p.replace(/^TM_/,""),!this.variables.hasOwnProperty(p))return"";var v=this.variables[p];return typeof v=="function"&&(v=this.variables[p](u,p,k)),v==null?"":v},this.variables=r,this.tmStrFormat=function(u,p,k){if(!p.fmt)return u;var v=p.flag||"",d=p.guard;d=new RegExp(d,v.replace(/[^gim]/g,""));var l=typeof p.fmt=="string"?this.tokenizeTmSnippet(p.fmt,"formatString"):p.fmt,f=this,x=u.replace(d,function(){var A=f.variables.__;f.variables.__=[].slice.call(arguments);for(var _=f.resolveVariables(l,k),L="E",T=0;T<_.length;T++){var F=_[T];if(typeof F=="object")if(_[T]="",F.changeCase&&F.local){var O=_[T+1];O&&typeof O=="string"&&(F.changeCase=="u"?_[T]=O[0].toUpperCase():_[T]=O[0].toLowerCase(),_[T+1]=O.substr(1))}else F.changeCase&&(L=F.changeCase);else L=="U"?_[T]=F.toUpperCase():L=="L"&&(_[T]=F.toLowerCase())}return f.variables.__=A,_.join("")});return x},this.tmFormatFunction=function(u,p,k){return p.formatFunction=="upcase"?u.toUpperCase():p.formatFunction=="downcase"?u.toLowerCase():u},this.resolveVariables=function(u,p){for(var k=[],v="",d=!0,l=0;l1?(z=J[J.length-1].length,N+=J.length-1):z+=j.length,D+=j}else j&&(j.start?j.end={row:N,column:z}:j.start={row:N,column:z})});var P=u.getSelectionRange(),U=u.session.replace(P,D),G=new m(u),Y=u.inVirtualSelectionMode&&u.selection.index;G.addTabstops(x,P.start,U,Y)},this.insertSnippet=function(u,p){var k=this;if(u.inVirtualSelectionMode)return k.insertSnippetForSelection(u,p);u.forEachSelection(function(){k.insertSnippetForSelection(u,p)},null,{keepOrder:!0}),u.tabstopManager&&u.tabstopManager.tabNext()},this.$getScope=function(u){var p=u.session.$mode.$id||"";if(p=p.split("/").pop(),p==="html"||p==="php"){p==="php"&&!u.session.$mode.inlinePhp&&(p="html");var k=u.getCursorPosition(),v=u.session.getState(k.row);typeof v=="object"&&(v=v[0]),v.substring&&(v.substring(0,3)=="js-"?p="javascript":v.substring(0,4)=="css-"?p="css":v.substring(0,4)=="php-"&&(p="php"))}return p},this.getActiveScopes=function(u){var p=this.$getScope(u),k=[p],v=this.snippetMap;return v[p]&&v[p].includeScopes&&k.push.apply(k,v[p].includeScopes),k.push("_"),k},this.expandWithTab=function(u,p){var k=this,v=u.forEachSelection(function(){return k.expandSnippetForSelection(u,p)},null,{keepOrder:!0});return v&&u.tabstopManager&&u.tabstopManager.tabNext(),v},this.expandSnippetForSelection=function(u,p){var k=u.getCursorPosition(),v=u.session.getLine(k.row),d=v.substring(0,k.column),l=v.substr(k.column),f=this.snippetMap,x;return this.getActiveScopes(u).some(function(A){var _=f[A];return _&&(x=this.findMatchingSnippet(_,d,l)),!!x},this),x?(p&&p.dryRun||(u.session.doc.removeInLine(k.row,k.column-x.replaceBefore.length,k.column+x.replaceAfter.length),this.variables.M__=x.matchBefore,this.variables.T__=x.matchAfter,this.insertSnippetForSelection(u,x.content),this.variables.M__=this.variables.T__=null),!0):!1},this.findMatchingSnippet=function(u,p,k){for(var v=u.length;v--;){var d=u[v];if(!(d.startRe&&!d.startRe.test(p))&&!(d.endRe&&!d.endRe.test(k))&&!(!d.startRe&&!d.endRe))return d.matchBefore=d.startRe?d.startRe.exec(p):[""],d.matchAfter=d.endRe?d.endRe.exec(k):[""],d.replaceBefore=d.triggerRe?d.triggerRe.exec(p)[0]:"",d.replaceAfter=d.endTriggerRe?d.endTriggerRe.exec(k)[0]:"",d}},this.snippetMap={},this.snippetNameMap={},this.register=function(u,p){var k=this.snippetMap,v=this.snippetNameMap,d=this;u||(u=[]);function l(A){return A&&!/^\^?\(.*\)\$?$|^\\b$/.test(A)&&(A="(?:"+A+")"),A||""}function f(A,_,L){return A=l(A),_=l(_),L?(A=_+A,A&&A[A.length-1]!="$"&&(A=A+"$")):(A=A+_,A&&A[0]!="^"&&(A="^"+A)),new RegExp(A)}function x(A){A.scope||(A.scope=p||"_"),p=A.scope,k[p]||(k[p]=[],v[p]={});var _=v[p];if(A.name){var L=_[A.name];L&&d.unregister(L),_[A.name]=A}k[p].push(A),A.prefix&&(A.tabTrigger=A.prefix),!A.content&&A.body&&(A.content=Array.isArray(A.body)?A.body.join(` `):A.body),A.tabTrigger&&!A.trigger&&(!A.guard&&/^\w/.test(A.tabTrigger)&&(A.guard="\\b"),A.trigger=o.escapeRegExp(A.tabTrigger)),!(!A.trigger&&!A.guard&&!A.endTrigger&&!A.endGuard)&&(A.startRe=f(A.trigger,A.guard,!0),A.triggerRe=new RegExp(A.trigger),A.endRe=f(A.endTrigger,A.endGuard,!0),A.endTriggerRe=new RegExp(A.endTrigger))}Array.isArray(u)?u.forEach(x):Object.keys(u).forEach(function(A){x(u[A])}),this._signal("registerSnippets",{scope:p})},this.unregister=function(u,p){var k=this.snippetMap,v=this.snippetNameMap;function d(l){var f=v[l.scope||p];if(f&&f[l.name]){delete f[l.name];var x=k[l.scope||p],A=x&&x.indexOf(l);A>=0&&x.splice(A,1)}}u.content?d(u):Array.isArray(u)&&u.forEach(d)},this.parseSnippetFile=function(u){u=u.replace(/\r/g,"");for(var p=[],k={},v=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm,d;d=v.exec(u);){if(d[1])try{k=JSON.parse(d[1]),p.push(k)}catch{}if(d[4])k.content=d[4].replace(/^\t/gm,""),p.push(k),k={};else{var l=d[2],f=d[3];if(l=="regex"){var x=/\/((?:[^\/\\]|\\.)*)|$/g;k.guard=x.exec(f)[1],k.trigger=x.exec(f)[1],k.endTrigger=x.exec(f)[1],k.endGuard=x.exec(f)[1]}else l=="snippet"?(k.tabTrigger=f.match(/^\S*/)[0],k.name||(k.name=f)):l&&(k[l]=f)}}return p},this.getSnippetByName=function(u,p){var k=this.snippetNameMap,v;return this.getActiveScopes(p).some(function(d){var l=k[d];return l&&(v=l[u]),!!v},this),v}}).call(c.prototype);var m=function(u){if(u.tabstopManager)return u.tabstopManager;u.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=o.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(u)};(function(){this.attach=function(u){this.index=0,this.ranges=[],this.tabstops=[],this.$openTabstops=null,this.selectedTabstop=null,this.editor=u,this.editor.on("change",this.$onChange),this.editor.on("changeSelection",this.$onChangeSelection),this.editor.on("changeSession",this.$onChangeSession),this.editor.commands.on("afterExec",this.$onAfterExec),this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler)},this.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges=null,this.tabstops=null,this.selectedTabstop=null,this.editor.removeListener("change",this.$onChange),this.editor.removeListener("changeSelection",this.$onChangeSelection),this.editor.removeListener("changeSession",this.$onChangeSession),this.editor.commands.removeListener("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.editor=null},this.onChange=function(u){for(var p=u.action[0]=="r",k=this.selectedTabstop||{},v=k.parents||{},d=(this.tabstops||[]).slice(),l=0;l2&&(this.tabstops.length&&f.push(f.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,f))},this.addTabstopMarkers=function(u){var p=this.editor.session;u.forEach(function(k){k.markerId||(k.markerId=p.addMarker(k,"ace_snippet-marker","text"))})},this.removeTabstopMarkers=function(u){var p=this.editor.session;u.forEach(function(k){p.removeMarker(k.markerId),k.markerId=null})},this.removeRange=function(u){var p=u.tabstop.indexOf(u);p!=-1&&u.tabstop.splice(p,1),p=this.ranges.indexOf(u),p!=-1&&this.ranges.splice(p,1),p=u.tabstop.rangeList.ranges.indexOf(u),p!=-1&&u.tabstop.splice(p,1),this.editor.session.removeMarker(u.markerId),u.tabstop.length||(p=this.tabstops.indexOf(u.tabstop),p!=-1&&this.tabstops.splice(p,1),this.tabstops.length||this.detach())},this.keyboardHandler=new e,this.keyboardHandler.bindKeys({Tab:function(u){$.snippetManager&&$.snippetManager.expandWithTab(u)||(u.tabstopManager.tabNext(1),u.renderer.scrollCursorIntoView())},"Shift-Tab":function(u){u.tabstopManager.tabNext(-1),u.renderer.scrollCursorIntoView()},Esc:function(u){u.tabstopManager.detach()}})}).call(m.prototype);var w=function(u,p){u.row==0&&(u.column+=p.column),u.row+=p.row},S=function(u,p){u.row==p.row&&(u.column-=p.column),u.row-=p.row};g.importCssString(` .ace_snippet-marker { -moz-box-sizing: border-box; box-sizing: border-box; background: rgba(194, 193, 208, 0.09); border: 1px dotted rgba(211, 208, 235, 0.62); position: absolute; }`,"snippets.css",!1),$.snippetManager=new c;var C=y("./editor").Editor;(function(){this.insertSnippet=function(u,p){return $.snippetManager.insertSnippet(this,u,p)},this.expandSnippet=function(u){return $.snippetManager.expandWithTab(this,u)}}).call(C.prototype)}),ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"],function(y,$,R){var g=y("../virtual_renderer").VirtualRenderer,b=y("../editor").Editor,h=y("../range").Range,o=y("../lib/event"),a=y("../lib/lang"),t=y("../lib/dom"),e=function(n){var r=new g(n);r.$maxLines=4;var s=new b(r);return s.setHighlightActiveLine(!1),s.setShowPrintMargin(!1),s.renderer.setShowGutter(!1),s.renderer.setHighlightGutterLine(!1),s.$mouseHandler.$focusTimeout=0,s.$highlightTagPending=!0,s},i=function(n){var r=t.createElement("div"),s=new e(r);n&&n.appendChild(r),r.style.display="none",s.renderer.content.style.cursor="default",s.renderer.setStyle("ace_autocomplete"),s.setOption("displayIndentGuides",!1),s.setOption("dragDelay",150);var c=function(){};s.focus=c,s.$isFocused=!0,s.renderer.$cursorLayer.restartTimer=c,s.renderer.$cursorLayer.element.style.opacity=0,s.renderer.$maxLines=8,s.renderer.$keepTextAreaAtCursor=!1,s.setHighlightActiveLine(!1),s.session.highlight(""),s.session.$searchHighlight.clazz="ace_highlight-marker",s.on("mousedown",function(k){var v=k.getDocumentPosition();s.selection.moveToPosition(v),S.start.row=S.end.row=v.row,k.stop()});var m,w=new h(-1,0,-1,1/0),S=new h(-1,0,-1,1/0);S.id=s.session.addMarker(S,"ace_active-line","fullLine"),s.setSelectOnHover=function(k){k?w.id&&(s.session.removeMarker(w.id),w.id=null):w.id=s.session.addMarker(w,"ace_line-hover","fullLine")},s.setSelectOnHover(!1),s.on("mousemove",function(k){if(!m){m=k;return}if(!(m.x==k.x&&m.y==k.y)){m=k,m.scrollTop=s.renderer.scrollTop;var v=m.getDocumentPosition().row;w.start.row!=v&&(w.id||s.setRow(v),u(v))}}),s.renderer.on("beforeRender",function(){if(m&&w.start.row!=-1){m.$pos=null;var k=m.getDocumentPosition().row;w.id||s.setRow(k),u(k,!0)}}),s.renderer.on("afterRender",function(){var k=s.getRow(),v=s.renderer.$textLayer,d=v.element.childNodes[k-v.config.firstRow];d!==v.selectedNode&&v.selectedNode&&t.removeCssClass(v.selectedNode,"ace_selected"),v.selectedNode=d,d&&t.addCssClass(d,"ace_selected")});var C=function(){u(-1)},u=function(k,v){k!==w.start.row&&(w.start.row=w.end.row=k,v||s.session._emit("changeBackMarker"),s._emit("changeHoverMarker"))};s.getHoveredRow=function(){return w.start.row},o.addListener(s.container,"mouseout",C),s.on("hide",C),s.on("changeSelection",C),s.session.doc.getLength=function(){return s.data.length},s.session.doc.getLine=function(k){var v=s.data[k];return typeof v=="string"?v:v&&v.value||""};var p=s.session.bgTokenizer;return p.$tokenizeRow=function(k){var v=s.data[k],d=[];if(!v)return d;typeof v=="string"&&(v={value:v});var l=v.caption||v.value||v.name;function f(B,W){B&&d.push({type:(v.className||"")+(W||""),value:B})}for(var x=l.toLowerCase(),A=(s.filterText||"").toLowerCase(),_=0,L=0,T=0;T<=A.length;T++)if(T!=L&&(v.matchMask&1<f/2&&!d;T&&L+v+_>f?(A.$maxPixelHeight=L-2*this.$borderSize,l.style.top="",l.style.bottom=f-L+"px",s.isTopdown=!1):(L+=v,A.$maxPixelHeight=f-L-.2*v,l.style.top=L+"px",l.style.bottom="",s.isTopdown=!0),l.style.display="";var F=k.left;F+l.offsetWidth>x&&(F=x-l.offsetWidth),l.style.left=F+"px",this._signal("show"),m=null,s.isOpen=!0},s.goTo=function(k){var v=this.getRow(),d=this.session.getLength()-1;switch(k){case"up":v=v<=0?d:v-1;break;case"down":v=v>=d?-1:v+1;break;case"start":v=0;break;case"end":v=d;break}this.setRow(v)},s.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},s.$imageSize=0,s.$borderSize=1,s};t.importCssString(` .ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #CAD6FA; z-index: 1; } .ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line { background-color: #3a674e; } .ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid #abbffe; margin-top: -1px; background: rgba(233,233,253,0.4); position: absolute; z-index: 2; } .ace_dark.ace_editor.ace_autocomplete .ace_line-hover { border: 1px solid rgba(109, 150, 13, 0.8); background: rgba(58, 103, 78, 0.62); } .ace_completion-meta { opacity: 0.5; margin: 0.9em; } .ace_completion-message { color: blue; } .ace_editor.ace_autocomplete .ace_completion-highlight{ color: #2d69c7; } .ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{ color: #93ca12; } .ace_editor.ace_autocomplete { width: 300px; z-index: 200000; border: 1px lightgray solid; position: fixed; box-shadow: 2px 3px 5px rgba(0,0,0,.2); line-height: 1.4; background: #fefefe; color: #111; } .ace_dark.ace_editor.ace_autocomplete { border: 1px #484747 solid; box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51); line-height: 1.4; background: #25282c; color: #c1c1c1; }`,"autocompletion.css",!1),$.AcePopup=i,$.$singleLineEditor=e}),ace.define("ace/autocomplete/util",["require","exports","module"],function(y,$,R){$.parForEach=function(b,h,o){var a=0,t=b.length;t===0&&o();for(var e=0;e=0&&o.test(b[t]);t--)a.push(b[t]);return a.reverse().join("")},$.retrieveFollowingIdentifier=function(b,h,o){o=o||g;for(var a=[],t=h;tthis.filterText&&r.lastIndexOf(this.filterText,0)===0)var s=this.filtered;else var s=this.all;this.filterText=r,s=this.filterCompletions(s,this.filterText),s=s.sort(function(m,w){return w.exactMatch-m.exactMatch||w.$score-m.$score||(m.caption||m.value).localeCompare(w.caption||w.value)});var c=null;s=s.filter(function(m){var w=m.snippet||m.caption||m.value;return w===c?!1:(c=w,!0)}),this.filtered=s},this.filterCompletions=function(r,s){var c=[],m=s.toUpperCase(),w=s.toLowerCase();e:for(var S=0,C;C=r[S];S++){var u=C.caption||C.value||C.snippet;if(!!u){var p=-1,k=0,v=0,d,l;if(this.exactMatch){if(s!==u.substr(0,s.length))continue e}else{var f=u.toLowerCase().indexOf(w);if(f>-1)v=f;else for(var x=0;x=0&&(_<0||A<_)?A:_,d<0)continue e;l=d-p-1,l>0&&(p===-1&&(v+=10),v+=l,k=k|1<",o.escapeHTML(u.caption),"","
",o.escapeHTML(i(u.snippet))].join(""))}},r=[n,t,e];$.setCompleters=function(u){r.length=0,u&&r.push.apply(r,u)},$.addCompleter=function(u){r.push(u)},$.textCompleter=t,$.keyWordCompleter=e,$.snippetCompleter=n;var s={name:"expandSnippet",exec:function(u){return g.expandWithTab(u)},bindKey:"Tab"},c=function(u,p){m(p.session.$mode)},m=function(u){typeof u=="string"&&(u=h.$modes[u]),u&&(g.files||(g.files={}),w(u.$id,u.snippetFileId),u.modes&&u.modes.forEach(m))},w=function(u,p){!p||!u||g.files[u]||(g.files[u]={},h.loadModule(p,function(k){!k||(g.files[u]=k,!k.snippets&&k.snippetText&&(k.snippets=g.parseSnippetFile(k.snippetText)),g.register(k.snippets||[],k.scope),k.includeScopes&&(g.snippetMap[k.scope].includeScopes=k.includeScopes,k.includeScopes.forEach(function(v){m("ace/mode/"+v)})))}))},S=function(u){var p=u.editor,k=p.completer&&p.completer.activated;if(u.command.name==="backspace")k&&!a.getCompletionPrefix(p)&&p.completer.detach();else if(u.command.name==="insertstring"){var v=a.getCompletionPrefix(p);if(v&&!k){var d=b.for(p);d.autoInsert=!1,d.showPopup(p)}}},C=y("../editor").Editor;y("../config").defineOptions(C.prototype,"editor",{enableBasicAutocompletion:{set:function(u){u?(this.completers||(this.completers=Array.isArray(u)?u:r),this.commands.addCommand(b.startCommand)):this.commands.removeCommand(b.startCommand)},value:!1},enableLiveAutocompletion:{set:function(u){u?(this.completers||(this.completers=Array.isArray(u)?u:r),this.commands.on("afterExec",S)):this.commands.removeListener("afterExec",S)},value:!1},enableSnippets:{set:function(u){u?(this.commands.addCommand(s),this.on("changeMode",c),c(null,this)):(this.commands.removeCommand(s),this.off("changeMode",c))},value:!1}})}),function(){ace.require(["ace/ext/language_tools"],function(y){I&&(I.exports=y)})}()})(jr);var vi={exports:{}};(function(I,M){ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator"],function(y,$,R){var g=y("../token_iterator").TokenIterator;function b(h,o){return h.type.lastIndexOf(o+".xml")>-1}$.singletonTags=["area","base","br","col","command","embed","hr","html","img","input","keygen","link","meta","param","source","track","wbr"],$.blockTags=["article","aside","blockquote","body","div","dl","fieldset","footer","form","head","header","html","nav","ol","p","script","section","style","table","tbody","tfoot","thead","ul"],$.formatOptions={lineBreaksAfterCommasInCurlyBlock:!0},$.beautify=function(h){for(var o=new g(h,0,0),a=o.getCurrentToken(),t=h.getTabString(),e=$.singletonTags,i=$.blockTags,n=$.formatOptions||{},r,s=!1,c=!1,m=!1,w="",S="",C="",u=0,p=0,k=0,v=0,d=0,l=0,f=0,x,A=0,_=0,L,T=!1,F=!1,O=!1,B=!1,W={0:0},N=[],z=!1,D=function(){r&&r.value&&r.type!=="string.regexp"&&(r.value=r.value.replace(/^\s*/,""))},P=function(){for(var G=w.length-1;!(G==0||w[G]!==" ");)G=G-1;w=w.slice(0,G+1)},U=function(){w=w.trimRight(),s=!1};a!==null;){if(A=o.getCurrentTokenRow(),o.$rowTokens,r=o.stepForward(),typeof a<"u"){if(S=a.value,d=0,O=C==="style"||h.$modeId==="ace/mode/css",b(a,"tag-open")?(F=!0,r&&(B=i.indexOf(r.value)!==-1),S==="0;_--)w+=` `;s=!0,!b(a,"comment")&&!a.type.match(/^(comment|string)$/)&&(S=S.trimLeft())}if(S){if(a.type==="keyword"&&S.match(/^(if|else|elseif|for|foreach|while|switch)$/)?(N[u]=S,D(),m=!0,S.match(/^(else|elseif)$/)&&w.match(/\}[\s]*$/)&&(U(),c=!0)):a.type==="paren.lparen"?(D(),S.substr(-1)==="{"&&(m=!0,T=!1,F||(_=1)),S.substr(0,1)==="{"&&(c=!0,w.substr(-1)!=="["&&w.trimRight().substr(-1)==="["?(U(),c=!1):w.trimRight().substr(-1)===")"?U():P())):a.type==="paren.rparen"?(d=1,S.substr(0,1)==="}"&&(N[u-1]==="case"&&d++,w.trimRight().substr(-1)==="{"?U():(c=!0,O&&(_+=2))),S.substr(0,1)==="]"&&w.substr(-1)!=="}"&&w.trimRight().substr(-1)==="}"&&(c=!1,v++,U()),S.substr(0,1)===")"&&w.substr(-1)!=="("&&w.trimRight().substr(-1)==="("&&(c=!1,v++,U()),P()):(a.type==="keyword.operator"||a.type==="keyword")&&S.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)?(U(),D(),c=!0,m=!0):a.type==="punctuation.operator"&&S===";"?(U(),D(),m=!0,O&&_++):a.type==="punctuation.operator"&&S.match(/^(:|,)$/)?(U(),D(),S.match(/^(,)$/)&&f>0&&l===0&&n.lineBreaksAfterCommasInCurlyBlock?_++:(m=!0,s=!1)):a.type==="support.php_tag"&&S==="?>"&&!s?(U(),c=!0):b(a,"attribute-name")&&w.substr(-1).match(/^\s$/)?c=!0:b(a,"attribute-equals")?(P(),D()):b(a,"tag-close")?(P(),S==="/>"&&(c=!0)):a.type==="keyword"&&S.match(/^(case|default)$/)&&z&&(d=1),s&&!(a.type.match(/^(comment)$/)&&!S.substr(0,1).match(/^[/#]$/))&&!(a.type.match(/^(string)$/)&&!S.substr(0,1).match(/^['"@]$/))){if(v=k,u>p)for(v++,L=u;L>p;L--)W[L]=v;else u")&&(B&&r&&r.value===""&&u--),b(a,"tag-name")&&(C=S),x=A}}a=r}w=w.trim(),h.doc.setValue(w)},$.commands=[{name:"beautify",description:"Format selection (Beautify)",exec:function(h){$.beautify(h.session)},bindKey:"Ctrl-Shift-B"}]}),function(){ace.require(["ace/ext/beautify"],function(y){I&&(I.exports=y)})}()})(vi);const si=vi.exports;Mt.config.setModuleUrl("ace/mode/css_worker",yn);Mt.config.setModuleUrl("ace/mode/html_worker",$n);Mt.config.setModuleUrl("ace/mode/javascript_worker",Cn);function Qr({mode:I,onChange:M,onIsValidChange:y,defaultValue:$}){const R=bn(),g=nt.exports.useRef();return nt.exports.useEffect(()=>{si.beautify(g.current.editor.session)},[]),wn(zr,{ref:g,width:"auto",height:"auto",wrapEnabled:!0,className:"absolute inset-0",focus:!0,mode:I,theme:R?"tomorrow_night":"chrome",enableBasicAutocompletion:!0,enableLiveAutocompletion:!0,defaultValue:$,onChange:M,editorProps:{$blockScrolling:!0},commands:si.commands,onValidate:b=>{const h=b.filter(o=>o.type==="error").length===0;y(h)}})}export{Qr as default}; //# sourceMappingURL=ace-editor.2ba06f56.js.map