/*! For license information please see index.js.LICENSE.txt */ (()=>{var __webpack_modules__={9:(e,t,a)=>{e=a.nmd(e),ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"],(function(e,t,a){"use strict";var n,s=e("./lib/oop"),o=(e("./lib/lang"),e("./lib/event_emitter").EventEmitter),l=e("./editor").Editor,r=e("./virtual_renderer").VirtualRenderer,i=e("./edit_session").EditSession;(function(){s.implement(this,o),this.$createEditor=function(){var e=document.createElement("div");e.className=this.$editorCSS,e.style.cssText="position: absolute; top:0px; bottom:0px",this.$container.appendChild(e);var t=new l(new r(e,this.$theme));return t.on("focus",function(){this._emit("focus",t)}.bind(this)),this.$editors.push(t),t.setFontSize(this.$fontSize),t},this.setSplits=function(e){var t;if(e<1)throw"The number of splits have to be > 0!";if(e!=this.$splits){if(e>this.$splits){for(;this.$splitse;)t=this.$editors[this.$splits-1],this.$container.removeChild(t.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(t){t.setTheme(e)}))},this.setKeyboardHandler=function(e){this.$editors.forEach((function(t){t.setKeyboardHandler(e)}))},this.forEach=function(e,t){this.$editors.forEach(e,t)},this.$fontSize="",this.setFontSize=function(e){this.$fontSize=e,this.forEach((function(t){t.setFontSize(e)}))},this.$cloneSession=function(e){var t=new i(e.getDocument(),e.getMode()),a=e.getUndoManager();return t.setUndoManager(a),t.setTabSize(e.getTabSize()),t.setUseSoftTabs(e.getUseSoftTabs()),t.setOverwrite(e.getOverwrite()),t.setBreakpoints(e.getBreakpoints()),t.setUseWrapMode(e.getUseWrapMode()),t.setUseWorker(e.getUseWorker()),t.setWrapLimitRange(e.$wrapLimitRange.min,e.$wrapLimitRange.max),t.$foldData=e.$cloneFoldData(),t},this.setSession=function(e,t){var a;a=null==t?this.$cEditor:this.$editors[t];var n=this.$editors.some((function(t){return t.session===e}));return n&&(e=this.$cloneSession(e)),a.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,t=this.$container.clientWidth,a=this.$container.clientHeight;if(this.$orientation==this.BESIDE)for(var n=t/this.$splits,s=0;s{e=a.nmd(e),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(e,t,a){"use strict";var n=e("./lib/dom"),s=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,l=e("./lib/lang"),r=e("./range").Range,i=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,d=e("./tokenizer").Tokenizer,h=e("./clipboard"),g={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,a){var n=e.session.getTextRange();return a?n.replace(/\n\r?([ \t]*\S)/g,"\n"+a+"$1"):n},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return h.getText&&h.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}g.SELECTED_TEXT=g.SELECTION;var u=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=g}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function a(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+a("/")+"+)/",onMatch:function(e,t,a){var n=a[0];return n.fmtString=!0,n.guard=e.slice(1,-1),n.flag="",""},next:"formatString"};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return("}"==n&&a.length||-1!="`$\\".indexOf(n))&&(e=n),[e]}},{regex:/}/,onMatch:function(e,t,a){return[a.length?a.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,a,n){var s=t(e.substr(1));return n.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+a("\\|")+"*\\|",onMatch:function(e,t,a){var n=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return a[0].choices=n,[n[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,a){return a.length&&a[0].expectElse?(a[0].expectElse=!1,a[0].ifEnd={elseEnd:a[0]},[a[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return"}"==n&&a.length||-1!="`$\\".indexOf(n)?e=n:"n"==n?e="\n":"t"==n?e="\t":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,a){var n=a.shift();return n&&(n.flag=e.slice(1,-1)),this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,a){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,a){var n={text:e.slice(2)};return a.unshift(n),[n]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,a){var n=a.shift();return this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,a){return a[0].formatFunction=e.slice(2,-1),[a.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,a){"+"==e[1]&&(a[0].ifEnd=a[0]),"?"==e[1]&&(a[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,a){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var n=this.variables[t];return"function"==typeof n&&(n=this.variables[t](e,t,a)),null==n?"":n},e.prototype.tmStrFormat=function(e,t,a){if(!t.fmt)return e;var n=t.flag||"",s=t.guard;s=new RegExp(s,n.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,l=this,r=e.replace(s,(function(){var e=l.variables.__;l.variables.__=[].slice.call(arguments);for(var t=l.resolveVariables(o,a),n="E",s=0;s=0&&o.splice(l,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,a=[],n={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=s.exec(e);){if(t[1])try{n=JSON.parse(t[1]),a.push(n)}catch(e){}if(t[4])n.content=t[4].replace(/^\t/gm,""),a.push(n),n={};else{var o=t[2],l=t[3];if("regex"==o){var r=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=r.exec(l)[1],n.trigger=r.exec(l)[1],n.endTrigger=r.exec(l)[1],n.endGuard=r.exec(l)[1]}else"snippet"==o?(n.tabTrigger=l.match(/^\S*/)[0],n.name||(n.name=l)):o&&(n[o]=l)}}return a},e.prototype.getSnippetByName=function(e,t){var a,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var s=n[t];return s&&(a=s[e]),!!a}),this),a},e}();s.implement(u.prototype,o);var m=function(e,t,a){void 0===a&&(a={});var n=e.getCursorPosition(),s=e.session.getLine(n.row),o=e.session.getTabString(),l=s.match(/^\s*/)[0];n.column1?(b=t[t.length-1].length,f+=t.length-1):b+=e.length,w+=e}else e&&(e.start?e.end={row:f,column:b}:e.start={row:f,column:b})})),{text:w,tabstops:i,tokens:r}},v=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,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)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],a=this.selectedTabstop||{},n=a.parents||{},s=this.tabstops.slice(),o=0;o2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();v.prototype.keyboardHandler=new c,v.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},b=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};n.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new u;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,a){return t.snippetManager.insertSnippet(this,e,a)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.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","ace/config","ace/lib/useragent"],(function(e,t,a){"use strict";var n=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,l=e("../lib/event"),r=e("../lib/lang"),i=e("../lib/dom"),c=e("../config").nls,d=e("./../lib/useragent"),h=function(e){return"suggest-aria-id:".concat(e)},g=d.isSafari?"menu":"listbox",p=d.isSafari?"menuitem":"option",u=d.isSafari?"aria-current":"aria-selected",m=function(e){var t=new n(e);t.$maxLines=4;var a=new s(t);return a.setHighlightActiveLine(!1),a.setShowPrintMargin(!1),a.renderer.setShowGutter(!1),a.renderer.setHighlightGutterLine(!1),a.$mouseHandler.$focusTimeout=0,a.$highlightTagPending=!0,a};i.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=i.createElement("div"),a=m(t);e&&e.appendChild(t),t.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.renderer.$textLayer.element.setAttribute("role",g),a.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),a.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),a.renderer.textarea.setAttribute("aria-hidden","true"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var n,s=function(){};a.focus=s,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=s,a.renderer.$cursorLayer.element.style.opacity="0",a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",(function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),v.start.row=v.end.row=t.row,e.stop()}));var d=new o(-1,0,-1,1/0),v=new o(-1,0,-1,1/0);v.id=a.session.addMarker(v,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?d.id&&(a.session.removeMarker(d.id),d.id=null):d.id=a.session.addMarker(d,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",(function(e){if(n){if(n.x!=e.x||n.y!=e.y){(n=e).scrollTop=a.renderer.scrollTop,a.isMouseOver=!0;var t=n.getDocumentPosition().row;d.start.row!=t&&(d.id||a.setRow(t),b(t))}}else n=e})),a.renderer.on("beforeRender",(function(){if(n&&-1!=d.start.row){n.$pos=null;var e=n.getDocumentPosition().row;d.id||a.setRow(e),b(e,!0)}})),a.renderer.on("afterRender",(function(){for(var e=a.renderer.$textLayer,t=e.config.firstRow,n=e.config.lastRow;t<=n;t++){var s=e.element.childNodes[t-e.config.firstRow];s.setAttribute("role",p),s.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),s.setAttribute("aria-setsize",a.data.length),s.setAttribute("aria-describedby","doc-tooltip"),s.setAttribute("aria-posinset",t+1);var o=a.getData(t);if(o){var l="".concat(o.caption||o.value).concat(o.meta?", ".concat(o.meta):"");s.setAttribute("aria-label",l)}s.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),a.renderer.on("afterRender",(function(){var e=a.getRow(),t=a.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow],s=document.activeElement;if(n!==a.selectedNode&&a.selectedNode&&(i.removeCssClass(a.selectedNode,"ace_selected"),a.selectedNode.removeAttribute(u),a.selectedNode.removeAttribute("id")),s.removeAttribute("aria-activedescendant"),a.selectedNode=n,n){var o=h(e);i.addCssClass(n,"ace_selected"),n.id=o,t.element.setAttribute("aria-activedescendant",o),s.setAttribute("aria-activedescendant",o),n.setAttribute(u,"true")}}));var f=function(){b(-1)},b=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return d.start.row},l.addListener(a.container,"mouseout",(function(){a.isMouseOver=!1,f()})),a.on("hide",f),a.on("changeSelection",f),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){var t=a.data[e];return"string"==typeof t?t:t&&t.value||""};var w=a.session.bgTokenizer;return w.$tokenizeRow=function(e){var t=a.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t});var s=t.caption||t.value||t.name;function o(e,a){e&&n.push({type:(t.className||"")+(a||""),value:e})}for(var l=s.toLowerCase(),r=(a.filterText||"").toLowerCase(),i=0,c=0,d=0;d<=r.length;d++)if(d!=c&&(t.matchMask&1<=h?"bottom":"top"),"top"===s?(g.bottom=e.top-this.$borderSize,g.top=g.bottom-h):"bottom"===s&&(g.top=e.top+t+this.$borderSize,g.bottom=g.top+h);var m=g.top>=0&&g.bottom<=i;if(!o&&!m)return!1;d.$maxPixelHeight=m?null:"top"===s?u:p,"top"===s?(l.style.top="",l.style.bottom=i+r-g.bottom+"px",a.isTopdown=!1):(l.style.top=g.top+"px",l.style.bottom="",a.isTopdown=!0),l.style.display="";var v=e.left;return v+l.offsetWidth>c&&(v=c-l.offsetWidth),l.style.left=v+"px",l.style.right="",a.isOpen||(a.isOpen=!0,this._signal("show"),n=null),a.anchorPos=e,a.anchor=s,!0},a.show=function(e,t,a){this.tryShow(e,t,a?"bottom":void 0,!0)},a.goTo=function(e){var t=this.getRow(),a=this.session.getLength()-1;switch(e){case"up":t=t<=0?a:t-1;break;case"down":t=t>=a?-1:t+1;break;case"start":t=0;break;case"end":t=a}this.setRow(t)},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a},t.$singleLineEditor=m,t.getAriaId=h})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,a){"use strict";var n=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,a=t.element.childNodes[e-t.config.firstRow];if(a){for(var n="doc-tooltip ",s=0;s=0&&a.test(e[o]);o--)s.push(e[o]);return s.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,a){a=a||n;for(var s=[],o=t;o0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var a=this.popup.getData(t);!a||e&&!a.hideInlinePreview||this.$seen(a)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,a=t.layerConfig.lineHeight,n=t.$cursorLayer.getPixelPosition(this.base,!0);n.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();n.top+=s.top-t.layerConfig.offset,n.left+=s.left-e.renderer.scrollLeft,n.left+=t.gutterWidth;var o={top:n.top,left:n.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(o.top+=t.$ghostTextWidget.el.offsetHeight);var l=e.container.getBoundingClientRect().bottom-a,r=lthis.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var a=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==a&&(a=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var a=[],n=t.toUpperCase(),s=t.toLowerCase();e:for(var o,l=0;o=e[l];l++)if(o.skipFilter)o.$score=o.score,a.push(o);else{var r=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(r){var i,c,d=-1,h=0,g=0;if(this.exactMatch){if(t!==r.substr(0,t.length))continue e}else{var p=r.toLowerCase().indexOf(s);if(p>-1)g=p;else for(var u=0;u=0&&(v<0||m0&&(-1===d&&(g+=10),g+=c,h|=1<",l.escapeHTML(e.caption),"","
",l.escapeHTML((t=e.snippet,a={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,n,s){return a[t]=s||""})).replace(/\$(\d+?)/g,(function(e,t){return a[t]}))))].join(""))},id:"snippetCompleter"},h=[d,i,c];t.setCompleters=function(e){h.length=0,e&&h.push.apply(h,e)},t.addCompleter=function(e){h.push(e)},t.textCompleter=i,t.keyWordCompleter=c,t.snippetCompleter=d;var g,p={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},u=function(e,t){m(t.session.$mode)},m=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(n.files||(n.files={}),v(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(m))},v=function(e,t){t&&e&&!n.files[e]&&(n.files[e]={},o.loadModule(t,(function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){m("ace/mode/"+e)}))))})))},f=function(e){var t=e.editor,a=t.completer&&t.completer.activated;if("backspace"===e.command.name)a&&!r.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!a){g=e;var n=e.editor.$liveAutocompletionDelay;n?b.delay(n):w(e)}},b=l.delayedCall((function(){w(g)}),0),w=function(e){var t=e.editor,a=r.getCompletionPrefix(t),n=e.args,o=r.triggerAutocomplete(t,n);if(a&&a.length>=t.$liveAutocompletionThreshold||o){var l=s.for(t);l.autoShown=!0,l.showPopup(t)}},y=e("../editor").Editor;e("../config").defineOptions(y.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:h),this.commands.on("afterExec",f)):this.commands.off("afterExec",f)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(p),this.on("changeMode",u),u(0,this)):(this.commands.removeCommand(p),this.off("changeMode",u))},value:!1}})})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},47:(e,t,a)=>{e=a.nmd(e),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(e,t,a){"use strict";var n=e("./lib/dom"),s=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,l=e("./lib/lang"),r=e("./range").Range,i=e("./range_list").RangeList,c=e("./keyboard/hash_handler").HashHandler,d=e("./tokenizer").Tokenizer,h=e("./clipboard"),g={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,a){var n=e.session.getTextRange();return a?n.replace(/\n\r?([ \t]*\S)/g,"\n"+a+"$1"):n},CURRENT_LINE:function(e){return e.session.getLine(e.getCursorPosition().row)},PREV_LINE:function(e){return e.session.getLine(e.getCursorPosition().row-1)},LINE_INDEX:function(e){return e.getCursorPosition().row},LINE_NUMBER:function(e){return e.getCursorPosition().row+1},SOFT_TABS:function(e){return e.session.getUseSoftTabs()?"YES":"NO"},TAB_SIZE:function(e){return e.session.getTabSize()},CLIPBOARD:function(e){return h.getText&&h.getText()},FILENAME:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0]},FILENAME_BASE:function(e){return/[^/\\]*$/.exec(this.FILEPATH(e))[0].replace(/\.[^.]*$/,"")},DIRECTORY:function(e){return this.FILEPATH(e).replace(/[^/\\]*$/,"")},FILEPATH:function(e){return"/not implemented.txt"},WORKSPACE_NAME:function(){return"Unknown"},FULLNAME:function(){return"Unknown"},BLOCK_COMMENT_START:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.start||""},BLOCK_COMMENT_END:function(e){var t=e.session.$mode||{};return t.blockComment&&t.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:p.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:p.bind(null,{year:"2-digit"}),CURRENT_MONTH:p.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:p.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:p.bind(null,{month:"short"}),CURRENT_DATE:p.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:p.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:p.bind(null,{weekday:"short"}),CURRENT_HOUR:p.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:p.bind(null,{minute:"2-digit"}),CURRENT_SECOND:p.bind(null,{second:"2-digit"})};function p(e){var t=(new Date).toLocaleString("en-us",e);return 1==t.length?"0"+t:t}g.SELECTED_TEXT=g.SELECTION;var u=function(){function e(){this.snippetMap={},this.snippetNameMap={},this.variables=g}return e.prototype.getTokenizer=function(){return e.$tokenizer||this.createTokenizer()},e.prototype.createTokenizer=function(){function t(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function a(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var n={regex:"/("+a("/")+"+)/",onMatch:function(e,t,a){var n=a[0];return n.fmtString=!0,n.guard=e.slice(1,-1),n.flag="",""},next:"formatString"};return e.$tokenizer=new d({start:[{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return("}"==n&&a.length||-1!="`$\\".indexOf(n))&&(e=n),[e]}},{regex:/}/,onMatch:function(e,t,a){return[a.length?a.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:t},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,a,n){var s=t(e.substr(1));return n.unshift(s[0]),s},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+a("\\|")+"*\\|",onMatch:function(e,t,a){var n=e.slice(1,-1).replace(/\\[,|\\]|,/g,(function(e){return 2==e.length?e[1]:"\0"})).split("\0").map((function(e){return{value:e}}));return a[0].choices=n,[n[0]]},next:"start"},n,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,a){return a.length&&a[0].expectElse?(a[0].expectElse=!1,a[0].ifEnd={elseEnd:a[0]},[a[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,a){var n=e[1];return"}"==n&&a.length||-1!="`$\\".indexOf(n)?e=n:"n"==n?e="\n":"t"==n?e="\t":-1!="ulULE".indexOf(n)&&(e={changeCase:n,local:n>"a"}),[e]}},{regex:"/\\w*}",onMatch:function(e,t,a){var n=a.shift();return n&&(n.flag=e.slice(1,-1)),this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"},{regex:/\$(?:\d+|\w+)/,onMatch:function(e,t,a){return[{text:e.slice(1)}]}},{regex:/\${\w+/,onMatch:function(e,t,a){var n={text:e.slice(2)};return a.unshift(n),[n]},next:"formatStringVar"},{regex:/\n/,token:"newline",merge:!1},{regex:/}/,onMatch:function(e,t,a){var n=a.shift();return this.next=n&&n.tabstopId?"start":"",[n||e]},next:"start"}],formatStringVar:[{regex:/:\/\w+}/,onMatch:function(e,t,a){return a[0].formatFunction=e.slice(2,-1),[a.shift()]},next:"formatString"},n,{regex:/:[\?\-+]?/,onMatch:function(e,t,a){"+"==e[1]&&(a[0].ifEnd=a[0]),"?"==e[1]&&(a[0].expectElse=!0)},next:"formatString"},{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"formatString"}]}),e.$tokenizer},e.prototype.tokenizeTmSnippet=function(e,t){return this.getTokenizer().getLineTokens(e,t).tokens.map((function(e){return e.value||e}))},e.prototype.getVariableValue=function(e,t,a){if(/^\d+$/.test(t))return(this.variables.__||{})[t]||"";if(/^[A-Z]\d+$/.test(t))return(this.variables[t[0]+"__"]||{})[t.substr(1)]||"";if(t=t.replace(/^TM_/,""),!this.variables.hasOwnProperty(t))return"";var n=this.variables[t];return"function"==typeof n&&(n=this.variables[t](e,t,a)),null==n?"":n},e.prototype.tmStrFormat=function(e,t,a){if(!t.fmt)return e;var n=t.flag||"",s=t.guard;s=new RegExp(s,n.replace(/[^gim]/g,""));var o="string"==typeof t.fmt?this.tokenizeTmSnippet(t.fmt,"formatString"):t.fmt,l=this,r=e.replace(s,(function(){var e=l.variables.__;l.variables.__=[].slice.call(arguments);for(var t=l.resolveVariables(o,a),n="E",s=0;s=0&&o.splice(l,1)}}e.content?s(e):Array.isArray(e)&&e.forEach(s)},e.prototype.parseSnippetFile=function(e){e=e.replace(/\r/g,"");for(var t,a=[],n={},s=/^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm;t=s.exec(e);){if(t[1])try{n=JSON.parse(t[1]),a.push(n)}catch(e){}if(t[4])n.content=t[4].replace(/^\t/gm,""),a.push(n),n={};else{var o=t[2],l=t[3];if("regex"==o){var r=/\/((?:[^\/\\]|\\.)*)|$/g;n.guard=r.exec(l)[1],n.trigger=r.exec(l)[1],n.endTrigger=r.exec(l)[1],n.endGuard=r.exec(l)[1]}else"snippet"==o?(n.tabTrigger=l.match(/^\S*/)[0],n.name||(n.name=l)):o&&(n[o]=l)}}return a},e.prototype.getSnippetByName=function(e,t){var a,n=this.snippetNameMap;return this.getActiveScopes(t).some((function(t){var s=n[t];return s&&(a=s[e]),!!a}),this),a},e}();s.implement(u.prototype,o);var m=function(e,t,a){void 0===a&&(a={});var n=e.getCursorPosition(),s=e.session.getLine(n.row),o=e.session.getTabString(),l=s.match(/^\s*/)[0];n.column1?(b=t[t.length-1].length,f+=t.length-1):b+=e.length,w+=e}else e&&(e.start?e.end={row:f,column:b}:e.start={row:f,column:b})})),{text:w,tabstops:i,tokens:r}},v=function(){function e(e){if(this.index=0,this.ranges=[],this.tabstops=[],e.tabstopManager)return e.tabstopManager;e.tabstopManager=this,this.$onChange=this.onChange.bind(this),this.$onChangeSelection=l.delayedCall(this.onChangeSelection.bind(this)).schedule,this.$onChangeSession=this.onChangeSession.bind(this),this.$onAfterExec=this.onAfterExec.bind(this),this.attach(e)}return e.prototype.attach=function(e){this.$openTabstops=null,this.selectedTabstop=null,this.editor=e,this.session=e.session,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)},e.prototype.detach=function(){this.tabstops.forEach(this.removeTabstopMarkers,this),this.ranges.length=0,this.tabstops.length=0,this.selectedTabstop=null,this.editor.off("change",this.$onChange),this.editor.off("changeSelection",this.$onChangeSelection),this.editor.off("changeSession",this.$onChangeSession),this.editor.commands.off("afterExec",this.$onAfterExec),this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler),this.editor.tabstopManager=null,this.session=null,this.editor=null},e.prototype.onChange=function(e){for(var t="r"==e.action[0],a=this.selectedTabstop||{},n=a.parents||{},s=this.tabstops.slice(),o=0;o2&&(this.tabstops.length&&o.push(o.splice(2,1)[0]),this.tabstops.splice.apply(this.tabstops,o))},e.prototype.addTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){e.markerId||(e.markerId=t.addMarker(e,"ace_snippet-marker","text"))}))},e.prototype.removeTabstopMarkers=function(e){var t=this.session;e.forEach((function(e){t.removeMarker(e.markerId),e.markerId=null}))},e.prototype.updateTabstopMarkers=function(){if(this.selectedTabstop){var e=this.selectedTabstop.snippetId;0===this.selectedTabstop.index&&e--,this.tabstops.forEach((function(t){t.snippetId===e?this.addTabstopMarkers(t):this.removeTabstopMarkers(t)}),this)}},e.prototype.removeRange=function(e){var t=e.tabstop.indexOf(e);-1!=t&&e.tabstop.splice(t,1),-1!=(t=this.ranges.indexOf(e))&&this.ranges.splice(t,1),-1!=(t=e.tabstop.rangeList.ranges.indexOf(e))&&e.tabstop.splice(t,1),this.session.removeMarker(e.markerId),e.tabstop.length||(-1!=(t=this.tabstops.indexOf(e.tabstop))&&this.tabstops.splice(t,1),this.tabstops.length||this.detach())},e}();v.prototype.keyboardHandler=new c,v.prototype.keyboardHandler.bindKeys({Tab:function(e){t.snippetManager&&t.snippetManager.expandWithTab(e)||(e.tabstopManager.tabNext(1),e.renderer.scrollCursorIntoView())},"Shift-Tab":function(e){e.tabstopManager.tabNext(-1),e.renderer.scrollCursorIntoView()},Esc:function(e){e.tabstopManager.detach()}});var f=function(e,t){0==e.row&&(e.column+=t.column),e.row+=t.row},b=function(e,t){e.row==t.row&&(e.column-=t.column),e.row-=t.row};n.importCssString("\n.ace_snippet-marker {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n background: rgba(194, 193, 208, 0.09);\n border: 1px dotted rgba(211, 208, 235, 0.62);\n position: absolute;\n}","snippets.css",!1),t.snippetManager=new u;var w=e("./editor").Editor;(function(){this.insertSnippet=function(e,a){return t.snippetManager.insertSnippet(this,e,a)},this.expandSnippet=function(e){return t.snippetManager.expandWithTab(this,e)}}).call(w.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","ace/config","ace/lib/useragent"],(function(e,t,a){"use strict";var n=e("../virtual_renderer").VirtualRenderer,s=e("../editor").Editor,o=e("../range").Range,l=e("../lib/event"),r=e("../lib/lang"),i=e("../lib/dom"),c=e("../config").nls,d=e("./../lib/useragent"),h=function(e){return"suggest-aria-id:".concat(e)},g=d.isSafari?"menu":"listbox",p=d.isSafari?"menuitem":"option",u=d.isSafari?"aria-current":"aria-selected",m=function(e){var t=new n(e);t.$maxLines=4;var a=new s(t);return a.setHighlightActiveLine(!1),a.setShowPrintMargin(!1),a.renderer.setShowGutter(!1),a.renderer.setHighlightGutterLine(!1),a.$mouseHandler.$focusTimeout=0,a.$highlightTagPending=!0,a};i.importCssString('\n.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #CAD6FA;\n z-index: 1;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\n background-color: #3a674e;\n}\n.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid #abbffe;\n margin-top: -1px;\n background: rgba(233,233,253,0.4);\n position: absolute;\n z-index: 2;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\n border: 1px solid rgba(109, 150, 13, 0.8);\n background: rgba(58, 103, 78, 0.62);\n}\n.ace_completion-meta {\n opacity: 0.5;\n margin-left: 0.9em;\n}\n.ace_completion-message {\n margin-left: 0.9em;\n color: blue;\n}\n.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #2d69c7;\n}\n.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\n color: #93ca12;\n}\n.ace_editor.ace_autocomplete {\n width: 300px;\n z-index: 200000;\n border: 1px lightgray solid;\n position: fixed;\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n line-height: 1.4;\n background: #fefefe;\n color: #111;\n}\n.ace_dark.ace_editor.ace_autocomplete {\n border: 1px #484747 solid;\n box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\n line-height: 1.4;\n background: #25282c;\n color: #c1c1c1;\n}\n.ace_autocomplete .ace_text-layer {\n width: calc(100% - 8px);\n}\n.ace_autocomplete .ace_line {\n display: flex;\n align-items: center;\n}\n.ace_autocomplete .ace_line > * {\n min-width: 0;\n flex: 0 0 auto;\n}\n.ace_autocomplete .ace_line .ace_ {\n flex: 0 1 auto;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.ace_autocomplete .ace_completion-spacer {\n flex: 1;\n}\n.ace_autocomplete.ace_loading:after {\n content: "";\n position: absolute;\n top: 0px;\n height: 2px;\n width: 8%;\n background: blue;\n z-index: 100;\n animation: ace_progress 3s infinite linear;\n animation-delay: 300ms;\n transform: translateX(-100%) scaleX(1);\n}\n@keyframes ace_progress {\n 0% { transform: translateX(-100%) scaleX(1) }\n 50% { transform: translateX(625%) scaleX(2) } \n 100% { transform: translateX(1500%) scaleX(3) } \n}\n@media (prefers-reduced-motion) {\n .ace_autocomplete.ace_loading:after {\n transform: translateX(625%) scaleX(2);\n animation: none;\n }\n}\n',"autocompletion.css",!1),t.AcePopup=function(e){var t=i.createElement("div"),a=m(t);e&&e.appendChild(t),t.style.display="none",a.renderer.content.style.cursor="default",a.renderer.setStyle("ace_autocomplete"),a.renderer.$textLayer.element.setAttribute("role",g),a.renderer.$textLayer.element.setAttribute("aria-roledescription",c("autocomplete.popup.aria-roledescription","Autocomplete suggestions")),a.renderer.$textLayer.element.setAttribute("aria-label",c("autocomplete.popup.aria-label","Autocomplete suggestions")),a.renderer.textarea.setAttribute("aria-hidden","true"),a.setOption("displayIndentGuides",!1),a.setOption("dragDelay",150);var n,s=function(){};a.focus=s,a.$isFocused=!0,a.renderer.$cursorLayer.restartTimer=s,a.renderer.$cursorLayer.element.style.opacity="0",a.renderer.$maxLines=8,a.renderer.$keepTextAreaAtCursor=!1,a.setHighlightActiveLine(!1),a.session.highlight(""),a.session.$searchHighlight.clazz="ace_highlight-marker",a.on("mousedown",(function(e){var t=e.getDocumentPosition();a.selection.moveToPosition(t),v.start.row=v.end.row=t.row,e.stop()}));var d=new o(-1,0,-1,1/0),v=new o(-1,0,-1,1/0);v.id=a.session.addMarker(v,"ace_active-line","fullLine"),a.setSelectOnHover=function(e){e?d.id&&(a.session.removeMarker(d.id),d.id=null):d.id=a.session.addMarker(d,"ace_line-hover","fullLine")},a.setSelectOnHover(!1),a.on("mousemove",(function(e){if(n){if(n.x!=e.x||n.y!=e.y){(n=e).scrollTop=a.renderer.scrollTop,a.isMouseOver=!0;var t=n.getDocumentPosition().row;d.start.row!=t&&(d.id||a.setRow(t),b(t))}}else n=e})),a.renderer.on("beforeRender",(function(){if(n&&-1!=d.start.row){n.$pos=null;var e=n.getDocumentPosition().row;d.id||a.setRow(e),b(e,!0)}})),a.renderer.on("afterRender",(function(){for(var e=a.renderer.$textLayer,t=e.config.firstRow,n=e.config.lastRow;t<=n;t++){var s=e.element.childNodes[t-e.config.firstRow];s.setAttribute("role",p),s.setAttribute("aria-roledescription",c("autocomplete.popup.item.aria-roledescription","item")),s.setAttribute("aria-setsize",a.data.length),s.setAttribute("aria-describedby","doc-tooltip"),s.setAttribute("aria-posinset",t+1);var o=a.getData(t);if(o){var l="".concat(o.caption||o.value).concat(o.meta?", ".concat(o.meta):"");s.setAttribute("aria-label",l)}s.querySelectorAll(".ace_completion-highlight").forEach((function(e){e.setAttribute("role","mark")}))}})),a.renderer.on("afterRender",(function(){var e=a.getRow(),t=a.renderer.$textLayer,n=t.element.childNodes[e-t.config.firstRow],s=document.activeElement;if(n!==a.selectedNode&&a.selectedNode&&(i.removeCssClass(a.selectedNode,"ace_selected"),a.selectedNode.removeAttribute(u),a.selectedNode.removeAttribute("id")),s.removeAttribute("aria-activedescendant"),a.selectedNode=n,n){var o=h(e);i.addCssClass(n,"ace_selected"),n.id=o,t.element.setAttribute("aria-activedescendant",o),s.setAttribute("aria-activedescendant",o),n.setAttribute(u,"true")}}));var f=function(){b(-1)},b=function(e,t){e!==d.start.row&&(d.start.row=d.end.row=e,t||a.session._emit("changeBackMarker"),a._emit("changeHoverMarker"))};a.getHoveredRow=function(){return d.start.row},l.addListener(a.container,"mouseout",(function(){a.isMouseOver=!1,f()})),a.on("hide",f),a.on("changeSelection",f),a.session.doc.getLength=function(){return a.data.length},a.session.doc.getLine=function(e){var t=a.data[e];return"string"==typeof t?t:t&&t.value||""};var w=a.session.bgTokenizer;return w.$tokenizeRow=function(e){var t=a.data[e],n=[];if(!t)return n;"string"==typeof t&&(t={value:t});var s=t.caption||t.value||t.name;function o(e,a){e&&n.push({type:(t.className||"")+(a||""),value:e})}for(var l=s.toLowerCase(),r=(a.filterText||"").toLowerCase(),i=0,c=0,d=0;d<=r.length;d++)if(d!=c&&(t.matchMask&1<=g?"bottom":"top"),"top"===s?(p.bottom=e.top-this.$borderSize,p.top=p.bottom-g):"bottom"===s&&(p.top=e.top+t+this.$borderSize,p.bottom=p.top+g);var v=p.top>=0&&p.bottom<=c;if(!o&&!v)return!1;h.$maxPixelHeight=v?null:"top"===s?m:u,"top"===s?(l.style.top="",l.style.bottom=c+r-p.bottom+"px",a.isTopdown=!1):(l.style.top=p.top+"px",l.style.bottom="",a.isTopdown=!0),l.style.display="";var f=e.left;return f+l.offsetWidth>d&&(f=d-l.offsetWidth),l.style.left=f+"px",l.style.right="",i.$fixPositionBug(l),a.isOpen||(a.isOpen=!0,this._signal("show"),n=null),a.anchorPos=e,a.anchor=s,!0},a.show=function(e,t,a){this.tryShow(e,t,a?"bottom":void 0,!0)},a.goTo=function(e){var t=this.getRow(),a=this.session.getLength()-1;switch(e){case"up":t=t<=0?a:t-1;break;case"down":t=t>=a?-1:t+1;break;case"start":t=0;break;case"end":t=a}this.setRow(t)},a.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},a.$imageSize=0,a.$borderSize=1,a},t.$singleLineEditor=m,t.getAriaId=h})),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],(function(e,t,a){"use strict";var n=function(){function e(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}return e.prototype.setScreenReaderContent=function(e){for(!this.popup&&this.editor.completer&&this.editor.completer.popup&&(this.popup=this.editor.completer.popup,this.popup.renderer.on("afterRender",function(){var e=this.popup.getRow(),t=this.popup.renderer.$textLayer,a=t.element.childNodes[e-t.config.firstRow];if(a){for(var n="doc-tooltip ",s=0;s=0&&a.test(e[o]);o--)s.push(e[o]);return s.reverse().join("")},t.retrieveFollowingIdentifier=function(e,t,a){a=a||n;for(var s=[],o=t;o0)for(var t=this.popup.getFirstVisibleRow();t<=this.popup.getLastVisibleRow();t++){var a=this.popup.getData(t);!a||e&&!a.hideInlinePreview||this.$seen(a)}},e.prototype.$onPopupShow=function(e){this.$onPopupChange(e),this.stickySelection=!1,this.stickySelectionDelay>=0&&this.stickySelectionTimer.schedule(this.stickySelectionDelay)},e.prototype.observeLayoutChanges=function(){if(!this.$elements&&this.editor){window.addEventListener("resize",this.onLayoutChange,{passive:!0}),window.addEventListener("wheel",this.mousewheelListener);for(var e=this.editor.container.parentNode,t=[];e;)t.push(e),e.addEventListener("scroll",this.onLayoutChange,{passive:!0}),e=e.parentNode;this.$elements=t}},e.prototype.unObserveLayoutChanges=function(){var e=this;window.removeEventListener("resize",this.onLayoutChange,{passive:!0}),window.removeEventListener("wheel",this.mousewheelListener),this.$elements&&this.$elements.forEach((function(t){t.removeEventListener("scroll",e.onLayoutChange,{passive:!0})})),this.$elements=null},e.prototype.onLayoutChange=function(){if(!this.popup.isOpen)return this.unObserveLayoutChanges();this.$updatePopupPosition(),this.updateDocTooltip()},e.prototype.$updatePopupPosition=function(){var e=this.editor,t=e.renderer,a=t.layerConfig.lineHeight,n=t.$cursorLayer.getPixelPosition(this.base,!0);n.left-=this.popup.getTextLeftOffset();var s=e.container.getBoundingClientRect();n.top+=s.top-t.layerConfig.offset,n.left+=s.left-e.renderer.scrollLeft,n.left+=t.gutterWidth;var o={top:n.top,left:n.left};t.$ghostText&&t.$ghostTextWidget&&this.base.row===t.$ghostText.position.row&&(o.top+=t.$ghostTextWidget.el.offsetHeight);var l=e.container.getBoundingClientRect().bottom-a,r=l=1?(m.left=s.right+1+"px",m.right="",m.maxWidth=o*u+"px",m.top=s.top+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-s.top,l)+"px"):u==g[1]||g[1]>=1?(m.right=window.innerWidth-s.left+"px",m.left="",m.maxWidth=o*u+"px",m.top=s.top+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-s.top,l)+"px"):u==g[2]&&(m.left=s.left+"px",m.right="",m.maxWidth=Math.min(o,window.innerWidth-s.left)+"px",n.isTopdown?(m.top=s.bottom+"px",m.bottom="",m.maxHeight=Math.min(window.innerHeight-r-s.bottom,l)+"px"):(m.top="",m.bottom=window.innerHeight-s.top+"px",m.maxHeight=Math.min(s.top,l)+"px")),c.$fixPositionBug(a)},e.prototype.hideDocTooltip=function(){if(this.tooltipTimer.cancel(),this.tooltipNode){var e=this.tooltipNode;this.editor.isFocused()||document.activeElement!=e||this.editor.focus(),this.tooltipNode=null,e.parentNode&&e.parentNode.removeChild(e)}},e.prototype.onTooltipClick=function(e){for(var t=e.target;t&&t!=this.tooltipNode;){if("A"==t.nodeName&&t.href){t.rel="noreferrer",t.target="_blank";break}t=t.parentNode}},e.prototype.destroy=function(){if(this.detach(),this.popup){this.popup.destroy();var e=this.popup.container;e&&e.parentNode&&e.parentNode.removeChild(e)}this.editor&&this.editor.completer==this&&(this.editor.off("destroy",u),this.editor.completer=null),this.inlineRenderer=this.popup=this.editor=null},e.for=function(t){return t.completer instanceof e||(t.completer&&(t.completer.destroy(),t.completer=null),h.get("sharedPopups")?(e.$sharedInstance||(e.$sharedInstance=new e),t.completer=e.$sharedInstance):(t.completer=new e,t.once("destroy",u))),t.completer},e}();m.prototype.commands={Up:function(e){e.completer.goTo("up")},Down:function(e){e.completer.goTo("down")},"Ctrl-Up|Ctrl-Home":function(e){e.completer.goTo("start")},"Ctrl-Down|Ctrl-End":function(e){e.completer.goTo("end")},Esc:function(e){e.completer.detach()},Return:function(e){return e.completer.insertMatch()},"Shift-Return":function(e){e.completer.insertMatch(null,{deleteSuffix:!0})},Tab:function(e){var t=e.completer.insertMatch();if(t||e.tabstopManager)return t;e.completer.goTo("down")},Backspace:function(e){e.execCommand("backspace"),!r.getCompletionPrefix(e)&&e.completer&&e.completer.detach()},PageUp:function(e){e.completer.popup.gotoPageUp()},PageDown:function(e){e.completer.popup.gotoPageDown()}},m.startCommand={name:"startAutocomplete",exec:function(e,t){var a=m.for(e);a.autoInsert=!1,a.autoSelect=!0,a.autoShown=!1,a.showPopup(e,t),a.cancelContextMenu()},bindKey:"Ctrl-Space|Ctrl-Shift-Space|Alt-Space"};var v=function(){function e(e){this.initialPosition=e,this.active=!0}return e.prototype.insertByIndex=function(e,t,a){return!(!this.completions||!this.completions.filtered)&&this.insertMatch(e,this.completions.filtered[t],a)},e.prototype.insertMatch=function(e,t,a){if(!t)return!1;if(e.startOperation({command:{name:"insertMatch"}}),t.completer&&t.completer.insertMatch)t.completer.insertMatch(e,t);else{if(!this.completions)return!1;var n=this.completions.filterText.length,s=0;if(t.range&&t.range.start.row===t.range.end.row&&(n-=this.initialPosition.prefix.length,n+=this.initialPosition.pos.column-t.range.start.column,s+=t.range.end.column-this.initialPosition.pos.column),n||s){var o;o=e.selection.getAllRanges?e.selection.getAllRanges():[e.getSelectionRange()];for(var l,r=0;l=o[r];r++)l.start.column-=n,l.end.column+=s,e.session.remove(l)}t.snippet?d.insertSnippet(e,t.snippet):this.$insertString(e,t),t.completer&&t.completer.onInsert&&"function"==typeof t.completer.onInsert&&t.completer.onInsert(e,t),t.command&&"startAutocomplete"===t.command&&e.execCommand(t.command)}return e.endOperation(),!0},e.prototype.$insertString=function(e,t){var a=t.value||t;e.execCommand("insertstring",a)},e.prototype.gatherCompletions=function(e,t){var a=e.getSession(),n=e.getCursorPosition(),s=r.getCompletionPrefix(e),o=[];this.completers=e.completers;var l=e.completers.length;return e.completers.forEach((function(i,c){i.getCompletions(e,a,n,s,(function(a,n){i.hideInlinePreview&&(n=n.map((function(e){return Object.assign(e,{hideInlinePreview:i.hideInlinePreview})}))),!a&&n&&(o=o.concat(n)),t(null,{prefix:r.getCompletionPrefix(e),matches:o,finished:0==--l})}))})),!0},e.prototype.provideCompletions=function(e,t,a){var n=function(e){var n=e.prefix,s=e.matches;this.completions=new f(s),t.exactMatch&&(this.completions.exactMatch=!0),t.ignoreCaption&&(this.completions.ignoreCaption=!0),this.completions.setFilter(n),(e.finished||this.completions.filtered.length)&&a(null,this.completions,e.finished)}.bind(this),s=!0,o=null;if(this.gatherCompletions(e,function(e,t){this.active&&(e&&(a(e,[],!0),this.detach()),0===t.prefix.indexOf(t.prefix)&&(s?o=t:n(t)))}.bind(this)),s=!1,o){var l=o;o=null,n(l)}},e.prototype.detach=function(){this.active=!1,this.completers&&this.completers.forEach((function(e){"function"==typeof e.cancel&&e.cancel()}))},e}(),f=function(){function e(e,t){this.all=e,this.filtered=e,this.filterText=t||"",this.exactMatch=!1,this.ignoreCaption=!1}return e.prototype.setFilter=function(e){if(e.length>this.filterText&&0===e.lastIndexOf(this.filterText,0))var t=this.filtered;else t=this.all;this.filterText=e,t=(t=this.filterCompletions(t,this.filterText)).sort((function(e,t){return t.exactMatch-e.exactMatch||t.$score-e.$score||(e.caption||e.value).localeCompare(t.caption||t.value)}));var a=null;t=t.filter((function(e){var t=e.snippet||e.caption||e.value;return t!==a&&(a=t,!0)})),this.filtered=t},e.prototype.filterCompletions=function(e,t){var a=[],n=t.toUpperCase(),s=t.toLowerCase();e:for(var o,l=0;o=e[l];l++)if(o.skipFilter)o.$score=o.score,a.push(o);else{var r=!this.ignoreCaption&&o.caption||o.value||o.snippet;if(r){var i,c,d=-1,h=0,g=0;if(this.exactMatch){if(t!==r.substr(0,t.length))continue e}else{var p=r.toLowerCase().indexOf(s);if(p>-1)g=p;else for(var u=0;u=0&&(v<0||m0&&(-1===d&&(g+=10),g+=c,h|=1<l||(d.range.start.row===i?r++:(i=d.range.start.row,r=0),r>200))){var h=d.range.clipRows(o,l);if(h.start.row!==h.end.row||h.start.column!==h.end.column){var g=h.toScreenRange(a);g.isEmpty()?(s=a.getNextFoldLine(h.end.row,s))&&s.end.row>h.end.row&&(o=s.end.row):"fullLine"===this.markerType?t.drawFullLineMarker(e,g,d.className,n):g.isMultiLine()?"line"===this.markerType?t.drawMultiLineMarker(e,g,d.className,n):t.drawTextMarker(e,g,d.className,n):t.drawSingleLineMarker(e,g,d.className+" ace_br15",n)}}}},e}();n.prototype.MAX_MARKERS=1e4,t.MarkerGroup=n})),ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"],(function(e,t,a){var n=e("../range").Range,s=/[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/;t.id="textCompleter",t.getCompletions=function(e,t,a,o,l){var r=function(e,t){var a=function(e,t){return e.getTextRange(n.fromPoints({row:0,column:0},t)).split(s).length-1}(e,t),o=e.getValue().split(s),l=Object.create(null),r=o[a];return o.forEach((function(e,t){if(e&&e!==r){var n=Math.abs(a-t),s=o.length-n;l[e]?l[e]=Math.max(s,l[e]):l[e]=s}})),l}(t,a);l(null,Object.keys(r).map((function(e){return{caption:e,value:e,score:r[e],meta:"local"}})))}})),ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/marker_group","ace/autocomplete/text_completer","ace/editor","ace/config"],(function(e,t,a){"use strict";var n=e("../snippets").snippetManager,s=e("../autocomplete").Autocomplete,o=e("../config"),l=e("../lib/lang"),r=e("../autocomplete/util"),i=e("../marker_group").MarkerGroup,c=e("../autocomplete/text_completer"),d={getCompletions:function(e,t,a,n,s){if(t.$mode.completer)return t.$mode.completer.getCompletions(e,t,a,n,s);var o=e.session.getState(a.row),l=t.$mode.getCompletions(o,t,a,n);s(null,l=l.map((function(e){return e.completerId=d.id,e})))},id:"keywordCompleter"},h={getCompletions:function(e,t,a,s,o){var l=[],r=t.getTokenAt(a.row,a.column);r&&r.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)?l.push("html-tag"):l=n.getActiveScopes(e);var i=n.snippetMap,c=[];l.forEach((function(e){for(var t=i[e]||[],a=t.length;a--;){var n=t[a],s=n.name||n.tabTrigger;s&&c.push({caption:s,snippet:n.content,meta:n.tabTrigger&&!n.name?n.tabTrigger+"⇥ ":"snippet",completerId:h.id})}}),this),o(null,c)},getDocTooltip:function(e){var t,a;e.snippet&&!e.docHTML&&(e.docHTML=["",l.escapeHTML(e.caption),"","
",l.escapeHTML((t=e.snippet,a={},t.replace(/\${(\d+)(:(.*?))?}/g,(function(e,t,n,s){return a[t]=s||""})).replace(/\$(\d+?)/g,(function(e,t){return a[t]}))))].join(""))},id:"snippetCompleter"},g=[h,c,d];t.setCompleters=function(e){g.length=0,e&&g.push.apply(g,e)},t.addCompleter=function(e){g.push(e)},t.textCompleter=c,t.keyWordCompleter=d,t.snippetCompleter=h;var p,u={name:"expandSnippet",exec:function(e){return n.expandWithTab(e)},bindKey:"Tab"},m=function(e,t){v(t.session.$mode)},v=function(e){"string"==typeof e&&(e=o.$modes[e]),e&&(n.files||(n.files={}),f(e.$id,e.snippetFileId),e.modes&&e.modes.forEach(v))},f=function(e,t){t&&e&&!n.files[e]&&(n.files[e]={},o.loadModule(t,(function(t){t&&(n.files[e]=t,!t.snippets&&t.snippetText&&(t.snippets=n.parseSnippetFile(t.snippetText)),n.register(t.snippets||[],t.scope),t.includeScopes&&(n.snippetMap[t.scope].includeScopes=t.includeScopes,t.includeScopes.forEach((function(e){v("ace/mode/"+e)}))))})))},b=function(e){var t=e.editor,a=t.completer&&t.completer.activated;if("backspace"===e.command.name)a&&!r.getCompletionPrefix(t)&&t.completer.detach();else if("insertstring"===e.command.name&&!a){p=e;var n=e.editor.$liveAutocompletionDelay;n?w.delay(n):y(e)}},w=l.delayedCall((function(){y(p)}),0),y=function(e){var t=e.editor,a=r.getCompletionPrefix(t),n=e.args,o=r.triggerAutocomplete(t,n);if(a&&a.length>=t.$liveAutocompletionThreshold||o){var l=s.for(t);l.autoShown=!0,l.showPopup(t)}},x=e("../editor").Editor;e("../config").defineOptions(x.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(s.for(this),this.completers||(this.completers=Array.isArray(e)?e:g),this.commands.addCommand(s.startCommand)):this.commands.removeCommand(s.startCommand)},value:!1},enableLiveAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:g),this.commands.on("afterExec",b)):this.commands.off("afterExec",b)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(u),this.on("changeMode",m),m(0,this)):(this.commands.removeCommand(u),this.off("changeMode",m))},value:!1}}),t.MarkerGroup=i})),ace.require(["ace/ext/language_tools"],(function(t){e&&(e.exports=t)}))},135:(e,t,a)=>{e.exports=a(795)()},181:(e,t,a)=>{var n=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,l=/^0o[0-7]+$/i,r=parseInt,i="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g,c="object"==typeof self&&self&&self.Object===Object&&self,d=i||c||Function("return this")(),h=Object.prototype.toString,g=Math.max,p=Math.min,u=function(){return d.Date.now()};function m(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function v(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(m(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=m(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(n,"");var a=o.test(e);return a||l.test(e)?r(e.slice(2),a?2:8):s.test(e)?NaN:+e}e.exports=function(e,t,a){var n,s,o,l,r,i,c=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var a=n,o=s;return n=s=void 0,c=t,l=e.apply(o,a)}function w(e){var a=e-i;return void 0===i||a>=t||a<0||h&&e-c>=o}function y(){var e=u();if(w(e))return x(e);r=setTimeout(y,function(e){var a=t-(e-i);return h?p(a,o-(e-c)):a}(e))}function x(e){return r=void 0,f&&n?b(e):(n=s=void 0,l)}function k(){var e=u(),a=w(e);if(n=arguments,s=this,i=e,a){if(void 0===r)return function(e){return c=e,r=setTimeout(y,t),d?b(e):l}(i);if(h)return r=setTimeout(y,t),b(i)}return void 0===r&&(r=setTimeout(y,t)),l}return t=v(t)||0,m(a)&&(d=!!a.leading,o=(h="maxWait"in a)?g(v(a.maxWait)||0,t):o,f="trailing"in a?!!a.trailing:f),k.cancel=function(){void 0!==r&&clearTimeout(r),c=0,n=i=s=r=void 0},k.flush=function(){return void 0===r?l:x(u())},k}},428:e=>{"use strict";e.exports=window.jQuery},470:(e,t,a)=>{"use strict";var n=a(5549);a(3091).default,a(4038).default,t.Ay=n.default},773:(e,t,a)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.Dots=void 0;var s=r(a(1609)),o=r(a(6942)),l=a(9445);function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function c(e,t,a){return(t=h(t))in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function d(e,t){for(var a=0;a=k&&u<=y:u===k}),M={message:"dots",index:b,slidesToScroll:h,currentSlide:u},z=this.clickHandler.bind(this,M);f=f.concat(s.default.createElement("li",{key:b,className:C},s.default.cloneElement(this.props.customPaging(b),{onClick:z})))}return s.default.cloneElement(this.props.appendDots(f),function(e){for(var t=1;t{"use strict";var n=a(1212);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,t,a,s,o,l){if(l!==n){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:s};return a.PropTypes=a,a}},952:(e,t,a)=>{e=a.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,a,n){"string"==typeof e?(2==arguments.length&&(n=a),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var a,n,s=function(e,t,a){if("string"==typeof t){var n=r(e,t);if(null!=n)return a&&a(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],l=0,i=t.length;la.length)&&(t=a.length),t-=e.length;var n=a.indexOf(e,t);return-1!==n&&n===t})),String.prototype.repeat||n(String.prototype,"repeat",(function(e){for(var t="",a=this;e>0;)1&e&&(t+=a),(e>>=1)&&(a+=a);return t})),String.prototype.includes||n(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),a=1;a>>0,n=0|arguments[1],s=n<0?Math.max(a+n,0):Math.min(n,a),o=arguments[2],l=void 0===o?a:0|o,r=l<0?Math.max(a+l,0):Math.min(l,a);s0;)1&t&&(a+=e),(t>>=1)&&(e+=e);return a};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var a in e)t[a]=e[a];return t},t.copyArray=function(e){for(var t=[],a=0,n=e.length;a65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,a){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},s=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),o=n.userAgent||"",l=n.appName||"";t.isWin="win"==s,t.isMac="mac"==s,t.isLinux="linux"==s,t.isIE="Microsoft Internet Explorer"==l||l.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(o.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,a){"use strict";var n,s=e("./useragent");t.buildDom=function e(t,a,n){if("string"==typeof t&&t){var s=document.createTextNode(t);return a&&a.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&a&&a.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],l=0;l1&&(e.style.left=2*a-n+"px")}e.style.right&&(a=parseFloat(e.style.right),n=window.innerWidth-t.right,Math.abs(a-n)>1&&(e.style.right=2*a-n+"px")),e.style.top&&(a=parseFloat(e.style.top),n=+t.top,Math.abs(a-n)>1&&(e.style.top=2*a-n+"px")),e.style.bottom&&(a=parseFloat(e.style.bottom),n=window.innerHeight-t.bottom,Math.abs(a-n)>1&&(e.style.bottom=2*a-n+"px"))},t.scrollbarWidth=function(e){var a=t.createElement("ace_inner");a.style.width="100%",a.style.minWidth="0px",a.style.height="200px",a.style.display="block";var n=t.createElement("ace_outer"),s=n.style;s.position="absolute",s.left="-10000px",s.overflow="hidden",s.width="200px",s.minWidth="0px",s.height="150px",s.display="block",n.appendChild(a);var o=e&&e.documentElement||document&&document.documentElement;if(!o)return 0;o.appendChild(n);var l=a.offsetWidth;s.overflow="scroll";var r=a.offsetWidth;return l===r&&(r=n.clientWidth),o.removeChild(n),l-r},t.computedStyle=function(e,t){return window.getComputedStyle(e,"")||{}},t.setStyle=function(e,t,a){e[t]!==a&&(e[t]=a)},t.HAS_CSS_ANIMATION=!1,t.HAS_CSS_TRANSFORMS=!1,t.HI_DPI=!s.isWin||"undefined"!=typeof window&&window.devicePixelRatio>=1.5,s.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var i=document.createElement("div");t.HI_DPI&&void 0!==i.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),s.isEdge||void 0===i.style.animationName||(t.HAS_CSS_ANIMATION=!0),i=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,a){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(a)+"px)"}:t.translate=function(e,t,a){e.style.top=Math.round(a)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("./dom");t.get=function(e,t){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4===a.readyState&&t(a.responseText)},a.send(null)},t.loadScript=function(e,t){var a=n.getDocumentHead(),s=document.createElement("script");s.src=e,a.appendChild(s),s.onload=s.onreadystatechange=function(e,a){!a&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,a||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,a){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var a in t)e[a]=t[a];return e},t.implement=function(e,a){t.mixin(e,a)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,a){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(a.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),a=a.slice();for(var l=0;l1&&(s=a[a.length-2]);var l=i[t+"Path"];return null==l?l=i.basePath:"/"==n&&(t=n=""),l&&"/"!=l.slice(-1)&&(l+="/"),l+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return i.$moduleUrls[e]=t},t.setLoader=function(e){r=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(a,n){var o;if(Array.isArray(a))var l=a[0],i=a[1];else"string"==typeof a&&(i=a);var d=function(a){if(a&&!t.$loading[i])return n&&n(a);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var o=function(){!function(t,a){"ace/theme/textmate"===t||"./theme/textmate"===t?a(0,e("./theme/textmate")):r?r(t,a):console.error("loader is not configured")}(i,(function(e,a){a&&(t.$loaded[i]=a),t._emit("load.module",{name:i,module:a});var n=t.$loading[i];t.$loading[i]=null,n.forEach((function(e){e&&e(a)}))}))};if(!t.get("packaged"))return o();s.loadScript(t.moduleUrl(i,l),o),c()}};if(t.dynamicModules[i])t.dynamicModules[i]().then((function(e){e.default?d(e.default):d(e)}));else{try{o=this.$require(i)}catch(e){}d(o||t.$loaded[i])}},t.$require=function(e){if("function"==typeof a.require)return a.require(e)},t.setModuleLoader=function(e,a){t.dynamicModules[e]=a};var c=function(){i.basePath||i.workerPath||i.modePath||i.themePath||Object.keys(i.$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"),c=function(){})};t.version="1.44.0"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var s=e("./config");s.setLoader((function(t,a){e([t],(function(e){a(null,e)}))}));var o=function(){return this||"undefined"!=typeof window&&window}();function l(t){if(o&&o.document){s.set("packaged",t||e.packaged||n.packaged||o.define&&a.amdD.packaged);var l={},r="",i=document.currentScript||document._currentScript,c=i&&i.ownerDocument||document;i&&i.src&&(r=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d,h=c.getElementsByTagName("script"),g=0;g ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,a=e.end,n=e.start;return 1==(t=this.compare(a.row,a.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,a){if(this.end.row>a)var n={row:a+1,column:0};else this.end.rowa)var s={row:a+1,column:0};else this.start.row1?++h>4&&(h=1):h=1,o.isIE){var l=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-i)>5;c&&!l||(h=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),a[h-1]||600),1==h&&(r=e.clientX,i=e.clientY)}if(e._clicks=h,n[s]("mousedown",e),h>4)h=0;else if(h>1)return n[s](g[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",p,l)}))},t.getModifierString=function(e){return s.KEY_MODS[g(e)]},t.addCommandKeyListener=function(e,a,n){var i=null;d(e,"keydown",(function(e){l[e.keyCode]=(l[e.keyCode]||0)+1;var t=function(e,t,a){var n=g(t);if(!a&&t.code&&(a=s.$codeToKeyCode[t.code]||a),!o.isMac&&l){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),l.altGr){if(!(3&~n))return;l.altGr=0}if(18===a||17===a){var i=t.location;17===a&&1===i?1==l[a]&&(r=t.timeStamp):18===a&&3===n&&2===i&&t.timeStamp-r<50&&(l.altGr=!0)}}if(a in s.MODIFIER_KEYS&&(a=-1),n||13!==a||3!==t.location||(e(t,n,-a),!t.defaultPrevented)){if(o.isChromeOS&&8&n){if(e(t,n,a),t.defaultPrevented)return;n&=-9}return!!(n||a in s.FUNCTION_KEYS||a in s.PRINTABLE_KEYS)&&e(t,n,a)}}(a,e,e.keyCode);return i=e.defaultPrevented,t}),n),d(e,"keypress",(function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)}),n),d(e,"keyup",(function(e){l[e.keyCode]=null}),n),l||(p(),d(window,"focus",p))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var u=1;t.nextTick=function(e,a){a=a||window;var n="zero-timeout-message-"+u++,s=function(o){o.data==n&&(t.stopPropagation(o),h(a,"message",s),e())};d(a,"message",s),a.postMessage(n,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,a){return setTimeout((function a(){t.$idleBlocked?setTimeout(a,100):e()}),a)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,a){"use strict";var n;a.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,a){"use strict";var n=e("../lib/event"),s=e("../config").nls,o=e("../lib/useragent"),l=e("../lib/dom"),r=e("../lib/lang"),i=e("../clipboard"),c=o.isChrome<18,d=o.isIE,h=o.isChrome>63,g=400,p=e("../lib/keys"),u=p.KEY_MODS,m=o.isIOS,v=m?/\s/:/\n/,f=o.isMobile,b=function(){function e(e,t){var a=this;this.host=t,this.text=l.createElement("textarea"),this.text.className="ace_text-input",this.text.setAttribute("wrap","off"),this.text.setAttribute("autocomplete","off"),this.text.setAttribute("autocorrect","off"),this.text.setAttribute("autocapitalize","off"),this.text.setAttribute("spellcheck","false"),this.text.style.opacity="0",e.insertBefore(this.text,e.firstChild),this.copied=!1,this.pasted=!1,this.inComposition=!1,this.sendingText=!1,this.tempStyle="",f||(this.text.style.fontSize="1px"),this.commandMode=!1,this.ignoreFocusEvents=!1,this.lastValue="",this.lastSelectionStart=0,this.lastSelectionEnd=0,this.lastRestoreEnd=0,this.rowStart=Number.MAX_SAFE_INTEGER,this.rowEnd=Number.MIN_SAFE_INTEGER,this.numberOfExtraLines=0;try{this.$isFocused=document.activeElement===this.text}catch(e){}this.cancelComposition=this.cancelComposition.bind(this),this.setAriaOptions({role:"textbox"}),n.addListener(this.text,"blur",(function(e){a.ignoreFocusEvents||(t.onBlur(e),a.$isFocused=!1)}),t),n.addListener(this.text,"focus",(function(e){if(!a.ignoreFocusEvents){if(a.$isFocused=!0,o.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),o.isEdge?setTimeout(a.resetSelection.bind(a)):a.resetSelection()}}),t),this.$focusScroll=!1,t.on("beforeEndOperation",(function(){var e=t.curOp,n=e&&e.command&&e.command.name;if("insertstring"!=n){var s=n&&(e.docChanged||e.selectionChanged);a.inComposition&&s&&(a.lastValue=a.text.value="",a.onCompositionEnd()),a.resetSelection()}})),t.on("changeSelection",this.setAriaLabel.bind(this)),this.resetSelection=m?this.$resetSelectionIOS:this.$resetSelection,this.$isFocused&&t.onFocus(),this.inputHandler=null,this.afterContextMenu=!1,n.addCommandKeyListener(this.text,(function(e,n,s){if(!a.inComposition)return t.onCommandKey(e,n,s)}),t),n.addListener(this.text,"select",this.onSelect.bind(this),t),n.addListener(this.text,"input",this.onInput.bind(this),t),n.addListener(this.text,"cut",this.onCut.bind(this),t),n.addListener(this.text,"copy",this.onCopy.bind(this),t),n.addListener(this.text,"paste",this.onPaste.bind(this),t),"oncut"in this.text&&"oncopy"in this.text&&"onpaste"in this.text||n.addListener(e,"keydown",(function(e){if((!o.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:a.onCopy(e);break;case 86:a.onPaste(e);break;case 88:a.onCut(e)}}),t),this.syncComposition=r.delayedCall(this.onCompositionUpdate.bind(this),50).schedule.bind(null,null),n.addListener(this.text,"compositionstart",this.onCompositionStart.bind(this),t),n.addListener(this.text,"compositionupdate",this.onCompositionUpdate.bind(this),t),n.addListener(this.text,"keyup",this.onKeyup.bind(this),t),n.addListener(this.text,"keydown",this.syncComposition.bind(this),t),n.addListener(this.text,"compositionend",this.onCompositionEnd.bind(this),t),this.closeTimeout,n.addListener(this.text,"mouseup",this.$onContextMenu.bind(this),t),n.addListener(this.text,"mousedown",(function(e){e.preventDefault(),a.onContextMenuClose()}),t),n.addListener(t.renderer.scroller,"contextmenu",this.$onContextMenu.bind(this),t),n.addListener(this.text,"contextmenu",this.$onContextMenu.bind(this),t),m&&this.addIosSelectionHandler(e,t,this.text)}return e.prototype.addIosSelectionHandler=function(e,t,a){var n=this,s=null,o=!1;a.addEventListener("keydown",(function(e){s&&clearTimeout(s),o=!0}),!0),a.addEventListener("keyup",(function(e){s=setTimeout((function(){o=!1}),100)}),!0);var l=function(e){if(document.activeElement===a&&!(o||n.inComposition||t.$mouseHandler.isMousePressed||n.copied)){var s=a.selectionStart,l=a.selectionEnd,r=null,i=0;if(0==s?r=p.up:1==s?r=p.home:l>n.lastSelectionEnd&&"\n"==n.lastValue[l]?r=p.end:sn.lastSelectionEnd&&n.lastValue.slice(0,l).split("\n").length>2?r=p.down:l>n.lastSelectionEnd&&" "==n.lastValue[l-1]?(r=p.right,i=u.option):(l>n.lastSelectionEnd||l==n.lastSelectionEnd&&n.lastSelectionEnd!=n.lastSelectionStart&&s==l)&&(r=p.right),s!==l&&(i|=u.shift),r){if(!t.onCommandKey({},i,r)&&t.commands){r=p.keyCodeToString(r);var c=t.commands.findKeyCommand(i,r);c&&t.execCommand(c)}n.lastSelectionStart=s,n.lastSelectionEnd=l,n.resetSelection("")}}};document.addEventListener("selectionchange",l),t.on("destroy",(function(){document.removeEventListener("selectionchange",l)}))},e.prototype.onContextMenuClose=function(){var e=this;clearTimeout(this.closeTimeout),this.closeTimeout=setTimeout((function(){e.tempStyle&&(e.text.style.cssText=e.tempStyle,e.tempStyle=""),e.host.renderer.$isMousePressed=!1,e.host.renderer.$keepTextAreaAtCursor&&e.host.renderer.$moveTextAreaToCursor()}),0)},e.prototype.$onContextMenu=function(e){this.host.textInput.onContextMenu(e),this.onContextMenuClose()},e.prototype.onKeyup=function(e){27==e.keyCode&&this.text.value.length500||v.test(a)||f&&this.lastSelectionStart<1&&this.lastSelectionStart==this.lastSelectionEnd)&&this.resetSelection()},e.prototype.sendText=function(e,t){if(this.afterContextMenu&&(this.afterContextMenu=!1),this.pasted)return this.resetSelection(),e&&this.host.onPaste(e),this.pasted=!1,"";for(var a=this.text.selectionStart,n=this.text.selectionEnd,s=this.lastSelectionStart,l=this.lastValue.length-this.lastSelectionEnd,r=e,i=e.length-a,c=e.length-n,d=0;s>0&&this.lastValue[d]==e[d];)d++,s--;for(r=r.slice(d),d=1;l>0&&this.lastValue.length-d>this.lastSelectionStart-1&&this.lastValue[this.lastValue.length-d]==e[e.length-d];)d++,l--;i-=d-1,c-=d-1;var h=r.length-d+1;if(h<0&&(s=-h,h=0),r=r.slice(0,h),!(t||r||i||s||l||c))return"";this.sendingText=!0;var g=!1;return o.isAndroid&&". "==r&&(r=" ",g=!0),r&&!s&&!l&&!i&&!c||this.commandMode?this.host.onTextInput(r):this.host.onTextInput(r,{extendLeft:s,extendRight:l,restoreStart:i,restoreEnd:c}),this.sendingText=!1,this.lastValue=e,this.lastSelectionStart=a,this.lastSelectionEnd=n,this.lastRestoreEnd=c,g?"\n":r},e.prototype.onSelect=function(e){var t,a=this;this.inComposition||(this.copied?this.copied=!1:0===(t=this.text).selectionStart&&t.selectionEnd>=a.lastValue.length&&t.value===a.lastValue&&a.lastValue&&t.selectionEnd!==a.lastSelectionEnd?(this.host.selectAll(),this.resetSelection()):f&&this.text.selectionStart!=this.lastSelectionStart&&this.resetSelection())},e.prototype.$resetSelectionIOS=function(e){if(this.$isFocused&&(!this.copied||e)&&!this.sendingText){e||(e="");var t="\n ab"+e+"cde fg\n";t!=this.text.value&&(this.text.value=this.lastValue=t);var a=4+(e.length||(this.host.selection.isEmpty()?0:1));4==this.lastSelectionStart&&this.lastSelectionEnd==a||this.text.setSelectionRange(4,a),this.lastSelectionStart=4,this.lastSelectionEnd=a}},e.prototype.$resetSelection=function(){var e=this;if(!this.inComposition&&!this.sendingText&&(this.$isFocused||this.afterContextMenu)){this.inComposition=!0;var t=0,a=0,n="",s=function(t,a){for(var n=a,s=1;s<=t-e.rowStart&&s<2*e.numberOfExtraLines+1;s++)n+=e.host.session.getLine(t-s).length+1;return n};if(this.host.session){var o=this.host.selection,l=o.getRange(),r=o.cursor.row;r===this.rowEnd+1?(this.rowStart=this.rowEnd+1,this.rowEnd=this.rowStart+2*this.numberOfExtraLines):r===this.rowStart-1?(this.rowEnd=this.rowStart-1,this.rowStart=this.rowEnd-2*this.numberOfExtraLines):(rthis.rowEnd+1)&&(this.rowStart=r>this.numberOfExtraLines?r-this.numberOfExtraLines:0,this.rowEnd=r>this.numberOfExtraLines?r+this.numberOfExtraLines:2*this.numberOfExtraLines);for(var i=[],c=this.rowStart;c<=this.rowEnd;c++)i.push(this.host.session.getLine(c));if(n=i.join("\n"),t=s(l.start.row,l.start.column),a=s(l.end.row,l.end.column),l.start.rowthis.rowEnd){var h=this.host.session.getLine(this.rowEnd+1);a=l.end.row>this.rowEnd+1?h.length:l.end.column,a+=n.length+1,n=n+"\n"+h}else f&&r>0&&(n="\n"+n,a+=1,t+=1);n.length>g&&(t1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var a=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?a.selection.selectToPosition(e):t||a.selection.moveToPosition(e),t||this.select(),a.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,a=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(a);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=o(this.$clickSelection,a,t.session);a=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(a),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,a=this.editor,n=a.renderer.screenToTextCoordinates(this.x,this.y),s=a.selection[e](n.row,n.column);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s.start),r=this.$clickSelection.comparePoint(s.end);if(-1==l&&r<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==r&&l>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(-1==l&&1==r)n=s.end,t=s.start;else{var i=o(this.$clickSelection,n,a.session);n=i.cursor,t=i.anchor}a.selection.setSelectionAnchor(t.row,t.column)}a.selection.selectToPosition(n),a.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,a,n,s=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,a=this.x,n=this.y,Math.sqrt(Math.pow(a-e,2)+Math.pow(n-t,2))),o=Date.now();(s>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),a=this.editor,n=a.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=a.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),a=this.editor;this.setState("selectByLines");var n=a.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=a.selection.getLineRange(n.start.row),this.$clickSelection.end=a.selection.getLineRange(n.end.row).end):this.$clickSelection=a.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var a=this.$lastScroll,n=e.domEvent.timeStamp,s=n-a.t,o=s?e.wheelX/s:a.vx,l=s?e.wheelY/s:a.vy;s<550&&(o=(o+a.vx)/2,l=(l+a.vy)/2);var r=Math.abs(o/l),i=!1;return r>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(i=!0),r<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(i=!0),i?a.allowed=n:n-a.allowed<550&&(Math.abs(o)<=1.5*Math.abs(a.vx)&&Math.abs(l)<=1.5*Math.abs(a.vy)?(i=!0,a.allowed=n):a.allowed=0),a.t=n,a.vx=o,a.vy=l,i?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function o(e,t,a){if(e.start.row==e.end.row)var n=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)n=2*t.row-e.start.row-e.end.row;else n=3*t.column-2*a.getLine(e.start.row).length;return n<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,t.DefaultHandlers=s})),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],(function(e,t,a){"use strict";var n=e("../lib/event"),s=e("../lib/useragent"),o=function(){function e(e,t){this.speed,this.wheelX,this.wheelY,this.domEvent=e,this.editor=t,this.x=this.clientX=e.clientX,this.y=this.clientY=e.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1}return e.prototype.stopPropagation=function(){n.stopPropagation(this.domEvent),this.propagationStopped=!0},e.prototype.preventDefault=function(){n.preventDefault(this.domEvent),this.defaultPrevented=!0},e.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},e.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},e.prototype.getGutterRow=function(){var e=this.getDocumentPosition().row;return this.editor.session.documentToScreenRow(e,0)-this.editor.session.documentToScreenRow(this.editor.renderer.$gutterLayer.$lines.get(0).row,0)},e.prototype.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var e=this.editor.getSelectionRange();if(e.isEmpty())this.$inSelection=!1;else{var t=this.getDocumentPosition();this.$inSelection=e.contains(t.row,t.column)}return this.$inSelection},e.prototype.getButton=function(){return n.getButton(this.domEvent)},e.prototype.getShiftKey=function(){return this.domEvent.shiftKey},e.prototype.getAccelKey=function(){return s.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},e}();t.MouseEvent=o})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,a){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=e("./lib/dom"),r=(e("./lib/event"),e("./range").Range),i=e("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){l.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.theme&&(this.theme.isDark&&l.removeCssClass(this.getElement(),"ace_dark"),this.theme.cssClass&&l.removeCssClass(this.getElement(),this.theme.cssClass)),e.isDark&&l.addCssClass(this.getElement(),"ace_dark"),e.cssClass&&l.addCssClass(this.getElement(),e.cssClass),this.theme={isDark:e.isDark,cssClass:e.cssClass}},e.prototype.show=function(e,t,a){null!=e&&this.setText(e),null!=t&&null!=a&&this.setPosition(t,a),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),h=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,a,n;this.popups.sort((function(e,t){return t.priority-e.priority}));var s=[];try{for(var l=o(this.popups),r=l.next();!r.done;r=l.next()){var i=r.value,c=!0;try{for(var d=(a=void 0,o(s)),h=d.next();!h.done;h=d.next()){var g=h.value;if(this.doPopupsOverlap(g,i)){c=!1;break}}}catch(e){a={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(a)throw a.error}}c?s.push(i):i.hide()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var a=e.getElement().getBoundingClientRect(),n=t.getElement().getBoundingClientRect();return a.leftn.left&&a.topn.top},e}());t.popupManager=h,t.Tooltip=d;var g=function(e){function t(t){void 0===t&&(t=document.body);var a=e.call(this,t)||this;a.timeout=void 0,a.lastT=0,a.idleTime=350,a.lastEvent=void 0,a.onMouseOut=a.onMouseOut.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.waitForHover=a.waitForHover.bind(a),a.hide=a.hide.bind(a);var n=a.getElement();return n.style.whiteSpace="pre-wrap",n.style.pointerEvents="auto",n.addEventListener("mouseout",a.onMouseOut),n.tabIndex=-1,n.addEventListener("blur",function(){n.contains(document.activeElement)||this.hide()}.bind(a)),n.addEventListener("wheel",i),a}return s(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide);var t=e.renderer.getMouseEventTarget();t&&"function"==typeof t.removeEventListener&&t.addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide);var t=e.renderer.getMouseEventTarget();t&&"function"==typeof t.removeEventListener&&t.removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var a=t.$mouseHandler.isMousePressed;if(this.isOpen){var n=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(n.row,n.column)&&!a&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||a||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,a=e.getDocumentPosition(),n=t.session.getLine(a.row);if(a.column==n.length){var s=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),o=t.session.documentToScreenPosition(a.row,a.column);if(o.column!=s.column||o.row!=s.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,a,n){if(!(n&&n!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var s=e.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(s.theme)),this.isOpen=!0,this.range=r.fromPoints(t.start,t.end);var o=s.textToScreenCoordinates(t.start.row,t.start.column),i=s.scroller.getBoundingClientRect();o.pageX=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=e("../lib/dom"),r=e("./mouse_event").MouseEvent,i=e("../tooltip").HoverTooltip,c=e("../config").nls,d=e("../range").Range;t.GutterHandler=function(e){var t=e.editor,a=t.renderer.$gutterLayer;e.$tooltip=new h(t),e.$tooltip.addToEditor(t),e.$tooltip.setDataProvider((function(t,a){var n=t.getDocumentPosition().row;e.$tooltip.showTooltip(n)})),e.editor.setDefaultHandler("guttermousedown",(function(n){if(t.isFocused()&&0==n.getButton()&&"foldWidgets"!=a.getRegion(n)){var s=n.getDocumentPosition().row,o=t.session.selection;if(n.getShiftKey())o.selectTo(s,0);else{if(2==n.domEvent.detail)return t.selectAll(),n.preventDefault();e.$clickSelection=t.selection.getLineRange(s)}return e.setState("selectByLines"),e.captureMouse(n),n.preventDefault()}}))};var h=function(e){function t(a){var n=e.call(this,a.container)||this;n.id="gt"+ ++t.$uid,n.editor=a,n.visibleTooltipRow;var s=n.getElement();return s.setAttribute("role","tooltip"),s.setAttribute("id",n.id),s.style.pointerEvents="auto",n.idleTime=50,n.onDomMouseMove=n.onDomMouseMove.bind(n),n.onDomMouseOut=n.onDomMouseOut.bind(n),n.setClassName("ace_gutter-tooltip"),n}return s(t,e),t.prototype.onDomMouseMove=function(e){var t=new r(e,this.editor);this.onMouseMove(t,this.editor)},t.prototype.onDomMouseOut=function(e){var t=new r(e,this.editor);this.onMouseOut(t)},t.prototype.addToEditor=function(t){var a=t.renderer.$gutter;a.addEventListener("mousemove",this.onDomMouseMove),a.addEventListener("mouseout",this.onDomMouseOut),e.prototype.addToEditor.call(this,t)},t.prototype.removeFromEditor=function(t){var a=t.renderer.$gutter;a.removeEventListener("mousemove",this.onDomMouseMove),a.removeEventListener("mouseout",this.onDomMouseOut),e.prototype.removeFromEditor.call(this,t)},t.prototype.destroy=function(){this.editor&&this.removeFromEditor(this.editor),e.prototype.destroy.call(this)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var a,n,s=this.editor.renderer.$gutterLayer,o=s.$annotations[e];n=o?{displayText:Array.from(o.displayText),type:Array.from(o.type)}:{displayText:[],type:[]};var r=s.session.getFoldLine(e);if(r&&s.$showFoldedAnnotations){for(var i,c={error:[],security:[],warning:[],info:[],hint:[]},h={error:1,security:2,warning:3,info:4,hint:5},g=e+1;g<=r.end.row;g++)if(s.$annotations[g])for(var p=0;p2)return a.childNodes[2]}},t.prototype.$findCellByRow=function(e){return this.editor.renderer.$gutterLayer.$lines.cells.find((function(t){return t.row===e}))},t.prototype.hide=function(t){if(this.isOpen){if(this.$element.removeAttribute("aria-live"),null!=this.visibleTooltipRow){var a=this.$findLinkedAnnotationNode(this.visibleTooltipRow);a&&a.removeAttribute("aria-describedby")}this.visibleTooltipRow=void 0,this.editor._signal("hideGutterTooltip",this),e.prototype.hide.call(this,t)}},t.annotationsToSummaryString=function(e){var a,n,s=[];try{for(var l=o(["error","security","warning","info","hint"]),r=l.next();!r.done;r=l.next()){var i=r.value;if(e[i].length){var c=1===e[i].length?t.annotationLabels[i].singular:t.annotationLabels[i].plural;s.push("".concat(e[i].length," ").concat(c))}}}catch(e){a={error:e}}finally{try{r&&!r.done&&(n=l.return)&&n.call(l)}finally{if(a)throw a.error}}return s.join(", ")},t.prototype.isOutsideOfText=function(e){var t=e.editor.renderer.$gutter.getBoundingClientRect();return!(e.clientX>=t.left&&e.clientX<=t.right&&e.clientY>=t.top&&e.clientY<=t.bottom)},t}(i);h.$uid=0,t.GutterTooltip=h})),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=e("../lib/event"),o=e("../lib/useragent");function l(e){var t=e.editor,a=n.createElement("div");a.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",a.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach((function(t){e[t]=this[t]}),this),t.on("mousedown",this.onMouseDown.bind(e));var l,i,c,d,h,g,p,u,m,v,f,b=t.container,w=0;function y(){var e=g;(function(e,a){var n=Date.now(),s=!a||e.row!=a.row,o=!a||e.column!=a.column;!v||s||o?(t.moveCursorToPosition(e),v=n,f={x:i,y:c}):r(f.x,f.y,i,c)>5?v=null:n-v>=200&&(t.renderer.scrollCursorIntoView(),v=null)})(g=t.renderer.screenToTextCoordinates(i,c),e),function(e,a){var n=Date.now(),s=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,l=t.renderer.scroller.getBoundingClientRect(),r={x:{left:i-l.left,right:l.right-i},y:{top:c-l.top,bottom:l.bottom-c}},d=Math.min(r.x.left,r.x.right),h=Math.min(r.y.top,r.y.bottom),g={row:e.row,column:e.column};d/o<=2&&(g.column+=r.x.left=200&&t.renderer.scrollCursorIntoView(g):m=n:m=null}(g,e)}function x(){h=t.selection.toOrientedRange(),l=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),y(),d=setInterval(y,20),w=0,s.addListener(document,"mousemove",M)}function k(){clearInterval(d),t.session.removeMarker(l),l=null,t.selection.fromOrientedRange(h),t.isFocused()&&!u&&t.$resetCursorStyle(),h=null,g=null,w=0,m=null,v=null,s.removeListener(document,"mousemove",M)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var n=this;return setTimeout((function(){n.startSelect(),n.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var s=e.dataTransfer;s.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(a),s.setDragImage&&s.setDragImage(a,0,0),setTimeout((function(){t.container.removeChild(a)})),s.clearData(),s.setData("Text",t.session.getTextRange()),u=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,u=!1,this.setState(null),!t.getReadOnly()){var a=e.dataTransfer.dropEffect;p||"move"!=a||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&z(e.dataTransfer))return i=e.clientX,c=e.clientY,l||x(),w++,e.dataTransfer.dropEffect=p=E(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&z(e.dataTransfer))return i=e.clientX,c=e.clientY,l||(x(),w++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=E(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--w<=0&&l)return k(),p=null,s.preventDefault(e)},this.onDrop=function(e){if(g){var a=e.dataTransfer;if(u)switch(p){case"move":h=h.contains(g.row,g.column)?{start:g,end:g}:t.moveText(h,g);break;case"copy":h=t.moveText(h,g,!0)}else{var n=a.getData("Text");h={start:g,end:t.session.insert(g,n)},t.focus(),p=null}return k(),s.preventDefault(e)}},s.addListener(b,"dragstart",this.onDragStart.bind(e),t),s.addListener(b,"dragend",this.onDragEnd.bind(e),t),s.addListener(b,"dragenter",this.onDragEnter.bind(e),t),s.addListener(b,"dragover",this.onDragOver.bind(e),t),s.addListener(b,"dragleave",this.onDragLeave.bind(e),t),s.addListener(b,"drop",this.onDrop.bind(e),t);var C=null;function M(){null==C&&(C=setTimeout((function(){null!=C&&l&&k()}),20))}function z(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function E(e){var t=["copy","copymove","all","uninitialized"],a=o.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var s="none";return a&&t.indexOf(n)>=0?s="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?s="move":t.indexOf(n)>=0&&(s="copy"),s}}function r(e,t,a,n){return Math.sqrt(Math.pow(a-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,a=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&a){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=e.domEvent.target||e.domEvent.srcElement;"unselectable"in s&&(s.unselectable="on"),t.getDragDelay()?(o.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(l.prototype),t.DragdropHandler=l})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("./mouse_event").MouseEvent,s=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var a,l,r,i,c,d,h,g,p,u="scroll",m=0,v=0,f=0,b=0;function w(){if(t.getOption("enableMobileMenu")){p||(r=window.navigator&&window.navigator.clipboard,i=!1,c=function(e){return t.commands.canExecute(e,t)},d=function(e){var a,n,s=e.target.getAttribute("action");if("more"==s||!i)return i=!i,a=t.getCopyText(),n=t.session.getUndoManager().hasUndo(),void p.replaceChild(o.buildDom(i?["span",!a&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],a&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],a&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],r&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],n&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild);"paste"==s?r.readText().then((function(e){t.execCommand(s,e)})):s&&("cut"!=s&&"copy"!=s||(r?r.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(s)),p.firstChild.style.display="none",i=!1,"openCommandPalette"!=s&&t.focus()},(p=o.buildDom(["div",{class:"ace_mobile-menu",onclick:d},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container)).addEventListener("touchstart",(function(e){u="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()})),p.addEventListener("touchend",(function(e){e.stopPropagation(),e.preventDefault(),d(e)})));var e=t.selection.cursor,a=t.renderer.textToScreenCoordinates(e.row,e.column),n=t.renderer.textToScreenCoordinates(0,0).pageX,s=t.renderer.scrollLeft,l=t.container.getBoundingClientRect();p.style.top=a.pageY-l.top-3+"px",a.pageX-l.left1)return clearTimeout(c),c=null,r=-1,void(u="zoom");g=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,p=e.timeStamp;i=p;var w=s[0],y=w.clientX,k=w.clientY;Math.abs(a-y)+Math.abs(l-k)>o&&(r=-1),a=e.clientX=y,l=e.clientY=k,f=b=0;var C=new n(e,t);if(h=C.getDocumentPosition(),p-r<500&&1==s.length&&!m)v++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=v>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),u="wait"}();else{v=0;var M=t.selection.cursor,z=t.selection.isEmpty()?M:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(M,!0),_=t.renderer.$cursorLayer.getPixelPosition(z,!0),L=t.renderer.scroller.getBoundingClientRect(),H=t.renderer.layerConfig.offset,S=t.renderer.scrollLeft,V=function(e,t){return(e/=d)*e+(t=t/o-.75)*t};if(e.clientX$?"cursor":"anchor"),u=$<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(x,450)}r=p}),t),s.addListener(e,"touchend",(function(e){g=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==u?(u="",m=0):c?(t.selection.moveToPosition(h),m=0,w()):"scroll"==u?(m+=60,d=setInterval((function(){m--<=0&&(clearInterval(d),d=null),Math.abs(f)<.01&&(f=0),Math.abs(b)<.01&&(b=0),m<20&&(f*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*f,10*b),e==t.session.getScrollTop()&&(m=0)}),10),y()):w(),clearTimeout(c),c=null}),t),s.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var s=e.touches;if(!(s.length>1||"zoom"==u)){var o=s[0],r=a-o.clientX,d=l-o.clientY;if("wait"==u){if(!(r*r+d*d>4))return e.preventDefault();u="cursor"}a=o.clientX,l=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,g=h-i;if(i=h,"scroll"==u){var p=new n(e,t);p.speed=1,p.wheelX=r,p.wheelY=d,10*Math.abs(r)=e){for(o=h+1;o=e;)o++;for(r=h,i=o-1;r=t.length||2!=(i=a[s-1])&&3!=i||2!=(c=t[s+1])&&3!=c?4:(o&&(c=3),c==i?c:4);case 10:return 2==(i=s>0?a[s-1]:5)&&s+10&&2==a[s-1])return 2;if(o)return 4;for(p=s+1,g=t.length;p=1425&&m<=2303||64286==m;if(i=t[p],v&&(1==i||7==i))return 1}return s<1||5==(i=t[s-1])?4:a[s-1];case 5:return o=!1,l=!0,n;case 6:return r=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case h:return 4}}function v(e){var t=e.charCodeAt(0),a=t>>8;return 0==a?t>191?0:g[t]:5==a?/[\u0591-\u05f4]/.test(e)?1:0:6==a?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==a&&t<=8287?p[255&t]:254==a&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,a,d){if(e.length<2)return{};var g=e.split(""),p=new Array(g.length),f=new Array(g.length),b=[];n=d?1:0,function(e,t,a,d){var h=n?c:i,g=null,p=null,u=null,f=0,b=null,w=-1,y=null,x=null,k=[];if(!d)for(y=0,d=[];y0)if(16==b){for(y=w;y-1){for(y=w;y=0&&8==d[C];C--)t[C]=n}}(g,b,g.length,a);for(var w=0;w7&&a[w]<13||4===a[w]||a[w]===h)?b[w]=t.ON_R:w>0&&"ل"===g[w-1]&&/\u0622|\u0623|\u0625|\u0627/.test(g[w])&&(b[w-1]=b[w]=t.R_H,w++);for(g[g.length-1]===t.DOT&&(b[g.length-1]=t.B),"‫"===g[0]&&(b[0]=t.RLE),w=0;w=0&&(e=this.session.$docRowCache[a])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var a,n=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(a=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=a,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var a=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[n.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,s=n.getVisualFromLogicalIdx(a,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&e<=t&&o[s]%2!=0&&s++;for(var r=0;rt&&o[s]%2==0&&(l+=this.charWidths[o[s]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},e.prototype.getSelections=function(e,t){var a,n=this.bidiMap,s=n.bidiLevels,o=[],l=0,r=Math.min(e,t)-this.wrapIndent,i=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,h=0;this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,p=0;p=r&&ga+o/2;){if(a+=o,n===s.length-1){o=0;break}o=this.charWidths[s[++n]]}return n>0&&s[n-1]%2!=0&&s[n]%2==0?(e0&&s[n-1]%2==0&&s[n]%2!=0?t=1+(e>a?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===s.length-1&&0===o&&s[n-1]%2==0||!this.isRtlDir&&0===n&&s[n]%2!=0?t=1+this.bidiMap.logicalFromVisual[n]:(n>0&&s[n-1]%2!=0&&0!==o&&n--,t=this.bidiMap.logicalFromVisual[n]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=l})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,a){"use strict";var n=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,l=e("./range").Range,r=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?l.fromPoints(t,t):this.isBackwards()?l.fromPoints(t,e):l.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var a=t?e.end:e.start,n=t?e.start:e.end;this.$setSelection(a.row,a.column,n.row,n.column)},e.prototype.$setSelection=function(e,t,a,n){if(!this.$silent){var s=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(a,n),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||o)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var a=e||this.lead;e=a.row,t=a.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var a,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,a=s.end.row):a=n,!0===t?new l(n,0,a,this.session.getLine(a).length):new l(n,0,a+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,a){var n=e.column,s=e.column+t;return a<0&&(n=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,s).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var a=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,a,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-a):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();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&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,a=this.doc.getLine(e),n=a.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s)this.moveCursorTo(s.end.row,s.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=a.substring(t)),t>=a.length)return this.moveCursorTo(e,a.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,a)}},e.prototype.$shortWordEndIndex=function(e){var t,a=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))a=this.session.tokenRe.lastIndex;else{for(;(t=e[a])&&n.test(t);)a++;if(a<1)for(s.lastIndex=0;(t=e[a])&&!s.test(t);)if(s.lastIndex=0,a++,n.test(t)){if(a>2){a--;break}for(;(t=e[a])&&n.test(t);)a++;if(a>2)break}}return s.lastIndex=0,a},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,a=this.doc.getLine(e),n=a.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==a.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e0&&/^\s*$/.test(n));a=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),l=this.$shortWordEndIndex(o);return this.moveCursorTo(t,a-l)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var a,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(a=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(a/this.session.$bidiHandler.charWidths[0])):a=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];e<0?e-=s.rowsAbove||0:e>0&&(e+=s.rowCount-(s.rowsAbove||0))}var o=this.session.screenToDocumentPosition(n.row+e,n.column,a);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,a){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,a||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,a){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,a)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var a=this.getCursor();return l.fromPoints(t,a)}catch(e){return l.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var a=l.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(a.cursor=a.start),this.addRange(a,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();r.prototype.setSelectionAnchor=r.prototype.setAnchor,r.prototype.getSelectionAnchor=r.prototype.getAnchor,r.prototype.setSelectionRange=r.prototype.setRange,n.implement(r.prototype,o),t.Selection=r})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,a){"use strict";var n=e("./lib/report_error").reportError,s=2e3,o=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var a=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},l="g",r=[],i=0;i1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+s+1)})):(h=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||r.push(c)),o[s]=i,s+=h,n.push(d),c.onMatch||(c.onMatch=null)}}n.length||(o[0]=0,n.push("$")),r.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,l)}),this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",l)}}return e.prototype.$setMaxTokenCount=function(e){s=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),a=this.token.apply(this,t);if("string"==typeof a)return[{type:a,value:e}];for(var n=[],s=0,o=a.length;sd){var f=e.substring(d,v-m.length);g.type==p?g.value+=f:(g.type&&c.push(g),g={type:p,value:f})}for(var b=0;bs){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d1&&a[0]!==n&&a.unshift("#tmp",n),{tokens:c,state:a.length?a:n}},e}();o.prototype.reportError=n,t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,a){"use strict";var n,s=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var a in e){for(var n=e[a],s=0;s=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,a=e[t].start;if(void 0!==a)return a;for(a=0;t>0;)a+=e[t-=1].value.length;return a},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=s})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,a){"use strict";var n,s,o=e("../../lib/oop"),l=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},g={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return n=h[t];n=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(e,t,a,n){var s=e.end.row-e.start.row;return{text:a+t+n,selection:[0,e.start.column+1,s,e.end.column+(s?0:1)]}};(s=function(e){e=e||{},this.add("braces","insertion",(function(t,a,o,l,r){var c=o.getCursorPosition(),d=l.doc.getLine(c.row);if("{"==r){p(o);var h=o.getSelectionRange(),g=l.doc.getTextRange(h),m=l.getTokenAt(c.row,c.column);if(""!==g&&"{"!==g&&o.getWrapBehavioursEnabled())return u(h,g,"{","}");if(m&&/(?:string)\.quasi|\.xml/.test(m.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(m.type)}))||/(string)\.quasi/.test(m.type)&&"$"!==m.value[c.column-m.start-1])return;return s.recordAutoInsert(o,l,"}"),{text:"{}",selection:[1,1]}}if(s.isSaneInsertion(o,l))return/[\]\}\)]/.test(d[c.column])||o.inMultiSelectMode||e.braces?(s.recordAutoInsert(o,l,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(o,l,"{"),{text:"{",selection:[1,1]})}else if("}"==r){if(p(o),"}"==d.substring(c.column,c.column+1)&&null!==l.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&s.isAutoInsertedClosing(c,d,r))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==r||"\r\n"==r){p(o);var v="";if(s.isMaybeInsertedClosing(c,d)&&(v=i.stringRepeat("}",n.maybeInsertedBrackets),s.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var f=l.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!f)return null;var b=this.$getIndent(l.getLine(f.row))}else{if(!v)return void s.clearMaybeInsertedClosing();b=this.$getIndent(d)}var w=b+l.getTabString();return{text:"\n"+w+"\n"+b+v,selection:[1,w.length,1,w.length]}}s.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,a,s,o){var l=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==l){if(p(a),"}"==s.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,a,n,o){if("("==o){p(a);var l=a.getSelectionRange(),r=n.doc.getTextRange(l);if(""!==r&&a.getWrapBehavioursEnabled())return u(l,r,"(",")");if(s.isSaneInsertion(a,n))return s.recordAutoInsert(a,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){p(a);var i=a.getCursorPosition(),c=n.doc.getLine(i.row);if(")"==c.substring(i.column,i.column+1)&&null!==n.$findOpeningBracket(")",{column:i.column+1,row:i.row})&&s.isAutoInsertedClosing(i,c,o))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,a,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o&&(p(a),")"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s})),this.add("brackets","insertion",(function(e,t,a,n,o){if("["==o){p(a);var l=a.getSelectionRange(),r=n.doc.getTextRange(l);if(""!==r&&a.getWrapBehavioursEnabled())return u(l,r,"[","]");if(s.isSaneInsertion(a,n))return s.recordAutoInsert(a,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){p(a);var i=a.getCursorPosition(),c=n.doc.getLine(i.row);if("]"==c.substring(i.column,i.column+1)&&null!==n.$findOpeningBracket("]",{column:i.column+1,row:i.row})&&s.isAutoInsertedClosing(i,c,o))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,a,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o&&(p(a),"]"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s})),this.add("string_dquotes","insertion",(function(e,t,a,n,s){var o=n.$mode.$quotes||g;if(1==s.length&&o[s]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(s))return;p(a);var l=s,r=a.getSelectionRange(),i=n.doc.getTextRange(r);if(!(""===i||1==i.length&&o[i])&&a.getWrapBehavioursEnabled())return u(r,i,l,l);if(!i){var c=a.getCursorPosition(),d=n.doc.getLine(c.row),h=d.substring(c.column-1,c.column),m=d.substring(c.column,c.column+1),v=n.getTokenAt(c.row,c.column),f=n.getTokenAt(c.row,c.column+1);if("\\"==h&&v&&/escape/.test(v.type))return null;var b,w=v&&/string|escape/.test(v.type),y=!f||/string|escape/.test(f.type);if(m==l)(b=w!==y)&&/string\.end/.test(f.type)&&(b=!1);else{if(w&&!y)return null;if(w&&y)return null;var x=n.$mode.tokenRe;x.lastIndex=0;var k=x.test(h);x.lastIndex=0;var C=x.test(m),M=n.$mode.$pairQuotesAfter;if(!(M&&M[l]&&M[l].test(h))&&k||C)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var z=d[c.column-2];if(h==l&&(z==l||x.test(z)))return null;b=!0}return{text:b?l+l:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,a,n,s){var o=n.$mode.$quotes||g,l=n.doc.getTextRange(s);if(!s.isMultiLine()&&o.hasOwnProperty(l)&&(p(a),n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)==l))return s.end.column++,s})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,a,n,s){if("doc-start"===e&&("\n"===s||"\r\n"===s)&&a.selection.isEmpty()){var o=a.getCursorPosition();if(0===o.column)return;for(var l=n.doc.getLine(o.row),r=n.doc.getLine(o.row+1),i=n.getTokens(o.row),c=0,d=0;d=o.column){if(c===o.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var g=i[d+1];if(!g||!/\.doc/.test(g.type))return}}var p=o.column-(c-h.value.length),u=h.value.indexOf("*/"),m=h.value.indexOf("/**",u>-1?u+2:0);if(-1!==m&&p>m&&p=u&&p<=m||!/\.doc/.test(h.type))return;break}}var v=this.$getIndent(l);if(/\s*\*/.test(r))return/^\s*\*/.test(l)?{text:s+v+"* ",selection:[1,2+v.length,1,2+v.length]}:{text:s+v+" * ",selection:[1,3+v.length,1,3+v.length]};if(/\/\*\*/.test(l.substring(0,o.column)))return{text:s+v+" * "+s+" "+v+"*/",selection:[1,4+v.length,1,4+v.length]}}}))}).isSaneInsertion=function(e,t){var a=e.getCursorPosition(),n=new r(t,a.row,a.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(a.row)[a.column]))return!0;var s=new r(t,a.row,a.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",c))return!1}return n.stepForward(),n.getCurrentTokenRow()!==a.row||this.$matchTokenType(n.getCurrentToken()||"text",d)},s.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},s.recordAutoInsert=function(e,t,a){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=s.row,n.autoInsertedLineEnd=a+o.substr(s.column),n.autoInsertedBrackets++},s.recordMaybeInsert=function(e,t,a){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=s.row,n.maybeInsertedLineStart=o.substr(0,s.column)+a,n.maybeInsertedLineEnd=o.substr(s.column),n.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(e,t,a){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&a===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(s,l),t.CstyleBehaviour=s})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,a){"use strict";for(var n=[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],s=0,o=[],l=0;l2?n%i!=i-1:n%i==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,u=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),v=new RegExp("(?:"+c.escapeRegExp(u)+")\\s*$"),f=function(e,t){w(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},u),s.insertInLine({row:t,column:r},p))},b=function(e,t){var a;(a=e.match(v))&&s.removeInLine(t,e.length-a[0].length,e.length),(a=e.match(m))&&s.removeInLine(t,a[1].length,a[0].length)},w=function(e,a){if(m.test(e))return!0;for(var n=t.getTokens(a),s=0;se.length&&(x=e.length)})),r==1/0&&(r=x,o=!1,l=!1),d&&r%i!=0&&(r=Math.floor(r/i)*i),y(l?b:f)},this.toggleBlockComment=function(e,t,a,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,l,r=(m=new d(t,n.row,n.column)).getCurrentToken(),i=(t.selection,t.selection.toOrientedRange());if(r&&/comment/.test(r.type)){for(var c,g;r&&/comment/.test(r.type);){if(-1!=(v=r.value.indexOf(s.start))){var p=m.getCurrentTokenRow(),u=m.getCurrentTokenColumn()+v;c=new h(p,u,p,u+s.start.length);break}r=m.stepBackward()}var m;for(r=(m=new d(t,n.row,n.column)).getCurrentToken();r&&/comment/.test(r.type);){var v;if(-1!=(v=r.value.indexOf(s.end))){p=m.getCurrentTokenRow(),u=m.getCurrentTokenColumn()+v,g=new h(p,u,p,u+s.end.length);break}r=m.stepForward()}g&&t.remove(g),c&&(t.remove(c),o=c.start.row,l=-s.start.length)}else l=s.start.length,o=a.start.row,t.insert(a.end,s.end),t.insert(a.start,s.start);i.start.row==o&&(i.start.column+=l),i.end.row==o&&(i.end.column+=l),t.selection.fromOrientedRange(i)}},this.getNextLineIndent=function(e,t,a){return this.$getIndent(t)},this.checkOutdent=function(e,t,a){return!1},this.autoOutdent=function(e,t,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var a=e[t],n=a.prototype.$id,o=s.$modes[n];o||(s.$modes[n]=o=new a),s.$modes[t]||(s.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var l=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],r=function(e){var t,a,n;n=(t=i)[a=l[e]],t[l[e]]=function(){return this.$delegator(a,arguments,n)}},i=this;for(t=0;tt[a].column&&a++,o.unshift(a,0),t.splice.apply(t,o),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,a){if(e)for(t=!1,e.row=a;e.$oldWidget;)e.$oldWidget.row=a,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=n.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=n.createElement("div"),e.el.textContent=e.text),e.el&&(n.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&n.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var a=this.session.getFoldAt(e.row,0);if(e.$fold=a,a){var s=this.session.lineWidgets;e.row!=a.end.row||s[a.start.row]?e.hidden=!0:s[a.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,a=t&&t[e],n=[];a;)n.push(a),a=a.$oldWidget;return n},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var a=this.session._changedWidgets,n=t.layerConfig;if(a&&a.length){for(var s=1/0,o=0;o0&&!n[s];)s--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,t.$cursorLayer.config=a;for(var l=s;l<=o;l++){var r=n[l];if(r&&r.el)if(r.hidden)r.el.style.top=-100-(r.pixelHeight||0)+"px";else{r._inDocument||(r._inDocument=!0,t.container.appendChild(r.el));var i=t.$cursorLayer.getPixelPosition({row:l,column:0},!0).top;r.coverLine||(i+=a.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=i-a.offset+"px";var c=r.coverGutter?0:t.gutterWidth;r.fixedWidth||(c-=t.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=t.scrollBar.getWidth()+"px":r.el.style.right=""}}}},e}();t.LineWidgets=s})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,a){"use strict";t.applyDelta=function(e,t,a){var n=t.start.row,s=t.start.column,o=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=o.substring(0,s)+t.lines[0]+o.substring(s);else{var l=[n,1].concat(t.lines);e.splice.apply(e,l),e[n]=o.substring(0,s)+e[n],e[n+t.lines.length-1]+=o.substring(s)}break;case"remove":var r=t.end.column,i=t.end.row;n===i?e[n]=o.substring(0,s)+o.substring(r):e.splice(n,i-n+1,o.substring(0,s)+e[i].substring(r))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=function(){function e(e,t,a){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,a)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,a){var n="insert"==e.action,s=(n?1:-1)*(e.end.row-e.start.row),o=(n?1:-1)*(e.end.column-e.start.column),r=e.start,i=n?r:e.end;return l(t,r,a)?{row:t.row,column:t.column}:l(i,t,!a)?{row:t.row+s,column:t.column+(t.row==i.row?o:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,a){var n;if(n=a?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var a={};return e>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):e<0?(a.row=0,a.column=0):(a.row=e,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,t))),t<0&&(a.column=0),a},e}();function l(e,t,a){var n=a?e.column<=t.column:e.column=a&&(e=a-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var a=0;(e=Math.min(Math.max(e,0),this.getLength()))0,n=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof l||(e=l.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var a="insert"==e.action;(a?e.lines.length<=1&&!e.lines[0]:!l.comparePoints(e.start,e.end))||(a&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(s(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=t,-1==n&&(n=t),o<=n&&a.fireUpdateEvent(o,n)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var a={first:e,last:t};this._signal("update",{data:a})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,a=e.end.row-t;if(0===a)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,a+1,null),this.states.splice(t,a+1,null);else{var n=Array(a+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),a=this.states[e-1],n=this.tokenizer.getLineTokens(t,a,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();n.implement(o.prototype,s),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,a){"use strict";var n=e("./lib/lang"),s=e("./range").Range,o=function(){function e(e,t,a){void 0===a&&(a="text"),this.setRegexp(e),this.clazz=t,this.type=a,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,a,o){if(this.regExp){for(var l=o.firstRow,r=o.lastRow,i={},c=a.$editor&&a.$editor.$search,d=c&&c.$isMultilineSearch(a.$editor.getLastSearchOptions()),h=l;h<=r;h++){var g=this.cache[h];if(null==g||a.getValue().length!=this.docLen){if(d){g=[];var p=c.$multiLineForward(a,this.regExp,h,r);if(p){var u=p.endRow<=r?p.endRow-1:r;u>h&&(h=u),g.push(new s(p.startRow,p.startCol,p.endRow,p.endCol))}g.length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES))}else(g=n.getMatchOffsets(a.getLine(h),this.regExp)).length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES)),g=g.map((function(e){return new s(h,e.offset,h,e.offset+e.length)}));this.cache[h]=g.length?g:""}if(0!==g.length)for(var m=g.length;m--;){var v=g[m].toScreenRange(a),f=v.toString();i[f]||(i[f]=!0,t.drawSingleLineMarker(e,v,this.clazz,o))}}this.docLen=a.getValue().length}},e}();o.prototype.MAX_RANGES=500,t.SearchHighlight=o})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var n=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,a){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var n=this.$undoStack.length;n>this.$undoDepth-1&&this.$undoStack.splice(0,n-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var a=this.$undoStack,n=a.length;n--;){var s=a[n][0];if(s.id<=e)break;s.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?r(e):r(this.$undoStack)+"\n---\n"+r(this.$redoStack)},e}();n.prototype.hasUndo=n.prototype.canUndo,n.prototype.hasRedo=n.prototype.canRedo,n.prototype.isClean=n.prototype.isAtBookmark,n.prototype.markClean=n.prototype.bookmark;var s=e("./range").Range,o=s.comparePoints;function l(e){return{row:e.row,column:e.column}}function r(e){if(e=e||this,Array.isArray(e))return e.map(r).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(i).join("\n"):i(e.value)),e.start&&(t+=i(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function i(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var a="insert"==e.action,n="insert"==t.action;if(a&&n)if(o(t.start,e.end)>=0)g(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;g(e,t,1)}else if(a&&!n)if(o(t.start,e.end)>=0)g(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;g(e,t,-1)}else if(!a&&n)if(o(t.start,e.start)>=0)g(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;g(e,t,1)}else if(!a&&!n)if(o(t.start,e.start)>=0)g(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;g(e,t,-1)}return[t,e]}function d(e,t){for(var a=e.length;a--;)for(var n=0;n=0?g(e,t,-1):(o(e.start,t.start)<=0||g(e,s.fromPoints(t.start,e.start),-1),g(t,e,1));else if(!a&&n)o(t.start,e.end)>=0?g(t,e,-1):(o(t.start,e.start)<=0||g(t,s.fromPoints(e.start,t.start),-1),g(e,t,1));else if(!a&&!n)if(o(t.start,e.end)>=0)g(t,e,-1);else{var l,r;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(l=e,e=u(e,t.start)),o(e.end,t.end)>0&&(r=u(e,t.end)),p(t.end,e.start,e.end,-1),r&&!l&&(e.lines=r.lines,e.start=r.start,e.end=r.end,r=e),[t,l,r].filter(Boolean);g(e,t,-1)}return[t,e]}function g(e,t,a){p(e.start,t.start,t.end,a),p(e.end,t.start,t.end,a)}function p(e,t,a,n){e.row==(1==n?t:a).row&&(e.column+=n*(a.column-t.column)),e.row+=n*(a.row-t.row)}function u(e,t){var a=e.lines,n=e.end;e.end=l(t);var s=e.end.row-e.start.row,o=a.splice(s,a.length),r=s?t.column:t.column-e.start.column;return a.push(o[0].substring(0,r)),o[0]=o[0].substr(r),{start:l(t),end:n,lines:o,action:e.action}}function m(e,t){t=function(e){return{start:l(e.start),end:l(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var a=e.length;a--;){for(var n=e[a],s=0;sthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,a){var n,s,o=0,l=this.folds,r=!0;null==t&&(t=this.end.row,a=this.end.column);for(var i=0;i0)){var i=n(e,l.start);return 0===r?t&&0!==i?-o-2:o:i>0||0===i&&!t?o:-o-1}}return-o-1},e.prototype.add=function(e){var t=!e.isEmpty(),a=this.pointIndex(e.start,t);a<0&&(a=-a-1);var n=this.pointIndex(e.end,t,a);return n<0?n=-n-1:n++,this.ranges.splice(a,n-a,e)},e.prototype.addList=function(e){for(var t=[],a=e.length;a--;)t.push.apply(t,this.add(e[a]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],a=this.ranges,s=(a=a.sort((function(e,t){return n(e.start,t.start)})))[0],o=1;o=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var a=this.ranges;if(a[0].start.row>t||a[a.length-1].start.row=n);l++);if("insert"==e.action){for(var i=s-n,c=-t.column+a.column;ln);l++)if(d.start.row==n&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=i)),d.end.row==n&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&ld.start.column&&d.end.column==o[l+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=i}}else for(i=n-s,c=t.column-a.column;ls);l++)d.end.rowt.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=i):d.end.row>s&&(d.end.row+=i),d.start.rowt.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=i):d.start.row>s&&(d.start.row+=i);if(0!=i&&l=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var a=this.$foldData,n=0;for(t&&(n=a.indexOf(t)),-1==n&&(n=0);n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var a=this.$foldData,n=t-e+1,s=0;s=t){r=e?n-=t-r:n=0);break}l>=e&&(n-=r>=e?l-r:l-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var a,n=this.$foldData,l=!1;e instanceof o?a=e:(a=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(a.range);var r=a.start.row,i=a.start.column,c=a.end.row,d=a.end.column,h=this.getFoldAt(r,i,1),g=this.getFoldAt(c,d,-1);if(h&&g==h)return h.addSubFold(a);h&&!h.range.isStart(r,i)&&this.removeFold(h),g&&!g.range.isEnd(c,d)&&this.removeFold(g);var p=this.getFoldsInRange(a.range);p.length>0&&(this.removeFolds(p),a.collapseChildren||p.forEach((function(e){a.addSubFold(e)})));for(var u=0;u0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var a,s;if(null==e)a=new n(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)a=new n(e,0,e,this.getLine(e).length);else if("row"in e)a=n.fromPoints(e,e);else{if(Array.isArray(e))return s=[],e.forEach((function(e){s=s.concat(this.unfold(e))}),this),s;a=e}for(var o=s=this.getFoldsInRangeList(a);1==s.length&&n.comparePoints(s[0].start,a.start)<0&&n.comparePoints(s[0].end,a.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(a);if(0!=t?this.removeFolds(s):this.expandFolds(s),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var a=this.getFoldLine(e,t);return a?a.end.row:e},this.getRowFoldStart=function(e,t){var a=this.getFoldLine(e,t);return a?a.start.row:e},this.getFoldDisplayLine=function(e,t,a,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==a&&(a=this.getLine(t).length);var o=this.doc,l="";return e.walk((function(e,t,a,r){if(!(th)break}while(o&&i.test(o.type));o=s.stepBackward()}else o=s.getCurrentToken();if(c.end.row=s.getCurrentTokenRow(),c.end.column=s.getCurrentTokenColumn(),c.start.row==c.end.row&&c.start.column>c.end.column)return;return c}},this.foldAll=function(e,t,a,n){null==a&&(a=1e5);var s=this.foldWidgets;if(s){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=l.end.row,l.collapseChildren=a,this.addFold("...",l))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var a=e.getTokens(t),n=0;n=0;){var o=a[s];if(null==o&&(o=a[s]=this.getFoldWidget(s)),"start"==o){var l=this.getFoldWidgetRange(s);if(n||(n=l),l&&l.end.row>=e)break}s--}return{range:-1!==s&&l,firstRange:n}},this.onFoldWidgetClick=function(e,t){t instanceof r&&(t=t.domEvent);var a={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,a)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var a=this.getFoldWidget(e),n=this.getLine(e),s="end"===a?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var l=this.getFoldWidgetRange(e,!0);if(l&&!l.isMultiLine()&&(o=this.getFoldAt(l.start.row,l.start.column,1))&&l.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var r=this.getParentFoldRangeData(e);if(r.range)var i=r.range.start.row+1,c=r.range.end.row;this.foldAll(i,c,t.all?1e4:0)}else t.children?(c=l?l.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):l&&(t.all&&(l.collapseChildren=1e4),this.addFold("...",l));return l}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var a=this.$toggleFoldWidget(t,{});if(!a){var n=this.getParentFoldRangeData(t,!0);if(a=n.range||n.firstRange){t=a.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",a)}}},this.updateFoldWidgets=function(e){var t=e.start.row,a=e.end.row-t;if(0===a)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,a+1,null);else{var n=Array(a+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,a){"use strict";var n=e("../token_iterator").TokenIterator,s=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var a=t||this.getLine(e.row).charAt(e.column-1);if(""==a)return null;var n=a.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,a=this.getLine(e.row),n=!0,o=a.charAt(e.column-1),l=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(l||(o=a.charAt(e.column),e={row:e.row,column:e.column+1},l=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!l)return null;if(l[1]){if(!(r=this.$findClosingBracket(l[1],e)))return null;t=s.fromPoints(e,r),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var r;if(!(r=this.$findOpeningBracket(l[2],e)))return null;t=s.fromPoints(r,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var a=this.getLine(e.row),n=/([\(\[\{])|([\)\]\}])/,o=!t&&a.charAt(e.column-1),l=o&&o.match(n);if(l||(o=(void 0===t||t)&&a.charAt(e.column),e={row:e.row,column:e.column+1},l=o&&o.match(n)),!l)return null;var r=new s(e.row,e.column-1,e.row,e.column),i=l[1]?this.$findClosingBracket(l[1],e):this.$findOpeningBracket(l[2],e);return i?[r,new s(i.row,i.column,i.row,i.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,a){var s=this.$brackets[e],o=1,l=new n(this,t.row,t.column),r=l.getCurrentToken();if(r||(r=l.stepForward()),r){a||(a=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=t.column-l.getCurrentTokenColumn()-2,c=r.value;;){for(;i>=0;){var d=c.charAt(i);if(d==s){if(0==(o-=1))return{row:l.getCurrentTokenRow(),column:i+l.getCurrentTokenColumn()}}else d==e&&(o+=1);i-=1}do{r=l.stepBackward()}while(r&&!a.test(r.type));if(null==r)break;i=(c=r.value).length-1}return null}},this.$findClosingBracket=function(e,t,a){var s=this.$brackets[e],o=1,l=new n(this,t.row,t.column),r=l.getCurrentToken();if(r||(r=l.stepForward()),r){a||(a=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=t.column-l.getCurrentTokenColumn();;){for(var c=r.value,d=c.length;i"===t.value?n=!0:-1!==t.type.indexOf("tag-name")&&(a=!0))}while(t&&!a);return t},this.$findClosingTag=function(e,t){var a,n=t.value,o=t.value,l=0,r=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var i=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(a=t).type.indexOf("tag-close")&&!c){var d=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(d=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(o===(n=t.value))if("<"===a.value)l++;else if(""!==t.value)return;var p=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else o===n&&"/>"===t.value&&--l<0&&(p=g=h=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new s(i.end.row,i.end.column,i.end.row,i.end.column+1))}while(t&&l>=0);if(r&&d&&h&&p&&i&&g)return{openTag:new s(r.start.row,r.start.column,d.end.row,d.end.column),closeTag:new s(h.start.row,h.start.column,p.end.row,p.end.column),openTagName:i,closeTagName:g}},this.$findOpeningTag=function(e,t){var a=e.getCurrentToken(),n=t.value,o=0,l=e.getCurrentTokenRow(),r=e.getCurrentTokenColumn(),i=r+2,c=new s(l,r,l,i);e.stepForward();var d=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var h=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=a,l=e.getCurrentTokenRow(),i=(r=e.getCurrentTokenColumn())+t.value.length,a=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(n===t.value)if("<"===a.value){if(++o>0){var g=new s(l,r,l,i),p=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var u=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var m=0,v=a;v;){if(-1!==v.type.indexOf("tag-name")&&v.value===n){o--;break}if("<"===v.value)break;v=e.stepBackward(),m++}for(var f=0;fa&&(this.$docRowCache.splice(a,t),this.$screenRowCache.splice(a,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var a=0,n=e.length-1;a<=n;){var s=a+n>>1,o=e[s];if(t>o)a=s+1;else{if(!(t=t);o++);return(a=n[o])?(a.index=o,a.start=s-a.value.length,a):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterCustomWidget=function(e){this.$editor&&this.$editor.renderer.$gutterLayer.$removeCustomWidget(e)},e.prototype.addGutterCustomWidget=function(e,t){this.$editor&&this.$editor.renderer.$gutterLayer.$addCustomWidget(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(n=!!a.charAt(t-1).match(this.tokenRe)),n||(n=!!a.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else s=/^\s+$/.test(a.slice(t-1,t+1))?/\s/:this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&a.charAt(o).match(s));o++}for(var l=t;le&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),a=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],l=o?o.start.row:1/0,r=t.length,i=0;il){if((i=o.end.row+1)>=r)break;l=(o=this.$foldData[s++])?o.start.row:1/0}null==a[i]&&(a[i]=this.$getStringScreenWidth(t[i])[0]),a[i]>n&&(n=a[i])}this.screenWidth=n}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var a=e.length-1;-1!=a;a--){var n=e[a];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var a=0;ae.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),l&&o.start.row>=e.end.row&&(o.start.row+=l,o.end.row+=l)}if(o.end=this.insert(o.start,n),s.length){var r=e.start,i=o.start,c=(l=i.row-r.row,i.column-r.column);this.addFolds(s.map((function(e){return(e=e.clone()).start.row==r.row&&(e.start.column+=c),e.end.row==r.row&&(e.end.column+=c),e.start.row+=l,e.end.row+=l,e})))}return o},e.prototype.indentRows=function(e,t,a){a=a.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},a)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),a=new d(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);a.start.row=s,a.end.row=s;for(var l=0;l0){var s;if((s=this.getRowFoldEnd(t+a))>this.doc.getLength()-1)return 0;n=s-t}else e=this.$clipRowToDocument(e),n=(t=this.$clipRowToDocument(t))-e+1;var o=new d(e,0,t,Number.MAX_VALUE),l=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e})),r=0==a?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,r),l.length&&this.addFolds(l),n},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var a=this.doc.getLength();e>=a?(e=a-1,t=this.doc.getLine(a-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var a=this.$wrapLimitRange;a.max<0&&(a={min:t,max:t});var n=this.$constrainWrapLimit(e,a.min,a.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,a){return t&&(e=Math.max(t,e)),a&&(e=Math.min(a,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,a=e.action,n=e.start,s=e.end,o=n.row,l=s.row,r=l-o,i=null;if(this.$updating=!0,0!=r)if("remove"===a){this[t?"$wrapData":"$rowLengthCache"].splice(o,r);var c=this.$foldData;i=this.getFoldsInRange(e),this.removeFolds(i);var d=0;if(m=this.getFoldLine(s.row)){m.addRemoveChars(s.row,s.column,n.column-s.column),m.shiftRow(-r);var h=this.getFoldLine(o);h&&h!==m&&(h.merge(m),m=h),d=c.indexOf(m)+1}for(;d=s.row&&m.shiftRow(-r);l=o}else{var g=Array(r);g.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;if(p.splice.apply(p,g),c=this.$foldData,d=0,m=this.getFoldLine(o)){var u=m.range.compareInside(n.row,n.column);0==u?(m=m.split(n.row,n.column))&&(m.shiftRow(r),m.addRemoveChars(l,0,s.column-n.column)):-1==u&&(m.addRemoveChars(o,0,s.column-n.column),m.shiftRow(r)),d=c.indexOf(m)+1}for(;d=o&&m.shiftRow(r)}}else r=Math.abs(e.start.column-e.end.column),"remove"===a&&(i=this.getFoldsInRange(e),this.removeFolds(i),r=-r),(m=this.getFoldLine(o))&&m.addRemoveChars(o,n.column,r);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,l):this.$updateRowLengthCache(o,l),i},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var a,n,s=this.doc.getAllLines(),o=this.getTabSize(),l=this.$wrapData,r=this.$wrapLimit,i=e;for(t=Math.min(t,s.length-1);i<=t;)(n=this.getFoldLine(i,n))?(a=[],n.walk(function(e,t,n,o){var l;if(null!=e){(l=this.$getDisplayTokens(e,a.length))[0]=w;for(var r=1;rt-h;){var g=o+t-h;if(e[g-1]>=k&&e[g]>=k)d(g);else if(e[g]!=w&&e[g]!=y){for(var p=Math.max(g-(t-(t>>2)),o-1);g>p&&e[g]p&&e[g]p&&e[g]==x;)g--}else for(;g>p&&e[g]p?d(++g):(e[g=o+t]==b&&g--,d(g-h))}else{for(;g!=o-1&&e[g]!=w;g--);if(g>o){d(g);continue}for(g=o+t;g39&&o<48||o>57&&o<64?n.push(x):o>=4352&&z(o)?n.push(f,b):n.push(f)}return n},e.prototype.$getStringScreenWidth=function(e,t,a){if(0==t)return[0,0];var n,s;for(null==t&&(t=1/0),a=a||0,s=0;s=4352&&z(n)?a+=2:a+=1,!(a>t));s++);return[a,s]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),a=this.$wrapData[t.row];return a.length&&a[0]=0){r=c[d],o=this.$docRowCache[d];var g=e>c[h-1]}else g=!h;for(var p=this.getLength()-1,u=this.getNextFoldLine(o),m=u?u.start.row:1/0;r<=e&&!(r+(i=this.getRowLength(o))>e||o>=p);)r+=i,++o>m&&(o=u.end.row+1,m=(u=this.getNextFoldLine(o,u))?u.start.row:1/0),g&&(this.$docRowCache.push(o),this.$screenRowCache.push(r));if(u&&u.start.row<=o)n=this.getFoldDisplayLine(u),o=u.start.row;else{if(r+i<=e||o>p)return{row:p,column:this.getLine(p).length};n=this.getLine(o),u=null}var v=0,f=Math.floor(e-r);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(s=b[f],f>0&&b.length&&(v=b.indent,l=b[f-1]||b[b.length-1],n=n.substring(l)))}return void 0!==a&&this.$bidiHandler.isBidiRow(r+f,o,f)&&(t=this.$bidiHandler.offsetToCol(a)),l+=this.$getStringScreenWidth(n,t-v)[1],this.$useWrapMode&&l>=s&&(l=s-1),u?u.idxToPosition(l):{row:o,column:l}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var a=this.$clipPositionToDocument(e.row,e.column);else a=this.$clipPositionToDocument(e,t);e=a.row,t=a.column;var n,s=0,o=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var l,r=0,i=this.$docRowCache,c=this.$getRowCacheIndex(i,e),d=i.length;if(d&&c>=0){r=i[c],s=this.$screenRowCache[c];var h=e>i[d-1]}else h=!d;for(var g=this.getNextFoldLine(r),p=g?g.start.row:1/0;r=p){if((l=g.end.row+1)>e)break;p=(g=this.getNextFoldLine(l,g))?g.start.row:1/0}else l=r+1;s+=this.getRowLength(r),r=l,h&&(this.$docRowCache.push(r),this.$screenRowCache.push(s))}var u="";g&&r>=p?(u=this.getFoldDisplayLine(g,e,t),o=g.start.row):(u=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var v=this.$wrapData[o];if(v){for(var f=0;u.length>=v[f];)s++,f++;u=u.substring(v[f-1]||0,u.length),m=f>0?v.indent:0}}return this.lineWidgets&&this.lineWidgets[r]&&this.lineWidgets[r].rowsAbove&&(s+=this.lineWidgets[r].rowsAbove),{row:s,column:m+this.$getStringScreenWidth(u)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var a=this.$wrapData.length,n=0,s=(r=0,(t=this.$foldData[r++])?t.start.row:1/0);ns&&(n=t.end.row+1,s=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();for(var l=this.$foldData,r=0;ra);o++);return[n,o]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();v.$uid=0,v.prototype.$modes=l.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=z,n.implement(v.prototype,r);var f=1,b=2,w=3,y=4,x=9,k=10,C=11,M=12;function z(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(v.prototype),e("./edit_session/bracket_match").BracketMatch.call(v.prototype),l.defineOptions(v.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=v})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,a){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,l=function(){function e(){this.$options={}}return e.prototype.set=function(e){return s.mixin(this.$options,e),this},e.prototype.getOptions=function(){return n.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,a=this.$matchIterator(e,t);if(!a)return!1;var n=null;return a.forEach((function(e,a,s,l){return n=new o(e,a,s,l),!(a==l&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start)&&(n=null,1))})),n},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var a=t.range,s=a?e.getLines(a.start.row,a.end.row):e.doc.getAllLines(),l=[],r=t.re;if(t.$isMultiLine){var i,c=r.length,d=s.length-c;e:for(var h=r.offset||0;h<=d;h++){for(var g=0;gm||(l.push(i=new o(h,m,h+c-1,v)),c>2&&(h=h+c-2))}}else for(var f,b=0;bb&&(b=y),l.push(new o(f.startRow,f.startCol,f.endRow,f.endCol))}}else for(f=n.getMatchOffsets(s[b],r),g=0;gC&&l[g].end.row==M;)g--;for(l=l.slice(b,g+1),b=0,g=l.length;b=n){t+="$";break}var o=e.charCodeAt(a);if(36===o){t+="$$";continue}if(48===o||38===o){t+="$&";continue}if(49<=o&&o<=57){t+="$"+e[a];continue}}t+=e[a]}else{if(++a>=n){t+="\\";break}switch(e.charCodeAt(a)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var a=this.$options,n=this.$assembleRegExp(a);if(a.$isMultiLine)return t;if(n){var s=this.$isMultilineSearch(a);s&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var o=n.exec(e);if(!o||!s&&o[0].length!=e.length)return null;if(t=a.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(n,t),a.preserveCase){t=t.split("");for(var l=Math.min(e.length,e.length);l--;){var r=e[l];r&&r.toLowerCase()!=r?t[l]=t[l].toUpperCase():t[l]=t[l].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var a=e.needle;if(!e.needle)return e.re=!1;e.regExp||(a=n.escapeRegExp(a));var s=e.caseSensitive?"gm":"gmi";try{new RegExp(a,"u"),e.$supportsUnicodeFlag=!0,s+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(a=function(e,t){var a=n.supportsLookbehind();function s(e,n){return void 0===n&&(n=!0),(a&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?a&&t.$supportsUnicodeFlag?n?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(e),l=o[0],r=o[o.length-1];return s(l)+e+s(r,!1)}(a,e)),e.$isMultiLine=!t&&/[\n\r]/.test(a),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(a,s);try{var o=new RegExp(a,s)}catch(e){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){for(var a=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],s=0;sn);r++){var c=e.getLine(l++);s=null==s?c:s+"\n"+c}var d=t.exec(s);if(t.lastIndex=0,d){var h=s.slice(0,d.index).split("\n"),g=d[0].split("\n"),p=a+h.length-1,u=h[h.length-1].length;return{startRow:p,startCol:u,endRow:p+g.length-1,endCol:1==g.length?u+g[0].length:g[g.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,a,n,s){for(var o,l=i(e,n),c=e.getLine(n).length-a,d=n;d>=s;){for(var h=0;h=s;h++){var g=e.getLine(d--);o=null==o?g:g+"\n"+o}var p=r(o,t,c);if(p){var u=o.slice(0,p.index).split("\n"),m=p[0].split("\n"),v=d+u.length,f=u[u.length-1].length;return{startRow:v,startCol:f,endRow:v+m.length-1,endCol:1==m.length?f+m[0].length:m[m.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var a=this.$assembleRegExp(t);if(!a)return!1;var s=this.$isMultilineSearch(t),o=this.$multiLineForward,l=this.$multiLineBackward,r=1==t.backwards,i=0!=t.skipCurrent,c=a.unicode,d=t.range,h=t.start;h||(h=d?d[r?"end":"start"]:e.selection.getRange()),h.start&&(h=h[i!=r?"end":"start"]);var g=d?d.start.row:0,p=d?d.end.row:e.getLength()-1;if(r)var u=function(e){var a=h.row;if(!v(a,h.column,e)){for(a--;a>=g;a--)if(v(a,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(a=p,g=h.row;a>=g;a--)if(v(a,Number.MAX_VALUE,e))return}};else u=function(e){var a=h.row;if(!v(a,h.column,e)){for(a+=1;a<=p;a++)if(v(a,0,e))return;if(0!=t.wrap)for(a=g,p=h.row;a<=p;a++)if(v(a,0,e))return}};if(t.$isMultiLine)var m=a.length,v=function(t,n,s){var o=r?t-m+1:t;if(!(o<0||o+m>e.getLength())){var l=e.getLine(o),i=l.search(a[0]);if(!(!r&&in))return!!s(o,i,o+m-1,d)||void 0}}};else v=r?function(t,o,r){if(s){var i=l(e,a,o,t,g);if(!i)return!1;if(r(i.startRow,i.startCol,i.endRow,i.endCol))return!0}else{var d,h=e.getLine(t),p=[],u=0;for(a.lastIndex=0;d=a.exec(h);){var m=d[0].length;if(u=d.index,!m){if(u>=h.length)break;a.lastIndex=u+=n.skipEmptyMatch(h,u,c)}if(d.index+m>o)break;p.push(d.index,m)}for(var v=p.length-1;v>=0;v-=2){var f=p[v-1];if(r(t,f,t,f+(m=p[v])))return!0}}}:function(t,l,r){if(a.lastIndex=l,s){var i=o(e,a,t,p);if(i){var d=i.endRow<=p?i.endRow-1:p;d>t&&(t=d)}if(!i)return!1;if(r(i.startRow,i.startCol,i.endRow,i.endCol))return!0}else for(var h,g,u=e.getLine(t);g=a.exec(u);){var m=g[0].length;if(r(t,h=g.index,t,h+m))return!0;if(!m&&(a.lastIndex=h+=n.skipEmptyMatch(u,h,c),h>=u.length))return!1}};return{forEach:u}},e}();function r(e,t,a){for(var n=null,s=0;s<=e.length;){t.lastIndex=s;var o=t.exec(e);if(!o)break;var l=o.index+o[0].length;if(l>e.length-a)break;(!n||l>n.index+n[0].length)&&(n=o),s=o.index+1}return n}function i(e,t){var a={row:t,column:0},n=e.doc.positionToIndex(a)+5e3;return e.doc.indexToPosition(n).row+1}t.Search=l})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("../lib/keys"),l=e("../lib/useragent"),r=o.KEY_MODS,i=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,a){this.platform=t||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=a},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var a=e&&("string"==typeof e?e:e.name);e=this.commands[a],t||delete this.commands[a];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var l=o.indexOf(e);-1!=l&&(o.splice(l,1),1==o.length&&(n[s]=o[0]))}}},e.prototype.bindKey=function(e,t,a){if("object"==typeof e&&e&&(null==a&&(a=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach((function(e){var t=this.parseKeys(e),a=r[t.hashId]+t.key;n+=(n?" ":"")+a,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var o=this.parseKeys(e),l=r[o.hashId]+o.key;this._addCommandToBinding(n+l,t,a)}),this)},e.prototype._addCommandToBinding=function(e,t,a){var n,s=this.commandKeyBinding;if(t)if(!s[e]||this.$singleCommand)s[e]=t;else{Array.isArray(s[e])?-1!=(n=s[e].indexOf(t))&&s[e].splice(n,1):s[e]=[s[e]],"number"!=typeof a&&(a=c(t));var o=s[e];for(n=0;na);n++);o.splice(n,0,t)}else delete s[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var a=e[t];if(a){if("string"==typeof a)return this.bindKey(a,t);"function"==typeof a&&(a={exec:a}),"object"==typeof a&&(a.name||(a.name=t),this.addCommand(a))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),a=t.pop(),n=o[a];if(o.FUNCTION_KEYS[n])a=o.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:a,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:a.toUpperCase(),hashId:-1}}for(var s=0,l=t.length;l--;){var r=o.KEY_MODS[t[l]];if(null==r)return"undefined"!=typeof console&&console.error("invalid modifier "+t[l]+" in "+e),!1;s|=r}return{key:a,hashId:s}},e.prototype.findKeyCommand=function(e,t){var a=r[e]+t;return this.commandKeyBinding[a]},e.prototype.handleKeyboard=function(e,t,a,n){if(!(n<0)){var s=r[t]+a,o=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=a.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-s.length-1)),{command:o}):(e.$keyChain=e.$keyChain||s,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var d=function(e){function t(t,a){var n=e.call(this,t,a)||this;return n.$singleCommand=!0,n}return s(t,e),t}(i);d.call=function(e,t,a){i.prototype.$init.call(e,t,a,!0)},i.call=function(e,t,a){i.prototype.$init.call(e,t,a,!1)},t.HashHandler=d,t.MultiHashHandler=i})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("../lib/oop"),l=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,i=function(e){function t(t,a){var n=e.call(this,a,t)||this;return n.byName=n.commands,n.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)})),n}return s(t,e),t.prototype.exec=function(e,t,a){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,a))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var s={editor:t,command:e,args:a};return this.canExecute(e,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.returnValue):(this._signal("commandUnavailable",s),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(l);o.implement(i.prototype,r),t.CommandManager=i})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,a){"use strict";var n=e("../lib/lang"),s=e("../config"),o=e("../range").Range;function l(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(e){s.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(e){for(var t=e.selection.isBackwards(),a=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),s=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),l=e.session.doc.getLine(a.row).length,r=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,i=e.session.doc.getLine(a.row),c=a.row+1;c<=s.row+1;c++){var d=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),i+=d}s.row+10?(e.selection.moveCursorTo(a.row,a.column),e.selection.selectTo(a.row,a.column+r)):(l=e.session.doc.getLine(a.row).length>l?l+1:l,e.selection.moveCursorTo(a.row,l))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(e){var t=e.session.doc.getLength()-1,a=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var l=0;l0||e+t=0&&this.$isCustomWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isCustomWidgetVisible(e+t))return e+t;if(e-t>=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusCustomWidget=function(e){if(null!=e){var t=this.$getCustomWidget(e);t&&(t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus())}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurCustomWidget=function(e){var t=this.$getCustomWidget(e);t&&(t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur())},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e)||this.$isCustomWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.$blurCustomWidget(this.activeRowIndex),this.activeRowIndex=e,void(this.$isFoldWidgetVisible(e)?this.$focusFoldWidget(this.activeRowIndex):this.$focusCustomWidget(this.activeRowIndex))},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/oop"),o=e("./lib/dom"),l=e("./lib/lang"),r=e("./lib/useragent"),i=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,g=e("./edit_session").EditSession,p=e("./search").Search,u=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,f=e("./commands/default_commands").commands,b=e("./config"),w=e("./token_iterator").TokenIterator,y=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,k=e("./clipboard"),C=e("./lib/keys"),M=e("./lib/event"),z=e("./tooltip").HoverTooltip,E=function(){function e(t,a,n){this.id="editor"+ ++e.$uid,this.session,this.$toDestroy=[];var s=t.getContainerElement();this.container=s,this.renderer=t,this.commands=new v(r.isMac?"mac":"win",f),"object"==typeof document&&(this.textInput=new i(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new h(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(a||n&&n.session||new g("")),b.resetOptions(this),n&&this.setOptions(n),b._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,a=t&&t.scrollIntoView;if(a){switch(a){case"center-animate":a="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),s=this.renderer.layerConfig;(n.start.row>=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==a&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,a=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==a.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==a.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var a=this;b.loadModule(["keybinding",e],(function(n){a.$keybindingId==e&&a.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var a=this.session.getSelection();a.off("changeCursor",this.$onCursorChange),a.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e,t){this.renderer.setStyle(e,t)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var a=e.getCursorPosition(),n=e.getKeyboardHandler(),s=n&&n.$getDirectionForHighlight&&n.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(a,s);if(!o){var l=new w(t,a.row,a.column).getCurrentToken();if(l&&/\b(?:tag-open|tag-name)/.test(l.type)){var r=t.getMatchingTags(a);r&&(o=[r.openTagName.isEmpty()?r.openTag:r.openTagName,r.closeTagName.isEmpty()?r.closeTag:r.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var i="ace_bracket";Array.isArray(o)?1==o.length&&(i="ace_error_bracket"):o=[o],2==o.length&&(0==u.comparePoints(o[0].end,o[1].start)?o=[u.fromPoints(o[0].start,o[1].end)]:0==u.comparePoints(o[0].start,o[1].end)&&(o=[u.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,i,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,a=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,a,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var a=new u(e.row,e.column,e.row,1/0);a.id=t.addMarker(a,"ace_active-line","screenLine"),t.$highlightLineMarker=a}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var a=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(a,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var a=t.start.column,n=t.end.column,s=e.getLine(t.start.row),o=s.substring(a,n);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var l=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),r=s.substring(a-1,n+1);if(l.test(r))return l}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),a=!1;if(!e&&this.$copyWithEmptySelection){a=!0;for(var n=this.selection.getAllRanges(),s=0;sr.search(/\S|$/)){var i=r.substr(s.column).search(/\S|$/);a.doc.removeInLine(s.row,s.column,s.column+i)}}this.clearSelection();var c=s.column,d=a.getState(s.row),h=(r=a.getLine(s.row),n.checkOutdent(d,r,e));if(a.insert(s,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new u(s.row,c+o.selection[0],s.row,c+o.selection[1])):this.selection.setSelectionRange(new u(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(a.getDocument().isNewLine(e)){var g=n.getNextLineIndent(d,r.slice(0,s.column),a.getTabString());a.insert({row:s.row+1,column:0},g)}h&&n.autoOutdent(d,a,s.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),a=this.selection.isEmpty()?[new u(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),n="",s="",o="",l=e.getTabString(),r=0;r0&&(n=e.getState(d-1),s=e.getLine(d-1),o=t.getNextLineIndent(n,s,l));var h=e.getLine(d),g=t.$getIndent(h);if(o!==g){if(g.length>0){var p=new u(d,0,d,g.length);e.remove(p)}o.length>0&&e.insert({row:d,column:0},o)}t.autoOutdent(n,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var a=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(a):a(),this.endOperation()},e.prototype.applyComposition=function(e,t){var a;(t.extendLeft||t.extendRight)&&((a=this.selection.getRange()).start.column-=t.extendLeft,a.end.column+=t.extendRight,a.start.column<0&&(a.start.row--,a.start.column+=this.session.getLine(a.start.row).length+1),this.selection.setRange(a),e||a.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((a=this.selection.getRange()).start.column-=t.restoreStart,a.end.column-=t.restoreEnd,this.selection.setRange(a))},e.prototype.onCommandKey=function(e,t,a){return this.keyBinding.onCommandKey(e,t,a)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var a=this.session,n=a.getState(t.start.row),s=a.getMode().transformAction(n,"deletion",this,a,t);if(0===t.end.column){var o=a.getTextRange(t);if("\n"==o[o.length-1]){var l=a.getLine(t.end.row);/^\s+$/.test(l)&&(t.end.column=l.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var a,n,s=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var s=new u(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);s.start.row=n,s.end.row=n,s.end.column=o.length,t.replace(s,a[n-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),a=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,a,e)},e.prototype.getNumberAt=function(e,t){var a=/[\-]?[0-9]+(?:\.[0-9]+)?/g;a.lastIndex=0;for(var n=this.session.getLine(e);a.lastIndex=t)return{value:s[0],start:s.index,end:s.index+s[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,a=this.selection.getCursor().column,n=new u(t,a-1,t,a),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,a);if(o){var l=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,r=o.start+o.value.length-l,i=parseFloat(o.value);i*=Math.pow(10,r),l!==o.end&&a=r&&o<=i&&(a=t,c.selection.clearSelection(),c.moveCursorTo(e,r+n),c.selection.selectTo(e,i+n)),r=i}));for(var d,h=this.$toggleWordPairs,g=0;g=i&&l<=c&&g.match(/((?:https?|ftp):\/\/[\S]+)/)){r=g.replace(/[\s:.,'";}\]]+$/,"");break}i=c}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}return r},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,a=e.getRange(),n=e.isBackwards();if(a.isEmpty()){var s=a.start.row;t.duplicateLines(s,s)}else{var o=n?a.start:a.end,l=t.insert(o,t.getTextRange(a));a.start=o,a.end=l,e.setSelectionRange(a,n)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,a){return this.session.moveText(e,t,a)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var a,n,s=this.selection;if(!s.inMultiSelectMode||this.inVirtualSelectionMode){var o=s.toOrientedRange();a=this.$getSelectedRows(o),n=this.session.$moveLines(a.first,a.last,t?0:e),t&&-1==e&&(n=0),o.moveBy(n,0),s.fromOrientedRange(o)}else{var l=s.rangeList.ranges;s.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var r=0,i=0,c=l.length,d=0;dp+1)break;p=u.last}for(d--,r=this.session.$moveLines(g,p,t?0:e),t&&-1==e&&(h=d+1);h<=d;)l[h].moveBy(r,0),h++;t||(r=0),i+=r}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var a=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(s,0)})):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection());var o=a.scrollTop;a.scrollBy(0,s*n.lineHeight),null!=t&&a.scrollCursorIntoView(null,.5),a.animateScrolling(o)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,a,n){this.renderer.scrollToLine(e,t,a,n)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var a=this.getCursorPosition(),n=new w(this.session,a.row,a.column),s=n.getCurrentToken(),o=0;s&&-1!==s.type.indexOf("tag-name")&&(s=n.stepBackward());var l=s||n.stepForward();if(l){var r,i,c=!1,d={},h=a.column-l.start,g={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(l.value.match(/[{}()\[\]]/g)){for(;h1?d[l.value]++:"=0;--o)this.$tryReplace(a[o],e)&&n++;return this.selection.setSelectionRange(s),n},e.prototype.$tryReplace=function(e,t){var a=this.session.getTextRange(e);return null!==(t=this.$search.replace(a,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,a){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&s.mixin(t,e);var n=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(n)||this.$search.$options.needle)||(n=this.session.getWordRange(n.start.row,n.start.column),e=this.session.getTextRange(n)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:n});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,a),o):(t.backwards?n.start=n.end:n.end=n.start,void this.selection.setRange(n))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var a=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(a)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.destroyed=!0,this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=[]),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,a=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",(function(){n=!0})),l=this.renderer.on("beforeRender",(function(){n&&(t=a.renderer.container.getBoundingClientRect())})),r=this.renderer.on("afterRender",(function(){if(n&&t&&(a.isFocused()||a.searchBox&&a.searchBox.isFocused())){var e=a.renderer,o=e.$cursorLayer.$pixelPos,l=e.layerConfig,r=o.top-l.offset;null!=(n=o.top>=0&&r+t.top<0||!(o.topwindow.innerHeight)&&null)&&(s.style.top=r+"px",s.style.left=o.left+"px",s.style.height=l.lineHeight+"px",s.scrollIntoView(n)),n=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",r),this.renderer.off("beforeRender",l))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,a){var n=this;b.loadModule("ace/ext/prompt",(function(s){s.prompt(n,e,t,a)}))},Object.defineProperty(e.prototype,"hoverTooltip",{get:function(){return this.$hoverTooltip||(this.$hoverTooltip=new z(this.container))},set:function(e){this.$hoverTooltip&&this.$hoverTooltip.destroy(),this.$hoverTooltip=e},enumerable:!1,configurable:!0}),e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(E.prototype,m),b.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;if(this.textInput.setReadOnly(e),!this.destroyed){this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var a=!1;if(e&&"keydown"==e.type){if(e&&e.key&&!e.ctrlKey&&!e.metaKey&&(" "==e.key&&e.preventDefault(),a=1==e.key.length),!a)return}else e&&"exec"!==e.type&&(a=!0);if(a){var n=o.createElement("div");n.textContent=x("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),n)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var a=this.textInput.getElement();e?(M.addListener(a,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(a,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback))}},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?_.attach(this):_.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?_.attach(this):_.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,a={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(r.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",n.bind(this)),this.commands.addCommand(a),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new y(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",n.bind(this)),this.commands.removeCommand(a),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var _={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,a){return Math.max(t.toString().length,(a.lastRow+1).toString().length,2)*a.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=E})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){n.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,a){var n=t.firstRowScreen*t.lineHeight,s=Math.floor(n/this.canvasHeight);return a.documentToScreenRow(e,0)*t.lineHeight-s*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,a){return t.lineHeight*a.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=n.createFragment(this.element),a=0;ao&&(i=s.end.row+1,o=(s=t.getNextFoldLine(i,s))?s.start.row:1/0),i>n){for(;this.$lines.getLength()>r+1;)this.$lines.pop();break}(l=this.$lines.get(++r))?l.row=i:(l=this.$lines.createCell(i,e,this.session,d),this.$lines.push(l)),this.$renderCell(l,e,s,i),i++}this._signal("afterRender"),this.$updateGutterWidth(e),this.$showCursorMarker&&this.$highlightGutterLine&&this.$updateCursorMarker()},e.prototype.$updateGutterWidth=function(e){var t=this.session,a=t.gutterRenderer||this.$renderer,n=t.$firstLineNumber,s=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(s=t.getLength()+n-1);var o=a?a.getWidth(t,s,e):s.toString().length*e.characterWidth,l=this.$padding||this.$computePadding();(o+=l.left+l.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$showCursorMarker&&this.$updateCursorMarker(),this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var a=0;a=this.$cursorRow){if(n.row>this.$cursorRow){var s=this.session.getFoldLine(this.$cursorRow);if(!(a>0&&s&&s.start.row==t[a-1].row))break;n=t[a-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;break}}}}},e.prototype.$updateCursorMarker=function(){if(this.session){var e=this.session;this.$highlightElement||(this.$highlightElement=n.createElement("div"),this.$highlightElement.className="ace_gutter-cursor",this.$highlightElement.style.pointerEvents="none",this.element.appendChild(this.$highlightElement));var t=e.selection.cursor,a=this.config,s=this.$lines,o=a.firstRowScreen*a.lineHeight,l=Math.floor(o/s.canvasHeight),r=e.documentToScreenRow(t)*a.lineHeight-l*s.canvasHeight;n.setStyle(this.$highlightElement.style,"height",a.lineHeight+"px"),n.setStyle(this.$highlightElement.style,"top",r+"px")}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=a,!t||n0;s--)this.$lines.shift();if(n>a)for(s=this.session.getFoldedRowCount(a+1,n);s>0;s--)this.$lines.pop();e.firstRown&&this.$lines.push(this.$renderLines(e,n+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,a){for(var n=[],s=t,o=this.session.getNextFoldLine(s),l=o?o.start.row:1/0;s>l&&(s=o.end.row+1,l=(o=this.session.getNextFoldLine(s,o))?o.start.row:1/0),!(s>a);){var r=this.$lines.createCell(s,e,this.session,d);this.$renderCell(r,e,o,s),n.push(r),s++}return n},e.prototype.$renderCell=function(e,t,a,s){var o=e.element,l=this.session,r=o.childNodes[0],c=o.childNodes[1],d=o.childNodes[2],h=o.childNodes[3],g=d.firstChild,p=l.$firstLineNumber,u=l.$breakpoints,m=l.$decorations,v=l.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&l.foldWidgets,b=a?a.start.row:Number.MAX_VALUE,w=t.lineHeight+"px",y=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",x=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",k=(v?v.getText(l,s):s+p).toString();if(this.$highlightGutterLine&&(s==this.$cursorRow||a&&s=b&&this.$cursorRow<=a.end.row)&&(y+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),u[s]&&(y+=u[s]),m[s]&&(y+=m[s]),this.$annotations[s]&&s!==b&&(y+=this.$annotations[s].className),f){var C=f[s];null==C&&(C=f[s]=l.getFoldWidget(s))}if(C){var M="ace_fold-widget ace_"+C,z="start"==C&&s==b&&st[n].row)){for(;a<=n;){var s=Math.floor((a+n)/2),o=t[s];if(o.row>e)n=s-1;else{if(!(o.rowa.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var a=n.createElement("span");e.appendChild(a);var s=n.createElement("span");e.appendChild(s);var o=n.createElement("span");return s.appendChild(o),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer=void 0,c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,s.implement(c.prototype,l),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(){function e(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var a=-1!=this.i&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=t,a.className=e},e.prototype.update=function(e){if(e){var t;for(var a in this.config=e,this.i=0,this.markers){var n=this.markers[a];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),l=this.$padding+s.start.column*e.characterWidth;n.renderer(t,s,l,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ig?4:0)|(c==i?8:0)),s,c==i?0:1,o)},e.prototype.drawMultiLineMarker=function(e,t,a,n,s){var o=this.$padding,l=n.lineHeight,r=this.$getTop(t.start.row,n),i=o+t.start.column*n.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,a+" ace_br1 ace_start",n,null,s)):this.elt(a+" ace_br1 ace_start","height:"+l+"px;right:"+o+"px;top:"+r+"px;left:"+i+"px;"+(s||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,a+" ace_br12",n,null,s)}else{r=this.$getTop(t.end.row,n);var d=t.end.column*n.characterWidth;this.elt(a+" ace_br12","height:"+l+"px;width:"+d+"px;top:"+r+"px;left:"+o+"px;"+(s||""))}if(!((l=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){r=this.$getTop(t.start.row+1,n);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(a+(h?" ace_br"+h:""),"height:"+l+"px;right:"+o+"px;top:"+r+"px;left:"+o+"px;"+(s||""))}},e.prototype.drawSingleLineMarker=function(e,t,a,n,s,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,a,n,s,o);var l=n.lineHeight,r=(t.end.column+(s||0)-t.start.column)*n.characterWidth,i=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;this.elt(a,"height:"+l+"px;width:"+r+"px;top:"+i+"px;left:"+c+"px;"+(o||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,a,n,s,o){var l=n.lineHeight,r=this.$getTop(t.start.row,n),i=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(a,"height:"+l+"px;width:"+(e.width+(s||0))+"px;top:"+r+"px;left:"+(i+e.left)+"px;"+(o||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,a,n,s){var o=this.$getTop(t.start.row,n),l=n.lineHeight;t.start.row!=t.end.row&&(l+=this.$getTop(t.end.row,n)-o),this.elt(a,"height:"+l+"px;top:"+o+"px;left:0;right:0;"+(s||""))},e.prototype.drawScreenLineMarker=function(e,t,a,n,s){var o=this.$getTop(t.start.row,n),l=n.lineHeight;this.elt(a,"height:"+l+"px;top:"+o+"px;left:0;right:0;"+(s||""))},e}();o.prototype.$padding=0,t.Marker=o})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,a){var n=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return n.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,a){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),l=e("./lines").Lines,r=e("../lib/event_emitter").EventEmitter,i=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=s,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 l(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],a=1;ad&&(r=i.end.row+1,d=(i=this.session.getNextFoldLine(r,i))?i.start.row:1/0),!(r>s);){var h=o[l++];if(h){this.dom.removeChildren(h),this.$renderLine(h,r,r==d&&i),c&&(h.style.top=this.$lines.computeLineTop(r,e,this.session)+"px");var g=e.lineHeight*this.session.getRowLength(r)+"px";h.style.height!=g&&(c=!0,h.style.height=g)}r++}if(c)for(;l0;s--)this.$lines.shift();if(t.lastRow>e.lastRow)for(s=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);s>0;s--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,a){for(var n=[],o=t,l=this.session.getNextFoldLine(o),r=l?l.start.row:1/0;o>r&&(o=l.end.row+1,r=(l=this.session.getNextFoldLine(o,l))?l.start.row:1/0),!(o>a);){var i=this.$lines.createCell(o,e,this.session),c=i.element;this.dom.removeChildren(c),s.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),s.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==r&&l),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",n.push(i),o++}return n},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,a=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,t,a))},e.prototype.$renderToken=function(e,t,a,n){for(var s,l=this,r=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),h=0;s=r.exec(n);){var g=s[1],p=s[2],u=s[3],m=s[4],v=s[5];if(l.showSpaces||!p){var f=h!=s.index?n.slice(h,s.index):"";if(h=s.index+s[0].length,f&&d.appendChild(this.dom.createTextNode(f,this.element)),g){var b=l.session.getScreenTabSize(t+s.index),w=l.$tabStrings[b].cloneNode(!0);w.charCount=1,d.appendChild(w),t+=b-1}else p?l.showSpaces?((x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",x.textContent=o.stringRepeat(l.SPACE_CHAR,p.length),d.appendChild(x)):d.appendChild(this.dom.createTextNode(p,this.element)):u?((x=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",x.textContent=o.stringRepeat(l.SPACE_CHAR,u.length),d.appendChild(x)):m?(t+=1,(x=this.dom.createElement("span")).style.width=2*l.config.characterWidth+"px",x.className=l.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",x.textContent=l.showSpaces?l.SPACE_CHAR:m,d.appendChild(x)):v&&(t+=1,(x=this.dom.createElement("span")).style.width=2*l.config.characterWidth+"px",x.className="ace_cjk",x.textContent=v,d.appendChild(x))}}if(d.appendChild(this.dom.createTextNode(h?n.slice(h):n,this.element)),c(a.type))e.appendChild(d);else{var y="ace_"+a.type.replace(/\./g," ace_"),x=this.dom.createElement("span");"fold"==a.type&&(x.style.width=a.value.length*this.config.characterWidth+"px",x.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),x.className=y,x.appendChild(d),e.appendChild(x)}return t+n.length},e.prototype.renderIndentGuide=function(e,t,a){var n=t.search(this.$indentGuideRe);if(n<=0||n>=a)return t;if(" "==t[0]){for(var s=(n-=n%this.tabSize)/this.tabSize,o=0;os[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,o=t.row+1;o0))return;a=e.element.childNodes[0]}var n=a.childNodes;if(n){var s=n[t-1];s&&s.classList&&s.classList.contains("ace_indent-guide")&&s.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var a=0;a=this.$highlightIndentGuideMarker.start+1){if(n.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(n,t)}}else for(a=e.length-1;a>=0;a--)if(n=e[a],this.$highlightIndentGuideMarker.end&&n.row=l;){r=this.$renderToken(i,r,d,h.substring(0,l-n)),h=h.substring(l-n),n=l,i=this.$createLineElement(),e.appendChild(i);var g=this.dom.createTextNode(o.stringRepeat(" ",a.indent),this.element);g.charCount=0,i.appendChild(g),r=0,l=a[++s]||Number.MAX_VALUE}0!=h.length&&(n+=h.length,r=this.$renderToken(i,r,d,h))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(i,r,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var a=0,n=0;nthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,s,o);a=this.$renderToken(e,a,s,o)}}},e.prototype.$renderOverflowMessage=function(e,t,a,n,s){a&&this.$renderToken(e,t,a,n.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=s?"":"",e.appendChild(o)},e.prototype.$renderLine=function(e,t,a){if(a||0==a||(a=this.session.getFoldLine(t)),a)var n=this.$getFoldLineTokens(t,a);else n=this.session.getTokens(t);var s=e;if(n.length){var o=this.session.getRowSplitData(t);o&&o.length?(this.$renderWrappedLine(e,n,o),s=e.lastChild):(s=e,this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,n))}else this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s));if(this.showEOL&&s){a&&(t=a.end.row);var l=this.dom.createElement("span");l.className="ace_invisible ace_invisible_eol",l.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(l)}},e.prototype.$getFoldLineTokens=function(e,t){var a=this.session,n=[],s=a.getTokens(e);return t.walk((function(e,t,o,l,r){null!=e?n.push({type:"fold",value:e}):(r&&(s=a.getTokens(t)),s.length&&function(e,t,a){for(var s=0,o=0;o+e[s].value.lengtha-t&&(l=l.substring(0,a-t)),n.push({type:e[s].type,value:l}),o=t+l.length,s+=1);oa?n.push({type:e[s].type,value:l.substring(0,a-o)}):n.push(e[s]),o+=l.length,s+=1}}(s,l,o))}),t.end.row,this.session.getLine(t.end.row).length),n},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,n.implement(d.prototype,r),t.Text=d})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=function(){function e(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,a=t.length;a--;)n.setStyle(t[a].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&n.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,n.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,n.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=n.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,n.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),n.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,e.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),top:(a.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||l.top<0)&&a>1)){var r=this.cursors[s++]||this.addCursor(),i=r.style;this.drawCursor?this.drawCursor(r,l,e,t[a],this.session):this.isCursorInView(l,e)?(n.setStyle(i,"display","block"),n.translate(r,l.left,l.top),n.setStyle(i,"width",Math.round(e.characterWidth)+"px"),n.setStyle(i,"height",e.lineHeight+"px")):n.setStyle(i,"display","none")}}for(;this.cursors.length>s;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=l,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();s.prototype.$padding=0,s.prototype.drawCursor=null,t.Cursor=s})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("./lib/oop"),l=e("./lib/dom"),r=e("./lib/event"),i=e("./lib/event_emitter").EventEmitter,c=32768,d=function(){function e(e,t){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.element.tabIndex=-1,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(d.prototype,i);var h=function(e){function t(t,a){var n=e.call(this,t,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,a.$scrollbarWidth=n.width=l.scrollbarWidth(t.ownerDocument),n.inner.style.width=n.element.style.width=(n.width||15)+5+"px",n.$minWidth=0,n}return s(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var g=function(e){function t(t,a){var n=e.call(this,t,"-h")||this;return n.scrollLeft=0,n.height=a.$scrollbarWidth,n.inner.style.height=n.element.style.height=(n.height||15)+5+"px",n}return s(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(d);t.ScrollBar=h,t.ScrollBarV=h,t.ScrollBarH=g,t.VScrollBar=h,t.HScrollBar=g})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("./lib/oop"),l=e("./lib/dom"),r=e("./lib/event"),i=e("./lib/event_emitter").EventEmitter;l.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=l.createElement("div"),this.element.className="ace_sb"+t,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(c.prototype,i);var d=function(e){function t(t,a){var n=e.call(this,t,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,n.parent=t,n.width=n.VScrollWidth,n.renderer=a,n.inner.style.width=n.element.style.width=(n.width||15)+"px",n.$minWidth=0,n}return s(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var a=this,n=t.clientY,s=t.clientY,o=this.thumbTop;r.capture(this.inner,(function(e){n=e.clientY}),(function(){clearInterval(l)}));var l=setInterval((function(){if(void 0!==n){var e=a.scrollTopFromThumbTop(o+n-s);e!==a.scrollTop&&a._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var i=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(i)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(e){function t(t,a){var n=e.call(this,t,"-h")||this;return n.scrollLeft=0,n.scrollWidth=0,n.height=n.HScrollHeight,n.inner.style.height=n.element.style.height=(n.height||12)+"px",n.renderer=a,n}return s(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var a=this,n=t.clientX,s=t.clientX,o=this.thumbLeft;r.capture(this.inner,(function(e){n=e.clientX}),(function(){clearInterval(l)}));var l=setInterval((function(){if(void 0!==n){var e=a.scrollLeftFromThumbLeft(o+n-s);e!==a.scrollLeft&&a._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var i=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(i)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=h,t.VScrollBar=d,t.HScrollBar=h})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,a){"use strict";var n=e("./lib/event"),s=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var a=this;this._flush=function(e){a.pending=!1;var t=a.changes;if(t&&(n.blockIdle(100),a.changes=0,a.onRender(t)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(n.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=s})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,a){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),l=e("../lib/event"),r=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,h=200,g=function(){function e(e){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=l.onIdle((function t(){e.checkForSizeChanges(),l.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=s.buildDom([e(0,0),e(h,0),e(0,h),e(h,h)],this.el)},e.prototype.transformCoordinates=function(e,t){function a(e,t,a){var n=e[1]*t[0]-e[0]*t[1];return[(-t[1]*a[0]+t[0]*a[1])/n,(+e[1]*a[0]-e[0]*a[1])/n]}function n(e,t){return[e[0]-t[0],e[1]-t[1]]}function s(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function l(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=o(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var r=l(this.els[0]),i=l(this.els[1]),c=l(this.els[2]),d=l(this.els[3]),g=a(n(d,i),n(d,c),n(s(i,c),s(d,r))),p=o(1+g[0],n(i,r)),u=o(1+g[1],n(c,r));if(t){var m=t,v=g[0]*m[0]/h+g[1]*m[1]/h+1,f=s(o(m[0],p),o(m[1],u));return s(o(1/v/h,f),r)}var b=n(e,r),w=a(n(p,o(g[0],b)),n(u,o(g[1],b)),b);return o(h,w)},e}();g.prototype.$characterSize={width:0,height:0},n.implement(g.prototype,i),t.FontMetrics=g})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,a){a.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget, .ace_custom-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_custom-widget {\n background: none;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,l=function(){function e(e,t){this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},this.setScrollBarV(e)}return e.prototype.$createCanvas=function(){this.canvas=n.createElement("canvas"),this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7",this.canvas.style.position="absolute"},e.prototype.setScrollBarV=function(e){this.$createCanvas(),this.scrollbarV=e,e.element.appendChild(this.canvas),this.setDimensions()},e.prototype.$updateDecorators=function(e){if("function"==typeof this.canvas.getContext){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;this.setDimensions(e);var a=this.canvas.getContext("2d"),n=this.renderer.session.$annotations;if(a.clearRect(0,0,this.canvas.width,this.canvas.height),n){var s={info:1,warning:2,error:3};n.forEach((function(e){e.priority=s[e.type]||null})),n=n.sort((function(e,t){return e.priorityt.priority?1:0}));for(var o=0;othis.canvasHeight&&(h=this.canvasHeight-g);var p=h-g,u=h+g-p;a.fillStyle=t[n[o].type]||null,a.fillRect(0,p,Math.round(this.oneZoneWidth-1),u)}}var m=this.renderer.session.selection.getCursor();if(m){var v=Math.round(this.getVerticalOffsetForRow(m.row)*this.heightRatio);a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect(0,v,this.canvasWidth,2)}}},e.prototype.getVerticalOffsetForRow=function(e){return e|=0,this.renderer.session.documentToScreenRow(e,0)*this.lineHeight},e.prototype.setDimensions=function(e){e=e||this.renderer.layerConfig,this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,this.canvasWidth=this.scrollbarV.width||this.canvasWidth,this.setZoneWidth(),this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.maxHeighte&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,a,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),!n&&this.$maxLines&&this.lineHeight>1&&(s.style.height&&"0px"!=s.style.height||(s.style.height="1px",n=s.clientHeight||s.scrollHeight)),a||(a=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,a,n);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!a&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,a,n){n-=this.$extraHeight||0;var o=0,l=this.$size,r={width:l.width,height:l.height,scrollerHeight:l.scrollerHeight,scrollerWidth:l.scrollerWidth};if(n&&(e||l.height!=n)&&(l.height=n,o|=this.CHANGE_SIZE,l.scrollerHeight=l.height,this.$horizScroll&&(l.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(l.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),a&&(e||l.width!=a)){o|=this.CHANGE_SIZE,l.width=a,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,s.setStyle(this.scrollBarH.element.style,"left",t+"px"),s.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),l.scrollerWidth=Math.max(0,a-t-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var i=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",i),s.setStyle(this.scroller.style,"right",i),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(l.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return l.$dirty=!a||!n,o&&this._signal("resize",r),o},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var a=this.$cursorLayer.$pixelPos;if(a){t&&t.markerRange&&(a=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var n=this.layerConfig,o=a.top,l=a.left;o-=n.offset;var r=t&&t.useTextareaForIME||y.isMobile?this.lineHeight:1;if(o<0||o>n.height-r)s.translate(this.textarea,0,0);else{var i=1,c=this.$size.height-r;if(t)if(t.useTextareaForIME){var d=this.textarea.value;i=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(l-=this.scrollLeft)>this.$size.scrollerWidth-i&&(l=this.$size.scrollerWidth-i),l+=this.gutterWidth+this.margin.left,s.setStyle(e,"height",r+"px"),s.setStyle(e,"width",i+"px"),s.translate(this.textarea,Math.min(l,this.$size.scrollerWidth-i),Math.min(o,c))}}}else s.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,a,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|a,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},e.prototype.setMargin=function(e,t,a,n){var s=this.margin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|a,s.v=s.top+s.bottom,s.h=s.left+s.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var a=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),a.firstRow!=this.layerConfig.firstRow&&a.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(a.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}a=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-a.offset);var o=a.width+2*this.$padding+"px",l=a.minHeight+"px";s.setStyle(this.content.style,"width",o),s.setStyle(this.content.style,"height",l)}if(e&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-a.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a),this.$markerBack.update(a),this.$markerFront.update(a),this.$cursorLayer.update(a),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(a):this.$textLayer.scrollLines(a),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(a):this.$gutterLayer.scrollLines(a)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a),this.$markerBack.update(a),this.$markerFront.update(a),this.$cursorLayer.update(a),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(a),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(a),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(a),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,a=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(a+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&a>this.$maxPixelHeight&&(a=this.$maxPixelHeight);var n=!(a<=2*this.lineHeight)&&e>t;if(a!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=a+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,a),this.desiredHeight=a,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,a=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),o=!a&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),l=this.$horizScroll!==o;l&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var r=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),a=t.height<=2*this.lineHeight);var i=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,n-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+d.right)));var h=!a&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+c<0||this.scrollTop>d.top),g=r!==h;g&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var p,u,m=this.scrollTop%this.lineHeight,v=Math.ceil(i/this.lineHeight)-1,f=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=f+v,w=this.lineHeight;f=e.screenToDocumentRow(f,0);var y=e.getFoldLine(f);y&&(f=y.start.row),p=e.documentToScreenRow(f,0),u=e.getRowLength(f)*w,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),i=t.scrollerHeight+e.getRowLength(b)*w+u,(m=this.scrollTop-p*w)<0&&p>0&&(p=Math.max(0,p+Math.floor(m/w)),m=this.scrollTop-p*w);var x=0;return(this.layerConfig.width!=s||l)&&(x=this.CHANGE_H_SCROLL),(l||g)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),g&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:f,firstRowScreen:p,lastRow:b,lineHeight:w,characterWidth:this.characterWidth,minHeight:i,maxHeight:n,offset:m,gutterOffset:w?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var a=this.layerConfig;if(!(e>a.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,a){this.scrollCursorIntoView(e,a),this.scrollCursorIntoView(t,a)},e.prototype.scrollCursorIntoView=function(e,t,a){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),s=n.left,o=n.top,l=a&&a.top||0,r=a&&a.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var i=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;i+l>o?(t&&i+l>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):i+this.$size.scrollerHeight-r=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var a;if(this.$hasCssTransforms){a={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([e,t]);e=n[1]-this.gutterWidth-this.margin.left,t=n[0]}else a=this.scroller.getBoundingClientRect();var s=e+this.scrollLeft-a.left-this.$padding,o=s/this.characterWidth,l=Math.floor((t+this.scrollTop-a.top)/this.lineHeight),r=this.$blockCursor?Math.floor(o):Math.round(o);return{row:l,column:r,side:o-r>0?1:-1,offsetX:s}},e.prototype.screenToTextCoordinates=function(e,t){var a;if(this.$hasCssTransforms){a={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([e,t]);e=n[1]-this.gutterWidth-this.margin.left,t=n[0]}else a=this.scroller.getBoundingClientRect();var s=e+this.scrollLeft-a.left-this.$padding,o=s/this.characterWidth,l=this.$blockCursor?Math.floor(o):Math.round(o),r=(t+this.scrollTop-a.top)/this.lineHeight;return this.session.screenToDocumentPosition(r,Math.max(l,0),s)},e.prototype.textToScreenCoordinates=function(e,t){var a=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:a.left+s-this.scrollLeft,pageY:a.top+o-this.scrollTop}},e.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var a=this.session.selection.cursor,n=t||{row:a.row,column:a.column};this.removeGhostText();var o=this.$calculateWrappedTextChunks(e,n);this.addToken(o[0].text,"ghost_text",n.row,n.column),this.$ghostText={text:e,position:{row:n.row,column:n.column}};var l=s.createElement("div");if(o.length>1){var r,i=this.hideTokensAfterPosition(n.row,n.column);o.slice(1).forEach((function(e){var t=s.createElement("div"),a=s.createElement("span");a.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),a.appendChild(s.createTextNode(e.text)),t.appendChild(a),l.appendChild(t),r=t})),i.forEach((function(e){var t=s.createElement("span");x(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(s.createTextNode(e.value)),r.appendChild(t)})),this.$ghostTextWidget={el:l,row:n.row,column:n.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(n,!0),d=this.container.getBoundingClientRect().height,h=o.length*this.lineHeight;if(h0){var c=0;i.push(s[l].length);for(var d=0;d1||Math.abs(e.$size.height-n)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();k.prototype.CHANGE_CURSOR=1,k.prototype.CHANGE_MARKER=2,k.prototype.CHANGE_GUTTER=4,k.prototype.CHANGE_SCROLL=8,k.prototype.CHANGE_LINES=16,k.prototype.CHANGE_TEXT=32,k.prototype.CHANGE_SIZE=64,k.prototype.CHANGE_MARKER_BACK=128,k.prototype.CHANGE_MARKER_FRONT=256,k.prototype.CHANGE_FULL=512,k.prototype.CHANGE_H_SCROLL=1024,k.prototype.$changes=0,k.prototype.$padding=null,k.prototype.$frozen=!1,k.prototype.STEPS=8,n.implement(k.prototype,f),l.defineOptions(k.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),t.VirtualRenderer=k})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,a){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,l=e("../config");function r(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+s.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(t),a.getBlob("application/javascript")}}(e),a=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(a)}return new Worker(e)}var i=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.$createWorkerFromOldConfig=function(t,a,n,s,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),l.get("packaged")||!e.toUrl)s=s||l.moduleUrl(a,"worker");else{var i=this.$normalizePath;s=s||i(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=i(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=r(s),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:a,classname:n}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var a=this.callbacks[t.id];a&&(a(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,a){if(a){var n=this.callbackId++;this.callbacks[n]=a,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(i.prototype),t.UIWorkerClient=function(e,t,a){var n=null,s=!1,r=Object.create(o),c=[],d=new i({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),n&&(s?setTimeout(h):h())}});d.setEmitSync=function(e){s=e};var h=function(){var e=c.shift();e.command?n[e.command].apply(n,e.args):e.event&&r._signal(e.event,e.data)};return r.postMessage=function(e){d.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},l.loadModule(["worker",t],(function(e){for(n=new e[a](r);c.length;)h()})),d},t.WorkerClient=i,t.createWorker=r})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,a){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),l=function(){function e(e,t,a,n,s,o){var l=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){l.onCursorChange()}))},this.$pos=a;var r=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=r.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=a.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(a){var n=t.createAnchor(a.row,a.column);n.$insertRight=!0,n.detach(),e.others.push(n)})),a.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(a){a.markerId=e.addMarker(new n(a.row,a.column,a.row,a.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),s&&(this.length+=a),s&&!this.session.$fromUndo)if("insert"===e.action)for(var l=this.others.length-1;l>=0;l--){var r={row:(i=this.others[l]).row,column:i.column+o};this.doc.insertMergedLines(r,e.lines)}else if("remove"===e.action)for(l=this.others.length-1;l>=0;l--){var i;r={row:(i=this.others[l]).row,column:i.column+o},this.doc.remove(new n(r.row,r.column,r.row,r.column-a))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,a=function(a,s){t.removeMarker(a.markerId),a.markerId=t.addMarker(new n(a.row,a.column,a.row,a.column+e.length),s,null,!1)};a(this.pos,this.mainClass);for(var s=this.others.length;s--;)a(this.others[s],this.othersClass)}},e.prototype.onCursorChange=function(e){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",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,a=0;a1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,a){var n=e("./range_list").RangeList,s=e("./range").Range,o=e("./selection").Selection,l=e("./mouse/multi_select_handler").onMouseDown,r=e("./lib/event"),i=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search),h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var a=this.toOrientedRange();if(this.rangeList.add(a),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(a),this.$onAddRange(a)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var a=e.length;a--;){var n=this.ranges.indexOf(e[a]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],a=0;a1){var e=this.rangeList.ranges,t=e[e.length-1],a=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(a,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(n,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,a){var n=[],o=e.column0;)b--;if(b>0)for(var w=0;n[w].isEmpty();)w++;for(var y=b;y>=w;y--)n[y].isEmpty()&&n.splice(y,1)}return n}}.call(o.prototype);var g=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",l),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),a=!1;r.addListener(t,"keydown",(function(t){var s=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&s?a||(e.renderer.setMouseCursor("crosshair"),a=!0):a&&n()}),e),r.addListener(t,"keyup",n,e),r.addListener(t,"blur",n,e)}function n(t){a&&(e.renderer.setMouseCursor(""),a=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,a=e.length;a--;){var n=e[a];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,a=e.editor;if(a.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=a.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=a.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(a.exitMultiSelectMode(),n=t.exec(a,e.args||{})):n=t.multiSelectAction(a,e.args||{});else{var n=t.exec(a,e.args||{});a.multiSelect.addRange(a.multiSelect.toOrientedRange()),a.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,a){if(!this.inVirtualSelectionMode){var n,s=a&&a.keepOrder,l=1==a||a&&a.$byLines,r=this.session,i=this.selection,c=i.rangeList,d=(s?i:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=i._eventRegistry;i._eventRegistry={};var g=new o(r);this.inVirtualSelectionMode=!0;for(var p=d.length;p--;){if(l)for(;p>0&&d[p].start.row==d[p-1].end.row;)p--;g.fromOrientedRange(d[p]),g.index=p,this.selection=r.selection=g;var u=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===u||(n=u),g.toOrientedRange(d[p])}g.detach(),this.selection=r.selection=i,this.inVirtualSelectionMode=!1,i._eventRegistry=h,i.mergeOverlappingRanges(),i.ranges[0]&&i.fromOrientedRange(i.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,a=[],n=0;nl&&(l=a.column),nd?e.insert(n,i.stringRepeat(" ",o-d)):e.remove(new s(n.row,n.column,n.row,n.column-o+d)),t.start.column=t.end.column=l,t.start.row=t.end.row=n.row,t.cursor=t.end})),t.fromOrientedRange(a[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),h=d.start.row,g=d.end.row,p=h==g;if(p){var u,m=this.session.getLength();do{u=this.session.getLine(g)}while(/[=:]/.test(u)&&++g0);h<0&&(h=0),g>=m&&(g=m-1)}var v=this.session.removeFullLines(h,g);v=this.$reAlignText(v,p),this.session.insert({row:h,column:0},v.join("\n")+"\n"),p||(d.start.column=0,d.end.column=v[v.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var a,n,s,o=!0,l=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,n=t[2].length,s=t[3].length,t):(a+n+s!=t[1].length+t[2].length+t[3].length&&(l=!1),a!=t[1].length&&(o=!1),a>t[1].length&&(a=t[1].length),nt[3].length&&(s=t[3].length),t):[e]})).map(t?c:o?l?function(e){return e[2]?r(a+n-e[2].length)+e[2]+r(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?r(a)+e[2]+r(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function r(e){return i.stringRepeat(" ",e)}function c(e){return e[2]?r(a)+e[2]+r(n-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(g.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var a=e.oldSession;a&&(a.multiSelect.off("addRange",this.$onAddRange),a.multiSelect.off("removeRange",this.$onRemoveRange),a.multiSelect.off("multiSelect",this.$onMultiSelect),a.multiSelect.off("singleSelect",this.$onSingleSelect),a.multiSelect.lead.off("change",this.$checkMultiselectChange),a.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,a){var n=e.getLine(a);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,a){return null},this.indentationBlock=function(e,t,a){var s=/\S/,o=e.getLine(t),l=o.search(s);if(-1!=l){for(var r=a||o.length,i=e.getLength(),c=t,d=t;++tc){var p=e.getLine(d).length;return new n(c,r,d,p)}}},this.openingBracketBlock=function(e,t,a,s,o){var l={row:a,column:s+1},r=e.$findClosingBracket(t,l,o);if(r){var i=e.foldWidgets[r.row];return null==i&&(i=e.getFoldWidget(r.row)),"start"==i&&r.row>l.row&&(r.row--,r.column=e.getLine(r.row).length),n.fromPoints(l,r)}},this.closingBracketBlock=function(e,t,a,s,o){var l={row:a,column:s},r=e.$findOpeningBracket(t,l);if(r)return r.column++,l.column--,n.fromPoints(r,l)}}).call(s.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=e("../range").Range,o=e("../config").nls;t.showErrorMarker=function(e,t){var a=e.session,l=e.getCursorPosition(),r=l.row,i=a.widgetManager.getWidgetsAtRow(r).filter((function(e){return"errorMarker"==e.type}))[0];i?i.destroy():r-=t;var c,d=function(e,t,a){var n=e.getAnnotations().sort(s.comparePoints);if(n.length){var o=function(e,t,a){for(var n=0,s=e.length-1;n<=s;){var o=n+s>>1,l=a(t,e[o]);if(l>0)n=o+1;else{if(!(l<0))return o;s=o-1}}return-(n+1)}(n,{row:t,column:-1},s.comparePoints);o<0&&(o=-o-1),o>=n.length?o=a>0?0:n.length-1:0===o&&a<0&&(o=n.length-1);var l=n[o];if(l&&a){if(l.row===t){do{l=n[o+=a]}while(l&&l.row===t);if(!l)return n.slice()}var r=[];t=l.row;do{r[a<0?"unshift":"push"](l),l=n[o+=a]}while(l&&l.row==t);return r.length&&r}}}(a,r,t);if(d){var h=d[0];l.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,l.row=h.row,c=e.renderer.$gutterLayer.$annotations[l.row]}else{if(i)return;c={displayText:[o("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(l.row),e.selection.moveToPosition(l);var g={row:l.row,fixedWidth:!0,coverGutter:!0,el:n.createElement("div"),type:"errorMarker"},p=g.el.appendChild(n.createElement("div")),u=g.el.appendChild(n.createElement("div"));u.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(l).left;u.style.left=m+e.renderer.gutterWidth-5+"px",g.el.className="error_widget_wrapper",p.className="error_widget "+c.className,c.displayText.forEach((function(e,t){p.appendChild(n.createTextNode(e)),t{e=a.nmd(e),ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"],(function(e,t,a){"use strict";var n=e("../lib/oop"),s=(e("../lib/lang"),e("./text_highlight_rules").TextHighlightRules),o=t.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",l=t.supportFunction="rgb|rgba|url|attr|counter|counters",r=t.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",i=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",c=t.supportConstantFonts="arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace",d=t.numRe="\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))",h=t.pseudoElements="(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b",g=t.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",p=function(){var e=this.createKeywordMapper({"support.function":l,"support.constant":r,"support.type":o,"support.constant.color":i,"support.constant.fonts":c},"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:d},{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:"("+d+")(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:d},{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:h},{token:["punctuation","entity.other.attribute-name.pseudo-class.css"],regex:g},{include:"url"},{token:e,regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"},{token:"paren.lparen",regex:"\\{"},{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()};n.inherits(p,s),t.CssHighlightRules=p})),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var n=e("../range").Range,s=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var a=e.getLine(t).match(/^(\s*\})/);if(!a)return 0;var s=a[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var l=this.$getIndent(e.getLine(o.row));e.replace(new n(t,0,t,s-1),l)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(s.prototype),t.MatchingBraceOutdent=s})),ace.define("ace/mode/css_completions",["require","exports","module"],(function(e,t,a){"use strict";var n={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}},s=function(){};(function(){this.completionsDefined=!1,this.defineCompletions=function(){if(document){var e=document.createElement("c").style;for(var t in e)if("string"==typeof e[t]){var a=t.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));n.hasOwnProperty(a)||(n[a]=1)}}this.completionsDefined=!0},this.getCompletions=function(e,t,a,n){if(this.completionsDefined||this.defineCompletions(),"ruleset"===e||"ace/mode/scss"==t.$mode.$id){var s=t.getLine(a.row).substr(0,a.column),o=/\([^)]*$/.test(s);return o&&(s=s.substr(s.lastIndexOf("(")+1)),/:[^;]+$/.test(s)?(/([\w\-]+):[^:]*$/.test(s),this.getPropertyValueCompletions(e,t,a,n)):this.getPropertyCompletions(e,t,a,n,o)}return[]},this.getPropertyCompletions=function(e,t,a,s,o){return o=o||!1,Object.keys(n).map((function(e){return{caption:e,snippet:e+": $0"+(o?"":";"),meta:"property",score:1e6}}))},this.getPropertyValueCompletions=function(e,t,a,s){var o=t.getLine(a.row).substr(0,a.column),l=(/([\w\-]+):[^:]*$/.exec(o)||{})[1];if(!l)return[];var r=[];return l in n&&"object"==typeof n[l]&&(r=Object.keys(n[l])),r.map((function(e){return{caption:e,snippet:e,meta:"property value",score:1e6}}))}}).call(s.prototype),t.CssCompletions=s})),ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"],(function(e,t,a){"use strict";var n=e("../../lib/oop"),s=(e("../behaviour").Behaviour,e("./cstyle").CstyleBehaviour),o=e("../../token_iterator").TokenIterator,l=function(){this.inherit(s),this.add("colon","insertion",(function(e,t,a,n,s){if(":"===s&&a.selection.isEmpty()){var l=a.getCursorPosition(),r=new o(n,l.row,l.column),i=r.getCurrentToken();if(i&&i.value.match(/\s+/)&&(i=r.stepBackward()),i&&"support.type"===i.type){var c=n.doc.getLine(l.row);if(":"===c.substring(l.column,l.column+1))return{text:"",selection:[1,1]};if(/^(\s+[^;]|\s*$)/.test(c.substring(l.column)))return{text:":;",selection:[1,1]}}}})),this.add("colon","deletion",(function(e,t,a,n,s){var l=n.doc.getTextRange(s);if(!s.isMultiLine()&&":"===l){var r=a.getCursorPosition(),i=new o(n,r.row,r.column),c=i.getCurrentToken();if(c&&c.value.match(/\s+/)&&(c=i.stepBackward()),c&&"support.type"===c.type&&";"===n.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s}})),this.add("semicolon","insertion",(function(e,t,a,n,s){if(";"===s&&a.selection.isEmpty()){var o=a.getCursorPosition();if(";"===n.doc.getLine(o.row).substring(o.column,o.column+1))return{text:"",selection:[1,1]}}})),this.add("!important","insertion",(function(e,t,a,n,s){if("!"===s&&a.selection.isEmpty()){var o=a.getCursorPosition(),l=n.doc.getLine(o.row);if(/^\s*(;|}|$)/.test(l.substring(o.column)))return{text:"!important",selection:[10,10]}}}))};n.inherits(l,s),t.CssBehaviour=l})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,a){"use strict";var n=e("../../lib/oop"),s=e("../../range").Range,o=e("./fold_mode").FoldMode,l=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};n.inherits(l,o),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(e,t,a){var n=e.getLine(a);if(this.singleLineBlockCommentRe.test(n)&&!this.startRegionRe.test(n)&&!this.tripleStarBlockCommentRe.test(n))return"";var s=this._getFoldWidgetBase(e,t,a);return!s&&this.startRegionRe.test(n)?"start":s},this.getFoldWidgetRange=function(e,t,a,n){var s,o=e.getLine(a);if(this.startRegionRe.test(o))return this.getCommentRegionBlock(e,o,a);if(s=o.match(this.foldingStartMarker)){var l=s.index;if(s[1])return this.openingBracketBlock(e,s[1],a,l);var r=e.getCommentFoldRange(a,l+s[0].length,1);return r&&!r.isMultiLine()&&(n?r=this.getSectionRange(e,a):"all"!=t&&(r=null)),r}return"markbegin"!==t&&(s=o.match(this.foldingStopMarker))?(l=s.index+s[0].length,s[1]?this.closingBracketBlock(e,s[1],a,l):e.getCommentFoldRange(a,l,-1)):void 0},this.getSectionRange=function(e,t){for(var a=e.getLine(t),n=a.search(/\S/),o=t,l=a.length,r=t+=1,i=e.getLength();++tc)break;var d=this.getFoldWidgetRange(e,"all",t);if(d){if(d.start.row<=o)break;if(d.isMultiLine())t=d.end.row;else if(n==c)break}r=t}}return new s(o,l,r,e.getLine(r).length)},this.getCommentRegionBlock=function(e,t,a){for(var n=t.search(/\s*$/),o=e.getLength(),l=a,r=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,i=1;++al)return new s(l,n,a,t.length)}}.call(l.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(e,t,a){"use strict";var n=e("../lib/oop"),s=e("./text").Mode,o=e("./css_highlight_rules").CssHighlightRules,l=e("./matching_brace_outdent").MatchingBraceOutdent,r=e("../worker/worker_client").WorkerClient,i=e("./css_completions").CssCompletions,c=e("./behaviour/css").CssBehaviour,d=e("./folding/cstyle").FoldMode,h=function(){this.HighlightRules=o,this.$outdent=new l,this.$behaviour=new c,this.$completer=new i,this.foldingRules=new d};n.inherits(h,s),function(){this.foldingRules="cStyle",this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,a){var n=this.$getIndent(t),s=this.getTokenizer().getLineTokens(t,e).tokens;return s.length&&"comment"==s[s.length-1].type||t.match(/^.*\{\s*$/)&&(n+=a),n},this.checkOutdent=function(e,t,a){return this.$outdent.checkOutdent(t,a)},this.autoOutdent=function(e,t,a){this.$outdent.autoOutdent(t,a)},this.getCompletions=function(e,t,a,n){return this.$completer.getCompletions(e,t,a,n)},this.createWorker=function(e){var t=new r(["ace"],"ace/mode/css_worker","Worker");return t.attachToDocument(e.getDocument()),t.on("annotate",(function(t){e.setAnnotations(t.data)})),t.on("terminate",(function(){e.clearAnnotations()})),t},this.$id="ace/mode/css",this.snippetFileId="ace/snippets/css"}.call(h.prototype),t.Mode=h})),ace.require(["ace/mode/css"],(function(t){e&&(e.exports=t)}))},1020:(e,t,a)=>{"use strict";var n=a(1609),s=Symbol.for("react.element"),o=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r={key:!0,ref:!0,__self:!0,__source:!0};t.jsx=function(e,t,a){var n,i={},c=null,d=null;for(n in void 0!==a&&(c=""+a),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(d=t.ref),t)o.call(t,n)&&!r.hasOwnProperty(n)&&(i[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===i[n]&&(i[n]=t[n]);return{$$typeof:s,type:e,key:c,ref:d,props:i,_owner:l.current}}},1097:(e,t,a)=>{e=a.nmd(e);var n="__lodash_hash_undefined__",s=9007199254740991,o="[object Arguments]",l="[object Array]",r="[object Boolean]",i="[object Date]",c="[object Error]",d="[object Function]",h="[object Map]",g="[object Number]",p="[object Object]",u="[object Promise]",m="[object RegExp]",v="[object Set]",f="[object String]",b="[object WeakMap]",w="[object ArrayBuffer]",y="[object DataView]",x=/^\[object .+?Constructor\]$/,k=/^(?:0|[1-9]\d*)$/,C={};C["[object Float32Array]"]=C["[object Float64Array]"]=C["[object Int8Array]"]=C["[object Int16Array]"]=C["[object Int32Array]"]=C["[object Uint8Array]"]=C["[object Uint8ClampedArray]"]=C["[object Uint16Array]"]=C["[object Uint32Array]"]=!0,C[o]=C[l]=C[w]=C[r]=C[y]=C[i]=C[c]=C[d]=C[h]=C[g]=C[p]=C[m]=C[v]=C[f]=C[b]=!1;var M="object"==typeof a.g&&a.g&&a.g.Object===Object&&a.g,z="object"==typeof self&&self&&self.Object===Object&&self,E=M||z||Function("return this")(),_=t&&!t.nodeType&&t,L=_&&e&&!e.nodeType&&e,H=L&&L.exports===_,S=H&&M.process,V=function(){try{return S&&S.binding&&S.binding("util")}catch(e){}}(),T=V&&V.isTypedArray;function $(e,t){for(var a=-1,n=null==e?0:e.length;++ar))return!1;var c=o.get(e);if(c&&o.get(t))return c==t;var d=-1,h=!0,g=2&a?new we:void 0;for(o.set(e,t),o.set(t,e);++d-1},fe.prototype.set=function(e,t){var a=this.__data__,n=xe(a,e);return n<0?(++this.size,a.push([e,t])):a[n][1]=t,this},be.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(se||fe),string:new ve}},be.prototype.delete=function(e){var t=_e(this,e).delete(e);return this.size-=t?1:0,t},be.prototype.get=function(e){return _e(this,e).get(e)},be.prototype.has=function(e){return _e(this,e).has(e)},be.prototype.set=function(e,t){var a=_e(this,e),n=a.size;return a.set(e,t),this.size+=a.size==n?0:1,this},we.prototype.add=we.prototype.push=function(e){return this.__data__.set(e,n),this},we.prototype.has=function(e){return this.__data__.has(e)},ye.prototype.clear=function(){this.__data__=new fe,this.size=0},ye.prototype.delete=function(e){var t=this.__data__,a=t.delete(e);return this.size=t.size,a},ye.prototype.get=function(e){return this.__data__.get(e)},ye.prototype.has=function(e){return this.__data__.has(e)},ye.prototype.set=function(e,t){var a=this.__data__;if(a instanceof fe){var n=a.__data__;if(!se||n.length<199)return n.push([e,t]),this.size=++a.size,this;a=this.__data__=new be(n)}return a.set(e,t),this.size=a.size,this};var He=ee?function(e){return null==e?[]:(e=Object(e),function(t){for(var a=-1,n=null==t?0:t.length,s=0,o=[];++a-1&&e%1==0&&e-1&&e%1==0&&e<=s}function Oe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Re(e){return null!=e&&"object"==typeof e}var De=T?function(e){return function(t){return e(t)}}(T):function(e){return Re(e)&&Ie(e.length)&&!!C[ke(e)]};function Fe(e){return null!=(t=e)&&Ie(t.length)&&!Pe(t)?function(e,t){var a=Be(e),n=!a&&Ae(e),s=!a&&!n&&Ne(e),o=!a&&!n&&!s&&De(e),l=a||n||s||o,r=l?function(e,t){for(var a=-1,n=Array(e);++a{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},1289:(e,t,a)=>{e=a.nmd(e),ace.define("ace/theme/monokai-css",["require","exports","module"],(function(e,t,a){a.exports=".ace-monokai .ace_gutter {\n background: #2F3129;\n color: #8F908A\n}\n\n.ace-monokai .ace_print-margin {\n width: 1px;\n background: #555651\n}\n\n.ace-monokai {\n background-color: #272822;\n color: #F8F8F2\n}\n\n.ace-monokai .ace_cursor {\n color: #F8F8F0\n}\n\n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E\n}\n\n.ace-monokai.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #272822;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(102, 82, 0)\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_marker-layer .ace_active-line {\n background: #202020\n}\n\n.ace-monokai .ace_gutter-active-line {\n background-color: #272727\n}\n\n.ace-monokai .ace_marker-layer .ace_selected-word {\n border: 1px solid #49483E\n}\n\n.ace-monokai .ace_invisible {\n color: #52524d\n}\n\n.ace-monokai .ace_entity.ace_name.ace_tag,\n.ace-monokai .ace_keyword,\n.ace-monokai .ace_meta.ace_tag,\n.ace-monokai .ace_storage {\n color: #F92672\n}\n\n.ace-monokai .ace_punctuation,\n.ace-monokai .ace_punctuation.ace_tag {\n color: #fff\n}\n\n.ace-monokai .ace_constant.ace_character,\n.ace-monokai .ace_constant.ace_language,\n.ace-monokai .ace_constant.ace_numeric,\n.ace-monokai .ace_constant.ace_other {\n color: #AE81FF\n}\n\n.ace-monokai .ace_invalid {\n color: #F8F8F0;\n background-color: #F92672\n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color: #F8F8F0;\n background-color: #AE81FF\n}\n\n.ace-monokai .ace_support.ace_constant,\n.ace-monokai .ace_support.ace_function {\n color: #66D9EF\n}\n\n.ace-monokai .ace_fold {\n background-color: #A6E22E;\n border-color: #F8F8F2\n}\n\n.ace-monokai .ace_storage.ace_type,\n.ace-monokai .ace_support.ace_class,\n.ace-monokai .ace_support.ace_type {\n font-style: italic;\n color: #66D9EF\n}\n\n.ace-monokai .ace_entity.ace_name.ace_function,\n.ace-monokai .ace_entity.ace_other,\n.ace-monokai .ace_entity.ace_other.ace_attribute-name,\n.ace-monokai .ace_variable {\n color: #A6E22E\n}\n\n.ace-monokai .ace_variable.ace_parameter {\n font-style: italic;\n color: #FD971F\n}\n\n.ace-monokai .ace_string {\n color: #E6DB74\n}\n\n.ace-monokai .ace_comment {\n color: #75715E\n}\n\n.ace-monokai .ace_indent-guide {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWPQ0FD0ZXBzd/wPAAjVAoxeSgNeAAAAAElFTkSuQmCC) right repeat-y\n}\n\n.ace-monokai .ace_indent-guide-active {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQIW2PQ1dX9zzBz5sz/ABCcBFFentLlAAAAAElFTkSuQmCC) right repeat-y;\n}\n"})),ace.define("ace/theme/monokai",["require","exports","module","ace/theme/monokai-css","ace/lib/dom"],(function(e,t,a){t.isDark=!0,t.cssClass="ace-monokai",t.cssText=e("./monokai-css"),e("../lib/dom").importCssString(t.cssText,t.cssClass,!1)})),ace.require(["ace/theme/monokai"],(function(t){e&&(e.exports=t)}))},1327:(e,t,a)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n,s=(n=a(1609))&&n.__esModule?n:{default:n},o={accessibility:!0,adaptiveHeight:!1,afterChange:null,appendDots:function(e){return s.default.createElement("ul",{style:{display:"block"}},e)},arrows:!0,autoplay:!1,autoplaySpeed:3e3,beforeChange:null,centerMode:!1,centerPadding:"50px",className:"",cssEase:"ease",customPaging:function(e){return s.default.createElement("button",null,e+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,infinite:!0,initialSlide:0,lazyLoad:null,nextArrow:null,onEdge:null,onInit:null,onLazyLoadError:null,onReInit:null,pauseOnDotsHover:!1,pauseOnFocus:!1,pauseOnHover:!0,prevArrow:null,responsive:null,rows:1,rtl:!1,slide:"div",slidesPerRow:1,slidesToScroll:1,slidesToShow:1,speed:500,swipe:!0,swipeEvent:null,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,asNavFor:null,unslick:!1};t.default=o},1441:(e,t,a)=>{var n=a(8028),s=function(e){var t="",a=Object.keys(e);return a.forEach((function(s,o){var l=e[s];(function(e){return/[height|width]$/.test(e)})(s=n(s))&&"number"==typeof l&&(l+="px"),t+=!0===l?s:!1===l?"not "+s:"("+s+": "+l+")",o{"use strict";e.exports=window.React},1973:(e,t,a)=>{e=a.nmd(e),function(){var e=function(){return this}();e||"undefined"==typeof window||(e=window);var t=function(e,a,n){"string"==typeof e?(2==arguments.length&&(n=a),t.modules[e]||(t.payloads[e]=n,t.modules[e]=null)):t.original?t.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())};t.modules={},t.payloads={};var a,n,s=function(e,t,a){if("string"==typeof t){var n=r(e,t);if(null!=n)return a&&a(),n}else if("[object Array]"===Object.prototype.toString.call(t)){for(var s=[],l=0,i=t.length;la.length)&&(t=a.length),t-=e.length;var n=a.indexOf(e,t);return-1!==n&&n===t})),String.prototype.repeat||n(String.prototype,"repeat",(function(e){for(var t="",a=this;e>0;)1&e&&(t+=a),(e>>=1)&&(a+=a);return t})),String.prototype.includes||n(String.prototype,"includes",(function(e,t){return-1!=this.indexOf(e,t)})),Object.assign||(Object.assign=function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var t=Object(e),a=1;a>>0,n=0|arguments[1],s=n<0?Math.max(a+n,0):Math.min(n,a),o=arguments[2],l=void 0===o?a:0|o,r=l<0?Math.max(a+l,0):Math.min(l,a);s0;)1&t&&(a+=e),(t>>=1)&&(e+=e);return a};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var a in e)t[a]=e[a];return t},t.copyArray=function(e){for(var t=[],a=0,n=e.length;a65535?2:1}})),ace.define("ace/lib/useragent",["require","exports","module"],(function(e,t,a){"use strict";t.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},t.getOS=function(){return t.isMac?t.OS.MAC:t.isLinux?t.OS.LINUX:t.OS.WINDOWS};var n="object"==typeof navigator?navigator:{},s=(/mac|win|linux/i.exec(n.platform)||["other"])[0].toLowerCase(),o=n.userAgent||"",l=n.appName||"";t.isWin="win"==s,t.isMac="mac"==s,t.isLinux="linux"==s,t.isIE="Microsoft Internet Explorer"==l||l.indexOf("MSAppHost")>=0?parseFloat((o.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((o.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),t.isOldIE=t.isIE&&t.isIE<9,t.isGecko=t.isMozilla=o.match(/ Gecko\/\d+/),t.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),t.isWebKit=parseFloat(o.split("WebKit/")[1])||void 0,t.isChrome=parseFloat(o.split(" Chrome/")[1])||void 0,t.isSafari=parseFloat(o.split(" Safari/")[1])&&!t.isChrome||void 0,t.isEdge=parseFloat(o.split(" Edge/")[1])||void 0,t.isAIR=o.indexOf("AdobeAIR")>=0,t.isAndroid=o.indexOf("Android")>=0,t.isChromeOS=o.indexOf(" CrOS ")>=0,t.isIOS=/iPad|iPhone|iPod/.test(o)&&!window.MSStream,t.isIOS&&(t.isMac=!0),t.isMobile=t.isIOS||t.isAndroid})),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],(function(e,t,a){"use strict";var n,s=e("./useragent");t.buildDom=function e(t,a,n){if("string"==typeof t&&t){var s=document.createTextNode(t);return a&&a.appendChild(s),s}if(!Array.isArray(t))return t&&t.appendChild&&a&&a.appendChild(t),t;if("string"!=typeof t[0]||!t[0]){for(var o=[],l=0;l=1.5,s.isChromeOS&&(t.HI_DPI=!1),"undefined"!=typeof document){var i=document.createElement("div");t.HI_DPI&&void 0!==i.style.transform&&(t.HAS_CSS_TRANSFORMS=!0),s.isEdge||void 0===i.style.animationName||(t.HAS_CSS_ANIMATION=!0),i=null}t.HAS_CSS_TRANSFORMS?t.translate=function(e,t,a){e.style.transform="translate("+Math.round(t)+"px, "+Math.round(a)+"px)"}:t.translate=function(e,t,a){e.style.top=Math.round(a)+"px",e.style.left=Math.round(t)+"px"}})),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("./dom");t.get=function(e,t){var a=new XMLHttpRequest;a.open("GET",e,!0),a.onreadystatechange=function(){4===a.readyState&&t(a.responseText)},a.send(null)},t.loadScript=function(e,t){var a=n.getDocumentHead(),s=document.createElement("script");s.src=e,a.appendChild(s),s.onload=s.onreadystatechange=function(e,a){!a&&s.readyState&&"loaded"!=s.readyState&&"complete"!=s.readyState||(s=s.onload=s.onreadystatechange=null,a||t())}},t.qualifyURL=function(e){var t=document.createElement("a");return t.href=e,t.href}})),ace.define("ace/lib/oop",["require","exports","module"],(function(e,t,a){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var a in t)e[a]=t[a];return e},t.implement=function(e,a){t.mixin(e,a)}})),ace.define("ace/lib/event_emitter",["require","exports","module"],(function(e,t,a){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(a.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),a=a.slice();for(var l=0;l1&&(s=a[a.length-2]);var l=i[t+"Path"];return null==l?l=i.basePath:"/"==n&&(t=n=""),l&&"/"!=l.slice(-1)&&(l+="/"),l+t+n+s+this.get("suffix")},t.setModuleUrl=function(e,t){return i.$moduleUrls[e]=t},t.setLoader=function(e){r=e},t.dynamicModules=Object.create(null),t.$loading={},t.$loaded={},t.loadModule=function(a,n){var o;if(Array.isArray(a))var l=a[0],i=a[1];else"string"==typeof a&&(i=a);var d=function(a){if(a&&!t.$loading[i])return n&&n(a);if(t.$loading[i]||(t.$loading[i]=[]),t.$loading[i].push(n),!(t.$loading[i].length>1)){var o=function(){!function(t,a){"ace/theme/textmate"===t||"./theme/textmate"===t?a(0,e("./theme/textmate")):r?r(t,a):console.error("loader is not configured")}(i,(function(e,a){a&&(t.$loaded[i]=a),t._emit("load.module",{name:i,module:a});var n=t.$loading[i];t.$loading[i]=null,n.forEach((function(e){e&&e(a)}))}))};if(!t.get("packaged"))return o();s.loadScript(t.moduleUrl(i,l),o),c()}};if(t.dynamicModules[i])t.dynamicModules[i]().then((function(e){e.default?d(e.default):d(e)}));else{try{o=this.$require(i)}catch(e){}d(o||t.$loaded[i])}},t.$require=function(e){if("function"==typeof a.require)return a.require(e)},t.setModuleLoader=function(e,a){t.dynamicModules[e]=a};var c=function(){i.basePath||i.workerPath||i.modePath||i.themePath||Object.keys(i.$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"),c=function(){})};t.version="1.39.1"})),ace.define("ace/loader_build",["require","exports","module","ace/lib/fixoldbrowsers","ace/config"],(function(e,t,n){"use strict";e("./lib/fixoldbrowsers");var s=e("./config");s.setLoader((function(t,a){e([t],(function(e){a(null,e)}))}));var o=function(){return this||"undefined"!=typeof window&&window}();function l(t){if(o&&o.document){s.set("packaged",t||e.packaged||n.packaged||o.define&&a.amdD.packaged);var l={},r="",i=document.currentScript||document._currentScript,c=i&&i.ownerDocument||document;i&&i.src&&(r=i.src.split(/[?#]/)[0].split("/").slice(0,-1).join("/")||"");for(var d,h=c.getElementsByTagName("script"),g=0;g ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,a=e.end,n=e.start;return 1==(t=this.compare(a.row,a.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,a){if(this.end.row>a)var n={row:a+1,column:0};else this.end.rowa)var s={row:a+1,column:0};else this.start.row1?++h>4&&(h=1):h=1,o.isIE){var l=Math.abs(e.clientX-r)>5||Math.abs(e.clientY-i)>5;c&&!l||(h=1),c&&clearTimeout(c),c=setTimeout((function(){c=null}),a[h-1]||600),1==h&&(r=e.clientX,i=e.clientY)}if(e._clicks=h,n[s]("mousedown",e),h>4)h=0;else if(h>1)return n[s](g[h],e)}Array.isArray(e)||(e=[e]),e.forEach((function(e){d(e,"mousedown",p,l)}))},t.getModifierString=function(e){return s.KEY_MODS[g(e)]},t.addCommandKeyListener=function(e,a,n){var i=null;d(e,"keydown",(function(e){l[e.keyCode]=(l[e.keyCode]||0)+1;var t=function(e,t,a){var n=g(t);if(!a&&t.code&&(a=s.$codeToKeyCode[t.code]||a),!o.isMac&&l){if(t.getModifierState&&(t.getModifierState("OS")||t.getModifierState("Win"))&&(n|=8),l.altGr){if(!(3&~n))return;l.altGr=0}if(18===a||17===a){var i=t.location;17===a&&1===i?1==l[a]&&(r=t.timeStamp):18===a&&3===n&&2===i&&t.timeStamp-r<50&&(l.altGr=!0)}}if(a in s.MODIFIER_KEYS&&(a=-1),n||13!==a||3!==t.location||(e(t,n,-a),!t.defaultPrevented)){if(o.isChromeOS&&8&n){if(e(t,n,a),t.defaultPrevented)return;n&=-9}return!!(n||a in s.FUNCTION_KEYS||a in s.PRINTABLE_KEYS)&&e(t,n,a)}}(a,e,e.keyCode);return i=e.defaultPrevented,t}),n),d(e,"keypress",(function(e){i&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey)&&(t.stopEvent(e),i=null)}),n),d(e,"keyup",(function(e){l[e.keyCode]=null}),n),l||(p(),d(window,"focus",p))},"object"==typeof window&&window.postMessage&&!o.isOldIE){var u=1;t.nextTick=function(e,a){a=a||window;var n="zero-timeout-message-"+u++,s=function(o){o.data==n&&(t.stopPropagation(o),h(a,"message",s),e())};d(a,"message",s),a.postMessage(n,"*")}}t.$idleBlocked=!1,t.onIdle=function(e,a){return setTimeout((function a(){t.$idleBlocked?setTimeout(a,100):e()}),a)},t.$idleBlockId=null,t.blockIdle=function(e){t.$idleBlockId&&clearTimeout(t.$idleBlockId),t.$idleBlocked=!0,t.$idleBlockId=setTimeout((function(){t.$idleBlocked=!1}),e||100)},t.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),t.nextFrame?t.nextFrame=t.nextFrame.bind(window):t.nextFrame=function(e){setTimeout(e,17)}})),ace.define("ace/clipboard",["require","exports","module"],(function(e,t,a){"use strict";var n;a.exports={lineMode:!1,pasteCancelled:function(){return!!(n&&n>Date.now()-50)||(n=!1)},cancel:function(){n=Date.now()}}})),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/config","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],(function(e,t,a){"use strict";var n,s=e("../lib/event"),o=e("../config").nls,l=e("../lib/useragent"),r=e("../lib/dom"),i=e("../lib/lang"),c=e("../clipboard"),d=l.isChrome<18,h=l.isIE,g=l.isChrome>63,p=400,u=e("../lib/keys"),m=u.KEY_MODS,v=l.isIOS,f=v?/\s/:/\n/,b=l.isMobile;n=function(e,t){var a=r.createElement("textarea");a.className="ace_text-input",a.setAttribute("wrap","off"),a.setAttribute("autocorrect","off"),a.setAttribute("autocapitalize","off"),a.setAttribute("spellcheck","false"),a.style.opacity="0",e.insertBefore(a,e.firstChild);var n=!1,w=!1,y=!1,x=!1,k="";b||(a.style.fontSize="1px");var C=!1,M=!1,z="",E=0,_=0,L=0,H=Number.MAX_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER,V=0;try{var T=document.activeElement===a}catch(e){}this.setNumberOfExtraLines=function(e){H=Number.MAX_SAFE_INTEGER,S=Number.MIN_SAFE_INTEGER,V=e<0?0:e},this.setAriaLabel=function(){var e="";if(t.$textInputAriaLabel&&(e+="".concat(t.$textInputAriaLabel,", ")),t.session){var n=t.session.selection.cursor.row;e+=o("text-input.aria-label","Cursor at row $0",[n+1])}a.setAttribute("aria-label",e)},this.setAriaOptions=function(e){e.activeDescendant?(a.setAttribute("aria-haspopup","true"),a.setAttribute("aria-autocomplete",e.inline?"both":"list"),a.setAttribute("aria-activedescendant",e.activeDescendant)):(a.setAttribute("aria-haspopup","false"),a.setAttribute("aria-autocomplete","both"),a.removeAttribute("aria-activedescendant")),e.role&&a.setAttribute("role",e.role),e.setLabel&&(a.setAttribute("aria-roledescription",o("text-input.aria-roledescription","editor")),this.setAriaLabel())},this.setAriaOptions({role:"textbox"}),s.addListener(a,"blur",(function(e){M||(t.onBlur(e),T=!1)}),t),s.addListener(a,"focus",(function(e){if(!M){if(T=!0,l.isEdge)try{if(!document.hasFocus())return}catch(e){}t.onFocus(e),l.isEdge?setTimeout(A):A()}}),t),this.$focusScroll=!1,this.focus=function(){if(this.setAriaOptions({setLabel:t.renderer.enableKeyboardAccessibility}),k||g||"browser"==this.$focusScroll)return a.focus({preventScroll:!0});var e=a.style.top;a.style.position="fixed",a.style.top="0px";try{var n=0!=a.getBoundingClientRect().top}catch(e){return}var s=[];if(n)for(var o=a.parentElement;o&&1==o.nodeType;)s.push(o),o.setAttribute("ace_nocontext","true"),o=!o.parentElement&&o.getRootNode?o.getRootNode().host:o.parentElement;a.focus({preventScroll:!0}),n&&s.forEach((function(e){e.removeAttribute("ace_nocontext")})),setTimeout((function(){a.style.position="","0px"==a.style.top&&(a.style.top=e)}),0)},this.blur=function(){a.blur()},this.isFocused=function(){return T},t.on("beforeEndOperation",(function(){var e=t.curOp,n=e&&e.command&&e.command.name;if("insertstring"!=n){var s=n&&(e.docChanged||e.selectionChanged);y&&s&&(z=a.value="",W()),A()}})),t.on("changeSelection",this.setAriaLabel);var $=function(e,a){for(var n=a,s=1;s<=e-H&&s<2*V+1;s++)n+=t.session.getLine(e-s).length+1;return n},A=v?function(e){if(T&&(!n||e)&&!x){e||(e="");var s="\n ab"+e+"cde fg\n";s!=a.value&&(a.value=z=s);var o=4+(e.length||(t.selection.isEmpty()?0:1));4==E&&_==o||a.setSelectionRange(4,o),E=4,_=o}}:function(){if(!y&&!x&&(T||N)){y=!0;var e=0,n=0,s="";if(t.session){var o=t.selection,l=o.getRange(),r=o.cursor.row;r===S+1?S=(H=S+1)+2*V:r===H-1?H=(S=H-1)-2*V:(rS+1)&&(H=r>V?r-V:0,S=r>V?r+V:2*V);for(var i=[],c=H;c<=S;c++)i.push(t.session.getLine(c));if(s=i.join("\n"),e=$(l.start.row,l.start.column),n=$(l.end.row,l.end.column),l.start.rowS){var h=t.session.getLine(S+1);n=l.end.row>S+1?h.length:l.end.column,n+=s.length+1,s=s+"\n"+h}else b&&r>0&&(s="\n"+s,n+=1,e+=1);s.length>p&&(e0&&z[g]==e[g];)g++,r--;for(c=c.slice(g),g=1;i>0&&z.length-g>E-1&&z[z.length-g]==e[e.length-g];)g++,i--;d-=g-1,h-=g-1;var p=c.length-g+1;if(p<0&&(r=-p,p=0),c=c.slice(0,p),!(n||c||d||r||i||h))return"";x=!0;var u=!1;return l.isAndroid&&". "==c&&(c=" ",u=!0),c&&!r&&!i&&!d&&!h||C?t.onTextInput(c):t.onTextInput(c,{extendLeft:r,extendRight:i,restoreStart:d,restoreEnd:h}),x=!1,z=e,E=s,_=o,L=h,u?"\n":c},I=function(e){if(y)return q();if(e&&e.inputType){if("historyUndo"==e.inputType)return t.execCommand("undo");if("historyRedo"==e.inputType)return t.execCommand("redo")}var n=a.value,s=P(n,!0);(n.length>500||f.test(s)||b&&E<1&&E==_)&&A()},O=function(e,t,a){var n=e.clipboardData||window.clipboardData;if(n&&!d){var s=h||a?"Text":"text/plain";try{return t?!1!==n.setData(s,t):n.getData(s)}catch(e){if(!a)return O(e,t,!0)}}},R=function(e,o){var l=t.getCopyText();if(!l)return s.preventDefault(e);O(e,l)?(v&&(A(l),n=l,setTimeout((function(){n=!1}),10)),o?t.onCut():t.onCopy(),s.preventDefault(e)):(n=!0,a.value=l,a.select(),setTimeout((function(){n=!1,A(),o?t.onCut():t.onCopy()})))},D=function(e){R(e,!0)},F=function(e){R(e,!1)},j=function(e){var n=O(e);c.pasteCancelled()||("string"==typeof n?(n&&t.onPaste(n,e),l.isIE&&setTimeout(A),s.preventDefault(e)):(a.value="",w=!0))};s.addCommandKeyListener(a,(function(e,a,n){if(!y)return t.onCommandKey(e,a,n)}),t),s.addListener(a,"select",(function(e){y||(n?n=!1:function(e){return 0===e.selectionStart&&e.selectionEnd>=z.length&&e.value===z&&z&&e.selectionEnd!==_}(a)?(t.selectAll(),A()):b&&a.selectionStart!=E&&A())}),t),s.addListener(a,"input",I,t),s.addListener(a,"cut",D,t),s.addListener(a,"copy",F,t),s.addListener(a,"paste",j,t),"oncut"in a&&"oncopy"in a&&"onpaste"in a||s.addListener(e,"keydown",(function(e){if((!l.isMac||e.metaKey)&&e.ctrlKey)switch(e.keyCode){case 67:F(e);break;case 86:j(e);break;case 88:D(e)}}),t);var q=function(){if(y&&t.onCompositionUpdate&&!t.$readOnly){if(C)return U();if(y.useTextareaForIME)t.onCompositionUpdate(a.value);else{var e=a.value;P(e),y.markerRange&&(y.context&&(y.markerRange.start.column=y.selectionStart=y.context.compositionStartOffset),y.markerRange.end.column=y.markerRange.start.column+_-y.selectionStart+L)}}},W=function(e){t.onCompositionEnd&&!t.$readOnly&&(y=!1,t.onCompositionEnd(),t.off("mousedown",U),e&&I())};function U(){M=!0,a.blur(),a.focus(),M=!1}var G,Y=i.delayedCall(q,50).schedule.bind(null,null);function Z(){clearTimeout(G),G=setTimeout((function(){k&&(a.style.cssText=k,k=""),t.renderer.$isMousePressed=!1,t.renderer.$keepTextAreaAtCursor&&t.renderer.$moveTextAreaToCursor()}),0)}s.addListener(a,"compositionstart",(function(e){if(!y&&t.onCompositionStart&&!t.$readOnly&&(y={},!C)){e.data&&(y.useTextareaForIME=!1),setTimeout(q,0),t._signal("compositionStart"),t.on("mousedown",U);var n=t.getSelectionRange();n.end.row=n.start.row,n.end.column=n.start.column,y.markerRange=n,y.selectionStart=E,t.onCompositionStart(y),y.useTextareaForIME?(z=a.value="",E=0,_=0):(a.msGetInputContext&&(y.context=a.msGetInputContext()),a.getInputContext&&(y.context=a.getInputContext()))}}),t),s.addListener(a,"compositionupdate",q,t),s.addListener(a,"keyup",(function(e){27==e.keyCode&&a.value.length_&&"\n"==z[l]?r=u.end:s_&&z.slice(0,l).split("\n").length>2?r=u.down:l>_&&" "==z[l-1]?(r=u.right,i=m.option):(l>_||l==_&&_!=E&&s==l)&&(r=u.right),s!==l&&(i|=m.shift),r){if(!t.onCommandKey({},i,r)&&t.commands){r=u.keyCodeToString(r);var c=t.commands.findKeyCommand(i,r);c&&t.execCommand(c)}E=s,_=l,A("")}}};document.addEventListener("selectionchange",l),t.on("destroy",(function(){document.removeEventListener("selectionchange",l)}))}(0,t,a),this.destroy=function(){a.parentElement&&a.parentElement.removeChild(a)}},t.TextInput=n,t.$setUserAgentForTests=function(e,t){b=e,v=t}})),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],(function(e,t,a){"use strict";var n=e("../lib/useragent"),s=function(){function e(e){e.$clickSelection=null;var t=e.editor;t.setDefaultHandler("mousedown",this.onMouseDown.bind(e)),t.setDefaultHandler("dblclick",this.onDoubleClick.bind(e)),t.setDefaultHandler("tripleclick",this.onTripleClick.bind(e)),t.setDefaultHandler("quadclick",this.onQuadClick.bind(e)),t.setDefaultHandler("mousewheel",this.onMouseWheel.bind(e)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach((function(t){e[t]=this[t]}),this),e.selectByLines=this.extendSelectionBy.bind(e,"getLineRange"),e.selectByWords=this.extendSelectionBy.bind(e,"getWordRange")}return e.prototype.onMouseDown=function(e){var t=e.inSelection(),a=e.getDocumentPosition();this.mousedownEvent=e;var s=this.editor,o=e.getButton();return 0!==o?((s.getSelectionRange().isEmpty()||1==o)&&s.selection.moveToPosition(a),void(2==o&&(s.textInput.onContextMenu(e.domEvent),n.isMozilla||e.preventDefault()))):(this.mousedownEvent.time=Date.now(),!t||s.isFocused()||(s.focus(),!this.$focusTimeout||this.$clickSelection||s.inMultiSelectMode)?(this.captureMouse(e),this.startSelect(a,e.domEvent._clicks>1),e.preventDefault()):(this.setState("focusWait"),void this.captureMouse(e)))},e.prototype.startSelect=function(e,t){e=e||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var a=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?a.selection.selectToPosition(e):t||a.selection.moveToPosition(e),t||this.select(),a.setStyle("ace_selecting"),this.setState("select"))},e.prototype.select=function(){var e,t=this.editor,a=t.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var n=this.$clickSelection.comparePoint(a);if(-1==n)e=this.$clickSelection.end;else if(1==n)e=this.$clickSelection.start;else{var s=o(this.$clickSelection,a);a=s.cursor,e=s.anchor}t.selection.setSelectionAnchor(e.row,e.column)}t.selection.selectToPosition(a),t.renderer.scrollCursorIntoView()},e.prototype.extendSelectionBy=function(e){var t,a=this.editor,n=a.renderer.screenToTextCoordinates(this.x,this.y),s=a.selection[e](n.row,n.column);if(this.$clickSelection){var l=this.$clickSelection.comparePoint(s.start),r=this.$clickSelection.comparePoint(s.end);if(-1==l&&r<=0)t=this.$clickSelection.end,s.end.row==n.row&&s.end.column==n.column||(n=s.start);else if(1==r&&l>=0)t=this.$clickSelection.start,s.start.row==n.row&&s.start.column==n.column||(n=s.end);else if(-1==l&&1==r)n=s.end,t=s.start;else{var i=o(this.$clickSelection,n);n=i.cursor,t=i.anchor}a.selection.setSelectionAnchor(t.row,t.column)}a.selection.selectToPosition(n),a.renderer.scrollCursorIntoView()},e.prototype.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting")},e.prototype.focusWait=function(){var e,t,a,n,s=(e=this.mousedownEvent.x,t=this.mousedownEvent.y,a=this.x,n=this.y,Math.sqrt(Math.pow(a-e,2)+Math.pow(n-t,2))),o=Date.now();(s>0||o-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},e.prototype.onDoubleClick=function(e){var t=e.getDocumentPosition(),a=this.editor,n=a.session.getBracketRange(t);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=a.selection.getWordRange(t.row,t.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},e.prototype.onTripleClick=function(e){var t=e.getDocumentPosition(),a=this.editor;this.setState("selectByLines");var n=a.getSelectionRange();n.isMultiLine()&&n.contains(t.row,t.column)?(this.$clickSelection=a.selection.getLineRange(n.start.row),this.$clickSelection.end=a.selection.getLineRange(n.end.row).end):this.$clickSelection=a.selection.getLineRange(t.row),this.select()},e.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},e.prototype.onMouseWheel=function(e){if(!e.getAccelKey()){e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0);var t=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var a=this.$lastScroll,n=e.domEvent.timeStamp,s=n-a.t,o=s?e.wheelX/s:a.vx,l=s?e.wheelY/s:a.vy;s<550&&(o=(o+a.vx)/2,l=(l+a.vy)/2);var r=Math.abs(o/l),i=!1;return r>=1&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(i=!0),r<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)&&(i=!0),i?a.allowed=n:n-a.allowed<550&&(Math.abs(o)<=1.5*Math.abs(a.vx)&&Math.abs(l)<=1.5*Math.abs(a.vy)?(i=!0,a.allowed=n):a.allowed=0),a.t=n,a.vx=o,a.vy=l,i?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0}},e}();function o(e,t){if(e.start.row==e.end.row)var a=2*t.column-e.start.column-e.end.column;else if(e.start.row!=e.end.row-1||e.start.column||e.end.column)a=2*t.row-e.start.row-e.end.row;else a=t.column-4;return a<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}s.prototype.selectEnd=s.prototype.selectByLinesEnd,s.prototype.selectAllEnd=s.prototype.selectByLinesEnd,s.prototype.selectByWordsEnd=s.prototype.selectByLinesEnd,t.DefaultHandlers=s})),ace.define("ace/lib/scroll",["require","exports","module"],(function(e,t,a){t.preventParentScroll=function(e){e.stopPropagation();var t=e.currentTarget;t.scrollHeight>t.clientHeight||e.preventDefault()}})),ace.define("ace/tooltip",["require","exports","module","ace/lib/dom","ace/lib/event","ace/range","ace/lib/scroll"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,a=t&&e[t],n=0;if(a)return a.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=e("./lib/dom"),r=(e("./lib/event"),e("./range").Range),i=e("./lib/scroll").preventParentScroll,c="ace_tooltip",d=function(){function e(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}return e.prototype.$init=function(){return this.$element=l.createElement("div"),this.$element.className=c,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},e.prototype.getElement=function(){return this.$element||this.$init()},e.prototype.setText=function(e){this.getElement().textContent=e},e.prototype.setHtml=function(e){this.getElement().innerHTML=e},e.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},e.prototype.setClassName=function(e){l.addCssClass(this.getElement(),e)},e.prototype.setTheme=function(e){this.$element.className=c+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},e.prototype.show=function(e,t,a){null!=e&&this.setText(e),null!=t&&null!=a&&this.setPosition(t,a),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},e.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=c,this.isOpen=!1)},e.prototype.getHeight=function(){return this.getElement().offsetHeight},e.prototype.getWidth=function(){return this.getElement().offsetWidth},e.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},e}(),h=new(function(){function e(){this.popups=[]}return e.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},e.prototype.removePopup=function(e){var t=this.popups.indexOf(e);-1!==t&&(this.popups.splice(t,1),this.updatePopups())},e.prototype.updatePopups=function(){var e,t,a,n;this.popups.sort((function(e,t){return t.priority-e.priority}));var s=[];try{for(var l=o(this.popups),r=l.next();!r.done;r=l.next()){var i=r.value,c=!0;try{for(var d=(a=void 0,o(s)),h=d.next();!h.done;h=d.next()){var g=h.value;if(this.doPopupsOverlap(g,i)){c=!1;break}}}catch(e){a={error:e}}finally{try{h&&!h.done&&(n=d.return)&&n.call(d)}finally{if(a)throw a.error}}c?s.push(i):i.hide()}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}},e.prototype.doPopupsOverlap=function(e,t){var a=e.getElement().getBoundingClientRect(),n=t.getElement().getBoundingClientRect();return a.leftn.left&&a.topn.top},e}());t.popupManager=h,t.Tooltip=d;var g=function(e){function t(t){void 0===t&&(t=document.body);var a=e.call(this,t)||this;a.timeout=void 0,a.lastT=0,a.idleTime=350,a.lastEvent=void 0,a.onMouseOut=a.onMouseOut.bind(a),a.onMouseMove=a.onMouseMove.bind(a),a.waitForHover=a.waitForHover.bind(a),a.hide=a.hide.bind(a);var n=a.getElement();return n.style.whiteSpace="pre-wrap",n.style.pointerEvents="auto",n.addEventListener("mouseout",a.onMouseOut),n.tabIndex=-1,n.addEventListener("blur",function(){n.contains(document.activeElement)||this.hide()}.bind(a)),n.addEventListener("wheel",i),a}return s(t,e),t.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},t.prototype.removeFromEditor=function(e){e.off("mousemove",this.onMouseMove),e.off("mousedown",this.hide),e.renderer.getMouseEventTarget().removeEventListener("mouseout",this.onMouseOut,!0),this.timeout&&(clearTimeout(this.timeout),this.timeout=null)},t.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var a=t.$mouseHandler.isMousePressed;if(this.isOpen){var n=this.lastEvent&&this.lastEvent.getDocumentPosition();this.range&&this.range.contains(n.row,n.column)&&!a&&!this.isOutsideOfText(this.lastEvent)||this.hide()}this.timeout||a||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},t.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;this.idleTime-e>10?this.timeout=setTimeout(this.waitForHover,this.idleTime-e):(this.timeout=null,this.lastEvent&&!this.isOutsideOfText(this.lastEvent)&&this.$gatherData(this.lastEvent,this.lastEvent.editor))},t.prototype.isOutsideOfText=function(e){var t=e.editor,a=e.getDocumentPosition(),n=t.session.getLine(a.row);if(a.column==n.length){var s=t.renderer.pixelToScreenCoordinates(e.clientX,e.clientY),o=t.session.documentToScreenPosition(a.row,a.column);if(o.column!=s.column||o.row!=s.row)return!0}return!1},t.prototype.setDataProvider=function(e){this.$gatherData=e},t.prototype.showForRange=function(e,t,a,n){if(!(n&&n!=this.lastEvent||this.isOpen&&document.activeElement==this.getElement())){var s=e.renderer;this.isOpen||(h.addPopup(this),this.$registerCloseEvents(),this.setTheme(s.theme)),this.isOpen=!0,this.addMarker(t,e.session),this.range=r.fromPoints(t.start,t.end);var o=s.textToScreenCoordinates(t.start.row,t.start.column),l=s.scroller.getBoundingClientRect();o.pageX=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},l=e("../lib/dom"),r=e("../lib/event"),i=e("../tooltip").Tooltip,c=e("../config").nls;t.GUTTER_TOOLTIP_LEFT_OFFSET=5,t.GUTTER_TOOLTIP_TOP_OFFSET=3,t.GutterHandler=function(e){var t,a,n=e.editor,s=n.renderer.$gutterLayer,o=new d(n,!0);function i(e){e&&"keydown"===e.type&&(e.ctrlKey||e.metaKey)||(!e||"mouseout"!==e.type||e.relatedTarget&&!o.getElement().contains(e.relatedTarget))&&(t&&(t=clearTimeout(t)),o.isOpen&&(o.hideTooltip(),n.off("mousewheel",i),n.off("changeSession",i),window.removeEventListener("keydown",i,!0)))}function c(e){o.setPosition(e.x,e.y)}e.editor.setDefaultHandler("guttermousedown",(function(t){if(n.isFocused()&&0==t.getButton()&&"foldWidgets"!=s.getRegion(t)){var a=t.getDocumentPosition().row,o=n.session.selection;if(t.getShiftKey())o.selectTo(a,0);else{if(2==t.domEvent.detail)return n.selectAll(),t.preventDefault();e.$clickSelection=n.selection.getLineRange(a)}return e.setState("selectByLines"),e.captureMouse(t),t.preventDefault()}})),e.editor.setDefaultHandler("guttermousemove",(function(r){var d=r.domEvent.target||r.domEvent.srcElement;if(l.hasCssClass(d,"ace_fold-widget"))return i();o.isOpen&&e.$tooltipFollowsMouse&&c(r),a=r,t||(t=setTimeout((function(){t=null,a&&!e.isMousePressed&&function(){var t=a.getDocumentPosition().row;if(t==n.session.getLength()){var l=n.renderer.pixelToScreenCoordinates(0,a.y).row,r=a.$pos;if(l>n.session.documentToScreenRow(r.row,r.column))return i()}if(o.showTooltip(t),o.isOpen)if(n.on("mousewheel",i),n.on("changeSession",i),window.addEventListener("keydown",i,!0),e.$tooltipFollowsMouse)c(a);else{var d=a.getGutterRow(),h=s.$lines.get(d);if(h){var g=h.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),p=o.getElement().style;p.left=g.right-5+"px",p.top=g.bottom-3+"px"}else c(a)}}()}),50))})),r.addListener(n.renderer.$gutter,"mouseout",(function(e){a=null,o.isOpen&&(t=setTimeout((function(){t=null,i(e)}),50))}),n)};var d=function(e){function t(t,a){void 0===a&&(a=!1);var n=e.call(this,t.container)||this;n.editor=t,n.visibleTooltipRow;var s=n.getElement();return s.setAttribute("role","tooltip"),s.style.pointerEvents="auto",a&&(n.onMouseOut=n.onMouseOut.bind(n),s.addEventListener("mouseout",n.onMouseOut)),n}return s(t,e),t.prototype.onMouseOut=function(e){this.isOpen&&e.relatedTarget&&!this.getElement().contains(e.relatedTarget)&&(e&&e.currentTarget.contains(e.relatedTarget)||this.hideTooltip())},t.prototype.setPosition=function(e,t){var a=window.innerWidth||document.documentElement.clientWidth,n=window.innerHeight||document.documentElement.clientHeight,s=this.getWidth(),o=this.getHeight();(e+=15)+s>a&&(e-=e+s-a),(t+=15)+o>n&&(t-=20+o),i.prototype.setPosition.call(this,e,t)},Object.defineProperty(t,"annotationLabels",{get:function(){return{error:{singular:c("gutter-tooltip.aria-label.error.singular","error"),plural:c("gutter-tooltip.aria-label.error.plural","errors")},security:{singular:c("gutter-tooltip.aria-label.security.singular","security finding"),plural:c("gutter-tooltip.aria-label.security.plural","security findings")},warning:{singular:c("gutter-tooltip.aria-label.warning.singular","warning"),plural:c("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:c("gutter-tooltip.aria-label.info.singular","information message"),plural:c("gutter-tooltip.aria-label.info.plural","information messages")},hint:{singular:c("gutter-tooltip.aria-label.hint.singular","suggestion"),plural:c("gutter-tooltip.aria-label.hint.plural","suggestions")}}},enumerable:!1,configurable:!0}),t.prototype.showTooltip=function(e){var a,n,s=this.editor.renderer.$gutterLayer,o=s.$annotations[e];n=o?{displayText:Array.from(o.displayText),type:Array.from(o.type)}:{displayText:[],type:[]};var r=s.session.getFoldLine(e);if(r&&s.$showFoldedAnnotations){for(var i,c={error:[],security:[],warning:[],info:[],hint:[]},d={error:1,security:2,warning:3,info:4,hint:5},h=e+1;h<=r.end.row;h++)if(s.$annotations[h])for(var g=0;g5?v=null:n-v>=200&&(t.renderer.scrollCursorIntoView(),v=null)})(g=t.renderer.screenToTextCoordinates(i,c),e),function(e,a){var n=Date.now(),s=t.renderer.layerConfig.lineHeight,o=t.renderer.layerConfig.characterWidth,l=t.renderer.scroller.getBoundingClientRect(),r={x:{left:i-l.left,right:l.right-i},y:{top:c-l.top,bottom:l.bottom-c}},d=Math.min(r.x.left,r.x.right),h=Math.min(r.y.top,r.y.bottom),g={row:e.row,column:e.column};d/o<=2&&(g.column+=r.x.left=200&&t.renderer.scrollCursorIntoView(g):m=n:m=null}(g,e)}function x(){h=t.selection.toOrientedRange(),l=t.session.addMarker(h,"ace_selection",t.getSelectionStyle()),t.clearSelection(),t.isFocused()&&t.renderer.$cursorLayer.setBlinking(!1),clearInterval(d),y(),d=setInterval(y,20),w=0,s.addListener(document,"mousemove",M)}function k(){clearInterval(d),t.session.removeMarker(l),l=null,t.selection.fromOrientedRange(h),t.isFocused()&&!u&&t.$resetCursorStyle(),h=null,g=null,w=0,m=null,v=null,s.removeListener(document,"mousemove",M)}this.onDragStart=function(e){if(this.cancelDrag||!b.draggable){var n=this;return setTimeout((function(){n.startSelect(),n.captureMouse(e)}),0),e.preventDefault()}h=t.getSelectionRange();var s=e.dataTransfer;s.effectAllowed=t.getReadOnly()?"copy":"copyMove",t.container.appendChild(a),s.setDragImage&&s.setDragImage(a,0,0),setTimeout((function(){t.container.removeChild(a)})),s.clearData(),s.setData("Text",t.session.getTextRange()),u=!0,this.setState("drag")},this.onDragEnd=function(e){if(b.draggable=!1,u=!1,this.setState(null),!t.getReadOnly()){var a=e.dataTransfer.dropEffect;p||"move"!=a||t.session.remove(t.getSelectionRange()),t.$resetCursorStyle()}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(e){if(!t.getReadOnly()&&z(e.dataTransfer))return i=e.clientX,c=e.clientY,l||x(),w++,e.dataTransfer.dropEffect=p=E(e),s.preventDefault(e)},this.onDragOver=function(e){if(!t.getReadOnly()&&z(e.dataTransfer))return i=e.clientX,c=e.clientY,l||(x(),w++),null!==C&&(C=null),e.dataTransfer.dropEffect=p=E(e),s.preventDefault(e)},this.onDragLeave=function(e){if(--w<=0&&l)return k(),p=null,s.preventDefault(e)},this.onDrop=function(e){if(g){var a=e.dataTransfer;if(u)switch(p){case"move":h=h.contains(g.row,g.column)?{start:g,end:g}:t.moveText(h,g);break;case"copy":h=t.moveText(h,g,!0)}else{var n=a.getData("Text");h={start:g,end:t.session.insert(g,n)},t.focus(),p=null}return k(),s.preventDefault(e)}},s.addListener(b,"dragstart",this.onDragStart.bind(e),t),s.addListener(b,"dragend",this.onDragEnd.bind(e),t),s.addListener(b,"dragenter",this.onDragEnter.bind(e),t),s.addListener(b,"dragover",this.onDragOver.bind(e),t),s.addListener(b,"dragleave",this.onDragLeave.bind(e),t),s.addListener(b,"drop",this.onDrop.bind(e),t);var C=null;function M(){null==C&&(C=setTimeout((function(){null!=C&&l&&k()}),20))}function z(e){var t=e.types;return!t||Array.prototype.some.call(t,(function(e){return"text/plain"==e||"Text"==e}))}function E(e){var t=["copy","copymove","all","uninitialized"],a=o.isMac?e.altKey:e.ctrlKey,n="uninitialized";try{n=e.dataTransfer.effectAllowed.toLowerCase()}catch(e){}var s="none";return a&&t.indexOf(n)>=0?s="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(n)>=0?s="move":t.indexOf(n)>=0&&(s="copy"),s}}function r(e,t,a,n){return Math.sqrt(Math.pow(a-e,2)+Math.pow(n-t,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(e){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var e=this.editor;e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging");var t=o.isWin?"default":"move";e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;o.isIE&&"dragReady"==this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&t.dragDrop(),"dragWait"===this.state&&r(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(t.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(e){if(this.$dragEnabled){this.mousedownEvent=e;var t=this.editor,a=e.inSelection(),n=e.getButton();if(1===(e.domEvent.detail||1)&&0===n&&a){if(e.editor.inMultiSelectMode&&(e.getAccelKey()||e.getShiftKey()))return;this.mousedownEvent.time=Date.now();var s=e.domEvent.target||e.domEvent.srcElement;"unselectable"in s&&(s.unselectable="on"),t.getDragDelay()?(o.isWebKit&&(this.cancelDrag=!0,t.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(e,this.onMouseDrag.bind(this)),e.defaultPrevented=!0}}}}).call(l.prototype),t.DragdropHandler=l})),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("./mouse_event").MouseEvent,s=e("../lib/event"),o=e("../lib/dom");t.addTouchListeners=function(e,t){var a,l,r,i,c,d,h,g,p,u="scroll",m=0,v=0,f=0,b=0;function w(){if(t.getOption("enableMobileMenu")){p||(r=window.navigator&&window.navigator.clipboard,i=!1,c=function(e){return t.commands.canExecute(e,t)},d=function(e){var a,n,s=e.target.getAttribute("action");if("more"==s||!i)return i=!i,a=t.getCopyText(),n=t.session.getUndoManager().hasUndo(),void p.replaceChild(o.buildDom(i?["span",!a&&c("selectall")&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],a&&c("copy")&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],a&&c("cut")&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],r&&c("paste")&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],n&&c("undo")&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],c("find")&&["span",{class:"ace_mobile-button",action:"find"},"Find"],c("openCommandPalette")&&["span",{class:"ace_mobile-button",action:"openCommandPalette"},"Palette"]]:["span"]),p.firstChild);"paste"==s?r.readText().then((function(e){t.execCommand(s,e)})):s&&("cut"!=s&&"copy"!=s||(r?r.writeText(t.getCopyText()):document.execCommand("copy")),t.execCommand(s)),p.firstChild.style.display="none",i=!1,"openCommandPalette"!=s&&t.focus()},p=o.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(e){u="menu",e.stopPropagation(),e.preventDefault(),t.textInput.focus()},ontouchend:function(e){e.stopPropagation(),e.preventDefault(),d(e)},onclick:d},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],t.container));var e=t.selection.cursor,a=t.renderer.textToScreenCoordinates(e.row,e.column),n=t.renderer.textToScreenCoordinates(0,0).pageX,s=t.renderer.scrollLeft,l=t.container.getBoundingClientRect();p.style.top=a.pageY-l.top-3+"px",a.pageX-l.left1)return clearTimeout(c),c=null,r=-1,void(u="zoom");g=t.$mouseHandler.isMousePressed=!0;var o=t.renderer.layerConfig.lineHeight,d=t.renderer.layerConfig.lineHeight,p=e.timeStamp;i=p;var w=s[0],y=w.clientX,k=w.clientY;Math.abs(a-y)+Math.abs(l-k)>o&&(r=-1),a=e.clientX=y,l=e.clientY=k,f=b=0;var C=new n(e,t);if(h=C.getDocumentPosition(),p-r<500&&1==s.length&&!m)v++,e.preventDefault(),e.button=0,function(){c=null,clearTimeout(c),t.selection.moveToPosition(h);var e=v>=2?t.selection.getLineRange(h.row):t.session.getBracketRange(h);e&&!e.isEmpty()?t.selection.setRange(e):t.selection.selectWord(),u="wait"}();else{v=0;var M=t.selection.cursor,z=t.selection.isEmpty()?M:t.selection.anchor,E=t.renderer.$cursorLayer.getPixelPosition(M,!0),_=t.renderer.$cursorLayer.getPixelPosition(z,!0),L=t.renderer.scroller.getBoundingClientRect(),H=t.renderer.layerConfig.offset,S=t.renderer.scrollLeft,V=function(e,t){return(e/=d)*e+(t=t/o-.75)*t};if(e.clientX$?"cursor":"anchor"),u=$<3.5?"anchor":T<3.5?"cursor":"scroll",c=setTimeout(x,450)}r=p}),t),s.addListener(e,"touchend",(function(e){g=t.$mouseHandler.isMousePressed=!1,d&&clearInterval(d),"zoom"==u?(u="",m=0):c?(t.selection.moveToPosition(h),m=0,w()):"scroll"==u?(m+=60,d=setInterval((function(){m--<=0&&(clearInterval(d),d=null),Math.abs(f)<.01&&(f=0),Math.abs(b)<.01&&(b=0),m<20&&(f*=.9),m<20&&(b*=.9);var e=t.session.getScrollTop();t.renderer.scrollBy(10*f,10*b),e==t.session.getScrollTop()&&(m=0)}),10),y()):w(),clearTimeout(c),c=null}),t),s.addListener(e,"touchmove",(function(e){c&&(clearTimeout(c),c=null);var s=e.touches;if(!(s.length>1||"zoom"==u)){var o=s[0],r=a-o.clientX,d=l-o.clientY;if("wait"==u){if(!(r*r+d*d>4))return e.preventDefault();u="cursor"}a=o.clientX,l=o.clientY,e.clientX=o.clientX,e.clientY=o.clientY;var h=e.timeStamp,g=h-i;if(i=h,"scroll"==u){var p=new n(e,t);p.speed=1,p.wheelX=r,p.wheelY=d,10*Math.abs(r)=e){for(o=h+1;o=e;)o++;for(r=h,i=o-1;r=t.length||2!=(i=a[s-1])&&3!=i||2!=(c=t[s+1])&&3!=c?4:(o&&(c=3),c==i?c:4);case 10:return 2==(i=s>0?a[s-1]:5)&&s+10&&2==a[s-1])return 2;if(o)return 4;for(p=s+1,g=t.length;p=1425&&m<=2303||64286==m;if(i=t[p],v&&(1==i||7==i))return 1}return s<1||5==(i=t[s-1])?4:a[s-1];case 5:return o=!1,l=!0,n;case 6:return r=!0,4;case 13:case 14:case 16:case 17:case 15:o=!1;case h:return 4}}function v(e){var t=e.charCodeAt(0),a=t>>8;return 0==a?t>191?0:g[t]:5==a?/[\u0591-\u05f4]/.test(e)?1:0:6==a?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(e)?12:/[\u0660-\u0669\u066b-\u066c]/.test(e)?3:1642==t?d:/[\u06f0-\u06f9]/.test(e)?2:7:32==a&&t<=8287?p[255&t]:254==a&&t>=65136?7:4}t.L=0,t.R=1,t.EN=2,t.ON_R=3,t.AN=4,t.R_H=5,t.B=6,t.RLE=7,t.DOT="·",t.doBidiReorder=function(e,a,d){if(e.length<2)return{};var g=e.split(""),p=new Array(g.length),f=new Array(g.length),b=[];n=d?1:0,function(e,t,a,d){var h=n?c:i,g=null,p=null,u=null,f=0,b=null,w=-1,y=null,x=null,k=[];if(!d)for(y=0,d=[];y0)if(16==b){for(y=w;y-1){for(y=w;y=0&&8==d[C];C--)t[C]=n}}(g,b,g.length,a);for(var w=0;w7&&a[w]<13||4===a[w]||a[w]===h)?b[w]=t.ON_R:w>0&&"ل"===g[w-1]&&/\u0622|\u0623|\u0625|\u0627/.test(g[w])&&(b[w-1]=b[w]=t.R_H,w++);for(g[g.length-1]===t.DOT&&(b[g.length-1]=t.B),"‫"===g[0]&&(b[0]=t.RLE),w=0;w=0&&(e=this.session.$docRowCache[a])}return e},e.prototype.getSplitIndex=function(){var e=0,t=this.session.$screenRowCache;if(t.length)for(var a,n=this.session.$getRowCacheIndex(t,this.currentRow);this.currentRow-e>0&&(a=this.session.$getRowCacheIndex(t,this.currentRow-e-1))===n;)n=a,e++;else e=this.currentRow;return e},e.prototype.updateRowLine=function(e,t){void 0===e&&(e=this.getDocumentRow());var a=e===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(e),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var o=this.session.$wrapData[e];o&&(void 0===t&&(t=this.getSplitIndex()),t>0&&o.length?(this.wrapIndent=o.indent,this.wrapOffset=this.wrapIndent*this.charWidths[n.L],this.line=tt?this.session.getOverwrite()?e:e-1:t,s=n.getVisualFromLogicalIdx(a,this.bidiMap),o=this.bidiMap.bidiLevels,l=0;!this.session.getOverwrite()&&e<=t&&o[s]%2!=0&&s++;for(var r=0;rt&&o[s]%2==0&&(l+=this.charWidths[o[s]]),this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(l+=this.rtlLineOffset),l},e.prototype.getSelections=function(e,t){var a,n=this.bidiMap,s=n.bidiLevels,o=[],l=0,r=Math.min(e,t)-this.wrapIndent,i=Math.max(e,t)-this.wrapIndent,c=!1,d=!1,h=0;this.wrapIndent&&(l+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var g,p=0;p=r&&ga+o/2;){if(a+=o,n===s.length-1){o=0;break}o=this.charWidths[s[++n]]}return n>0&&s[n-1]%2!=0&&s[n]%2==0?(e0&&s[n-1]%2==0&&s[n]%2!=0?t=1+(e>a?this.bidiMap.logicalFromVisual[n]:this.bidiMap.logicalFromVisual[n-1]):this.isRtlDir&&n===s.length-1&&0===o&&s[n-1]%2==0||!this.isRtlDir&&0===n&&s[n]%2!=0?t=1+this.bidiMap.logicalFromVisual[n]:(n>0&&s[n-1]%2!=0&&0!==o&&n--,t=this.bidiMap.logicalFromVisual[n]),0===t&&this.isRtlDir&&t++,t+this.wrapIndent},e}();t.BidiHandler=l})),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],(function(e,t,a){"use strict";var n=e("./lib/oop"),s=e("./lib/lang"),o=e("./lib/event_emitter").EventEmitter,l=e("./range").Range,r=function(){function e(e){this.session=e,this.doc=e.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var t=this;this.cursor.on("change",(function(e){t.$cursorChanged=!0,t.$silent||t._emit("changeCursor"),t.$isEmpty||t.$silent||t._emit("changeSelection"),t.$keepDesiredColumnOnChange||e.old.column==e.value.column||(t.$desiredColumn=null)})),this.anchor.on("change",(function(){t.$anchorChanged=!0,t.$isEmpty||t.$silent||t._emit("changeSelection")}))}return e.prototype.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},e.prototype.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},e.prototype.getCursor=function(){return this.lead.getPosition()},e.prototype.setAnchor=function(e,t){this.$isEmpty=!1,this.anchor.setPosition(e,t)},e.prototype.getAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},e.prototype.getSelectionLead=function(){return this.lead.getPosition()},e.prototype.isBackwards=function(){var e=this.anchor,t=this.lead;return e.row>t.row||e.row==t.row&&e.column>t.column},e.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?l.fromPoints(t,t):this.isBackwards()?l.fromPoints(t,e):l.fromPoints(e,t)},e.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},e.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},e.prototype.setRange=function(e,t){var a=t?e.end:e.start,n=t?e.start:e.end;this.$setSelection(a.row,a.column,n.row,n.column)},e.prototype.$setSelection=function(e,t,a,n){if(!this.$silent){var s=this.$isEmpty,o=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(a,n),this.$isEmpty=!l.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||s!=this.$isEmpty||o)&&this._emit("changeSelection")}},e.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},e.prototype.selectTo=function(e,t){this.$moveSelection((function(){this.moveCursorTo(e,t)}))},e.prototype.selectToPosition=function(e){this.$moveSelection((function(){this.moveCursorToPosition(e)}))},e.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},e.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},e.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},e.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},e.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},e.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},e.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},e.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},e.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},e.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},e.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},e.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},e.prototype.getWordRange=function(e,t){if(void 0===t){var a=e||this.lead;e=a.row,t=a.column}return this.session.getWordRange(e,t)},e.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},e.prototype.selectAWord=function(){var e=this.getCursor(),t=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(t)},e.prototype.getLineRange=function(e,t){var a,n="number"==typeof e?e:this.lead.row,s=this.session.getFoldLine(n);return s?(n=s.start.row,a=s.end.row):a=n,!0===t?new l(n,0,a,this.session.getLine(a).length):new l(n,0,a+1,0)},e.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},e.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},e.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},e.prototype.wouldMoveIntoSoftTab=function(e,t,a){var n=e.column,s=e.column+t;return a<0&&(n=e.column-t,s=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(n,s).split(" ").length-1==t},e.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();if(e=this.session.getFoldAt(t.row,t.column,-1))this.moveCursorTo(e.start.row,e.start.column);else if(0===t.column)t.row>0&&this.moveCursorTo(t.row-1,this.doc.getLine(t.row-1).length);else{var a=this.session.getTabSize();this.wouldMoveIntoSoftTab(t,a,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-a):this.moveCursorBy(0,-1)}},e.prototype.moveCursorRight=function(){var e,t=this.lead.getPosition();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&&(t.column=n)}}this.moveCursorTo(t.row,t.column)},e.prototype.moveCursorFileEnd=function(){var e=this.doc.getLength()-1,t=this.doc.getLine(e).length;this.moveCursorTo(e,t)},e.prototype.moveCursorFileStart=function(){this.moveCursorTo(0,0)},e.prototype.moveCursorLongWordRight=function(){var e=this.lead.row,t=this.lead.column,a=this.doc.getLine(e),n=a.substring(t);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var s=this.session.getFoldAt(e,t,1);if(s)this.moveCursorTo(s.end.row,s.end.column);else{if(this.session.nonTokenRe.exec(n)&&(t+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,n=a.substring(t)),t>=a.length)return this.moveCursorTo(e,a.length),this.moveCursorRight(),void(e0&&this.moveCursorWordLeft());this.session.tokenRe.exec(o)&&(a-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(t,a)}},e.prototype.$shortWordEndIndex=function(e){var t,a=0,n=/\s/,s=this.session.tokenRe;if(s.lastIndex=0,this.session.tokenRe.exec(e))a=this.session.tokenRe.lastIndex;else{for(;(t=e[a])&&n.test(t);)a++;if(a<1)for(s.lastIndex=0;(t=e[a])&&!s.test(t);)if(s.lastIndex=0,a++,n.test(t)){if(a>2){a--;break}for(;(t=e[a])&&n.test(t);)a++;if(a>2)break}}return s.lastIndex=0,a},e.prototype.moveCursorShortWordRight=function(){var e=this.lead.row,t=this.lead.column,a=this.doc.getLine(e),n=a.substring(t),s=this.session.getFoldAt(e,t,1);if(s)return this.moveCursorTo(s.end.row,s.end.column);if(t==a.length){var o=this.doc.getLength();do{e++,n=this.doc.getLine(e)}while(e0&&/^\s*$/.test(n));a=n.length,/\s+$/.test(n)||(n="")}var o=s.stringReverse(n),l=this.$shortWordEndIndex(o);return this.moveCursorTo(t,a-l)},e.prototype.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},e.prototype.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},e.prototype.moveCursorBy=function(e,t){var a,n=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===t&&(0!==e&&(this.session.$bidiHandler.isBidiRow(n.row,this.lead.row)?(a=this.session.$bidiHandler.getPosLeft(n.column),n.column=Math.round(a/this.session.$bidiHandler.charWidths[0])):a=n.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?n.column=this.$desiredColumn:this.$desiredColumn=n.column),0!=e&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var s=this.session.lineWidgets[this.lead.row];e<0?e-=s.rowsAbove||0:e>0&&(e+=s.rowCount-(s.rowsAbove||0))}var o=this.session.screenToDocumentPosition(n.row+e,n.column,a);0!==e&&0===t&&o.row===this.lead.row&&(o.column,this.lead.column),this.moveCursorTo(o.row,o.column+t,0===t)},e.prototype.moveCursorToPosition=function(e){this.moveCursorTo(e.row,e.column)},e.prototype.moveCursorTo=function(e,t,a){var n=this.session.getFoldAt(e,t,1);n&&(e=n.start.row,t=n.start.column),this.$keepDesiredColumnOnChange=!0;var s=this.session.getLine(e);/[\uDC00-\uDFFF]/.test(s.charAt(t))&&s.charAt(t-1)&&(this.lead.row==e&&this.lead.column==t+1?t-=1:t+=1),this.lead.setPosition(e,t),this.$keepDesiredColumnOnChange=!1,a||(this.$desiredColumn=null)},e.prototype.moveCursorToScreen=function(e,t,a){var n=this.session.screenToDocumentPosition(e,t);this.moveCursorTo(n.row,n.column,a)},e.prototype.detach=function(){this.lead.detach(),this.anchor.detach()},e.prototype.fromOrientedRange=function(e){this.setSelectionRange(e,e.cursor==e.start),this.$desiredColumn=e.desiredColumn||this.$desiredColumn},e.prototype.toOrientedRange=function(e){var t=this.getRange();return e?(e.start.column=t.start.column,e.start.row=t.start.row,e.end.column=t.end.column,e.end.row=t.end.row):e=t,e.cursor=this.isBackwards()?e.start:e.end,e.desiredColumn=this.$desiredColumn,e},e.prototype.getRangeOfMovements=function(e){var t=this.getCursor();try{e(this);var a=this.getCursor();return l.fromPoints(t,a)}catch(e){return l.fromPoints(t,t)}finally{this.moveCursorToPosition(t)}},e.prototype.toJSON=function(){if(this.rangeCount)var e=this.ranges.map((function(e){var t=e.clone();return t.isBackwards=e.cursor==e.start,t}));else(e=this.getRange()).isBackwards=this.isBackwards();return e},e.prototype.fromJSON=function(e){if(null==e.start){if(this.rangeList&&e.length>1){this.toSingleRange(e[0]);for(var t=e.length;t--;){var a=l.fromPoints(e[t].start,e[t].end);e[t].isBackwards&&(a.cursor=a.start),this.addRange(a,!0)}return}e=e[0]}this.rangeList&&this.toSingleRange(e),this.setSelectionRange(e,e.isBackwards)},e.prototype.isEqual=function(e){if((e.length||this.rangeCount)&&e.length!=this.rangeCount)return!1;if(!e.length||!this.ranges)return this.getRange().isEqual(e);for(var t=this.ranges.length;t--;)if(!this.ranges[t].isEqual(e[t]))return!1;return!0},e}();r.prototype.setSelectionAnchor=r.prototype.setAnchor,r.prototype.getSelectionAnchor=r.prototype.getAnchor,r.prototype.setSelectionRange=r.prototype.setRange,n.implement(r.prototype,o),t.Selection=r})),ace.define("ace/tokenizer",["require","exports","module","ace/lib/report_error"],(function(e,t,a){"use strict";var n=e("./lib/report_error").reportError,s=2e3,o=function(){function e(e){for(var t in this.splitRegex,this.states=e,this.regExps={},this.matchMappings={},this.states){for(var a=this.states[t],n=[],s=0,o=this.matchMappings[t]={defaultToken:"text"},l="g",r=[],i=0;i1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?d=c.regex.replace(/\\([0-9]+)/g,(function(e,t){return"\\"+(parseInt(t,10)+s+1)})):(h=1,d=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||r.push(c)),o[s]=i,s+=h,n.push(d),c.onMatch||(c.onMatch=null)}}n.length||(o[0]=0,n.push("$")),r.forEach((function(e){e.splitRegex=this.createSplitterRegexp(e.regex,l)}),this),this.regExps[t]=new RegExp("("+n.join(")|(")+")|($)",l)}}return e.prototype.$setMaxTokenCount=function(e){s=0|e},e.prototype.$applyToken=function(e){var t=this.splitRegex.exec(e).slice(1),a=this.token.apply(this,t);if("string"==typeof a)return[{type:a,value:e}];for(var n=[],s=0,o=a.length;sd){var f=e.substring(d,v-m.length);g.type==p?g.value+=f:(g.type&&c.push(g),g={type:p,value:f})}for(var b=0;bs){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});d1&&a[0]!==n&&a.unshift("#tmp",n),{tokens:c,state:a.length?a:n}},e}();o.prototype.reportError=n,t.Tokenizer=o})),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/deep_copy"],(function(e,t,a){"use strict";var n,s=e("../lib/deep_copy").deepCopy;(function(){this.addRules=function(e,t){if(t)for(var a in e){for(var n=e[a],s=0;s=this.$rowTokens.length;){if(this.$row+=1,e||(e=this.$session.getLength()),this.$row>=e)return this.$row=e-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},e.prototype.getCurrentTokenRow=function(){return this.$row},e.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,a=e[t].start;if(void 0!==a)return a;for(a=0;t>0;)a+=e[t-=1].value.length;return a},e.prototype.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},e.prototype.getCurrentTokenRange=function(){var e=this.$rowTokens[this.$tokenIndex],t=this.getCurrentTokenColumn();return new n(this.$row,t,this.$row,t+e.value.length)},e}();t.TokenIterator=s})),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],(function(e,t,a){"use strict";var n,s,o=e("../../lib/oop"),l=e("../behaviour").Behaviour,r=e("../../token_iterator").TokenIterator,i=e("../../lib/lang"),c=["text","paren.rparen","rparen","paren","punctuation.operator"],d=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],h={},g={'"':'"',"'":"'"},p=function(e){var t=-1;if(e.multiSelect&&(t=e.selection.index,h.rangeCount!=e.multiSelect.rangeCount&&(h={rangeCount:e.multiSelect.rangeCount})),h[t])return n=h[t];n=h[t]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},u=function(e,t,a,n){var s=e.end.row-e.start.row;return{text:a+t+n,selection:[0,e.start.column+1,s,e.end.column+(s?0:1)]}};(s=function(e){e=e||{},this.add("braces","insertion",(function(t,a,o,l,r){var c=o.getCursorPosition(),d=l.doc.getLine(c.row);if("{"==r){p(o);var h=o.getSelectionRange(),g=l.doc.getTextRange(h),m=l.getTokenAt(c.row,c.column);if(""!==g&&"{"!==g&&o.getWrapBehavioursEnabled())return u(h,g,"{","}");if(m&&/(?:string)\.quasi|\.xml/.test(m.type)){if([/tag\-(?:open|name)/,/attribute\-name/].some((function(e){return e.test(m.type)}))||/(string)\.quasi/.test(m.type)&&"$"!==m.value[c.column-m.start-1])return;return s.recordAutoInsert(o,l,"}"),{text:"{}",selection:[1,1]}}if(s.isSaneInsertion(o,l))return/[\]\}\)]/.test(d[c.column])||o.inMultiSelectMode||e.braces?(s.recordAutoInsert(o,l,"}"),{text:"{}",selection:[1,1]}):(s.recordMaybeInsert(o,l,"{"),{text:"{",selection:[1,1]})}else if("}"==r){if(p(o),"}"==d.substring(c.column,c.column+1)&&null!==l.$findOpeningBracket("}",{column:c.column+1,row:c.row})&&s.isAutoInsertedClosing(c,d,r))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==r||"\r\n"==r){p(o);var v="";if(s.isMaybeInsertedClosing(c,d)&&(v=i.stringRepeat("}",n.maybeInsertedBrackets),s.clearMaybeInsertedClosing()),"}"===d.substring(c.column,c.column+1)){var f=l.findMatchingBracket({row:c.row,column:c.column+1},"}");if(!f)return null;var b=this.$getIndent(l.getLine(f.row))}else{if(!v)return void s.clearMaybeInsertedClosing();b=this.$getIndent(d)}var w=b+l.getTabString();return{text:"\n"+w+"\n"+b+v,selection:[1,w.length,1,w.length]}}s.clearMaybeInsertedClosing()}})),this.add("braces","deletion",(function(e,t,a,s,o){var l=s.doc.getTextRange(o);if(!o.isMultiLine()&&"{"==l){if(p(a),"}"==s.doc.getLine(o.start.row).substring(o.end.column,o.end.column+1))return o.end.column++,o;n.maybeInsertedBrackets--}})),this.add("parens","insertion",(function(e,t,a,n,o){if("("==o){p(a);var l=a.getSelectionRange(),r=n.doc.getTextRange(l);if(""!==r&&a.getWrapBehavioursEnabled())return u(l,r,"(",")");if(s.isSaneInsertion(a,n))return s.recordAutoInsert(a,n,")"),{text:"()",selection:[1,1]}}else if(")"==o){p(a);var i=a.getCursorPosition(),c=n.doc.getLine(i.row);if(")"==c.substring(i.column,i.column+1)&&null!==n.$findOpeningBracket(")",{column:i.column+1,row:i.row})&&s.isAutoInsertedClosing(i,c,o))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("parens","deletion",(function(e,t,a,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"("==o&&(p(a),")"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s})),this.add("brackets","insertion",(function(e,t,a,n,o){if("["==o){p(a);var l=a.getSelectionRange(),r=n.doc.getTextRange(l);if(""!==r&&a.getWrapBehavioursEnabled())return u(l,r,"[","]");if(s.isSaneInsertion(a,n))return s.recordAutoInsert(a,n,"]"),{text:"[]",selection:[1,1]}}else if("]"==o){p(a);var i=a.getCursorPosition(),c=n.doc.getLine(i.row);if("]"==c.substring(i.column,i.column+1)&&null!==n.$findOpeningBracket("]",{column:i.column+1,row:i.row})&&s.isAutoInsertedClosing(i,c,o))return s.popAutoInsertedClosing(),{text:"",selection:[1,1]}}})),this.add("brackets","deletion",(function(e,t,a,n,s){var o=n.doc.getTextRange(s);if(!s.isMultiLine()&&"["==o&&(p(a),"]"==n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)))return s.end.column++,s})),this.add("string_dquotes","insertion",(function(e,t,a,n,s){var o=n.$mode.$quotes||g;if(1==s.length&&o[s]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(s))return;p(a);var l=s,r=a.getSelectionRange(),i=n.doc.getTextRange(r);if(!(""===i||1==i.length&&o[i])&&a.getWrapBehavioursEnabled())return u(r,i,l,l);if(!i){var c=a.getCursorPosition(),d=n.doc.getLine(c.row),h=d.substring(c.column-1,c.column),m=d.substring(c.column,c.column+1),v=n.getTokenAt(c.row,c.column),f=n.getTokenAt(c.row,c.column+1);if("\\"==h&&v&&/escape/.test(v.type))return null;var b,w=v&&/string|escape/.test(v.type),y=!f||/string|escape/.test(f.type);if(m==l)(b=w!==y)&&/string\.end/.test(f.type)&&(b=!1);else{if(w&&!y)return null;if(w&&y)return null;var x=n.$mode.tokenRe;x.lastIndex=0;var k=x.test(h);x.lastIndex=0;var C=x.test(m),M=n.$mode.$pairQuotesAfter;if(!(M&&M[l]&&M[l].test(h))&&k||C)return null;if(m&&!/[\s;,.})\]\\]/.test(m))return null;var z=d[c.column-2];if(h==l&&(z==l||x.test(z)))return null;b=!0}return{text:b?l+l:"",selection:[1,1]}}}})),this.add("string_dquotes","deletion",(function(e,t,a,n,s){var o=n.$mode.$quotes||g,l=n.doc.getTextRange(s);if(!s.isMultiLine()&&o.hasOwnProperty(l)&&(p(a),n.doc.getLine(s.start.row).substring(s.start.column+1,s.start.column+2)==l))return s.end.column++,s})),!1!==e.closeDocComment&&this.add("doc comment end","insertion",(function(e,t,a,n,s){if("doc-start"===e&&("\n"===s||"\r\n"===s)&&a.selection.isEmpty()){var o=a.getCursorPosition();if(0===o.column)return;for(var l=n.doc.getLine(o.row),r=n.doc.getLine(o.row+1),i=n.getTokens(o.row),c=0,d=0;d=o.column){if(c===o.column){if(!/\.doc/.test(h.type))return;if(/\*\//.test(h.value)){var g=i[d+1];if(!g||!/\.doc/.test(g.type))return}}var p=o.column-(c-h.value.length),u=h.value.indexOf("*/"),m=h.value.indexOf("/**",u>-1?u+2:0);if(-1!==m&&p>m&&p=u&&p<=m||!/\.doc/.test(h.type))return;break}}var v=this.$getIndent(l);if(/\s*\*/.test(r))return/^\s*\*/.test(l)?{text:s+v+"* ",selection:[1,2+v.length,1,2+v.length]}:{text:s+v+" * ",selection:[1,3+v.length,1,3+v.length]};if(/\/\*\*/.test(l.substring(0,o.column)))return{text:s+v+" * "+s+" "+v+"*/",selection:[1,4+v.length,1,4+v.length]}}}))}).isSaneInsertion=function(e,t){var a=e.getCursorPosition(),n=new r(t,a.row,a.column);if(!this.$matchTokenType(n.getCurrentToken()||"text",c)){if(/[)}\]]/.test(e.session.getLine(a.row)[a.column]))return!0;var s=new r(t,a.row,a.column+1);if(!this.$matchTokenType(s.getCurrentToken()||"text",c))return!1}return n.stepForward(),n.getCurrentTokenRow()!==a.row||this.$matchTokenType(n.getCurrentToken()||"text",d)},s.$matchTokenType=function(e,t){return t.indexOf(e.type||e)>-1},s.recordAutoInsert=function(e,t,a){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isAutoInsertedClosing(s,o,n.autoInsertedLineEnd[0])||(n.autoInsertedBrackets=0),n.autoInsertedRow=s.row,n.autoInsertedLineEnd=a+o.substr(s.column),n.autoInsertedBrackets++},s.recordMaybeInsert=function(e,t,a){var s=e.getCursorPosition(),o=t.doc.getLine(s.row);this.isMaybeInsertedClosing(s,o)||(n.maybeInsertedBrackets=0),n.maybeInsertedRow=s.row,n.maybeInsertedLineStart=o.substr(0,s.column)+a,n.maybeInsertedLineEnd=o.substr(s.column),n.maybeInsertedBrackets++},s.isAutoInsertedClosing=function(e,t,a){return n.autoInsertedBrackets>0&&e.row===n.autoInsertedRow&&a===n.autoInsertedLineEnd[0]&&t.substr(e.column)===n.autoInsertedLineEnd},s.isMaybeInsertedClosing=function(e,t){return n.maybeInsertedBrackets>0&&e.row===n.maybeInsertedRow&&t.substr(e.column)===n.maybeInsertedLineEnd&&t.substr(0,e.column)==n.maybeInsertedLineStart},s.popAutoInsertedClosing=function(){n.autoInsertedLineEnd=n.autoInsertedLineEnd.substr(1),n.autoInsertedBrackets--},s.clearMaybeInsertedClosing=function(){n&&(n.maybeInsertedBrackets=0,n.maybeInsertedRow=-1)},o.inherits(s,l),t.CstyleBehaviour=s})),ace.define("ace/unicode",["require","exports","module"],(function(e,t,a){"use strict";for(var n=[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],s=0,o=[],l=0;l2?n%i!=i-1:n%i==0})}else{if(!this.blockComment)return!1;var p=this.blockComment.start,u=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+c.escapeRegExp(p)+")"),v=new RegExp("(?:"+c.escapeRegExp(u)+")\\s*$"),f=function(e,t){w(e,t)||o&&!/\S/.test(e)||(s.insertInLine({row:t,column:e.length},u),s.insertInLine({row:t,column:r},p))},b=function(e,t){var a;(a=e.match(v))&&s.removeInLine(t,e.length-a[0].length,e.length),(a=e.match(m))&&s.removeInLine(t,a[1].length,a[0].length)},w=function(e,a){if(m.test(e))return!0;for(var n=t.getTokens(a),s=0;se.length&&(x=e.length)})),r==1/0&&(r=x,o=!1,l=!1),d&&r%i!=0&&(r=Math.floor(r/i)*i),y(l?b:f)},this.toggleBlockComment=function(e,t,a,n){var s=this.blockComment;if(s){!s.start&&s[0]&&(s=s[0]);var o,l,r=(m=new d(t,n.row,n.column)).getCurrentToken(),i=(t.selection,t.selection.toOrientedRange());if(r&&/comment/.test(r.type)){for(var c,g;r&&/comment/.test(r.type);){if(-1!=(v=r.value.indexOf(s.start))){var p=m.getCurrentTokenRow(),u=m.getCurrentTokenColumn()+v;c=new h(p,u,p,u+s.start.length);break}r=m.stepBackward()}var m;for(r=(m=new d(t,n.row,n.column)).getCurrentToken();r&&/comment/.test(r.type);){var v;if(-1!=(v=r.value.indexOf(s.end))){p=m.getCurrentTokenRow(),u=m.getCurrentTokenColumn()+v,g=new h(p,u,p,u+s.end.length);break}r=m.stepForward()}g&&t.remove(g),c&&(t.remove(c),o=c.start.row,l=-s.start.length)}else l=s.start.length,o=a.start.row,t.insert(a.end,s.end),t.insert(a.start,s.start);i.start.row==o&&(i.start.column+=l),i.end.row==o&&(i.end.column+=l),t.selection.fromOrientedRange(i)}},this.getNextLineIndent=function(e,t,a){return this.$getIndent(t)},this.checkOutdent=function(e,t,a){return!1},this.autoOutdent=function(e,t,a){},this.$getIndent=function(e){return e.match(/^\s*/)[0]},this.createWorker=function(e){return null},this.createModeDelegates=function(e){for(var t in this.$embeds=[],this.$modes={},e)if(e[t]){var a=e[t],n=a.prototype.$id,o=s.$modes[n];o||(s.$modes[n]=o=new a),s.$modes[t]||(s.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o}var l=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],r=function(e){var t,a,n;n=(t=i)[a=l[e]],t[l[e]]=function(){return this.$delegator(a,arguments,n)}},i=this;for(t=0;tt[a].column&&a++,o.unshift(a,0),t.splice.apply(t,o),this.$updateRows()}}},e.prototype.$updateRows=function(){var e=this.session.lineWidgets;if(e){var t=!0;e.forEach((function(e,a){if(e)for(t=!1,e.row=a;e.$oldWidget;)e.$oldWidget.row=a,e=e.$oldWidget})),t&&(this.session.lineWidgets=null)}},e.prototype.$registerLineWidget=function(e){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var t=this.session.lineWidgets[e.row];return t&&(e.$oldWidget=t,t.el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1)),this.session.lineWidgets[e.row]=e,e},e.prototype.addLineWidget=function(e){if(this.$registerLineWidget(e),e.session=this.session,!this.editor)return e;var t=this.editor.renderer;e.html&&!e.el&&(e.el=n.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=n.createElement("div"),e.el.textContent=e.text),e.el&&(n.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&n.addCssClass(e.el,e.className),e.el.style.position="absolute",e.el.style.zIndex="5",t.container.appendChild(e.el),e._inDocument=!0,e.coverGutter||(e.el.style.zIndex="3"),null==e.pixelHeight&&(e.pixelHeight=e.el.offsetHeight)),null==e.rowCount&&(e.rowCount=e.pixelHeight/t.layerConfig.lineHeight);var a=this.session.getFoldAt(e.row,0);if(e.$fold=a,a){var s=this.session.lineWidgets;e.row!=a.end.row||s[a.start.row]?e.hidden=!0:s[a.start.row]=e}return this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e),e},e.prototype.removeLineWidget=function(e){if(e._inDocument=!1,e.session=null,e.el&&e.el.parentNode&&e.el.parentNode.removeChild(e.el),e.editor&&e.editor.destroy)try{e.editor.destroy()}catch(e){}if(this.session.lineWidgets){var t=this.session.lineWidgets[e.row];if(t==e)this.session.lineWidgets[e.row]=e.$oldWidget,e.$oldWidget&&this.onWidgetChanged(e.$oldWidget);else for(;t;){if(t.$oldWidget==e){t.$oldWidget=e.$oldWidget;break}t=t.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows()},e.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,a=t&&t[e],n=[];a;)n.push(a),a=a.$oldWidget;return n},e.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},e.prototype.measureWidgets=function(e,t){var a=this.session._changedWidgets,n=t.layerConfig;if(a&&a.length){for(var s=1/0,o=0;o0&&!n[s];)s--;this.firstRow=a.firstRow,this.lastRow=a.lastRow,t.$cursorLayer.config=a;for(var l=s;l<=o;l++){var r=n[l];if(r&&r.el)if(r.hidden)r.el.style.top=-100-(r.pixelHeight||0)+"px";else{r._inDocument||(r._inDocument=!0,t.container.appendChild(r.el));var i=t.$cursorLayer.getPixelPosition({row:l,column:0},!0).top;r.coverLine||(i+=a.lineHeight*this.session.getRowLineCount(r.row)),r.el.style.top=i-a.offset+"px";var c=r.coverGutter?0:t.gutterWidth;r.fixedWidth||(c-=t.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=t.scrollBar.getWidth()+"px":r.el.style.right=""}}}},e}();t.LineWidgets=s})),ace.define("ace/apply_delta",["require","exports","module"],(function(e,t,a){"use strict";t.applyDelta=function(e,t,a){var n=t.start.row,s=t.start.column,o=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=o.substring(0,s)+t.lines[0]+o.substring(s);else{var l=[n,1].concat(t.lines);e.splice.apply(e,l),e[n]=o.substring(0,s)+e[n],e[n+t.lines.length-1]+=o.substring(s)}break;case"remove":var r=t.end.column,i=t.end.row;n===i?e[n]=o.substring(0,s)+o.substring(r):e.splice(n,i-n+1,o.substring(0,s)+e[i].substring(r))}}})),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n=e("./lib/oop"),s=e("./lib/event_emitter").EventEmitter,o=function(){function e(e,t,a){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,a)}return e.prototype.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},e.prototype.getDocument=function(){return this.document},e.prototype.onChange=function(e){if(!(e.start.row==e.end.row&&e.start.row!=this.row||e.start.row>this.row)){var t=function(e,t,a){var n="insert"==e.action,s=(n?1:-1)*(e.end.row-e.start.row),o=(n?1:-1)*(e.end.column-e.start.column),r=e.start,i=n?r:e.end;return l(t,r,a)?{row:t.row,column:t.column}:l(i,t,!a)?{row:t.row+s,column:t.column+(t.row==i.row?o:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,a){var n;if(n=a?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var a={};return e>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):e<0?(a.row=0,a.column=0):(a.row=e,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,t))),t<0&&(a.column=0),a},e}();function l(e,t,a){var n=a?e.column<=t.column:e.column=a&&(e=a-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var a=0;(e=Math.min(Math.max(e,0),this.getLength()))0,n=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof l||(e=l.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var a="insert"==e.action;(a?e.lines.length<=1&&!e.lines[0]:!l.comparePoints(e.start,e.end))||(a&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(s(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row20){a.running=setTimeout(a.$worker,20);break}}a.currentLine=t,-1==n&&(n=t),o<=n&&a.fireUpdateEvent(o,n)}}}return e.prototype.setTokenizer=function(e){this.tokenizer=e,this.lines=[],this.states=[],this.start(0)},e.prototype.setDocument=function(e){this.doc=e,this.lines=[],this.states=[],this.stop()},e.prototype.fireUpdateEvent=function(e,t){var a={first:e,last:t};this._signal("update",{data:a})},e.prototype.start=function(e){this.currentLine=Math.min(e||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},e.prototype.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},e.prototype.$updateOnChange=function(e){var t=e.start.row,a=e.end.row-t;if(0===a)this.lines[t]=null;else if("remove"==e.action)this.lines.splice(t,a+1,null),this.states.splice(t,a+1,null);else{var n=Array(a+1);n.unshift(t,1),this.lines.splice.apply(this.lines,n),this.states.splice.apply(this.states,n)}this.currentLine=Math.min(t,this.currentLine,this.doc.getLength()),this.stop()},e.prototype.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},e.prototype.getTokens=function(e){return this.lines[e]||this.$tokenizeRow(e)},e.prototype.getState=function(e){return this.currentLine==e&&this.$tokenizeRow(e),this.states[e]||"start"},e.prototype.$tokenizeRow=function(e){var t=this.doc.getLine(e),a=this.states[e-1],n=this.tokenizer.getLineTokens(t,a,e);return this.states[e]+""!=n.state+""?(this.states[e]=n.state,this.lines[e+1]=null,this.currentLine>e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=n.tokens},e.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},e}();n.implement(o.prototype,s),t.BackgroundTokenizer=o})),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/range"],(function(e,t,a){"use strict";var n=e("./lib/lang"),s=e("./range").Range,o=function(){function e(e,t,a){void 0===a&&(a="text"),this.setRegexp(e),this.clazz=t,this.type=a,this.docLen=0}return e.prototype.setRegexp=function(e){this.regExp+""!=e+""&&(this.regExp=e,this.cache=[])},e.prototype.update=function(e,t,a,o){if(this.regExp){for(var l=o.firstRow,r=o.lastRow,i={},c=a.$editor.$search,d=c.$isMultilineSearch(a.$editor.getLastSearchOptions()),h=l;h<=r;h++){var g=this.cache[h];if(null==g||a.getValue().length!=this.docLen){if(d){g=[];var p=c.$multiLineForward(a,this.regExp,h,r);if(p){var u=p.endRow<=r?p.endRow-1:r;u>h&&(h=u),g.push(new s(p.startRow,p.startCol,p.endRow,p.endCol))}g.length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES))}else(g=n.getMatchOffsets(a.getLine(h),this.regExp)).length>this.MAX_RANGES&&(g=g.slice(0,this.MAX_RANGES)),g=g.map((function(e){return new s(h,e.offset,h,e.offset+e.length)}));this.cache[h]=g.length?g:""}if(0!==g.length)for(var m=g.length;m--;){var v=g[m].toScreenRange(a),f=v.toString();i[f]||(i[f]=!0,t.drawSingleLineMarker(e,v,this.clazz,o))}}this.docLen=a.getValue().length}},e}();o.prototype.MAX_RANGES=500,t.SearchHighlight=o})),ace.define("ace/undomanager",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var n=function(){function e(){this.$keepRedoStack,this.$maxRev=0,this.$fromUndo=!1,this.$undoDepth=1/0,this.reset()}return e.prototype.addSession=function(e){this.$session=e},e.prototype.add=function(e,t,a){if(!this.$fromUndo&&e!=this.$lastDelta){if(this.$keepRedoStack||(this.$redoStack.length=0),!1===t||!this.lastDeltas){this.lastDeltas=[];var n=this.$undoStack.length;n>this.$undoDepth-1&&this.$undoStack.splice(0,n-this.$undoDepth+1),this.$undoStack.push(this.lastDeltas),e.id=this.$rev=++this.$maxRev}"remove"!=e.action&&"insert"!=e.action||(this.$lastDelta=e),this.lastDeltas.push(e)}},e.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},e.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},e.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var a=this.$undoStack,n=a.length;n--;){var s=a[n][0];if(s.id<=e)break;s.id0},e.prototype.canRedo=function(){return this.$redoStack.length>0},e.prototype.bookmark=function(e){null==e&&(e=this.$rev),this.mark=e},e.prototype.isAtBookmark=function(){return this.$rev===this.mark},e.prototype.toJSON=function(){return{$redoStack:this.$redoStack,$undoStack:this.$undoStack}},e.prototype.fromJSON=function(e){this.reset(),this.$undoStack=e.$undoStack,this.$redoStack=e.$redoStack},e.prototype.$prettyPrint=function(e){return e?r(e):r(this.$undoStack)+"\n---\n"+r(this.$redoStack)},e}();n.prototype.hasUndo=n.prototype.canUndo,n.prototype.hasRedo=n.prototype.canRedo,n.prototype.isClean=n.prototype.isAtBookmark,n.prototype.markClean=n.prototype.bookmark;var s=e("./range").Range,o=s.comparePoints;function l(e){return{row:e.row,column:e.column}}function r(e){if(e=e||this,Array.isArray(e))return e.map(r).join("\n");var t="";return e.action?(t="insert"==e.action?"+":"-",t+="["+e.lines+"]"):e.value&&(t=Array.isArray(e.value)?e.value.map(i).join("\n"):i(e.value)),e.start&&(t+=i(e)),(e.id||e.rev)&&(t+="\t("+(e.id||e.rev)+")"),t}function i(e){return e.start.row+":"+e.start.column+"=>"+e.end.row+":"+e.end.column}function c(e,t){var a="insert"==e.action,n="insert"==t.action;if(a&&n)if(o(t.start,e.end)>=0)g(t,e,-1);else{if(!(o(t.start,e.start)<=0))return null;g(e,t,1)}else if(a&&!n)if(o(t.start,e.end)>=0)g(t,e,-1);else{if(!(o(t.end,e.start)<=0))return null;g(e,t,-1)}else if(!a&&n)if(o(t.start,e.start)>=0)g(t,e,1);else{if(!(o(t.start,e.start)<=0))return null;g(e,t,1)}else if(!a&&!n)if(o(t.start,e.start)>=0)g(t,e,1);else{if(!(o(t.end,e.start)<=0))return null;g(e,t,-1)}return[t,e]}function d(e,t){for(var a=e.length;a--;)for(var n=0;n=0?g(e,t,-1):(o(e.start,t.start)<=0||g(e,s.fromPoints(t.start,e.start),-1),g(t,e,1));else if(!a&&n)o(t.start,e.end)>=0?g(t,e,-1):(o(t.start,e.start)<=0||g(t,s.fromPoints(e.start,t.start),-1),g(e,t,1));else if(!a&&!n)if(o(t.start,e.end)>=0)g(t,e,-1);else{var l,r;if(!(o(t.end,e.start)<=0))return o(e.start,t.start)<0&&(l=e,e=u(e,t.start)),o(e.end,t.end)>0&&(r=u(e,t.end)),p(t.end,e.start,e.end,-1),r&&!l&&(e.lines=r.lines,e.start=r.start,e.end=r.end,r=e),[t,l,r].filter(Boolean);g(e,t,-1)}return[t,e]}function g(e,t,a){p(e.start,t.start,t.end,a),p(e.end,t.start,t.end,a)}function p(e,t,a,n){e.row==(1==n?t:a).row&&(e.column+=n*(a.column-t.column)),e.row+=n*(a.row-t.row)}function u(e,t){var a=e.lines,n=e.end;e.end=l(t);var s=e.end.row-e.start.row,o=a.splice(s,a.length),r=s?t.column:t.column-e.start.column;return a.push(o[0].substring(0,r)),o[0]=o[0].substr(r),{start:l(t),end:n,lines:o,action:e.action}}function m(e,t){t=function(e){return{start:l(e.start),end:l(e.end),action:e.action,lines:e.lines.slice()}}(t);for(var a=e.length;a--;){for(var n=e[a],s=0;sthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(e),this.folds.sort((function(e,t){return-e.range.compareEnd(t.start.row,t.start.column)})),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}else if(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},e.prototype.containsRow=function(e){return e>=this.start.row&&e<=this.end.row},e.prototype.walk=function(e,t,a){var n,s,o=0,l=this.folds,r=!0;null==t&&(t=this.end.row,a=this.end.column);for(var i=0;i0)){var i=n(e,l.start);return 0===r?t&&0!==i?-o-2:o:i>0||0===i&&!t?o:-o-1}}return-o-1},e.prototype.add=function(e){var t=!e.isEmpty(),a=this.pointIndex(e.start,t);a<0&&(a=-a-1);var n=this.pointIndex(e.end,t,a);return n<0?n=-n-1:n++,this.ranges.splice(a,n-a,e)},e.prototype.addList=function(e){for(var t=[],a=e.length;a--;)t.push.apply(t,this.add(e[a]));return t},e.prototype.substractPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges.splice(t,1)},e.prototype.merge=function(){for(var e,t=[],a=this.ranges,s=(a=a.sort((function(e,t){return n(e.start,t.start)})))[0],o=1;o=0},e.prototype.containsPoint=function(e){return this.pointIndex(e)>=0},e.prototype.rangeAtPoint=function(e){var t=this.pointIndex(e);if(t>=0)return this.ranges[t]},e.prototype.clipRows=function(e,t){var a=this.ranges;if(a[0].start.row>t||a[a.length-1].start.row=n);l++);if("insert"==e.action){for(var i=s-n,c=-t.column+a.column;ln);l++)if(d.start.row==n&&d.start.column>=t.column&&(d.start.column==t.column&&this.$bias<=0||(d.start.column+=c,d.start.row+=i)),d.end.row==n&&d.end.column>=t.column){if(d.end.column==t.column&&this.$bias<0)continue;d.end.column==t.column&&c>0&&ld.start.column&&d.end.column==o[l+1].start.column&&(d.end.column-=c),d.end.column+=c,d.end.row+=i}}else for(i=n-s,c=t.column-a.column;ls);l++)d.end.rowt.column)&&(d.end.column=t.column,d.end.row=t.row):(d.end.column+=c,d.end.row+=i):d.end.row>s&&(d.end.row+=i),d.start.rowt.column)&&(d.start.column=t.column,d.start.row=t.row):(d.start.column+=c,d.start.row+=i):d.start.row>s&&(d.start.row+=i);if(0!=i&&l=e)return s;if(s.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var a=this.$foldData,n=0;for(t&&(n=a.indexOf(t)),-1==n&&(n=0);n=e)return s}return null},this.getFoldedRowCount=function(e,t){for(var a=this.$foldData,n=t-e+1,s=0;s=t){r=e?n-=t-r:n=0);break}l>=e&&(n-=r>=e?l-r:l-e+1)}return n},this.$addFoldLine=function(e){return this.$foldData.push(e),this.$foldData.sort((function(e,t){return e.start.row-t.start.row})),e},this.addFold=function(e,t){var a,n=this.$foldData,l=!1;e instanceof o?a=e:(a=new o(t,e)).collapseChildren=t.collapseChildren,this.$clipRangeToDocument(a.range);var r=a.start.row,i=a.start.column,c=a.end.row,d=a.end.column,h=this.getFoldAt(r,i,1),g=this.getFoldAt(c,d,-1);if(h&&g==h)return h.addSubFold(a);h&&!h.range.isStart(r,i)&&this.removeFold(h),g&&!g.range.isEnd(c,d)&&this.removeFold(g);var p=this.getFoldsInRange(a.range);p.length>0&&(this.removeFolds(p),a.collapseChildren||p.forEach((function(e){a.addSubFold(e)})));for(var u=0;u0&&this.foldAll(e.start.row+1,e.end.row,e.collapseChildren-1),e.subFolds=[]},this.expandFolds=function(e){e.forEach((function(e){this.expandFold(e)}),this)},this.unfold=function(e,t){var a,s;if(null==e)a=new n(0,0,this.getLength(),0),null==t&&(t=!0);else if("number"==typeof e)a=new n(e,0,e,this.getLine(e).length);else if("row"in e)a=n.fromPoints(e,e);else{if(Array.isArray(e))return s=[],e.forEach((function(e){s=s.concat(this.unfold(e))}),this),s;a=e}for(var o=s=this.getFoldsInRangeList(a);1==s.length&&n.comparePoints(s[0].start,a.start)<0&&n.comparePoints(s[0].end,a.end)>0;)this.expandFolds(s),s=this.getFoldsInRangeList(a);if(0!=t?this.removeFolds(s):this.expandFolds(s),o.length)return o},this.isRowFolded=function(e,t){return!!this.getFoldLine(e,t)},this.getRowFoldEnd=function(e,t){var a=this.getFoldLine(e,t);return a?a.end.row:e},this.getRowFoldStart=function(e,t){var a=this.getFoldLine(e,t);return a?a.start.row:e},this.getFoldDisplayLine=function(e,t,a,n,s){null==n&&(n=e.start.row),null==s&&(s=0),null==t&&(t=e.end.row),null==a&&(a=this.getLine(t).length);var o=this.doc,l="";return e.walk((function(e,t,a,r){if(!(th)break}while(o&&i.test(o.type));o=s.stepBackward()}else o=s.getCurrentToken();return c.end.row=s.getCurrentTokenRow(),c.end.column=s.getCurrentTokenColumn(),c}},this.foldAll=function(e,t,a,n){null==a&&(a=1e5);var s=this.foldWidgets;if(s){t=t||this.getLength();for(var o=e=e||0;o=e&&(o=l.end.row,l.collapseChildren=a,this.addFold("...",l))}}},this.foldToLevel=function(e){for(this.foldAll();e-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var e=this;this.foldAll(null,null,null,(function(t){for(var a=e.getTokens(t),n=0;n=0;){var o=a[s];if(null==o&&(o=a[s]=this.getFoldWidget(s)),"start"==o){var l=this.getFoldWidgetRange(s);if(n||(n=l),l&&l.end.row>=e)break}s--}return{range:-1!==s&&l,firstRange:n}},this.onFoldWidgetClick=function(e,t){t instanceof r&&(t=t.domEvent);var a={children:t.shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};if(!this.$toggleFoldWidget(e,a)){var n=t.target||t.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(e,t){if(this.getFoldWidget){var a=this.getFoldWidget(e),n=this.getLine(e),s="end"===a?-1:1,o=this.getFoldAt(e,-1===s?0:n.length,s);if(o)return t.children||t.all?this.removeFold(o):this.expandFold(o),o;var l=this.getFoldWidgetRange(e,!0);if(l&&!l.isMultiLine()&&(o=this.getFoldAt(l.start.row,l.start.column,1))&&l.isEqual(o.range))return this.removeFold(o),o;if(t.siblings){var r=this.getParentFoldRangeData(e);if(r.range)var i=r.range.start.row+1,c=r.range.end.row;this.foldAll(i,c,t.all?1e4:0)}else t.children?(c=l?l.end.row:this.getLength(),this.foldAll(e+1,c,t.all?1e4:0)):l&&(t.all&&(l.collapseChildren=1e4),this.addFold("...",l));return l}},this.toggleFoldWidget=function(e){var t=this.selection.getCursor().row;t=this.getRowFoldStart(t);var a=this.$toggleFoldWidget(t,{});if(!a){var n=this.getParentFoldRangeData(t,!0);if(a=n.range||n.firstRange){t=a.start.row;var s=this.getFoldAt(t,this.getLine(t).length,1);s?this.removeFold(s):this.addFold("...",a)}}},this.updateFoldWidgets=function(e){var t=e.start.row,a=e.end.row-t;if(0===a)this.foldWidgets[t]=null;else if("remove"==e.action)this.foldWidgets.splice(t,a+1,null);else{var n=Array(a+1);n.unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,n)}},this.tokenizerUpdateFoldWidgets=function(e){var t=e.data;t.first!=t.last&&this.foldWidgets.length>t.first&&this.foldWidgets.splice(t.first,this.foldWidgets.length)}}})),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],(function(e,t,a){"use strict";var n=e("../token_iterator").TokenIterator,s=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){if(0==e.column)return null;var a=t||this.getLine(e.row).charAt(e.column-1);if(""==a)return null;var n=a.match(/([\(\[\{])|([\)\]\}])/);return n?n[1]?this.$findClosingBracket(n[1],e):this.$findOpeningBracket(n[2],e):null},this.getBracketRange=function(e){var t,a=this.getLine(e.row),n=!0,o=a.charAt(e.column-1),l=o&&o.match(/([\(\[\{])|([\)\]\}])/);if(l||(o=a.charAt(e.column),e={row:e.row,column:e.column+1},l=o&&o.match(/([\(\[\{])|([\)\]\}])/),n=!1),!l)return null;if(l[1]){if(!(r=this.$findClosingBracket(l[1],e)))return null;t=s.fromPoints(e,r),n||(t.end.column++,t.start.column--),t.cursor=t.end}else{var r;if(!(r=this.$findOpeningBracket(l[2],e)))return null;t=s.fromPoints(r,e),n||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var a=this.getLine(e.row),n=/([\(\[\{])|([\)\]\}])/,o=!t&&a.charAt(e.column-1),l=o&&o.match(n);if(l||(o=(void 0===t||t)&&a.charAt(e.column),e={row:e.row,column:e.column+1},l=o&&o.match(n)),!l)return null;var r=new s(e.row,e.column-1,e.row,e.column),i=l[1]?this.$findClosingBracket(l[1],e):this.$findOpeningBracket(l[2],e);return i?[r,new s(i.row,i.column,i.row,i.column+1)]:[r]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,a){var s=this.$brackets[e],o=1,l=new n(this,t.row,t.column),r=l.getCurrentToken();if(r||(r=l.stepForward()),r){a||(a=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+"));for(var i=t.column-l.getCurrentTokenColumn()-2,c=r.value;;){for(;i>=0;){var d=c.charAt(i);if(d==s){if(0==(o-=1))return{row:l.getCurrentTokenRow(),column:i+l.getCurrentTokenColumn()}}else d==e&&(o+=1);i-=1}do{r=l.stepBackward()}while(r&&!a.test(r.type));if(null==r)break;i=(c=r.value).length-1}return null}},this.$findClosingBracket=function(e,t,a){var s=this.$brackets[e],o=1,l=new n(this,t.row,t.column),r=l.getCurrentToken();if(r||(r=l.stepForward()),r){a||(a=new RegExp("(\\.?"+r.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+"));for(var i=t.column-l.getCurrentTokenColumn();;){for(var c=r.value,d=c.length;i"===t.value?n=!0:-1!==t.type.indexOf("tag-name")&&(a=!0))}while(t&&!a);return t},this.$findClosingTag=function(e,t){var a,n=t.value,o=t.value,l=0,r=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);t=e.stepForward();var i=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length),c=!1;do{if(-1!==(a=t).type.indexOf("tag-close")&&!c){var d=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);c=!0}if(t=e.stepForward())if(">"!==t.value||c||(d=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),c=!0),-1!==t.type.indexOf("tag-name")){if(o===(n=t.value))if("<"===a.value)l++;else if(""!==t.value)return;var p=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else o===n&&"/>"===t.value&&--l<0&&(p=g=h=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),d=new s(i.end.row,i.end.column,i.end.row,i.end.column+1))}while(t&&l>=0);if(r&&d&&h&&p&&i&&g)return{openTag:new s(r.start.row,r.start.column,d.end.row,d.end.column),closeTag:new s(h.start.row,h.start.column,p.end.row,p.end.column),openTagName:i,closeTagName:g}},this.$findOpeningTag=function(e,t){var a=e.getCurrentToken(),n=t.value,o=0,l=e.getCurrentTokenRow(),r=e.getCurrentTokenColumn(),i=r+2,c=new s(l,r,l,i);e.stepForward();var d=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length);if(-1===t.type.indexOf("tag-close")&&(t=e.stepForward()),t&&">"===t.value){var h=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=a,l=e.getCurrentTokenRow(),i=(r=e.getCurrentTokenColumn())+t.value.length,a=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(n===t.value)if("<"===a.value){if(++o>0){var g=new s(l,r,l,i),p=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);do{t=e.stepForward()}while(t&&">"!==t.value);var u=new s(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var m=0,v=a;v;){if(-1!==v.type.indexOf("tag-name")&&v.value===n){o--;break}if("<"===v.value)break;v=e.stepBackward(),m++}for(var f=0;fa&&(this.$docRowCache.splice(a,t),this.$screenRowCache.splice(a,t))},e.prototype.$getRowCacheIndex=function(e,t){for(var a=0,n=e.length-1;a<=n;){var s=a+n>>1,o=e[s];if(t>o)a=s+1;else{if(!(t=t);o++);return(a=n[o])?(a.index=o,a.start=s-a.value.length,a):null},e.prototype.setUndoManager=function(e){if(this.$undoManager=e,this.$informUndoManager&&this.$informUndoManager.cancel(),e){var t=this;e.addSession(this),this.$syncInformUndoManager=function(){t.$informUndoManager.cancel(),t.mergeUndoDeltas=!1},this.$informUndoManager=s.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},e.prototype.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},e.prototype.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},e.prototype.getTabString=function(){return this.getUseSoftTabs()?s.stringRepeat(" ",this.getTabSize()):"\t"},e.prototype.setUseSoftTabs=function(e){this.setOption("useSoftTabs",e)},e.prototype.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},e.prototype.setTabSize=function(e){this.setOption("tabSize",e)},e.prototype.getTabSize=function(){return this.$tabSize},e.prototype.isTabStop=function(e){return this.$useSoftTabs&&e.column%this.$tabSize==0},e.prototype.setNavigateWithinSoftTabs=function(e){this.setOption("navigateWithinSoftTabs",e)},e.prototype.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},e.prototype.setOverwrite=function(e){this.setOption("overwrite",e)},e.prototype.getOverwrite=function(){return this.$overwrite},e.prototype.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},e.prototype.addGutterDecoration=function(e,t){this.$decorations[e]||(this.$decorations[e]=""),this.$decorations[e]+=" "+t,this._signal("changeBreakpoint",{})},e.prototype.removeGutterDecoration=function(e,t){this.$decorations[e]=(this.$decorations[e]||"").replace(" "+t,""),this._signal("changeBreakpoint",{})},e.prototype.getBreakpoints=function(){return this.$breakpoints},e.prototype.setBreakpoints=function(e){this.$breakpoints=[];for(var t=0;t0&&(n=!!a.charAt(t-1).match(this.tokenRe)),n||(n=!!a.charAt(t).match(this.tokenRe)),n)var s=this.tokenRe;else s=/^\s+$/.test(a.slice(t-1,t+1))?/\s/:this.nonTokenRe;var o=t;if(o>0){do{o--}while(o>=0&&a.charAt(o).match(s));o++}for(var l=t;le&&(e=t.screenWidth)})),this.lineWidgetWidth=e},e.prototype.$computeWidth=function(e){if(this.$modified||e){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var t=this.doc.getAllLines(),a=this.$rowLengthCache,n=0,s=0,o=this.$foldData[s],l=o?o.start.row:1/0,r=t.length,i=0;il){if((i=o.end.row+1)>=r)break;l=(o=this.$foldData[s++])?o.start.row:1/0}null==a[i]&&(a[i]=this.$getStringScreenWidth(t[i])[0]),a[i]>n&&(n=a[i])}this.screenWidth=n}},e.prototype.getLine=function(e){return this.doc.getLine(e)},e.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},e.prototype.getLength=function(){return this.doc.getLength()},e.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},e.prototype.insert=function(e,t){return this.doc.insert(e,t)},e.prototype.remove=function(e){return this.doc.remove(e)},e.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},e.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var a=e.length-1;-1!=a;a--){var n=e[a];"insert"==n.action||"remove"==n.action?this.doc.revertDelta(n):n.folds&&this.addFolds(n.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},e.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var a=0;ae.end.column&&(o.start.column+=c),o.end.row==e.end.row&&o.end.column>e.end.column&&(o.end.column+=c)),l&&o.start.row>=e.end.row&&(o.start.row+=l,o.end.row+=l)}if(o.end=this.insert(o.start,n),s.length){var r=e.start,i=o.start,c=(l=i.row-r.row,i.column-r.column);this.addFolds(s.map((function(e){return(e=e.clone()).start.row==r.row&&(e.start.column+=c),e.end.row==r.row&&(e.end.column+=c),e.start.row+=l,e.end.row+=l,e})))}return o},e.prototype.indentRows=function(e,t,a){a=a.replace(/\t/g,this.getTabString());for(var n=e;n<=t;n++)this.doc.insertInLine({row:n,column:0},a)},e.prototype.outdentRows=function(e){for(var t=e.collapseRows(),a=new d(0,0,0,0),n=this.getTabSize(),s=t.start.row;s<=t.end.row;++s){var o=this.getLine(s);a.start.row=s,a.end.row=s;for(var l=0;l0){var s;if((s=this.getRowFoldEnd(t+a))>this.doc.getLength()-1)return 0;n=s-t}else e=this.$clipRowToDocument(e),n=(t=this.$clipRowToDocument(t))-e+1;var o=new d(e,0,t,Number.MAX_VALUE),l=this.getFoldsInRange(o).map((function(e){return(e=e.clone()).start.row+=n,e.end.row+=n,e})),r=0==a?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+n,r),l.length&&this.addFolds(l),n},e.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},e.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},e.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},e.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},e.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},e.prototype.$clipPositionToDocument=function(e,t){if(t=Math.max(0,t),e<0)e=0,t=0;else{var a=this.doc.getLength();e>=a?(e=a-1,t=this.doc.getLine(a-1).length):t=Math.min(this.doc.getLine(e).length,t)}return{row:e,column:t}},e.prototype.$clipRangeToDocument=function(e){e.start.row<0?(e.start.row=0,e.start.column=0):e.start.column=this.$clipColumnToRow(e.start.row,e.start.column);var t=this.doc.getLength()-1;return e.end.row>t?(e.end.row=t,e.end.column=this.doc.getLine(t).length):e.end.column=this.$clipColumnToRow(e.end.row,e.end.column),e},e.prototype.setUseWrapMode=function(e){if(e!=this.$useWrapMode){if(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e){var t=this.getLength();this.$wrapData=Array(t),this.$updateWrapData(0,t-1)}this._signal("changeWrapMode")}},e.prototype.getUseWrapMode=function(){return this.$useWrapMode},e.prototype.setWrapLimitRange=function(e,t){this.$wrapLimitRange.min===e&&this.$wrapLimitRange.max===t||(this.$wrapLimitRange={min:e,max:t},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},e.prototype.adjustWrapLimit=function(e,t){var a=this.$wrapLimitRange;a.max<0&&(a={min:t,max:t});var n=this.$constrainWrapLimit(e,a.min,a.max);return n!=this.$wrapLimit&&n>1&&(this.$wrapLimit=n,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},e.prototype.$constrainWrapLimit=function(e,t,a){return t&&(e=Math.max(t,e)),a&&(e=Math.min(a,e)),e},e.prototype.getWrapLimit=function(){return this.$wrapLimit},e.prototype.setWrapLimit=function(e){this.setWrapLimitRange(e,e)},e.prototype.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},e.prototype.$updateInternalDataOnChange=function(e){var t=this.$useWrapMode,a=e.action,n=e.start,s=e.end,o=n.row,l=s.row,r=l-o,i=null;if(this.$updating=!0,0!=r)if("remove"===a){this[t?"$wrapData":"$rowLengthCache"].splice(o,r);var c=this.$foldData;i=this.getFoldsInRange(e),this.removeFolds(i);var d=0;if(m=this.getFoldLine(s.row)){m.addRemoveChars(s.row,s.column,n.column-s.column),m.shiftRow(-r);var h=this.getFoldLine(o);h&&h!==m&&(h.merge(m),m=h),d=c.indexOf(m)+1}for(;d=s.row&&m.shiftRow(-r);l=o}else{var g=Array(r);g.unshift(o,0);var p=t?this.$wrapData:this.$rowLengthCache;if(p.splice.apply(p,g),c=this.$foldData,d=0,m=this.getFoldLine(o)){var u=m.range.compareInside(n.row,n.column);0==u?(m=m.split(n.row,n.column))&&(m.shiftRow(r),m.addRemoveChars(l,0,s.column-n.column)):-1==u&&(m.addRemoveChars(o,0,s.column-n.column),m.shiftRow(r)),d=c.indexOf(m)+1}for(;d=o&&m.shiftRow(r)}}else r=Math.abs(e.start.column-e.end.column),"remove"===a&&(i=this.getFoldsInRange(e),this.removeFolds(i),r=-r),(m=this.getFoldLine(o))&&m.addRemoveChars(o,n.column,r);return t&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,t?this.$updateWrapData(o,l):this.$updateRowLengthCache(o,l),i},e.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},e.prototype.$updateWrapData=function(e,t){var a,n,s=this.doc.getAllLines(),o=this.getTabSize(),l=this.$wrapData,r=this.$wrapLimit,i=e;for(t=Math.min(t,s.length-1);i<=t;)(n=this.getFoldLine(i,n))?(a=[],n.walk(function(e,t,n,o){var l;if(null!=e){(l=this.$getDisplayTokens(e,a.length))[0]=w;for(var r=1;rt-h;){var g=o+t-h;if(e[g-1]>=k&&e[g]>=k)d(g);else if(e[g]!=w&&e[g]!=y){for(var p=Math.max(g-(t-(t>>2)),o-1);g>p&&e[g]p&&e[g]p&&e[g]==x;)g--}else for(;g>p&&e[g]p?d(++g):(e[g=o+t]==b&&g--,d(g-h))}else{for(;g!=o-1&&e[g]!=w;g--);if(g>o){d(g);continue}for(g=o+t;g39&&o<48||o>57&&o<64?n.push(x):o>=4352&&z(o)?n.push(f,b):n.push(f)}return n},e.prototype.$getStringScreenWidth=function(e,t,a){if(0==t)return[0,0];var n,s;for(null==t&&(t=1/0),a=a||0,s=0;s=4352&&z(n)?a+=2:a+=1,!(a>t));s++);return[a,s]},e.prototype.getRowLength=function(e){var t=1;return this.lineWidgets&&(t+=this.lineWidgets[e]&&this.lineWidgets[e].rowCount||0),this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+t:t},e.prototype.getRowLineCount=function(e){return this.$useWrapMode&&this.$wrapData[e]?this.$wrapData[e].length+1:1},e.prototype.getRowWrapIndent=function(e){if(this.$useWrapMode){var t=this.screenToDocumentPosition(e,Number.MAX_VALUE),a=this.$wrapData[t.row];return a.length&&a[0]=0){r=c[d],o=this.$docRowCache[d];var g=e>c[h-1]}else g=!h;for(var p=this.getLength()-1,u=this.getNextFoldLine(o),m=u?u.start.row:1/0;r<=e&&!(r+(i=this.getRowLength(o))>e||o>=p);)r+=i,++o>m&&(o=u.end.row+1,m=(u=this.getNextFoldLine(o,u))?u.start.row:1/0),g&&(this.$docRowCache.push(o),this.$screenRowCache.push(r));if(u&&u.start.row<=o)n=this.getFoldDisplayLine(u),o=u.start.row;else{if(r+i<=e||o>p)return{row:p,column:this.getLine(p).length};n=this.getLine(o),u=null}var v=0,f=Math.floor(e-r);if(this.$useWrapMode){var b=this.$wrapData[o];b&&(s=b[f],f>0&&b.length&&(v=b.indent,l=b[f-1]||b[b.length-1],n=n.substring(l)))}return void 0!==a&&this.$bidiHandler.isBidiRow(r+f,o,f)&&(t=this.$bidiHandler.offsetToCol(a)),l+=this.$getStringScreenWidth(n,t-v)[1],this.$useWrapMode&&l>=s&&(l=s-1),u?u.idxToPosition(l):{row:o,column:l}},e.prototype.documentToScreenPosition=function(e,t){if(void 0===t)var a=this.$clipPositionToDocument(e.row,e.column);else a=this.$clipPositionToDocument(e,t);e=a.row,t=a.column;var n,s=0,o=null;(n=this.getFoldAt(e,t,1))&&(e=n.start.row,t=n.start.column);var l,r=0,i=this.$docRowCache,c=this.$getRowCacheIndex(i,e),d=i.length;if(d&&c>=0){r=i[c],s=this.$screenRowCache[c];var h=e>i[d-1]}else h=!d;for(var g=this.getNextFoldLine(r),p=g?g.start.row:1/0;r=p){if((l=g.end.row+1)>e)break;p=(g=this.getNextFoldLine(l,g))?g.start.row:1/0}else l=r+1;s+=this.getRowLength(r),r=l,h&&(this.$docRowCache.push(r),this.$screenRowCache.push(s))}var u="";g&&r>=p?(u=this.getFoldDisplayLine(g,e,t),o=g.start.row):(u=this.getLine(e).substring(0,t),o=e);var m=0;if(this.$useWrapMode){var v=this.$wrapData[o];if(v){for(var f=0;u.length>=v[f];)s++,f++;u=u.substring(v[f-1]||0,u.length),m=f>0?v.indent:0}}return this.lineWidgets&&this.lineWidgets[r]&&this.lineWidgets[r].rowsAbove&&(s+=this.lineWidgets[r].rowsAbove),{row:s,column:m+this.$getStringScreenWidth(u)[0]}},e.prototype.documentToScreenColumn=function(e,t){return this.documentToScreenPosition(e,t).column},e.prototype.documentToScreenRow=function(e,t){return this.documentToScreenPosition(e,t).row},e.prototype.getScreenLength=function(){var e=0,t=null;if(this.$useWrapMode)for(var a=this.$wrapData.length,n=0,s=(r=0,(t=this.$foldData[r++])?t.start.row:1/0);ns&&(n=t.end.row+1,s=(t=this.$foldData[r++])?t.start.row:1/0)}else{e=this.getLength();for(var l=this.$foldData,r=0;ra);o++);return[n,o]})},e.prototype.getPrecedingCharacter=function(){var e=this.selection.getCursor();return 0===e.column?0===e.row?"":this.doc.getNewLineCharacter():this.getLine(e.row)[e.column-1]},e.prototype.destroy=function(){this.destroyed||(this.bgTokenizer.setDocument(null),this.bgTokenizer.cleanup(),this.destroyed=!0),this.endOperation(),this.$stopWorker(),this.removeAllListeners(),this.doc&&this.doc.off("change",this.$onChange),this.selection&&(this.selection.off("changeCursor",this.$onSelectionChange),this.selection.off("changeSelection",this.$onSelectionChange)),this.selection.detach()},e}();v.$uid=0,v.prototype.$modes=l.$modes,v.prototype.getValue=v.prototype.toString,v.prototype.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},v.prototype.$overwrite=!1,v.prototype.$mode=null,v.prototype.$modeId=null,v.prototype.$scrollTop=0,v.prototype.$scrollLeft=0,v.prototype.$wrapLimit=80,v.prototype.$useWrapMode=!1,v.prototype.$wrapLimitRange={min:null,max:null},v.prototype.lineWidgets=null,v.prototype.isFullWidth=z,n.implement(v.prototype,r);var f=1,b=2,w=3,y=4,x=9,k=10,C=11,M=12;function z(e){return!(e<4352)&&(e>=4352&&e<=4447||e>=4515&&e<=4519||e>=4602&&e<=4607||e>=9001&&e<=9002||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12283||e>=12288&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12589||e>=12593&&e<=12686||e>=12688&&e<=12730||e>=12736&&e<=12771||e>=12784&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=13054||e>=13056&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=55216&&e<=55238||e>=55243&&e<=55291||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=65281&&e<=65376||e>=65504&&e<=65510)}e("./edit_session/folding").Folding.call(v.prototype),e("./edit_session/bracket_match").BracketMatch.call(v.prototype),l.defineOptions(v.prototype,"session",{wrap:{set:function(e){if(e&&"off"!=e?"free"==e?e=!0:"printMargin"==e?e=-1:"string"==typeof e&&(e=parseInt(e,10)||!1):e=!1,this.$wrap!=e)if(this.$wrap=e,e){var t="number"==typeof e?e:null;this.setWrapLimitRange(t,t),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(e){(e="auto"==e?"text"!=this.$mode.type:"text"!=e)!=this.$wrapAsCode&&(this.$wrapAsCode=e,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(e){this.$useWorker=e,this.$stopWorker(),e&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(e){(e=parseInt(e))>0&&this.$tabSize!==e&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=e,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(e){this.setFoldStyle(e)},handlesSet:!0},overwrite:{set:function(e){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(e){this.doc.setNewLineMode(e)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(e){this.setMode(e)},get:function(){return this.$modeId},handlesSet:!0}}),t.EditSession=v})),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],(function(e,t,a){"use strict";var n=e("./lib/lang"),s=e("./lib/oop"),o=e("./range").Range,l=function(){function e(){this.$options={}}return e.prototype.set=function(e){return s.mixin(this.$options,e),this},e.prototype.getOptions=function(){return n.copyObject(this.$options)},e.prototype.setOptions=function(e){this.$options=e},e.prototype.find=function(e){var t=this.$options,a=this.$matchIterator(e,t);if(!a)return!1;var n=null;return a.forEach((function(e,a,s,l){return n=new o(e,a,s,l),!(a==l&&t.start&&t.start.start&&0!=t.skipCurrent&&n.isEqual(t.start)&&(n=null,1))})),n},e.prototype.findAll=function(e){var t=this.$options;if(!t.needle)return[];this.$assembleRegExp(t);var a=t.range,s=a?e.getLines(a.start.row,a.end.row):e.doc.getAllLines(),l=[],r=t.re;if(t.$isMultiLine){var i,c=r.length,d=s.length-c;e:for(var h=r.offset||0;h<=d;h++){for(var g=0;gm||(l.push(i=new o(h,m,h+c-1,v)),c>2&&(h=h+c-2))}}else for(var f,b=0;bb&&(b=y),l.push(new o(f.startRow,f.startCol,f.endRow,f.endCol))}}else for(f=n.getMatchOffsets(s[b],r),g=0;gC&&l[g].end.row==M;)g--;for(l=l.slice(b,g+1),b=0,g=l.length;b=n){t+="$";break}var o=e.charCodeAt(a);if(36===o){t+="$$";continue}if(48===o||38===o){t+="$&";continue}if(49<=o&&o<=57){t+="$"+e[a];continue}}t+=e[a]}else{if(++a>=n){t+="\\";break}switch(e.charCodeAt(a)){case 92:t+="\\";break;case 110:t+="\n";break;case 116:t+="\t"}}}return t||e},e.prototype.replace=function(e,t){var a=this.$options,n=this.$assembleRegExp(a);if(a.$isMultiLine)return t;if(n){var s=this.$isMultilineSearch(a);s&&(e=e.replace(/\r\n|\r|\n/g,"\n"));var o=n.exec(e);if(!o||!s&&o[0].length!=e.length)return null;if(t=a.regExp?this.parseReplaceString(t):t.replace(/\$/g,"$$$$"),t=e.replace(n,t),a.preserveCase){t=t.split("");for(var l=Math.min(e.length,e.length);l--;){var r=e[l];r&&r.toLowerCase()!=r?t[l]=t[l].toUpperCase():t[l]=t[l].toLowerCase()}t=t.join("")}return t}},e.prototype.$assembleRegExp=function(e,t){if(e.needle instanceof RegExp)return e.re=e.needle;var a=e.needle;if(!e.needle)return e.re=!1;e.regExp||(a=n.escapeRegExp(a));var s=e.caseSensitive?"gm":"gmi";try{new RegExp(a,"u"),e.$supportsUnicodeFlag=!0,s+="u"}catch(t){e.$supportsUnicodeFlag=!1}if(e.wholeWord&&(a=function(e,t){var a=n.supportsLookbehind();function s(e,n){return void 0===n&&(n=!0),(a&&t.$supportsUnicodeFlag?new RegExp("[\\p{L}\\p{N}_]","u"):new RegExp("\\w")).test(e)||t.regExp?a&&t.$supportsUnicodeFlag?n?"(?<=^|[^\\p{L}\\p{N}_])":"(?=[^\\p{L}\\p{N}_]|$)":"\\b":""}var o=Array.from(e),l=o[0],r=o[o.length-1];return s(l)+e+s(r,!1)}(a,e)),e.$isMultiLine=!t&&/[\n\r]/.test(a),e.$isMultiLine)return e.re=this.$assembleMultilineRegExp(a,s);try{var o=new RegExp(a,s)}catch(e){o=!1}return e.re=o},e.prototype.$assembleMultilineRegExp=function(e,t){for(var a=e.replace(/\r\n|\r|\n/g,"$\n^").split("\n"),n=[],s=0;sn);r++){var c=e.getLine(l++);s=null==s?c:s+"\n"+c}var d=t.exec(s);if(t.lastIndex=0,d){var h=s.slice(0,d.index).split("\n"),g=d[0].split("\n"),p=a+h.length-1,u=h[h.length-1].length;return{startRow:p,startCol:u,endRow:p+g.length-1,endCol:1==g.length?u+g[0].length:g[g.length-1].length}}}return null},e.prototype.$multiLineBackward=function(e,t,a,n,s){for(var o,l=i(e,n),c=e.getLine(n).length-a,d=n;d>=s;){for(var h=0;h=s;h++){var g=e.getLine(d--);o=null==o?g:g+"\n"+o}var p=r(o,t,c);if(p){var u=o.slice(0,p.index).split("\n"),m=p[0].split("\n"),v=d+u.length,f=u[u.length-1].length;return{startRow:v,startCol:f,endRow:v+m.length-1,endCol:1==m.length?f+m[0].length:m[m.length-1].length}}}return null},e.prototype.$matchIterator=function(e,t){var a=this.$assembleRegExp(t);if(!a)return!1;var s=this.$isMultilineSearch(t),o=this.$multiLineForward,l=this.$multiLineBackward,r=1==t.backwards,i=0!=t.skipCurrent,c=a.unicode,d=t.range,h=t.start;h||(h=d?d[r?"end":"start"]:e.selection.getRange()),h.start&&(h=h[i!=r?"end":"start"]);var g=d?d.start.row:0,p=d?d.end.row:e.getLength()-1;if(r)var u=function(e){var a=h.row;if(!v(a,h.column,e)){for(a--;a>=g;a--)if(v(a,Number.MAX_VALUE,e))return;if(0!=t.wrap)for(a=p,g=h.row;a>=g;a--)if(v(a,Number.MAX_VALUE,e))return}};else u=function(e){var a=h.row;if(!v(a,h.column,e)){for(a+=1;a<=p;a++)if(v(a,0,e))return;if(0!=t.wrap)for(a=g,p=h.row;a<=p;a++)if(v(a,0,e))return}};if(t.$isMultiLine)var m=a.length,v=function(t,n,s){var o=r?t-m+1:t;if(!(o<0||o+m>e.getLength())){var l=e.getLine(o),i=l.search(a[0]);if(!(!r&&in))return!!s(o,i,o+m-1,d)||void 0}}};else v=r?function(t,o,r){if(s){var i=l(e,a,o,t,g);if(!i)return!1;if(r(i.startRow,i.startCol,i.endRow,i.endCol))return!0}else{var d,h=e.getLine(t),p=[],u=0;for(a.lastIndex=0;d=a.exec(h);){var m=d[0].length;if(u=d.index,!m){if(u>=h.length)break;a.lastIndex=u+=n.skipEmptyMatch(h,u,c)}if(d.index+m>o)break;p.push(d.index,m)}for(var v=p.length-1;v>=0;v-=2){var f=p[v-1];if(r(t,f,t,f+(m=p[v])))return!0}}}:function(t,l,r){if(a.lastIndex=l,s){var i=o(e,a,t,p);if(i){var d=i.endRow<=p?i.endRow-1:p;d>t&&(t=d)}if(!i)return!1;if(r(i.startRow,i.startCol,i.endRow,i.endCol))return!0}else for(var h,g,u=e.getLine(t);g=a.exec(u);){var m=g[0].length;if(r(t,h=g.index,t,h+m))return!0;if(!m&&(a.lastIndex=h+=n.skipEmptyMatch(u,h,c),h>=u.length))return!1}};return{forEach:u}},e}();function r(e,t,a){for(var n=null,s=0;s<=e.length;){t.lastIndex=s;var o=t.exec(e);if(!o)break;var l=o.index+o[0].length;if(l>e.length-a)break;(!n||l>n.index+n[0].length)&&(n=o),s=o.index+1}return n}function i(e,t){var a={row:t,column:0},n=e.doc.positionToIndex(a)+5e3;return e.doc.indexToPosition(n).row+1}t.Search=l})),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("../lib/keys"),l=e("../lib/useragent"),r=o.KEY_MODS,i=function(){function e(e,t){this.$init(e,t,!1)}return e.prototype.$init=function(e,t,a){this.platform=t||(l.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=a},e.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),this.commands[e.name]=e,e.bindKey&&this._buildKeyHash(e)},e.prototype.removeCommand=function(e,t){var a=e&&("string"==typeof e?e:e.name);e=this.commands[a],t||delete this.commands[a];var n=this.commandKeyBinding;for(var s in n){var o=n[s];if(o==e)delete n[s];else if(Array.isArray(o)){var l=o.indexOf(e);-1!=l&&(o.splice(l,1),1==o.length&&(n[s]=o[0]))}}},e.prototype.bindKey=function(e,t,a){if("object"==typeof e&&e&&(null==a&&(a=e.position),e=e[this.platform]),e)return"function"==typeof t?this.addCommand({exec:t,bindKey:e,name:t.name||e}):void e.split("|").forEach((function(e){var n="";if(-1!=e.indexOf(" ")){var s=e.split(/\s+/);e=s.pop(),s.forEach((function(e){var t=this.parseKeys(e),a=r[t.hashId]+t.key;n+=(n?" ":"")+a,this._addCommandToBinding(n,"chainKeys")}),this),n+=" "}var o=this.parseKeys(e),l=r[o.hashId]+o.key;this._addCommandToBinding(n+l,t,a)}),this)},e.prototype._addCommandToBinding=function(e,t,a){var n,s=this.commandKeyBinding;if(t)if(!s[e]||this.$singleCommand)s[e]=t;else{Array.isArray(s[e])?-1!=(n=s[e].indexOf(t))&&s[e].splice(n,1):s[e]=[s[e]],"number"!=typeof a&&(a=c(t));var o=s[e];for(n=0;na);n++);o.splice(n,0,t)}else delete s[e]},e.prototype.addCommands=function(e){e&&Object.keys(e).forEach((function(t){var a=e[t];if(a){if("string"==typeof a)return this.bindKey(a,t);"function"==typeof a&&(a={exec:a}),"object"==typeof a&&(a.name||(a.name=t),this.addCommand(a))}}),this)},e.prototype.removeCommands=function(e){Object.keys(e).forEach((function(t){this.removeCommand(e[t])}),this)},e.prototype.bindKeys=function(e){Object.keys(e).forEach((function(t){this.bindKey(t,e[t])}),this)},e.prototype._buildKeyHash=function(e){this.bindKey(e.bindKey,e)},e.prototype.parseKeys=function(e){var t=e.toLowerCase().split(/[\-\+]([\-\+])?/).filter((function(e){return e})),a=t.pop(),n=o[a];if(o.FUNCTION_KEYS[n])a=o.FUNCTION_KEYS[n].toLowerCase();else{if(!t.length)return{key:a,hashId:-1};if(1==t.length&&"shift"==t[0])return{key:a.toUpperCase(),hashId:-1}}for(var s=0,l=t.length;l--;){var r=o.KEY_MODS[t[l]];if(null==r)return"undefined"!=typeof console&&console.error("invalid modifier "+t[l]+" in "+e),!1;s|=r}return{key:a,hashId:s}},e.prototype.findKeyCommand=function(e,t){var a=r[e]+t;return this.commandKeyBinding[a]},e.prototype.handleKeyboard=function(e,t,a,n){if(!(n<0)){var s=r[t]+a,o=this.commandKeyBinding[s];return e.$keyChain&&(e.$keyChain+=" "+s,o=this.commandKeyBinding[e.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(e.$keyChain&&(t&&4!=t||1!=a.length?(-1==t||n>0)&&(e.$keyChain=""):e.$keyChain=e.$keyChain.slice(0,-s.length-1)),{command:o}):(e.$keyChain=e.$keyChain||s,{command:"null"})}},e.prototype.getStatusText=function(e,t){return t.$keyChain||""},e}();function c(e){return"object"==typeof e&&e.bindKey&&e.bindKey.position||(e.isDefault?-100:0)}var d=function(e){function t(t,a){var n=e.call(this,t,a)||this;return n.$singleCommand=!0,n}return s(t,e),t}(i);d.call=function(e,t,a){i.prototype.$init.call(e,t,a,!0)},i.call=function(e,t,a){i.prototype.$init.call(e,t,a,!1)},t.HashHandler=d,t.MultiHashHandler=i})),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("../lib/oop"),l=e("../keyboard/hash_handler").MultiHashHandler,r=e("../lib/event_emitter").EventEmitter,i=function(e){function t(t,a){var n=e.call(this,a,t)||this;return n.byName=n.commands,n.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)})),n}return s(t,e),t.prototype.exec=function(e,t,a){if(Array.isArray(e)){for(var n=e.length;n--;)if(this.exec(e[n],t,a))return!0;return!1}"string"==typeof e&&(e=this.commands[e]);var s={editor:t,command:e,args:a};return this.canExecute(e,t)?(s.returnValue=this._emit("exec",s),this._signal("afterExec",s),!1!==s.returnValue):(this._signal("commandUnavailable",s),!1)},t.prototype.canExecute=function(e,t){return"string"==typeof e&&(e=this.commands[e]),!(!e||t&&t.$readOnly&&!e.readOnly||0!=this.$checkCommandState&&e.isAvailable&&!e.isAvailable(t))},t.prototype.toggleRecording=function(e){if(!this.$inReplay)return e&&e._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(e){this.macro.push([e.command,e.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},t.prototype.replay=function(e){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(e);try{this.$inReplay=!0,this.macro.forEach((function(t){"string"==typeof t?this.exec(t,e):this.exec(t[0],e,t[1])}),this)}finally{this.$inReplay=!1}}},t.prototype.trimMacro=function(e){return e.map((function(e){return"string"!=typeof e[0]&&(e[0]=e[0].name),e[1]||(e=e[0]),e}))},t}(l);o.implement(i.prototype,r),t.CommandManager=i})),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],(function(e,t,a){"use strict";var n=e("../lib/lang"),s=e("../config"),o=e("../range").Range;function l(e,t){return{win:e,mac:t}}t.commands=[{name:"showSettingsMenu",description:"Show settings menu",bindKey:l("Ctrl-,","Command-,"),exec:function(e){s.loadModule("ace/ext/settings_menu",(function(t){t.init(e),e.showSettingsMenu()}))},readOnly:!0},{name:"goToNextError",description:"Go to next error",bindKey:l("Alt-E","F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,1)}))},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",description:"Go to previous error",bindKey:l("Alt-Shift-E","Shift-F4"),exec:function(e){s.loadModule("ace/ext/error_marker",(function(t){t.showErrorMarker(e,-1)}))},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:l("Ctrl-A","Command-A"),exec:function(e){e.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:l(null,"Ctrl-L"),exec:function(e){e.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:l("Ctrl-L","Command-L"),exec:function(e,t){"number"!=typeof t||isNaN(t)||e.gotoLine(t),e.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:l("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(e){e.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:l("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(e){e.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",description:"Toggle fold widget",bindKey:l("F2","F2"),exec:function(e){e.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",description:"Toggle parent fold widget",bindKey:l("Alt-F2","Alt-F2"),exec:function(e){e.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:l(null,"Ctrl-Command-Option-0"),exec:function(e){e.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:l("Alt-0","Command-Option-0"),exec:function(e){e.session.foldAll(),e.session.unfold(e.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:l("Alt-Shift-0","Command-Option-Shift-0"),exec:function(e){e.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:l("Ctrl-K","Command-G"),exec:function(e){e.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:l("Ctrl-Shift-K","Command-Shift-G"),exec:function(e){e.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:l("Alt-K","Ctrl-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:l("Alt-Shift-K","Ctrl-Shift-G"),exec:function(e){e.selection.isEmpty()?e.selection.selectWord():e.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:l("Ctrl-F","Command-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e)}))},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(e){e.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:l("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(e){e.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:l("Ctrl-Home","Command-Home|Command-Up"),exec:function(e){e.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:l("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(e){e.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:l("Up","Up|Ctrl-P"),exec:function(e,t){e.navigateUp(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:l("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(e){e.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:l("Ctrl-End","Command-End|Command-Down"),exec:function(e){e.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:l("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(e){e.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:l("Down","Down|Ctrl-N"),exec:function(e,t){e.navigateDown(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:l("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(e){e.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:l("Ctrl-Left","Option-Left"),exec:function(e){e.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:l("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:l("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(e){e.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:l("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(e){e.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:l("Left","Left|Ctrl-B"),exec:function(e,t){e.navigateLeft(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:l("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(e){e.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:l("Ctrl-Right","Option-Right"),exec:function(e){e.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:l("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:l("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(e){e.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:l("Shift-Right","Shift-Right"),exec:function(e){e.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:l("Right","Right|Ctrl-F"),exec:function(e,t){e.navigateRight(t.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(e){e.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:l(null,"Option-PageDown"),exec:function(e){e.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:l("PageDown","PageDown|Ctrl-V"),exec:function(e){e.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(e){e.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:l(null,"Option-PageUp"),exec:function(e){e.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(e){e.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:l("Ctrl-Up",null),exec:function(e){e.renderer.scrollBy(0,-2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:l("Ctrl-Down",null),exec:function(e){e.renderer.scrollBy(0,2*e.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(e){e.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(e){e.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:l("Ctrl-Alt-E","Command-Option-E"),exec:function(e){e.commands.toggleRecording(e)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:l("Ctrl-Shift-E","Command-Shift-E"),exec:function(e){e.commands.replay(e)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:l("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(e){e.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:l("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(e){e.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:l("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(e){e.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:l(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(e){},readOnly:!0},{name:"cut",description:"Cut",exec:function(e){var t=e.$copyWithEmptySelection&&e.selection.isEmpty()?e.selection.getLineRange():e.selection.getRange();e._emit("cut",t),t.isEmpty()||e.session.remove(t),e.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(e,t){e.$handlePaste(t)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:l("Ctrl-D","Command-D"),exec:function(e){e.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:l("Ctrl-Shift-D","Command-Shift-D"),exec:function(e){e.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:l("Ctrl-Alt-S","Command-Alt-S"),exec:function(e){e.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:l("Ctrl-/","Command-/"),exec:function(e){e.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:l("Ctrl-Shift-/","Command-Shift-/"),exec:function(e){e.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:l("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(e){e.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:l("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(e){e.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:l("Ctrl-H","Command-Option-F"),exec:function(e){s.loadModule("ace/ext/searchbox",(function(t){t.Search(e,!0)}))}},{name:"undo",description:"Undo",bindKey:l("Ctrl-Z","Command-Z"),exec:function(e){e.undo()}},{name:"redo",description:"Redo",bindKey:l("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(e){e.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:l("Alt-Shift-Up","Command-Option-Up"),exec:function(e){e.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:l("Alt-Up","Option-Up"),exec:function(e){e.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:l("Alt-Shift-Down","Command-Option-Down"),exec:function(e){e.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:l("Alt-Down","Option-Down"),exec:function(e){e.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:l("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(e){e.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:l("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(e){e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:l("Shift-Delete",null),exec:function(e){if(!e.selection.isEmpty())return!1;e.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:l("Alt-Backspace","Command-Backspace"),exec:function(e){e.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:l("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(e){e.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:l("Ctrl-Shift-Backspace",null),exec:function(e){var t=e.selection.getRange();t.start.column=0,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:l("Ctrl-Shift-Delete",null),exec:function(e){var t=e.selection.getRange();t.end.column=Number.MAX_VALUE,e.session.remove(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:l("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(e){e.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:l("Ctrl-Delete","Alt-Delete"),exec:function(e){e.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:l("Shift-Tab","Shift-Tab"),exec:function(e){e.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:l("Tab","Tab"),exec:function(e){e.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:l("Ctrl-[","Ctrl-["),exec:function(e){e.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:l("Ctrl-]","Ctrl-]"),exec:function(e){e.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(e,t){e.insert(t)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(e,t){e.insert(n.stringRepeat(t.text||"",t.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:l(null,"Ctrl-O"),exec:function(e){e.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:l("Alt-Shift-X","Ctrl-T"),exec:function(e){e.transposeLetters()},multiSelectAction:function(e){e.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:l("Ctrl-U","Ctrl-U"),exec:function(e){e.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:l("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(e){e.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:l(null,null),exec:function(e){e.autoIndent()},scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:l("Ctrl-Shift-L","Command-Shift-L"),exec:function(e){var t=e.selection.getRange();t.start.column=t.end.column=0,t.end.row++,e.selection.setRange(t,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"openlink",bindKey:l("Ctrl+F3","F3"),exec:function(e){e.openLink()}},{name:"joinlines",description:"Join lines",bindKey:l(null,null),exec:function(e){for(var t=e.selection.isBackwards(),a=t?e.selection.getSelectionLead():e.selection.getSelectionAnchor(),s=t?e.selection.getSelectionAnchor():e.selection.getSelectionLead(),l=e.session.doc.getLine(a.row).length,r=e.session.doc.getTextRange(e.selection.getRange()).replace(/\n\s*/," ").length,i=e.session.doc.getLine(a.row),c=a.row+1;c<=s.row+1;c++){var d=n.stringTrimLeft(n.stringTrimRight(e.session.doc.getLine(c)));0!==d.length&&(d=" "+d),i+=d}s.row+10?(e.selection.moveCursorTo(a.row,a.column),e.selection.selectTo(a.row,a.column+r)):(l=e.session.doc.getLine(a.row).length>l?l+1:l,e.selection.moveCursorTo(a.row,l))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:l(null,null),exec:function(e){var t=e.session.doc.getLength()-1,a=e.session.doc.getLine(t).length,n=e.selection.rangeList.ranges,s=[];n.length<1&&(n=[e.selection.getRange()]);for(var l=0;l0||e+t=0&&this.$isFoldWidgetVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isFoldWidgetVisible(e+t))return e+t}return null},e.prototype.$findNearestAnnotation=function(e){if(this.$isAnnotationVisible(e))return e;for(var t=0;e-t>0||e+t=0&&this.$isAnnotationVisible(e-t))return e-t;if(e+t<=this.lines.getLength()-1&&this.$isAnnotationVisible(e+t))return e+t}return null},e.prototype.$focusFoldWidget=function(e){if(null!=e){var t=this.$getFoldWidget(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$focusAnnotation=function(e){if(null!=e){var t=this.$getAnnotation(e);t.classList.add(this.editor.renderer.keyboardFocusClassName),t.focus()}},e.prototype.$blurFoldWidget=function(e){var t=this.$getFoldWidget(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$blurAnnotation=function(e){var t=this.$getAnnotation(e);t.classList.remove(this.editor.renderer.keyboardFocusClassName),t.blur()},e.prototype.$moveFoldWidgetUp=function(){for(var e=this.activeRowIndex;e>0;)if(e--,this.$isFoldWidgetVisible(e))return this.$blurFoldWidget(this.activeRowIndex),this.activeRowIndex=e,void this.$focusFoldWidget(this.activeRowIndex)},e.prototype.$moveFoldWidgetDown=function(){for(var e=this.activeRowIndex;e0;)if(e--,this.$isAnnotationVisible(e))return this.$blurAnnotation(this.activeRowIndex),this.activeRowIndex=e,void this.$focusAnnotation(this.activeRowIndex)},e.prototype.$moveAnnotationDown=function(){for(var e=this.activeRowIndex;e=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},s=e("./lib/oop"),o=e("./lib/dom"),l=e("./lib/lang"),r=e("./lib/useragent"),i=e("./keyboard/textinput").TextInput,c=e("./mouse/mouse_handler").MouseHandler,d=e("./mouse/fold_handler").FoldHandler,h=e("./keyboard/keybinding").KeyBinding,g=e("./edit_session").EditSession,p=e("./search").Search,u=e("./range").Range,m=e("./lib/event_emitter").EventEmitter,v=e("./commands/command_manager").CommandManager,f=e("./commands/default_commands").commands,b=e("./config"),w=e("./token_iterator").TokenIterator,y=e("./keyboard/gutter_handler").GutterKeyboardHandler,x=e("./config").nls,k=e("./clipboard"),C=e("./lib/keys"),M=e("./lib/event"),z=e("./tooltip").HoverTooltip,E=function(){function e(t,a,n){this.session,this.$toDestroy=[];var s=t.getContainerElement();this.container=s,this.renderer=t,this.id="editor"+ ++e.$uid,this.commands=new v(r.isMac?"mac":"win",f),"object"==typeof document&&(this.textInput=new i(t.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new c(this),new d(this)),this.keyBinding=new h(this),this.$search=(new p).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=l.delayedCall(function(){this._signal("input",{}),this.session&&!this.session.destroyed&&this.session.bgTokenizer.scheduleStart()}.bind(this)),this.on("change",(function(e,t){t._$emitInputEvent.schedule(31)})),this.setSession(a||n&&n.session||new g("")),b.resetOptions(this),n&&this.setOptions(n),b._signal("editor",this)}return e.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0)},e.prototype.startOperation=function(e){this.session.startOperation(e)},e.prototype.endOperation=function(e){this.session.endOperation(e)},e.prototype.onStartOperation=function(e){this.curOp=this.session.curOp,this.curOp.scrollTop=this.renderer.scrollTop,this.prevOp=this.session.prevOp,e||(this.previousCommand=null)},e.prototype.onEndOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue)return void(this.curOp=null);if(this._signal("beforeEndOperation"),!this.curOp)return;var t=this.curOp.command,a=t&&t.scrollIntoView;if(a){switch(a){case"center-animate":a="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),s=this.renderer.layerConfig;(n.start.row>=s.lastRow||n.end.row<=s.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==a&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.$lastSel=this.session.selection.toJSON(),this.prevOp=this.curOp,this.curOp=null}},e.prototype.$historyTracker=function(e){if(this.$mergeUndoDeltas){var t=this.prevOp,a=this.$mergeableCommands,n=t.command&&e.command.name==t.command.name;if("insertstring"==e.command.name){var s=e.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),n=n&&this.mergeNextCommand&&(!/\s/.test(s)||/\s/.test(t.args)),this.mergeNextCommand=!0}else n=n&&-1!==a.indexOf(e.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(n=!1),n?this.session.mergeUndoDeltas=!0:-1!==a.indexOf(e.command.name)&&(this.sequenceStartTime=Date.now())}},e.prototype.setKeyboardHandler=function(e,t){if(e&&"string"==typeof e&&"ace"!=e){this.$keybindingId=e;var a=this;b.loadModule(["keybinding",e],(function(n){a.$keybindingId==e&&a.keyBinding.setKeyboardHandler(n&&n.handler),t&&t()}))}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(e),t&&t()},e.prototype.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},e.prototype.setSession=function(e){if(this.session!=e){this.curOp&&this.endOperation(),this.curOp={};var t=this.session;if(t){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),this.session.off("startOperation",this.$onStartOperation),this.session.off("endOperation",this.$onEndOperation);var a=this.session.getSelection();a.off("changeCursor",this.$onCursorChange),a.off("changeSelection",this.$onSelectionChange)}this.session=e,e?(this.$onDocumentChange=this.onDocumentChange.bind(this),e.on("change",this.$onDocumentChange),this.renderer.setSession(e),this.$onChangeMode=this.onChangeMode.bind(this),e.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),e.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),e.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),e.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),e.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),e.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=e.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.$onStartOperation=this.onStartOperation.bind(this),this.session.on("startOperation",this.$onStartOperation),this.$onEndOperation=this.onEndOperation.bind(this),this.session.on("endOperation",this.$onEndOperation),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(e)),this._signal("changeSession",{session:e,oldSession:t}),this.curOp=null,t&&t._signal("changeEditor",{oldEditor:this}),t&&(t.$editor=null),e&&e._signal("changeEditor",{editor:this}),e&&(e.$editor=this),e&&!e.destroyed&&e.bgTokenizer.scheduleStart()}},e.prototype.getSession=function(){return this.session},e.prototype.setValue=function(e,t){return this.session.doc.setValue(e),t?1==t?this.navigateFileEnd():-1==t&&this.navigateFileStart():this.selectAll(),e},e.prototype.getValue=function(){return this.session.getValue()},e.prototype.getSelection=function(){return this.selection},e.prototype.resize=function(e){this.renderer.onResize(e)},e.prototype.setTheme=function(e,t){this.renderer.setTheme(e,t)},e.prototype.getTheme=function(){return this.renderer.getTheme()},e.prototype.setStyle=function(e){this.renderer.setStyle(e)},e.prototype.unsetStyle=function(e){this.renderer.unsetStyle(e)},e.prototype.getFontSize=function(){return this.getOption("fontSize")||o.computedStyle(this.container).fontSize},e.prototype.setFontSize=function(e){this.setOption("fontSize",e)},e.prototype.$highlightBrackets=function(){if(!this.$highlightPending){var e=this;this.$highlightPending=!0,setTimeout((function(){e.$highlightPending=!1;var t=e.session;if(t&&!t.destroyed){t.$bracketHighlight&&(t.$bracketHighlight.markerIds.forEach((function(e){t.removeMarker(e)})),t.$bracketHighlight=null);var a=e.getCursorPosition(),n=e.getKeyboardHandler(),s=n&&n.$getDirectionForHighlight&&n.$getDirectionForHighlight(e),o=t.getMatchingBracketRanges(a,s);if(!o){var l=new w(t,a.row,a.column).getCurrentToken();if(l&&/\b(?:tag-open|tag-name)/.test(l.type)){var r=t.getMatchingTags(a);r&&(o=[r.openTagName.isEmpty()?r.openTag:r.openTagName,r.closeTagName.isEmpty()?r.closeTag:r.closeTagName])}}if(!o&&t.$mode.getMatching&&(o=t.$mode.getMatching(e.session)),o){var i="ace_bracket";Array.isArray(o)?1==o.length&&(i="ace_error_bracket"):o=[o],2==o.length&&(0==u.comparePoints(o[0].end,o[1].start)?o=[u.fromPoints(o[0].start,o[1].end)]:0==u.comparePoints(o[0].start,o[1].end)&&(o=[u.fromPoints(o[1].start,o[0].end)])),t.$bracketHighlight={ranges:o,markerIds:o.map((function(e){return t.addMarker(e,i,"text")}))},e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}else e.getHighlightIndentGuides()&&e.renderer.$textLayer.$highlightIndentGuide()}}),50)}},e.prototype.focus=function(){this.textInput.focus()},e.prototype.isFocused=function(){return this.textInput.isFocused()},e.prototype.blur=function(){this.textInput.blur()},e.prototype.onFocus=function(e){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",e))},e.prototype.onBlur=function(e){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",e))},e.prototype.$cursorChange=function(){this.renderer.updateCursor(),this.$highlightBrackets(),this.$updateHighlightActiveLine()},e.prototype.onDocumentChange=function(e){var t=this.session.$useWrapMode,a=e.start.row==e.end.row?e.end.row:1/0;this.renderer.updateLines(e.start.row,a,t),this._signal("change",e),this.$cursorChange()},e.prototype.onTokenizerUpdate=function(e){var t=e.data;this.renderer.updateLines(t.first,t.last)},e.prototype.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},e.prototype.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},e.prototype.onCursorChange=function(){this.$cursorChange(),this._signal("changeSelection")},e.prototype.$updateHighlightActiveLine=function(){var e,t=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(e=this.getCursorPosition()),this.renderer.theme&&this.renderer.theme.$selectionColorConflict&&!this.selection.isEmpty()&&(e=!1),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(e=!1)),t.$highlightLineMarker&&!e)t.removeMarker(t.$highlightLineMarker.id),t.$highlightLineMarker=null;else if(!t.$highlightLineMarker&&e){var a=new u(e.row,e.column,e.row,1/0);a.id=t.addMarker(a,"ace_active-line","screenLine"),t.$highlightLineMarker=a}else e&&(t.$highlightLineMarker.start.row=e.row,t.$highlightLineMarker.end.row=e.row,t.$highlightLineMarker.start.column=e.column,t._signal("changeBackMarker"))},e.prototype.onSelectionChange=function(e){var t=this.session;if(t.$selectionMarker&&t.removeMarker(t.$selectionMarker),t.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var a=this.selection.getRange(),n=this.getSelectionStyle();t.$selectionMarker=t.addMarker(a,"ace_selection",n)}var s=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(s),this._signal("changeSelection")},e.prototype.$getSelectionHighLightRegexp=function(){var e=this.session,t=this.getSelectionRange();if(!t.isEmpty()&&!t.isMultiLine()){var a=t.start.column,n=t.end.column,s=e.getLine(t.start.row),o=s.substring(a,n);if(!(o.length>5e3)&&/[\w\d]/.test(o)){var l=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:o}),r=s.substring(a-1,n+1);if(l.test(r))return l}}},e.prototype.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},e.prototype.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},e.prototype.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},e.prototype.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},e.prototype.onChangeMode=function(e){this.renderer.updateText(),this._emit("changeMode",e)},e.prototype.onChangeWrapLimit=function(){this.renderer.updateFull()},e.prototype.onChangeWrapMode=function(){this.renderer.onResize(!0)},e.prototype.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},e.prototype.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},e.prototype.getCopyText=function(){var e=this.getSelectedText(),t=this.session.doc.getNewLineCharacter(),a=!1;if(!e&&this.$copyWithEmptySelection){a=!0;for(var n=this.selection.getAllRanges(),s=0;sr.search(/\S|$/)){var i=r.substr(s.column).search(/\S|$/);a.doc.removeInLine(s.row,s.column,s.column+i)}}this.clearSelection();var c=s.column,d=a.getState(s.row),h=(r=a.getLine(s.row),n.checkOutdent(d,r,e));if(a.insert(s,e),o&&o.selection&&(2==o.selection.length?this.selection.setSelectionRange(new u(s.row,c+o.selection[0],s.row,c+o.selection[1])):this.selection.setSelectionRange(new u(s.row+o.selection[0],o.selection[1],s.row+o.selection[2],o.selection[3]))),this.$enableAutoIndent){if(a.getDocument().isNewLine(e)){var g=n.getNextLineIndent(d,r.slice(0,s.column),a.getTabString());a.insert({row:s.row+1,column:0},g)}h&&n.autoOutdent(d,a,s.row)}},e.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),a=this.selection.isEmpty()?[new u(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),n="",s="",o="",l=e.getTabString(),r=0;r0&&(n=e.getState(d-1),s=e.getLine(d-1),o=t.getNextLineIndent(n,s,l));var h=e.getLine(d),g=t.$getIndent(h);if(o!==g){if(g.length>0){var p=new u(d,0,d,g.length);e.remove(p)}o.length>0&&e.insert({row:d,column:0},o)}t.autoOutdent(n,e,d)}},e.prototype.onTextInput=function(e,t){if(!t)return this.keyBinding.onTextInput(e);this.startOperation({command:{name:"insertstring"}});var a=this.applyComposition.bind(this,e,t);this.selection.rangeCount?this.forEachSelection(a):a(),this.endOperation()},e.prototype.applyComposition=function(e,t){var a;(t.extendLeft||t.extendRight)&&((a=this.selection.getRange()).start.column-=t.extendLeft,a.end.column+=t.extendRight,a.start.column<0&&(a.start.row--,a.start.column+=this.session.getLine(a.start.row).length+1),this.selection.setRange(a),e||a.isEmpty()||this.remove()),!e&&this.selection.isEmpty()||this.insert(e,!0),(t.restoreStart||t.restoreEnd)&&((a=this.selection.getRange()).start.column-=t.restoreStart,a.end.column-=t.restoreEnd,this.selection.setRange(a))},e.prototype.onCommandKey=function(e,t,a){return this.keyBinding.onCommandKey(e,t,a)},e.prototype.setOverwrite=function(e){this.session.setOverwrite(e)},e.prototype.getOverwrite=function(){return this.session.getOverwrite()},e.prototype.toggleOverwrite=function(){this.session.toggleOverwrite()},e.prototype.setScrollSpeed=function(e){this.setOption("scrollSpeed",e)},e.prototype.getScrollSpeed=function(){return this.getOption("scrollSpeed")},e.prototype.setDragDelay=function(e){this.setOption("dragDelay",e)},e.prototype.getDragDelay=function(){return this.getOption("dragDelay")},e.prototype.setSelectionStyle=function(e){this.setOption("selectionStyle",e)},e.prototype.getSelectionStyle=function(){return this.getOption("selectionStyle")},e.prototype.setHighlightActiveLine=function(e){this.setOption("highlightActiveLine",e)},e.prototype.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.setHighlightSelectedWord=function(e){this.setOption("highlightSelectedWord",e)},e.prototype.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},e.prototype.setAnimatedScroll=function(e){this.renderer.setAnimatedScroll(e)},e.prototype.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},e.prototype.setShowInvisibles=function(e){this.renderer.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},e.prototype.setDisplayIndentGuides=function(e){this.renderer.setDisplayIndentGuides(e)},e.prototype.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},e.prototype.setHighlightIndentGuides=function(e){this.renderer.setHighlightIndentGuides(e)},e.prototype.getHighlightIndentGuides=function(){return this.renderer.getHighlightIndentGuides()},e.prototype.setShowPrintMargin=function(e){this.renderer.setShowPrintMargin(e)},e.prototype.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},e.prototype.setPrintMarginColumn=function(e){this.renderer.setPrintMarginColumn(e)},e.prototype.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},e.prototype.setReadOnly=function(e){this.setOption("readOnly",e)},e.prototype.getReadOnly=function(){return this.getOption("readOnly")},e.prototype.setBehavioursEnabled=function(e){this.setOption("behavioursEnabled",e)},e.prototype.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},e.prototype.setWrapBehavioursEnabled=function(e){this.setOption("wrapBehavioursEnabled",e)},e.prototype.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},e.prototype.setShowFoldWidgets=function(e){this.setOption("showFoldWidgets",e)},e.prototype.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.remove=function(e){this.selection.isEmpty()&&("left"==e?this.selection.selectLeft():this.selection.selectRight());var t=this.getSelectionRange();if(this.getBehavioursEnabled()){var a=this.session,n=a.getState(t.start.row),s=a.getMode().transformAction(n,"deletion",this,a,t);if(0===t.end.column){var o=a.getTextRange(t);if("\n"==o[o.length-1]){var l=a.getLine(t.end.row);/^\s+$/.test(l)&&(t.end.column=l.length)}}s&&(t=s)}this.session.remove(t),this.clearSelection()},e.prototype.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},e.prototype.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var e=this.getSelectionRange();e.start.column==e.end.column&&e.start.row==e.end.row&&(e.end.column=0,e.end.row++),this.session.remove(e),this.clearSelection()},e.prototype.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var e=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(e)},e.prototype.setGhostText=function(e,t){this.renderer.setGhostText(e,t)},e.prototype.removeGhostText=function(){this.renderer.removeGhostText()},e.prototype.transposeLetters=function(){if(this.selection.isEmpty()){var e=this.getCursorPosition(),t=e.column;if(0!==t){var a,n,s=this.session.getLine(e.row);tt.toLowerCase()?1:0}));var s=new u(0,0,0,0);for(n=e.first;n<=e.last;n++){var o=t.getLine(n);s.start.row=n,s.end.row=n,s.end.column=o.length,t.replace(s,a[n-e.first])}},e.prototype.toggleCommentLines=function(){var e=this.session.getState(this.getCursorPosition().row),t=this.$getSelectedRows();this.session.getMode().toggleCommentLines(e,this.session,t.first,t.last)},e.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),a=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,a,e)},e.prototype.getNumberAt=function(e,t){var a=/[\-]?[0-9]+(?:\.[0-9]+)?/g;a.lastIndex=0;for(var n=this.session.getLine(e);a.lastIndex=t)return{value:s[0],start:s.index,end:s.index+s[0].length}}return null},e.prototype.modifyNumber=function(e){var t=this.selection.getCursor().row,a=this.selection.getCursor().column,n=new u(t,a-1,t,a),s=this.session.getTextRange(n);if(!isNaN(parseFloat(s))&&isFinite(s)){var o=this.getNumberAt(t,a);if(o){var l=o.value.indexOf(".")>=0?o.start+o.value.indexOf(".")+1:o.end,r=o.start+o.value.length-l,i=parseFloat(o.value);i*=Math.pow(10,r),l!==o.end&&a=r&&o<=i&&(a=t,c.selection.clearSelection(),c.moveCursorTo(e,r+n),c.selection.selectTo(e,i+n)),r=i}));for(var d,h=this.$toggleWordPairs,g=0;g=i&&l<=c&&g.match(/((?:https?|ftp):\/\/[\S]+)/)){r=g.replace(/[\s:.,'";}\]]+$/,"");break}i=c}}catch(e){a={error:e}}finally{try{h&&!h.done&&(s=d.return)&&s.call(d)}finally{if(a)throw a.error}}return r},e.prototype.openLink=function(){var e=this.selection.getCursor(),t=this.findLinkAt(e.row,e.column);return t&&window.open(t,"_blank"),null!=t},e.prototype.removeLines=function(){var e=this.$getSelectedRows();this.session.removeFullLines(e.first,e.last),this.clearSelection()},e.prototype.duplicateSelection=function(){var e=this.selection,t=this.session,a=e.getRange(),n=e.isBackwards();if(a.isEmpty()){var s=a.start.row;t.duplicateLines(s,s)}else{var o=n?a.start:a.end,l=t.insert(o,t.getTextRange(a));a.start=o,a.end=l,e.setSelectionRange(a,n)}},e.prototype.moveLinesDown=function(){this.$moveLines(1,!1)},e.prototype.moveLinesUp=function(){this.$moveLines(-1,!1)},e.prototype.moveText=function(e,t,a){return this.session.moveText(e,t,a)},e.prototype.copyLinesUp=function(){this.$moveLines(-1,!0)},e.prototype.copyLinesDown=function(){this.$moveLines(1,!0)},e.prototype.$moveLines=function(e,t){var a,n,s=this.selection;if(!s.inMultiSelectMode||this.inVirtualSelectionMode){var o=s.toOrientedRange();a=this.$getSelectedRows(o),n=this.session.$moveLines(a.first,a.last,t?0:e),t&&-1==e&&(n=0),o.moveBy(n,0),s.fromOrientedRange(o)}else{var l=s.rangeList.ranges;s.rangeList.detach(this.session),this.inVirtualSelectionMode=!0;for(var r=0,i=0,c=l.length,d=0;dp+1)break;p=u.last}for(d--,r=this.session.$moveLines(g,p,t?0:e),t&&-1==e&&(h=d+1);h<=d;)l[h].moveBy(r,0),h++;t||(r=0),i+=r}s.fromOrientedRange(s.ranges[0]),s.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},e.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},e.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},e.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},e.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},e.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},e.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},e.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},e.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},e.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},e.prototype.$moveByPage=function(e,t){var a=this.renderer,n=this.renderer.layerConfig,s=e*Math.floor(n.height/n.lineHeight);!0===t?this.selection.$moveSelection((function(){this.moveCursorBy(s,0)})):!1===t&&(this.selection.moveCursorBy(s,0),this.selection.clearSelection());var o=a.scrollTop;a.scrollBy(0,s*n.lineHeight),null!=t&&a.scrollCursorIntoView(null,.5),a.animateScrolling(o)},e.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},e.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},e.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},e.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},e.prototype.scrollPageDown=function(){this.$moveByPage(1)},e.prototype.scrollPageUp=function(){this.$moveByPage(-1)},e.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},e.prototype.scrollToLine=function(e,t,a,n){this.renderer.scrollToLine(e,t,a,n)},e.prototype.centerSelection=function(){var e=this.getSelectionRange(),t={row:Math.floor(e.start.row+(e.end.row-e.start.row)/2),column:Math.floor(e.start.column+(e.end.column-e.start.column)/2)};this.renderer.alignCursor(t,.5)},e.prototype.getCursorPosition=function(){return this.selection.getCursor()},e.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},e.prototype.getSelectionRange=function(){return this.selection.getRange()},e.prototype.selectAll=function(){this.selection.selectAll()},e.prototype.clearSelection=function(){this.selection.clearSelection()},e.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},e.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},e.prototype.jumpToMatching=function(e,t){var a=this.getCursorPosition(),n=new w(this.session,a.row,a.column),s=n.getCurrentToken(),o=0;s&&-1!==s.type.indexOf("tag-name")&&(s=n.stepBackward());var l=s||n.stepForward();if(l){var r,i,c=!1,d={},h=a.column-l.start,g={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(l.value.match(/[{}()\[\]]/g)){for(;h1?d[l.value]++:"=0;--o)this.$tryReplace(a[o],e)&&n++;return this.selection.setSelectionRange(s),n},e.prototype.$tryReplace=function(e,t){var a=this.session.getTextRange(e);return null!==(t=this.$search.replace(a,t))?(e.end=this.session.replace(e,t),e):null},e.prototype.getLastSearchOptions=function(){return this.$search.getOptions()},e.prototype.find=function(e,t,a){t||(t={}),"string"==typeof e||e instanceof RegExp?t.needle=e:"object"==typeof e&&s.mixin(t,e);var n=this.selection.getRange();null==t.needle&&((e=this.session.getTextRange(n)||this.$search.$options.needle)||(n=this.session.getWordRange(n.start.row,n.start.column),e=this.session.getTextRange(n)),this.$search.set({needle:e})),this.$search.set(t),t.start||this.$search.set({start:n});var o=this.$search.find(this.session);return t.preventScroll?o:o?(this.revealRange(o,a),o):(t.backwards?n.start=n.end:n.end=n.start,void this.selection.setRange(n))},e.prototype.findNext=function(e,t){this.find({skipCurrent:!0,backwards:!1},e,t)},e.prototype.findPrevious=function(e,t){this.find(e,{skipCurrent:!0,backwards:!0},t)},e.prototype.revealRange=function(e,t){this.session.unfold(e),this.selection.setSelectionRange(e);var a=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(e.start,e.end,.5),!1!==t&&this.renderer.animateScrolling(a)},e.prototype.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},e.prototype.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach((function(e){e.destroy()})),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},e.prototype.setAutoScrollEditorIntoView=function(e){if(e){var t,a=this,n=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var s=this.$scrollAnchor;s.style.cssText="position:absolute",this.container.insertBefore(s,this.container.firstChild);var o=this.on("changeSelection",(function(){n=!0})),l=this.renderer.on("beforeRender",(function(){n&&(t=a.renderer.container.getBoundingClientRect())})),r=this.renderer.on("afterRender",(function(){if(n&&t&&(a.isFocused()||a.searchBox&&a.searchBox.isFocused())){var e=a.renderer,o=e.$cursorLayer.$pixelPos,l=e.layerConfig,r=o.top-l.offset;null!=(n=o.top>=0&&r+t.top<0||!(o.topwindow.innerHeight)&&null)&&(s.style.top=r+"px",s.style.left=o.left+"px",s.style.height=l.lineHeight+"px",s.scrollIntoView(n)),n=t=null}}));this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",o),this.renderer.off("afterRender",r),this.renderer.off("beforeRender",l))}}},e.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,o.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},e.prototype.prompt=function(e,t,a){var n=this;b.loadModule("ace/ext/prompt",(function(s){s.prompt(n,e,t,a)}))},e}();E.$uid=0,E.prototype.curOp=null,E.prototype.prevOp={},E.prototype.$mergeableCommands=["backspace","del","insertstring"],E.prototype.$toggleWordPairs=[["first","last"],["true","false"],["yes","no"],["width","height"],["top","bottom"],["right","left"],["on","off"],["x","y"],["get","set"],["max","min"],["horizontal","vertical"],["show","hide"],["add","remove"],["up","down"],["before","after"],["even","odd"],["in","out"],["inside","outside"],["next","previous"],["increase","decrease"],["attach","detach"],["&&","||"],["==","!="]],s.implement(E.prototype,m),b.defineOptions(E.prototype,"editor",{selectionStyle:{set:function(e){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:e})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(e){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(e){var t=this;this.textInput.setReadOnly(e),this.$resetCursorStyle(),this.$readOnlyCallback||(this.$readOnlyCallback=function(e){var a=!1;if(e&&"keydown"==e.type){if(!(a=e&&e.key&&1==e.key.length&&!e.ctrlKey&&!e.metaKey))return}else e&&"exec"!==e.type&&(a=!0);if(a){t.hoverTooltip||(t.hoverTooltip=new z);var n=o.createElement("div");n.textContent=x("editor.tooltip.disable-editing","Editing is disabled"),t.hoverTooltip.isOpen||t.hoverTooltip.showForRange(t,t.getSelectionRange(),n)}else t.hoverTooltip&&t.hoverTooltip.isOpen&&t.hoverTooltip.hide()});var a=this.textInput.getElement();e?(M.addListener(a,"keydown",this.$readOnlyCallback,this),this.commands.on("exec",this.$readOnlyCallback),this.commands.on("commandUnavailable",this.$readOnlyCallback)):(M.removeListener(a,"keydown",this.$readOnlyCallback),this.commands.off("exec",this.$readOnlyCallback),this.commands.off("commandUnavailable",this.$readOnlyCallback),this.hoverTooltip&&(this.hoverTooltip.destroy(),this.hoverTooltip=null))},initialValue:!1},copyWithEmptySelection:{set:function(e){this.textInput.setCopyWithEmptySelection(e)},initialValue:!1},cursorStyle:{set:function(e){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(e){this.setAutoScrollEditorIntoView(e)}},keyboardHandler:{set:function(e){this.setKeyboardHandler(e)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(e){this.session.setValue(e)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(e){this.setSession(e)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(e){this.renderer.$gutterLayer.setShowLineNumbers(e),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),e&&this.$relativeLineNumbers?_.attach(this):_.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?_.attach(this):_.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||this.session.getLength()>1||this.session.getLine(0).length>0);if(e&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),o.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(e||this.renderer.placeholderNode)!e&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),o.addCssClass(this.container,"ace_hasPlaceholder");var t=o.createElement("div");t.className="ace_placeholder",t.textContent=this.$placeholder||"",this.renderer.placeholderNode=t,this.renderer.content.appendChild(this.renderer.placeholderNode)}}.bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},enableKeyboardAccessibility:{set:function(e){var t,a={name:"blurTextInput",description:"Set focus to the editor content div to allow tabbing through the page",bindKey:"Esc",exec:function(e){e.blur(),e.renderer.scroller.focus()},readOnly:!0},n=function(e){if(e.target==this.renderer.scroller&&e.keyCode===C.enter){e.preventDefault();var t=this.getCursorPosition().row;this.isRowVisible(t)||this.scrollToLine(t,!0,!0),this.focus()}};e?(this.renderer.enableKeyboardAccessibility=!0,this.renderer.keyboardFocusClassName="ace_keyboard-focus",this.textInput.getElement().setAttribute("tabindex",-1),this.textInput.setNumberOfExtraLines(r.isWin?3:0),this.renderer.scroller.setAttribute("tabindex",0),this.renderer.scroller.setAttribute("role","group"),this.renderer.scroller.setAttribute("aria-roledescription",x("editor.scroller.aria-roledescription","editor")),this.renderer.scroller.classList.add(this.renderer.keyboardFocusClassName),this.renderer.scroller.setAttribute("aria-label",x("editor.scroller.aria-label","Editor content, press Enter to start editing, press Escape to exit")),this.renderer.scroller.addEventListener("keyup",n.bind(this)),this.commands.addCommand(a),this.renderer.$gutter.setAttribute("tabindex",0),this.renderer.$gutter.setAttribute("aria-hidden",!1),this.renderer.$gutter.setAttribute("role","group"),this.renderer.$gutter.setAttribute("aria-roledescription",x("editor.gutter.aria-roledescription","editor gutter")),this.renderer.$gutter.setAttribute("aria-label",x("editor.gutter.aria-label","Editor gutter, press Enter to interact with controls using arrow keys, press Escape to exit")),this.renderer.$gutter.classList.add(this.renderer.keyboardFocusClassName),this.renderer.content.setAttribute("aria-hidden",!0),t||(t=new y(this)),t.addListener(),this.textInput.setAriaOptions({setLabel:!0})):(this.renderer.enableKeyboardAccessibility=!1,this.textInput.getElement().setAttribute("tabindex",0),this.textInput.setNumberOfExtraLines(0),this.renderer.scroller.setAttribute("tabindex",-1),this.renderer.scroller.removeAttribute("role"),this.renderer.scroller.removeAttribute("aria-roledescription"),this.renderer.scroller.classList.remove(this.renderer.keyboardFocusClassName),this.renderer.scroller.removeAttribute("aria-label"),this.renderer.scroller.removeEventListener("keyup",n.bind(this)),this.commands.removeCommand(a),this.renderer.content.removeAttribute("aria-hidden"),this.renderer.$gutter.setAttribute("tabindex",-1),this.renderer.$gutter.setAttribute("aria-hidden",!0),this.renderer.$gutter.removeAttribute("role"),this.renderer.$gutter.removeAttribute("aria-roledescription"),this.renderer.$gutter.removeAttribute("aria-label"),this.renderer.$gutter.classList.remove(this.renderer.keyboardFocusClassName),t&&t.removeListener())},initialValue:!1},textInputAriaLabel:{set:function(e){this.$textInputAriaLabel=e},initialValue:""},enableMobileMenu:{set:function(e){this.$enableMobileMenu=e},initialValue:!0},customScrollbar:"renderer",hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",highlightIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",useResizeObserver:"renderer",useSvgGutterIcons:"renderer",showFoldedAnnotations:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var _={getText:function(e,t){return(Math.abs(e.selection.lead.row-t)||t+1+(t<9?"·":""))+""},getWidth:function(e,t,a){return Math.max(t.toString().length,(a.lastRow+1).toString().length,2)*a.characterWidth},update:function(e,t){t.renderer.$loop.schedule(t.renderer.CHANGE_GUTTER)},attach:function(e){e.renderer.$gutterLayer.$renderer=this,e.on("changeSelection",this.update),this.update(null,e)},detach:function(e){e.renderer.$gutterLayer.$renderer==this&&(e.renderer.$gutterLayer.$renderer=null),e.off("changeSelection",this.update),this.update(null,e)}};t.Editor=E})),ace.define("ace/layer/lines",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=function(){function e(e,t){this.element=e,this.canvasHeight=t||5e5,this.element.style.height=2*this.canvasHeight+"px",this.cells=[],this.cellCache=[],this.$offsetCoefficient=0}return e.prototype.moveContainer=function(e){n.translate(this.element,0,-e.firstRowScreen*e.lineHeight%this.canvasHeight-e.offset*this.$offsetCoefficient)},e.prototype.pageChanged=function(e,t){return Math.floor(e.firstRowScreen*e.lineHeight/this.canvasHeight)!==Math.floor(t.firstRowScreen*t.lineHeight/this.canvasHeight)},e.prototype.computeLineTop=function(e,t,a){var n=t.firstRowScreen*t.lineHeight,s=Math.floor(n/this.canvasHeight);return a.documentToScreenRow(e,0)*t.lineHeight-s*this.canvasHeight},e.prototype.computeLineHeight=function(e,t,a){return t.lineHeight*a.getRowLineCount(e)},e.prototype.getLength=function(){return this.cells.length},e.prototype.get=function(e){return this.cells[e]},e.prototype.shift=function(){this.$cacheCell(this.cells.shift())},e.prototype.pop=function(){this.$cacheCell(this.cells.pop())},e.prototype.push=function(e){if(Array.isArray(e)){this.cells.push.apply(this.cells,e);for(var t=n.createFragment(this.element),a=0;ao&&(i=s.end.row+1,o=(s=t.getNextFoldLine(i,s))?s.start.row:1/0),i>n){for(;this.$lines.getLength()>r+1;)this.$lines.pop();break}(l=this.$lines.get(++r))?l.row=i:(l=this.$lines.createCell(i,e,this.session,d),this.$lines.push(l)),this.$renderCell(l,e,s,i),i++}this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$updateGutterWidth=function(e){var t=this.session,a=t.gutterRenderer||this.$renderer,n=t.$firstLineNumber,s=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||t.$useWrapMode)&&(s=t.getLength()+n-1);var o=a?a.getWidth(t,s,e):s.toString().length*e.characterWidth,l=this.$padding||this.$computePadding();(o+=l.left+l.right)===this.gutterWidth||isNaN(o)||(this.gutterWidth=o,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",o))},e.prototype.$updateCursorRow=function(){if(this.$highlightGutterLine){var e=this.session.selection.getCursor();this.$cursorRow!==e.row&&(this.$cursorRow=e.row)}},e.prototype.updateLineHighlight=function(){if(this.$highlightGutterLine){var e=this.session.selection.cursor.row;if(this.$cursorRow=e,!this.$cursorCell||this.$cursorCell.row!=e){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var t=this.$lines.cells;this.$cursorCell=null;for(var a=0;a=this.$cursorRow){if(n.row>this.$cursorRow){var s=this.session.getFoldLine(this.$cursorRow);if(!(a>0&&s&&s.start.row==t[a-1].row))break;n=t[a-1]}n.element.className="ace_gutter-active-line "+n.element.className,this.$cursorCell=n;break}}}}},e.prototype.scrollLines=function(e){var t=this.config;if(this.config=e,this.$updateCursorRow(),this.$lines.pageChanged(t,e))return this.update(e);this.$lines.moveContainer(e);var a=Math.min(e.lastRow+e.gutterOffset,this.session.getLength()-1),n=this.oldLastRow;if(this.oldLastRow=a,!t||n0;s--)this.$lines.shift();if(n>a)for(s=this.session.getFoldedRowCount(a+1,n);s>0;s--)this.$lines.pop();e.firstRown&&this.$lines.push(this.$renderLines(e,n+1,a)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(e)},e.prototype.$renderLines=function(e,t,a){for(var n=[],s=t,o=this.session.getNextFoldLine(s),l=o?o.start.row:1/0;s>l&&(s=o.end.row+1,l=(o=this.session.getNextFoldLine(s,o))?o.start.row:1/0),!(s>a);){var r=this.$lines.createCell(s,e,this.session,d);this.$renderCell(r,e,o,s),n.push(r),s++}return n},e.prototype.$renderCell=function(e,t,a,s){var o=e.element,l=this.session,r=o.childNodes[0],c=o.childNodes[1],d=o.childNodes[2],h=d.firstChild,g=l.$firstLineNumber,p=l.$breakpoints,u=l.$decorations,m=l.gutterRenderer||this.$renderer,v=this.$showFoldWidgets&&l.foldWidgets,f=a?a.start.row:Number.MAX_VALUE,b=t.lineHeight+"px",w=this.$useSvgGutterIcons?"ace_gutter-cell_svg-icons ":"ace_gutter-cell ",y=this.$useSvgGutterIcons?"ace_icon_svg":"ace_icon",x=(m?m.getText(l,s):s+g).toString();if(this.$highlightGutterLine&&(s==this.$cursorRow||a&&s=f&&this.$cursorRow<=a.end.row)&&(w+="ace_gutter-active-line ",this.$cursorCell!=e&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=e)),p[s]&&(w+=p[s]),u[s]&&(w+=u[s]),this.$annotations[s]&&s!==f&&(w+=this.$annotations[s].className),v){var k=v[s];null==k&&(k=v[s]=l.getFoldWidget(s))}if(k){var C="ace_fold-widget ace_"+k,M="start"==k&&s==f&&sa.right-t.right?"foldWidgets":void 0},e}();function d(e){var t=document.createTextNode("");e.appendChild(t);var a=n.createElement("span");e.appendChild(a);var s=n.createElement("span");e.appendChild(s);var o=n.createElement("span");return s.appendChild(o),e}c.prototype.$fixedWidth=!1,c.prototype.$highlightGutterLine=!0,c.prototype.$renderer="",c.prototype.$showLineNumbers=!0,c.prototype.$showFoldWidgets=!0,s.implement(c.prototype,l),t.Gutter=c})),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("../range").Range,s=e("../lib/dom"),o=function(){function e(e){this.element=s.createElement("div"),this.element.className="ace_layer ace_marker-layer",e.appendChild(this.element)}return e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setMarkers=function(e){this.markers=e},e.prototype.elt=function(e,t){var a=-1!=this.i&&this.element.childNodes[this.i];a?this.i++:(a=document.createElement("div"),this.element.appendChild(a),this.i=-1),a.style.cssText=t,a.className=e},e.prototype.update=function(e){if(e){var t;for(var a in this.config=e,this.i=0,this.markers){var n=this.markers[a];if(n.range){var s=n.range.clipRows(e.firstRow,e.lastRow);if(!s.isEmpty())if(s=s.toScreenRange(this.session),n.renderer){var o=this.$getTop(s.start.row,e),l=this.$padding+s.start.column*e.characterWidth;n.renderer(t,s,l,o,e)}else"fullLine"==n.type?this.drawFullLineMarker(t,s,n.clazz,e):"screenLine"==n.type?this.drawScreenLineMarker(t,s,n.clazz,e):s.isMultiLine()?"text"==n.type?this.drawTextMarker(t,s,n.clazz,e):this.drawMultiLineMarker(t,s,n.clazz,e):this.drawSingleLineMarker(t,s,n.clazz+" ace_start ace_br15",e)}else n.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ig?4:0)|(c==i?8:0)),s,c==i?0:1,o)},e.prototype.drawMultiLineMarker=function(e,t,a,n,s){var o=this.$padding,l=n.lineHeight,r=this.$getTop(t.start.row,n),i=o+t.start.column*n.characterWidth;if(s=s||"",this.session.$bidiHandler.isBidiRow(t.start.row)?((c=t.clone()).end.row=c.start.row,c.end.column=this.session.getLine(c.start.row).length,this.drawBidiSingleLineMarker(e,c,a+" ace_br1 ace_start",n,null,s)):this.elt(a+" ace_br1 ace_start","height:"+l+"px;right:"+o+"px;top:"+r+"px;left:"+i+"px;"+(s||"")),this.session.$bidiHandler.isBidiRow(t.end.row)){var c;(c=t.clone()).start.row=c.end.row,c.start.column=0,this.drawBidiSingleLineMarker(e,c,a+" ace_br12",n,null,s)}else{r=this.$getTop(t.end.row,n);var d=t.end.column*n.characterWidth;this.elt(a+" ace_br12","height:"+l+"px;width:"+d+"px;top:"+r+"px;left:"+o+"px;"+(s||""))}if(!((l=(t.end.row-t.start.row-1)*n.lineHeight)<=0)){r=this.$getTop(t.start.row+1,n);var h=(t.start.column?1:0)|(t.end.column?0:8);this.elt(a+(h?" ace_br"+h:""),"height:"+l+"px;right:"+o+"px;top:"+r+"px;left:"+o+"px;"+(s||""))}},e.prototype.drawSingleLineMarker=function(e,t,a,n,s,o){if(this.session.$bidiHandler.isBidiRow(t.start.row))return this.drawBidiSingleLineMarker(e,t,a,n,s,o);var l=n.lineHeight,r=(t.end.column+(s||0)-t.start.column)*n.characterWidth,i=this.$getTop(t.start.row,n),c=this.$padding+t.start.column*n.characterWidth;this.elt(a,"height:"+l+"px;width:"+r+"px;top:"+i+"px;left:"+c+"px;"+(o||""))},e.prototype.drawBidiSingleLineMarker=function(e,t,a,n,s,o){var l=n.lineHeight,r=this.$getTop(t.start.row,n),i=this.$padding;this.session.$bidiHandler.getSelections(t.start.column,t.end.column).forEach((function(e){this.elt(a,"height:"+l+"px;width:"+(e.width+(s||0))+"px;top:"+r+"px;left:"+(i+e.left)+"px;"+(o||""))}),this)},e.prototype.drawFullLineMarker=function(e,t,a,n,s){var o=this.$getTop(t.start.row,n),l=n.lineHeight;t.start.row!=t.end.row&&(l+=this.$getTop(t.end.row,n)-o),this.elt(a,"height:"+l+"px;top:"+o+"px;left:0;right:0;"+(s||""))},e.prototype.drawScreenLineMarker=function(e,t,a,n,s){var o=this.$getTop(t.start.row,n),l=n.lineHeight;this.elt(a,"height:"+l+"px;top:"+o+"px;left:0;right:0;"+(s||""))},e}();o.prototype.$padding=0,t.Marker=o})),ace.define("ace/layer/text_util",["require","exports","module"],(function(e,t,a){var n=new Set(["text","rparen","lparen"]);t.isTextToken=function(e){return n.has(e)}})),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter","ace/config","ace/layer/text_util"],(function(e,t,a){"use strict";var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),l=e("./lines").Lines,r=e("../lib/event_emitter").EventEmitter,i=e("../config").nls,c=e("./text_util").isTextToken,d=function(){function e(e){this.dom=s,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 l(this.element)}return e.prototype.$updateEolChar=function(){var e=this.session.doc,t="\n"==e.getNewLineCharacter()&&"windows"!=e.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=t)return this.EOL_CHAR=t,!0},e.prototype.setPadding=function(e){this.$padding=e,this.element.style.margin="0 "+e+"px"},e.prototype.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},e.prototype.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},e.prototype.$setFontMetrics=function(e){this.$fontMetrics=e,this.$fontMetrics.on("changeCharacterSize",function(e){this._signal("changeCharacterSize",e)}.bind(this)),this.$pollSizeChanges()},e.prototype.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},e.prototype.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},e.prototype.setSession=function(e){this.session=e,e&&this.$computeTabString()},e.prototype.setShowInvisibles=function(e){return this.showInvisibles!=e&&(this.showInvisibles=e,"string"==typeof e?(this.showSpaces=/tab/i.test(e),this.showTabs=/space/i.test(e),this.showEOL=/eol/i.test(e)):this.showSpaces=this.showTabs=this.showEOL=e,this.$computeTabString(),!0)},e.prototype.setDisplayIndentGuides=function(e){return this.displayIndentGuides!=e&&(this.displayIndentGuides=e,this.$computeTabString(),!0)},e.prototype.setHighlightIndentGuides=function(e){return this.$highlightIndentGuides!==e&&(this.$highlightIndentGuides=e,e)},e.prototype.$computeTabString=function(){var e=this.session.getTabSize();this.tabSize=e;for(var t=this.$tabStrings=[0],a=1;ad&&(r=i.end.row+1,d=(i=this.session.getNextFoldLine(r,i))?i.start.row:1/0),!(r>s);){var h=o[l++];if(h){this.dom.removeChildren(h),this.$renderLine(h,r,r==d&&i),c&&(h.style.top=this.$lines.computeLineTop(r,e,this.session)+"px");var g=e.lineHeight*this.session.getRowLength(r)+"px";h.style.height!=g&&(c=!0,h.style.height=g)}r++}if(c)for(;l0;s--)this.$lines.shift();if(t.lastRow>e.lastRow)for(s=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);s>0;s--)this.$lines.pop();e.firstRowt.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},e.prototype.$renderLinesFragment=function(e,t,a){for(var n=[],o=t,l=this.session.getNextFoldLine(o),r=l?l.start.row:1/0;o>r&&(o=l.end.row+1,r=(l=this.session.getNextFoldLine(o,l))?l.start.row:1/0),!(o>a);){var i=this.$lines.createCell(o,e,this.session),c=i.element;this.dom.removeChildren(c),s.setStyle(c.style,"height",this.$lines.computeLineHeight(o,e,this.session)+"px"),s.setStyle(c.style,"top",this.$lines.computeLineTop(o,e,this.session)+"px"),this.$renderLine(c,o,o==r&&l),this.$useLineGroups()?c.className="ace_line_group":c.className="ace_line",n.push(i),o++}return n},e.prototype.update=function(e){this.$lines.moveContainer(e),this.config=e;for(var t=e.firstRow,a=e.lastRow,n=this.$lines;n.getLength();)n.pop();n.push(this.$renderLinesFragment(e,t,a))},e.prototype.$renderToken=function(e,t,a,n){for(var s,l=this,r=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC\u2066\u2067\u2068\u202A\u202B\u202D\u202E\u202C\u2069\u2060\u2061\u2062\u2063\u2064\u206A\u206B\u206B\u206C\u206D\u206E\u206F]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,d=this.dom.createFragment(this.element),h=0;s=r.exec(n);){var g=s[1],p=s[2],u=s[3],m=s[4],v=s[5];if(l.showSpaces||!p){var f=h!=s.index?n.slice(h,s.index):"";if(h=s.index+s[0].length,f&&d.appendChild(this.dom.createTextNode(f,this.element)),g){var b=l.session.getScreenTabSize(t+s.index);d.appendChild(l.$tabStrings[b].cloneNode(!0)),t+=b-1}else p?l.showSpaces?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",y.textContent=o.stringRepeat(l.SPACE_CHAR,p.length),d.appendChild(y)):d.appendChild(this.dom.createTextNode(p,this.element)):u?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",y.textContent=o.stringRepeat(l.SPACE_CHAR,u.length),d.appendChild(y)):m?(t+=1,(y=this.dom.createElement("span")).style.width=2*l.config.characterWidth+"px",y.className=l.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=l.showSpaces?l.SPACE_CHAR:m,d.appendChild(y)):v&&(t+=1,(y=this.dom.createElement("span")).style.width=2*l.config.characterWidth+"px",y.className="ace_cjk",y.textContent=v,d.appendChild(y))}}if(d.appendChild(this.dom.createTextNode(h?n.slice(h):n,this.element)),c(a.type))e.appendChild(d);else{var w="ace_"+a.type.replace(/\./g," ace_"),y=this.dom.createElement("span");"fold"==a.type&&(y.style.width=a.value.length*this.config.characterWidth+"px",y.setAttribute("title",i("inline-fold.closed.title","Unfold code"))),y.className=w,y.appendChild(d),e.appendChild(y)}return t+n.length},e.prototype.renderIndentGuide=function(e,t,a){var n=t.search(this.$indentGuideRe);if(n<=0||n>=a)return t;if(" "==t[0]){for(var s=(n-=n%this.tabSize)/this.tabSize,o=0;os[o].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length)for(this.$highlightIndentGuideMarker.dir=1,o=t.row+1;o0))return;a=e.element.childNodes[0]}var n=a.childNodes;if(n){var s=n[t-1];s&&s.classList&&s.classList.contains("ace_indent-guide")&&s.classList.add("ace_indent-guide-active")}}},e.prototype.$renderHighlightIndentGuide=function(){if(this.$lines){var e=this.$lines.cells;this.$clearActiveIndentGuide();var t=this.$highlightIndentGuideMarker.indentLevel;if(0!==t)if(1===this.$highlightIndentGuideMarker.dir)for(var a=0;a=this.$highlightIndentGuideMarker.start+1){if(n.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(n,t)}}else for(a=e.length-1;a>=0;a--)if(n=e[a],this.$highlightIndentGuideMarker.end&&n.row=l;)r=this.$renderToken(i,r,d,h.substring(0,l-n)),h=h.substring(l-n),n=l,i=this.$createLineElement(),e.appendChild(i),i.appendChild(this.dom.createTextNode(o.stringRepeat(" ",a.indent),this.element)),r=0,l=a[++s]||Number.MAX_VALUE;0!=h.length&&(n+=h.length,r=this.$renderToken(i,r,d,h))}}a[a.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(i,r,null,"",!0)},e.prototype.$renderSimpleLine=function(e,t){for(var a=0,n=0;nthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,a,s,o);a=this.$renderToken(e,a,s,o)}}},e.prototype.$renderOverflowMessage=function(e,t,a,n,s){a&&this.$renderToken(e,t,a,n.slice(0,this.MAX_LINE_LENGTH-t));var o=this.dom.createElement("span");o.className="ace_inline_button ace_keyword ace_toggle_wrap",o.textContent=s?"":"",e.appendChild(o)},e.prototype.$renderLine=function(e,t,a){if(a||0==a||(a=this.session.getFoldLine(t)),a)var n=this.$getFoldLineTokens(t,a);else n=this.session.getTokens(t);var s=e;if(n.length){var o=this.session.getRowSplitData(t);o&&o.length?(this.$renderWrappedLine(e,n,o),s=e.lastChild):(s=e,this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s)),this.$renderSimpleLine(s,n))}else this.$useLineGroups()&&(s=this.$createLineElement(),e.appendChild(s));if(this.showEOL&&s){a&&(t=a.end.row);var l=this.dom.createElement("span");l.className="ace_invisible ace_invisible_eol",l.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,s.appendChild(l)}},e.prototype.$getFoldLineTokens=function(e,t){var a=this.session,n=[],s=a.getTokens(e);return t.walk((function(e,t,o,l,r){null!=e?n.push({type:"fold",value:e}):(r&&(s=a.getTokens(t)),s.length&&function(e,t,a){for(var s=0,o=0;o+e[s].value.lengtha-t&&(l=l.substring(0,a-t)),n.push({type:e[s].type,value:l}),o=t+l.length,s+=1);oa?n.push({type:e[s].type,value:l.substring(0,a-o)}):n.push(e[s]),o+=l.length,s+=1}}(s,l,o))}),t.end.row,this.session.getLine(t.end.row).length),n},e.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},e}();d.prototype.EOF_CHAR="¶",d.prototype.EOL_CHAR_LF="¬",d.prototype.EOL_CHAR_CRLF="¤",d.prototype.EOL_CHAR=d.prototype.EOL_CHAR_LF,d.prototype.TAB_CHAR="—",d.prototype.SPACE_CHAR="·",d.prototype.$padding=0,d.prototype.MAX_LINE_LENGTH=1e4,d.prototype.showInvisibles=!1,d.prototype.showSpaces=!1,d.prototype.showTabs=!1,d.prototype.showEOL=!1,d.prototype.displayIndentGuides=!0,d.prototype.$highlightIndentGuides=!0,d.prototype.$tabStrings=[],d.prototype.destroy={},d.prototype.onChangeTabSize=d.prototype.$computeTabString,n.implement(d.prototype,r),t.Text=d})),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=function(){function e(e){this.element=n.createElement("div"),this.element.className="ace_layer ace_cursor-layer",e.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),n.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}return e.prototype.$updateOpacity=function(e){for(var t=this.cursors,a=t.length;a--;)n.setStyle(t[a].style,"opacity",e?"":"0")},e.prototype.$startCssAnimation=function(){for(var e=this.cursors,t=e.length;t--;)e[t].style.animationDuration=this.blinkInterval+"ms";this.$isAnimating=!0,setTimeout(function(){this.$isAnimating&&n.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},e.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,n.removeCssClass(this.element,"ace_animate-blinking")},e.prototype.setPadding=function(e){this.$padding=e},e.prototype.setSession=function(e){this.session=e},e.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},e.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},e.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,n.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},e.prototype.addCursor=function(){var e=n.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},e.prototype.removeCursor=function(){if(this.cursors.length>1){var e=this.cursors.pop();return e.parentNode.removeChild(e),e}},e.prototype.hideCursor=function(){this.isVisible=!1,n.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.showCursor=function(){this.isVisible=!0,n.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},e.prototype.restartTimer=function(){var e=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&(this.$isSmoothBlinking=!1,n.removeCssClass(this.element,"ace_smooth-blinking")),e(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&(this.$isSmoothBlinking=!0,setTimeout(function(){this.$isSmoothBlinking&&n.addCssClass(this.element,"ace_smooth-blinking")}.bind(this))),n.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var t=function(){this.timeoutId=setTimeout((function(){e(!1)}),.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval((function(){e(!0),t()}),this.blinkInterval),t()}else this.$stopCssAnimation()},e.prototype.getPixelPosition=function(e,t){if(!this.config||!this.session)return{left:0,top:0};e||(e=this.session.selection.getCursor());var a=this.session.documentToScreenPosition(e);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(a.row,e.row)?this.session.$bidiHandler.getPosLeft(a.column):a.column*this.config.characterWidth),top:(a.row-(t?this.config.firstRowScreen:0))*this.config.lineHeight}},e.prototype.isCursorInView=function(e,t){return e.top>=0&&e.tope.height+e.offset||l.top<0)&&a>1)){var r=this.cursors[s++]||this.addCursor(),i=r.style;this.drawCursor?this.drawCursor(r,l,e,t[a],this.session):this.isCursorInView(l,e)?(n.setStyle(i,"display","block"),n.translate(r,l.left,l.top),n.setStyle(i,"width",Math.round(e.characterWidth)+"px"),n.setStyle(i,"height",e.lineHeight+"px")):n.setStyle(i,"display","none")}}for(;this.cursors.length>s;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=l,this.restartTimer()},e.prototype.$setOverwrite=function(e){e!=this.overwrite&&(this.overwrite=e,e?n.addCssClass(this.element,"ace_overwrite-cursors"):n.removeCssClass(this.element,"ace_overwrite-cursors"))},e.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},e}();s.prototype.$padding=0,s.prototype.drawCursor=null,t.Cursor=s})),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("./lib/oop"),l=e("./lib/dom"),r=e("./lib/event"),i=e("./lib/event_emitter").EventEmitter,c=32768,d=function(){function e(e,t){this.element=l.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=l.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent=" ",this.element.appendChild(this.inner),e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addListener(this.element,"scroll",this.onScroll.bind(this)),r.addListener(this.element,"mousedown",r.preventDefault)}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(d.prototype,i);var h=function(e){function t(t,a){var n=e.call(this,t,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,a.$scrollbarWidth=n.width=l.scrollbarWidth(t.ownerDocument),n.inner.style.width=n.element.style.width=(n.width||15)+5+"px",n.$minWidth=0,n}return s(t,e),t.prototype.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var e=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.element.style.height=e+"px"},t.prototype.setScrollHeight=function(e){this.scrollHeight=e,e>c?(this.coeff=c/e,e=c):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},t.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)},t}(d);h.prototype.setInnerHeight=h.prototype.setScrollHeight;var g=function(e){function t(t,a){var n=e.call(this,t,"-h")||this;return n.scrollLeft=0,n.height=a.$scrollbarWidth,n.inner.style.height=n.element.style.height=(n.height||15)+5+"px",n}return s(t,e),t.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.setWidth=function(e){this.element.style.width=e+"px"},t.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},t.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)},t}(d);t.ScrollBar=h,t.ScrollBarV=h,t.ScrollBarH=g,t.VScrollBar=h,t.HScrollBar=g})),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n,s=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function a(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(a.prototype=t.prototype,new a)}),o=e("./lib/oop"),l=e("./lib/dom"),r=e("./lib/event"),i=e("./lib/event_emitter").EventEmitter;l.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1);var c=function(){function e(e,t){this.element=l.createElement("div"),this.element.className="ace_sb"+t,this.inner=l.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,r.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}return e.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},e}();o.implement(c.prototype,i);var d=function(e){function t(t,a){var n=e.call(this,t,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,n.parent=t,n.width=n.VScrollWidth,n.renderer=a,n.inner.style.width=n.element.style.width=(n.width||15)+"px",n.$minWidth=0,n}return s(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var a=this,n=t.clientY,s=t.clientY,o=this.thumbTop;r.capture(this.inner,(function(e){n=e.clientY}),(function(){clearInterval(l)}));var l=setInterval((function(){if(void 0!==n){var e=a.scrollTopFromThumbTop(o+n-s);e!==a.scrollTop&&a._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var i=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2;return this._emit("scroll",{data:this.scrollTopFromThumbTop(i)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.height},t.prototype.scrollTopFromThumbTop=function(e){var t=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(t|=0)<0?t=0:t>this.pageHeight-this.viewHeight&&(t=this.pageHeight-this.viewHeight),t},t.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},t.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},t.prototype.setScrollHeight=function(e,t){(this.pageHeight!==e||t)&&(this.pageHeight=e,this.thumbHeight=this.slideHeight*this.viewHeight/this.pageHeight,this.thumbHeight>this.slideHeight&&(this.thumbHeight=this.slideHeight),this.thumbHeight<15&&(this.thumbHeight=15),this.inner.style.height=this.thumbHeight+"px",this.scrollTop>this.pageHeight-this.viewHeight&&(this.scrollTop=this.pageHeight-this.viewHeight,this.scrollTop<0&&(this.scrollTop=0),this._emit("scroll",{data:this.scrollTop})))},t.prototype.setScrollTop=function(e){this.scrollTop=e,e<0&&(e=0),this.thumbTop=e*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"},t}(c);d.prototype.setInnerHeight=d.prototype.setScrollHeight;var h=function(e){function t(t,a){var n=e.call(this,t,"-h")||this;return n.scrollLeft=0,n.scrollWidth=0,n.height=n.HScrollHeight,n.inner.style.height=n.element.style.height=(n.height||12)+"px",n.renderer=a,n}return s(t,e),t.prototype.onMouseDown=function(e,t){if("mousedown"===e&&0===r.getButton(t)&&2!==t.detail){if(t.target===this.inner){var a=this,n=t.clientX,s=t.clientX,o=this.thumbLeft;r.capture(this.inner,(function(e){n=e.clientX}),(function(){clearInterval(l)}));var l=setInterval((function(){if(void 0!==n){var e=a.scrollLeftFromThumbLeft(o+n-s);e!==a.scrollLeft&&a._emit("scroll",{data:e})}}),20);return r.preventDefault(t)}var i=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2;return this._emit("scroll",{data:this.scrollLeftFromThumbLeft(i)}),r.preventDefault(t)}},t.prototype.getHeight=function(){return this.isVisible?this.height:0},t.prototype.scrollLeftFromThumbLeft=function(e){var t=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(t|=0)<0?t=0:t>this.pageWidth-this.viewWidth&&(t=this.pageWidth-this.viewWidth),t},t.prototype.setWidth=function(e){this.width=Math.max(0,e),this.element.style.width=this.width+"px",this.slideWidth=this.width,this.viewWidth=this.width,this.setScrollWidth(this.pageWidth,!0)},t.prototype.setScrollWidth=function(e,t){(this.pageWidth!==e||t)&&(this.pageWidth=e,this.thumbWidth=this.slideWidth*this.viewWidth/this.pageWidth,this.thumbWidth>this.slideWidth&&(this.thumbWidth=this.slideWidth),this.thumbWidth<15&&(this.thumbWidth=15),this.inner.style.width=this.thumbWidth+"px",this.scrollLeft>this.pageWidth-this.viewWidth&&(this.scrollLeft=this.pageWidth-this.viewWidth,this.scrollLeft<0&&(this.scrollLeft=0),this._emit("scroll",{data:this.scrollLeft})))},t.prototype.setScrollLeft=function(e){this.scrollLeft=e,e<0&&(e=0),this.thumbLeft=e*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"},t}(c);h.prototype.setInnerWidth=h.prototype.setScrollWidth,t.ScrollBar=d,t.ScrollBarV=d,t.ScrollBarH=h,t.VScrollBar=d,t.HScrollBar=h})),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],(function(e,t,a){"use strict";var n=e("./lib/event"),s=function(){function e(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var a=this;this._flush=function(e){a.pending=!1;var t=a.changes;if(t&&(n.blockIdle(100),a.changes=0,a.onRender(t)),a.changes){if(a.$recursionLimit--<0)return;a.schedule()}else a.$recursionLimit=2}}return e.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(n.nextFrame(this._flush),this.pending=!0)},e.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},e}();t.RenderLoop=s})),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],(function(e,t,a){var n=e("../lib/oop"),s=e("../lib/dom"),o=e("../lib/lang"),l=e("../lib/event"),r=e("../lib/useragent"),i=e("../lib/event_emitter").EventEmitter,c=512,d="function"==typeof ResizeObserver,h=200,g=function(){function e(e){this.el=s.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=s.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=s.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=o.stringRepeat("X",c),this.$characterSize={width:0,height:0},d?this.$addObserver():this.checkForSizeChanges()}return e.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",r.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},e.prototype.checkForSizeChanges=function(e){if(void 0===e&&(e=this.$measureSizes()),e&&(this.$characterSize.width!==e.width||this.$characterSize.height!==e.height)){this.$measureNode.style.fontWeight="bold";var t=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=e,this.charSizes=Object.create(null),this.allowBoldFonts=t&&t.width===e.width&&t.height===e.height,this._emit("changeCharacterSize",{data:e})}},e.prototype.$addObserver=function(){var e=this;this.$observer=new window.ResizeObserver((function(t){e.checkForSizeChanges()})),this.$observer.observe(this.$measureNode)},e.prototype.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var e=this;return this.$pollSizeChangesTimer=l.onIdle((function t(){e.checkForSizeChanges(),l.onIdle(t,500)}),500)},e.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},e.prototype.$measureSizes=function(e){var t={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/c};return 0===t.width||0===t.height?null:t},e.prototype.$measureCharWidth=function(e){return this.$main.textContent=o.stringRepeat(e,c),this.$main.getBoundingClientRect().width/c},e.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return void 0===t&&(t=this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width),t},e.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},e.prototype.$getZoom=function(e){return e&&e.parentElement?(Number(window.getComputedStyle(e).zoom)||1)*this.$getZoom(e.parentElement):1},e.prototype.$initTransformMeasureNodes=function(){var e=function(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]};this.els=s.buildDom([e(0,0),e(h,0),e(0,h),e(h,h)],this.el)},e.prototype.transformCoordinates=function(e,t){function a(e,t,a){var n=e[1]*t[0]-e[0]*t[1];return[(-t[1]*a[0]+t[0]*a[1])/n,(+e[1]*a[0]-e[0]*a[1])/n]}function n(e,t){return[e[0]-t[0],e[1]-t[1]]}function s(e,t){return[e[0]+t[0],e[1]+t[1]]}function o(e,t){return[e*t[0],e*t[1]]}function l(e){var t=e.getBoundingClientRect();return[t.left,t.top]}e&&(e=o(1/this.$getZoom(this.el),e)),this.els||this.$initTransformMeasureNodes();var r=l(this.els[0]),i=l(this.els[1]),c=l(this.els[2]),d=l(this.els[3]),g=a(n(d,i),n(d,c),n(s(i,c),s(d,r))),p=o(1+g[0],n(i,r)),u=o(1+g[1],n(c,r));if(t){var m=t,v=g[0]*m[0]/h+g[1]*m[1]/h+1,f=s(o(m[0],p),o(m[1],u));return s(o(1/v/h,f),r)}var b=n(e,r),w=a(n(p,o(g[0],b)),n(u,o(g[1],b)),b);return o(h,w)},e}();g.prototype.$characterSize={width:0,height:0},n.implement(g.prototype,i),t.FontMetrics=g})),ace.define("ace/css/editor-css",["require","exports","module"],(function(e,t,a){a.exports='\n.ace_br1 {border-top-left-radius : 3px;}\n.ace_br2 {border-top-right-radius : 3px;}\n.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\n.ace_br4 {border-bottom-right-radius: 3px;}\n.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\n.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\n.ace_br8 {border-bottom-left-radius : 3px;}\n.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\n.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\n\n\n.ace_editor {\n position: relative;\n overflow: hidden;\n padding: 0;\n font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'Source Code Pro\', \'source-code-pro\', monospace;\n direction: ltr;\n text-align: left;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n forced-color-adjust: none;\n}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n.ace_invisible {\n font-variant-ligatures: none;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold, .ace_gutter-cell.ace_security, .ace_icon.ace_security, .ace_icon.ace_security_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_warning, .ace_icon.ace_warning, .ace_icon.ace_warning_fold {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_gutter-cell.ace_info, .ace_icon.ace_info, .ace_gutter-cell.ace_hint, .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info, .ace_dark .ace_gutter-cell.ace_hint, .ace_dark .ace_icon.ace_hint {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");\n}\n\n.ace_icon_svg.ace_error {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJyZWQiIHNoYXBlLXJlbmRlcmluZz0iZ2VvbWV0cmljUHJlY2lzaW9uIj4KPGNpcmNsZSBmaWxsPSJub25lIiBjeD0iOCIgY3k9IjgiIHI9IjciIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPGxpbmUgeDE9IjExIiB5MT0iNSIgeDI9IjUiIHkyPSIxMSIvPgo8bGluZSB4MT0iMTEiIHkxPSIxMSIgeDI9IjUiIHkyPSI1Ii8+CjwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0iZGFya29yYW5nZSIgZmlsbD0ibm9uZSIgc2hhcGUtcmVuZGVyaW5nPSJnZW9tZXRyaWNQcmVjaXNpb24iPgogICAgICAgIDxwYXRoIGNsYXNzPSJzdHJva2UtbGluZWpvaW4tcm91bmQiIGQ9Ik04IDE0LjgzMDdDOCAxNC44MzA3IDIgMTIuOTA0NyAyIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOEM3Ljk4OTk5IDEuMzQ5MTggMTAuNjkgMy4yNjU0OCAxNCAzLjI2NTQ4VjguMDg5OTJDMTQgMTIuOTA0NyA4IDE0LjgzMDcgOCAxNC44MzA3WiIvPgogICAgICAgIDxwYXRoIGQ9Ik0yIDguMDg5OTJWMy4yNjU0OEM1LjMxIDMuMjY1NDggNy45ODk5OSAxLjM0OTE4IDcuOTg5OTkgMS4zNDkxOCIvPgogICAgICAgIDxwYXRoIGQ9Ik0xMy45OSA4LjA4OTkyVjMuMjY1NDhDMTAuNjggMy4yNjU0OCA4IDEuMzQ5MTggOCAxLjM0OTE4Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggNFY5Ii8+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTggMTBWMTIiLz4KICAgIDwvZz4KPC9zdmc+");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJkYXJrb3JhbmdlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+Cjxwb2x5Z29uIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGZpbGw9Im5vbmUiIHBvaW50cz0iOCAxIDE1IDE1IDEgMTUgOCAxIi8+CjxyZWN0IHg9IjgiIHk9IjEyIiB3aWR0aD0iMC4wMSIgaGVpZ2h0PSIwLjAxIi8+CjxsaW5lIHgxPSI4IiB5MT0iNiIgeDI9IjgiIHkyPSIxMCIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: darkorange;\n}\n.ace_icon_svg.ace_info {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiI+CjxnIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlPSJibHVlIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CjxjaXJjbGUgZmlsbD0ibm9uZSIgY3g9IjgiIGN5PSI4IiByPSI3IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjxwb2x5bGluZSBwb2ludHM9IjggMTEgOCA4Ii8+Cjxwb2x5bGluZSBwb2ludHM9IjkgOCA2IDgiLz4KPGxpbmUgeDE9IjEwIiB5MT0iMTEiIHgyPSI2IiB5Mj0iMTEiLz4KPHJlY3QgeD0iOCIgeT0iNSIgd2lkdGg9IjAuMDEiIGhlaWdodD0iMC4wMSIvPgo8L2c+Cjwvc3ZnPg==");\n background-color: royalblue;\n}\n.ace_icon_svg.ace_hint {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMTYiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgICA8ZyBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZT0ic2lsdmVyIiBmaWxsPSJub25lIiBzaGFwZS1yZW5kZXJpbmc9Imdlb21ldHJpY1ByZWNpc2lvbiI+CiAgICAgICAgPHBhdGggY2xhc3M9InN0cm9rZS1saW5lam9pbi1yb3VuZCIgZD0iTTYgMTRIMTAiLz4KICAgICAgICA8cGF0aCBkPSJNOCAxMUg5QzkgOS40NzAwMiAxMiA4LjU0MDAyIDEyIDUuNzYwMDJDMTIuMDIgNC40MDAwMiAxMS4zOSAzLjM2MDAyIDEwLjQzIDIuNjcwMDJDOSAxLjY0MDAyIDcuMDAwMDEgMS42NDAwMiA1LjU3MDAxIDIuNjcwMDJDNC42MTAwMSAzLjM2MDAyIDMuOTggNC40MDAwMiA0IDUuNzYwMDJDNCA4LjU0MDAyIDcuMDAwMDEgOS40NzAwMiA3LjAwMDAxIDExSDhaIi8+CiAgICA8L2c+Cjwvc3ZnPg==");\n background-color: silver;\n}\n\n.ace_icon_svg.ace_error_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSI+CiAgPHBhdGggZD0ibSAxOC45Mjk4NTEsNy44Mjk4MDc2IGMgMC4xNDYzNTMsNi4zMzc0NjA0IC02LjMyMzE0Nyw3Ljc3Nzg0NDQgLTcuNDc3OTEyLDcuNzc3ODQ0NCAtMi4xMDcyNzI2LC0wLjEyODc1IDUuMTE3Njc4LDAuMzU2MjQ5IDUuMDUxNjk4LC03Ljg3MDA2MTggLTAuNjA0NjcyLC04LjAwMzk3MzQ5IC03LjA3NzI3MDYsLTcuNTYzMTE4OSAtNC44NTczLC03LjQzMDM5NTU2IDEuNjA2LC0wLjExNTE0MjI1IDYuODk3NDg1LDEuMjYyNTQ1OTYgNy4yODM1MTQsNy41MjI2MTI5NiB6IiBmaWxsPSJjcmltc29uIiBzdHJva2Utd2lkdGg9IjIiLz4KICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0ibSA4LjExNDc1NjIsMi4wNTI5ODI4IGMgMy4zNDkxNjk4LDAgNi4wNjQxMzI4LDIuNjc2ODYyNyA2LjA2NDEzMjgsNS45Nzg5NTMgMCwzLjMwMjExMjIgLTIuNzE0OTYzLDUuOTc4OTIwMiAtNi4wNjQxMzI4LDUuOTc4OTIwMiAtMy4zNDkxNDczLDAgLTYuMDY0MTc3MiwtMi42NzY4MDggLTYuMDY0MTc3MiwtNS45Nzg5MjAyIDAuMDA1MzksLTMuMjk5ODg2MSAyLjcxNzI2NTYsLTUuOTczNjQwOCA2LjA2NDE3NzIsLTUuOTc4OTUzIHogbSAwLC0xLjczNTgyNzE5IGMgLTQuMzIxNDgzNiwwIC03LjgyNDc0MDM4LDMuNDU0MDE4NDkgLTcuODI0NzQwMzgsNy43MTQ3ODAxOSAwLDQuMjYwNzI4MiAzLjUwMzI1Njc4LDcuNzE0NzQ1MiA3LjgyNDc0MDM4LDcuNzE0NzQ1MiA0LjMyMTQ0OTgsMCA3LjgyNDY5OTgsLTMuNDU0MDE3IDcuODI0Njk5OCwtNy43MTQ3NDUyIDAsLTIuMDQ2MDkxNCAtMC44MjQzOTIsLTQuMDA4MzY3MiAtMi4yOTE3NTYsLTUuNDU1MTc0NiBDIDEyLjE4MDIyNSwxLjEyOTk2NDggMTAuMTkwMDEzLDAuMzE3MTU1NjEgOC4xMTQ3NTYyLDAuMzE3MTU1NjEgWiBNIDYuOTM3NDU2Myw4LjI0MDU5ODUgNC42NzE4Njg1LDEwLjQ4NTg1MiA2LjAwODY4MTQsMTEuODc2NzI4IDguMzE3MDAzNSw5LjYwMDc5MTEgMTAuNjI1MzM3LDExLjg3NjcyOCAxMS45NjIxMzgsMTAuNDg1ODUyIDkuNjk2NTUwOCw4LjI0MDU5ODUgMTEuOTYyMTM4LDYuMDA2ODA2NiAxMC41NzMyNDYsNC42Mzc0MzM1IDguMzE3MDAzNSw2Ljg3MzQyOTcgNi4wNjA3NjA3LDQuNjM3NDMzNSA0LjY3MTg2ODUsNi4wMDY4MDY2IFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_security_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,CjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB2aWV3Qm94PSIwIDAgMTcgMTQiIGZpbGw9Im5vbmUiPgogICAgPHBhdGggZD0iTTEwLjAwMDEgMTMuNjk5MkMxMC4wMDAxIDEzLjY5OTIgMTEuOTI0MSAxMy40NzYzIDEzIDEyLjY5OTJDMTQuNDEzOSAxMS42NzgxIDE2IDEwLjUgMTYuMTI1MSA2LjgxMTI2VjIuNTg5ODdDMTYuMTI1MSAyLjU0NzY4IDE2LjEyMjEgMi41MDYxOSAxNi4xMTY0IDIuNDY1NTlWMS43MTQ4NUgxNS4yNDE0TDE1LjIzMDcgMS43MTQ4NEwxNC42MjUxIDEuNjk5MjJWNi44MTEyM0MxNC42MjUxIDguNTEwNjEgMTQuNjI1MSA5LjQ2NDYxIDEyLjc4MjQgMTEuNzIxQzEyLjE1ODYgMTIuNDg0OCAxMC4wMDAxIDEzLjY5OTIgMTAuMDAwMSAxMy42OTkyWiIgZmlsbD0iY3JpbXNvbiIgc3Ryb2tlLXdpZHRoPSIyIi8+CiAgICA8cGF0aCBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgZD0iTTcuMzM2MDkgMC4zNjc0NzVDNy4wMzIxNCAwLjE1MjY1MiA2LjYyNTQ4IDAuMTUzNjE0IDYuMzIyNTMgMC4zNjk5OTdMNi4zMDg2OSAwLjM3OTU1NEM2LjI5NTUzIDAuMzg4NTg4IDYuMjczODggMC40MDMyNjYgNi4yNDQxNyAwLjQyMjc4OUM2LjE4NDcxIDAuNDYxODYgNi4wOTMyMSAwLjUyMDE3MSA1Ljk3MzEzIDAuNTkxMzczQzUuNzMyNTEgMC43MzQwNTkgNS4zNzk5IDAuOTI2ODY0IDQuOTQyNzkgMS4xMjAwOUM0LjA2MTQ0IDEuNTA5NyAyLjg3NTQxIDEuODgzNzcgMS41ODk4NCAxLjg4Mzc3SDAuNzE0ODQ0VjIuNzU4NzdWNi45ODAxNUMwLjcxNDg0NCA5LjQ5Mzc0IDIuMjg4NjYgMTEuMTk3MyAzLjcwMjU0IDEyLjIxODVDNC40MTg0NSAxMi43MzU1IDUuMTI4NzQgMTMuMTA1MyA1LjY1NzMzIDEzLjM0NTdDNS45MjI4NCAxMy40NjY0IDYuMTQ1NjYgMTMuNTU1OSA2LjMwNDY1IDEzLjYxNjFDNi4zODQyMyAxMy42NDYyIDYuNDQ4MDUgMTMuNjY5IDYuNDkzNDkgMTMuNjg0OEM2LjUxNjIyIDEzLjY5MjcgNi41MzQzOCAxMy42OTg5IDYuNTQ3NjQgMTMuNzAzM0w2LjU2MzgyIDEzLjcwODdMNi41NjkwOCAxMy43MTA0TDYuNTcwOTkgMTMuNzExTDYuODM5ODQgMTMuNzUzM0w2LjU3MjQyIDEzLjcxMTVDNi43NDYzMyAxMy43NjczIDYuOTMzMzUgMTMuNzY3MyA3LjEwNzI3IDEzLjcxMTVMNy4xMDg3IDEzLjcxMUw3LjExMDYxIDEzLjcxMDRMNy4xMTU4NyAxMy43MDg3TDcuMTMyMDUgMTMuNzAzM0M3LjE0NTMxIDEzLjY5ODkgNy4xNjM0NiAxMy42OTI3IDcuMTg2MTkgMTMuNjg0OEM3LjIzMTY0IDEzLjY2OSA3LjI5NTQ2IDEzLjY0NjIgNy4zNzUwMyAxMy42MTYxQzcuNTM0MDMgMTMuNTU1OSA3Ljc1Njg1IDEzLjQ2NjQgOC4wMjIzNiAxMy4zNDU3QzguNTUwOTUgMTMuMTA1MyA5LjI2MTIzIDEyLjczNTUgOS45NzcxNSAxMi4yMTg1QzExLjM5MSAxMS4xOTczIDEyLjk2NDggOS40OTM3NyAxMi45NjQ4IDYuOTgwMThWMi43NTg4QzEyLjk2NDggMi43MTY2IDEyLjk2MTkgMi42NzUxMSAxMi45NTYxIDIuNjM0NTFWMS44ODM3N0gxMi4wODExQzEyLjA3NzUgMS44ODM3NyAxMi4wNzQgMS44ODM3NyAxMi4wNzA0IDEuODgzNzdDMTAuNzk3OSAxLjg4MDA0IDkuNjE5NjIgMS41MTEwMiA4LjczODk0IDEuMTI0ODZDOC43MzUzNCAxLjEyMzI3IDguNzMxNzQgMS4xMjE2OCA4LjcyODE0IDEuMTIwMDlDOC4yOTEwMyAwLjkyNjg2NCA3LjkzODQyIDAuNzM0MDU5IDcuNjk3NzkgMC41OTEzNzNDNy41Nzc3MiAwLjUyMDE3MSA3LjQ4NjIyIDAuNDYxODYgNy40MjY3NiAwLjQyMjc4OUM3LjM5NzA1IDAuNDAzMjY2IDcuMzc1MzkgMC4zODg1ODggNy4zNjIyNCAwLjM3OTU1NEw3LjM0ODk2IDAuMzcwMzVDNy4zNDg5NiAwLjM3MDM1IDcuMzQ4NDcgMC4zNzAwMiA3LjM0NTYzIDAuMzc0MDU0TDcuMzM3NzkgMC4zNjg2NTlMNy4zMzYwOSAwLjM2NzQ3NVpNOC4wMzQ3MSAyLjcyNjkxQzguODYwNCAzLjA5MDYzIDkuOTYwNjYgMy40NjMwOSAxMS4yMDYxIDMuNTg5MDdWNi45ODAxNUgxMS4yMTQ4QzExLjIxNDggOC42Nzk1MyAxMC4xNjM3IDkuOTI1MDcgOC45NTI1NCAxMC43OTk4QzguMzU1OTUgMTEuMjMwNiA3Ljc1Mzc0IDExLjU0NTQgNy4yOTc5NiAxMS43NTI3QzcuMTE2NzEgMTEuODM1MSA2Ljk2MDYyIDExLjg5OTYgNi44Mzk4NCAxMS45NDY5QzYuNzE5MDYgMTEuODk5NiA2LjU2Mjk3IDExLjgzNTEgNi4zODE3MyAxMS43NTI3QzUuOTI1OTUgMTEuNTQ1NCA1LjMyMzczIDExLjIzMDYgNC43MjcxNSAxMC43OTk4QzMuNTE2MDMgOS45MjUwNyAyLjQ2NDg0IDguNjc5NTUgMi40NjQ4NCA2Ljk4MDE4VjMuNTg5MDlDMy43MTczOCAzLjQ2MjM5IDQuODIzMDggMy4wODYzOSA1LjY1MDMzIDIuNzIwNzFDNi4xNDIyOCAyLjUwMzI0IDYuNTQ0ODUgMi4yODUzNyA2LjgzMjU0IDIuMTE2MjRDNy4xMjE4MSAyLjI4NTM1IDcuNTI3IDIuNTAzNTIgOC4wMjE5NiAyLjcyMTMxQzguMDI2MiAyLjcyMzE3IDguMDMwNDUgMi43MjUwNCA4LjAzNDcxIDIuNzI2OTFaTTUuOTY0ODQgMy40MDE0N1Y3Ljc3NjQ3SDcuNzE0ODRWMy40MDE0N0g1Ljk2NDg0Wk01Ljk2NDg0IDEwLjQwMTVWOC42NTE0N0g3LjcxNDg0VjEwLjQwMTVINS45NjQ4NFoiIGZpbGw9ImNyaW1zb24iIHN0cm9rZS13aWR0aD0iMiIvPgo8L3N2Zz4=");\n background-color: crimson;\n}\n.ace_icon_svg.ace_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(33em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n position: relative;\n font-family: arial;\n transform: scale(0.9);\n transform-origin: left;\n white-space: pre;\n opacity: 0.7;\n margin: 0 10px;\n z-index: 1;\n}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text_container > div {\n white-space: pre;\n}\n\n.ghost_text_line_wrapped::after {\n content: "↩";\n position: absolute;\n}\n\n.ace_lineWidgetContainer.ace_ghost_text {\n margin: 0px 4px\n}\n\n.ace_screenreader-only {\n position:absolute;\n left:-10000px;\n top:auto;\n width:1px;\n height:1px;\n overflow:hidden;\n}\n\n.ace_hidden_token {\n display: none;\n}'})),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=e("../lib/oop"),o=e("../lib/event_emitter").EventEmitter,l=function(){function e(e,t){this.canvas=n.createElement("canvas"),this.renderer=t,this.pixelRatio=1,this.maxHeight=t.layerConfig.maxHeight,this.lineHeight=t.layerConfig.lineHeight,this.canvasHeight=e.parent.scrollHeight,this.heightRatio=this.canvasHeight/this.maxHeight,this.canvasWidth=e.width,this.minDecorationHeight=2*this.pixelRatio|0,this.halfMinDecorationHeight=this.minDecorationHeight/2|0,this.canvas.width=this.canvasWidth,this.canvas.height=this.canvasHeight,this.canvas.style.top="0px",this.canvas.style.right="0px",this.canvas.style.zIndex="7px",this.canvas.style.position="absolute",this.colors={},this.colors.dark={error:"rgba(255, 18, 18, 1)",warning:"rgba(18, 136, 18, 1)",info:"rgba(18, 18, 136, 1)"},this.colors.light={error:"rgb(255,51,51)",warning:"rgb(32,133,72)",info:"rgb(35,68,138)"},e.element.appendChild(this.canvas)}return e.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light;e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}));for(var o=this.renderer.session.$foldData,l=0;lthis.canvasHeight&&(g=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(g-this.halfMinDecorationHeight),h=Math.round(g+this.halfMinDecorationHeight)}a.fillStyle=t[n[l].type]||null,a.fillRect(0,c,this.canvasWidth,h-d)}}var p=this.renderer.session.selection.getCursor();p&&(i=this.compensateFoldRows(p.row,o),c=Math.round((p.row-i)*this.lineHeight*this.heightRatio),a.fillStyle="rgba(0, 0, 0, 0.5)",a.fillRect(0,c,this.canvasWidth,2))},e.prototype.compensateFoldRows=function(e,t){var a=0;if(t&&t.length>0)for(var n=0;nt[n].start.row&&e=t[n].end.row&&(a+=t[n].end.row-t[n].start.row);return a},e}();s.implement(l.prototype,o),t.Decorator=l})),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/scrollbar_custom","ace/scrollbar_custom","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/css/editor-css","ace/layer/decorators","ace/lib/useragent","ace/layer/text_util"],(function(e,t,a){"use strict";var n=e("./lib/oop"),s=e("./lib/dom"),o=e("./lib/lang"),l=e("./config"),r=e("./layer/gutter").Gutter,i=e("./layer/marker").Marker,c=e("./layer/text").Text,d=e("./layer/cursor").Cursor,h=e("./scrollbar").HScrollBar,g=e("./scrollbar").VScrollBar,p=e("./scrollbar_custom").HScrollBar,u=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,v=e("./layer/font_metrics").FontMetrics,f=e("./lib/event_emitter").EventEmitter,b=e("./css/editor-css"),w=e("./layer/decorators").Decorator,y=e("./lib/useragent"),x=e("./layer/text_util").isTextToken;s.importCssString(b,"ace_editor.css",!1);var k=function(){function e(e,t){var a=this;this.container=e||s.createElement("div"),s.addCssClass(this.container,"ace_editor"),s.HI_DPI&&s.addCssClass(this.container,"ace_hidpi"),this.setTheme(t),null==l.get("useStrictCSP")&&l.set("useStrictCSP",!1),this.$gutter=s.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden","true"),this.scroller=s.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=s.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new r(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var n=this.$textLayer=new c(this.content);this.canvas=n.element,this.$markerFront=new i(this.content),this.$cursorLayer=new d(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new g(this.container,this),this.scrollBarH=new h(this.container,this),this.scrollBarV.on("scroll",(function(e){a.$scrollAnimation||a.session.setScrollTop(e.data-a.scrollMargin.top)})),this.scrollBarH.on("scroll",(function(e){a.$scrollAnimation||a.session.setScrollLeft(e.data-a.scrollMargin.left)})),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new v(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",(function(e){a.updateCharacterSize(),a.onResize(!0,a.gutterWidth,a.$size.width,a.$size.height),a._signal("changeCharacterSize",e)})),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!y.isIOS,this.$loop=new m(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),this.$addResizeObserver(),l.resetOptions(this),l._signal("renderer",this)}return e.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),s.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},e.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=e,e&&this.scrollMargin.top&&e.getScrollTop()<=0&&e.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(e),this.$markerBack.setSession(e),this.$markerFront.setSession(e),this.$gutterLayer.setSession(e),this.$textLayer.setSession(e),e&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},e.prototype.updateLines=function(e,t,a){if(void 0===t&&(t=1/0),this.$changedLines?(this.$changedLines.firstRow>e&&(this.$changedLines.firstRow=e),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},e.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},e.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},e.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},e.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},e.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},e.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},e.prototype.onResize=function(e,t,a,n){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=e?1:0;var s=this.container;n||(n=s.clientHeight||s.scrollHeight),!n&&this.$maxLines&&this.lineHeight>1&&(s.style.height&&"0px"!=s.style.height||(s.style.height="1px",n=s.clientHeight||s.scrollHeight)),a||(a=s.clientWidth||s.scrollWidth);var o=this.$updateCachedSize(e,t,a,n);if(this.$resizeTimer&&this.$resizeTimer.cancel(),!this.$size.scrollerHeight||!a&&!n)return this.resizing=0;e&&(this.$gutterLayer.$padding=null),e?this.$renderChanges(o|this.$changes,!0):this.$loop.schedule(o|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.$customScrollbar&&this.$updateCustomScrollbar(!0)}},e.prototype.$updateCachedSize=function(e,t,a,n){n-=this.$extraHeight||0;var o=0,l=this.$size,r={width:l.width,height:l.height,scrollerHeight:l.scrollerHeight,scrollerWidth:l.scrollerWidth};if(n&&(e||l.height!=n)&&(l.height=n,o|=this.CHANGE_SIZE,l.scrollerHeight=l.height,this.$horizScroll&&(l.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.setHeight(l.scrollerHeight),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",o|=this.CHANGE_SCROLL),a&&(e||l.width!=a)){o|=this.CHANGE_SIZE,l.width=a,null==t&&(t=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=t,s.setStyle(this.scrollBarH.element.style,"left",t+"px"),s.setStyle(this.scroller.style,"left",t+this.margin.left+"px"),l.scrollerWidth=Math.max(0,a-t-this.scrollBarV.getWidth()-this.margin.h),s.setStyle(this.$gutter.style,"left",this.margin.left+"px");var i=this.scrollBarV.getWidth()+"px";s.setStyle(this.scrollBarH.element.style,"right",i),s.setStyle(this.scroller.style,"right",i),s.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),this.scrollBarH.setWidth(l.scrollerWidth),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||e)&&(o|=this.CHANGE_FULL)}return l.$dirty=!a||!n,o&&this._signal("resize",r),o},e.prototype.onGutterResize=function(e){var t=this.$showGutter?e:0;t!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,t,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},e.prototype.adjustWrapLimit=function(){var e=this.$size.scrollerWidth-2*this.$padding,t=Math.floor(e/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},e.prototype.setAnimatedScroll=function(e){this.setOption("animatedScroll",e)},e.prototype.getAnimatedScroll=function(){return this.$animatedScroll},e.prototype.setShowInvisibles=function(e){this.setOption("showInvisibles",e),this.session.$bidiHandler.setShowInvisibles(e)},e.prototype.getShowInvisibles=function(){return this.getOption("showInvisibles")},e.prototype.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},e.prototype.setDisplayIndentGuides=function(e){this.setOption("displayIndentGuides",e)},e.prototype.getHighlightIndentGuides=function(){return this.getOption("highlightIndentGuides")},e.prototype.setHighlightIndentGuides=function(e){this.setOption("highlightIndentGuides",e)},e.prototype.setShowPrintMargin=function(e){this.setOption("showPrintMargin",e)},e.prototype.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},e.prototype.setPrintMarginColumn=function(e){this.setOption("printMarginColumn",e)},e.prototype.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},e.prototype.getShowGutter=function(){return this.getOption("showGutter")},e.prototype.setShowGutter=function(e){return this.setOption("showGutter",e)},e.prototype.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},e.prototype.setFadeFoldWidgets=function(e){this.setOption("fadeFoldWidgets",e)},e.prototype.setHighlightGutterLine=function(e){this.setOption("highlightGutterLine",e)},e.prototype.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},e.prototype.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var e=s.createElement("div");e.className="ace_layer ace_print-margin-layer",this.$printMarginEl=s.createElement("div"),this.$printMarginEl.className="ace_print-margin",e.appendChild(this.$printMarginEl),this.content.insertBefore(e,this.content.firstChild)}var t=this.$printMarginEl.style;t.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",t.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},e.prototype.getContainerElement=function(){return this.container},e.prototype.getMouseEventTarget=function(){return this.scroller},e.prototype.getTextAreaContainer=function(){return this.container},e.prototype.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var e=this.textarea.style,t=this.$composition;if(this.$keepTextAreaAtCursor||t){var a=this.$cursorLayer.$pixelPos;if(a){t&&t.markerRange&&(a=this.$cursorLayer.getPixelPosition(t.markerRange.start,!0));var n=this.layerConfig,o=a.top,l=a.left;o-=n.offset;var r=t&&t.useTextareaForIME||y.isMobile?this.lineHeight:1;if(o<0||o>n.height-r)s.translate(this.textarea,0,0);else{var i=1,c=this.$size.height-r;if(t)if(t.useTextareaForIME){var d=this.textarea.value;i=this.characterWidth*this.session.$getStringScreenWidth(d)[0]}else o+=this.lineHeight+2;else o+=this.lineHeight;(l-=this.scrollLeft)>this.$size.scrollerWidth-i&&(l=this.$size.scrollerWidth-i),l+=this.gutterWidth+this.margin.left,s.setStyle(e,"height",r+"px"),s.setStyle(e,"width",i+"px"),s.translate(this.textarea,Math.min(l,this.$size.scrollerWidth-i),Math.min(o,c))}}}else s.translate(this.textarea,-100,0)}},e.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},e.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},e.prototype.getLastFullyVisibleRow=function(){var e=this.layerConfig,t=e.lastRow;return this.session.documentToScreenRow(t,0)*e.lineHeight-this.session.getScrollTop()>e.height-e.lineHeight?t-1:t},e.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},e.prototype.setPadding=function(e){this.$padding=e,this.$textLayer.setPadding(e),this.$cursorLayer.setPadding(e),this.$markerFront.setPadding(e),this.$markerBack.setPadding(e),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},e.prototype.setScrollMargin=function(e,t,a,n){var s=this.scrollMargin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|a,s.v=s.top+s.bottom,s.h=s.left+s.right,s.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-s.top),this.updateFull()},e.prototype.setMargin=function(e,t,a,n){var s=this.margin;s.top=0|e,s.bottom=0|t,s.right=0|n,s.left=0|a,s.v=s.top+s.bottom,s.h=s.left+s.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},e.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},e.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},e.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},e.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},e.prototype.$updateScrollBarV=function(){var e=this.layerConfig.maxHeight,t=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(e-=(t-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>e-t&&(e=this.scrollTop+t,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(e+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},e.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},e.prototype.freeze=function(){this.$frozen=!0},e.prototype.unfreeze=function(){this.$frozen=!1},e.prototype.$renderChanges=function(e,t){if(this.$changes&&(e|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(e||t)){if(this.$size.$dirty)return this.$changes|=e,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",e),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var a=this.layerConfig;if(e&this.CHANGE_FULL||e&this.CHANGE_SIZE||e&this.CHANGE_TEXT||e&this.CHANGE_LINES||e&this.CHANGE_SCROLL||e&this.CHANGE_H_SCROLL){if(e|=this.$computeLayerConfig()|this.$loop.clear(),a.firstRow!=this.layerConfig.firstRow&&a.firstRowScreen==this.layerConfig.firstRowScreen){var n=this.scrollTop+(a.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight;n>0&&(this.scrollTop=n,e|=this.CHANGE_SCROLL,e|=this.$computeLayerConfig()|this.$loop.clear())}a=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),s.translate(this.content,-this.scrollLeft,-a.offset);var o=a.width+2*this.$padding+"px",l=a.minHeight+"px";s.setStyle(this.content.style,"width",o),s.setStyle(this.content.style,"height",l)}if(e&this.CHANGE_H_SCROLL&&(s.translate(this.content,-this.scrollLeft,-a.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller ":"ace_scroller ace_scroll-left ",this.enableKeyboardAccessibility&&(this.scroller.className+=this.keyboardFocusClassName)),e&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a),this.$markerBack.update(a),this.$markerFront.update(a),this.$cursorLayer.update(a),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);if(e&this.CHANGE_SCROLL)return this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(a):this.$textLayer.scrollLines(a),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(a):this.$gutterLayer.scrollLines(a)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a),this.$markerBack.update(a),this.$markerFront.update(a),this.$cursorLayer.update(a),this.$moveTextAreaToCursor(),void this._signal("afterRender",e);e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(a),this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(a),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(a)),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(a),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(a),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(a),this._signal("afterRender",e)}else this.$changes|=e},e.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,a=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(a+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&a>this.$maxPixelHeight&&(a=this.$maxPixelHeight);var n=!(a<=2*this.lineHeight)&&e>t;if(a!=this.desiredHeight||this.$size.height!=this.desiredHeight||n!=this.$vScroll){n!=this.$vScroll&&(this.$vScroll=n,this.scrollBarV.setVisible(n));var s=this.container.clientWidth;this.container.style.height=a+"px",this.$updateCachedSize(!0,this.$gutterWidth,s,a),this.desiredHeight=a,this._signal("autosize")}},e.prototype.$computeLayerConfig=function(){var e=this.session,t=this.$size,a=t.height<=2*this.lineHeight,n=this.session.getScreenLength()*this.lineHeight,s=this.$getLongestLine(),o=!a&&(this.$hScrollBarAlwaysVisible||t.scrollerWidth-s-2*this.$padding<0),l=this.$horizScroll!==o;l&&(this.$horizScroll=o,this.scrollBarH.setVisible(o));var r=this.$vScroll;this.$maxLines&&this.lineHeight>1&&(this.$autosize(),a=t.height<=2*this.lineHeight);var i=t.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(t.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;n+=c;var d=this.scrollMargin;this.session.setScrollTop(Math.max(-d.top,Math.min(this.scrollTop,n-t.scrollerHeight+d.bottom))),this.session.setScrollLeft(Math.max(-d.left,Math.min(this.scrollLeft,s+2*this.$padding-t.scrollerWidth+d.right)));var h=!a&&(this.$vScrollBarAlwaysVisible||t.scrollerHeight-n+c<0||this.scrollTop>d.top),g=r!==h;g&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var p,u,m=this.scrollTop%this.lineHeight,v=Math.ceil(i/this.lineHeight)-1,f=Math.max(0,Math.round((this.scrollTop-m)/this.lineHeight)),b=f+v,w=this.lineHeight;f=e.screenToDocumentRow(f,0);var y=e.getFoldLine(f);y&&(f=y.start.row),p=e.documentToScreenRow(f,0),u=e.getRowLength(f)*w,b=Math.min(e.screenToDocumentRow(b,0),e.getLength()-1),i=t.scrollerHeight+e.getRowLength(b)*w+u,m=this.scrollTop-p*w;var x=0;return(this.layerConfig.width!=s||l)&&(x=this.CHANGE_H_SCROLL),(l||g)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,t.width,t.height),this._signal("scrollbarVisibilityChanged"),g&&(s=this.$getLongestLine())),this.layerConfig={width:s,padding:this.$padding,firstRow:f,firstRowScreen:p,lastRow:b,lineHeight:w,characterWidth:this.characterWidth,minHeight:i,maxHeight:n,offset:m,gutterOffset:w?Math.max(0,Math.ceil((m+t.height-t.scrollerHeight)/w)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(s-this.$padding),x},e.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow;this.$changedLines=null;var a=this.layerConfig;if(!(e>a.lastRow+1||tthis.$textLayer.MAX_LINE_LENGTH&&(e=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(e*this.characterWidth))},e.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},e.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},e.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},e.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},e.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},e.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},e.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},e.prototype.showCursor=function(){this.$cursorLayer.showCursor()},e.prototype.scrollSelectionIntoView=function(e,t,a){this.scrollCursorIntoView(e,a),this.scrollCursorIntoView(t,a)},e.prototype.scrollCursorIntoView=function(e,t,a){if(0!==this.$size.scrollerHeight){var n=this.$cursorLayer.getPixelPosition(e),s=n.left,o=n.top,l=a&&a.top||0,r=a&&a.bottom||0;this.$scrollAnimation&&(this.$stopAnimation=!0);var i=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;i+l>o?(t&&i+l>o+this.lineHeight&&(o-=t*this.$size.scrollerHeight),0===o&&(o=-this.scrollMargin.top),this.session.setScrollTop(o)):i+this.$size.scrollerHeight-r=1-this.scrollMargin.top||t>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||e<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||e>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},e.prototype.pixelToScreenCoordinates=function(e,t){var a;if(this.$hasCssTransforms){a={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([e,t]);e=n[1]-this.gutterWidth-this.margin.left,t=n[0]}else a=this.scroller.getBoundingClientRect();var s=e+this.scrollLeft-a.left-this.$padding,o=s/this.characterWidth,l=Math.floor((t+this.scrollTop-a.top)/this.lineHeight),r=this.$blockCursor?Math.floor(o):Math.round(o);return{row:l,column:r,side:o-r>0?1:-1,offsetX:s}},e.prototype.screenToTextCoordinates=function(e,t){var a;if(this.$hasCssTransforms){a={top:0,left:0};var n=this.$fontMetrics.transformCoordinates([e,t]);e=n[1]-this.gutterWidth-this.margin.left,t=n[0]}else a=this.scroller.getBoundingClientRect();var s=e+this.scrollLeft-a.left-this.$padding,o=s/this.characterWidth,l=this.$blockCursor?Math.floor(o):Math.round(o),r=Math.floor((t+this.scrollTop-a.top)/this.lineHeight);return this.session.screenToDocumentPosition(r,Math.max(l,0),s)},e.prototype.textToScreenCoordinates=function(e,t){var a=this.scroller.getBoundingClientRect(),n=this.session.documentToScreenPosition(e,t),s=this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,e)?this.session.$bidiHandler.getPosLeft(n.column):Math.round(n.column*this.characterWidth)),o=n.row*this.lineHeight;return{pageX:a.left+s-this.scrollLeft,pageY:a.top+o-this.scrollTop}},e.prototype.visualizeFocus=function(){s.addCssClass(this.container,"ace_focus")},e.prototype.visualizeBlur=function(){s.removeCssClass(this.container,"ace_focus")},e.prototype.showComposition=function(e){this.$composition=e,e.cssText||(e.cssText=this.textarea.style.cssText),null==e.useTextareaForIME&&(e.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(s.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):e.markerId=this.session.addMarker(e.markerRange,"ace_composition_marker","text")},e.prototype.setCompositionText=function(e){var t=this.session.selection.cursor;this.addToken(e,"composition_placeholder",t.row,t.column),this.$moveTextAreaToCursor()},e.prototype.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),s.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var e=this.session.selection.cursor;this.removeExtraToken(e.row,e.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},e.prototype.setGhostText=function(e,t){var a=this.session.selection.cursor,n=t||{row:a.row,column:a.column};this.removeGhostText();var o=this.$calculateWrappedTextChunks(e,n);this.addToken(o[0].text,"ghost_text",n.row,n.column),this.$ghostText={text:e,position:{row:n.row,column:n.column}};var l=s.createElement("div");if(o.length>1){var r,i=this.hideTokensAfterPosition(n.row,n.column);o.slice(1).forEach((function(e){var t=s.createElement("div"),a=s.createElement("span");a.className="ace_ghost_text",e.wrapped&&(t.className="ghost_text_line_wrapped"),0===e.text.length&&(e.text=" "),a.appendChild(s.createTextNode(e.text)),t.appendChild(a),l.appendChild(t),r=t})),i.forEach((function(e){var t=s.createElement("span");x(e.type)||(t.className="ace_"+e.type.replace(/\./g," ace_")),t.appendChild(s.createTextNode(e.value)),r.appendChild(t)})),this.$ghostTextWidget={el:l,row:n.row,column:n.column,className:"ace_ghost_text_container"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget);var c=this.$cursorLayer.getPixelPosition(n,!0),d=this.container.getBoundingClientRect().height,h=o.length*this.lineHeight;if(h0){var c=0;i.push(s[l].length);for(var d=0;d1||Math.abs(e.$size.height-n)>1?e.$resizeTimer.delay():e.$resizeTimer.cancel()})),this.$resizeObserver.observe(this.container)}},e}();k.prototype.CHANGE_CURSOR=1,k.prototype.CHANGE_MARKER=2,k.prototype.CHANGE_GUTTER=4,k.prototype.CHANGE_SCROLL=8,k.prototype.CHANGE_LINES=16,k.prototype.CHANGE_TEXT=32,k.prototype.CHANGE_SIZE=64,k.prototype.CHANGE_MARKER_BACK=128,k.prototype.CHANGE_MARKER_FRONT=256,k.prototype.CHANGE_FULL=512,k.prototype.CHANGE_H_SCROLL=1024,k.prototype.$changes=0,k.prototype.$padding=null,k.prototype.$frozen=!1,k.prototype.STEPS=8,n.implement(k.prototype,f),l.defineOptions(k.prototype,"renderer",{useResizeObserver:{set:function(e){!e&&this.$resizeObserver?(this.$resizeObserver.disconnect(),this.$resizeTimer.cancel(),this.$resizeTimer=this.$resizeObserver=null):e&&!this.$resizeObserver&&this.$addResizeObserver()}},animatedScroll:{initialValue:!1},showInvisibles:{set:function(e){this.$textLayer.setShowInvisibles(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(e){"number"==typeof e&&(this.$printMarginColumn=e),this.$showPrintMargin=!!e,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(e){this.$gutter.style.display=e?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},useSvgGutterIcons:{set:function(e){this.$gutterLayer.$useSvgGutterIcons=e},initialValue:!1},showFoldedAnnotations:{set:function(e){this.$gutterLayer.$showFoldedAnnotations=e},initialValue:!1},fadeFoldWidgets:{set:function(e){s.setCssClass(this.$gutter,"ace_fade-fold-widgets",e)},initialValue:!1},showFoldWidgets:{set:function(e){this.$gutterLayer.setShowFoldWidgets(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(e){this.$textLayer.setDisplayIndentGuides(e)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightIndentGuides:{set:function(e){1==this.$textLayer.setHighlightIndentGuides(e)?this.$textLayer.$highlightIndentGuide():this.$textLayer.$clearActiveIndentGuide(this.$textLayer.$lines.cells)},initialValue:!0},highlightGutterLine:{set:function(e){this.$gutterLayer.setHighlightGutterLine(e),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},hScrollBarAlwaysVisible:{set:function(e){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(e){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(e){"number"==typeof e&&(e+="px"),this.container.style.fontSize=e,this.updateFontSize()},initialValue:12},fontFamily:{set:function(e){this.container.style.fontFamily=e,this.updateFontSize()}},maxLines:{set:function(e){this.updateFull()}},minLines:{set:function(e){this.$minLines<562949953421311||(this.$minLines=0),this.updateFull()}},maxPixelHeight:{set:function(e){this.updateFull()},initialValue:0},scrollPastEnd:{set:function(e){e=+e||0,this.$scrollPastEnd!=e&&(this.$scrollPastEnd=e,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(e){this.$gutterLayer.$fixedWidth=!!e,this.$loop.schedule(this.CHANGE_GUTTER)}},customScrollbar:{set:function(e){this.$updateCustomScrollbar(e)},initialValue:!1},theme:{set:function(e){this.setTheme(e)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0},hasCssTransforms:{},useTextareaForIME:{initialValue:!y.isMobile&&!y.isIE}}),t.VirtualRenderer=k})),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],(function(e,t,a){"use strict";var n=e("../lib/oop"),s=e("../lib/net"),o=e("../lib/event_emitter").EventEmitter,l=e("../config");function r(e){if("undefined"==typeof Worker)return{postMessage:function(){},terminate:function(){}};if(l.get("loadWorkerFromBlob")){var t=function(e){var t="importScripts('"+s.qualifyURL(e)+"');";try{return new Blob([t],{type:"application/javascript"})}catch(e){var a=new(window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder);return a.append(t),a.getBlob("application/javascript")}}(e),a=(window.URL||window.webkitURL).createObjectURL(t);return new Worker(a)}return new Worker(e)}var i=function(e){e.postMessage||(e=this.$createWorkerFromOldConfig.apply(this,arguments)),this.$worker=e,this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){n.implement(this,o),this.$createWorkerFromOldConfig=function(t,a,n,s,o){if(e.nameToUrl&&!e.toUrl&&(e.toUrl=e.nameToUrl),l.get("packaged")||!e.toUrl)s=s||l.moduleUrl(a,"worker");else{var i=this.$normalizePath;s=s||i(e.toUrl("ace/worker/worker.js",null,"_"));var c={};t.forEach((function(t){c[t]=i(e.toUrl(t,null,"_").replace(/(\.js)?(\?.*)?$/,""))}))}return this.$worker=r(s),o&&this.send("importScripts",o),this.$worker.postMessage({init:!0,tlns:c,module:a,classname:n}),this.$worker},this.onMessage=function(e){var t=e.data;switch(t.type){case"event":this._signal(t.name,{data:t.data});break;case"call":var a=this.callbacks[t.id];a&&(a(t.data),delete this.callbacks[t.id]);break;case"error":this.reportError(t.data);break;case"log":window.console&&console.log&&console.log.apply(console,t.data)}},this.reportError=function(e){window.console&&console.error&&console.error(e)},this.$normalizePath=function(e){return s.qualifyURL(e)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker.onerror=function(e){e.preventDefault()},this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(e,t){this.$worker.postMessage({command:e,args:t})},this.call=function(e,t,a){if(a){var n=this.callbackId++;this.callbacks[n]=a,t.push(n)}this.send(e,t)},this.emit=function(e,t){try{t.data&&t.data.err&&(t.data.err={message:t.data.err.message,stack:t.data.err.stack,code:t.data.err.code}),this.$worker&&this.$worker.postMessage({event:e,data:{data:t.data}})}catch(e){console.error(e.stack)}},this.attachToDocument=function(e){this.$doc&&this.terminate(),this.$doc=e,this.call("setValue",[e.getValue()]),e.on("change",this.changeListener,!0)},this.changeListener=function(e){this.deltaQueue||(this.deltaQueue=[],setTimeout(this.$sendDeltaQueue,0)),"insert"==e.action?this.deltaQueue.push(e.start,e.lines):this.deltaQueue.push(e.start,e.end)},this.$sendDeltaQueue=function(){var e=this.deltaQueue;e&&(this.deltaQueue=null,e.length>50&&e.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(i.prototype),t.UIWorkerClient=function(e,t,a){var n=null,s=!1,r=Object.create(o),c=[],d=new i({messageBuffer:c,terminate:function(){},postMessage:function(e){c.push(e),n&&(s?setTimeout(h):h())}});d.setEmitSync=function(e){s=e};var h=function(){var e=c.shift();e.command?n[e.command].apply(n,e.args):e.event&&r._signal(e.event,e.data)};return r.postMessage=function(e){d.onMessage({data:e})},r.callback=function(e,t){this.postMessage({type:"call",id:t,data:e})},r.emit=function(e,t){this.postMessage({type:"event",name:e,data:t})},l.loadModule(["worker",t],(function(e){for(n=new e[a](r);c.length;)h()})),d},t.WorkerClient=i,t.createWorker=r})),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],(function(e,t,a){"use strict";var n=e("./range").Range,s=e("./lib/event_emitter").EventEmitter,o=e("./lib/oop"),l=function(){function e(e,t,a,n,s,o){var l=this;this.length=t,this.session=e,this.doc=e.getDocument(),this.mainClass=s,this.othersClass=o,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate,!0),this.$others=n,this.$onCursorChange=function(){setTimeout((function(){l.onCursorChange()}))},this.$pos=a;var r=e.getUndoManager().$undoStack||e.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=r.length,this.setup(),e.selection.on("changeCursor",this.$onCursorChange)}return e.prototype.setup=function(){var e=this,t=this.doc,a=this.session;this.selectionBefore=a.selection.toJSON(),a.selection.inMultiSelectMode&&a.selection.toSingleRange(),this.pos=t.createAnchor(this.$pos.row,this.$pos.column);var s=this.pos;s.$insertRight=!0,s.detach(),s.markerId=a.addMarker(new n(s.row,s.column,s.row,s.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach((function(a){var n=t.createAnchor(a.row,a.column);n.$insertRight=!0,n.detach(),e.others.push(n)})),a.setUndoSelect(!1)},e.prototype.showOtherMarkers=function(){if(!this.othersActive){var e=this.session,t=this;this.othersActive=!0,this.others.forEach((function(a){a.markerId=e.addMarker(new n(a.row,a.column,a.row,a.column+t.length),t.othersClass,null,!1)}))}},e.prototype.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var e=0;e=this.pos.column&&t.start.column<=this.pos.column+this.length+1,o=t.start.column-this.pos.column;if(this.updateAnchors(e),s&&(this.length+=a),s&&!this.session.$fromUndo)if("insert"===e.action)for(var l=this.others.length-1;l>=0;l--){var r={row:(i=this.others[l]).row,column:i.column+o};this.doc.insertMergedLines(r,e.lines)}else if("remove"===e.action)for(l=this.others.length-1;l>=0;l--){var i;r={row:(i=this.others[l]).row,column:i.column+o},this.doc.remove(new n(r.row,r.column,r.row,r.column-a))}this.$updating=!1,this.updateMarkers()}},e.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},e.prototype.updateMarkers=function(){if(!this.$updating){var e=this,t=this.session,a=function(a,s){t.removeMarker(a.markerId),a.markerId=t.addMarker(new n(a.row,a.column,a.row,a.column+e.length),s,null,!1)};a(this.pos,this.mainClass);for(var s=this.others.length;s--;)a(this.others[s],this.othersClass)}},e.prototype.onCursorChange=function(e){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",e)):(this.hideOtherMarkers(),this._emit("cursorLeave",e))}},e.prototype.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},e.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,a=0;a1?e.multiSelect.joinSelections():e.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(e){e.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(e){e.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(e){e.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],t.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(e){e.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(e){return e&&e.inMultiSelectMode}}];var n=e("../keyboard/hash_handler").HashHandler;t.keyboardHandler=new n(t.multiSelectCommands)})),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],(function(e,t,a){var n=e("./range_list").RangeList,s=e("./range").Range,o=e("./selection").Selection,l=e("./mouse/multi_select_handler").onMouseDown,r=e("./lib/event"),i=e("./lib/lang"),c=e("./commands/multi_select_commands");t.commands=c.defaultCommands.concat(c.multiSelectCommands);var d=new(0,e("./search").Search),h=e("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),function(){this.ranges=null,this.rangeList=null,this.addRange=function(e,t){if(e){if(!this.inMultiSelectMode&&0===this.rangeCount){var a=this.toOrientedRange();if(this.rangeList.add(a),this.rangeList.add(e),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),t||this.fromOrientedRange(e);this.rangeList.removeAll(),this.rangeList.add(a),this.$onAddRange(a)}e.cursor||(e.cursor=e.end);var n=this.rangeList.add(e);return this.$onAddRange(e),n.length&&this.$onRemoveRange(n),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),t||this.fromOrientedRange(e)}},this.toSingleRange=function(e){e=e||this.ranges[0];var t=this.rangeList.removeAll();t.length&&this.$onRemoveRange(t),e&&this.fromOrientedRange(e)},this.substractPoint=function(e){var t=this.rangeList.substractPoint(e);if(t)return this.$onRemoveRange(t),t[0]},this.mergeOverlappingRanges=function(){var e=this.rangeList.merge();e.length&&this.$onRemoveRange(e)},this.$onAddRange=function(e){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(e),this._signal("addRange",{range:e})},this.$onRemoveRange=function(e){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var t=this.rangeList.ranges.pop();e.push(t),this.rangeCount=0}for(var a=e.length;a--;){var n=this.ranges.indexOf(e[a]);this.ranges.splice(n,1)}this._signal("removeRange",{ranges:e}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(t=t||this.ranges[0])&&!t.isEqual(this.getRange())&&this.fromOrientedRange(t)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new n,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var e=this.ranges.length?this.ranges:[this.getRange()],t=[],a=0;a1){var e=this.rangeList.ranges,t=e[e.length-1],a=s.fromPoints(e[0].start,t.end);this.toSingleRange(),this.setSelectionRange(a,t.cursor==t.start)}else{var n=this.session.documentToScreenPosition(this.cursor),o=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(n,o).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(e,t,a){var n=[],o=e.column0;)b--;if(b>0)for(var w=0;n[w].isEmpty();)w++;for(var y=b;y>=w;y--)n[y].isEmpty()&&n.splice(y,1)}return n}}.call(o.prototype);var g=e("./editor").Editor;function p(e){e.$multiselectOnSessionChange||(e.$onAddRange=e.$onAddRange.bind(e),e.$onRemoveRange=e.$onRemoveRange.bind(e),e.$onMultiSelect=e.$onMultiSelect.bind(e),e.$onSingleSelect=e.$onSingleSelect.bind(e),e.$multiselectOnSessionChange=t.onSessionChange.bind(e),e.$checkMultiselectChange=e.$checkMultiselectChange.bind(e),e.$multiselectOnSessionChange(e),e.on("changeSession",e.$multiselectOnSessionChange),e.on("mousedown",l),e.commands.addCommands(c.defaultCommands),function(e){if(e.textInput){var t=e.textInput.getElement(),a=!1;r.addListener(t,"keydown",(function(t){var s=18==t.keyCode&&!(t.ctrlKey||t.shiftKey||t.metaKey);e.$blockSelectEnabled&&s?a||(e.renderer.setMouseCursor("crosshair"),a=!0):a&&n()}),e),r.addListener(t,"keyup",n,e),r.addListener(t,"blur",n,e)}function n(t){a&&(e.renderer.setMouseCursor(""),a=!1)}}(e))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(e){e.cursor||(e.cursor=e.end);var t=this.getSelectionStyle();return e.marker=this.session.addMarker(e,"ace_selection",t),this.session.$selectionMarkers.push(e),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,e},this.removeSelectionMarker=function(e){if(e.marker){this.session.removeMarker(e.marker);var t=this.session.$selectionMarkers.indexOf(e);-1!=t&&this.session.$selectionMarkers.splice(t,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(e){for(var t=this.session.$selectionMarkers,a=e.length;a--;){var n=e[a];if(n.marker){this.session.removeMarker(n.marker);var s=t.indexOf(n);-1!=s&&t.splice(s,1)}}this.session.selectionMarkerCount=t.length},this.$onAddRange=function(e){this.addSelectionMarker(e.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(e){this.removeSelectionMarkers(e.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(e){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(e){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(e){var t=e.command,a=e.editor;if(a.multiSelect){if(t.multiSelectAction)"forEach"==t.multiSelectAction?n=a.forEachSelection(t,e.args):"forEachLine"==t.multiSelectAction?n=a.forEachSelection(t,e.args,!0):"single"==t.multiSelectAction?(a.exitMultiSelectMode(),n=t.exec(a,e.args||{})):n=t.multiSelectAction(a,e.args||{});else{var n=t.exec(a,e.args||{});a.multiSelect.addRange(a.multiSelect.toOrientedRange()),a.multiSelect.mergeOverlappingRanges()}return n}},this.forEachSelection=function(e,t,a){if(!this.inVirtualSelectionMode){var n,s=a&&a.keepOrder,l=1==a||a&&a.$byLines,r=this.session,i=this.selection,c=i.rangeList,d=(s?i:c).ranges;if(!d.length)return e.exec?e.exec(this,t||{}):e(this,t||{});var h=i._eventRegistry;i._eventRegistry={};var g=new o(r);this.inVirtualSelectionMode=!0;for(var p=d.length;p--;){if(l)for(;p>0&&d[p].start.row==d[p-1].end.row;)p--;g.fromOrientedRange(d[p]),g.index=p,this.selection=r.selection=g;var u=e.exec?e.exec(this,t||{}):e(this,t||{});n||void 0===u||(n=u),g.toOrientedRange(d[p])}g.detach(),this.selection=r.selection=i,this.inVirtualSelectionMode=!1,i._eventRegistry=h,i.mergeOverlappingRanges(),i.ranges[0]&&i.fromOrientedRange(i.ranges[0]);var m=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),m&&m.from==m.to&&this.renderer.animateScrolling(m.from),n}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var e="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var t=this.multiSelect.rangeList.ranges,a=[],n=0;nl&&(l=a.column),nd?e.insert(n,i.stringRepeat(" ",o-d)):e.remove(new s(n.row,n.column,n.row,n.column-o+d)),t.start.column=t.end.column=l,t.start.row=t.end.row=n.row,t.cursor=t.end})),t.fromOrientedRange(a[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var d=this.selection.getRange(),h=d.start.row,g=d.end.row,p=h==g;if(p){var u,m=this.session.getLength();do{u=this.session.getLine(g)}while(/[=:]/.test(u)&&++g0);h<0&&(h=0),g>=m&&(g=m-1)}var v=this.session.removeFullLines(h,g);v=this.$reAlignText(v,p),this.session.insert({row:h,column:0},v.join("\n")+"\n"),p||(d.start.column=0,d.end.column=v[v.length-1].length),this.selection.setRange(d)}},this.$reAlignText=function(e,t){var a,n,s,o=!0,l=!0;return e.map((function(e){var t=e.match(/(\s*)(.*?)(\s*)([=:].*)/);return t?null==a?(a=t[1].length,n=t[2].length,s=t[3].length,t):(a+n+s!=t[1].length+t[2].length+t[3].length&&(l=!1),a!=t[1].length&&(o=!1),a>t[1].length&&(a=t[1].length),nt[3].length&&(s=t[3].length),t):[e]})).map(t?c:o?l?function(e){return e[2]?r(a+n-e[2].length)+e[2]+r(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:c:function(e){return e[2]?r(a)+e[2]+r(s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function r(e){return i.stringRepeat(" ",e)}function c(e){return e[2]?r(a)+e[2]+r(n-e[2].length+s)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}).call(g.prototype),t.onSessionChange=function(e){var t=e.session;t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect;var a=e.oldSession;a&&(a.multiSelect.off("addRange",this.$onAddRange),a.multiSelect.off("removeRange",this.$onRemoveRange),a.multiSelect.off("multiSelect",this.$onMultiSelect),a.multiSelect.off("singleSelect",this.$onSingleSelect),a.multiSelect.lead.off("change",this.$checkMultiselectChange),a.multiSelect.anchor.off("change",this.$checkMultiselectChange)),t&&(t.multiSelect.on("addRange",this.$onAddRange),t.multiSelect.on("removeRange",this.$onRemoveRange),t.multiSelect.on("multiSelect",this.$onMultiSelect),t.multiSelect.on("singleSelect",this.$onSingleSelect),t.multiSelect.lead.on("change",this.$checkMultiselectChange),t.multiSelect.anchor.on("change",this.$checkMultiselectChange)),t&&this.inMultiSelectMode!=t.selection.inMultiSelectMode&&(t.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},t.MultiSelect=p,e("./config").defineOptions(g.prototype,"editor",{enableMultiselect:{set:function(e){p(this),e?this.on("mousedown",l):this.off("mousedown",l)},value:!0},enableBlockSelect:{set:function(e){this.$blockSelectEnabled=e},value:!0}})})),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],(function(e,t,a){"use strict";var n=e("../../range").Range,s=t.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,a){var n=e.getLine(a);return this.foldingStartMarker.test(n)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(n)?"end":""},this.getFoldWidgetRange=function(e,t,a){return null},this.indentationBlock=function(e,t,a){var s=/\S/,o=e.getLine(t),l=o.search(s);if(-1!=l){for(var r=a||o.length,i=e.getLength(),c=t,d=t;++tc){var p=e.getLine(d).length;return new n(c,r,d,p)}}},this.openingBracketBlock=function(e,t,a,s,o){var l={row:a,column:s+1},r=e.$findClosingBracket(t,l,o);if(r){var i=e.foldWidgets[r.row];return null==i&&(i=e.getFoldWidget(r.row)),"start"==i&&r.row>l.row&&(r.row--,r.column=e.getLine(r.row).length),n.fromPoints(l,r)}},this.closingBracketBlock=function(e,t,a,s,o){var l={row:a,column:s},r=e.$findOpeningBracket(t,l);if(r)return r.column++,l.column--,n.fromPoints(r,l)}}).call(s.prototype)})),ace.define("ace/ext/error_marker",["require","exports","module","ace/lib/dom","ace/range","ace/config"],(function(e,t,a){"use strict";var n=e("../lib/dom"),s=e("../range").Range,o=e("../config").nls;t.showErrorMarker=function(e,t){var a=e.session,l=e.getCursorPosition(),r=l.row,i=a.widgetManager.getWidgetsAtRow(r).filter((function(e){return"errorMarker"==e.type}))[0];i?i.destroy():r-=t;var c,d=function(e,t,a){var n=e.getAnnotations().sort(s.comparePoints);if(n.length){var o=function(e,t,a){for(var n=0,s=e.length-1;n<=s;){var o=n+s>>1,l=a(t,e[o]);if(l>0)n=o+1;else{if(!(l<0))return o;s=o-1}}return-(n+1)}(n,{row:t,column:-1},s.comparePoints);o<0&&(o=-o-1),o>=n.length?o=a>0?0:n.length-1:0===o&&a<0&&(o=n.length-1);var l=n[o];if(l&&a){if(l.row===t){do{l=n[o+=a]}while(l&&l.row===t);if(!l)return n.slice()}var r=[];t=l.row;do{r[a<0?"unshift":"push"](l),l=n[o+=a]}while(l&&l.row==t);return r.length&&r}}}(a,r,t);if(d){var h=d[0];l.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,l.row=h.row,c=e.renderer.$gutterLayer.$annotations[l.row]}else{if(i)return;c={displayText:[o("error-marker.good-state","Looks good!")],className:"ace_ok"}}e.session.unfold(l.row),e.selection.moveToPosition(l);var g={row:l.row,fixedWidth:!0,coverGutter:!0,el:n.createElement("div"),type:"errorMarker"},p=g.el.appendChild(n.createElement("div")),u=g.el.appendChild(n.createElement("div"));u.className="error_widget_arrow "+c.className;var m=e.renderer.$cursorLayer.getPixelPosition(l).left;u.style.left=m+e.renderer.gutterWidth-5+"px",g.el.className="error_widget_wrapper",p.className="error_widget "+c.className,c.displayText.forEach((function(e,t){p.appendChild(n.createTextNode(e)),t{var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32},a=-1;t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,a,n,s){void 0===s&&(s=this.Diff_Timeout<=0?Number.MAX_VALUE:(new Date).getTime()+1e3*this.Diff_Timeout);var o=s;if(null==e||null==a)throw new Error("Null input. (diff_main)");if(e==a)return e?[new t.Diff(0,e)]:[];void 0===n&&(n=!0);var l=n,r=this.diff_commonPrefix(e,a),i=e.substring(0,r);e=e.substring(r),a=a.substring(r),r=this.diff_commonSuffix(e,a);var c=e.substring(e.length-r);e=e.substring(0,e.length-r),a=a.substring(0,a.length-r);var d=this.diff_compute_(e,a,l,o);return i&&d.unshift(new t.Diff(0,i)),c&&d.push(new t.Diff(0,c)),this.diff_cleanupMerge(d),d},t.prototype.diff_compute_=function(e,n,s,o){var l;if(!e)return[new t.Diff(1,n)];if(!n)return[new t.Diff(a,e)];var r=e.length>n.length?e:n,i=e.length>n.length?n:e,c=r.indexOf(i);if(-1!=c)return l=[new t.Diff(1,r.substring(0,c)),new t.Diff(0,i),new t.Diff(1,r.substring(c+i.length))],e.length>n.length&&(l[0][0]=l[2][0]=a),l;if(1==i.length)return[new t.Diff(a,e),new t.Diff(1,n)];var d=this.diff_halfMatch_(e,n);if(d){var h=d[0],g=d[1],p=d[2],u=d[3],m=d[4],v=this.diff_main(h,p,s,o),f=this.diff_main(g,u,s,o);return v.concat([new t.Diff(0,m)],f)}return s&&e.length>100&&n.length>100?this.diff_lineMode_(e,n,o):this.diff_bisect_(e,n,o)},t.prototype.diff_lineMode_=function(e,n,s){var o=this.diff_linesToChars_(e,n);e=o.chars1,n=o.chars2;var l=o.lineArray,r=this.diff_main(e,n,!1,s);this.diff_charsToLines_(r,l),this.diff_cleanupSemantic(r),r.push(new t.Diff(0,""));for(var i=0,c=0,d=0,h="",g="";i=1&&d>=1){r.splice(i-c-d,c+d),i=i-c-d;for(var p=this.diff_main(h,g,!1,s),u=p.length-1;u>=0;u--)r.splice(i,0,p[u]);i+=p.length}d=0,c=0,h="",g=""}i++}return r.pop(),r},t.prototype.diff_bisect_=function(e,n,s){for(var o=e.length,l=n.length,r=Math.ceil((o+l)/2),i=r,c=2*r,d=new Array(c),h=new Array(c),g=0;gs);w++){for(var y=-w+m;y<=w-v;y+=2){for(var x=i+y,k=(_=y==-w||y!=w&&d[x-1]o)v+=2;else if(k>l)m+=2;else if(u&&(z=i+p-y)>=0&&z=(M=o-h[z]))return this.diff_bisectSplit_(e,n,_,k,s)}for(var C=-w+f;C<=w-b;C+=2){for(var M,z=i+C,E=(M=C==-w||C!=w&&h[z-1]o)b+=2;else if(E>l)f+=2;else if(!u){var _;if((x=i+p-C)>=0&&x=(M=o-M))return this.diff_bisectSplit_(e,n,_,k,s)}}}return[new t.Diff(a,e),new t.Diff(1,n)]},t.prototype.diff_bisectSplit_=function(e,t,a,n,s){var o=e.substring(0,a),l=t.substring(0,n),r=e.substring(a),i=t.substring(n),c=this.diff_main(o,l,!1,s),d=this.diff_main(r,i,!1,s);return c.concat(d)},t.prototype.diff_linesToChars_=function(e,t){var a=[],n={};function s(e){for(var t="",s=0,l=-1,r=a.length;ln?e=e.substring(a-n):at.length?e:t,n=e.length>t.length?t:e;if(a.length<4||2*n.length=e.length?[n,o,l,r,d]:null}var l,r,i,c,d,h=o(a,n,Math.ceil(a.length/4)),g=o(a,n,Math.ceil(a.length/2));return h||g?(l=g?h&&h[4].length>g[4].length?h:g:h,e.length>t.length?(r=l[0],i=l[1],c=l[2],d=l[3]):(c=l[0],d=l[1],r=l[2],i=l[3]),[r,i,c,d,l[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var n=!1,s=[],o=0,l=null,r=0,i=0,c=0,d=0,h=0;r0?s[o-1]:-1,i=0,c=0,d=0,h=0,l=null,n=!0)),r++;for(n&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),r=1;r=m?(u>=g.length/2||u>=p.length/2)&&(e.splice(r,0,new t.Diff(0,p.substring(0,u))),e[r-1][1]=g.substring(0,g.length-u),e[r+1][1]=p.substring(u),r++):(m>=g.length/2||m>=p.length/2)&&(e.splice(r,0,new t.Diff(0,g.substring(0,m))),e[r-1][0]=1,e[r-1][1]=p.substring(0,p.length-m),e[r+1][0]=a,e[r+1][1]=g.substring(m),r++),r++}r++}},t.prototype.diff_cleanupSemanticLossless=function(e){function a(e,a){if(!e||!a)return 6;var n=e.charAt(e.length-1),s=a.charAt(0),o=n.match(t.nonAlphaNumericRegex_),l=s.match(t.nonAlphaNumericRegex_),r=o&&n.match(t.whitespaceRegex_),i=l&&s.match(t.whitespaceRegex_),c=r&&n.match(t.linebreakRegex_),d=i&&s.match(t.linebreakRegex_),h=c&&e.match(t.blanklineEndRegex_),g=d&&a.match(t.blanklineStartRegex_);return h||g?5:c||d?4:o&&!r&&i?3:r||i?2:o||l?1:0}for(var n=1;n=g&&(g=p,c=s,d=o,h=l)}e[n-1][1]!=c&&(c?e[n-1][1]=c:(e.splice(n-1,1),n--),e[n][1]=d,h?e[n+1][1]=h:(e.splice(n+1,1),n--))}n++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var n=!1,s=[],o=0,l=null,r=0,i=!1,c=!1,d=!1,h=!1;r0?s[o-1]:-1,d=h=!1),n=!0)),r++;n&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,""));for(var n,s=0,o=0,l=0,r="",i="";s1?(0!==o&&0!==l&&(0!==(n=this.diff_commonPrefix(i,r))&&(s-o-l>0&&0==e[s-o-l-1][0]?e[s-o-l-1][1]+=i.substring(0,n):(e.splice(0,0,new t.Diff(0,i.substring(0,n))),s++),i=i.substring(n),r=r.substring(n)),0!==(n=this.diff_commonSuffix(i,r))&&(e[s][1]=i.substring(i.length-n)+e[s][1],i=i.substring(0,i.length-n),r=r.substring(0,r.length-n))),s-=o+l,e.splice(s,o+l),r.length&&(e.splice(s,0,new t.Diff(a,r)),s++),i.length&&(e.splice(s,0,new t.Diff(1,i)),s++),s++):0!==s&&0==e[s-1][0]?(e[s-1][1]+=e[s][1],e.splice(s,1)):s++,l=0,o=0,r="",i=""}""===e[e.length-1][1]&&e.pop();var c=!1;for(s=1;st));n++)l=s,r=o;return e.length!=n&&e[n][0]===a?r:r+(t-l)},t.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,s=//g,l=/\n/g,r=0;r");switch(i){case 1:t[r]=''+c+"";break;case a:t[r]=''+c+"";break;case 0:t[r]=""+c+""}}return t.join("")},t.prototype.diff_text1=function(e){for(var t=[],a=0;athis.Match_MaxBits)throw new Error("Pattern too long for this browser.");var n=this.match_alphabet_(t),s=this;function o(e,n){var o=e/t.length,l=Math.abs(a-n);return s.Match_Distance?o+l/s.Match_Distance:l?1:o}var l=this.Match_Threshold,r=e.indexOf(t,a);-1!=r&&(l=Math.min(o(0,r),l),-1!=(r=e.lastIndexOf(t,a+t.length))&&(l=Math.min(o(0,r),l)));var i,c,d=1<=u;f--){var b=n[e.charAt(f-1)];if(v[f]=0===p?(v[f+1]<<1|1)&b:(v[f+1]<<1|1)&b|(h[f+1]|h[f])<<1|1|h[f+1],v[f]&d){var w=o(p,f-1);if(w<=l){if(l=w,!((r=f-1)>a))break;u=Math.max(1,2*a-r)}}}if(o(p+1,a)>l)break;h=v}return r},t.prototype.match_alphabet_=function(e){for(var t={},a=0;a2&&(this.diff_cleanupSemantic(l),this.diff_cleanupEfficiency(l));else if(e&&"object"==typeof e&&void 0===n&&void 0===s)l=e,o=this.diff_text1(l);else if("string"==typeof e&&n&&"object"==typeof n&&void 0===s)o=e,l=n;else{if("string"!=typeof e||"string"!=typeof n||!s||"object"!=typeof s)throw new Error("Unknown call format to patch_make.");o=e,l=s}if(0===l.length)return[];for(var r=[],i=new t.patch_obj,c=0,d=0,h=0,g=o,p=o,u=0;u=2*this.Patch_Margin&&c&&(this.patch_addContext_(i,g),r.push(i),i=new t.patch_obj,c=0,g=p,d=h)}1!==m&&(d+=v.length),m!==a&&(h+=v.length)}return c&&(this.patch_addContext_(i,g),r.push(i)),r},t.prototype.patch_deepCopy=function(e){for(var a=[],n=0;nthis.Match_MaxBits?-1!=(r=this.match_main(t,d.substring(0,this.Match_MaxBits),c))&&(-1==(h=this.match_main(t,d.substring(d.length-this.Match_MaxBits),c+d.length-this.Match_MaxBits))||r>=h)&&(r=-1):r=this.match_main(t,d,c),-1==r)o[l]=!1,s-=e[l].length2-e[l].length1;else if(o[l]=!0,s=r-c,d==(i=-1==h?t.substring(r,r+d.length):t.substring(r,h+this.Match_MaxBits)))t=t.substring(0,r)+this.diff_text2(e[l].diffs)+t.substring(r+d.length);else{var g=this.diff_main(d,i,!1);if(d.length>this.Match_MaxBits&&this.diff_levenshtein(g)/d.length>this.Patch_DeleteThreshold)o[l]=!1;else{this.diff_cleanupSemanticLossless(g);for(var p,u=0,m=0;ml[0][1].length){var r=a-l[0][1].length;l[0][1]=n.substring(l[0][1].length)+l[0][1],o.start1-=r,o.start2-=r,o.length1+=r,o.length2+=r}return 0==(l=(o=e[e.length-1]).diffs).length||0!=l[l.length-1][0]?(l.push(new t.Diff(0,n)),o.length1+=a,o.length2+=a):a>l[l.length-1][1].length&&(r=a-l[l.length-1][1].length,l[l.length-1][1]+=n.substring(0,r),o.length1+=r,o.length2+=r),n},t.prototype.patch_splitMax=function(e){for(var n=this.Match_MaxBits,s=0;s2*n?(c.length1+=g.length,l+=g.length,d=!1,c.diffs.push(new t.Diff(h,g)),o.diffs.shift()):(g=g.substring(0,n-c.length1-this.Patch_Margin),c.length1+=g.length,l+=g.length,0===h?(c.length2+=g.length,r+=g.length):d=!1,c.diffs.push(new t.Diff(h,g)),g==o.diffs[0][1]?o.diffs.shift():o.diffs[0][1]=o.diffs[0][1].substring(g.length))}i=(i=this.diff_text2(c.diffs)).substring(i.length-this.Patch_Margin);var p=this.diff_text1(o.diffs).substring(0,this.Patch_Margin);""!==p&&(c.length1+=p.length,c.length2+=p.length,0!==c.diffs.length&&0===c.diffs[c.diffs.length-1][0]?c.diffs[c.diffs.length-1][1]+=p:c.diffs.push(new t.Diff(0,p))),d||e.splice(++s,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],a=0;a{"use strict";__webpack_require__.d(__webpack_exports__,{I:()=>useRunJs});var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1609),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);const useRunJs=(htmlCode,delay=300)=>{const timer=(0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)((()=>{if(htmlCode)return timer.current&&clearTimeout(timer.current),timer.current=setTimeout((()=>{const matchedScripts=htmlCode.match(/]*>([\s\S]*?)<\/script>/gm);matchedScripts&&matchedScripts.forEach((scriptTag=>{const scriptContentMatch=scriptTag.match(/]*>([\s\S]*?)<\/script>/i);scriptContentMatch&&scriptContentMatch[1]&&eval(scriptContentMatch[1])}))}),delay),()=>{timer.current&&clearTimeout(timer.current)}}),[htmlCode,delay])}},2694:(e,t,a)=>{"use strict";var n=a(6925);function s(){}function o(){}o.resetWarningCache=s,e.exports=function(){function e(e,t,a,s,o,l){if(l!==n){var r=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw r.name="Invariant Violation",r}}function t(){return e}e.isRequired=e;var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:s};return a.PropTypes=a,a}},2972:function(){!function(e){if(!(void 0!==e.window&&e.document||e.require&&e.define)){e.console||(e.console=function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,a,n,s){postMessage({type:"error",data:{message:e,data:s&&s.data,file:t,line:a,col:n,stack:s&&s.stack}})},e.normalizeModule=function(t,a){if(-1!==a.indexOf("!")){var n=a.split("!");return e.normalizeModule(t,n[0])+"!"+e.normalizeModule(t,n[1])}if("."==a.charAt(0)){var s=t.split("/").slice(0,-1).join("/");for(a=(s?s+"/":"")+a;-1!==a.indexOf(".")&&o!=a;){var o=a;a=a.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return a},e.require=function(t,a){if(a||(a=t,t=null),!a.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");a=e.normalizeModule(t,a);var n=e.require.modules[a];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;if(!e.require.tlns)return console.log("unable to load "+a);var s=function(e,t){for(var a=e,n="";a;){var s=t[a];if("string"==typeof s)return s+n;if(s)return s.location.replace(/\/*$/,"/")+(n||s.main||s.name);if(!1===s)return"";var o=a.lastIndexOf("/");if(-1===o)break;n=a.substr(o)+n,a=a.slice(0,o)}return e}(a,e.require.tlns);return".js"!=s.slice(-3)&&(s+=".js"),e.require.id=a,e.require.modules[a]={},importScripts(s),e.require(t,a)},e.require.modules={},e.require.tlns={},e.define=function(t,a,n){if(2==arguments.length?(n=a,"string"!=typeof t&&(a=t,t=e.require.id)):1==arguments.length&&(n=t,a=[],t=e.require.id),"function"==typeof n){a.length||(a=["require","exports","module"]);var s=function(a){return e.require(t,a)};e.require.modules[t]={exports:{},factory:function(){var e=this,t=n.apply(this,a.slice(0,n.length).map((function(t){switch(t){case"require":return s;case"exports":return e.exports;case"module":return e;default:return s(t)}})));return t&&(e.exports=t),e}}}else e.require.modules[t]={exports:n,initialized:!0}},e.define.amd={},e.require.tlns={},e.initBaseUrls=function(e){for(var t in e)this.require.tlns[t]=e[t]},e.initSender=function(){var t=e.require("ace/lib/event_emitter").EventEmitter,a=e.require("ace/lib/oop"),n=function(){};return function(){a.implement(this,t),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(n.prototype),new n};var t=e.main=null,a=e.sender=null;e.onmessage=function(n){var s=n.data;if(s.event&&a)a._signal(s.event,s.data);else if(s.command)if(t[s.command])t[s.command].apply(t,s.args);else{if(!e[s.command])throw new Error("Unknown command:"+s.command);e[s.command].apply(e,s.args)}else if(s.init){e.initBaseUrls(s.tlns),a=e.sender=e.initSender();var o=this.require(s.module)[s.classname];t=e.main=new o(a)}}}}(this),ace.define("ace/lib/oop",[],(function(e,t,a){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(var a in t)e[a]=t[a];return e},t.implement=function(e,a){t.mixin(e,a)}})),ace.define("ace/lib/deep_copy",[],(function(e,t,a){t.deepCopy=function e(t){if("object"!=typeof t||!t)return t;var a;if(Array.isArray(t)){a=[];for(var n=0;n0;)1&t&&(a+=e),(t>>=1)&&(e+=e);return a};var n=/^\s\s*/,s=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(n,"")},t.stringTrimRight=function(e){return e.replace(s,"")},t.copyObject=function(e){var t={};for(var a in e)t[a]=e[a];return t},t.copyArray=function(e){for(var t=[],a=0,n=e.length;a65535?2:1}})),ace.define("ace/apply_delta",[],(function(e,t,a){"use strict";t.applyDelta=function(e,t,a){var n=t.start.row,s=t.start.column,o=e[n]||"";switch(t.action){case"insert":if(1===t.lines.length)e[n]=o.substring(0,s)+t.lines[0]+o.substring(s);else{var l=[n,1].concat(t.lines);e.splice.apply(e,l),e[n]=o.substring(0,s)+e[n],e[n+t.lines.length-1]+=o.substring(s)}break;case"remove":var r=t.end.column,i=t.end.row;n===i?e[n]=o.substring(0,s)+o.substring(r):e.splice(n,i-n+1,o.substring(0,s)+e[i].substring(r))}}})),ace.define("ace/lib/event_emitter",[],(function(e,t,a){"use strict";var n={},s=function(){this.propagationStopped=!0},o=function(){this.defaultPrevented=!0};n._emit=n._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var a=this._eventRegistry[e]||[],n=this._defaultHandlers[e];if(a.length||n){"object"==typeof t&&t||(t={}),t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=s),t.preventDefault||(t.preventDefault=o),a=a.slice();for(var l=0;l ["+this.end.row+"/"+this.end.column+"]"},e.prototype.contains=function(e,t){return 0==this.compare(e,t)},e.prototype.compareRange=function(e){var t,a=e.end,n=e.start;return 1==(t=this.compare(a.row,a.column))?1==(t=this.compare(n.row,n.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(n.row,n.column))?-1:1==t?42:0},e.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},e.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},e.prototype.intersects=function(e){var t=this.compareRange(e);return-1==t||0==t||1==t},e.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},e.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},e.prototype.setStart=function(e,t){"object"==typeof e?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},e.prototype.setEnd=function(e,t){"object"==typeof e?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},e.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},e.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},e.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},e.prototype.compare=function(e,t){return this.isMultiLine()||e!==this.start.row?ethis.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0:tthis.end.column?1:0},e.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},e.prototype.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},e.prototype.clipRows=function(t,a){if(this.end.row>a)var n={row:a+1,column:0};else this.end.rowa)var s={row:a+1,column:0};else this.start.rowthis.row)){var t=function(e,t,a){var n="insert"==e.action,s=(n?1:-1)*(e.end.row-e.start.row),o=(n?1:-1)*(e.end.column-e.start.column),r=e.start,i=n?r:e.end;return l(t,r,a)?{row:t.row,column:t.column}:l(i,t,!a)?{row:t.row+s,column:t.column+(t.row==i.row?o:0)}:{row:r.row,column:r.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(t.row,t.column,!0)}},e.prototype.setPosition=function(e,t,a){var n;if(n=a?{row:e,column:t}:this.$clipPositionToDocument(e,t),this.row!=n.row||this.column!=n.column){var s={row:this.row,column:this.column};this.row=n.row,this.column=n.column,this._signal("change",{old:s,value:n})}},e.prototype.detach=function(){this.document.off("change",this.$onChange)},e.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},e.prototype.$clipPositionToDocument=function(e,t){var a={};return e>=this.document.getLength()?(a.row=Math.max(0,this.document.getLength()-1),a.column=this.document.getLine(a.row).length):e<0?(a.row=0,a.column=0):(a.row=e,a.column=Math.min(this.document.getLine(a.row).length,Math.max(0,t))),t<0&&(a.column=0),a},e}();function l(e,t,a){var n=a?e.column<=t.column:e.column=a&&(e=a-1,t=void 0);var n=this.getLine(e);return null==t&&(t=n.length),{row:e,column:t=Math.min(Math.max(t,0),n.length)}},e.prototype.clonePos=function(e){return{row:e.row,column:e.column}},e.prototype.pos=function(e,t){return{row:e,column:t}},e.prototype.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},e.prototype.insertFullLines=function(e,t){var a=0;(e=Math.min(Math.max(e,0),this.getLength()))0,n=t=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},e.prototype.replace=function(e,t){return e instanceof l||(e=l.fromPoints(e.start,e.end)),0===t.length&&e.isEmpty()?e.start:t==this.getTextRange(e)?e.end:(this.remove(e),t?this.insert(e.start,t):e.start)},e.prototype.applyDeltas=function(e){for(var t=0;t=0;t--)this.revertDelta(e[t])},e.prototype.applyDelta=function(e,t){var a="insert"==e.action;(a?e.lines.length<=1&&!e.lines[0]:!l.comparePoints(e.start,e.end))||(a&&e.lines.length>2e4?this.$splitAndapplyLargeDelta(e,2e4):(s(this.$lines,e,t),this._signal("change",e)))},e.prototype.$safeApplyDelta=function(e){var t=this.$lines.length;("remove"==e.action&&e.start.row=t.$lines.length)throw(r=new Error("Invalid delta")).data={path:o.$path,linesLength:t.$lines.length,start:l.start,end:l.end},r;t.applyDelta(l,!0)}if(o.$timeout)return a.schedule(o.$timeout);o.onUpdate()}))};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){return this.deferredUpdate.isPending()}}).call(o.prototype)})),ace.define("ace/mode/css/csslint",[],(function(e,t,a){var n=function(){var e=e||{},t=function(){var e;return e=function t(a,n,s){function o(r,i){if(!n[r]){if(!a[r]){var c="function"==typeof e&&e;if(!i&&c)return c(r,!0);if(l)return l(r,!0);var d=new Error("Cannot find module '"+r+"'");throw d.code="MODULE_NOT_FOUND",d}var h=n[r]={exports:{}};a[r][0].call(h.exports,(function(e){return o(a[r][1][e]||e)}),h,h.exports,t,a,n,s)}return n[r].exports}for(var l="function"==typeof e&&e,r=0;r"===e?this.type="child":"+"===e?this.type="adjacent-sibling":"~"===e&&(this.type="sibling")}o.prototype=new n,o.prototype.constructor=o},{"../util/SyntaxUnit":26,"./Parser":6}],3:[function(e,t,a){"use strict";t.exports=o;var n=e("../util/StringReader"),s=e("../util/SyntaxError");function o(e,t){this.match=function(t){var a;return t.mark(),(a=e(t))?t.drop():t.restore(),a},this.toString="function"==typeof t?t:function(){return t}}o.prec={MOD:5,SEQ:4,ANDAND:3,OROR:2,ALT:1},o.parse=function(e){var t,a,l,r,i,c,d,h,g;if(t=new n(e),a=function(e){var a=t.readMatch(e);if(null===a)throw new s("Expected "+e,t.getLine(),t.getCol());return a},l=function(){for(var e=[r()];null!==t.readMatch(" | ");)e.push(r());return 1===e.length?e[0]:o.alt.apply(o,e)},r=function(){for(var e=[i()];null!==t.readMatch(" || ");)e.push(i());return 1===e.length?e[0]:o.oror.apply(o,e)},i=function(){for(var e=[c()];null!==t.readMatch(" && ");)e.push(c());return 1===e.length?e[0]:o.andand.apply(o,e)},c=function(){for(var e=[d()];null!==t.readMatch(/^ (?![&|\]])/);)e.push(d());return 1===e.length?e[0]:o.seq.apply(o,e)},d=function(){var e=h();if(null!==t.readMatch("?"))return e.question();if(null!==t.readMatch("*"))return e.star();if(null!==t.readMatch("+"))return e.plus();if(null!==t.readMatch("#"))return e.hash();if(null!==t.readMatch(/^\{\s*/)){var n=a(/^\d+/);a(/^\s*,\s*/);var s=a(/^\d+/);return a(/^\s*\}/),e.braces(Number(n),Number(s))}return e},h=function(){if(null!==t.readMatch("[ ")){var e=l();return a(" ]"),e}return o.fromType(a(/^[^ ?*+#{]+/))},g=l(),!t.eof())throw new s("Expected end of string",t.getLine(),t.getCol());return g},o.cast=function(e){return e instanceof o?e:o.parse(e)},o.fromType=function(t){var a=e("./ValidationTypes");return new o((function(e){return e.hasNext()&&a.isType(e,t)}),t)},o.seq=function(){var e=Array.prototype.slice.call(arguments).map(o.cast);return 1===e.length?e[0]:new o((function(t){var a,n=!0;for(a=0;n&&aa&&(n="[ "+n+" ]"),n}))},o.alt=function(){var e=Array.prototype.slice.call(arguments).map(o.cast);return 1===e.length?e[0]:new o((function(t){var a,n=!1;for(a=0;!n&&aa&&(n="[ "+n+" ]"),n}))},o.many=function(t){var a=Array.prototype.slice.call(arguments,1).reduce((function(t,a){if(a.expand){var n=e("./ValidationTypes");t.push.apply(t,n.complex[a.expand].options)}else t.push(o.cast(a));return t}),[]);!0===t&&(t=a.map((function(){return!0})));var n=new o((function(e){var n=[],s=0,o=0,l=function(r){for(var i=0;i0;for(var r=0;rn&&(s="[ "+s+" ]"),s}));return n.options=a,n},o.andand=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!0),o.many.apply(o,e)},o.oror=function(){var e=Array.prototype.slice.call(arguments);return e.unshift(!1),o.many.apply(o,e)},o.prototype={constructor:o,match:function(){throw new Error("unimplemented")},toString:function(){throw new Error("unimplemented")},func:function(){return this.match.bind(this)},then:function(e){return o.seq(this,e)},or:function(e){return o.alt(this,e)},andand:function(e){return o.many(!0,this,e)},oror:function(e){return o.many(!1,this,e)},star:function(){return this.braces(0,1/0,"*")},plus:function(){return this.braces(1,1/0,"+")},question:function(){return this.braces(0,1,"?")},hash:function(){return this.braces(1,1/0,"#",o.cast(","))},braces:function(e,t,a,n){var s=this,l=n?n.then(this):this;return a||(a="{"+e+","+t+"}"),new o((function(a){var o;for(o=0;o0&&n?l.match(a):s.match(a));o++);return o>=e}),(function(){return s.toString(o.prec.MOD)+a}))}}},{"../util/StringReader":24,"../util/SyntaxError":25,"./ValidationTypes":21}],4:[function(e,t,a){"use strict";t.exports=o;var n=e("../util/SyntaxUnit"),s=e("./Parser");function o(e,t){n.call(this,"("+e+(null!==t?":"+t:"")+")",e.startLine,e.startCol,s.MEDIA_FEATURE_TYPE),this.name=e,this.value=t}o.prototype=new n,o.prototype.constructor=o},{"../util/SyntaxUnit":26,"./Parser":6}],5:[function(e,t,a){"use strict";t.exports=o;var n=e("../util/SyntaxUnit"),s=e("./Parser");function o(e,t,a,o,l){n.call(this,(e?e+" ":"")+(t||"")+(t&&a.length>0?" and ":"")+a.join(" and "),o,l,s.MEDIA_QUERY_TYPE),this.modifier=e,this.mediaType=t,this.features=a}o.prototype=new n,o.prototype.constructor=o},{"../util/SyntaxUnit":26,"./Parser":6}],6:[function(e,t,a){"use strict";t.exports=b;var n=e("../util/EventTarget"),s=e("../util/SyntaxError"),o=e("../util/SyntaxUnit"),l=e("./Combinator"),r=e("./MediaFeature"),i=e("./MediaQuery"),c=e("./PropertyName"),d=e("./PropertyValue"),h=e("./PropertyValuePart"),g=e("./Selector"),p=e("./SelectorPart"),u=e("./SelectorSubPart"),m=e("./TokenStream"),v=e("./Tokens"),f=e("./Validation");function b(e){n.call(this),this.options=e||{},this._tokenStream=null}b.DEFAULT_TYPE=0,b.COMBINATOR_TYPE=1,b.MEDIA_FEATURE_TYPE=2,b.MEDIA_QUERY_TYPE=3,b.PROPERTY_NAME_TYPE=4,b.PROPERTY_VALUE_TYPE=5,b.PROPERTY_VALUE_PART_TYPE=6,b.SELECTOR_TYPE=7,b.SELECTOR_PART_TYPE=8,b.SELECTOR_SUB_PART_TYPE=9,b.prototype=function(){var e,t=new n,a={__proto__:null,constructor:b,DEFAULT_TYPE:0,COMBINATOR_TYPE:1,MEDIA_FEATURE_TYPE:2,MEDIA_QUERY_TYPE:3,PROPERTY_NAME_TYPE:4,PROPERTY_VALUE_TYPE:5,PROPERTY_VALUE_PART_TYPE:6,SELECTOR_TYPE:7,SELECTOR_PART_TYPE:8,SELECTOR_SUB_PART_TYPE:9,_stylesheet:function(){var e,t,a,n=this._tokenStream;for(this.fire("startstylesheet"),this._charset(),this._skipCruft();n.peek()===v.IMPORT_SYM;)this._import(),this._skipCruft();for(;n.peek()===v.NAMESPACE_SYM;)this._namespace(),this._skipCruft();for(a=n.peek();a>v.EOF;){try{switch(a){case v.MEDIA_SYM:this._media(),this._skipCruft();break;case v.PAGE_SYM:this._page(),this._skipCruft();break;case v.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case v.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case v.VIEWPORT_SYM:this._viewport(),this._skipCruft();break;case v.DOCUMENT_SYM:this._document(),this._skipCruft();break;case v.SUPPORTS_SYM:this._supports(),this._skipCruft();break;case v.UNKNOWN_SYM:if(n.get(),this.options.strict)throw new s("Unknown @ rule.",n.LT(0).startLine,n.LT(0).startCol);for(this.fire({type:"error",error:null,message:"Unknown @ rule: "+n.LT(0).value+".",line:n.LT(0).startLine,col:n.LT(0).startCol}),e=0;n.advance([v.LBRACE,v.RBRACE])===v.LBRACE;)e++;for(;e;)n.advance([v.RBRACE]),e--;break;case v.S:this._readWhitespace();break;default:if(!this._ruleset())switch(a){case v.CHARSET_SYM:throw t=n.LT(1),this._charset(!1),new s("@charset not allowed here.",t.startLine,t.startCol);case v.IMPORT_SYM:throw t=n.LT(1),this._import(!1),new s("@import not allowed here.",t.startLine,t.startCol);case v.NAMESPACE_SYM:throw t=n.LT(1),this._namespace(!1),new s("@namespace not allowed here.",t.startLine,t.startCol);default:n.get(),this._unexpectedToken(n.token())}}}catch(e){if(!(e instanceof s)||this.options.strict)throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col})}a=n.peek()}a!==v.EOF&&this._unexpectedToken(n.token()),this.fire("endstylesheet")},_charset:function(e){var t,a,n,s=this._tokenStream;s.match(v.CHARSET_SYM)&&(a=s.token().startLine,n=s.token().startCol,this._readWhitespace(),s.mustMatch(v.STRING),t=s.token().value,this._readWhitespace(),s.mustMatch(v.SEMICOLON),!1!==e&&this.fire({type:"charset",charset:t,line:a,col:n}))},_import:function(e){var t,a,n,s=this._tokenStream;s.mustMatch(v.IMPORT_SYM),a=s.token(),this._readWhitespace(),s.mustMatch([v.STRING,v.URI]),t=s.token().value.replace(/^(?:url\()?["']?([^"']+?)["']?\)?$/,"$1"),this._readWhitespace(),n=this._media_query_list(),s.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"import",uri:t,media:n,line:a.startLine,col:a.startCol})},_namespace:function(e){var t,a,n,s,o=this._tokenStream;o.mustMatch(v.NAMESPACE_SYM),t=o.token().startLine,a=o.token().startCol,this._readWhitespace(),o.match(v.IDENT)&&(n=o.token().value,this._readWhitespace()),o.mustMatch([v.STRING,v.URI]),s=o.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),o.mustMatch(v.SEMICOLON),this._readWhitespace(),!1!==e&&this.fire({type:"namespace",prefix:n,uri:s,line:t,col:a})},_supports:function(e){var t,a,n=this._tokenStream;if(n.match(v.SUPPORTS_SYM)){for(t=n.token().startLine,a=n.token().startCol,this._readWhitespace(),this._supports_condition(),this._readWhitespace(),n.mustMatch(v.LBRACE),this._readWhitespace(),!1!==e&&this.fire({type:"startsupports",line:t,col:a});this._ruleset(););n.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endsupports",line:t,col:a})}},_supports_condition:function(){var e,t=this._tokenStream;if(t.match(v.IDENT))"not"===(e=t.token().value.toLowerCase())?(t.mustMatch(v.S),this._supports_condition_in_parens()):t.unget();else for(this._supports_condition_in_parens(),this._readWhitespace();t.peek()===v.IDENT;)"and"!==(e=t.LT(1).value.toLowerCase())&&"or"!==e||(t.mustMatch(v.IDENT),this._readWhitespace(),this._supports_condition_in_parens(),this._readWhitespace())},_supports_condition_in_parens:function(){var e=this._tokenStream;e.match(v.LPAREN)?(this._readWhitespace(),e.match(v.IDENT)?"not"===e.token().value.toLowerCase()?(this._readWhitespace(),this._supports_condition(),this._readWhitespace(),e.mustMatch(v.RPAREN)):(e.unget(),this._supports_declaration_condition(!1)):(this._supports_condition(),this._readWhitespace(),e.mustMatch(v.RPAREN))):this._supports_declaration_condition()},_supports_declaration_condition:function(e){var t=this._tokenStream;!1!==e&&t.mustMatch(v.LPAREN),this._readWhitespace(),this._declaration(),t.mustMatch(v.RPAREN)},_media:function(){var e,t,a,n=this._tokenStream;for(n.mustMatch(v.MEDIA_SYM),e=n.token().startLine,t=n.token().startCol,this._readWhitespace(),a=this._media_query_list(),n.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:a,line:e,col:t});;)if(n.peek()===v.PAGE_SYM)this._page();else if(n.peek()===v.FONT_FACE_SYM)this._font_face();else if(n.peek()===v.VIEWPORT_SYM)this._viewport();else if(n.peek()===v.DOCUMENT_SYM)this._document();else if(n.peek()===v.SUPPORTS_SYM)this._supports();else if(n.peek()===v.MEDIA_SYM)this._media();else if(!this._ruleset())break;n.mustMatch(v.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:a,line:e,col:t})},_media_query_list:function(){var e=this._tokenStream,t=[];for(this._readWhitespace(),e.peek()!==v.IDENT&&e.peek()!==v.LPAREN||t.push(this._media_query());e.match(v.COMMA);)this._readWhitespace(),t.push(this._media_query());return t},_media_query:function(){var e=this._tokenStream,t=null,a=null,n=null,s=[];if(e.match(v.IDENT)&&("only"!==(a=e.token().value.toLowerCase())&&"not"!==a?(e.unget(),a=null):n=e.token()),this._readWhitespace(),e.peek()===v.IDENT?(t=this._media_type(),null===n&&(n=e.token())):e.peek()===v.LPAREN&&(null===n&&(n=e.LT(1)),s.push(this._media_expression())),null===t&&0===s.length)return null;for(this._readWhitespace();e.match(v.IDENT);)"and"!==e.token().value.toLowerCase()&&this._unexpectedToken(e.token()),this._readWhitespace(),s.push(this._media_expression());return new i(a,t,s,n.startLine,n.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var e,t,a=this._tokenStream,n=null;return a.mustMatch(v.LPAREN),this._readWhitespace(),e=this._media_feature(),this._readWhitespace(),a.match(v.COLON)&&(this._readWhitespace(),t=a.LT(1),n=this._expression()),a.mustMatch(v.RPAREN),this._readWhitespace(),new r(e,n?new o(n,t.startLine,t.startCol):null)},_media_feature:function(){var e=this._tokenStream;return this._readWhitespace(),e.mustMatch(v.IDENT),o.fromToken(e.token())},_page:function(){var e,t,a=this._tokenStream,n=null,s=null;a.mustMatch(v.PAGE_SYM),e=a.token().startLine,t=a.token().startCol,this._readWhitespace(),a.match(v.IDENT)&&"auto"===(n=a.token().value).toLowerCase()&&this._unexpectedToken(a.token()),a.peek()===v.COLON&&(s=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:n,pseudo:s,line:e,col:t}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:n,pseudo:s,line:e,col:t})},_margin:function(){var e,t,a=this._tokenStream,n=this._margin_sym();return!!n&&(e=a.token().startLine,t=a.token().startCol,this.fire({type:"startpagemargin",margin:n,line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:n,line:e,col:t}),!0)},_margin_sym:function(){var e=this._tokenStream;return e.match([v.TOPLEFTCORNER_SYM,v.TOPLEFT_SYM,v.TOPCENTER_SYM,v.TOPRIGHT_SYM,v.TOPRIGHTCORNER_SYM,v.BOTTOMLEFTCORNER_SYM,v.BOTTOMLEFT_SYM,v.BOTTOMCENTER_SYM,v.BOTTOMRIGHT_SYM,v.BOTTOMRIGHTCORNER_SYM,v.LEFTTOP_SYM,v.LEFTMIDDLE_SYM,v.LEFTBOTTOM_SYM,v.RIGHTTOP_SYM,v.RIGHTMIDDLE_SYM,v.RIGHTBOTTOM_SYM])?o.fromToken(e.token()):null},_pseudo_page:function(){var e=this._tokenStream;return e.mustMatch(v.COLON),e.mustMatch(v.IDENT),e.token().value},_font_face:function(){var e,t,a=this._tokenStream;a.mustMatch(v.FONT_FACE_SYM),e=a.token().startLine,t=a.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endfontface",line:e,col:t})},_viewport:function(){var e,t,a=this._tokenStream;a.mustMatch(v.VIEWPORT_SYM),e=a.token().startLine,t=a.token().startCol,this._readWhitespace(),this.fire({type:"startviewport",line:e,col:t}),this._readDeclarations(!0),this.fire({type:"endviewport",line:e,col:t})},_document:function(){var e,t=this._tokenStream,a=[],n="";for(t.mustMatch(v.DOCUMENT_SYM),e=t.token(),/^@-([^-]+)-/.test(e.value)&&(n=RegExp.$1),this._readWhitespace(),a.push(this._document_function());t.match(v.COMMA);)this._readWhitespace(),a.push(this._document_function());t.mustMatch(v.LBRACE),this._readWhitespace(),this.fire({type:"startdocument",functions:a,prefix:n,line:e.startLine,col:e.startCol});for(var s=!0;s;)switch(t.peek()){case v.PAGE_SYM:this._page();break;case v.FONT_FACE_SYM:this._font_face();break;case v.VIEWPORT_SYM:this._viewport();break;case v.MEDIA_SYM:this._media();break;case v.KEYFRAMES_SYM:this._keyframes();break;case v.DOCUMENT_SYM:this._document();break;default:s=Boolean(this._ruleset())}t.mustMatch(v.RBRACE),e=t.token(),this._readWhitespace(),this.fire({type:"enddocument",functions:a,prefix:n,line:e.startLine,col:e.startCol})},_document_function:function(){var e,t=this._tokenStream;return t.match(v.URI)?(e=t.token().value,this._readWhitespace()):e=this._function(),e},_operator:function(e){var t=this._tokenStream,a=null;return(t.match([v.SLASH,v.COMMA])||e&&t.match([v.PLUS,v.STAR,v.MINUS]))&&(a=t.token(),this._readWhitespace()),a?h.fromToken(a):null},_combinator:function(){var e,t=this._tokenStream,a=null;return t.match([v.PLUS,v.GREATER,v.TILDE])&&(e=t.token(),a=new l(e.value,e.startLine,e.startCol),this._readWhitespace()),a},_unary_operator:function(){var e=this._tokenStream;return e.match([v.MINUS,v.PLUS])?e.token().value:null},_property:function(){var e,t,a,n=this._tokenStream,s=null,o=null,l="";if(n.peek()===v.STAR&&this.options.starHack&&(n.get(),o=(e=n.token()).value,t=e.startLine,a=e.startCol),n.peek()===v.MINUS&&(n.get(),l=(e=n.token()).value,t=e.startLine,a=e.startCol),n.match(v.IDENT))"_"===(l+=(e=n.token()).value).charAt(0)&&this.options.underscoreHack&&(o="_",l=l.substring(1)),s=new c(l,o,t||e.startLine,a||e.startCol),this._readWhitespace();else{var r=n.peek();r!==v.EOF&&r!==v.RBRACE&&this._unexpectedToken(n.LT(1))}return s},_ruleset:function(){var e,t=this._tokenStream;try{e=this._selectors_group()}catch(e){if(!(e instanceof s)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),t.advance([v.RBRACE])!==v.RBRACE)throw e;return!0}return e&&(this.fire({type:"startrule",selectors:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:e,line:e[0].line,col:e[0].col})),e},_selectors_group:function(){var e,t=this._tokenStream,a=[];if(null!==(e=this._selector()))for(a.push(e);t.match(v.COMMA);)this._readWhitespace(),null!==(e=this._selector())?a.push(e):this._unexpectedToken(t.LT(1));return a.length?a:null},_selector:function(){var e=this._tokenStream,t=[],a=null,n=null,s=null;if(null===(a=this._simple_selector_sequence()))return null;for(t.push(a);;)if(null!==(n=this._combinator()))t.push(n),null===(a=this._simple_selector_sequence())?this._unexpectedToken(e.LT(1)):t.push(a);else{if(!this._readWhitespace())break;s=new l(e.token().value,e.token().startLine,e.token().startCol),n=this._combinator(),null===(a=this._simple_selector_sequence())?null!==n&&this._unexpectedToken(e.LT(1)):(null!==n?t.push(n):t.push(s),t.push(a))}return new g(t,t[0].line,t[0].col)},_simple_selector_sequence:function(){var e,t,a=this._tokenStream,n=null,s=[],o="",l=[function(){return a.match(v.HASH)?new u(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],r=0,i=l.length,c=null;for(e=a.LT(1).startLine,t=a.LT(1).startCol,(n=this._type_selector())||(n=this._universal()),null!==n&&(o+=n);a.peek()!==v.S;){for(;r1&&e.unget()),null)},_class:function(){var e,t=this._tokenStream;return t.match(v.DOT)?(t.mustMatch(v.IDENT),e=t.token(),new u("."+e.value,"class",e.startLine,e.startCol-1)):null},_element_name:function(){var e,t=this._tokenStream;return t.match(v.IDENT)?(e=t.token(),new u(e.value,"elementName",e.startLine,e.startCol)):null},_namespace_prefix:function(){var e=this._tokenStream,t="";return e.LA(1)!==v.PIPE&&e.LA(2)!==v.PIPE||(e.match([v.IDENT,v.STAR])&&(t+=e.token().value),e.mustMatch(v.PIPE),t+="|"),t.length?t:null},_universal:function(){var e,t=this._tokenStream,a="";return(e=this._namespace_prefix())&&(a+=e),t.match(v.STAR)&&(a+="*"),a.length?a:null},_attrib:function(){var e,t,a=this._tokenStream,n=null;return a.match(v.LBRACKET)?(n=(t=a.token()).value,n+=this._readWhitespace(),(e=this._namespace_prefix())&&(n+=e),a.mustMatch(v.IDENT),n+=a.token().value,n+=this._readWhitespace(),a.match([v.PREFIXMATCH,v.SUFFIXMATCH,v.SUBSTRINGMATCH,v.EQUALS,v.INCLUDES,v.DASHMATCH])&&(n+=a.token().value,n+=this._readWhitespace(),a.mustMatch([v.IDENT,v.STRING]),n+=a.token().value,n+=this._readWhitespace()),a.mustMatch(v.RBRACKET),new u(n+"]","attribute",t.startLine,t.startCol)):null},_pseudo:function(){var e,t,a=this._tokenStream,n=null,o=":";if(a.match(v.COLON)){if(a.match(v.COLON)&&(o+=":"),a.match(v.IDENT)?(n=a.token().value,e=a.token().startLine,t=a.token().startCol-o.length):a.peek()===v.FUNCTION&&(e=a.LT(1).startLine,t=a.LT(1).startCol-o.length,n=this._functional_pseudo()),!n){var l=a.LT(1).startLine,r=a.LT(0).startCol;throw new s("Expected a `FUNCTION` or `IDENT` after colon at line "+l+", col "+r+".",l,r)}n=new u(o+n,"pseudo",e,t)}return n},_functional_pseudo:function(){var e=this._tokenStream,t=null;return e.match(v.FUNCTION)&&(t=e.token().value,t+=this._readWhitespace(),t+=this._expression(),e.mustMatch(v.RPAREN),t+=")"),t},_expression:function(){for(var e=this._tokenStream,t="";e.match([v.PLUS,v.MINUS,v.DIMENSION,v.NUMBER,v.STRING,v.IDENT,v.LENGTH,v.FREQ,v.ANGLE,v.TIME,v.RESOLUTION,v.SLASH]);)t+=e.token().value,t+=this._readWhitespace();return t.length?t:null},_negation:function(){var e,t,a,n=this._tokenStream,s="",o=null;return n.match(v.NOT)&&(s=n.token().value,e=n.token().startLine,t=n.token().startCol,s+=this._readWhitespace(),s+=a=this._negation_arg(),s+=this._readWhitespace(),n.match(v.RPAREN),s+=n.token().value,(o=new u(s,"not",e,t)).args.push(a)),o},_negation_arg:function(){var e,t,a=this._tokenStream,n=[this._type_selector,this._universal,function(){return a.match(v.HASH)?new u(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,this._attrib,this._pseudo],s=null,o=0,l=n.length;for(e=a.LT(1).startLine,t=a.LT(1).startCol;o0?new d(t,t[0].line,t[0].col):null},_term:function(e){var t,a,n,s,o=this._tokenStream,l=null,r=null,i=null;return null!==(t=this._unary_operator())&&(n=o.token().startLine,s=o.token().startCol),o.peek()===v.IE_FUNCTION&&this.options.ieFilters?(l=this._ie_function(),null===t&&(n=o.token().startLine,s=o.token().startCol)):e&&o.match([v.LPAREN,v.LBRACE,v.LBRACKET])?(r=(a=o.token()).endChar,l=a.value+this._expr(e).text,null===t&&(n=o.token().startLine,s=o.token().startCol),o.mustMatch(v.type(r)),l+=r,this._readWhitespace()):o.match([v.NUMBER,v.PERCENTAGE,v.LENGTH,v.ANGLE,v.TIME,v.FREQ,v.STRING,v.IDENT,v.URI,v.UNICODE_RANGE])?(l=o.token().value,null===t&&(n=o.token().startLine,s=o.token().startCol,i=h.fromToken(o.token())),this._readWhitespace()):null===(a=this._hexcolor())?(null===t&&(n=o.LT(1).startLine,s=o.LT(1).startCol),null===l&&(l=o.LA(3)===v.EQUALS&&this.options.ieFilters?this._ie_function():this._function())):(l=a.value,null===t&&(n=a.startLine,s=a.startCol)),null!==i?i:null!==l?new h(null!==t?t+l:l,n,s):null},_function:function(){var e,t=this._tokenStream,a=null;if(t.match(v.FUNCTION)){if(a=t.token().value,this._readWhitespace(),a+=this._expr(!0),this.options.ieFilters&&t.peek()===v.EQUALS)do{for(this._readWhitespace()&&(a+=t.token().value),t.LA(0)===v.COMMA&&(a+=t.token().value),t.match(v.IDENT),a+=t.token().value,t.match(v.EQUALS),a+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),a+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),a+=")",this._readWhitespace()}return a},_ie_function:function(){var e,t=this._tokenStream,a=null;if(t.match([v.IE_FUNCTION,v.FUNCTION])){a=t.token().value;do{for(this._readWhitespace()&&(a+=t.token().value),t.LA(0)===v.COMMA&&(a+=t.token().value),t.match(v.IDENT),a+=t.token().value,t.match(v.EQUALS),a+=t.token().value,e=t.peek();e!==v.COMMA&&e!==v.S&&e!==v.RPAREN;)t.get(),a+=t.token().value,e=t.peek()}while(t.match([v.COMMA,v.S]));t.match(v.RPAREN),a+=")",this._readWhitespace()}return a},_hexcolor:function(){var e,t=this._tokenStream,a=null;if(t.match(v.HASH)){if(e=(a=t.token()).value,!/#[a-f0-9]{3,6}/i.test(e))throw new s("Expected a hex color but found '"+e+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol);this._readWhitespace()}return a},_keyframes:function(){var e,t,a,n=this._tokenStream,s="";for(n.mustMatch(v.KEYFRAMES_SYM),e=n.token(),/^@-([^-]+)-/.test(e.value)&&(s=RegExp.$1),this._readWhitespace(),a=this._keyframe_name(),this._readWhitespace(),n.mustMatch(v.LBRACE),this.fire({type:"startkeyframes",name:a,prefix:s,line:e.startLine,col:e.startCol}),this._readWhitespace(),t=n.peek();t===v.IDENT||t===v.PERCENTAGE;)this._keyframe_rule(),this._readWhitespace(),t=n.peek();this.fire({type:"endkeyframes",name:a,prefix:s,line:e.startLine,col:e.startCol}),this._readWhitespace(),n.mustMatch(v.RBRACE),this._readWhitespace()},_keyframe_name:function(){var e=this._tokenStream;return e.mustMatch([v.IDENT,v.STRING]),o.fromToken(e.token())},_keyframe_rule:function(){var e=this._key_list();this.fire({type:"startkeyframerule",keys:e,line:e[0].line,col:e[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:e,line:e[0].line,col:e[0].col})},_key_list:function(){var e=this._tokenStream,t=[];for(t.push(this._key()),this._readWhitespace();e.match(v.COMMA);)this._readWhitespace(),t.push(this._key()),this._readWhitespace();return t},_key:function(){var e,t=this._tokenStream;if(t.match(v.PERCENTAGE))return o.fromToken(t.token());if(t.match(v.IDENT)){if(e=t.token(),/from|to/i.test(e.value))return o.fromToken(e);t.unget()}this._unexpectedToken(t.LT(1))},_skipCruft:function(){for(;this._tokenStream.match([v.S,v.CDO,v.CDC]););},_readDeclarations:function(e,t){var a,n=this._tokenStream;this._readWhitespace(),e&&n.mustMatch(v.LBRACE),this._readWhitespace();try{for(;;){if(n.match(v.SEMICOLON)||t&&this._margin());else{if(!this._declaration())break;if(!n.match(v.SEMICOLON))break}this._readWhitespace()}n.mustMatch(v.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof s)||this.options.strict)throw e;if(this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),(a=n.advance([v.SEMICOLON,v.RBRACE]))===v.SEMICOLON)this._readDeclarations(!1,t);else if(a!==v.EOF&&a!==v.RBRACE)throw e}},_readWhitespace:function(){for(var e=this._tokenStream,t="";e.match(v.S);)t+=e.token().value;return t},_unexpectedToken:function(e){throw new s("Unexpected token '"+e.value+"' at line "+e.startLine+", col "+e.startCol+".",e.startLine,e.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!==v.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},_validateProperty:function(e,t){f.validate(e,t)},parse:function(e){this._tokenStream=new m(e,v),this._stylesheet()},parseStyleSheet:function(e){return this.parse(e)},parseMediaQuery:function(e){this._tokenStream=new m(e,v);var t=this._media_query();return this._verifyEnd(),t},parsePropertyValue:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._expr();return this._readWhitespace(),this._verifyEnd(),t},parseRule:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._ruleset();return this._readWhitespace(),this._verifyEnd(),t},parseSelector:function(e){this._tokenStream=new m(e,v),this._readWhitespace();var t=this._selector();return this._readWhitespace(),this._verifyEnd(),t},parseStyleAttribute:function(e){e+="}",this._tokenStream=new m(e,v),this._readDeclarations()}};for(e in a)Object.prototype.hasOwnProperty.call(a,e)&&(t[e]=a[e]);return t}()},{"../util/EventTarget":23,"../util/SyntaxError":25,"../util/SyntaxUnit":26,"./Combinator":2,"./MediaFeature":4,"./MediaQuery":5,"./PropertyName":8,"./PropertyValue":9,"./PropertyValuePart":11,"./Selector":13,"./SelectorPart":14,"./SelectorSubPart":15,"./TokenStream":17,"./Tokens":18,"./Validation":19}],7:[function(e,t,a){"use strict";t.exports={__proto__:null,"align-items":"flex-start | flex-end | center | baseline | stretch","align-content":"flex-start | flex-end | center | space-between | space-around | stretch","align-self":"auto | flex-start | flex-end | center | baseline | stretch",all:"initial | inherit | unset","-webkit-align-items":"flex-start | flex-end | center | baseline | stretch","-webkit-align-content":"flex-start | flex-end | center | space-between | space-around | stretch","-webkit-align-self":"auto | flex-start | flex-end | center | baseline | stretch","alignment-adjust":"auto | baseline | before-edge | text-before-edge | middle | central | after-edge | text-after-edge | ideographic | alphabetic | hanging | mathematical | | ","alignment-baseline":"auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",animation:1,"animation-delay":"