/*! * jsoneditor.js * * @brief * JSONEditor is a web-based tool to view, edit, format, and validate JSON. * It has various modes such as a tree editor, a code editor, and a plain text * editor. * * Supported browsers: Chrome, Firefox, Safari, Edge * * @license * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. * * Copyright (c) 2011-2024 Jos de Jong, http://jsoneditoronline.org * * @author Jos de Jong, * @version 10.1.0 * @date 2024-11-03 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JSONEditor=t():e.JSONEditor=t()}(self,function(){return n={6545:function(e,t,n){n.d(t,{t:function(){return r}});var c=n(1925),h=n(6237),d=n(3057);function o(e){return(o="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})(e)}function i(e,t){for(var n=0;ns.top&&(i=!1),n?0:r.top-o.top);i?(n=e.offsetHeight,this.dom.menu.style.left="0",this.dom.menu.style.top=t+n+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left="0",this.dom.menu.style.top="",this.dom.menu.style.bottom="0px"),this.limitHeight&&(o=i?s.bottom-r.bottom-10:r.top-s.top-10,this.dom.list.style.maxHeight=o+"px",this.dom.list.style.overflowY="auto"),this.dom.absoluteAnchor.appendChild(this.dom.root),this.selection=(0,h.getSelection)(),this.anchor=e,setTimeout(function(){a.dom.focusButton.focus()},0),l.visibleMenu&&l.visibleMenu.hide(),l.visibleMenu=this}},{key:"hide",value:function(){this.dom.absoluteAnchor&&(this.dom.absoluteAnchor.destroy(),delete this.dom.absoluteAnchor),this.dom.root.parentNode&&(this.dom.root.parentNode.removeChild(this.dom.root),this.onClose)&&this.onClose(),l.visibleMenu===this&&(l.visibleMenu=void 0)}},{key:"_onExpandItem",value:function(n){var i,o=this,e=n===this.expandedItem,t=this.expandedItem;t&&(t.ul.style.height="0",t.ul.style.padding="",setTimeout(function(){o.expandedItem!==t&&(t.ul.style.display="",h.removeClassName)(t.ul.parentNode,"jsoneditor-selected")},300),this.expandedItem=void 0),e||((i=n.ul).style.display="block",i.clientHeight,setTimeout(function(){if(o.expandedItem===n){for(var e=0,t=0;t/gi,"\n"))),i.appendChild(o),n.appendChild(i)),n.onclick=function(){a.onFocusLine(e)},s.appendChild(n)}),this.dom.validationErrors=n,this.dom.validationErrorsContainer.appendChild(n),this.dom.additionalErrorsIndication.title=e.length+" errors total",this.dom.validationErrorsContainer.clientHeighte[0].length)||(e=t,n=r,this.options.flex));r++);return e?((i=e[0].match(/\n.*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],i=this.performAction.call(this,this.yy,this,o[n],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i||void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},options:{},performAction:function(e,t,n,i){switch(n){case 0:break;case 1:return 6;case 2:return t.yytext=t.yytext.substr(1,t.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},rules:[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};var n;t.parser=n,t.parse=n.parse.bind(n)},4772:function(e){function i(){}i.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){this._events=this._events||{},e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)},emit:function(e){if(this._events=this._events||{},e in this._events!=!1)for(var t=0;t"+t.label+""}),u.each(t.children,function(e,t){t.idx=l,a.appendChild(d.call(this,t,a)),l++},this)):(t.idx=l,d.call(this,t),l++)},this),this.config.data&&Array.isArray(this.config.data)&&(o=!(this.data=[]),a=!1,l=0,u.each(this.config.data,function(e,t){h(t,"children")?(o=u.createElement("optgroup",{label:t.text}),a=u.createElement("ul",{class:"selectr-optgroup",role:"group",html:"
  • "+t.text+"
  • "}),u.each(t.children,function(e,t){(r=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=h(t,"disabled"),this.options.push(r),o.appendChild(r),r.idx=l,a.appendChild(d.call(this,r,t)),this.data[l]=t,l++},this),this.el.appendChild(o)):((r=new Option(t.text,t.value,!1,t.hasOwnProperty("selected")&&!0===t.selected)).disabled=h(t,"disabled"),this.options.push(r),r.idx=l,d.call(this,r,t),this.data[l]=t,l++)},this)),this.setSelected(!0);for(var c=this.navIndex=0;cthis.tree.lastElementChild.idx){this.navIndex=this.tree.lastElementChild.idx;break}if(this.navIndexthis.optsRect.top+this.optsRect.height&&(this.tree.scrollTop=this.tree.scrollTop+(e.top+e.height-(this.optsRect.top+this.optsRect.height))),this.navIndex===this.tree.childElementCount-1&&this.requiresPagination&&r.call(this)):0===this.navIndex?this.tree.scrollTop=0:e.top-this.optsRect.top<0&&(this.tree.scrollTop=this.tree.scrollTop+(e.top-this.optsRect.top)),n&&u.removeClass(n,"active"),u.addClass(this.items[this.navIndex],"active")}else this.navigating=!1}.bind(this),this.events.reset=this.reset.bind(this),(this.config.nativeDropdown||this.mobileDevice)&&(this.container.addEventListener("touchstart",function(e){e.changedTouches[0].target===i.el&&i.toggle()},!!this.supportsEventPassiveOption&&{passive:!0}),this.container.addEventListener("click",function(e){e.target===i.el&&i.toggle()}),this.el.addEventListener("change",function(e){e.__selfTriggered||(i.el.multiple?(e=i.getSelectedProperties("idx"),e=function(e,t){for(var n,i=[],o=e.slice(0),r=0;rn?(u.addClass(this.container,"inverted"),this.isInverted=!0):(u.removeClass(this.container,"inverted"),this.isInverted=!1),this.optsRect=u.rect(this.tree)},t.prototype.getOptionByIndex=function(e){return this.options[e]},t.prototype.getOptionByValue=function(e){for(var t=!1,n=0,i=this.options.length;nthis.limit&&1s.Oq?((0,m.addClassName)((n=this).frame,"busy"),n.dom.busyContent.innerText=t,setTimeout(function(){e(),(0,m.removeClassName)(n.frame,"busy"),n.dom.busyContent.innerText=""},100)):e()},t.validate=n.validate,t._renderErrors=n._renderErrors,[{mode:"preview",mixin:t,data:"json"}])},2915:function(e,t,n){n.r(t),n.d(t,{showSortModal:function(){return s}});var t=n(8340),i=n.n(t),o=n(3057),r=n(6237);function s(e,t,s,n){var a=Array.isArray(t)?(0,r.getChildPaths)(t):[""],l=n&&n.path&&(0,r.contains)(a,n.path)?n.path:a[0],c=n&&n.direction||"asc",t='
    '+(0,o.Tl)("sort")+"
    "+(0,o.Tl)("sortFieldLabel")+'
    '+(0,o.Tl)("sortDirectionLabel")+'
    ';i()({parent:e,content:t,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-sort"}).afterCreate(function(t){var e=t.modalElem().querySelector("form"),n=t.modalElem().querySelector("#ok"),i=t.modalElem().querySelector("#field"),o=t.modalElem().querySelector("#direction");function r(e){o.value=e,o.className="jsoneditor-button-group jsoneditor-button-group-value-"+o.value}a.forEach(function(e){var t,n=document.createElement("option");n.text=""===(t=e)?"@":"."===t[0]?t.slice(1):t,n.value=e,i.appendChild(n)}),i.value=l||a[0],r(c||"asc"),o.onclick=function(e){r(e.target.getAttribute("data-value"))},n.onclick=function(e){e.preventDefault(),e.stopPropagation(),t.close(),s({path:i.value,direction:o.value})},e&&(e.onsubmit=n.onclick)}).afterClose(function(e){e.destroy()}).show()}},5609:function(e,t,n){n.r(t),n.d(t,{showTransformModal:function(){return s}});var t=n(8340),i=n.n(t),t=n(4772),x=n.n(t),o=n(3057);function I(e){return(I="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})(e)}function k(e,t,n,i){if("boolean"==typeof e||e instanceof Boolean||null===e||"number"==typeof e||e instanceof Number||"string"==typeof e||e instanceof String||e instanceof Date)return JSON.stringify(e);if(Array.isArray(e)){for(var o=e,r=t,s=n,a=i,l=r?s+r:void 0,c=r?"[\n":"[",h=0;ha)return c+"..."}return c+=r?"\n"+s+"]":"]"}if(e&&"object"===I(e)){var u,g=e,p=t,s=n,m=i,f=p?s+p:void 0,C=!0,y=p?"{\n":"{";if("function"==typeof g.toJSON)return k(g.toJSON(),p,s,m);for(u in g)if(function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(g,u)){var v=g[u];if(C?C=!1:y+=p?",\n":",",(y=(y+=p?f+'"'+u+'": ':'"'+u+'":')+k(v,p,f,m)).length>m)return y+"..."}return y+=p?"\n"+s+"}":"}"}}function T(e,t){for(var n="";0JMESPath query to filter, sort, or transform the JSON data.
    To learn JMESPath, go to the interactive tutorial.';function s(e){var t=e.container,I=e.json,n=e.queryDescription,n=void 0===n?r:n,b=e.createQuery,A=e.executeQuery,w=e.onTransform,S=I,e='
    '+(0,o.Tl)("transform")+"

    "+n+'

    '+(0,o.Tl)("transformWizardLabel")+'
    '+(0,o.Tl)("transformWizardFilter")+'
    '+(0,o.Tl)("transformWizardSortBy")+'
    '+(0,o.Tl)("transformWizardSelectFields")+'
    '+(0,o.Tl)("transformQueryLabel")+'
    '+(0,o.Tl)("transformPreviewLabel")+'
    ';i()({parent:t,content:e,overlayClass:"jsoneditor-modal-overlay",overlayStyles:{backgroundColor:"rgb(1,1,1)",opacity:.3},modalClass:"jsoneditor-modal jsoneditor-modal-transform",focus:!1}).afterCreate(function(t){var e=t.modalElem(),n=e.querySelector("#wizard"),r=e.querySelector("#ok"),o=e.querySelector("#filterField"),s=e.querySelector("#filterRelation"),a=e.querySelector("#filterValue"),l=e.querySelector("#sortField"),c=e.querySelector("#sortOrder"),h=e.querySelector("#selectFields"),d=e.querySelector("#query"),u=e.querySelector("#preview");Array.isArray(S)||(n.style.fontStyle="italic",n.textContent="(wizard not available for objects, only for arrays)");(0,E.getChildPaths)(I).forEach(function(e){var e=f(e),t=document.createElement("option"),t=(t.text=e,t.value=e,o.appendChild(t),document.createElement("option"));t.text=e,t.value=e,l.appendChild(t)});var n=(0,E.getChildPaths)(I,!0).filter(function(e){return""!==e}),n=(0i?(t=n,("number"==typeof(o=i)?t.slice(0,o):t)+"..."):n),r.disabled=!1}catch(e){u.className="jsoneditor-transform-preview jsoneditor-error",u.value=e.toString(),r.disabled=!0}var t,n,i,o},300);function y(t,e){try{d.value=b(t,e),r.disabled=!1,C()}catch(e){t='Error: an error happened when executing "createQuery": '+(e.message||e.toString());d.value="",r.disabled=!0,u.className="jsoneditor-transform-preview jsoneditor-error",u.value=t}}function v(){var e={};if(o.value&&s.value&&a.value&&(e.filter={field:o.value,relation:s.value,value:a.value}),l.value&&c.value&&(e.sort={field:l.value,direction:c.value}),h.value){for(var t,n=[],i=0;i=o[n].key.column&&i.column<=o[n].keyEnd.column&&(e=n.slice(0,n.lastIndexOf("/"))),(e=(null==(t=o[n].value)?void 0:t.line)===i.row&&(null==(t=o[n].value)?void 0:t.line)===(null==(t=o[n].valueEnd)?void 0:t.line)&&i.column>=o[n].value.column&&i.column<=o[n].valueEnd.column?n:e)&&(t=l(e,c.suggestions,""),r(t))})})}catch(e){}}}])&&s(e.prototype,t),i&&s(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}();function v(e){return(v="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})(e)}var t={},I="ace/theme/jsoneditor";function b(){try{this.format()}catch(e){}}t.create=function(e){var t,n,i,o=this, r=1"),line:t}]),this._renderErrors(o),"function"==typeof this.options.onValidationError&&(0,C.isValidationErrorChanged)(o,this.lastSchemaErrors)&&this.options.onValidationError.call(this,o),this.lastSchemaErrors=o,Promise.resolve(this.lastSchemaErrors)}},t._validateAndCatch=function(){this.validate().catch(function(e){console.error("Error running validation:",e)})},t._renderErrors=function(i){var e=this.getText(),t=[],e=(i.reduce(function(e,t){return"string"==typeof t.dataPath&&-1===e.indexOf(t.dataPath)&&e.push(t.dataPath),e},t),(0,C.getPositionForPath)(e,t));this.aceEditor&&(this.annotations=e.map(function(t){var e=i.filter(function(e){return e.dataPath===t.path}),n=e.map(function(e){return e.message}).join("\n");return n?{row:t.line,column:t.column,text:"Schema validation error"+(1!==e.length?"s":"")+": \n"+n,type:"warning",source:"jsoneditor"}:{}}),this._refreshAnnotations()),this.errorTable.setErrors(i,e),this.aceEditor&&this.aceEditor.resize(!1)},t.getTextSelection=function(){var e,t,n,i={};return this.textarea?(n=(0,C.getInputSelection)(this.textarea),this.cursorInfo&&this.cursorInfo.line===n.end.row&&this.cursorInfo.column===n.end.column?(i.start=n.end,i.end=n.start):i=n,{start:i.start,end:i.end,text:this.textarea.value.substring(n.startIndex,n.endIndex)}):this.aceEditor?(n=this.aceEditor.getSelection(),e=this.aceEditor.getSelectedText(),t=n.getRange(),(n=n.getSelectionLead()).row===t.end.row&&n.column===t.end.column?i=t:(i.start=t.end,i.end=t.start),{start:{row:i.start.row+1,column:i.start.column+1},end:{row:i.end.row+1,column:i.end.column+1},text:e}):void 0},t.onTextSelectionChange=function(e){"function"==typeof e&&(this._selectionChangedHandler=(0,C.debounce)(e,this.DEBOUNCE_INTERVAL))},t.setTextSelection=function(e,t){var n,i,o;e&&t&&(this.textarea?(n=(0,C.getIndexForPosition)(this.textarea,e.row,e.column),o=(0,C.getIndexForPosition)(this.textarea,t.row,t.column),-1this.textarea.clientHeight?i-this.textarea.clientHeight/2:0)):this.aceEditor&&(o={start:{row:e.row-1,column:e.column-1},end:{row:t.row-1,column:t.column-1}},this.aceEditor.selection.setRange(o),this.aceEditor.scrollToLine(e.row-1,!0)))};var A=[{mode:"text",mixin:t,data:"text",load:b},{mode:"code",mixin:t,data:"text",load:b}]},5633:function(W,e,t){t.r(e),t.d(e,{treeModeMixins:function(){return D}});var w={start:function(e,t,n){return 0===t.indexOf(e)},contain:function(e,t,n){return-1=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(e,t){var n;if(e)return"string"==typeof e?f(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length;i--)this.removeChild(this.childs[i],!1)}else if("object"===this.type){for(this.childs||(this.childs=[]),i=this.childs.length-1;0<=i;i--)v(e,this.childs[i].field)||this.removeChild(this.childs[i],!1);for(var c in n=0,e)v(e,c)&&(void 0===(s=e[c])||s instanceof Function||((a=this.findChildByProperty(c))?(a.setField(c,!0),a.setValue(s)):(a=new x(this.editor,{field:c,value:s}),c=n=e.childs.length;r--)this.removeChild(this.childs[r],!1)}else if("object"===e.type){for(this.childs||(this.childs=[]),o=0;o=e.childs.length;r--)this.removeChild(this.childs[r],!1)}else this.hideChilds(),delete this.append,delete this.showMore,delete this.expanded,delete this.childs,this.value=e.value;Array.isArray(s)!==Array.isArray(this.childs)&&this.recreateDom(),this.updateDom({updateIndexes:!0}),this.previousValue=this.value}},{key:"recreateDom",value:function(){var e;this.dom&&this.dom.tr&&this.dom.tr.parentNode?(e=this._detachFromDom(),this.clearDom(),this._attachToDom(e)):this.clearDom()}},{key:"getValue",value:function(){var t,n;return"array"===this.type?(t=[],this.childs.forEach(function(e){t.push(e.getValue())}),t):"object"===this.type?(n={},this.childs.forEach(function(e){n[e.getField()]=e.getValue()}),n):(void 0===this.value&&this._getDomValue(),this.value)}},{key:"getInternalValue",value:function(){return"array"===this.type?{type:this.type,childs:this.childs.map(function(e){return e.getInternalValue()})}:"object"===this.type?{type:this.type,childs:this.childs.map(function(e){return{field:e.getField(),value:e.getInternalValue()}})}:(void 0===this.value&&this._getDomValue(),{type:this.type,value:this.value})}},{key:"getLevel",value:function(){return this.parent?this.parent.getLevel()+1:0}},{key:"getNodePath",value:function(){var e=this.parent?this.parent.getNodePath():[];return e.push(this),e}},{key:"clone",value:function(){var t,n;return(t=new x(this.editor)).type=this.type,t.field=this.field,t.fieldInnerText=this.fieldInnerText,t.fieldEditable=this.fieldEditable,t.previousField=this.previousField,t.value=this.value,t.valueInnerText=this.valueInnerText,t.previousValue=this.previousValue,t.expanded=this.expanded,t.visibleChilds=this.visibleChilds,this.childs?(n=[],this.childs.forEach(function(e){e=e.clone();e.setParent(t),n.push(e)}),t.childs=n):t.childs=void 0,t}},{key:"expand",value:function(t){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-expanded"),this.showChilds(),!1!==t&&this.childs.forEach(function(e){e.expand(t)}),this.updateDom({recurse:!1}))}},{key:"collapse",value:function(t){this.childs&&(this.hideChilds(),!1!==t&&this.childs.forEach(function(e){e.collapse(t)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-button jsoneditor-collapsed"),this.expanded=!1,this.updateDom({recurse:!1}))}},{key:"showChilds",value:function(){var e=this.childs;if(e&&this.expanded){var e=this.dom.tr,t=e?e.parentNode:void 0;if(t){for(var n=this.getAppendDom(),i=(n.parentNode||((o=e.nextSibling)?t.insertBefore(n,o):t.appendChild(n)),Math.min(this.childs.length,this.visibleChilds)),o=this._getNextTr(),r=0;rthis.visibleChilds?(r=this.childs[this.visibleChilds-1],this.insertBefore(e,r,n)):this.appendChild(e,!0,n):this.insertBefore(e,t,n),i)&&o&&i.removeChild(o)}},{key:"insertBefore",value:function(e,t,n){if(this._hasChilds()){if(this.visibleChilds++,"object"===this.type&&void 0===e.field&&e.setField(""),t===this.append)e.setParent(this),e.fieldEditable="object"===this.type,this.childs.push(e);else{var i=this.childs.indexOf(t);if(-1===i)throw new Error("Node not found");e.setParent(this),e.fieldEditable="object"===this.type,this.childs.splice(i,0,e)}var o;this.expanded&&(i=e.getDom(),o=(t=t.getDom())?t.parentNode:void 0,t&&o&&o.insertBefore(i,t),e.showChilds(),this.showChilds()),!1!==n&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}}},{key:"insertAfter",value:function(e,t){this._hasChilds()&&(t=this.childs.indexOf(t),(t=this.childs[t+1])?this.insertBefore(e,t):this.appendChild(e))}},{key:"search",value:function(t,n){Array.isArray(n)||(n=[]);var e=t?t.toLowerCase():void 0;return delete this.searchField,delete this.searchValue,void 0!==this.field&&n.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.field).toLowerCase().indexOf(e)&&(this.searchField=!0,n.push({node:this,elem:"field"})),this._updateDomField()),this._hasChilds()?this.childs&&this.childs.forEach(function(e){e.search(t,n)}):void 0!==this.value&&n.length<=this.MAX_SEARCH_RESULTS&&(-1!==String(this.value).toLowerCase().indexOf(e)&&(this.searchValue=!0,n.push({node:this,elem:"value"})),this._updateDomValue()),n}},{key:"scrollTo",value:function(e){this.expandPathToNode(),this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,e)}},{key:"expandPathToNode",value:function(){for(var e=this;e&&e.parent;){for(var t="array"===e.parent.type?e.index:e.parent.childs.indexOf(e);e.parent.visibleChilds/g,">").replace(/ {2}/g,"  ").replace(/^ /," ").replace(/ $/," "),e=(e=JSON.stringify(e)).substring(1,e.length-1),!0===this.editor.options.escapeUnicode?(0,k.escapeUnicodeChars)(e):e)}},{key:"_unescapeHTML",value:function(e){e='"'+this._escapeJSON(e)+'"';return(0,k.parse)(e).replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ").replace(/&/g,"&")}},{key:"_escapeJSON",value:function(e){for(var t="",n=0;nthis.parent.visibleChilds},I.prototype.onEvent=function(e){"keydown"===e.type&&this.onKeyDown(e)};var F=I;function I(e,t){this.editor=e,this.parent=t,this.dom={}}function b(e){return(b="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})(e)}function A(e,t){for(var n=0;nthis.results.length-1&&(t=0),this._setActiveResult(t,e))}},{key:"previous",value:function(e){var t,n;this.results&&(t=this.results.length-1,n=null!==this.resultIndex?this.resultIndex-1:t,this._setActiveResult(n=n<0?t:n,e))}},{key:"_setActiveResult",value:function(e,t){var n,i,o;this.activeResult&&(n=this.activeResult.node,"field"===this.activeResult.elem?delete n.searchFieldActive:delete n.searchValueActive,n.updateDom()),this.results&&this.results[e]?(this.resultIndex=e,i=this.results[this.resultIndex].node,"field"===(o=this.results[this.resultIndex].elem)?i.searchFieldActive=!0:i.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],i.updateDom(),i.scrollTo(function(){t&&i.focus(o)})):(this.resultIndex=void 0,this.activeResult=void 0)}},{key:"_clearDelay",value:function(){void 0!==this.timeout&&(clearTimeout(this.timeout),delete this.timeout)}},{key:"_onDelayedSearch",value:function(e){this._clearDelay();var t=this;this.timeout=setTimeout(function(e){t._onSearch()},this.delay)}},{key:"_onSearch",value:function(e){this._clearDelay();var t=this.dom.search.value,t=0e.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.left&&t.right+n<=e.right&&t.top-n>=e.top&&t.bottom+n<=e.bottom}function ne(i,o,r){var s;return function(){var e=this,t=arguments,n=r&&!s;clearTimeout(s),s=setTimeout(function(){s=null,r||i.apply(e,t)},o),n&&i.apply(e,t)}}function ie(e,t){for(var n=t.length,i=0,o=e.length,r=t.length;t.charAt(i)===e.charAt(i)&&ithis.length)&&(t=this.length),t-=e.length;e=this.indexOf(e,t);return-1!==e&&e===t}),String.prototype.repeat||i(String.prototype,"repeat",function(e){for(var t="",n=this;0>=1)&&(n+=n);return t}),String.prototype.includes||i(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),n=1;n>>0,n=arguments[1]>>0,i=n<0?Math.max(t+n,0):Math.min(n,t),n=arguments[2],n=void 0===n?t:n>>0,o=n<0?Math.max(t+n,0):Math.min(n,t);i>=1)&&(e+=e);return n};var i=/^\s\s*/,o=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(i,"")},t.stringTrimRight=function(e){return e.replace(o,"")},t.copyObject=function(e){var t,n={};for(t in e)n[t]=e[t];return n},t.copyArray=function(e){for(var t=[],n=0,i=e.length;n ["+this.end.row+"/"+this.end.column+"]"},r.prototype.contains=function(e,t){return 0==this.compare(e,t)},r.prototype.compareRange=function(e){var t=e.end,e=e.start,t=this.compare(t.row,t.column);return 1==t?1==(t=this.compare(e.row,e.column))?2:0==t?1:0:-1==t?-2:-1==(t=this.compare(e.row,e.column))?-1:1==t?42:0},r.prototype.comparePoint=function(e){return this.compare(e.row,e.column)},r.prototype.containsRange=function(e){return 0==this.comparePoint(e.start)&&0==this.comparePoint(e.end)},r.prototype.intersects=function(e){e=this.compareRange(e);return-1==e||0==e||1==e},r.prototype.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},r.prototype.isStart=function(e,t){return this.start.row==e&&this.start.column==t},r.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)},r.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)},r.prototype.inside=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)&&!this.isStart(e,t)},r.prototype.insideStart=function(e,t){return 0==this.compare(e,t)&&!this.isEnd(e,t)},r.prototype.insideEnd=function(e,t){return 0==this.compare(e,t)&&!this.isStart(e,t)},r.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:tthis.end.column?1:0},r.prototype.compareStart=function(e,t){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},r.prototype.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},r.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)},r.prototype.clipRows=function(e,t){var n,i;return this.end.row>t?n={row:t+1,column:0}:this.end.rowt?i={row:t+1,column:0}:this.start.rowDate.now()-50)||(i=!1)},cancel:function(){i=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,n){var V=e("../lib/event"),Z=e("../config").nls,D=e("../lib/useragent"),K=e("../lib/dom"),j=e("../lib/lang"),z=e("../clipboard"),X=D.isChrome<18,Y=D.isIE,J=63h?(i=d.session.getLine(h+1),t=r.end.row>h+1?i.length:r.end.column,t+=n.length+1,n=n+"\n"+i):te&&0=f.length&&e.value===f&&f&&e.selectionEnd!==y}),s=null,S=(this.setInputHandler=function(e){s=e},!(this.getInputHandler=function(){return s})),x=function(e,t){if(S=S&&!1,g)return w(),e&&d.onPaste(e),g=!1,"";for(var n=u.selectionStart,i=u.selectionEnd,o=C,r=f.length-y,s=e,a=e.length-n,l=e.length-i,c=0;0C-1&&f[f.length-c]==e[e.length-c];)c++,r--;a-=c-1,l-=c-1;var h=s.length-c+1;return h<0&&(o=-h,h=0),s=s.slice(0,h),t||s||a||o||r||l?(h=!(p=!0),D.isAndroid&&". "==s&&(s=" ",h=!0),s&&!o&&!r&&!a&&!l||m?d.onTextInput(s):d.onTextInput(s,{extendLeft:o,extendRight:r,restoreStart:a,restoreEnd:l}),p=!1,f=e,C=n,y=i,v=l,h?"\n":s):""},P=function(e){if(l)return T();if(e&&e.inputType){if("historyUndo"==e.inputType)return d.execCommand("undo");if("historyRedo"==e.inputType)return d.execCommand("redo")}var e=u.value,t=x(e,!0);(500this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},i.prototype.onDoubleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=t.session.getBracketRange(e);n?(n.isEmpty()&&(n.start.column--,n.end.column++),this.setState("select")):(n=t.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=n,this.select()},i.prototype.onTripleClick=function(e){var e=e.getDocumentPosition(),t=this.editor,n=(this.setState("selectByLines"),t.getSelectionRange());n.isMultiLine()&&n.contains(e.row,e.column)?(this.$clickSelection=t.selection.getLineRange(n.start.row),this.$clickSelection.end=t.selection.getLineRange(n.end.row).end):this.$clickSelection=t.selection.getLineRange(e.row),this.select()},i.prototype.onQuadClick=function(e){var t=this.editor;t.selectAll(),this.$clickSelection=t.getSelectionRange(),this.setState("selectAll")},i.prototype.onMouseWheel=function(e){var t,n,i,o,r,s,a;if(!e.getAccelKey())return e.getShiftKey()&&e.wheelY&&!e.wheelX&&(e.wheelX=e.wheelY,e.wheelY=0),t=this.editor,this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0}),n=this.$lastScroll,o=(a=(i=e.domEvent.timeStamp)-n.t)?e.wheelX/a:n.vx,r=a?e.wheelY/a:n.vy,a<550&&(o=(o+n.vx)/2,r=(r+n.vy)/2),a=!1,1<=(s=Math.abs(o/r))&&t.renderer.isScrollableBy(e.wheelX*e.speed,0)&&(a=!0),(a=s<=1&&t.renderer.isScrollableBy(0,e.wheelY*e.speed)?!0:a)?n.allowed=i:i-n.allowed<550&&(Math.abs(o)<=1.5*Math.abs(n.vx)&&Math.abs(r)<=1.5*Math.abs(n.vy)?(a=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=o,n.vy=r,a?(t.renderer.scrollBy(e.wheelX*e.speed,e.wheelY*e.speed),e.stop()):void 0},i);function i(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t));["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function s(e,t){return(e.start.row==e.end.row?2*t.column-e.start.column-e.end.column:e.start.row!=e.end.row-1||e.start.column||e.end.column?2*t.row-e.start.row-e.end.row:t.column-4)<0?{cursor:e.start,anchor:e.end}:{cursor:e.end,anchor:e.start}}e.prototype.selectEnd=e.prototype.selectByLinesEnd,e.prototype.selectAllEnd=e.prototype.selectByLinesEnd,e.prototype.selectByWordsEnd=e.prototype.selectByLinesEnd,t.DefaultHandlers=e}),ace.define("ace/lib/scroll",["require","exports","module"],function(e,t,n){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,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[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 n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),u=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&i>=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},r=e("./lib/dom"),a=(e("./lib/event"),e("./range").Range),s=e("./lib/scroll").preventParentScroll,l="ace_tooltip",e=(c.prototype.$init=function(){return this.$element=r.createElement("div"),this.$element.className=l,this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},c.prototype.getElement=function(){return this.$element||this.$init()},c.prototype.setText=function(e){this.getElement().textContent=e},c.prototype.setHtml=function(e){this.getElement().innerHTML=e},c.prototype.setPosition=function(e,t){this.getElement().style.left=e+"px",this.getElement().style.top=t+"px"},c.prototype.setClassName=function(e){r.addCssClass(this.getElement(),e)},c.prototype.setTheme=function(e){this.$element.className=l+" "+(e.isDark?"ace_dark ":"")+(e.cssClass||"")},c.prototype.show=function(e,t,n){null!=e&&this.setText(e),null!=t&&null!=n&&this.setPosition(t,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},c.prototype.hide=function(e){this.isOpen&&(this.getElement().style.display="none",this.getElement().className=l,this.isOpen=!1)},c.prototype.getHeight=function(){return this.getElement().offsetHeight},c.prototype.getWidth=function(){return this.getElement().offsetWidth},c.prototype.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)},c);function c(e){this.isOpen=!1,this.$element=null,this.$parentNode=e}function h(){this.popups=[]}h.prototype.addPopup=function(e){this.popups.push(e),this.updatePopups()},h.prototype.removePopup=function(e){e=this.popups.indexOf(e);-1!==e&&(this.popups.splice(e,1),this.updatePopups())},h.prototype.updatePopups=function(){this.popups.sort(function(e,t){return t.priority-e.priority});var t,e,n,i,o=[];try{for(var r=u(this.popups),s=r.next();!s.done;s=r.next()){var a=s.value,l=!0;try{n=void 0;for(var c=u(o),h=c.next();!h.done;h=c.next()){var d=h.value;if(this.doPopupsOverlap(d,a)){l=!1;break}}}catch(e){n={error:e}}finally{try{h&&!h.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}l?o.push(a):a.hide()}}catch(e){t={error:e}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},h.prototype.doPopupsOverlap=function(e,t){e=e.getElement().getBoundingClientRect(),t=t.getElement().getBoundingClientRect(); return e.leftt.left&&e.topt.top};var d,g=new h,o=(t.popupManager=g,t.Tooltip=e,o(p,d=e),p.prototype.addToEditor=function(e){e.on("mousemove",this.onMouseMove),e.on("mousedown",this.hide),e.renderer.getMouseEventTarget().addEventListener("mouseout",this.onMouseOut,!0)},p.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)},p.prototype.onMouseMove=function(e,t){this.lastEvent=e,this.lastT=Date.now();var n,t=t.$mouseHandler.isMousePressed;this.isOpen&&(n=this.lastEvent&&this.lastEvent.getDocumentPosition(),this.range&&this.range.contains(n.row,n.column)&&!t&&!this.isOutsideOfText(this.lastEvent)||this.hide()),this.timeout||t||(this.lastEvent=e,this.timeout=setTimeout(this.waitForHover,this.idleTime))},p.prototype.waitForHover=function(){this.timeout&&clearTimeout(this.timeout);var e=Date.now()-this.lastT;10=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},d=e("../lib/dom"),u=e("../lib/event"),s=e("../tooltip").Tooltip,r=e("../config").nls;t.GutterHandler=function(i){var o,r,s=i.editor,a=s.renderer.$gutterLayer,l=new g(s);function c(){o=o&&clearTimeout(o),l.isOpen&&(l.hideTooltip(),s.off("mousewheel",c))}function h(e){l.setPosition(e.x,e.y)}i.editor.setDefaultHandler("guttermousedown",function(e){if(s.isFocused()&&0==e.getButton()){var t=a.getRegion(e);if("foldWidgets"!=t){var t=e.getDocumentPosition().row,n=s.session.selection;if(e.getShiftKey())n.selectTo(t,0);else{if(2==e.domEvent.detail)return s.selectAll(),e.preventDefault();i.$clickSelection=s.selection.getLineRange(t)}return i.setState("selectByLines"),i.captureMouse(e),e.preventDefault()}}}),i.editor.setDefaultHandler("guttermousemove",function(e){var t=e.domEvent.target||e.domEvent.srcElement;if(d.hasCssClass(t,"ace_fold-widget"))return c();l.isOpen&&i.$tooltipFollowsMouse&&h(e),r=e,o=o||setTimeout(function(){if(o=null,r&&!i.isMousePressed){var e=r.getDocumentPosition().row;if(e==s.session.getLength()){var t=s.renderer.pixelToScreenCoordinates(0,r.y).row,n=r.$pos;if(t>s.session.documentToScreenRow(n.row,n.column))return void c()}l.showTooltip(e),l.isOpen&&(s.on("mousewheel",c),!i.$tooltipFollowsMouse&&(t=r.getGutterRow(),n=a.$lines.get(t))?(e=n.element.querySelector(".ace_gutter_annotation").getBoundingClientRect(),(t=l.getElement().style).left=e.right+"px",t.top=e.bottom+"px"):h(r))}else c()},50)}),u.addListener(s.renderer.$gutter,"mouseout",function(e){r=null,l.isOpen&&(o=o||setTimeout(function(){o=null,c()},50))},s),s.on("changeSession",c),s.on("input",c)};o(p,a=s),p.prototype.setPosition=function(e,t){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,o=this.getWidth(),r=this.getHeight();n<(e+=15)+o&&(e-=e+o-n),i<(t+=15)+r&&(t-=20+r),s.prototype.setPosition.call(this,e,t)},Object.defineProperty(p,"annotationLabels",{get:function(){return{error:{singular:r("gutter-tooltip.aria-label.error.singular","error"),plural:r("gutter-tooltip.aria-label.error.plural","errors")},warning:{singular:r("gutter-tooltip.aria-label.warning.singular","warning"),plural:r("gutter-tooltip.aria-label.warning.plural","warnings")},info:{singular:r("gutter-tooltip.aria-label.info.singular","information message"),plural:r("gutter-tooltip.aria-label.info.plural","information messages")}}},enumerable:!1,configurable:!0}),p.prototype.showTooltip=function(e){var t=this.editor.renderer.$gutterLayer,n=t.$annotations[e],i=n?{text:Array.from(n.text),type:Array.from(n.type)}:{text:[],type:[]},o=t.session.getFoldLine(e);if(o&&t.$showFoldedAnnotations){for(var r,s={error:[],warning:[],info:[]},a=e+1;a<=o.end.row;a++)if(t.$annotations[a])for(var l=0;l ").concat(i.text[a]);h[i.type[a].replace("_fold","")].push(u)}e=[].concat(h.error,h.warning,h.info).join("
    ");this.setHtml(e),this.$element.setAttribute("aria-live","polite"),this.isOpen||(this.setTheme(this.editor.renderer.theme),this.setClassName("ace_gutter-tooltip")),this.show(),this.editor._signal("showGutterTooltip",this)},p.prototype.hideTooltip=function(){this.$element.removeAttribute("aria-live"),this.hide(),this.editor._signal("hideGutterTooltip",this)},p.annotationsToSummaryString=function(e){var t,n,i=[];try{for(var o=l(["error","warning","info"]),r=o.next();!r.done;r=o.next()){var s,a=r.value;e[a].length&&(s=1===e[a].length?p.annotationLabels[a].singular:p.annotationLabels[a].plural,i.push("".concat(e[a].length," ").concat(s)))}}catch(e){t={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return i.join(", ")};var a,g=p;function p(e){var t=a.call(this,e.container)||this;return t.editor=e,t}t.GutterTooltip=g}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(e,t,n){var i=e("../lib/event"),o=e("../lib/useragent");function r(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}r.prototype.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},r.prototype.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},r.prototype.stop=function(){this.stopPropagation(),this.preventDefault()},r.prototype.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},r.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)},r.prototype.inSelection=function(){var e,t;return null===this.$inSelection&&((e=this.editor.getSelectionRange()).isEmpty()?this.$inSelection=!1:(t=this.getDocumentPosition(),this.$inSelection=e.contains(t.row,t.column))),this.$inSelection},r.prototype.getButton=function(){return i.getButton(this.domEvent)},r.prototype.getShiftKey=function(){return this.domEvent.shiftKey},r.prototype.getAccelKey=function(){return o.isMac?this.domEvent.metaKey:this.domEvent.ctrlKey},t.MouseEvent=r}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(e,t,n){var w=e("../lib/dom"),S=e("../lib/event"),x=e("../lib/useragent");function i(t){var n,c,h,e,i,d,o,r,u,g,p,m=t.editor,s=w.createElement("div"),a=(s.style.cssText="top:-100px;position:absolute;z-index:2147483647;opacity:0.5",s.textContent=" ",["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(e){t[e]=this[e]},this),m.on("mousedown",this.onMouseDown.bind(t)),m.container),l=0;function f(){var e,t,n,i,o,r,s,a,l=d;d=m.renderer.screenToTextCoordinates(c,h),n=d,t=l,i=Date.now(),e=!t||n.row!=t.row,t=!t||n.column!=t.column,!g||e||t?(m.moveCursorToPosition(n),g=i,p={x:c,y:h}):5this.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,t=(e.container.draggable=!0,e.renderer.$cursorLayer.setBlinking(!1),e.setStyle("ace_dragging"),x.isWin?"default":"move");e.renderer.setCursorStyle(t),this.setState("dragReady")},this.onMouseDrag=function(e){var t=this.editor.container;x.isIE&&"dragReady"==this.state&&3n&&(g=-1),d=e.clientX=s,u=e.clientY=r,b=A=0,new S(e,h));if(f=s.getDocumentPosition(),o-g<500&&1==t.length&&!v)I++,e.preventDefault(),e.button=0,m=null,clearTimeout(m),h.selection.moveToPosition(f),(r=2<=I?h.selection.getLineRange(f.row):h.session.getBracketRange(f))&&!r.isEmpty()?h.selection.setRange(r):h.selection.selectWord(),y="wait";else{I=0;var s=h.selection.cursor,t=h.selection.isEmpty()?s:h.selection.anchor,r=h.renderer.$cursorLayer.getPixelPosition(s,!0),s=h.renderer.$cursorLayer.getPixelPosition(t,!0),t=h.renderer.scroller.getBoundingClientRect(),a=h.renderer.layerConfig.offset,l=h.renderer.scrollLeft,c=function(e,t){return(e/=i)*e+(t=t/n-.75)*t};if(e.clientX=t.length||(o=n[i-1])!=w&&o!=S||(l=t[i+1])!=w&&l!=S?x:(l=f?S:l)==o?l:x;case _:return(o=0=e){for(i=l+1;i=e;)i++;for(o=l,r=i-1;o>8;return 0==n?191E&&t[a]t.row||e.row==t.row&&e.column>t.column},a.prototype.getRange=function(){var e=this.anchor,t=this.lead;return this.$isEmpty?s.fromPoints(t,t):this.isBackwards()?s.fromPoints(t,e):s.fromPoints(e,t)},a.prototype.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},a.prototype.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},a.prototype.setRange=function(e,t){var n=t?e.end:e.start,t=t?e.start:e.end;this.$setSelection(n.row,n.column,t.row,t.column)},a.prototype.$setSelection=function(e,t,n,i){var o,r;!this.$silent&&(o=this.$isEmpty,r=this.inMultiSelectMode,this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(e,t),this.cursor.setPosition(n,i),this.$isEmpty=!s.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),this.$cursorChanged||this.$anchorChanged||o!=this.$isEmpty||r)&&this._emit("changeSelection")},a.prototype.$moveSelection=function(e){var t=this.lead;this.$isEmpty&&this.setSelectionAnchor(t.row,t.column),e.call(this)},a.prototype.selectTo=function(e,t){this.$moveSelection(function(){this.moveCursorTo(e,t)})},a.prototype.selectToPosition=function(e){this.$moveSelection(function(){this.moveCursorToPosition(e)})},a.prototype.moveTo=function(e,t){this.clearSelection(),this.moveCursorTo(e,t)},a.prototype.moveToPosition=function(e){this.clearSelection(),this.moveCursorToPosition(e)},a.prototype.selectUp=function(){this.$moveSelection(this.moveCursorUp)},a.prototype.selectDown=function(){this.$moveSelection(this.moveCursorDown)},a.prototype.selectRight=function(){this.$moveSelection(this.moveCursorRight)},a.prototype.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},a.prototype.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},a.prototype.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},a.prototype.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},a.prototype.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},a.prototype.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},a.prototype.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},a.prototype.getWordRange=function(e,t){var n;return void 0===t&&(e=(n=e||this.lead).row,t=n.column),this.session.getWordRange(e,t)},a.prototype.selectWord=function(){this.setSelectionRange(this.getWordRange())},a.prototype.selectAWord=function(){var e=this.getCursor(),e=this.session.getAWordRange(e.row,e.column);this.setSelectionRange(e)},a.prototype.getLineRange=function(e,t){var e="number"==typeof e?e:this.lead.row,n=this.session.getFoldLine(e),n=n?(e=n.start.row,n.end.row):e;return!0===t?new s(e,0,n,this.session.getLine(n).length):new s(e,0,n+1,0)},a.prototype.selectLine=function(){this.setSelectionRange(this.getLineRange())},a.prototype.moveCursorUp=function(){this.moveCursorBy(-1,0)},a.prototype.moveCursorDown=function(){this.moveCursorBy(1,0)},a.prototype.wouldMoveIntoSoftTab=function(e,t,n){var i=e.column,o=e.column+t;return n<0&&(i=e.column-t,o=e.column),this.session.isTabStop(e)&&this.doc.getLine(e.row).slice(i,o).split(" ").length-1==t},a.prototype.moveCursorLeft=function(){var e,t=this.lead.getPosition();(e=this.session.getFoldAt(t.row,t.column,-1))?this.moveCursorTo(e.start.row,e.start.column):0===t.column?0=n.length?(this.moveCursorTo(e,n.length),this.moveCursorRight(),ec&&(u=e.substring(c,f-m.length),d.type==g?d.value+=u:(d.type&&l.push(d),d={type:g,value:u}));for(var C=0;Cy){for(h>2*e.length&&this.reportError("infinite loop with in ace tokenizer",{startState:t,line:e});c=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]},o.prototype.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},o.prototype.getCurrentTokenRow=function(){return this.$row},o.prototype.getCurrentTokenColumn=function(){var e=this.$rowTokens,t=this.$tokenIndex,n=e[t].start;if(void 0===n)for(n=0;0e.length&&(I=e.length)}),l==1/0&&(l=I,a=s=!1),t&&l%c!=0&&(l=Math.floor(l/c)*c),v(a?h:u)},this.toggleBlockComment=function(e,t,n,i){var o=this.blockComment;if(o){!o.start&&o[0]&&(o=o[0]);var r,s,a=(u=new m(t,i.row,i.column)).getCurrentToken(),l=(t.selection,t.selection.toOrientedRange());if(a&&/comment/.test(a.type)){for(;a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(o.start))){var c=u.getCurrentTokenRow(),h=u.getCurrentTokenColumn()+g,d=new f(c,h,c,h+o.start.length);break}a=u.stepBackward()}for(var u,g,a=(u=new m(t,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){if(-1!=(g=a.value.indexOf(o.end))){var c=u.getCurrentTokenRow(),h=u.getCurrentTokenColumn()+g,p=new f(c,h,c,h+o.end.length);break}a=u.stepForward()}p&&t.remove(p),d&&(t.remove(d),r=d.start.row,s=-o.start.length)}else s=o.start.length,r=n.start.row,t.insert(n.end,o.end),t.insert(n.start,o.start);l.start.row==r&&(l.start.column+=s),l.end.row==r&&(l.end.column+=s),t.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.checkOutdent=function(e,t,n){return!1},this.autoOutdent=function(e,t,n){},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){var n,i,o;e[t]&&(i=(n=e[t]).prototype.$id,(o=a.$modes[i])||(a.$modes[i]=o=new n),a.$modes[t]||(a.$modes[t]=o),this.$embeds.push(t),this.$modes[t]=o)}for(var r=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],s=this,t=0;tthis.row||(e=function(e,t,n){var i="insert"==e.action,o=(i?1:-1)*(e.end.row-e.start.row),r=(i?1:-1)*(e.end.column-e.start.column),s=e.start,i=i?s:e.end;if(a(t,s,n))return{row:t.row,column:t.column};if(a(i,t,!n))return{row:t.row+o,column:t.column+(t.row==i.row?r:0)};return{row:s.row,column:s.column}}(e,{row:this.row,column:this.column},this.$insertRight),this.setPosition(e.row,e.column,!0))},r.prototype.setPosition=function(e,t,n){n=n?{row:e,column:t}:this.$clipPositionToDocument(e,t);this.row==n.row&&this.column==n.column||(e={row:this.row,column:this.column},this.row=n.row,this.column=n.column,this._signal("change",{old:e,value:n}))},r.prototype.detach=function(){this.document.off("change",this.$onChange)},r.prototype.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},r.prototype.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n},r);function r(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),"number"!=typeof t?this.setPosition(t.row,t.column):this.setPosition(t,n)}function a(e,t,n){n=n?e.column<=t.column:e.column=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},l.prototype.insertFullLines=function(e,t){var n=0,n=(e=Math.min(Math.max(e,0),this.getLength()))e+1&&(this.currentLine=e+1)):this.currentLine==e&&(this.currentLine=e+1),this.lines[e]=t.tokens},r.prototype.cleanup=function(){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.removeAllListeners()},r);function r(e,t){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=e;var a=this;this.$worker=function(){if(a.running){for(var e=new Date,t=a.currentLine,n=-1,i=a.doc,o=t;a.lines[t];)t++;var r=i.getLength(),s=0;for(a.running=!1;tthis.MAX_RANGES?l.slice(0,this.MAX_RANGES):l).map(function(e){return new g(a,e.offset,a,e.offset+e.length)}),this.cache[a]=l.length?l:"");for(var c=l.length;c--;){var h=l[c].toScreenRange(n),d=h.toString();s[d]||(s[d]=!0,t.drawSingleLineMarker(e,h,this.clazz,i))}}},i);function i(e,t,n){void 0===n&&(n="text"),this.setRegexp(e),this.clazz=t,this.type=n}e.prototype.MAX_RANGES=500,t.SearchHighlight=e}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(e,t,n){o.prototype.addSession=function(e){this.$session=e},o.prototype.add=function(e,t,n){this.$fromUndo||e!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==t&&this.lastDeltas||(this.lastDeltas=[],(t=this.$undoStack.length)>this.$undoDepth-1&&this.$undoStack.splice(0,t-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))},o.prototype.addSelection=function(e,t){this.selections.push({value:e,rev:t||this.$rev})},o.prototype.startNewGroup=function(){return this.lastDeltas=null,this.$rev},o.prototype.markIgnored=function(e,t){null==t&&(t=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var o=n[i][0];if(o.id<=e)break;o.id"+e.end.row+":"+e.end.column}function a(e,t){var n="insert"==e.action,i="insert"==t.action;if(n&&i)if(0<=f(t.start,e.end))y(t,e,-1);else{if(!(f(t.start,e.start)<=0))return;y(e,t,1)}else if(n&&!i)if(0<=f(t.start,e.end))y(t,e,-1);else{if(!(f(t.end,e.start)<=0))return;y(e,t,-1)}else if(!n&&i)if(0<=f(t.start,e.start))y(t,e,1);else{if(!(f(t.start,e.start)<=0))return;y(e,t,1)}else if(!n&&!i)if(0<=f(t.start,e.start))y(t,e,1);else{if(!(f(t.end,e.start)<=0))return;y(e,t,-1)}return 1}function y(e,t,n){v(e.start,t.start,t.end,n),v(e.end,t.start,t.end,n)}function v(e,t,n,i){e.row==(1==i?t:n).row&&(e.column+=i*(n.column-t.column)),e.row+=i*(n.row-t.row)}function I(e,t){var n=e.lines,i=e.end,o=(e.end=C(t),e.end.row-e.start.row),r=n.splice(o,n.length),o=o?t.column:t.column-e.start.column;return n.push(r[0].substring(0,o)),r[0]=r[0].substr(o),{start:C(t),end:i,lines:r,action:e.action}}t.UndoManager=i}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(e,t,n){var i=e("../range").Range;function o(e,t){this.foldData=e,Array.isArray(t)?this.folds=t:t=this.folds=[t];e=t[t.length-1];this.range=new i(t[0].start.row,t[0].start.column,e.end.row,e.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(e){e.setFoldLine(this)},this)}o.prototype.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},o.prototype.addFold=function(e){if(e.sameRow){if(e.start.rowthis.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)}),0=this.start.row&&e<=this.end.row},o.prototype.walk=function(e,t,n){var i,o,r=0,s=this.folds,a=!0;null==t&&(t=this.end.row,n=this.end.column);for(var l=0;lt||n[n.length-1].start.row=i);s++);if("insert"==e.action)for(var l=o-i,c=-t.column+n.column;si)break;h.start.row==i&&h.start.column>=t.column&&(h.start.column==t.column&&this.$bias<=0||(h.start.column+=c,h.start.row+=l)),h.end.row==i&&h.end.column>=t.column&&(h.end.column==t.column&&this.$bias<0||(h.end.column==t.column&&0h.start.column&&h.end.column==r[s+1].start.column&&(h.end.column-=c),h.end.column+=c,h.end.row+=l))}else for(var h,l=i-o,c=t.column-n.column;so)break;h.end.rowt.column)&&(h.end.column=t.column,h.end.row=t.row):(h.end.column+=c,h.end.row+=l):h.end.row>o&&(h.end.row+=l),h.start.rowt.column)&&(h.start.column=t.column,h.start.row=t.row):(h.start.column+=c,h.start.row+=l):h.start.row>o&&(h.start.row+=l)}if(0!=l&&s=e)return o;if(o.end.row>e)return null}return null},this.getNextFoldLine=function(e,t){var n=this.$foldData,i=0;for(-1==(i=t?n.indexOf(t):i)&&(i=0);i=e)return o}return null},this.getFoldedRowCount=function(e,t){for(var n=this.$foldData,i=t-e+1,o=0;ol)break}while(i&&r.test(i.type));i=s.stepBackward()}else i=s.getCurrentToken();return o.end.row=s.getCurrentTokenRow(),o.end.column=s.getCurrentTokenColumn(),o}},this.foldAll=function(e,t,n,i){null==n&&(n=1e5);var o=this.foldWidgets;if(o){t=t||this.getLength();for(var r,s=e=e||0;s=e&&(s=r.end.row,r.collapseChildren=n,this.addFold("...",r))}},this.foldToLevel=function(e){for(this.foldAll();0=e)break}i--}return{range:-1!==i&&r,firstRange:s}},this.onFoldWidgetClick=function(e,t){var n={children:(t=t instanceof i?t.domEvent:t).shiftKey,all:t.ctrlKey||t.metaKey,siblings:t.altKey};this.$toggleFoldWidget(e,n)||(e=t.target||t.srcElement)&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")},this.$toggleFoldWidget=function(e,t){var n,i,o,r;if(this.getFoldWidget)return n=this.getFoldWidget(e),i=this.getLine(e),(i=this.getFoldAt(e,-1==(n="end"===n?-1:1)?0:i.length,n))?(t.children||t.all?this.removeFold(i):this.expandFold(i),i):(n=this.getFoldWidgetRange(e,!0))&&!n.isMultiLine()&&(i=this.getFoldAt(n.start.row,n.start.column,1))&&n.isEqual(i.range)?(this.removeFold(i),i):(t.siblings?((i=this.getParentFoldRangeData(e)).range&&(o=i.range.start.row+1,r=i.range.end.row),this.foldAll(o,r,t.all?1e4:0)):t.children?(r=n?n.end.row:this.getLength(),this.foldAll(e+1,r,t.all?1e4:0)):n&&(t.all&&(n.collapseChildren=1e4),this.addFold("...",n)),n)},this.toggleFoldWidget=function(e){var t,n=this.selection.getCursor().row;n=this.getRowFoldStart(n),!this.$toggleFoldWidget(n,{})&&(t=(t=this.getParentFoldRangeData(n,!0)).range||t.firstRange)&&(n=t.start.row,(n=this.getFoldAt(n,this.getLine(n).length,1))?this.removeFold(n):this.addFold("...",t))},this.updateFoldWidgets=function(e){var t=e.start.row,n=e.end.row-t;0==n?this.foldWidgets[t]=null:"remove"==e.action?this.foldWidgets.splice(t,1+n,null):((e=Array(1+n)).unshift(t,1),this.foldWidgets.splice.apply(this.foldWidgets,e))},this.tokenizerUpdateFoldWidgets=function(e){e=e.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(e,t,n){var d=e("../token_iterator").TokenIterator,C=e("../range").Range;t.BracketMatch=function(){this.findMatchingBracket=function(e,t){return 0!=e.column&&""!=(t=t||this.getLine(e.row).charAt(e.column-1))&&(t=t.match(/([\(\[\{])|([\)\]\}])/))?t[1]?this.$findClosingBracket(t[1],e):this.$findOpeningBracket(t[2],e):null},this.getBracketRange=function(e){var t,n,i=this.getLine(e.row),o=!0,r=i.charAt(e.column-1),s=r&&r.match(/([\(\[\{])|([\)\]\}])/);if(s||(r=i.charAt(e.column),e={row:e.row,column:e.column+1},s=r&&r.match(/([\(\[\{])|([\)\]\}])/),o=!1),!s)return null;if(s[1]){if(!(n=this.$findClosingBracket(s[1],e)))return null;t=C.fromPoints(e,n),o||(t.end.column++,t.start.column--),t.cursor=t.end}else{if(!(n=this.$findOpeningBracket(s[2],e)))return null;t=C.fromPoints(n,e),o||(t.start.column++,t.end.column--),t.cursor=t.start}return t},this.getMatchingBracketRanges=function(e,t){var n=this.getLine(e.row),i=/([\(\[\{])|([\)\]\}])/,o=!t&&n.charAt(e.column-1),r=o&&o.match(i);return r||(o=(void 0===t||t)&&n.charAt(e.column),e={row:e.row,column:e.column+1},r=o&&o.match(i)),r?(t=new C(e.row,e.column-1,e.row,e.column),(n=r[1]?this.$findClosingBracket(r[1],e):this.$findOpeningBracket(r[2],e))?[t,new C(n.row,n.column,n.row,n.column+1)]:[t]):null},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(e,t,n){var i=this.$brackets[e],o=1,r=new d(this,t.row,t.column),s=r.getCurrentToken();if(s=s||r.stepForward()){n=n||new RegExp("(\\.?"+s.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)").replace(/-close\b/,"-(close|open)")+")+");for(var a=t.column-r.getCurrentTokenColumn()-2,l=s.value;;){for(;0<=a;){var c=l.charAt(a);if(c==i){if(0==--o)return{row:r.getCurrentTokenRow(),column:a+r.getCurrentTokenColumn()}}else c==e&&(o+=1);--a}for(;(s=r.stepBackward())&&!n.test(s.type););if(null==s)break;a=(l=s.value).length-1}return null}},this.$findClosingBracket=function(e,t,n){var i=this.$brackets[e],o=1,r=new d(this,t.row,t.column),s=r.getCurrentToken();if(s=s||r.stepForward()){n=n||new RegExp("(\\.?"+s.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)").replace(/-open\b/,"-(close|open)")+")+");for(var a=t.column-r.getCurrentTokenColumn();;){for(var l=s.value,c=l.length;a"===t.value?i=!0:-1!==t.type.indexOf("tag-name")&&(n=!0)),t&&!n;);return t},this.$findClosingTag=function(e,t){var n=t.value,i=t.value,o=0,r=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),s=(t=e.stepForward(),new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length)),a=!1;do{var l,c=t;if(-1===c.type.indexOf("tag-close")||a||(l=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),a=!0),t=e.stepForward())if(">"!==t.value||a||(l=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1),a=!0),-1!==t.type.indexOf("tag-name")){if(i===(n=t.value))if("<"===c.value)o++;else if(""!==t.value)return;var u=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else i===n&&"/>"===t.value&&--o<0&&(u=d=h=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+2),l=new C(s.end.row,s.end.column,s.end.row,s.end.column+1))}while(t&&0<=o);if(r&&l&&h&&u&&s&&d)return{openTag:new C(r.start.row,r.start.column,l.end.row,l.end.column),closeTag:new C(h.start.row,h.start.column,u.end.row,u.end.column),openTagName:s,closeTagName:d}},this.$findOpeningTag=function(e,t){var n,i=e.getCurrentToken(),o=t.value,r=0,s=e.getCurrentTokenRow(),a=e.getCurrentTokenColumn(),l=new C(s,a,s,a+2),c=(e.stepForward(),new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+t.value.length));if((t=-1===t.type.indexOf("tag-close")?e.stepForward():t)&&">"===t.value){var h=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);e.stepBackward(),e.stepBackward();do{if(t=i,s=e.getCurrentTokenRow(),n=(a=e.getCurrentTokenColumn())+t.value.length,i=e.stepBackward(),t)if(-1!==t.type.indexOf("tag-name")){if(o===t.value)if("<"===i.value){if(0<++r){for(var d=new C(s,a,s,n),u=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1);(t=e.stepForward())&&">"!==t.value;);var g=new C(e.getCurrentTokenRow(),e.getCurrentTokenColumn(),e.getCurrentTokenRow(),e.getCurrentTokenColumn()+1)}}else""===t.value){for(var p=0,m=i;m;){if(-1!==m.type.indexOf("tag-name")&&m.value===o){r--;break}if("<"===m.value)break;m=e.stepBackward(),p++}for(var f=0;f>1,r=e[o];if(rt&&(t=e.screenWidth)}),this.lineWidgetWidth=t)},f.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(),n=this.$rowLengthCache,i=0,o=0,r=this.$foldData[o],s=r?r.start.row:1/0,a=t.length,l=0;li&&(i=n[l])}this.screenWidth=i}},f.prototype.getLine=function(e){return this.doc.getLine(e)},f.prototype.getLines=function(e,t){return this.doc.getLines(e,t)},f.prototype.getLength=function(){return this.doc.getLength()},f.prototype.getTextRange=function(e){return this.doc.getTextRange(e||this.selection.getRange())},f.prototype.insert=function(e,t){return this.doc.insert(e,t)},f.prototype.remove=function(e){return this.doc.remove(e)},f.prototype.removeFullLines=function(e,t){return this.doc.removeFullLines(e,t)},f.prototype.undoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=e.length-1;-1!=n;n--){var i=e[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!t&&this.$undoSelect&&(e.selectionBefore?this.selection.fromJSON(e.selectionBefore):this.selection.setRange(this.$getUndoSelection(e,!0))),this.$fromUndo=!1}},f.prototype.redoChanges=function(e,t){if(e.length){this.$fromUndo=!0;for(var n=0;ne.end.column&&(t.start.column+=r),t.end.row==e.end.row)&&t.end.column>e.end.column&&(t.end.column+=r),o&&t.start.row>=e.end.row&&(t.start.row+=o,t.end.row+=o)),t.end=this.insert(t.start,s),a.length&&(i=e.start,n=t.start,o=n.row-i.row,r=n.column-i.column,this.addFolds(a.map(function(e){return(e=e.clone()).start.row==i.row&&(e.start.column+=r),e.end.row==i.row&&(e.end.column+=r),e.start.row+=o,e.end.row+=o,e}))),t},f.prototype.indentRows=function(e,t,n){n=n.replace(/\t/g,this.getTabString());for(var i=e;i<=t;i++)this.doc.insertInLine({row:i,column:0},n)},f.prototype.outdentRows=function(e){for(var t=e.collapseRows(),n=new h(0,0,0,0),i=this.getTabSize(),o=t.start.row;o<=t.end.row;++o){var r=this.getLine(o);n.start.row=o,n.end.row=o;for(var s=0;sthis.doc.getLength()-1)return 0;i=o-t}else{e=this.$clipRowToDocument(e);i=(t=this.$clipRowToDocument(t))-e+1}var o=new h(e,0,t,Number.MAX_VALUE),o=this.getFoldsInRange(o).map(function(e){return(e=e.clone()).start.row+=i,e.end.row+=i,e}),n=0==n?this.doc.getLines(e,t):this.doc.removeFullLines(e,t);return this.doc.insertFullLines(e+i,n),o.length&&this.addFolds(o),i},f.prototype.moveLinesUp=function(e,t){return this.$moveLines(e,t,-1)},f.prototype.moveLinesDown=function(e,t){return this.$moveLines(e,t,1)},f.prototype.duplicateLines=function(e,t){return this.$moveLines(e,t,0)},f.prototype.$clipRowToDocument=function(e){return Math.max(0,Math.min(e,this.doc.getLength()-1))},f.prototype.$clipColumnToRow=function(e,t){return t<0?0:Math.min(this.doc.getLine(e).length,t)},f.prototype.$clipPositionToDocument=function(e,t){var n;return t=Math.max(0,t),t=e<0?e=0:(n=this.doc.getLength())<=e?this.doc.getLine(e=n-1).length:Math.min(this.doc.getLine(e).length,t),{row:e,column:t}},f.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},f.prototype.setUseWrapMode=function(e){e!=this.$useWrapMode&&(this.$useWrapMode=e,this.$modified=!0,this.$resetRowCache(0),e&&(e=this.getLength(),this.$wrapData=Array(e),this.$updateWrapData(0,e-1)),this._signal("changeWrapMode"))},f.prototype.getUseWrapMode=function(){return this.$useWrapMode},f.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"))},f.prototype.adjustWrapLimit=function(e,t){var n=this.$wrapLimitRange,t=(n.max<0&&(n={min:t,max:t}),this.$constrainWrapLimit(e,n.min,n.max));return t!=this.$wrapLimit&&1=o.row&&g.shiftRow(-a);s=r}else{var d=Array(a),u=(d.unshift(r,0),t?this.$wrapData:this.$rowLengthCache),c=(u.splice.apply(u,d),this.$foldData),h=0;for((g=this.getFoldLine(r))&&(0==(u=g.range.compareInside(i.row,i.column))?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(s,0,o.column-i.column)):-1==u&&(g.addRemoveChars(r,0,o.column-i.column),g.shiftRow(a)),h=c.indexOf(g)+1);h=r&&g.shiftRow(a)}else{var g,a=Math.abs(e.start.column-e.end.column);"remove"===n&&(l=this.getFoldsInRange(e),this.removeFolds(l),a=-a),(g=this.getFoldLine(r))&&g.addRemoveChars(r,i.column,a)}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(r,s):this.$updateRowLengthCache(r,s),l},f.prototype.$updateRowLengthCache=function(e,t){this.$rowLengthCache[e]=null,this.$rowLengthCache[t]=null},f.prototype.$updateWrapData=function(e,t){var s,n,a=this.doc.getAllLines(),i=this.getTabSize(),o=this.$wrapData,r=this.$wrapLimit,l=e;for(t=Math.min(t,a.length-1);l<=t;)(n=this.getFoldLine(l,n))?(s=[],n.walk(function(e,t,n,i){var o;if(null!=e){(o=this.$getDisplayTokens(e,s.length))[0]=v;for(var r=1;r=A&&o[i]>=A)n(i);else if(o[i]==v||o[i]==I){for(;i!=a-1&&o[i]!=v;i--);if(a>2)),a-1);gh[u-1]):!u,this.getLength()-1),p=this.getNextFoldLine(s),m=p?p.start.row:1/0;l<=e&&!(ea[c-1]):!c,this.getNextFoldLine(s)),d=h?h.start.row:1/0;s=g[p];)i++,p++;u=u.substring(g[p-1]||0,u.length),l=0d||(o.push(s=new I(c,d,c+a-1,u)),2C&&o[h].end.row==y;)h--;for(o=o.slice(g,h+1),g=0,h=o.length;gh.getLength())){var o=h.getLine(i),e=o.search(u[0]);if(!(!a&&e=o.length)break;u.lastIndex=a+=v.skipEmptyMatch(o,a,d)}if(i.index+s>t)break;r.push(i.index,s)}for(var l=r.length-1;0<=l;l-=2){var c=r[l-1];if(n(e,c,e,c+(s=r[l])))return!0}}:function(e,t,n){var i=h.getLine(e);for(u.lastIndex=t;o=u.exec(i);){var o,r=o[0].length;if(n(e,o=o.index,e,o+r))return!0;if(!r&&(u.lastIndex=o+=v.skipEmptyMatch(i,o,d),o>=i.length))return!1}},{forEach:a?function(e){var t=i.row;if(!s(t,i.column,e)){for(t--;o<=t;t--)if(s(t,Number.MAX_VALUE,e))return;if(0!=n.wrap)for(t=r,o=i.row;o<=t;t--)if(s(t,Number.MAX_VALUE,e))return}}:function(e){var t=i.row;if(!s(t,i.column,e)){for(t+=1;t<=r;t++)if(s(t,0,e))return;if(0!=n.wrap)for(t=o,r=i.row;t<=r;t++)if(s(t,0,e))return}}})},t.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[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 n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=e("../lib/keys"),r=e("../lib/useragent"),s=a.KEY_MODS,l=(c.prototype.$init=function(e,t,n){this.platform=t||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(e),this.$singleCommand=n},c.prototype.addCommand=function(e){this.commands[e.name]&&this.removeCommand(e),(this.commands[e.name]=e).bindKey&&this._buildKeyHash(e)},c.prototype.removeCommand=function(e,t){var n,i=e&&("string"==typeof e?e:e.name),o=(e=this.commands[i],t||delete this.commands[i],this.commandKeyBinding);for(n in o){var r,s=o[n];s==e?delete o[n]:Array.isArray(s)&&-1!=(r=s.indexOf(e))&&(s.splice(r,1),1==s.length)&&(o[n]=s[0])}},c.prototype.bindKey=function(e,i,o){if("object"==typeof e&&e&&(null==o&&(o=e.position),e=e[this.platform]),e)return"function"==typeof i?this.addCommand({exec:i,bindKey:e,name:i.name||e}):void e.split("|").forEach(function(e){var t="",n=(-1!=e.indexOf(" ")&&(e=(n=e.split(/\s+/)).pop(),n.forEach(function(e){e=this.parseKeys(e),e=s[e.hashId]+e.key;t+=(t?" ":"")+e,this._addCommandToBinding(t,"chainKeys")},this),t+=" "),this.parseKeys(e)),e=s[n.hashId]+n.key;this._addCommandToBinding(t+e,i,o)},this)},c.prototype._addCommandToBinding=function(e,t,n){var i=this.commandKeyBinding;if(t)if(!i[e]||this.$singleCommand)i[e]=t;else{Array.isArray(i[e])?-1!=(r=i[e].indexOf(t))&&i[e].splice(r,1):i[e]=[i[e]],"number"!=typeof n&&(n=h(t));for(var o=i[e],r=0;rt?t+1:t,e.selection.moveCursorTo(n.row,t))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(e){var t=e.session.doc.getLength()-1,n=e.session.doc.getLine(t).length,i=e.selection.rangeList.ranges,o=[];i.length<1&&(i=[e.selection.getRange()]);for(var r=0;ro[t].column&&t++,i.unshift(t,0),o.splice.apply(o,i)),this.$updateRows())},i.prototype.$updateRows=function(){var n,e=this.session.lineWidgets;e&&(n=!0,e.forEach(function(e,t){if(e)for(n=!1,e.row=t;e.$oldWidget;)e.$oldWidget.row=t,e=e.$oldWidget}),n)&&(this.session.lineWidgets=null)},i.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).el&&t.el.parentNode&&(t.el.parentNode.removeChild(t.el),t._inDocument=!1),this.session.lineWidgets[e.row]=e},i.prototype.addLineWidget=function(e){var t,n,i;return this.$registerLineWidget(e),e.session=this.session,this.editor&&(t=this.editor.renderer,e.html&&!e.el&&(e.el=o.createElement("div"),e.el.innerHTML=e.html),e.text&&!e.el&&(e.el=o.createElement("div"),e.el.textContent=e.text),e.el&&(o.addCssClass(e.el,"ace_lineWidgetContainer"),e.className&&o.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),n=this.session.getFoldAt(e.row,0),(e.$fold=n)&&(i=this.session.lineWidgets,e.row!=n.end.row||i[n.start.row]?e.hidden=!0:i[n.start.row]=e),this.session._emit("changeFold",{data:{start:{row:e.row}}}),this.$updateRows(),this.renderWidgets(null,t),this.onWidgetChanged(e)),e},i.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()},i.prototype.getWidgetsAtRow=function(e){for(var t=this.session.lineWidgets,n=t&&t[e],i=[];n;)i.push(n),n=n.$oldWidget;return i},i.prototype.onWidgetChanged=function(e){this.session._changedWidgets.push(e),this.editor&&this.editor.renderer.updateFull()},i.prototype.measureWidgets=function(e,t){var n=this.session._changedWidgets,i=t.layerConfig;if(n&&n.length){for(var o=1/0,r=0;r=e.length?void 0:e)&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=e("./lib/oop"),i=e("./lib/dom"),m=e("./lib/lang"),r=e("./lib/useragent"),s=e("./keyboard/textinput").TextInput,a=e("./mouse/mouse_handler").MouseHandler,l=e("./mouse/fold_handler").FoldHandler,c=e("./keyboard/keybinding").KeyBinding,h=e("./edit_session").EditSession,u=e("./search").Search,f=e("./range").Range,g=e("./lib/event_emitter").EventEmitter,p=e("./commands/command_manager").CommandManager,C=e("./commands/default_commands").commands,y=e("./config"),v=e("./token_iterator").TokenIterator,I=e("./line_widgets").LineWidgets,b=e("./keyboard/gutter_handler").GutterKeyboardHandler,A=e("./config").nls,w=e("./clipboard"),S=e("./lib/keys"),e=(x.prototype.$initOperationListeners=function(){this.commands.on("exec",this.startOperation.bind(this),!0),this.commands.on("afterExec",this.endOperation.bind(this),!0),this.$opResetTimer=m.delayedCall(this.endOperation.bind(this,!0)),this.on("change",function(){this.curOp||( this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.docChanged=!0}.bind(this),!0),this.on("changeSelection",function(){this.curOp||(this.startOperation(),this.curOp.selectionBefore=this.$lastSel),this.curOp.selectionChanged=!0}.bind(this),!0)},x.prototype.startOperation=function(e){if(this.curOp){if(!e||this.curOp.command)return;this.prevOp=this.curOp}e||(this.previousCommand=null,e={}),this.$opResetTimer.schedule(),this.curOp=this.session.curOp={command:e.command||{},args:e.args,scrollTop:this.renderer.scrollTop},this.curOp.selectionBefore=this.selection.toJSON()},x.prototype.endOperation=function(e){if(this.curOp&&this.session){if(e&&!1===e.returnValue||!this.session)return this.curOp=null;if((1!=e||!this.curOp.command||"mouse"!=this.curOp.command.name)&&(this._signal("beforeEndOperation"),this.curOp)){var e=this.curOp.command,t=e&&e.scrollIntoView;if(t){switch(t){case"center-animate":t="animate";case"center":this.renderer.scrollCursorIntoView(null,.5);break;case"animate":case"cursor":this.renderer.scrollCursorIntoView();break;case"selectionPart":var n=this.selection.getRange(),i=this.renderer.layerConfig;(n.start.row>=i.lastRow||n.end.row<=i.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==t&&this.renderer.animateScrolling(this.curOp.scrollTop)}e=this.selection.toJSON();this.curOp.selectionAfter=e,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(e),this.prevOp=this.curOp,this.curOp=null}}},x.prototype.$historyTracker=function(e){var t,n,i,o;this.$mergeUndoDeltas&&(t=this.prevOp,n=this.$mergeableCommands,i=t.command&&e.command.name==t.command.name,"insertstring"==e.command.name?(o=e.args,void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(o)||/\s/.test(t.args)),this.mergeNextCommand=!0):i=i&&-1!==n.indexOf(e.command.name),(i="always"!=this.$mergeUndoDeltas&&2e3a.search(/\S|$/)&&(t=a.substr(r.column).search(/\S|$/),i.doc.removeInLine(r.row,r.column,r.column+t))),this.clearSelection(),r.column),t=i.getState(r.row),a=i.getLine(r.row),l=o.checkOutdent(t,a,e);i.insert(r,e),n&&n.selection&&(2==n.selection.length?this.selection.setSelectionRange(new f(r.row,s+n.selection[0],r.row,s+n.selection[1])):this.selection.setSelectionRange(new f(r.row+n.selection[0],n.selection[1],r.row+n.selection[2],n.selection[3]))),this.$enableAutoIndent&&(i.getDocument().isNewLine(e)&&(s=o.getNextLineIndent(t,a.slice(0,r.column),i.getTabString()),i.insert({row:r.row+1,column:0},s)),l)&&o.autoOutdent(t,i,r.row)},x.prototype.autoIndent=function(){for(var e=this.session,t=e.getMode(),n=this.selection.isEmpty()?[new f(0,0,e.doc.getLength()-1,0)]:this.selection.getAllRanges(),i="",o="",r=e.getTabString(),s=0;st.toLowerCase()?1:0});for(var o=new f(0,0,0,0),i=e.first;i<=e.last;i++){var r=t.getLine(i);o.start.row=i,o.end.row=i,o.end.column=r.length,t.replace(o,n[i-e.first])}},x.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)},x.prototype.toggleBlockComment=function(){var e=this.getCursorPosition(),t=this.session.getState(e.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(t,this.session,n,e)},x.prototype.getNumberAt=function(e,t){for(var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g,i=(n.lastIndex=0,this.session.getLine(e));n.lastIndex=t)return{value:o[0],start:o.index,end:o.index+o[0].length}}return null},x.prototype.modifyNumber=function(e){var t,n,i,o=this.selection.getCursor().row,r=this.selection.getCursor().column,s=new f(o,r-1,o,r),s=this.session.getTextRange(s);!isNaN(parseFloat(s))&&isFinite(s)?(s=this.getNumberAt(o,r))&&(i=0<=s.value.indexOf(".")?s.start+s.value.indexOf(".")+1:s.end,t=s.start+s.value.length-i,n=parseFloat(s.value),n*=Math.pow(10,t),i!==s.end&&rg+1)break;g=p.last}for(h--,a=this.session.$moveLines(u,g,t?0:e),t&&-1==e&&(d=h+1);d<=h;)s[d].moveBy(a,0),d++;l+=a=t?a:0}n.fromOrientedRange(n.ranges[0]),n.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},x.prototype.$getSelectedRows=function(e){return e=(e||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(e.start.row),last:this.session.getRowFoldEnd(e.end.row)}},x.prototype.onCompositionStart=function(e){this.renderer.showComposition(e)},x.prototype.onCompositionUpdate=function(e){this.renderer.setCompositionText(e)},x.prototype.onCompositionEnd=function(){this.renderer.hideComposition()},x.prototype.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},x.prototype.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},x.prototype.isRowVisible=function(e){return e>=this.getFirstVisibleRow()&&e<=this.getLastVisibleRow()},x.prototype.isRowFullyVisible=function(e){return e>=this.renderer.getFirstFullyVisibleRow()&&e<=this.renderer.getLastFullyVisibleRow()},x.prototype.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},x.prototype.$moveByPage=function(e,t){var n=this.renderer,i=this.renderer.layerConfig,o=e*Math.floor(i.height/i.lineHeight),e=(!0===t?this.selection.$moveSelection(function(){this.moveCursorBy(o,0)}):!1===t&&(this.selection.moveCursorBy(o,0),this.selection.clearSelection()),n.scrollTop);n.scrollBy(0,o*i.lineHeight),null!=t&&n.scrollCursorIntoView(null,.5),n.animateScrolling(e)},x.prototype.selectPageDown=function(){this.$moveByPage(1,!0)},x.prototype.selectPageUp=function(){this.$moveByPage(-1,!0)},x.prototype.gotoPageDown=function(){this.$moveByPage(1,!1)},x.prototype.gotoPageUp=function(){this.$moveByPage(-1,!1)},x.prototype.scrollPageDown=function(){this.$moveByPage(1)},x.prototype.scrollPageUp=function(){this.$moveByPage(-1)},x.prototype.scrollToRow=function(e){this.renderer.scrollToRow(e)},x.prototype.scrollToLine=function(e,t,n,i){this.renderer.scrollToLine(e,t,n,i)},x.prototype.centerSelection=function(){var e=this.getSelectionRange(),e={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(e,.5)},x.prototype.getCursorPosition=function(){return this.selection.getCursor()},x.prototype.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},x.prototype.getSelectionRange=function(){return this.selection.getRange()},x.prototype.selectAll=function(){this.selection.selectAll()},x.prototype.clearSelection=function(){this.selection.clearSelection()},x.prototype.moveCursorTo=function(e,t){this.selection.moveCursorTo(e,t)},x.prototype.moveCursorToPosition=function(e){this.selection.moveCursorToPosition(e)},x.prototype.jumpToMatching=function(e,t){var n=this.getCursorPosition(),i=new v(this.session,n.row,n.column),o=i.getCurrentToken(),r=0,s=(o=o&&-1!==o.type.indexOf("tag-name")?i.stepBackward():o)||i.stepForward();if(s){var a,l,c=!1,h={},d=n.column-s.start,u={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;dwindow.innerHeight)&&null)&&(s.style.top=n+"px",s.style.left=e.left+"px",s.style.height=t.lineHeight+"px",s.scrollIntoView(r)),r=i=null)}),this.setAutoScrollEditorIntoView=function(e){e||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",t),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",n))})},x.prototype.$resetCursorStyle=function(){var e=this.$cursorStyle||"ace",t=this.renderer.$cursorLayer;t&&(t.setSmoothBlinking(/smooth/.test(e)),t.isBlinking=!this.$readOnly&&"wide"!=e,i.setCssClass(t.element,"ace_slim-cursors",/slim/.test(e)))},x.prototype.prompt=function(t,n,i){var o=this;y.loadModule("ace/ext/prompt",function(e){e.prompt(o,t,n,i)})},x);function x(e,t,n){this.session,this.$toDestroy=[];var i=e.getContainerElement();this.container=i,this.renderer=e,this.id="editor"+ ++x.$uid,this.commands=new p(r.isMac?"mac":"win",C),"object"==typeof document&&(this.textInput=new s(e.getTextAreaContainer(),this),this.renderer.textarea=this.textInput.getElement(),this.$mouseHandler=new a(this),new l(this)),this.keyBinding=new c(this),this.$search=(new u).set({wrap:!0}),this.$historyTracker=this.$historyTracker.bind(this),this.commands.on("exec",this.$historyTracker),this.$initOperationListeners(),this._$emitInputEvent=m.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(t||n&&n.session||new h("")),y.resetOptions(this),n&&this.setOptions(n),y._signal("editor",this)}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"],["&&","||"],["==","!="]],o.implement(e.prototype,g),y.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){this.textInput.setReadOnly(e),this.$resetCursorStyle()},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?k.attach(this):k.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(e){this.$showLineNumbers&&e?k.attach(this):k.detach(this)}},placeholder:{set:function(e){this.$updatePlaceholder||(this.$updatePlaceholder=function(){var e=this.session&&(this.renderer.$composition||1a+1;)this.$lines.pop();break}(s=this.$lines.get(++a))?s.row=l:(s=this.$lines.createCell(l,e,this.session,c),this.$lines.push(s)),this.$renderCell(s,e,o,l),l++}this._signal("afterRender"),this.$updateGutterWidth(e)},a.prototype.$updateGutterWidth=function(e){var t=this.session,n=t.gutterRenderer||this.$renderer,i=t.$firstLineNumber,o=this.$lines.last()?this.$lines.last().text:"",i=((this.$fixedWidth||t.$useWrapMode)&&(o=t.getLength()+i-1),n?n.getWidth(t,o,e):o.toString().length*e.characterWidth),n=this.$padding||this.$computePadding();(i+=n.left+n.right)===this.gutterWidth||isNaN(i)||(this.gutterWidth=i,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",i))},a.prototype.$updateCursorRow=function(){var e;this.$highlightGutterLine&&(e=this.session.selection.getCursor(),this.$cursorRow!==e.row)&&(this.$cursorRow=e.row)},a.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 n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var o=this.session.getFoldLine(this.$cursorRow);if(!(0n.right-t.right?"foldWidgets":void 0},a);function a(e){this.element=x.createElement("div"),this.element.className="ace_layer ace_gutter-layer",e.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$lines=new r(this.element),this.$lines.$offsetCoefficient=1}function c(e){var t=document.createTextNode(""),t=(e.appendChild(t),x.createElement("span")),t=(e.appendChild(t),x.createElement("span")),n=(e.appendChild(t),x.createElement("span"));return t.appendChild(n),e}e.prototype.$fixedWidth=!1,e.prototype.$highlightGutterLine=!0,e.prototype.$renderer="",e.prototype.$showLineNumbers=!0,e.prototype.$showFoldWidgets=!0,i.implement(e.prototype,o),t.Gutter=e}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(e,t,n){var g=e("../range").Range,i=e("../lib/dom"),e=(o.prototype.setPadding=function(e){this.$padding=e},o.prototype.setSession=function(e){this.session=e},o.prototype.setMarkers=function(e){this.markers=e},o.prototype.elt=function(e,t){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=t,n.className=e},o.prototype.update=function(e){if(e){var t,n;for(n in this.config=e,this.i=0,this.markers){var i,o,r,s=this.markers[n];s.range?(r=s.range.clipRows(e.firstRow,e.lastRow)).isEmpty()||(r=r.toScreenRange(this.session),s.renderer?(i=this.$getTop(r.start.row,e),o=this.$padding+r.start.column*e.characterWidth,s.renderer(t,r,o,i,e)):"fullLine"==s.type?this.drawFullLineMarker(t,r,s.clazz,e):"screenLine"==s.type?this.drawScreenLineMarker(t,r,s.clazz,e):r.isMultiLine()?"text"==s.type?this.drawTextMarker(t,r,s.clazz,e):this.drawMultiLineMarker(t,r,s.clazz,e):this.drawSingleLineMarker(t,r,s.clazz+" ace_start ace_br15",e)):s.update(t,this,this.session,e)}if(-1!=this.i)for(;this.ie.lastRow)for(o=this.session.getFoldedRowCount(e.lastRow+1,t.lastRow);0t.lastRow&&this.$lines.push(this.$renderLinesFragment(e,t.lastRow+1,e.lastRow)),this.$highlightIndentGuide()},s.prototype.$renderLinesFragment=function(e,t,n){for(var i=[],o=t,r=this.session.getNextFoldLine(o),s=r?r.start.row:1/0;so[r].start.row?this.$highlightIndentGuideMarker.dir=-1:this.$highlightIndentGuideMarker.dir=1;break}if(!this.$highlightIndentGuideMarker.end&&""!==e[t.row]&&t.column===e[t.row].length){this.$highlightIndentGuideMarker.dir=1;for(r=t.row+1;r=this.$highlightIndentGuideMarker.start+1){if(i.row>=this.$highlightIndentGuideMarker.end)break;this.$setIndentGuideActive(i,t)}}else for(n=e.length-1;0<=n;n--){i=e[n];if(this.$highlightIndentGuideMarker.end&&i.row=r;)s=this.$renderToken(a,s,c,h.substring(0,r-i)),h=h.substring(r-i),i=r,a=this.$createLineElement(),e.appendChild(a),a.appendChild(this.dom.createTextNode(C.stringRepeat(" ",n.indent),this.element)),s=0,r=n[++o]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,s=this.$renderToken(a,s,c,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(a,s,null,"",!0)},s.prototype.$renderSimpleLine=function(e,t){for(var n=0,i=0;ithis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(e,n,o,r);n=this.$renderToken(e,n,o,r)}}},s.prototype.$renderOverflowMessage=function(e,t,n,i,o){n&&this.$renderToken(e,t,n,i.slice(0,this.MAX_LINE_LENGTH-t));n=this.dom.createElement("span");n.className="ace_inline_button ace_keyword ace_toggle_wrap",n.textContent=o?"":"",e.appendChild(n)},s.prototype.$renderLine=function(e,t,n){var i,o,r=e;(i=(n=n||0==n?n:this.session.getFoldLine(t))?this.$getFoldLineTokens(t,n):this.session.getTokens(t)).length?(o=this.session.getRowSplitData(t))&&o.length?(this.$renderWrappedLine(e,i,o),r=e.lastChild):(r=e,this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.$renderSimpleLine(r,i)):this.$useLineGroups()&&(r=this.$createLineElement(),e.appendChild(r)),this.showEOL&&r&&(n&&(t=n.end.row),(o=this.dom.createElement("span")).className="ace_invisible ace_invisible_eol",o.textContent=t==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(o))},s.prototype.$getFoldLineTokens=function(e,t){var d=this.session,u=[];var g=d.getTokens(e);return t.walk(function(e,t,n,i,o){if(null!=e)u.push({type:"fold",value:e});else if((g=o?d.getTokens(t):g).length){for(var r,s=g,a=i,l=n,c=0,h=0;h+s[c].value.lengthl-a&&(r=r.substring(0,l-a)),u.push({type:s[c].type,value:r}),h=a+r.length,c+=1);hl?u.push({type:s[c].type,value:r.substring(0,l-h)}):u.push(s[c]),h+=r.length,c+=1}},t.end.row,this.session.getLine(t.end.row).length),u},s.prototype.$useLineGroups=function(){return this.session.getUseWrapMode()},s);function s(e){this.dom=c,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",e.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)}e.prototype.EOF_CHAR="¶",e.prototype.EOL_CHAR_LF="¬",e.prototype.EOL_CHAR_CRLF="¤",e.prototype.EOL_CHAR=e.prototype.EOL_CHAR_LF,e.prototype.TAB_CHAR="—",e.prototype.SPACE_CHAR="·",e.prototype.$padding=0,e.prototype.MAX_LINE_LENGTH=1e4,e.prototype.showInvisibles=!1,e.prototype.showSpaces=!1,e.prototype.showTabs=!1,e.prototype.showEOL=!1,e.prototype.displayIndentGuides=!0,e.prototype.$highlightIndentGuides=!0,e.prototype.$tabStrings=[],e.prototype.destroy={},e.prototype.onChangeTabSize=e.prototype.$computeTabString,i.implement(e.prototype,r),t.Text=e}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(e,t,n){var c=e("../lib/dom"),e=(i.prototype.$updateOpacity=function(e){for(var t=this.cursors,n=t.length;n--;)c.setStyle(t[n].style,"opacity",e?"":"0")},i.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&&c.addCssClass(this.element,"ace_animate-blinking")}.bind(this))},i.prototype.$stopCssAnimation=function(){this.$isAnimating=!1,c.removeCssClass(this.element,"ace_animate-blinking")},i.prototype.setPadding=function(e){this.$padding=e},i.prototype.setSession=function(e){this.session=e},i.prototype.setBlinking=function(e){e!=this.isBlinking&&(this.isBlinking=e,this.restartTimer())},i.prototype.setBlinkInterval=function(e){e!=this.blinkInterval&&(this.blinkInterval=e,this.restartTimer())},i.prototype.setSmoothBlinking=function(e){e!=this.smoothBlinking&&(this.smoothBlinking=e,c.setCssClass(this.element,"ace_smooth-blinking",e),this.$updateCursors(!0),this.restartTimer())},i.prototype.addCursor=function(){var e=c.createElement("div");return e.className="ace_cursor",this.element.appendChild(e),this.cursors.push(e),e},i.prototype.removeCursor=function(){var e;if(1e.height+e.offset||a.top<0)&&1i;)this.removeCursor();var l=this.session.getOverwrite();this.$setOverwrite(l),this.$pixelPos=a,this.restartTimer()},i.prototype.$setOverwrite=function(e){e!=this.overwrite&&((this.overwrite=e)?c.addCssClass(this.element,"ace_overwrite-cursors"):c.removeCssClass(this.element,"ace_overwrite-cursors"))},i.prototype.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)},i);function i(e){this.element=c.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(),c.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)}e.prototype.$padding=0,e.prototype.drawCursor=null,t.Cursor=e}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[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 n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),e=e("./lib/event_emitter").EventEmitter,l=(c.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},c);function c(e,t){this.element=s.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+t,this.inner=s.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,a.addListener(this.element,"scroll",this.onScroll.bind(this)),a.addListener(this.element,"mousedown",a.preventDefault)}r.implement(l.prototype,e);o(d,h=l),d.prototype.onScroll=function(){var e;this.skipEvent||(this.scrollTop=this.element.scrollTop,1!=this.coeff&&(e=this.element.clientHeight/this.scrollHeight,this.scrollTop=this.scrollTop*(1-e)/(this.coeff-e)),this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(e){this.element.style.height=e+"px"},d.prototype.setScrollHeight=function(e){32768<(this.scrollHeight=e)?(this.coeff=32768/e,e=32768):1!=this.coeff&&(this.coeff=1),this.inner.style.height=e+"px"},d.prototype.setScrollTop=function(e){this.scrollTop!=e&&(this.skipEvent=!0,this.scrollTop=e,this.element.scrollTop=e*this.coeff)};var h,r=d;function d(e,t){var n=h.call(this,e,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,t.$scrollbarWidth=n.width=s.scrollbarWidth(e.ownerDocument),n.inner.style.width=n.element.style.width=(n.width||15)+5+"px",n.$minWidth=0,n}r.prototype.setInnerHeight=r.prototype.setScrollHeight;o(g,u=l),g.prototype.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.setWidth=function(e){this.element.style.width=e+"px"},g.prototype.setInnerWidth=function(e){this.inner.style.width=e+"px"},g.prototype.setScrollWidth=function(e){this.inner.style.width=e+"px"},g.prototype.setScrollLeft=function(e){this.scrollLeft!=e&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=e)};var u,e=g;function g(e,t){e=u.call(this,e,"-h")||this;return e.scrollLeft=0,e.height=t.$scrollbarWidth,e.inner.style.height=e.element.style.height=(e.height||15)+5+"px",e}t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=e,t.VScrollBar=r,t.HScrollBar=e}),ace.define("ace/scrollbar_custom",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(e,t,n){var i,o=this&&this.__extends||(i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[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 n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),r=e("./lib/oop"),s=e("./lib/dom"),a=e("./lib/event"),e=e("./lib/event_emitter").EventEmitter,l=(s.importCssString(".ace_editor>.ace_sb-v div, .ace_editor>.ace_sb-h div{\n position: absolute;\n background: rgba(128, 128, 128, 0.6);\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border: 1px solid #bbb;\n border-radius: 2px;\n z-index: 8;\n}\n.ace_editor>.ace_sb-v, .ace_editor>.ace_sb-h {\n position: absolute;\n z-index: 6;\n background: none;\n overflow: hidden!important;\n}\n.ace_editor>.ace_sb-v {\n z-index: 6;\n right: 0;\n top: 0;\n width: 12px;\n}\n.ace_editor>.ace_sb-v div {\n z-index: 8;\n right: 0;\n width: 100%;\n}\n.ace_editor>.ace_sb-h {\n bottom: 0;\n left: 0;\n height: 12px;\n}\n.ace_editor>.ace_sb-h div {\n bottom: 0;\n height: 100%;\n}\n.ace_editor>.ace_sb_grabbed {\n z-index: 8;\n background: #000;\n}","ace_scrollbar.css",!1),c.prototype.setVisible=function(e){this.element.style.display=e?"":"none",this.isVisible=e,this.coeff=1},c);function c(e,t){this.element=s.createElement("div"),this.element.className="ace_sb"+t,this.inner=s.createElement("div"),this.inner.className="",this.element.appendChild(this.inner),this.VScrollWidth=12,this.HScrollHeight=12,e.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,a.addMultiMouseDownListener(this.element,[500,300,300],this,"onMouseDown")}r.implement(l.prototype,e);o(d,h=l),d.prototype.onMouseDown=function(e,t){var n,i,o,r,s;if("mousedown"===e&&(0===a.getButton(t)&&2!==t.detail))return t.target===this.inner?(n=this,i=t.clientY,o=t.clientY,r=this.thumbTop,a.capture(this.inner,function(e){i=e.clientY},function(){clearInterval(s)}),s=setInterval(function(){var e;void 0!==i&&(e=n.scrollTopFromThumbTop(r+i-o))!==n.scrollTop&&n._emit("scroll",{data:e})},20)):(e=t.clientY-this.element.getBoundingClientRect().top-this.thumbHeight/2,this._emit("scroll",{data:this.scrollTopFromThumbTop(e)})),a.preventDefault(t)},d.prototype.getHeight=function(){return this.height},d.prototype.scrollTopFromThumbTop=function(e){e=e*(this.pageHeight-this.viewHeight)/(this.slideHeight-this.thumbHeight);return(e>>=0)<0?e=0:e>this.pageHeight-this.viewHeight&&(e=this.pageHeight-this.viewHeight),e},d.prototype.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},d.prototype.setHeight=function(e){this.height=Math.max(0,e),this.slideHeight=this.height,this.viewHeight=this.height,this.setScrollHeight(this.pageHeight,!0)},d.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}))},d.prototype.setScrollTop=function(e){this.scrollTop=e,this.thumbTop=(e=e<0?0:e)*(this.slideHeight-this.thumbHeight)/(this.pageHeight-this.viewHeight),this.inner.style.top=this.thumbTop+"px"};var h,r=d;function d(e,t){var n=h.call(this,e,"-v")||this;return n.scrollTop=0,n.scrollHeight=0,n.parent=e,n.width=n.VScrollWidth,n.renderer=t,n.inner.style.width=n.element.style.width=(n.width||15)+"px",n.$minWidth=0,n}r.prototype.setInnerHeight=r.prototype.setScrollHeight;o(g,u=l),g.prototype.onMouseDown=function(e,t){var n,i,o,r,s;if("mousedown"===e&&(0===a.getButton(t)&&2!==t.detail))return t.target===this.inner?(n=this,i=t.clientX,o=t.clientX,r=this.thumbLeft,a.capture(this.inner,function(e){i=e.clientX},function(){clearInterval(s)}),s=setInterval(function(){var e;void 0!==i&&(e=n.scrollLeftFromThumbLeft(r+i-o))!==n.scrollLeft&&n._emit("scroll",{data:e})},20)):(e=t.clientX-this.element.getBoundingClientRect().left-this.thumbWidth/2,this._emit("scroll",{data:this.scrollLeftFromThumbLeft(e)})),a.preventDefault(t)},g.prototype.getHeight=function(){return this.isVisible?this.height:0},g.prototype.scrollLeftFromThumbLeft=function(e){e=e*(this.pageWidth-this.viewWidth)/(this.slideWidth-this.thumbWidth);return(e>>=0)<0?e=0:e>this.pageWidth-this.viewWidth&&(e=this.pageWidth-this.viewWidth),e},g.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)},g.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}))},g.prototype.setScrollLeft=function(e){this.scrollLeft=e,this.thumbLeft=(e=e<0?0:e)*(this.slideWidth-this.thumbWidth)/(this.pageWidth-this.viewWidth),this.inner.style.left=this.thumbLeft+"px"};var u,e=g;function g(e,t){e=u.call(this,e,"-h")||this;return e.scrollLeft=0,e.scrollWidth=0,e.height=e.HScrollHeight,e.inner.style.height=e.element.style.height=(e.height||12)+"px",e.renderer=t,e}e.prototype.setInnerWidth=e.prototype.setScrollWidth,t.ScrollBar=r,t.ScrollBarV=r,t.ScrollBarH=e,t.VScrollBar=r,t.HScrollBar=e}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(e,t,n){var i=e("./lib/event");function o(e,t){this.onRender=e,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=t||window;var n=this;this._flush=function(e){n.pending=!1;var t=n.changes;t&&(i.blockIdle(100),n.changes=0,n.onRender(t)),n.changes?n.$recursionLimit--<0||n.schedule():n.$recursionLimit=2}}o.prototype.schedule=function(e){this.changes=this.changes|e,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},o.prototype.clear=function(e){var t=this.changes;return this.changes=0,t},t.RenderLoop=o}),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,n){var i=e("../lib/oop"),o=e("../lib/dom"),r=e("../lib/lang"),s=e("../lib/event"),a=e("../lib/useragent"),e=e("../lib/event_emitter").EventEmitter,l="function"==typeof ResizeObserver,c=(h.prototype.$setMeasureNodeStyles=function(e,t){e.width=e.height="auto",e.left=e.top="0px",e.visibility="hidden",e.position="absolute",e.whiteSpace="pre",a.isIE<8?e["font-family"]="inherit":e.font="inherit",e.overflow=t?"hidden":"visible"},h.prototype.checkForSizeChanges=function(e){var t;!(e=void 0===e?this.$measureSizes():e)||this.$characterSize.width===e.width&&this.$characterSize.height===e.height||(this.$measureNode.style.fontWeight="bold",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}))},h.prototype.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},h.prototype.$pollSizeChanges=function(){var t;return this.$pollSizeChangesTimer||this.$observer?this.$pollSizeChangesTimer:(t=this).$pollSizeChangesTimer=s.onIdle(function e(){t.checkForSizeChanges(),s.onIdle(e,500)},500)},h.prototype.setPolling=function(e){e?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},h.prototype.$measureSizes=function(e){e={height:(e||this.$measureNode).clientHeight,width:(e||this.$measureNode).clientWidth/512};return 0===e.width||0===e.height?null:e},h.prototype.$measureCharWidth=function(e){return this.$main.textContent=r.stringRepeat(e,512),this.$main.getBoundingClientRect().width/512},h.prototype.getCharacterWidth=function(e){var t=this.charSizes[e];return t=void 0===t?this.charSizes[e]=this.$measureCharWidth(e)/this.$characterSize.width:t},h.prototype.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},h.prototype.$getZoom=function(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*this.$getZoom(e.parentElement):1},h.prototype.$initTransformMeasureNodes=function(){function e(e,t){return["div",{style:"position: absolute;top:"+e+"px;left:"+t+"px;"}]}this.els=o.buildDom([e(0,0),e(200,0),e(0,200),e(200,200)],this.el)},h.prototype.transformCoordinates=function(e,t){function n(e,t,n){var i=e[1]*t[0]-e[0]*t[1];return[(-t[1]*n[0]+t[0]*n[1])/i,(+e[1]*n[0]-e[0]*n[1])/i]}function i(e,t){return[e[0]-t[0],e[1]-t[1]]}function o(e,t){return[e[0]+t[0],e[1]+t[1]]}function r(e,t){return[e*t[0],e*t[1]]}function s(e){e=e.getBoundingClientRect();return[e.left,e.top]}e=e&&r(1/this.$getZoom(this.el),e),this.els||this.$initTransformMeasureNodes();var a,l=s(this.els[0]),c=s(this.els[1]),h=s(this.els[2]),d=s(this.els[3]),d=n(i(d,c),i(d,h),i(o(c,h),o(d,l))),c=r(1+d[0],i(c,l)),h=r(1+d[1],i(h,l));return t?(a=d[0]*t[0]/200+d[1]*t[1]/200+1,t=o(r(t[0],c),r(t[1],h)),o(r(1/a/200,t),l)):(a=i(e,l),t=n(i(c,r(d[0],a)),i(h,r(d[1],a)),a),r(200,t))},h);function h(e){this.el=o.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=o.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=o.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),e.appendChild(this.el),this.$measureNode.textContent=r.stringRepeat("X",512),this.$characterSize={width:0,height:0},l?this.$addObserver():this.checkForSizeChanges()}c.prototype.$characterSize={width:0,height:0},i.implement(c.prototype,e),t.FontMetrics=c}),ace.define("ace/css/editor-css",["require","exports","module"],function(e,t,n){n.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}\n\n.ace_scroller {\n position: absolute;\n overflow: hidden;\n top: 0;\n bottom: 0;\n background-color: inherit;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n cursor: text;\n}\n\n.ace_content {\n position: absolute;\n box-sizing: border-box;\n min-width: 100%;\n contain: style size layout;\n font-variant-ligatures: no-common-ligatures;\n}\n\n.ace_keyboard-focus:focus {\n box-shadow: inset 0 0 0 2px #5E9ED6;\n outline: none;\n}\n\n.ace_dragging .ace_scroller:before{\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n content: \'\';\n background: rgba(250, 250, 250, 0.01);\n z-index: 1000;\n}\n.ace_dragging.ace_dark .ace_scroller:before{\n background: rgba(0, 0, 0, 0.01);\n}\n\n.ace_gutter {\n position: absolute;\n overflow : hidden;\n width: auto;\n top: 0;\n bottom: 0;\n left: 0;\n cursor: default;\n z-index: 4;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n contain: style size layout;\n}\n\n.ace_gutter-active-line {\n position: absolute;\n left: 0;\n right: 0;\n}\n\n.ace_scroller.ace_scroll-left:after {\n content: "";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\n pointer-events: none;\n}\n\n.ace_gutter-cell, .ace_gutter-cell_svg-icons {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-left: 19px;\n padding-right: 6px;\n background-repeat: no-repeat;\n}\n\n.ace_gutter-cell_svg-icons .ace_gutter_annotation {\n margin-left: -14px;\n float: left;\n}\n\n.ace_gutter-cell .ace_gutter_annotation {\n margin-left: -19px;\n float: left;\n}\n\n.ace_gutter-cell.ace_error, .ace_icon.ace_error, .ace_icon.ace_error_fold {\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 {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");\n background-repeat: no-repeat;\n background-position: 2px center;\n}\n.ace_dark .ace_gutter-cell.ace_info, .ace_dark .ace_icon.ace_info {\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_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\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_warning_fold {\n -webkit-mask-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAyMCAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNC43NzY5IDE0LjczMzdMOC42NTE5MiAyLjQ4MzY5QzguMzI5NDYgMS44Mzg3NyA3LjQwOTEzIDEuODM4NzcgNy4wODY2NyAyLjQ4MzY5TDAuOTYxNjY5IDE0LjczMzdDMC42NzA3NzUgMTUuMzE1NSAxLjA5MzgzIDE2IDEuNzQ0MjkgMTZIMTMuOTk0M0MxNC42NDQ4IDE2IDE1LjA2NzggMTUuMzE1NSAxNC43NzY5IDE0LjczMzdaTTMuMTYwMDcgMTQuMjVMNy44NjkyOSA0LjgzMTU2TDEyLjU3ODUgMTQuMjVIMy4xNjAwN1pNOC43NDQyOSAxMS42MjVWMTMuMzc1SDYuOTk0MjlWMTEuNjI1SDguNzQ0MjlaTTYuOTk0MjkgMTAuNzVWNy4yNUg4Ljc0NDI5VjEwLjc1SDYuOTk0MjlaIiBmaWxsPSIjRUM3MjExIi8+CjxwYXRoIGQ9Ik0xMS4xOTkxIDIuOTUyMzhDMTAuODgwOSAyLjMxNDY3IDEwLjM1MzcgMS44MDUyNiA5LjcwNTUgMS41MDlMMTEuMDQxIDEuMDY5NzhDMTEuNjg4MyAwLjk0OTgxNCAxMi4zMzcgMS4yNzI2MyAxMi42MzE3IDEuODYxNDFMMTcuNjEzNiAxMS44MTYxQzE4LjM1MjcgMTMuMjkyOSAxNy41OTM4IDE1LjA4MDQgMTYuMDE4IDE1LjU3NDVDMTYuNDA0NCAxNC40NTA3IDE2LjMyMzEgMTMuMjE4OCAxNS43OTI0IDEyLjE1NTVMMTEuMTk5MSAyLjk1MjM4WiIgZmlsbD0iI0VDNzIxMSIvPgo8L3N2Zz4=");\n background-color: darkorange;\n}\n\n.ace_scrollbar {\n contain: strict;\n position: absolute;\n right: 0;\n bottom: 0;\n z-index: 6;\n}\n\n.ace_scrollbar-inner {\n position: absolute;\n cursor: text;\n left: 0;\n top: 0;\n}\n\n.ace_scrollbar-v{\n overflow-x: hidden;\n overflow-y: scroll;\n top: 0;\n}\n\n.ace_scrollbar-h {\n overflow-x: scroll;\n overflow-y: hidden;\n left: 0;\n}\n\n.ace_print-margin {\n position: absolute;\n height: 100%;\n}\n\n.ace_text-input {\n position: absolute;\n z-index: 0;\n width: 0.5em;\n height: 1em;\n opacity: 0;\n background: transparent;\n -moz-appearance: none;\n appearance: none;\n border: none;\n resize: none;\n outline: none;\n overflow: hidden;\n font: inherit;\n padding: 0 1px;\n margin: 0 -1px;\n contain: strict;\n -ms-user-select: text;\n -moz-user-select: text;\n -webkit-user-select: text;\n user-select: text;\n /*with `pre-line` chrome inserts   instead of space*/\n white-space: pre!important;\n}\n.ace_text-input.ace_composition {\n background: transparent;\n color: inherit;\n z-index: 1000;\n opacity: 1;\n}\n.ace_composition_placeholder { color: transparent }\n.ace_composition_marker { \n border-bottom: 1px solid;\n position: absolute;\n border-radius: 0;\n margin-top: 1px;\n}\n\n[ace_nocontext=true] {\n transform: none!important;\n filter: none!important;\n clip-path: none!important;\n mask : none!important;\n contain: none!important;\n perspective: none!important;\n mix-blend-mode: initial!important;\n z-index: auto;\n}\n\n.ace_layer {\n z-index: 1;\n position: absolute;\n overflow: hidden;\n /* workaround for chrome bug https://github.com/ajaxorg/ace/issues/2312*/\n word-wrap: normal;\n white-space: pre;\n height: 100%;\n width: 100%;\n box-sizing: border-box;\n /* setting pointer-events: auto; on node under the mouse, which changes\n during scroll, will break mouse wheel scrolling in Safari */\n pointer-events: none;\n}\n\n.ace_gutter-layer {\n position: relative;\n width: auto;\n text-align: right;\n pointer-events: auto;\n height: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer {\n font: inherit !important;\n position: absolute;\n height: 1000000px;\n width: 1000000px;\n contain: style size layout;\n}\n\n.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\n contain: style size layout;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n}\n\n.ace_hidpi .ace_text-layer,\n.ace_hidpi .ace_gutter-layer,\n.ace_hidpi .ace_content,\n.ace_hidpi .ace_gutter {\n contain: strict;\n}\n.ace_hidpi .ace_text-layer > .ace_line, \n.ace_hidpi .ace_text-layer > .ace_line_group {\n contain: strict;\n}\n\n.ace_cjk {\n display: inline-block;\n text-align: center;\n}\n\n.ace_cursor-layer {\n z-index: 4;\n}\n\n.ace_cursor {\n z-index: 4;\n position: absolute;\n box-sizing: border-box;\n border-left: 2px solid;\n /* workaround for smooth cursor repaintng whole screen in chrome */\n transform: translatez(0);\n}\n\n.ace_multiselect .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_slim-cursors .ace_cursor {\n border-left-width: 1px;\n}\n\n.ace_overwrite-cursors .ace_cursor {\n border-left-width: 0;\n border-bottom: 1px solid;\n}\n\n.ace_hidden-cursors .ace_cursor {\n opacity: 0.2;\n}\n\n.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {\n opacity: 0;\n}\n\n.ace_smooth-blinking .ace_cursor {\n transition: opacity 0.18s;\n}\n\n.ace_animate-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: step-end;\n animation-name: blink-ace-animate;\n animation-iteration-count: infinite;\n}\n\n.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\n animation-duration: 1000ms;\n animation-timing-function: ease-in-out;\n animation-name: blink-ace-animate-smooth;\n}\n \n@keyframes blink-ace-animate {\n from, to { opacity: 1; }\n 60% { opacity: 0; }\n}\n\n@keyframes blink-ace-animate-smooth {\n from, to { opacity: 1; }\n 45% { opacity: 1; }\n 60% { opacity: 0; }\n 85% { opacity: 0; }\n}\n\n.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\n position: absolute;\n z-index: 3;\n}\n\n.ace_marker-layer .ace_selection {\n position: absolute;\n z-index: 5;\n}\n\n.ace_marker-layer .ace_bracket {\n position: absolute;\n z-index: 6;\n}\n\n.ace_marker-layer .ace_error_bracket {\n position: absolute;\n border-bottom: 1px solid #DE5555;\n border-radius: 0;\n}\n\n.ace_marker-layer .ace_active-line {\n position: absolute;\n z-index: 2;\n}\n\n.ace_marker-layer .ace_selected-word {\n position: absolute;\n z-index: 4;\n box-sizing: border-box;\n}\n\n.ace_line .ace_fold {\n box-sizing: border-box;\n\n display: inline-block;\n height: 11px;\n margin-top: -2px;\n vertical-align: middle;\n\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");\n background-repeat: no-repeat, repeat-x;\n background-position: center center, top left;\n color: transparent;\n\n border: 1px solid black;\n border-radius: 2px;\n\n cursor: pointer;\n pointer-events: auto;\n}\n\n.ace_dark .ace_fold {\n}\n\n.ace_fold:hover{\n background-image:\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),\n url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");\n}\n\n.ace_tooltip {\n background-color: #f5f5f5;\n border: 1px solid gray;\n border-radius: 1px;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);\n color: black;\n max-width: 100%;\n padding: 3px 4px;\n position: fixed;\n z-index: 999999;\n box-sizing: border-box;\n cursor: default;\n white-space: pre-wrap;\n word-wrap: break-word;\n line-height: normal;\n font-style: normal;\n font-weight: normal;\n letter-spacing: normal;\n pointer-events: none;\n overflow: auto;\n max-width: min(60em, 66vw);\n overscroll-behavior: contain;\n}\n.ace_tooltip pre {\n white-space: pre-wrap;\n}\n\n.ace_tooltip.ace_dark {\n background-color: #636363;\n color: #fff;\n}\n\n.ace_tooltip:focus {\n outline: 1px solid #5E9ED6;\n}\n\n.ace_icon {\n display: inline-block;\n width: 18px;\n vertical-align: top;\n}\n\n.ace_icon_svg {\n display: inline-block;\n width: 12px;\n vertical-align: top;\n -webkit-mask-repeat: no-repeat;\n -webkit-mask-size: 12px;\n -webkit-mask-position: center;\n}\n\n.ace_folding-enabled > .ace_gutter-cell, .ace_folding-enabled > .ace_gutter-cell_svg-icons {\n padding-right: 13px;\n}\n\n.ace_fold-widget {\n box-sizing: border-box;\n\n margin: 0 -12px 0 1px;\n display: none;\n width: 11px;\n vertical-align: top;\n\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");\n background-repeat: no-repeat;\n background-position: center;\n\n border-radius: 3px;\n \n border: 1px solid transparent;\n cursor: pointer;\n}\n\n.ace_folding-enabled .ace_fold-widget {\n display: inline-block; \n}\n\n.ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");\n}\n\n.ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");\n}\n\n.ace_fold-widget:hover {\n border: 1px solid rgba(0, 0, 0, 0.3);\n background-color: rgba(255, 255, 255, 0.2);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);\n}\n\n.ace_fold-widget:active {\n border: 1px solid rgba(0, 0, 0, 0.4);\n background-color: rgba(0, 0, 0, 0.05);\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);\n}\n/**\n * Dark version for fold widgets\n */\n.ace_dark .ace_fold-widget {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");\n}\n.ace_dark .ace_fold-widget.ace_end {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget.ace_closed {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");\n}\n.ace_dark .ace_fold-widget:hover {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n background-color: rgba(255, 255, 255, 0.1);\n}\n.ace_dark .ace_fold-widget:active {\n box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\n}\n\n.ace_inline_button {\n border: 1px solid lightgray;\n display: inline-block;\n margin: -1px 8px;\n padding: 0 5px;\n pointer-events: auto;\n cursor: pointer;\n}\n.ace_inline_button:hover {\n border-color: gray;\n background: rgba(200,200,200,0.2);\n display: inline-block;\n pointer-events: auto;\n}\n\n.ace_fold-widget.ace_invalid {\n background-color: #FFB4B4;\n border-color: #DE5555;\n}\n\n.ace_fade-fold-widgets .ace_fold-widget {\n transition: opacity 0.4s ease 0.05s;\n opacity: 0;\n}\n\n.ace_fade-fold-widgets:hover .ace_fold-widget {\n transition: opacity 0.05s ease 0.05s;\n opacity:1;\n}\n\n.ace_underline {\n text-decoration: underline;\n}\n\n.ace_bold {\n font-weight: bold;\n}\n\n.ace_nobold .ace_bold {\n font-weight: normal;\n}\n\n.ace_italic {\n font-style: italic;\n}\n\n\n.ace_error-marker {\n background-color: rgba(255, 0, 0,0.2);\n position: absolute;\n z-index: 9;\n}\n\n.ace_highlight-marker {\n background-color: rgba(255, 255, 0,0.2);\n position: absolute;\n z-index: 8;\n}\n\n.ace_mobile-menu {\n position: absolute;\n line-height: 1.5;\n border-radius: 4px;\n -ms-user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n user-select: none;\n background: white;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #dcdcdc;\n color: black;\n}\n.ace_dark > .ace_mobile-menu {\n background: #333;\n color: #ccc;\n box-shadow: 1px 3px 2px grey;\n border: 1px solid #444;\n\n}\n.ace_mobile-button {\n padding: 2px;\n cursor: pointer;\n overflow: hidden;\n}\n.ace_mobile-button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_mobile-button:active {\n background-color: #ddd;\n}\n\n.ace_placeholder {\n 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}\n\n.ace_ghost_text {\n opacity: 0.5;\n font-style: italic;\n}\n\n.ace_ghost_text > 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}'}),ace.define("ace/layer/decorators",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var i=e("../lib/dom"),o=e("../lib/oop"),e=e("../lib/event_emitter").EventEmitter,r=(s.prototype.$updateDecorators=function(e){var t=!0===this.renderer.theme.isDark?this.colors.dark:this.colors.light,n=(e&&(this.maxHeight=e.maxHeight,this.lineHeight=e.lineHeight,this.canvasHeight=e.height,(e.lastRow+1)*this.lineHeightt.priority?1:0}),this.renderer.session.$foldData),s=0;sthis.canvasHeight&&(a=this.canvasHeight-this.halfMinDecorationHeight),d=Math.round(a-this.halfMinDecorationHeight),l=Math.round(a+this.halfMinDecorationHeight)),n.fillStyle=t[i[s].type]||null,n.fillRect(0,h,this.canvasWidth,l-d)}e=this.renderer.session.selection.getCursor();e&&(c=this.compensateFoldRows(e.row,r),h=Math.round((e.row-c)*this.lineHeight*this.heightRatio),n.fillStyle="rgba(0, 0, 0, 0.5)",n.fillRect(0,h,this.canvasWidth,2))},s.prototype.compensateFoldRows=function(e,t){var n=0;if(t&&0t[i].start.row&&e=t[i].end.row&&(n+=t[i].end.row-t[i].start.row);return n},s);function s(e,t){this.canvas=i.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)}o.implement(r.prototype,e),t.Decorator=r}),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"],function(e,t,n){var i=e("./lib/oop"),a=e("./lib/dom"),o=e("./lib/lang"),r=e("./config"),s=e("./layer/gutter").Gutter,l=e("./layer/marker").Marker,c=e("./layer/text").Text,h=e("./layer/cursor").Cursor,d=e("./scrollbar").HScrollBar,u=e("./scrollbar").VScrollBar,g=e("./scrollbar_custom").HScrollBar,p=e("./scrollbar_custom").VScrollBar,m=e("./renderloop").RenderLoop,f=e("./layer/font_metrics").FontMetrics,C=e("./lib/event_emitter").EventEmitter,y=e("./css/editor-css"),v=e("./layer/decorators").Decorator,I=e("./lib/useragent"),e=(a.importCssString(y,"ace_editor.css",!1),b.prototype.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),a.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},b.prototype.setSession=function(e){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),(this.session=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))},b.prototype.updateLines=function(e,t,n){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)},b.prototype.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},b.prototype.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},b.prototype.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},b.prototype.updateFull=function(e){e?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},b.prototype.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},b.prototype.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},b.prototype.onResize=function(e,t,n,i){if(!(2s.height-i?a.translate(this.textarea,0,0):(s=1,o=this.$size.height-i,r?r.useTextareaForIME?(r=this.textarea.value,s=this.characterWidth*this.session.$getStringScreenWidth(r)[0]):t+=this.lineHeight+2:t+=this.lineHeight,(n-=this.scrollLeft)>this.$size.scrollerWidth-s&&(n=this.$size.scrollerWidth-s),n+=this.gutterWidth+this.margin.left,a.setStyle(e,"height",i+"px"),a.setStyle(e,"width",s+"px"),a.translate(this.textarea,Math.min(n,this.$size.scrollerWidth-s),Math.min(t,o)))):a.translate(this.textarea,-100,0))},b.prototype.getFirstVisibleRow=function(){return this.layerConfig.firstRow},b.prototype.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+( 0===this.layerConfig.offset?0:1)},b.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},b.prototype.getLastVisibleRow=function(){return this.layerConfig.lastRow},b.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()},b.prototype.setScrollMargin=function(e,t,n,i){var o=this.scrollMargin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,o.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-o.top),this.updateFull()},b.prototype.setMargin=function(e,t,n,i){var o=this.margin;o.top=0|e,o.bottom=0|t,o.right=0|i,o.left=0|n,o.v=o.top+o.bottom,o.h=o.left+o.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},b.prototype.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},b.prototype.setHScrollBarAlwaysVisible=function(e){this.setOption("hScrollBarAlwaysVisible",e)},b.prototype.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},b.prototype.setVScrollBarAlwaysVisible=function(e){this.setOption("vScrollBarAlwaysVisible",e)},b.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)},b.prototype.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},b.prototype.freeze=function(){this.$frozen=!0},b.prototype.unfreeze=function(){this.$frozen=!1},b.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 n,i,t=this.layerConfig;(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)&&(e|=this.$computeLayerConfig()|this.$loop.clear(),t.firstRow!=this.layerConfig.firstRow&&t.firstRowScreen==this.layerConfig.firstRowScreen&&0<(n=this.scrollTop+(t.firstRow-Math.max(this.layerConfig.firstRow,0))*this.lineHeight)&&(this.scrollTop=n,e=(e|=this.CHANGE_SCROLL)|(this.$computeLayerConfig()|this.$loop.clear())),t=this.layerConfig,this.$updateScrollBarV(),e&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),a.translate(this.content,-this.scrollLeft,-t.offset),n=t.width+2*this.$padding+"px",i=t.minHeight+"px",a.setStyle(this.content.style,"width",n),a.setStyle(this.content.style,"height",i)),e&this.CHANGE_H_SCROLL&&(a.translate(this.content,-this.scrollLeft,-t.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?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):e&this.CHANGE_SCROLL?(this.$changedLines=null,e&this.CHANGE_TEXT||e&this.CHANGE_LINES?this.$textLayer.update(t):this.$textLayer.scrollLines(t),this.$showGutter&&(e&this.CHANGE_GUTTER||e&this.CHANGE_LINES?this.$gutterLayer.update(t):this.$gutterLayer.scrollLines(t)),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t),this.$markerBack.update(t),this.$markerFront.update(t),this.$cursorLayer.update(t),this.$moveTextAreaToCursor()):(e&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(t),this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_LINES?((this.$updateLines()||e&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_TEXT||e&this.CHANGE_GUTTER?(this.$showGutter&&this.$gutterLayer.update(t),this.$customScrollbar&&this.$scrollDecorator.$updateDecorators(t)):e&this.CHANGE_CURSOR&&(this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(t),this.$customScrollbar)&&this.$scrollDecorator.$updateDecorators(t),e&this.CHANGE_CURSOR&&(this.$cursorLayer.update(t),this.$moveTextAreaToCursor()),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(t),e&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(t)),this._signal("afterRender",e)}else this.$changes|=e},b.prototype.$autosize=function(){var e=this.session.getScreenLength()*this.lineHeight,t=this.$maxLines*this.lineHeight,n=Math.min(t,Math.max((this.$minLines||1)*this.lineHeight,e))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight());t=!((n=this.$maxPixelHeight&&n>this.$maxPixelHeight?this.$maxPixelHeight:n)<=2*this.lineHeight)&&th.top)),c=s!==i,h=(c&&(this.$vScroll=i,this.scrollBarV.setVisible(i)),this.scrollTop%this.lineHeight),s=Math.ceil(l/this.lineHeight)-1,s=(i=Math.max(0,Math.round((this.scrollTop-h)/this.lineHeight)))+s,d=this.lineHeight,i=t.screenToDocumentRow(i,0),u=t.getFoldLine(i),t=(u&&(i=u.start.row),u=t.documentToScreenRow(i,0),e=t.getRowLength(i)*d,s=Math.min(t.screenToDocumentRow(s,0),t.getLength()-1),l=n.scrollerHeight+t.getRowLength(s)*d+e,h=this.scrollTop-u*d,0);return this.layerConfig.width==r&&!a||(t=this.CHANGE_H_SCROLL),(a||c)&&(t|=this.$updateCachedSize(!0,this.gutterWidth,n.width,n.height),this._signal("scrollbarVisibilityChanged"),c)&&(r=this.$getLongestLine()),this.layerConfig={width:r,padding:this.$padding,firstRow:i,firstRowScreen:u,lastRow:s,lineHeight:d,characterWidth:this.characterWidth,minHeight:l,maxHeight:o,offset:h,gutterOffset:d?Math.max(0,Math.ceil((h+n.height-n.scrollerHeight)/d)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),t},b.prototype.$updateLines=function(){if(this.$changedLines){var e=this.$changedLines.firstRow,t=this.$changedLines.lastRow,n=(this.$changedLines=null,this.layerConfig);if(!(e>n.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))},b.prototype.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},b.prototype.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},b.prototype.addGutterDecoration=function(e,t){this.$gutterLayer.addGutterDecoration(e,t)},b.prototype.removeGutterDecoration=function(e,t){this.$gutterLayer.removeGutterDecoration(e,t)},b.prototype.updateBreakpoints=function(e){this._rows=e,this.$loop.schedule(this.CHANGE_GUTTER)},b.prototype.setAnnotations=function(e){this.$gutterLayer.setAnnotations(e),this.$loop.schedule(this.CHANGE_GUTTER)},b.prototype.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},b.prototype.hideCursor=function(){this.$cursorLayer.hideCursor()},b.prototype.showCursor=function(){this.$cursorLayer.showCursor()},b.prototype.scrollSelectionIntoView=function(e,t,n){this.scrollCursorIntoView(e,n),this.scrollCursorIntoView(t,n)},b.prototype.scrollCursorIntoView=function(e,t,n){var i,o,r;0!==this.$size.scrollerHeight&&(i=(e=this.$cursorLayer.getPixelPosition(e)).left,e=e.top,o=n&&n.top||0,n=n&&n.bottom||0,this.$scrollAnimation&&(this.$stopAnimation=!0),e<(r=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop)+o?(t&&r+o>e+this.lineHeight&&(e-=t*this.$size.scrollerHeight),0===e&&(e=-this.scrollMargin.top),this.session.setScrollTop(e)):r+this.$size.scrollerHeight-n=1-this.scrollMargin.top||0=1-this.scrollMargin.left||0").concat(e.text,"")}),this.$ghostTextWidget={html:e.join(""),row:t.row,column:t.column,className:"ace_ghost_text"},this.session.widgetManager.addLineWidget(this.$ghostTextWidget),e=this.$cursorLayer.getPixelPosition(t,!0),n=this.container.getBoundingClientRect().height,(i=o.length*this.lineHeight)this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:e}))}}).call(d.prototype);e.UIWorkerClient=function(e,t,n){var i=null,o=!1,r=Object.create(c),s=[],a=new d({messageBuffer:s,terminate:function(){},postMessage:function(e){s.push(e),i&&(o?setTimeout(l):l())}}),l=(a.setEmitSync=function(e){o=e},function(){var e=s.shift();e.command?i[e.command].apply(i,e.args):e.event&&r._signal(e.event,e.data)});return r.postMessage=function(e){a.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})},h.loadModule(["worker",t],function(e){for(i=new e[n](r);s.length;)l()}),a},e.WorkerClient=d,e.createWorker=l}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(e,t,n){var l=e("./range").Range,i=e("./lib/event_emitter").EventEmitter,e=e("./lib/oop"),o=(r.prototype.setup=function(){var t=this,n=this.doc,e=this.session,i=(this.selectionBefore=e.selection.toJSON(),e.selection.inMultiSelectMode&&e.selection.toSingleRange(),this.pos=n.createAnchor(this.$pos.row,this.$pos.column),this.pos);i.$insertRight=!0,i.detach(),i.markerId=e.addMarker(new l(i.row,i.column,i.row,i.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(e){e=n.createAnchor(e.row,e.column);e.$insertRight=!0,e.detach(),t.others.push(e)}),e.setUndoSelect(!1)},r.prototype.showOtherMarkers=function(){var t,n;this.othersActive||(t=this.session,(n=this).othersActive=!0,this.others.forEach(function(e){e.markerId=t.addMarker(new l(e.row,e.column,e.row,e.column+n.length),n.othersClass,null,!1)}))},r.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),i&&(this.length+=n),i&&!this.session.$fromUndo)if("insert"===e.action)for(var r=this.others.length-1;0<=r;r--){var s={row:(a=this.others[r]).row,column:a.column+o};this.doc.insertMergedLines(s,e.lines)}else if("remove"===e.action)for(r=this.others.length-1;0<=r;r--){var a,s={row:(a=this.others[r]).row,column:a.column+o};this.doc.remove(new l(s.row,s.column,s.row,s.column-n))}this.$updating=!1,this.updateMarkers()}},r.prototype.updateAnchors=function(e){this.pos.onChange(e);for(var t=this.others.length;t--;)this.others[t].onChange(e);this.updateMarkers()},r.prototype.updateMarkers=function(){if(!this.$updating){var n=this,i=this.session,e=function(e,t){i.removeMarker(e.markerId),e.markerId=i.addMarker(new l(e.row,e.column,e.row,e.column+n.length),t,null,!1)};e(this.pos,this.mainClass);for(var t=this.others.length;t--;)e(this.others[t],this.othersClass)}},r.prototype.onCursorChange=function(e){var t;!this.$updating&&this.session&&((t=this.session.selection.getCursor()).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)))},r.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},r.prototype.cancel=function(){if(-1!==this.$undoStackDepth){for(var e=this.session.getUndoManager(),t=(e.$undoStack||e.$undostack).length-this.$undoStackDepth,n=0;nr&&(r=e.column),(t=-1==t?0:t)t[1].length&&(n=t[1].length),it[3].length&&(o=t[3].length)),t):[e]}).map(t?l:r?s?function(e){return e[2]?a(n+i-e[2].length)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}:l:function(e){return e[2]?a(n)+e[2]+a(o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]});function a(e){return g.stringRepeat(" ",e)}function l(e){return e[2]?a(n)+e[2]+a(i-e[2].length+o)+e[4].replace(/^([=:])\s+/,"$1 "):e[0]}}}.call(i.prototype),o.onSessionChange=function(e){var t=e.session,e=(t&&!t.multiSelect&&(t.$selectionMarkers=[],t.selection.$initRangeList(),t.multiSelect=t.selection),this.multiSelect=t&&t.multiSelect,e.oldSession);e&&(e.multiSelect.off("addRange",this.$onAddRange),e.multiSelect.off("removeRange",this.$onRemoveRange),e.multiSelect.off("multiSelect",this.$onMultiSelect),e.multiSelect.off("singleSelect",this.$onSingleSelect),e.multiSelect.lead.off("change",this.$checkMultiselectChange),e.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())},o.MultiSelect=c,e("./config").defineOptions(i.prototype,"editor",{enableMultiselect:{set:function(e){c(this),e?this.on("mousedown",r):this.off("mousedown",r)},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,n){var h=e("../../range").Range,e=t.FoldMode=function(){};!function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(e,t,n){e=e.getLine(n);return this.foldingStartMarker.test(e)?"start":"markbeginend"==t&&this.foldingStopMarker&&this.foldingStopMarker.test(e)?"end":""},this.getFoldWidgetRange=function(e,t,n){return null},this.indentationBlock=function(e,t,n){var i=/\S/,o=e.getLine(t),r=o.search(i);if(-1!=r){for(var s,n=n||o.length,a=e.getLength(),o=t,l=t;++tn.row&&(i.row--,i.column=e.getLine(i.row).length),h.fromPoints(n,i)},this.closingBracketBlock=function(e,t,n,i,o){n={row:n,column:i},i=e.$findOpeningBracket(t,n);if(i)return i.column++,n.column--,h.fromPoints(i,n)}}.call(e.prototype)}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range","ace/config"],function(e,t,n){var c=e("../line_widgets").LineWidgets,h=e("../lib/dom"),a=e("../range").Range,d=e("../config").nls;function u(e,t,n){var i=e.getAnnotations().sort(a.comparePoints);if(i.length){var o=function(e,t,n){for(var i=0,o=e.length-1;i<=o;){var r=i+o>>1,s=n(t,e[r]);if(0=i.length?o=0"),r.appendChild(h.createElement("div"));l.destroy=function(){e.$mouseHandler.isMousePressed||(e.keyBinding.removeKeyboardHandler(a),i.widgetManager.removeLineWidget(l),e.off("changeSelection",l.destroy),e.off("changeSession",l.destroy),e.off("mouseup",l.destroy),e.off("change",l.destroy))},e.keyBinding.addKeyboardHandler(a),e.on("changeSelection",l.destroy),e.on("changeSession",l.destroy),e.on("mouseup",l.destroy),e.on("change",l.destroy),e.session.widgetManager.addLineWidget(l),l.el.onmousedown=e.focus.bind(e),e.renderer.scrollCursorIntoView(null,.5,{bottom:l.el.offsetHeight})},h.importCssString("\n .error_widget_wrapper {\n background: inherit;\n color: inherit;\n border:none\n }\n .error_widget {\n border-top: solid 2px;\n border-bottom: solid 2px;\n margin: 5px 0;\n padding: 10px 40px;\n white-space: pre-wrap;\n }\n .error_widget.ace_error, .error_widget_arrow.ace_error{\n border-color: #ff5a5a\n }\n .error_widget.ace_warning, .error_widget_arrow.ace_warning{\n border-color: #F1D817\n }\n .error_widget.ace_info, .error_widget_arrow.ace_info{\n border-color: #5a5a5a\n }\n .error_widget.ace_ok, .error_widget_arrow.ace_ok{\n border-color: #5aaa5a\n }\n .error_widget_arrow {\n position: absolute;\n border: solid 5px;\n border-top-color: transparent!important;\n border-right-color: transparent!important;\n border-left-color: transparent!important;\n top: -5px;\n }\n","error_marker.css",!1)}),ace.define("ace/ace",["require","exports","module","ace/lib/dom","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config","ace/loader_build"],function(e,r,t){e("./loader_build")(r);var s=e("./lib/dom"),n=e("./range").Range,a=e("./editor").Editor,i=e("./edit_session").EditSession,o=e("./undomanager").UndoManager,l=e("./virtual_renderer").VirtualRenderer;e("./worker/worker_client"),e("./keyboard/hash_handler"),e("./placeholder"),e("./multi_select"),e("./mode/folding/fold_mode"),e("./theme/textmate"),e("./ext/error_marker"),r.config=e("./config"),r.edit=function(e,t){if("string"==typeof e){var n=e;if(!(e=document.getElementById(n)))throw new Error("ace.edit can't find div #"+n)}var i,o;return e&&e.env&&e.env.editor instanceof a?e.env.editor:(n="",e&&/input|textarea/i.test(e.tagName)?(n=(i=e).value,e=s.createElement("pre"),i.parentNode.replaceChild(e,i)):e&&(n=e.textContent,e.innerHTML=""),n=r.createEditSession(n),e=new a(new l(e),n,t),o={document:n,editor:e,onResize:e.resize.bind(e,null)},i&&(o.textarea=i),e.on("destroy",function(){o.editor.container.env=null}),e.container.env=e.env=o,e)},r.createEditSession=function(e,t){e=new i(e,t);return e.setUndoManager(new o),e},r.Range=n,r.Editor=a,r.EditSession=i,r.UndoManager=o,r.VirtualRenderer=l,r.version=r.config.version}),ace.require(["ace/ace"],function(e){e&&(e.config.init(!0),e.define=ace.define);var t,n=function(){return this}();for(t in(n=(n=n||"undefined"==typeof window?n:window)||"undefined"==typeof self?n:self).ace||(n.ace=e),e)e.hasOwnProperty(t)&&(n.ace[t]=e[t]);n.ace.default=n.ace,i&&(i.exports=n.ace)})},6489:function(t,e,n){t=n.nmd(t),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,s,t){var n=e("./lib/dom"),i=e("./lib/oop"),o=e("./lib/event_emitter").EventEmitter,c=e("./lib/lang"),d=e("./range").Range,u=e("./range_list").RangeList,r=e("./keyboard/hash_handler").HashHandler,a=e("./tokenizer").Tokenizer,l=e("./clipboard"),h={CURRENT_WORD:function(e){return e.session.getTextRange(e.session.getWordRange())},SELECTION:function(e,t,n){e=e.session.getTextRange();return n?e.replace(/\n\r?([ \t]*\S)/g,"\n"+n+"$1"):e},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 l.getText&&l.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){e=e.session.$mode||{};return e.blockComment&&e.blockComment.start||""},BLOCK_COMMENT_END:function(e){e=e.session.$mode||{};return e.blockComment&&e.blockComment.end||""},LINE_COMMENT:function(e){return(e.session.$mode||{}).lineCommentStart||""},CURRENT_YEAR:g.bind(null,{year:"numeric"}),CURRENT_YEAR_SHORT:g.bind(null,{year:"2-digit"}),CURRENT_MONTH:g.bind(null,{month:"numeric"}),CURRENT_MONTH_NAME:g.bind(null,{month:"long"}),CURRENT_MONTH_NAME_SHORT:g.bind(null,{month:"short"}),CURRENT_DATE:g.bind(null,{day:"2-digit"}),CURRENT_DAY_NAME:g.bind(null,{weekday:"long"}),CURRENT_DAY_NAME_SHORT:g.bind(null,{weekday:"short"}),CURRENT_HOUR:g.bind(null,{hour:"2-digit",hour12:!1}),CURRENT_MINUTE:g.bind(null,{minute:"2-digit"}),CURRENT_SECOND:g.bind(null,{second:"2-digit"})};function g(e){e=(new Date).toLocaleString("en-us",e);return 1==e.length?"0"+e:e}h.SELECTED_TEXT=h.SELECTION;m.prototype.getTokenizer=function(){return m.$tokenizer||this.createTokenizer()},m.prototype.createTokenizer=function(){function i(e){return e=e.substr(1),/^\d+$/.test(e)?[{tabstopId:parseInt(e,10)}]:[{text:e}]}function e(e){return"(?:[^\\\\"+e+"]|\\\\.)"}var t={regex:"/("+e("/")+"+)/",onMatch:function(e,t,n){n=n[0];return n.fmtString=!0,n.guard=e.slice(1,-1),n.flag=""},next:"formatString"};return m.$tokenizer=new a({start:[{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return[e="}"==i&&n.length||-1!="`$\\".indexOf(i)?i:e]}},{regex:/}/,onMatch:function(e,t,n){return[n.length?n.shift():e]}},{regex:/\$(?:\d+|\w+)/,onMatch:i},{regex:/\$\{[\dA-Z_a-z]+/,onMatch:function(e,t,n){e=i(e.substr(1));return n.unshift(e[0]),e},next:"snippetVar"},{regex:/\n/,token:"newline",merge:!1}],snippetVar:[{regex:"\\|"+e("\\|")+"*\\|",onMatch:function(e,t,n){e=e.slice(1,-1).replace(/\\[,|\\]|,/g,function(e){return 2==e.length?e[1]:"\0"}).split("\0").map(function(e){return{value:e}});return[(n[0].choices=e)[0]]},next:"start"},t,{regex:"([^:}\\\\]|\\\\.)*:?",token:"",next:"start"}],formatString:[{regex:/:/,onMatch:function(e,t,n){return n.length&&n[0].expectElse?(n[0].expectElse=!1,n[0].ifEnd={elseEnd:n[0]},[n[0].ifEnd]):":"}},{regex:/\\./,onMatch:function(e,t,n){var i=e[1];return"}"==i&&n.length||-1!="`$\\".indexOf(i)?e=i:"n"==i?e="\n":"t"==i?e="\t":-1!="ulULE".indexOf(i)&&(e={changeCase:i,local:"a"s&&(l=s-o.offsetWidth),o.style.left=l+"px",o.style.right="",g.isOpen||(g.isOpen=!0,this._signal("show"),u=null),g.anchorPos=e,g.anchor=n}return!0},g.show=function(e,t,n){this.tryShow(e,t,n?"bottom":void 0,!0)},g.goTo=function(e){var t=this.getRow(),n=this.session.getLength()-1;switch(e){case"up":t=t<=0?n:t-1;break;case"down":t=n<=t?-1:t+1;break;case"start":t=0;break;case"end":t=n}this.setRow(t)},g.getTextLeftOffset=function(){return this.$borderSize+this.renderer.$padding+this.$imageSize},g.$imageSize=0,g.$borderSize=1,g}var o=e("../virtual_renderer").VirtualRenderer,r=e("../editor").Editor,c=e("../range").Range,h=e("../lib/event"),d=e("../lib/lang"),p=e("../lib/dom"),m=e("../config").nls,e=e("./../lib/useragent"),f=e.isSafari?"menu":"listbox",C=e.isSafari?"menuitem":"option",y=e.isSafari?"aria-current":"aria-selected";p.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=i,t.$singleLineEditor=l,t.getAriaId=a}),ace.define("ace/autocomplete/inline_screenreader",["require","exports","module"],function(e,t,n){function i(e){this.editor=e,this.screenReaderDiv=document.createElement("div"),this.screenReaderDiv.classList.add("ace_screenreader-only"),this.editor.container.appendChild(this.screenReaderDiv)}i.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,e=t.element.childNodes[e-t.config.firstRow];if(e){for(var n="doc-tooltip ",i=0;ithis.filterText&&0===e.lastIndexOf(this.filterText,0)?this.filtered: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 t,n=null;t=t.filter(function(e){e=e.snippet||e.caption||e.value;return e!==n&&(n=e,!0)}),this.filtered=t},I.prototype.filterCompletions=function(e,t){var n=[],i=t.toUpperCase(),o=t.toLowerCase();e:for(var r,s=0;r=e[s];s++){var a=!this.ignoreCaption&&r.caption||r.value||r.snippet;if(a){var l=-1,c=0,h=0;if(this.exactMatch){if(t!==a.substr(0,t.length))continue}else{var d=a.toLowerCase().indexOf(o);if(-1",c.escapeHTML(e.caption),"","
    ",c.escapeHTML((e=e.snippet,o={},e.replace(/\${(\d+)(:(.*?))?}/g,function(e,t,n,i){return o[t]=i||""}).replace(/\$(\d+?)/g,function(e,t){return o[t]})))].join(""))},id:"snippetCompleter"},p=[g,d,u],m=(t.setCompleters=function(e){p.length=0,e&&p.push.apply(p,e)},t.addCompleter=function(e){p.push(e)},t.textCompleter=d,t.keyWordCompleter=u,t.snippetCompleter=g,{name:"expandSnippet",exec:function(e){return l.expandWithTab(e)},bindKey:"Tab"}),f=function(e){(e="string"==typeof e?a.$modes[e]:e)&&(l.files||(l.files={}),C(e.$id,e.snippetFileId),e.modes)&&e.modes.forEach(f)},C=function(t,e){e&&t&&!l.files[t]&&(l.files[t]={},a.loadModule(e,function(e){e&&(!(l.files[t]=e).snippets&&e.snippetText&&(e.snippets=l.parseSnippetFile(e.snippetText)),l.register(e.snippets||[],e.scope),e.includeScopes)&&(l.snippetMap[e.scope].includeScopes=e.includeScopes,e.includeScopes.forEach(function(e){f("ace/mode/"+e)}))}))},y=c.delayedCall(function(){v(r)},0),v=function(e){var t=e.editor,n=h.getCompletionPrefix(t),e=e.args,e=h.triggerAutocomplete(t,e);(n&&n.length>=t.$liveAutocompletionThreshold||e)&&((n=s.for(t)).autoShown=!0,n.showPopup(t))},d=e("../editor").Editor;e("../config").defineOptions(d.prototype,"editor",{enableBasicAutocompletion:{set:function(e){e?(this.completers||(this.completers=Array.isArray(e)?e:p),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:p),this.commands.on("afterExec",o)):this.commands.off("afterExec",o)},value:!1},liveAutocompletionDelay:{initialValue:0},liveAutocompletionThreshold:{initialValue:0},enableSnippets:{set:function(e){e?(this.commands.addCommand(m),this.on("changeMode",i),i(0,this)):(this.commands.removeCommand(m),this.off("changeMode",i))},value:!1}})}),ace.require(["ace/ext/language_tools"],function(e){t&&(t.exports=e)})},6534:function(t,e,n){t=n.nmd(t),ace.define("ace/ext/searchbox-css",["require","exports","module"],function(e,t,n){n.exports='\n\n/* ------------------------------------------------------------------------------------------\n * Editor Search Form\n * --------------------------------------------------------------------------------------- */\n.ace_search {\n background-color: #ddd;\n color: #666;\n border: 1px solid #cbcbcb;\n border-top: 0 none;\n overflow: hidden;\n margin: 0;\n padding: 4px 6px 0 4px;\n position: absolute;\n top: 0;\n z-index: 99;\n white-space: normal;\n}\n.ace_search.left {\n border-left: 0 none;\n border-radius: 0px 0px 5px 0px;\n left: 0;\n}\n.ace_search.right {\n border-radius: 0px 0px 0px 5px;\n border-right: 0 none;\n right: 0;\n}\n\n.ace_search_form, .ace_replace_form {\n margin: 0 20px 4px 0;\n overflow: hidden;\n line-height: 1.9;\n}\n.ace_replace_form {\n margin-right: 0;\n}\n.ace_search_form.ace_nomatch {\n outline: 1px solid red;\n}\n\n.ace_search_field {\n border-radius: 3px 0 0 3px;\n background-color: white;\n color: black;\n border: 1px solid #cbcbcb;\n border-right: 0 none;\n outline: 0;\n padding: 0;\n font-size: inherit;\n margin: 0;\n line-height: inherit;\n padding: 0 6px;\n min-width: 17em;\n vertical-align: top;\n min-height: 1.8em;\n box-sizing: content-box;\n}\n.ace_searchbtn {\n border: 1px solid #cbcbcb;\n line-height: inherit;\n display: inline-block;\n padding: 0 6px;\n background: #fff;\n border-right: 0 none;\n border-left: 1px solid #dcdcdc;\n cursor: pointer;\n margin: 0;\n position: relative;\n color: #666;\n}\n.ace_searchbtn:last-child {\n border-radius: 0 3px 3px 0;\n border-right: 1px solid #cbcbcb;\n}\n.ace_searchbtn:disabled {\n background: none;\n cursor: default;\n}\n.ace_searchbtn:hover {\n background-color: #eef1f6;\n}\n.ace_searchbtn.prev, .ace_searchbtn.next {\n padding: 0px 0.7em\n}\n.ace_searchbtn.prev:after, .ace_searchbtn.next:after {\n content: "";\n border: solid 2px #888;\n width: 0.5em;\n height: 0.5em;\n border-width: 2px 0 0 2px;\n display:inline-block;\n transform: rotate(-45deg);\n}\n.ace_searchbtn.next:after {\n border-width: 0 2px 2px 0 ;\n}\n.ace_searchbtn_close {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\n border-radius: 50%;\n border: 0 none;\n color: #656565;\n cursor: pointer;\n font: 16px/16px Arial;\n padding: 0;\n height: 14px;\n width: 14px;\n top: 9px;\n right: 7px;\n position: absolute;\n}\n.ace_searchbtn_close:hover {\n background-color: #656565;\n background-position: 50% 100%;\n color: white;\n}\n\n.ace_button {\n margin-left: 2px;\n cursor: pointer;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n overflow: hidden;\n opacity: 0.7;\n border: 1px solid rgba(100,100,100,0.23);\n padding: 1px;\n box-sizing: border-box!important;\n color: black;\n}\n\n.ace_button:hover {\n background-color: #eee;\n opacity:1;\n}\n.ace_button:active {\n background-color: #ddd;\n}\n\n.ace_button.checked {\n border-color: #3399ff;\n opacity:1;\n}\n\n.ace_search_options{\n margin-bottom: 3px;\n text-align: right;\n -webkit-user-select: none;\n -moz-user-select: none;\n -o-user-select: none;\n -ms-user-select: none;\n user-select: none;\n clear: both;\n}\n\n.ace_search_counter {\n float: left;\n font-family: arial;\n padding: 0 8px;\n}'}),ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/ext/searchbox-css","ace/keyboard/hash_handler","ace/lib/keys","ace/config"],function(e,t,n){var o=e("../lib/dom"),c=e("../lib/lang"),r=e("../lib/event"),s=e("./searchbox-css"),i=e("../keyboard/hash_handler").HashHandler,a=e("../lib/keys"),h=e("../config").nls,l=(o.importCssString(s,"ace_searchbox",!1),d.prototype.setEditor=function(e){e.searchBox=this,e.renderer.scroller.appendChild(this.element),this.editor=e},d.prototype.setSession=function(e){this.searchRange=null,this.$syncOptions(!0)},d.prototype.$initElements=function(e){this.searchBox=e.querySelector(".ace_search_form"),this.replaceBox=e.querySelector(".ace_replace_form"),this.searchOption=e.querySelector("[action=searchInSelection]"),this.replaceOption=e.querySelector("[action=toggleReplace]"),this.regExpOption=e.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=e.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=e.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field"),this.searchCounter=e.querySelector(".ace_search_counter")},d.prototype.$init=function(){var e=this.element,i=(this.$initElements(e),this);r.addListener(e,"mousedown",function(e){setTimeout(function(){i.activeInput.focus()},0),r.stopPropagation(e)}),r.addListener(e,"click",function(e){var t=(e.target||e.srcElement).getAttribute("action");t&&i[t]?i[t]():i.$searchBarKb.commands[t]&&i.$searchBarKb.commands[t].exec(i),r.stopPropagation(e)}),r.addCommandKeyListener(e,function(e,t,n){n=a.keyCodeToString(n),t=i.$searchBarKb.findKeyCommand(t,n);t&&t.exec&&(t.exec(i),r.stopEvent(e))}),this.$onChange=c.delayedCall(function(){i.find(!1,!1)}),r.addListener(this.searchInput,"input",function(){i.$onChange.schedule(20)}),r.addListener(this.searchInput,"focus",function(){i.activeInput=i.searchInput,i.searchInput.value&&i.highlight()}),r.addListener(this.replaceInput,"focus",function(){i.activeInput=i.replaceInput,i.searchInput.value&&i.highlight()})},d.prototype.setSearchRange=function(e){(this.searchRange=e)?this.searchRangeMarker=this.editor.session.addMarker(e,"ace_active-line"):this.searchRangeMarker&&(this.editor.session.removeMarker(this.searchRangeMarker),this.searchRangeMarker=null)},d.prototype.$syncOptions=function(e){o.setCssClass(this.replaceOption,"checked",this.searchRange),o.setCssClass(this.searchOption,"checked",this.searchOption.checked),this.replaceOption.textContent=this.replaceOption.checked?"-":"+",o.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),o.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),o.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked);var t=this.editor.getReadOnly();this.replaceOption.style.display=t?"none":"",this.replaceBox.style.display=this.replaceOption.checked&&!t?"":"none",this.find(!1,!1,e)},d.prototype.highlight=function(e){this.editor.session.highlight(e||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},d.prototype.find=function(e,t,n){e=!this.editor.find(this.searchInput.value,{skipCurrent:e,backwards:t,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked,preventScroll:n,range:this.searchRange})&&this.searchInput.value;o.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight(),this.updateCounter()},d.prototype.updateCounter=function(){var e=this.editor,t=e.$search.$options.re,n=t.unicode,i=0,o=0;if(t){var r,s,a=this.searchRange?e.session.getTextRange(this.searchRange):e.getValue(),l=e.session.doc.positionToIndex(e.selection.anchor);for(this.searchRange&&(l-=e.session.doc.positionToIndex(this.searchRange.start)),t.lastIndex=0;(s=t.exec(a))&&((r=s.index)<=l&&o++,!(999<++i))&&(s[0]||(t.lastIndex=r+=c.skipEmptyMatch(a,r,n),!(r>=a.length))););}this.searchCounter.textContent=h("search-box.search-counter","$0 of $1",[o,999%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,c=/^(?:(?:http[s\u017F]?|ftp):\/\/)(?:(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+(?::(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?@)?(?:(?!10(?:\.[0-9]{1,3}){3})(?!127(?:\.[0-9]{1,3}){3})(?!169\.254(?:\.[0-9]{1,3}){2})(?!192\.168(?:\.[0-9]{1,3}){2})(?!172\.(?:1[6-9]|2[0-9]|3[01])(?:\.[0-9]{1,3}){2})(?:[1-9][0-9]?|1[0-9][0-9]|2[01][0-9]|22[0-3])(?:\.(?:1?[0-9]{1,2}|2[0-4][0-9]|25[0-5])){2}(?:\.(?:[1-9][0-9]?|1[0-9][0-9]|2[0-4][0-9]|25[0-4]))|(?:(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)(?:\.(?:(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+-)*(?:[0-9a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)*(?:\.(?:(?:[a-z\xA1-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]){2,})))(?::[0-9]{2,5})?(?:\/(?:[\0-\x08\x0E-\x1F!-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*)?$/i,h=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,d=/^(?:\/(?:[^~/]|~0|~1)*)*$/,u=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,g=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function p(e){return i.copy(p[e="full"==e?"full":"fast"])}function m(e){var t,n,e=e.match(o);return!!e&&(t=+e[1],n=+e[2],e=+e[3],1<=n)&&n<=12&&1<=e&&e<=(2!=n||(e=t)%4!=0||e%100==0&&e%400!=0?r[n]:29)}function f(e,t){var n,i,o,e=e.match(s);return!!e&&(n=e[1],i=e[2],o=e[3],e=e[5],n<=23&&i<=59&&o<=59||23==n&&59==i&&60==o)&&(!t||e)}(e.exports=p).fast={date:/^\d\d\d\d-[0-1]\d-[0-3]\d$/,time:/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,"date-time":/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,"uri-template":l,url:c,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:I,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":u,"relative-json-pointer":g},p.full={date:m,time:f,"date-time":function(e){e=e.split(C);return 2==e.length&&m(e[0])&&f(e[1],!0)},uri:function(e){return y.test(e)&&a.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":l,url:c,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:n,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^\s*(?:(?:(?:[0-9a-f]{1,4}:){7}(?:[0-9a-f]{1,4}|:))|(?:(?:[0-9a-f]{1,4}:){6}(?::[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){5}(?:(?:(?::[0-9a-f]{1,4}){1,2})|:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(?:(?:[0-9a-f]{1,4}:){4}(?:(?:(?::[0-9a-f]{1,4}){1,3})|(?:(?::[0-9a-f]{1,4})?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){3}(?:(?:(?::[0-9a-f]{1,4}){1,4})|(?:(?::[0-9a-f]{1,4}){0,2}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){2}(?:(?:(?::[0-9a-f]{1,4}){1,5})|(?:(?::[0-9a-f]{1,4}){0,3}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?:(?:[0-9a-f]{1,4}:){1}(?:(?:(?::[0-9a-f]{1,4}){1,6})|(?:(?::[0-9a-f]{1,4}){0,4}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(?::(?:(?:(?::[0-9a-f]{1,4}){1,7})|(?:(?::[0-9a-f]{1,4}){0,5}:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(?:%.+)?\s*$/i,regex:I,uuid:h,"json-pointer":d,"json-pointer-uri-fragment":u,"relative-json-pointer":g};var C=/t|\s/i;var y=/\/|:/;var v=/[^\\]\\Z/;function I(e){if(v.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}}},2620:function(e,t,n){var T=n(4292),E=n(6862),R=n(3689),$=n(9306),_=n(1035),L=E.ucs2length,N=n(5215),M=R.Validation;function B(e,s,a,t){var l=this,c=this._opts,h=[void 0],d={},u=[],n={},g=[],i={},p=[],o=(s=s||{schema:e,refVal:h,refs:d},function(e,t,n){var i=W.call(this,e,t,n);return 0<=i?{index:i,compiling:!0}:(i=this._compilations.length,this._compilations[i]={schema:e,root:t,baseId:n},{index:i,compiling:!1})}.call(this,e,s,t)),r=this._compilations[o.index];if(o.compiling)return r.callValidate=v;var m=this._formats,f=this.RULES;try{var C=I(e,s,a,t),y=(r.validate=C,r.callValidate);return y&&(y.schema=C.schema,y.errors=null,y.refs=C.refs,y.refVal=C.refVal,y.root=C.root,y.$async=C.$async,c.sourceCode)&&(y.source=C.source),C}finally{!function(e,t,n){e=W.call(this,e,t,n);0<=e&&this._compilations.splice(e,1)}.call(this,e,s,t)}function v(){var e=r.validate,t=e.apply(this,arguments);return v.errors=e.errors,t}function I(e,t,n,i){var o=!t||t.schema==e;if(t.schema!=s.schema)return B.call(l,e,t,n,i);n=!0===e.$async,i=_({isTop:!0,schema:e,isRoot:o,baseId:i,root:t,schemaPath:"",errSchemaPath:"#",errorPath:'""',MissingRefError:R.MissingRef,RULES:f,validate:_,util:E,resolve:T,resolveRef:b,usePattern:S,useDefault:x,useCustomRule:k,opts:c,formats:m,logger:l.logger,self:l}),i=O(h,G)+O(u,P)+O(g,H)+O(p,F)+i;c.processCode&&(i=c.processCode(i,e));try{var r=new Function("self","RULES","formats","root","refVal","defaults","customRules","equal","ucs2length","ValidationError",i)(l,f,m,s,h,g,p,N,L,M);h[0]=r}catch(e){throw l.logger.error("Error compiling schema, function code:",i),e}return r.schema=e,r.errors=null,r.refs=d,r.refVal=h,r.root=o?r:t,n&&(r.$async=!0),!0===c.sourceCode&&(r.source={code:i,patterns:u,defaults:g}),r}function b(e,t,n){t=T.url(e,t);var i=d[t];if(void 0!==i)return w(o=h[i],r="refVal["+i+"]");if(!n&&s.refs){i=s.refs[t];if(void 0!==i)return w(o=s.refVal[i],r=A(t,o))}var o,r=A(t),n=T.call(l,I,s,t);if(void 0!==(n=void 0===n&&(i=a&&a[t])?T.inlineRef(i,c.inlineRefs)?i:B.call(l,i,s,a,e):n))return o=n,i=d[i=t],h[i]=o,w(n,r);delete d[t]}function A(e,t){var n=h.length;return h[n]=t,"refVal"+(d[e]=n)}function w(e,t){return"object"==typeof e||"boolean"==typeof e?{code:t,schema:e,inline:!0}:{code:t,$async:e&&!!e.$async}}function S(e){var t=n[e];return void 0===t&&(t=n[e]=u.length,u[t]=e),"pattern"+t}function x(e){switch(typeof e){case"boolean":case"number":return""+e;case"string":return E.toQuotedString(e);case"object":var t,n;return null===e?"null":(t=$(e),void 0===(n=i[t])&&(n=i[t]=g.length,g[n]=e),"default"+n)}}function k(e,t,n,i){if(!1!==l._opts.validateSchema){var o=e.definition.dependencies;if(o&&!o.every(function(e){return Object.prototype.hasOwnProperty.call(n,e)}))throw new Error("parent schema must have all required keywords: "+o.join(","));o=e.definition.validateSchema;if(o)if(!o(t)){o="keyword schema is invalid: "+l.errorsText(o.errors);if("log"!=l._opts.validateSchema)throw new Error(o);l.logger.error(o)}}var r,o=e.definition.compile,s=e.definition.inline,a=e.definition.macro;if(o)r=o.call(l,t,n,i);else if(a)r=a.call(l,t,n,i),!1!==c.validateSchema&&l.validateSchema(r,!0);else if(s)r=s.call(l,i,e.keyword,t,n);else if(!(r=e.definition.validate))return;if(void 0===r)throw new Error('custom keyword "'+e.keyword+'"failed to compile');o=p.length;return{code:"customRule"+o,validate:p[o]=r}}}function W(e,t,n){for(var i=0;i",w=y?">":"<",S=void 0;if(!f&&"number"!=typeof d&&void 0!==d)throw new Error(t+" must be number");if(!b&&void 0!==I&&"number"!=typeof I&&"boolean"!=typeof I)throw new Error(v+" must be number or boolean");b?(h=e.util.getData(I.$data,h,e.dataPathArr),r="exclIsNumber"+c,s="' + "+(a="op"+c)+" + '",S=v,(x=x||[]).push(l=l+(" var schemaExcl"+c+" = "+h+"; ")+(" var "+(i="exclusive"+c)+"; var "+(o="exclType"+c)+" = typeof "+(h="schemaExcl"+c)+"; if ("+o+" != 'boolean' && "+o+" != 'undefined' && "+o+" != 'number') { ")),l="",!1!==e.createErrors?(l+=" { keyword: '"+(S||"_exclusiveLimit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: {} ",!1!==e.opts.messages&&(l+=" , message: '"+v+" should be boolean' "),e.opts.verbose&&(l+=" , schema: validate.schema"+u+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ",k=l,l=x.pop(),!e.compositeRule&&p?e.async?l+=" throw new ValidationError(["+k+"]); ":l+=" validate.errors = ["+k+"]; return false; ":l+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l+=" } else if ( ",f&&(l+=" ("+C+" !== undefined && typeof "+C+" != 'number') || "),l+=" "+o+" == 'number' ? ( ("+i+" = "+C+" === undefined || "+h+" "+A+"= "+C+") ? "+m+" "+w+"= "+h+" : "+m+" "+w+" "+C+" ) : ( ("+i+" = "+h+" === true) ? "+m+" "+w+"= "+C+" : "+m+" "+w+" "+C+" ) || "+m+" !== "+m+") { var op"+c+" = "+i+" ? '"+A+"' : '"+A+"='; ",void 0===d&&(g=e.errSchemaPath+"/"+(S=v),C=h,f=b)):(s=A,(r="number"==typeof I)&&f?(a="'"+s+"'",l+=" if ( ",f&&(l+=" ("+C+" !== undefined && typeof "+C+" != 'number') || "),l+=" ( "+C+" === undefined || "+I+" "+A+"= "+C+" ? "+m+" "+w+"= "+I+" : "+m+" "+w+" "+C+" ) || "+m+" !== "+m+") { "):(r&&void 0===d?(i=!0,g=e.errSchemaPath+"/"+(S=v),C=I,w+="="):(r&&(C=Math[y?"min":"max"](I,d)),I===(!r||C)?(i=!0,g=e.errSchemaPath+"/"+(S=v),w+="="):(i=!1,s+="=")),a="'"+s+"'",l+=" if ( ",f&&(l+=" ("+C+" !== undefined && typeof "+C+" != 'number') || "),l+=" "+m+" "+w+" "+C+" || "+m+" !== "+m+") { ")),S=S||t;(x=x||[]).push(l),l="",!1!==e.createErrors?(l+=" { keyword: '"+(S||"_limit")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(g)+" , params: { comparison: "+a+", limit: "+C+", exclusive: "+i+" } ",!1!==e.opts.messages&&(l=l+" , message: 'should be "+s+" "+(f?"' + "+C:C+"'")),e.opts.verbose&&(l=(l+=" , schema: ")+(f?"validate.schema"+u:""+d)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+m+" "),l+=" } "):l+=" {} ";var x,k=l;return l=x.pop(),!e.compositeRule&&p?e.async?l+=" throw new ValidationError(["+k+"]); ":l+=" validate.errors = ["+k+"]; return false; ":l+=" var err = "+k+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",l+=" } ",p&&(l+=" else { "),l}},9337:function(e){e.exports=function(e,t,n){var i,o=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,d="data"+(s||""),u=e.opts.$data&&a&&a.$data,s=u?(o+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+r):a;if(u||"number"==typeof a)return o+="if ( ",u&&(o+=" ("+s+" !== undefined && typeof "+s+" != 'number') || "),(r=[]).push(o+=" "+d+".length "+("maxItems"==(i=t)?">":"<")+" "+s+") { "),o="",!1!==e.createErrors?(o+=" { keyword: '"+(i||"_limitItems")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+s+" } ",!1!==e.opts.messages&&(o=(o=(o+=" , message: 'should NOT have ")+("maxItems"==t?"more":"fewer")+" than ")+(u?"' + "+s+" + '":""+a)+" items' "),e.opts.verbose&&(o=(o+=" , schema: ")+(u?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",i=o,o=r.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+i+"]); ":o+=" validate.errors = ["+i+"]; return false; ":o+=" var err = "+i+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",h&&(o+=" else { "),o;throw new Error(t+" must be number")}},5433:function(e){e.exports=function(e,t,n){var i,o=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,d="data"+(s||""),u=e.opts.$data&&a&&a.$data,s=u?(o+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+r):a;if(u||"number"==typeof a)return o+="if ( ",u&&(o+=" ("+s+" !== undefined && typeof "+s+" != 'number') || "),!1===e.opts.unicode?o+=" "+d+".length ":o+=" ucs2length("+d+") ",(r=[]).push(o+=" "+("maxLength"==(i=t)?">":"<")+" "+s+") { "),o="",!1!==e.createErrors?(o+=" { keyword: '"+(i||"_limitLength")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+s+" } ",!1!==e.opts.messages&&(o=(o=(o+=" , message: 'should NOT be ")+("maxLength"==t?"longer":"shorter")+" than ")+(u?"' + "+s+" + '":""+a)+" characters' "),e.opts.verbose&&(o=(o+=" , schema: ")+(u?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",i=o,o=r.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+i+"]); ":o+=" validate.errors = ["+i+"]; return false; ":o+=" var err = "+i+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",h&&(o+=" else { "),o;throw new Error(t+" must be number")}},7724:function(e){e.exports=function(e,t,n){var i,o=" ",r=e.level,s=e.dataLevel,a=e.schema[t],l=e.schemaPath+e.util.getProperty(t),c=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,d="data"+(s||""),u=e.opts.$data&&a&&a.$data,s=u?(o+=" var schema"+r+" = "+e.util.getData(a.$data,s,e.dataPathArr)+"; ","schema"+r):a;if(u||"number"==typeof a)return o+="if ( ",u&&(o+=" ("+s+" !== undefined && typeof "+s+" != 'number') || "),(r=[]).push(o+=" Object.keys("+d+").length "+("maxProperties"==(i=t)?">":"<")+" "+s+") { "),o="",!1!==e.createErrors?(o+=" { keyword: '"+(i||"_limitProperties")+"' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(c)+" , params: { limit: "+s+" } ",!1!==e.opts.messages&&(o=(o=(o+=" , message: 'should NOT have ")+("maxProperties"==t?"more":"fewer")+" than ")+(u?"' + "+s+" + '":""+a)+" properties' "),e.opts.verbose&&(o=(o+=" , schema: ")+(u?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+d+" "),o+=" } "):o+=" {} ",i=o,o=r.pop(),!e.compositeRule&&h?e.async?o+=" throw new ValidationError(["+i+"]); ":o+=" validate.errors = ["+i+"]; return false; ":o+=" var err = "+i+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+="} ",h&&(o+=" else { "),o;throw new Error(t+" must be number")}},3531:function(e){e.exports=function(e,t,n){var i=" ",o=e.schema[t],r=e.schemaPath+e.util.getProperty(t),s=e.errSchemaPath+"/"+t,a=!e.opts.allErrors,l=e.util.copy(e),c="",h=(l.level++,"valid"+l.level),d=l.baseId,u=!0,g=o;if(g)for(var p,m=-1,f=g.length-1;m "+b+") { ",w=h+"["+b+"]",d.schema=x,d.schemaPath=a+"["+b+"]",d.errSchemaPath=l+"/"+b,d.errorPath=e.util.getPathExpr(e.errorPath,b,e.opts.jsonPointers,!0),d.dataPathArr[p]=b,S=e.validate(d),d.baseId=f,e.util.varOccurences(S,m)<2?i+=" "+e.util.varReplace(S,m,w)+" ":i+=" var "+m+" = "+w+"; "+S+" ",i+=" } ",c)&&(i+=" if ("+g+") { ",u+="}")}"object"==typeof v&&(e.opts.strictKeywords?"object"==typeof v&&0 "+s.length+") { for (var "+o+" = "+s.length+"; "+o+" < "+h+".length; "+o+"++) { ",d.errorPath=e.util.getPathExpr(e.errorPath,o,e.opts.jsonPointers,!0),w=h+"["+o+"]",d.dataPathArr[p]=o,S=e.validate(d),d.baseId=f,e.util.varOccurences(S,m)<2?i+=" "+e.util.varReplace(S,m,w)+" ":i+=" var "+m+" = "+w+"; "+S+" ",c&&(i+=" if (!"+g+") break; "),i+=" } } ",c)&&(i+=" if ("+g+") { ",u+="}")}else(e.opts.strictKeywords?"object"==typeof s&&0 1e-"+e.opts.multipleOfPrecision+" ":i+=" division"+o+" !== parseInt(division"+o+") ",i+=" ) ",d&&(i+=" ) ");t=[],t.push(i+=" ) { "),i="",!1!==e.createErrors?(i+=" { keyword: 'multipleOf' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { multipleOf: "+r+" } ",!1!==e.opts.messages&&(i=i+" , message: 'should be multiple of "+(d?"' + "+r:r+"'")),e.opts.verbose&&(i=(i+=" , schema: ")+(d?"validate.schema"+a:""+s)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),i+=" } "):i+=" {} ",o=i,i=t.pop();return!e.compositeRule&&c?e.async?i+=" throw new ValidationError(["+o+"]); ":i+=" validate.errors = ["+o+"]; return false; ":i+=" var err = "+o+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",i+="} ",c&&(i+=" else { "),i}},1004:function(e){e.exports=function(e,t,n){var i,o,r=" ",s=e.level,a=e.dataLevel,l=e.schema[t],c=e.schemaPath+e.util.getProperty(t),t=e.errSchemaPath+"/"+t,h=!e.opts.allErrors,a="data"+(a||""),s="errs__"+s,d=e.util.copy(e),u=(d.level++,"valid"+d.level);return(e.opts.strictKeywords?"object"==typeof l&&0=e.opts.loopRequired,v=e.opts.ownProperties;if(t){if(i+=" var missing"+o+"; ",s){d||(i+=" var "+r+" = validate.schema"+a+"; ");var I="' + "+(k="schema"+o+"["+(w="i"+o)+"]")+" + '";e.opts._errorDataPathProperty&&(e.errorPath=e.util.getPathExpr(y,k,e.opts.jsonPointers)),i+=" var "+h+" = true; ",d&&(i+=" if (schema"+o+" === undefined) "+h+" = true; else if (!Array.isArray(schema"+o+")) "+h+" = false; else {"),i+=" for (var "+w+" = 0; "+w+" < "+r+".length; "+w+"++) { "+h+" = "+c+"["+r+"["+w+"]] !== undefined ",v&&(i+=" && Object.prototype.hasOwnProperty.call("+c+", "+r+"["+w+"]) "),i+="; if (!"+h+") break; } ",d&&(i+=" } ");(x=x||[]).push(i+=" if (!"+h+") { "),i="",!1!==e.createErrors?(i+=" { keyword: 'required' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(l)+" , params: { missingProperty: '"+I+"' } ",!1!==e.opts.messages&&(i+=" , message: '",e.opts._errorDataPathProperty?i+="is a required property":i+="should have required property \\'"+I+"\\'",i+="' "),e.opts.verbose&&(i+=" , schema: validate.schema"+a+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+c+" "),i+=" } "):i+=" {} ";var b=i,i=x.pop()}else{i+=" if ( ";var A=u;if(A)for(var w=-1,S=A.length-1;w 1) { ",r=e.schema.items&&e.schema.items.type,s=Array.isArray(r),!r||"object"==r||"array"==r||s&&(0<=r.indexOf("object")||0<=r.indexOf("array"))?o+=" outer: for (;i--;) { for (j = i; j--;) { if (equal("+h+"[i], "+h+"[j])) { "+d+" = false; break outer; } } } ":(o=(o+=" var itemIndices = {}, item; for (;i--;) { var item = "+h+"[i]; ")+" if ("+e.util["checkDataType"+(s?"s":"")](r,"item",e.opts.strictNumbers,!0)+") continue; ",s&&(o+=" if (typeof item == 'string') item = '\"' + item; "),o+=" if (typeof itemIndices[item] == 'number') { "+d+" = false; j = itemIndices[item]; break; } itemIndices[item] = i; } "),o+=" } ",u&&(o+=" } "),(i=i||[]).push(o+=" if (!"+d+") { "),o="",!1!==e.createErrors?(o+=" { keyword: 'uniqueItems' , dataPath: (dataPath || '') + "+e.errorPath+" , schemaPath: "+e.util.toQuotedString(t)+" , params: { i: i, j: j } ",!1!==e.opts.messages&&(o+=" , message: 'should NOT have duplicate items (items ## ' + j + ' and ' + i + ' are identical)' "),e.opts.verbose&&(o=(o+=" , schema: ")+(u?"validate.schema"+l:""+a)+" , parentSchema: validate.schema"+e.schemaPath+" , data: "+h+" "),o+=" } "):o+=" {} ",r=o,o=i.pop(),!e.compositeRule&&c?e.async?o+=" throw new ValidationError(["+r+"]); ":o+=" validate.errors = ["+r+"]; return false; ":o+=" var err = "+r+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; ",o+=" } ",c&&(o+=" else { ")):c&&(o+=" if (true) { "),o}},1035:function(e){e.exports=function(i,e,W){var t="",n=!0===i.schema.$async,o=i.util.schemaHasRulesExcept(i.schema,i.RULES.all,"$ref"),r=i.self._getId(i.schema);if(i.opts.strictKeywords){var s=i.util.schemaUnknownRules(i.schema,i.RULES.keywords);if(s){s="unknown keyword: "+s;if("log"!==i.opts.strictKeywords)throw new Error(s);i.logger.warn(s)}}if(i.isTop&&(t+=" var validate = ",n&&(i.async=!0,t+="async "),t+="function(data, dataPath, parentData, parentDataProperty, rootData) { 'use strict'; ",r)&&(i.opts.sourceCode||i.opts.processCode)&&(t+=" /*# sourceURL="+r+" */ "),"boolean"==typeof i.schema||!o&&!i.schema.$ref)l=i.level,c=i.dataLevel,R=i.schema[e="false schema"],I=i.schemaPath+i.util.getProperty(e),b=i.errSchemaPath+"/"+e,g=!i.opts.allErrors,h="data"+(c||""),u="valid"+l,!1===i.schema?(i.isTop?g=!0:t+=" var "+u+" = false; ",(M=M||[]).push(t),t="",!1!==i.createErrors?(t+=" { keyword: 'false schema' , dataPath: (dataPath || '') + "+i.errorPath+" , schemaPath: "+i.util.toQuotedString(b)+" , params: {} ",!1!==i.opts.messages&&(t+=" , message: 'boolean schema is false' "),i.opts.verbose&&(t+=" , schema: false , parentSchema: validate.schema"+i.schemaPath+" , data: "+h+" "),t+=" } "):t+=" {} ",T=t,t=M.pop(),!i.compositeRule&&g?i.async?t+=" throw new ValidationError(["+T+"]); ":t+=" validate.errors = ["+T+"]; return false; ":t+=" var err = "+T+"; if (vErrors === null) vErrors = [err]; else vErrors.push(err); errors++; "):i.isTop?t+=n?" return data; ":" validate.errors = null; return true; ":t+=" var "+u+" = true; ",i.isTop&&(t+=" }; return validate; ");else{if(i.isTop){var a=i.isTop,l=i.level=0,c=i.dataLevel=0,h="data";if(i.rootId=i.resolve.fullPath(i.self._getId(i.root.schema)),i.baseId=i.baseId||i.rootId,delete i.isTop,i.dataPathArr=[""],void 0!==i.schema.default&&i.opts.useDefaults&&i.opts.strictDefaults){var d="default is ignored in the schema root";if("log"!==i.opts.strictDefaults)throw new Error(d);i.logger.warn(d)}t=(t+=" var vErrors = null; ")+" var errors = 0; "+" if (rootData === undefined) rootData = data; "}else{l=i.level,h="data"+((c=i.dataLevel)||"");if(r&&(i.baseId=i.resolve.url(i.baseId,r)),n&&!i.async)throw new Error("async schema in sync schema");t+=" var errs_"+l+" = errors;"}var u="valid"+l,g=!i.opts.allErrors,p="",m="",f=i.schema.type,C=Array.isArray(f);if(f&&i.opts.nullable&&!0===i.schema.nullable&&(C?-1==f.indexOf("null")&&(f=f.concat("null")):"null"!=f&&(f=[f,"null"],C=!0)),C&&1==f.length&&(f=f[0],C=!1),i.schema.$ref&&o){if("fail"==i.opts.extendRefs)throw new Error('$ref: validation keywords used in schema at path "'+i.errSchemaPath+'" (see option extendRefs)');!0!==i.opts.extendRefs&&(o=!1,i.logger.warn('$ref: keywords ignored in schema at path "'+i.errSchemaPath+'"'))}if(i.schema.$comment&&i.opts.$comment&&(t+=" "+i.RULES.all.$comment.code(i,"$comment")),f){i.opts.coerceTypes&&(y=i.util.coerceToTypes(i.opts.coerceTypes,f));var y,v=i.RULES.types[f];if(y||C||!0===v||v&&!z(v)){var I=i.schemaPath+".type",b=i.errSchemaPath+"/type",I=i.schemaPath+".type",b=i.errSchemaPath+"/type";if(t+=" if ("+i.util[C?"checkDataTypes":"checkDataType"](f,h,i.opts.strictNumbers,!0)+") { ",y){var A="dataType"+l,w="coerced"+l,S=(t+=" var "+A+" = typeof "+h+"; var "+w+" = undefined; ","array"==i.opts.coerceTypes&&(t+=" if ("+A+" == 'object' && Array.isArray("+h+") && "+h+".length == 1) { "+h+" = "+h+"[0]; "+A+" = typeof "+h+"; if ("+i.util.checkDataType(i.schema.type,h,i.opts.strictNumbers)+") "+w+" = "+h+"; } "),t+=" if ("+w+" !== undefined) ; ",y);if(S)for(var x,k=-1,P=S.length-1;k",9:"Array"},c="UnquotedIdentifier",d="QuotedIdentifier",C="Number",E="Expref",R="Pipe",$="Flatten",v="Filter",b="Lbracket",_="Literal",L={".":"Dot","*":y="Star",",":p="Comma",":":m="Colon","{":I="Lbrace","}":f="Rbrace","]":u="Rbracket","(":A="Lparen",")":g="Rparen","@":T="Current"},N={"<":!0,">":!0,"=":!0,"!":!0},M={" ":!0,"\t":!0,"\n":!0},n.prototype={tokenize:function(e){var t,n,i=[];for(this._current=0;this._current"===n?"="===e[this._current]?(this._current++,{type:"GTE",value:">=",start:t}):{type:"GT",value:">",start:t}:"="===n&&"="===e[this._current]?(this._current++,{type:"EQ",value:"==",start:t}):void 0},_consumeLiteral:function(e){this._current++;for(var t=this._current,n=e.length;"`"!==e[this._current]&&this._currentNumber.MAX_SAFE_INTEGER||n=o.length)throw new SyntaxError("Unexpected end of JSON input")}},t.stringify=function(e,t,n){if(v(e)){var i=0;switch(typeof(u="object"==typeof n?n.space:n)){case"number":var o=101){t[0]=t[0].slice(0,-1);var i=t.length-1;for(var o=1;o= 0x80 (not a basic code point)","invalid-input":"Invalid input"},r=B-W,O=Math.floor,V=String.fromCharCode;function Z(e){throw new RangeError(L[e])}function N(e,t){var n=[];var i=e.length;while(i--)n[i]=t(e[i]);return n}function D(e,t){var n=e.split("@");var i="";if(n.length>1){i=n[0]+"@";e=n[1]}e=e.replace(_,".");var o=e.split(".");var r=N(o,t).join(".");return i+r}function K(e){var t=[];var n=0;var i=e.length;while(n=55296&&o<=56319&&n>1;t+=O(t/n);for(;t>r*P>>1;o+=B)t=O(t/r);return O(o+(r+1)*t/(t+T))},J=function e(t){var n=[];var i=t.length;var o=0;var r=G;var s=H;var a=t.lastIndexOf(F);if(a<0)a=0;for(var l=0;l=128)Z("not-basic");n.push(t.charCodeAt(l))}for(var c=a>0?a+1:0;c=i)Z("invalid-input");var g=z(t.charCodeAt(c++));if(g>=B||g>O((M-o)/d))Z("overflow");o+=g*d;var p=u<=s?W:u>=s+P?P:u-s;if(gO(M/m))Z("overflow");d*=m}var f=n.length+1;s=Y(o-h,f,h==0);if(O(o/f)>M-r)Z("overflow");r+=O(o/f);o%=f;n.splice(o++,0,r)}return String.fromCodePoint.apply(String,n)},U=function e(t){var n=[];t=K(t);var i=t.length;var o=G;var r=0;var s=H;var a=true;var l=false;var c=undefined;try{for(var h=t[Symbol.iterator](),d;!(a=(d=h.next()).done);a=true){var u=d.value;if(u<128)n.push(V(u))}}catch(e){l=true;c=e}finally{try{if(!a&&h.return)h.return()}finally{if(l)throw c}}var g=n.length;var p=g;if(g)n.push(F);while(p=o&&bO((M-r)/A))Z("overflow");r+=(m-o)*A;o=m;var w=true;var S=false;var x=undefined;try{for(var k=t[Symbol.iterator](),T;!(w=(T=k.next()).done);w=true){var E=T.value;if(EM)Z("overflow");if(E==o){var R=r;for(var $=B;;$+=B){var _=$<=s?W:$>=s+P?P:$-s;if(R<_)break;var L=R-_;var N=B-_;n.push(V(X(_+L%N,0)));R=O(L/N)}n.push(V(X(R,0)));s=Y(r,A,p==g);r=0;++p}}}catch(e){S=true;x=e}finally{try{if(!w&&k.return)k.return()}finally{if(S)throw x}}++r;++o}return n.join("")},Q,q,C={version:"2.1.0",ucs2:{decode:K,encode:function e(t){return String.fromCodePoint.apply(String,k(t))}},decode:J,encode:U,toASCII:function e(t){return D(t,function(e){return $.test(e)?"xn--"+U(e):e})},toUnicode:function e(t){return D(t,function(e){return R.test(e)?J(e.slice(4).toLowerCase()):e})}},h={};function m(e){var t=e.charCodeAt(0);var n=void 0;if(t<16)n="%0"+t.toString(16).toUpperCase();else if(t<128)n="%"+t.toString(16).toUpperCase();else if(t<2048)n="%"+(t>>6|192).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();else n="%"+(t>>12|224).toString(16).toUpperCase()+"%"+(t>>6&63|128).toString(16).toUpperCase()+"%"+(t&63|128).toString(16).toUpperCase();return n}function c(e){var t="";var n=0;var i=e.length;while(n=194&&o<224){if(i-n>=6){var r=parseInt(e.substr(n+4,2),16);t+=String.fromCharCode((o&31)<<6|r&63)}else t+=e.substr(n,6);n+=6}else if(o>=224){if(i-n>=9){var s=parseInt(e.substr(n+4,2),16);var a=parseInt(e.substr(n+7,2),16);t+=String.fromCharCode((o&15)<<12|(s&63)<<6|a&63)}else t+=e.substr(n,9);n+=9}else{t+=e.substr(n,3);n+=3}}return t}function d(e,n){function t(e){var t=c(e);return!t.match(n.UNRESERVED)?e:t}if(e.scheme)e.scheme=String(e.scheme).replace(n.PCT_ENCODED,t).toLowerCase().replace(n.NOT_SCHEME,"");if(e.userinfo!==undefined)e.userinfo=String(e.userinfo).replace(n.PCT_ENCODED,t).replace(n.NOT_USERINFO,m).replace(n.PCT_ENCODED,p);if(e.host!==undefined)e.host=String(e.host).replace(n.PCT_ENCODED,t).toLowerCase().replace(n.NOT_HOST,m).replace(n.PCT_ENCODED,p);if(e.path!==undefined)e.path=String(e.path).replace(n.PCT_ENCODED,t).replace(e.scheme?n.NOT_PATH:n.NOT_PATH_NOSCHEME,m).replace(n.PCT_ENCODED,p);if(e.query!==undefined)e.query=String(e.query).replace(n.PCT_ENCODED,t).replace(n.NOT_QUERY,m).replace(n.PCT_ENCODED,p);if(e.fragment!==undefined)e.fragment=String(e.fragment).replace(n.PCT_ENCODED,t).replace(n.NOT_FRAGMENT,m).replace(n.PCT_ENCODED,p);return e}function w(e){return e.replace(/^0*(.*)/,"$1")||"0"}function S(e,t){var n=e.match(t.IPV4ADDRESS)||[];var i=A(n,2),o=i[1];if(o)return o.split(".").map(w).join(".");else return e}function ee(e,t){var n=e.match(t.IPV6ADDRESS)||[];var i=A(n,3),o=i[1],r=i[2];if(o){var s=o.toLowerCase().split("::").reverse(),a=A(s,2),l=a[0],c=a[1];var h=c?c.split(":").map(w):[];var d=l.split(":").map(w);var u=t.IPV4ADDRESS.test(d[d.length-1]);var g=u?7:8;var p=d.length-g;var m=Array(g);for(var f=0;f1){var I=m.slice(0,y.index);var b=m.slice(y.index+y.length);v=I.join(":")+"::"+b.join(":")}else v=m.join(":");if(r)v+="%"+r;return v}else return e}var te=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,ne="".match(/(){0}/)[1]===undefined;function s(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var n={};var i=t.iri!==false?l:a;if(t.reference==="suffix")e=(t.scheme?t.scheme+":":"")+"//"+e;var o=e.match(te);if(o){if(ne){n.scheme=o[1];n.userinfo=o[3];n.host=o[4];n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=o[7];n.fragment=o[8];if(isNaN(n.port))n.port=o[5]}else{n.scheme=o[1]||undefined;n.userinfo=e.indexOf("@")!==-1?o[3]:undefined;n.host=e.indexOf("//")!==-1?o[4]:undefined;n.port=parseInt(o[5],10);n.path=o[6]||"";n.query=e.indexOf("?")!==-1?o[7]:undefined;n.fragment=e.indexOf("#")!==-1?o[8]:undefined;if(isNaN(n.port))n.port=e.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?o[4]:undefined}if(n.host)n.host=ee(S(n.host,i),i);if(n.scheme===undefined&&n.userinfo===undefined&&n.host===undefined&&n.port===undefined&&!n.path&&n.query===undefined)n.reference="same-document";else if(n.scheme===undefined)n.reference="relative";else if(n.fragment===undefined)n.reference="absolute";else n.reference="uri";if(t.reference&&t.reference!=="suffix"&&t.reference!==n.reference)n.error=n.error||"URI is not a "+t.reference+" reference.";var r=h[(t.scheme||n.scheme||"").toLowerCase()];if(!t.unicodeSupport&&(!r||!r.unicodeSupport)){if(n.host&&(t.domainHost||r&&r.domainHost))try{n.host=C.toASCII(n.host.replace(i.PCT_ENCODED,c).toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII via punycode: "+e}d(n,a)}else d(n,i);if(r&&r.parse)r.parse(n,t)}else n.error=n.error||"URI can not be parsed.";return n}function ie(e,t){var n=t.iri!==false?l:a;var i=[];if(e.userinfo!==undefined){i.push(e.userinfo);i.push("@")}if(e.host!==undefined)i.push(ee(S(String(e.host),n),n).replace(n.IPV6ADDRESS,function(e,t,n){return"["+t+(n?"%25"+n:"")+"]"}));if(typeof e.port==="number"||typeof e.port==="string"){i.push(":");i.push(String(e.port))}return i.length?i.join(""):undefined}var oe=/^\.\.?\//,re=/^\/\.(\/|$)/,se=/^\/\.\.(\/|$)/,ae=/^\/?(?:.|\n)*?(?=\/|$)/;function u(e){var t=[];while(e.length)if(e.match(oe))e=e.replace(oe,"");else if(e.match(re))e=e.replace(re,"/");else if(e.match(se)){e=e.replace(se,"/");t.pop()}else if(e==="."||e==="..")e="";else{var n=e.match(ae);if(n){var i=n[0];e=e.slice(i.length);t.push(i)}else throw new Error("Unexpected dot segment condition")}return t.join("")}function g(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};var e=n.iri?l:a;var i=[];var o=h[(n.scheme||t.scheme||"").toLowerCase()];if(o&&o.serialize)o.serialize(t,n);if(t.host)if(e.IPV6ADDRESS.test(t.host));else if(n.domainHost||o&&o.domainHost)try{t.host=!n.iri?C.toASCII(t.host.replace(e.PCT_ENCODED,c).toLowerCase()):C.toUnicode(t.host)}catch(e){t.error=t.error||"Host's domain name can not be converted to "+(!n.iri?"ASCII":"Unicode")+" via punycode: "+e}d(t,e);if(n.reference!=="suffix"&&t.scheme){i.push(t.scheme);i.push(":")}var r=ie(t,n);if(r!==undefined){if(n.reference!=="suffix")i.push("//");i.push(r);if(t.path&&t.path.charAt(0)!=="/")i.push("/")}if(t.path!==undefined){var s=t.path;if(!n.absolutePath&&(!o||!o.absolutePath))s=u(s);if(r===undefined)s=s.replace(/^\/\//,"/%2F");i.push(s)}if(t.query!==undefined){i.push("?");i.push(t.query)}if(t.fragment!==undefined){i.push("#");i.push(t.fragment)}return i.join("")}function le(e,t){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:{};var i=arguments[3];var o={};if(!i){e=s(g(e,n),n);t=s(g(t,n),n)}n=n||{};if(!n.tolerant&&t.scheme){o.scheme=t.scheme;o.userinfo=t.userinfo;o.host=t.host;o.port=t.port;o.path=u(t.path||"");o.query=t.query}else{if(t.userinfo!==undefined||t.host!==undefined||t.port!==undefined){o.userinfo=t.userinfo;o.host=t.host;o.port=t.port;o.path=u(t.path||"");o.query=t.query}else{if(!t.path){o.path=e.path;if(t.query!==undefined)o.query=t.query;else o.query=e.query}else{if(t.path.charAt(0)==="/")o.path=u(t.path);else{if((e.userinfo!==undefined||e.host!==undefined||e.port!==undefined)&&!e.path)o.path="/"+t.path;else if(!e.path)o.path=t.path;else o.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path;o.path=u(o.path)}o.query=t.query}o.userinfo=e.userinfo;o.host=e.host;o.port=e.port}o.scheme=e.scheme}o.fragment=t.fragment;return o}function ce(e,t,n){var i=x({scheme:"null"},n);return g(le(s(e,i),s(t,i),i,true),i)}function ue(e,t){if(typeof e==="string")e=g(s(e,t),t);else if(i(e)==="object")e=s(g(e,t),t);return e}function ge(e,t,n){if(typeof e==="string")e=g(s(e,n),n);else if(i(e)==="object")e=g(e,n);if(typeof t==="string")t=g(s(t,n),n);else if(i(t)==="object")t=g(t,n);return e===t}function pe(e,t){return e&&e.toString().replace(!t||!t.iri?a.ESCAPE:l.ESCAPE,m)}function y(e,t){return e&&e.toString().replace(!t||!t.iri?a.PCT_ENCODED:l.PCT_ENCODED,c)}var n={scheme:"http",domainHost:true,parse:function e(t,n){if(!t.host)t.error=t.error||"HTTP URIs must have a host.";return t},serialize:function e(t,n){var i=String(t.scheme).toLowerCase()==="https";if(t.port===(i?443:80)||t.port==="")t.port=undefined;if(!t.path)t.path="/";return t}},me={scheme:"https",domainHost:n.domainHost,parse:n.parse,serialize:n.serialize};function fe(e){return typeof e.secure==="boolean"?e.secure:String(e.scheme).toLowerCase()==="wss"}var o={scheme:"ws",domainHost:true,parse:function e(t,n){var i=t;i.secure=fe(i);i.resourceName=(i.path||"/")+(i.query?"?"+i.query:"");i.path=undefined;i.query=undefined;return i},serialize:function e(t,n){if(t.port===(fe(t)?443:80)||t.port==="")t.port=undefined;if(typeof t.secure==="boolean"){t.scheme=t.secure?"wss":"ws";t.secure=undefined}if(t.resourceName){var i=t.resourceName.split("?"),o=A(i,2),r=o[0],s=o[1];t.path=r&&r!=="/"?r:undefined;t.query=s;t.resourceName=undefined}t.fragment=undefined;return t}},Ce={scheme:"wss",domainHost:o.domainHost,parse:o.parse,serialize:o.serialize},ye={},ve,Ie="[A-Za-z0-9\\-\\.\\_\\~"+(true?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",f="[0-9A-Fa-f]",be=de(de("%[EFef]"+f+"%"+f+f+"%"+f+f)+"|"+de("%[89A-Fa-f]"+f+"%"+f+f)+"|"+de("%"+f+f)),Ae="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",we,Se=he("[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",'[\\"\\\\]'),xe="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",ke=new RegExp(Ie,"g"),v=new RegExp(be,"g"),Te=new RegExp(he("[^]",Ae,"[\\.]",'[\\"]',Se),"g"),Ee=new RegExp(he("[^]",Ie,xe),"g"),Re=Ee;function I(e){var t=c(e);return!t.match(ke)?e:t}var $e={scheme:"mailto",parse:function e(t,n){var i=t;var o=i.to=i.path?i.path.split(","):[];i.path=undefined;if(i.query){var r=false;var s={};var a=i.query.split("&");for(var l=0,c=a.length;l1&&arguments[1]!==undefined?arguments[1]:1;var n=t>0?e.toFixed(t).replace(/0+$/,"").replace(/\.$/,""):e.toString();return n||"0"}var r=function(){function p(e,t,n,i){s(this,p);var g=this;function o(e){if(e.startsWith("hsl")){var t=e.match(/([\-\d\.e]+)/g).map(Number),n=m(t,4),i=n[0],o=n[1],r=n[2],s=n[3];if(s===undefined)s=1;i/=360;o/=100;r/=100;g.hsla=[i,o,r,s]}else if(e.startsWith("rgb")){var a=e.match(/([\-\d\.e]+)/g).map(Number),l=m(a,4),c=l[0],h=l[1],d=l[2],u=l[3];if(u===undefined)u=1;g.rgba=[c,h,d,u]}else if(e.startsWith("#"))g.rgba=p.hexToRgb(e);else g.rgba=p.nameToRgb(e)||p.hexToRgb(e)}if(e===undefined);else if(Array.isArray(e))this.rgba=e;else if(n===undefined){var r=e&&""+e;if(r)o(r.toLowerCase())}else this.rgba=[e,t,n,i===undefined?1:i]}e(p,[{key:"printRGB",value:function e(t){var n=t?this.rgba:this.rgba.slice(0,3),i=n.map(function(e,t){return a(e,t===3?3:0)});return t?"rgba("+i+")":"rgb("+i+")"}},{key:"printHSL",value:function e(t){var n=[360,100,100,1],i=["","%","%",""];var o=t?this.hsla:this.hsla.slice(0,3),r=o.map(function(e,t){return a(e*n[t],t===3?3:1)+i[t]});return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function e(t){var n=this.hex;return t?n:n.substring(0,7)}},{key:"rgba",get:function e(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=p.hslToRgb(this._hsla)},set:function e(t){if(t.length===3)t[3]=1;this._rgba=t;this._hsla=null}},{key:"rgbString",get:function e(){return this.printRGB()}},{key:"rgbaString",get:function e(){return this.printRGB(true)}},{key:"hsla",get:function e(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=p.rgbToHsl(this._rgba)},set:function e(t){if(t.length===3)t[3]=1;this._hsla=t;this._rgba=null}},{key:"hslString",get:function e(){return this.printHSL()}},{key:"hslaString",get:function e(){return this.printHSL(true)}},{key:"hex",get:function e(){var t=this.rgba,n=t.map(function(e,t){return t<3?e.toString(16):Math.round(e*255).toString(16)});return"#"+n.map(function(e){return e.padStart(2,"0")}).join("")},set:function e(t){this.rgba=p.hexToRgb(t)}}],[{key:"hexToRgb",value:function e(t){var n=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!n.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var i=n.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map(function(e){return parseInt(e,16)});i[3]=i[3]/255;return i}},{key:"nameToRgb",value:function e(t){var n=t.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),i=o[n];return i===undefined?i:p.hexToRgb(i.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function e(t){var n=m(t,4),i=n[0],o=n[1],r=n[2],s=n[3];i/=255;o/=255;r/=255;var a=Math.max(i,o,r),l=Math.min(i,o,r);var c=void 0,h=void 0,d=(a+l)/2;if(a===l)c=h=0;else{var u=a-l;h=d>.5?u/(2-a-l):u/(a+l);switch(a){case i:c=(o-r)/u+(o1)i-=1;if(i<1/6)return t+(n-t)*6*i;if(i<1/2)return n;if(i<2/3)return t+(n-t)*(2/3-i)*6;return t};var d=r<.5?r*(1+o):r+o-r*o,u=2*r-d;a=h(u,d,i+1/3);l=h(u,d,i);c=h(u,d,i-1/3)}var g=[a*255,l*255,c*255].map(Math.round);g[3]=s;return g}}]);return p}(),n=function(){function r(){s(this,r);this._events=[]}e(r,[{key:"add",value:function e(t,n,i){t.addEventListener(n,i,false);this._events.push({target:t,type:n,handler:i})}},{key:"remove",value:function e(n,i,o){this._events=this._events.filter(function(e){var t=true;if(n&&n!==e.target)t=false;if(i&&i!==e.type)t=false;if(o&&o!==e.handler)t=false;if(t)r._doRemove(e.target,e.type,e.handler);return!t})}},{key:"destroy",value:function e(){this._events.forEach(function(e){return r._doRemove(e.target,e.type,e.handler)});this._events=[]}}],[{key:"_doRemove",value:function e(t,n,i){t.removeEventListener(n,i,false)}}]);return r}();function l(e){var t=document.createElement("div");t.innerHTML=e;return t.firstElementChild}function c(e,h,d){var u=false;function g(e,t,n){return Math.max(t,Math.min(e,n))}function i(e,t,n){if(n)u=true;if(!u)return;e.preventDefault();var i=h.getBoundingClientRect(),o=i.width,r=i.height,s=t.clientX,a=t.clientY;var l=g(s-i.left,0,o),c=g(a-i.top,0,r);d(l/o,c/r)}function t(e,t){var n=e.buttons===undefined?e.which:e.buttons;if(n===1)i(e,e,t);else u=false}function n(e,t){if(e.touches.length===1)i(e,e.touches[0],t);else u=false}e.add(h,"mousedown",function(e){t(e,true)});e.add(h,"touchstart",function(e){n(e,true)});e.add(window,"mousemove",t);e.add(h,"touchmove",n);e.add(window,"mouseup",function(e){u=false});e.add(h,"touchend",function(e){u=false});e.add(h,"touchcancel",function(e){u=false})}var b="linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",A=360,h="keydown",d="mousedown",u="focusin";function w(e,t){return(t||document).querySelector(e)}function g(e){e.preventDefault();e.stopPropagation()}function p(e,t,n,i,o){e.add(t,h,function(e){if(n.indexOf(e.key)>=0){if(o)g(e);i(e)}})}var t=function(){function t(e){s(this,t);this.settings={popup:"right",layout:"default",alpha:true,editor:true,editorFormat:"hex",cancelButton:false,defaultColor:"#0cf"};this._events=new n;this.onChange=null;this.onDone=null;this.onOpen=null;this.onClose=null;this.setOptions(e)}e(t,[{key:"setOptions",value:function e(t){var n=this;if(!t)return;var i=this.settings;function o(e,t,n){for(var i in e){if(n&&n.indexOf(i)>=0)continue;t[i]=e[i]}}if(t instanceof HTMLElement)i.parent=t;else{if(i.parent&&t.parent&&i.parent!==t.parent){this._events.remove(i.parent);this._popupInited=false}o(t,i);if(t.onChange)this.onChange=t.onChange;if(t.onDone)this.onDone=t.onDone;if(t.onOpen)this.onOpen=t.onOpen;if(t.onClose)this.onClose=t.onClose;var r=t.color||t.colour;if(r)this._setColor(r)}var s=i.parent;if(s&&i.popup&&!this._popupInited){var a=function e(t){return n.openHandler(t)};this._events.add(s,"click",a);p(this._events,s,[" ","Spacebar","Enter"],a);this._popupInited=true}else if(t.parent&&!i.popup)this.show()}},{key:"openHandler",value:function e(t){if(this.show()){t&&t.preventDefault();this.settings.parent.style.pointerEvents="none";var n=t&&t.type===h?this._domEdit:this.domElement;setTimeout(function(){return n.focus()},100);if(this.onOpen)this.onOpen(this.colour)}}},{key:"closeHandler",value:function e(t){var n=t&&t.type;var i=false;if(!t)i=true;else if(n===d||n===u){var o=(this.__containedEvent||0)+100;if(t.timeStamp>o)i=true}else{g(t);i=true}if(i&&this.hide()){this.settings.parent.style.pointerEvents="";if(n!==d)this.settings.parent.focus();if(this.onClose)this.onClose(this.colour)}}},{key:"movePopup",value:function e(t,n){this.closeHandler();this.setOptions(t);if(n)this.openHandler()}},{key:"setColor",value:function e(t,n){this._setColor(t,{silent:n})}},{key:"_setColor",value:function e(t,n){if(typeof t==="string")t=t.trim();if(!t)return;n=n||{};var i=void 0;try{i=new r(t)}catch(e){if(n.failSilently)return;throw e}if(!this.settings.alpha){var o=i.hsla;o[3]=1;i.hsla=o}this.colour=this.color=i;this._setHSLA(null,null,null,null,n)}},{key:"setColour",value:function e(t,n){this.setColor(t,n)}},{key:"show",value:function e(){var t=this.settings.parent;if(!t)return false;if(this.domElement){var n=this._toggleDOM(true);this._setPosition();return n}var i=this.settings.template||'
    ';var o=l(i);this.domElement=o;this._domH=w(".picker_hue",o);this._domSL=w(".picker_sl",o);this._domA=w(".picker_alpha",o);this._domEdit=w(".picker_editor input",o);this._domSample=w(".picker_sample",o);this._domOkay=w(".picker_done button",o);this._domCancel=w(".picker_cancel button",o);o.classList.add("layout_"+this.settings.layout);if(!this.settings.alpha)o.classList.add("no_alpha");if(!this.settings.editor)o.classList.add("no_editor");if(!this.settings.cancelButton)o.classList.add("no_cancel");this._ifPopup(function(){return o.classList.add("popup")});this._setPosition();if(this.colour)this._updateUI();else this._setColor(this.settings.defaultColor);this._bindEvents();return true}},{key:"hide",value:function e(){return this._toggleDOM(false)}},{key:"destroy",value:function e(){this._events.destroy();if(this.domElement)this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function e(){var n=this;var i=this,o=this.domElement,r=this._events;function s(e,t,n){r.add(e,t,n)}s(o,"click",function(e){return e.preventDefault()});c(r,this._domH,function(e,t){return i._setHSLA(e)});c(r,this._domSL,function(e,t){return i._setHSLA(null,e,1-t)});if(this.settings.alpha)c(r,this._domA,function(e,t){return i._setHSLA(null,null,null,1-t)});var t=this._domEdit;{s(t,"input",function(e){i._setColor(this.value,{fromEditor:true,failSilently:true})});s(t,"focus",function(e){var t=this;if(t.selectionStart===t.selectionEnd)t.select()})}this._ifPopup(function(){var e=function e(t){return n.closeHandler(t)};s(window,d,e);s(window,u,e);p(r,o,["Esc","Escape"],e);var t=function e(t){n.__containedEvent=t.timeStamp};s(o,d,t);s(o,u,t);s(n._domCancel,"click",e)});var a=function e(t){n._ifPopup(function(){return n.closeHandler(t)});if(n.onDone)n.onDone(n.colour)};s(this._domOkay,"click",a);p(r,o,["Enter"],a)}},{key:"_setPosition",value:function e(){var n=this.settings.parent,i=this.domElement;if(n!==i.parentNode)n.appendChild(i);this._ifPopup(function(e){if(getComputedStyle(n).position==="static")n.style.position="relative";var t=e===true?"popup_right":"popup_"+e;["popup_top","popup_bottom","popup_left","popup_right"].forEach(function(e){if(e===t)i.classList.add(e);else i.classList.remove(e)});i.classList.add(t)})}},{key:"_setHSLA",value:function e(t,n,i,o,r){r=r||{};var s=this.colour,a=s.hsla;[t,n,i,o].forEach(function(e,t){if(e||e===0)a[t]=e});s.hsla=a;this._updateUI(r);if(this.onChange&&!r.silent)this.onChange(s)}},{key:"_updateUI",value:function e(t){if(!this.domElement)return;t=t||{};var n=this.colour,i=n.hsla,o="hsl("+i[0]*A+", 100%, 50%)",r=n.hslString,s=n.hslaString;var a=this._domH,l=this._domSL,c=this._domA,h=w(".picker_selector",a),d=w(".picker_selector",l),u=w(".picker_selector",c);function g(e,t,n){t.style.left=n*100+"%"}function p(e,t,n){t.style.top=n*100+"%"}g(a,h,i[0]);this._domSL.style.backgroundColor=this._domH.style.color=o;g(l,d,i[1]);p(l,d,1-i[2]);l.style.color=r;p(c,u,1-i[3]);var m=r,f=m.replace("hsl","hsla").replace(")",", 0)"),C="linear-gradient("+[m,f]+")";this._domA.style.background=C+", "+b;if(!t.fromEditor){var y=this.settings.editorFormat,v=this.settings.alpha;var I=void 0;switch(y){case"rgb":I=n.printRGB(v);break;case"hsl":I=n.printHSL(v);break;default:I=n.printHex(v)}this._domEdit.value=I}this._domSample.style.color=s}},{key:"_ifPopup",value:function e(t,n){if(this.settings.parent&&this.settings.popup)t&&t(this.settings.popup);else n&&n()}},{key:"_toggleDOM",value:function e(t){var n=this.domElement;if(!n)return false;var i=t?"":"none",o=n.style.display!==i;if(o)n.style.display=i;return o}}]);return t}(),i=document.createElement("style");return i.textContent='.picker_wrapper.no_alpha .picker_alpha{display:none}.picker_wrapper.no_editor .picker_editor{position:absolute;z-index:-1;opacity:0}.picker_wrapper.no_cancel .picker_cancel{display:none}.layout_default.picker_wrapper{display:flex;flex-flow:row wrap;justify-content:space-between;align-items:stretch;font-size:10px;width:25em;padding:.5em}.layout_default.picker_wrapper input,.layout_default.picker_wrapper button{font-size:1rem}.layout_default.picker_wrapper>*{margin:.5em}.layout_default.picker_wrapper::before{content:"";display:block;width:100%;height:0;order:1}.layout_default .picker_slider,.layout_default .picker_selector{padding:1em}.layout_default .picker_hue{width:100%}.layout_default .picker_sl{flex:1 1 auto}.layout_default .picker_sl::before{content:"";display:block;padding-bottom:100%}.layout_default .picker_editor{order:1;width:6.5rem}.layout_default .picker_editor input{width:100%;height:100%}.layout_default .picker_sample{order:1;flex:1 1 auto}.layout_default .picker_done,.layout_default .picker_cancel{order:1}.picker_wrapper{box-sizing:border-box;background:#f2f2f2;box-shadow:0 0 0 1px silver;cursor:default;font-family:sans-serif;color:#444;pointer-events:auto}.picker_wrapper:focus{outline:none}.picker_wrapper button,.picker_wrapper input{box-sizing:border-box;border:none;box-shadow:0 0 0 1px silver;outline:none}.picker_wrapper button:focus,.picker_wrapper button:active,.picker_wrapper input:focus,.picker_wrapper input:active{box-shadow:0 0 2px 1px #1e90ff}.picker_wrapper button{padding:.4em .6em;cursor:pointer;background-color:#f5f5f5;background-image:linear-gradient(0deg, gainsboro, transparent)}.picker_wrapper button:active{background-image:linear-gradient(0deg, transparent, gainsboro)}.picker_wrapper button:hover{background-color:#fff}.picker_selector{position:absolute;z-index:1;display:block;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%);border:2px solid #fff;border-radius:100%;box-shadow:0 0 3px 1px #67b9ff;background:currentColor;cursor:pointer}.picker_slider .picker_selector{border-radius:2px}.picker_hue{position:relative;background-image:linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);box-shadow:0 0 0 1px silver}.picker_sl{position:relative;box-shadow:0 0 0 1px silver;background-image:linear-gradient(180deg, white, rgba(255, 255, 255, 0) 50%),linear-gradient(0deg, black, rgba(0, 0, 0, 0) 50%),linear-gradient(90deg, #808080, rgba(128, 128, 128, 0))}.picker_alpha,.picker_sample{position:relative;background:linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0/2em 2em,linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em/2em 2em;box-shadow:0 0 0 1px silver}.picker_alpha .picker_selector,.picker_sample .picker_selector{background:none}.picker_editor input{font-family:monospace;padding:.2em .4em}.picker_sample::before{content:"";position:absolute;display:block;width:100%;height:100%;background:currentColor}.picker_arrow{position:absolute;z-index:-1}.picker_wrapper.popup{position:absolute;z-index:2;margin:1.5em}.picker_wrapper.popup,.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{background:#f2f2f2;box-shadow:0 0 10px 1px rgba(0,0,0,.4)}.picker_wrapper.popup .picker_arrow{width:3em;height:3em;margin:0}.picker_wrapper.popup .picker_arrow::before,.picker_wrapper.popup .picker_arrow::after{content:"";display:block;position:absolute;top:0;left:0;z-index:-99}.picker_wrapper.popup .picker_arrow::before{width:100%;height:100%;-webkit-transform:skew(45deg);transform:skew(45deg);-webkit-transform-origin:0 100%;transform-origin:0 100%}.picker_wrapper.popup .picker_arrow::after{width:150%;height:150%;box-shadow:none}.popup.popup_top{bottom:100%;left:0}.popup.popup_top .picker_arrow{bottom:0;left:0;-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.popup.popup_bottom{top:100%;left:0}.popup.popup_bottom .picker_arrow{top:0;left:0;-webkit-transform:rotate(90deg) scale(1, -1);transform:rotate(90deg) scale(1, -1)}.popup.popup_left{top:0;right:100%}.popup.popup_left .picker_arrow{top:0;right:0;-webkit-transform:scale(-1, 1);transform:scale(-1, 1)}.popup.popup_right{top:0;left:100%}.popup.popup_right .picker_arrow{top:0;left:0}',document.documentElement.firstElementChild.appendChild(i),t.StyleElement=i,t}()},9857:function(o,e,t){t.d(e,{m:function(){return f}});class b extends Error{constructor(e,t){super(e+" at position "+t),this.position=t}}let A=92,h=47,d=42,u=123,w=125,S=91,x=93,k=40,T=41,n=32,E=10,R=9,$=13,_=8,J=12,L=34,N=43,M=45,i=39,B=48,W=57,P=44,H=46,U=58,Q=59,q=65,ee=97,te=69,ne=101,ie=70,oe=102,re=160,se=8192,ae=8202,le=8239,ce=8287,he=12288,r=8220,s=8221,a=8216,l=8217,c=96,g=180;function G(e){return e>=B&&e<=W}function F(e){return p.test(e)}let p=/^[,:[\]/{}()\n+]$/;function O(e){return m.test(e)||e&&Z(e.charCodeAt(0))}let m=/^[[{\w-]$/;function V(e){return e===n||e===E||e===R||e===$}function Z(e){return D(e)||j(e)}function D(e){return e===L||e===r||e===s}function K(e){return e===L}function j(e){return e===i||e===a||e===l||e===c||e===g}function z(e){return e===i}function X(e,t,n){n=2=g.length)return m;throw new b("Unexpected character "+JSON.stringify(g[p]),p);function r(){f();var e=function(){if(g.charCodeAt(p)!==u)return!1;{m+="{",p++,f(),C(P)&&f();let t=!0;for(;p=g.length,o=(n||(O(g[p])||i?m=Y(m,":"):c()),r());o||(n||i?m+="null":c())}return g.charCodeAt(p)===w?(m+="}",p++):m=Y(m,"}"),!0}}()||function(){if(g.charCodeAt(p)!==S)return!1;{m+="[",p++,f(),C(P)&&f();let e=!0;for(;pe)return t=g.slice(e,p),n=/^0\d/.test(t),m+=n?'"'.concat(t,'"'):t,!0}else p=e;return!1}()||n("true","true")||n("false","false")||n("null","null")||n("True","true")||n("False","false")||n("None","null")||l();return f(),e}function f(){p;let e=t();for(;e=(e=function(){if(g.charCodeAt(p)===h&&g.charCodeAt(p+1)===d){for(;p=se&&n<=ae||n===le||n===ce||n===he;)e+=t?g[p]:" ",p++;return 0=g.length)return c=I(p-1),!o&&F(g.charAt(c))?(p=a,m=m.substring(0,l),y(!0)):(t=Y(t,'"'),m+=t,!0);if(s(g.charCodeAt(p))){var c=p,h=t.length;if(t+='"',p++,m+=t,f(),o||p>=g.length||F(g.charAt(p))||Z(g.charCodeAt(p))||G(g.charCodeAt(p)))return v(),!0;if(F(g.charAt(I(c-1))))return p=a,m=m.substring(0,l),y(!0);m=m.substring(0,l),p=c+1,t=t.substring(0,h)+"\\"+t.substring(h)}else{if(o&&F(g[p]))return t=Y(t,'"'),m+=t,v(),!0;if(g.charCodeAt(p)===A){h=g.charAt(p+1);if(void 0!==ue[h])t+=g.slice(p,p+2),p+=2;else if("u"===h){let e=2;for(;e<6&&((i=g.charCodeAt(p+e))>=B&&i<=W||i>=q&&i<=ie||i>=ee&&i<=oe);)e++;if(6===e)t+=g.slice(p,p+6),p+=6;else{if(!(p+e>=g.length))throw d=void 0,d=g.slice(p,p+6),new b('Invalid unicode character "'.concat(d,'"'),p);p=g.length}}else t+=h,p+=2}else{var d=g.charAt(p),u=g.charCodeAt(p);if(u===L&&g.charCodeAt(p-1)!==A)t+="\\"+d;else if((n=u)===E||n===$||n===R||n===_||n===J)t+=de[d];else{if(!(32<=(n=u)&&n<=1114111))throw u=void 0,u=d,new b("Invalid character "+JSON.stringify(u),p);t+=d}p++}}r&&C(A)}}return!1}function v(){let e=!1;for(f();g.charCodeAt(p)===N;){e=!0,p++,f();var t=(m=X(m,'"',!0)).length,n=y();m=n?(n=m,t=t,i=1,n.substring(0,t)+n.substring(t+i)):Y(m,'"')}var i;e}function n(e,t){return g.slice(p,p+e.length)===e&&(m+=t,p+=e.length,!0)}function l(){for(var e,t=p;pt){if(g.charCodeAt(p)===k&&/^\w+$/.test(g.slice(t,p).trim()))p++,r(),g.charCodeAt(p)===T&&(p++,g.charCodeAt(p)===Q)&&p++;else{for(;V(g.charCodeAt(p-1))&&0=g.length||F(g[p])||V(g.charCodeAt(p))}function o(e){m+=g.slice(e,p)+"0"}function c(){throw new b("Colon expected",p)}}},3420:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON Schema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},5207:function(e){e.exports=JSON.parse('{"id":"http://json-schema.org/draft-04/schema#","$schema":"http://json-schema.org/draft-04/schema#","description":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"positiveInteger":{"type":"integer","minimum":0},"positiveIntegerDefault0":{"allOf":[{"$ref":"#/definitions/positiveInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"minItems":1,"uniqueItems":true}},"type":"object","properties":{"id":{"type":"string"},"$schema":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"multipleOf":{"type":"number","minimum":0,"exclusiveMinimum":true},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"boolean","default":false},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"boolean","default":false},"maxLength":{"$ref":"#/definitions/positiveInteger"},"minLength":{"$ref":"#/definitions/positiveIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/positiveInteger"},"minItems":{"$ref":"#/definitions/positiveIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"maxProperties":{"$ref":"#/definitions/positiveInteger"},"minProperties":{"$ref":"#/definitions/positiveIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"$ref":"#"}],"default":{}},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"dependencies":{"exclusiveMaximum":["maximum"],"exclusiveMinimum":["minimum"]},"default":{}}')},6801:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-06/schema#","$id":"http://json-schema.org/draft-06/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"title":{"type":"string"},"description":{"type":"string"},"default":{},"examples":{"type":"array","items":{}},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":{}},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":{},"enum":{"type":"array","minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":{}}')},8198:function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')}},o={},i.amdD=function(){throw new Error("define cannot be used indirect")},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},i(1346);function i(e){var t=o[e];return void 0!==t||(t=o[e]={id:e,loaded:!1,exports:{}},n[e].call(t.exports,t,t.exports,i),t.loaded=!0),t.exports}var n,o}); //# sourceMappingURL=jsoneditor.map