!function(e,t){"object"==typeofexports&&"object"==typeofmodule?module.exports=t():"function"==typeofdefine&&define.amd?define(t):"object"==typeofexports?exports.JSONEditor=t():e.JSONEditor=t()}(this,function(){returnfunction(e){functiont(n){if(i[n])returni[n].exports;varr=i[n]={exports:{},id:n,loaded:!1};returne[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}vari={};returnt.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){functionn(e,t,i){if(!(thisinstanceofn))thrownewError('JSONEditor constructor called without "new".');varr=l.getInternetExplorerVersion();if(-1!=r&&9>r)thrownewError("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");if(t&&(t.error&&(console.warn('Option "error" has been renamed to "onError"'),t.onError=t.error,deletet.error),t.change&&(console.warn('Option "change" has been renamed to "onChange"'),t.onChange=t.change,deletet.change),t.editable&&(console.warn('Option "editable" has been renamed to "onEditable"'),t.onEditable=t.editable,deletet.editable),t)){varo=["ace","theme","ajv","schema","onChange","onEditable","onError","onModeChange","escapeUnicode","history","search","mode","modes","name","indentation"];Object.keys(t).forEach(function(e){-1===o.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,i)}varr;try{r=i(4)}catch(o){}vars=i(1),a=i(2),l=i(3);n.modes={},n.prototype.DEBOUNCE_INTERVAL=150,n.prototype._create=function(e,t,i){this.container=e,this.options=t||{},this.json=i||{};varn=this.options.mode||"tree";this.setMode(n)},n.prototype._delete=function(){},n.prototype.set=function(e){this.json=e},n.prototype.get=function(){returnthis.json},n.prototype.setText=function(e){this.json=l.parse(e)},n.prototype.getText=function(){returnJSON.stringify(this.json)},n.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},n.prototype.getName=function(){returnthis.options&&this.options.name},n.prototype.setMode=function(e){vart,i,r=this.container,o=l.extend({},this.options),s=o.mode;o.mode=e;vara=n.modes[e];if(!a)thrownewError('Unknown mode "'+o.mode+'"');try{varc="text"==a.data;if(i=this.getName(),t=this[c?"getText":"get"](),this._delete(),l.clear(this),l.extend(this,a.mixin),this.create(r,o),this.setName(i),this[c?"setText":"set"](t),"function"==typeofa.load)try{a.load.call(this)}catch(h){console.error(h)}if("function"==typeofo.onModeChange&&e!==s)try{o.onModeChange(e,s)}catch(h){console.error(h)}}catch(h){this._onError(h)}},n.prototype.getMode=function(){returnthis.options.mode},n.prototype._onError=function(e){if(!this.options||"function"!=typeofthis.options.onError)throwe;this.options.onError(e)},n.prototype.setSchema=function(e){if(e){vart;try{t=this.options.ajv||r({allErrors:!0,verbose:!0})}catch(i){console.warn("Failed to create an instance of Ajv, JSON Schema validation is not available. Please use a JSONEditor bundle including Ajv, or pass an instance of Ajv as via the configuration option `ajv`.")}t&&(this.validateSchema=t.compile(e),this.options.schema=e,this.validate())}elsethis.validateSchema=null,this.options.schema=null,this.validate()},n.prototype.validate=function(){},n.registerMode=function(e){vart,i;if(l.isArray(e))for(t=0;t<e.length;t++)n.registerMode(e[t]);else{if(!("mode"ine))thrownewError('Property "mode" missing');if(!("mixin"ine))thrownewError('Property "mixin" missing');if(!("data"ine))thrownewError('Property "data" missing');varr=e.mode;if(rinn.modes)thrownewError('Mode "'+r+'" already registered');if("function"!=typeofe.mixin.create)thrownewError('Required function "create" missing on mixin');varo=["setMode","registerMode","modes"];for(t=0;t<o.length;t++)if(i=o[t],iine.mixin)thrownewError('Reserved property "'+i+'" not allowed in mixin');n.modes[r]=e}},n.registerMode(s),n.registerMode(a),e.exports=n},function(e,t,i){varn=i(5),r=i(6),o=i(7),s=i(8),a=i(9),l=i(10),c=i(3),h={};h.create=function(e,t){if(!e)thrownewError("No container element provided.");this.container=e,this.dom={}
p=decodeURIComponent(u),n(s,f)?r(s[f])?s[f].push(p):s[f]=[s[f],p]:s[f]=p}returns};varr=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},{}],3:[function(e,t,i){"use strict";functionn(e,t){if(e.map)returne.map(t);for(vari=[],n=0;n<e.length;n++)i.push(t(e[n],n));returni}varr=function(e){switch(typeofe){case"string":returne;case"boolean":returne?"true":"false";case"number":returnisFinite(e)?e:"";default:return""}};t.exports=function(e,t,i,a){returnt=t||"&",i=i||"=",null===e&&(e=void0),"object"==typeofe?n(s(e),function(s){vara=encodeURIComponent(r(s))+i;returno(e[s])?n(e[s],function(e){returna+encodeURIComponent(r(e))}).join(t):a+encodeURIComponent(r(e[s]))}).join(t):a?encodeURIComponent(r(a))+i+encodeURIComponent(r(e)):""};varo=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.keys||function(e){vart=[];for(variine)Object.prototype.hasOwnProperty.call(e,i)&&t.push(i);returnt}},{}],4:[function(e,t,i){"use strict";i.decode=i.parse=e("./decode"),i.encode=i.stringify=e("./encode")},{"./decode":2,"./encode":3}],5:[function(e,t,i){"use strict";functionn(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}functionr(e,t,i){if(e&&c.isObject(e)&&einstanceofn)returne;varr=newn;returnr.parse(e,t,i),r}functiono(e){returnc.isString(e)&&(e=r(e)),einstanceofn?e.format():n.prototype.format.call(e)}functions(e,t){returnr(e,!1,!0).resolve(t)}functiona(e,t){returne?r(e,!1,!0).resolveObject(t):t}varl=e("punycode"),c=e("./util");i.parse=r,i.resolve=s,i.resolveObject=a,i.format=o,i.Url=n;varh=/^([a-z0-9.+-]+:)/i,d=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["<",">",'"',"`"," ","\r","\n"," "],p=["{","}","|","\\","^","`"].concat(f),m=["'"].concat(p),g=["%","/","?",";","#"].concat(m),v=["/","?","#"],w=255,A=/^[+a-z0-9A-Z_-]{0,63}$/,y=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,C={javascript:!0,"javascript:":!0},E={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},F=e("querystring");n.prototype.parse=function(e,t,i){if(!c.isString(e))thrownewTypeError("Parameter 'url' must be a string, not "+typeofe);varn=e.indexOf("?"),r=-1!==n&&n<e.indexOf("#")?"?":"#",o=e.split(r),s=/\\/g;o[0]=o[0].replace(s,"/"),e=o.join(r);vara=e;if(a=a.trim(),!i&&1===e.split("#").length){vard=u.exec(a);if(d)returnthis.path=a,this.href=a,this.pathname=d[1],d[2]?(this.search=d[2],t?this.query=F.parse(this.search.substr(1)):this.query=this.search.substr(1)):t&&(this.search="",this.query={}),this}varf=h.exec(a);if(f){f=f[0];varp=f.toLowerCase();this.protocol=p,a=a.substr(f.length)}if(i||f||a.match(/^\/\/[^@\/]+@[^@\/]+/)){varx="//"===a.substr(0,2);!x||f&&E[f]||(a=a.substr(2),this.slashes=!0)}if(!E[f]&&(x||f&&!b[f])){for(varS=-1,$=0;$<v.length;$++){varD=a.indexOf(v[$]);-1!==D&&(-1===S||S>D)&&(S=D)}vark,B;B=-1===S?a.lastIndexOf("@"):a.lastIndexOf("@",S),-1!==B&&(k=a.slice(0,B),a=a.slice(B+1),this.auth=decodeURIComponent(k)),S=-1;for(var$=0;$<g.length;$++){varD=a.indexOf(g[$]);-1!==D&&(-1===S||S>D)&&(S=D)}-1===S&&(S=a.length),this.host=a.slice(0,S),a=a.slice(S),this.parseHost(),this.hostname=this.hostname||"";var_="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!_)for(varL=this.hostname.split(/\./),$=0,R=L.length;R>$;$++){varT=L[$];if(T&&!T.match(A)){for(varP="",M=0,O=T.length;O>M;M++)P+=T.charCodeAt(M)>127?"x":T[M];if(!P.match(A)){varj=L.slice(0,$),I=L.slice($+1),N=T.match(y);N&&(j.push(N[1]),I.unshift(N[2])),I.length&&(a="/"+I.join(".")+a),this.hostname=j.join(".");break}}}this.hostname.length>w?this.hostname="":this.hostname=this.hostname.toLowerCase(),_||(this.hostname=l.toASCII(this.hostname));varW=this.port?":"+this.port:"",H=this.hostname||"";this.host=H+W,this.href+=this.host,_&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==a[0]&&(a="/"+a))}if(!C[p])for(var$=0,R=m
r&&(k.opts.useDefaults=!1));vars;try{s=o.call(k,e.schema,t,e.localRefs)}finally{e.compiling=!1,n&&(k.opts.removeAdditional=n),r&&(k.opts.useDefaults=r)}returne.validate=s,e.refs=s.refs,e.refVal=s.refVal,e.root=s.root,s}functionF(e,t){if(e=e||k.errors,!e)return"No errors";t=t||{};for(vari=t.separator||", ",n=t.dataVar||"data",r="",o=0;o<e.length;o++){vars=e[o];s&&(r+=n+s.dataPath+" "+s.message+i)}returnr.slice(0,-i.length)}functionx(e,t){"string"==typeoft&&(t=newRegExp(t)),k._formats[e]=t}functionS(){if(k.opts.meta!==!1){vart=e("./refs/json-schema-draft-04.json");v(t,f,!0),k._refs["http://json-schema.org/schema"]=f}vari=k.opts.schemas;if(i)if(Array.isArray(i))g(i);elsefor(varnini)g(i[n],n)}function$(){for(vareink.opts.formats){vart=k.opts.formats[e];x(e,t)}}functionD(e){if(k._schemas[e]||k._refs[e])thrownewError('schema with key or id "'+e+'" already exists')}if(!(thisinstanceofr))returnnewr(t);vark=this;this.opts=t||{},this._schemas={},this._refs={},this._formats=h(this.opts.format),this._cache=this.opts.cache||newa,this._loadingSchemas={},this.RULES=d(),this.validate=i,this.compile=m,this.addSchema=g,this.addMetaSchema=v,this.validateSchema=w,this.getSchema=A,this.removeSchema=C,this.addFormat=x,this.errorsText=F,this._addSchema=E,this._compile=b,S(),this.opts.formats&&$(),"property"==this.opts.errorDataPath&&(this.opts._errorDataPathProperty=!0),this.opts.v5&&u.enable(this),this.opts.loopRequired=this.opts.loopRequired||1/0}varo=e("./compile"),s=e("./compile/resolve"),a=e("./cache"),l=e("./compile/schema_obj"),c=e("json-stable-stringify"),h=e("./compile/formats"),d=e("./compile/rules"),u=e("./v5");t.exports=r,r.prototype.compileAsync=e("./async"),r.prototype.addKeyword=e("./keyword");varf="http://json-schema.org/draft-04/schema",p=/^(?:(?:[a-z][a-z0-9+-.]*:)?\/\/)?[^\s]*$/i},{"./async":7,"./cache":8,"./compile":12,"./compile/formats":11,"./compile/resolve":13,"./compile/rules":14,"./compile/schema_obj":15,"./keyword":39,"./refs/json-schema-draft-04.json":40,"./v5":42,"json-stable-stringify":43}]},{},[])("ajv")})}).call(exports,function(){returnthis}())},function(e,t,i){functionn(){this.locked=!1}n.prototype.highlight=function(e){this.locked||(this.node!=e&&(this.node&&this.node.setHighlight(!1),this.node=e,this.node.setHighlight(!0)),this._cancelUnhighlight())},n.prototype.unhighlight=function(){if(!this.locked){vare=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){e.node.setHighlight(!1),e.node=void0,e.unhighlightTimer=void0},0))}},n.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void0)},n.prototype.lock=function(){this.locked=!0},n.prototype.unlock=function(){this.locked=!1},e.exports=n},function(e,t,i){functionn(e){this.editor=e,this.clear(),this.actions={editField:{undo:function(e){e.node.updateField(e.oldValue)},redo:function(e){e.node.updateField(e.newValue)}},editValue:{undo:function(e){e.node.updateValue(e.oldValue)},redo:function(e){e.node.updateValue(e.newValue)}},changeType:{undo:function(e){e.node.changeType(e.oldType)},redo:function(e){e.node.changeType(e.newType)}},appendNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.appendChild(t)})}},insertBeforeNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){e.nodes.forEach(function(t){e.parent.insertBefore(t,e.beforeNode)})}},insertAfterNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){vart=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(e.node,t),t=i})}},removeNodes:{undo:function(e){vart=e.parent,i=t.childs[e.index]||t.append;e.nodes.forEach(function(e){t.insertBefore(e,i)})},redo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})}},duplicateNodes:{undo:function(e){e.nodes.forEach(function(t){e.parent.removeChild(t)})},redo:function(e){vart=e.afterNode;e.nodes.forEach(function(i){e.parent.insertAfter(i,t),t=i
e[0]&&e[0].dom.menu.focus();varc={nodes:e,oldSelection:r.drag.oldSelection,newSelection:r.getSelection(),oldBeforeNode:r.drag.oldBeforeNode,newBeforeNode:l};c.oldBeforeNode!=c.newBeforeNode&&r._onAction("moveNodes",c),document.body.style.cursor=r.drag.oldCursor,r.highlighter.unlock(),e.forEach(function(e){t.target!==e.dom.drag&&t.target!==e.dom.menu&&r.highlighter.unhighlight()}),deleter.drag,r.mousemove&&(s.removeEventListener(window,"mousemove",r.mousemove),deleter.mousemove),r.mouseup&&(s.removeEventListener(window,"mouseup",r.mouseup),deleter.mouseup),r.stopAutoScroll(),t.preventDefault()}},n.prototype._isChildOf=function(e){for(vart=this.parent;t;){if(t==e)return!0;t=t.parent}return!1},n.prototype._createDomField=function(){returndocument.createElement("div")},n.prototype.setHighlight=function(e){this.dom.tr&&(e?s.addClassName(this.dom.tr,"jsoneditor-highlight"):s.removeClassName(this.dom.tr,"jsoneditor-highlight"),this.append&&this.append.setHighlight(e),this.childs&&this.childs.forEach(function(t){t.setHighlight(e)}))},n.prototype.setSelected=function(e,t){this.selected=e,this.dom.tr&&(e?s.addClassName(this.dom.tr,"jsoneditor-selected"):s.removeClassName(this.dom.tr,"jsoneditor-selected"),t?s.addClassName(this.dom.tr,"jsoneditor-first"):s.removeClassName(this.dom.tr,"jsoneditor-first"),this.append&&this.append.setSelected(e),this.childs&&this.childs.forEach(function(t){t.setSelected(e)}))},n.prototype.updateValue=function(e){this.value=e,this.updateDom()},n.prototype.updateField=function(e){this.field=e,this.updateDom()},n.prototype.updateDom=function(e){vart=this.dom.tree;t&&(t.style.marginLeft=24*this.getLevel()+"px");vari=this.dom.field;if(i){this.fieldEditable?(i.contentEditable=this.editable.field,i.spellcheck=!1,i.className="jsoneditor-field"):i.className="jsoneditor-readonly";varn;n=void0!=this.index?this.index:void0!=this.field?this.field:this._hasChilds()?this.type:"",i.innerHTML=this._escapeHTML(n)}varr=this.dom.value;if(r){varo=this.childs?this.childs.length:0;"array"==this.type?(r.innerHTML="["+o+"]",s.addClassName(this.dom.tr,"jsoneditor-expandable")):"object"==this.type?(r.innerHTML="{"+o+"}",s.addClassName(this.dom.tr,"jsoneditor-expandable")):(r.innerHTML=this._escapeHTML(this.value),s.removeClassName(this.dom.tr,"jsoneditor-expandable"))}this._updateDomField(),this._updateDomValue(),e&&e.updateIndexes===!0&&this._updateDomIndexes(),e&&e.recurse===!0&&this.childs&&this.childs.forEach(function(t){t.updateDom(e)}),this.append&&this.append.updateDom()},n.prototype._updateDomIndexes=function(){vare=this.dom.value,t=this.childs;e&&t&&("array"==this.type?t.forEach(function(e,t){e.index=t;vari=e.dom.field;i&&(i.innerHTML=t)}):"object"==this.type&&t.forEach(function(e){void0!=e.index&&(deletee.index,void0==e.field&&(e.field=""))}))},n.prototype._createDomValue=function(){vare;return"array"==this.type?(e=document.createElement("div"),e.innerHTML="[...]"):"object"==this.type?(e=document.createElement("div"),e.innerHTML="{...}"):!this.editable.value&&s.isUrl(this.value)?(e=document.createElement("a"),e.href=this.value,e.target="_blank",e.innerHTML=this._escapeHTML(this.value)):(e=document.createElement("div"),e.contentEditable=this.editable.value,e.spellcheck=!1,e.innerHTML=this._escapeHTML(this.value)),e},n.prototype._createDomExpandButton=function(){vare=document.createElement("button");returnthis._hasChilds()?(e.className=this.expanded?"jsoneditor-expanded":"jsoneditor-collapsed",e.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(e.className="jsoneditor-invisible",e.title=""),e},n.prototype._createDomTree=function(){vare=this.dom,t=document.createElement("table"),i=document.createElement("tbody");t.style.borderCollapse="collapse",t.className="jsoneditor-values",t.appendChild(i);varn=document.createElement("tr");i.appendChild(n);varr=document.createElement("td");r.className="jsoneditor-tree",n.appendChild(r),e.expand=this._createDomExpandButton(),r.appendChild(e.expand),e.tdExpand=r;varo=document.createElement("td");o.cla
varn=e("../lib/dom");n.importCssString(t.cssText,t.cssClass)})},function(e,t,i){!function(){functione(e){vart=i;e&&(i[e]||(i[e]={}),t=i[e]),t.define&&t.define.packaged||(n.original=t.define,t.define=n,t.define.packaged=!0),t.acequire&&t.acequire.packaged||(o.original=t.acequire,t.acequire=o,t.acequire.packaged=!0)}vart="ace",i=function(){returnthis}();if(i||"undefined"==typeofwindow||(i=window),t||"undefined"==typeofacequirejs){varn=function(e,t,i){return"string"!=typeofe?void(n.original?n.original.apply(this,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(i=t),void(n.modules[e]||(n.payloads[e]=i,n.modules[e]=null)))};n.modules={},n.payloads={};varr=function(e,t,i){if("string"==typeoft){varn=a(e,t);if(void0!=n)returni&&i(),n}elseif("[object Array]"===Object.prototype.toString.call(t)){for(varr=[],s=0,l=t.length;l>s;++s){varc=a(e,t[s]);if(void0==c&&o.original)return;r.push(c)}returni&&i.apply(null,r)||!0}},o=function(e,t){vari=r("",e,t);returnvoid0==i&&o.original?o.original.apply(this,arguments):i},s=function(e,t){if(-1!==t.indexOf("!")){vari=t.split("!");returns(e,i[0])+"!"+s(e,i[1])}if("."==t.charAt(0)){varn=e.split("/").slice(0,-1).join("/");for(t=n+"/"+t;-1!==t.indexOf(".")&&r!=t;){varr=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}returnt},a=function(e,t){t=s(e,t);vari=n.modules[t];if(!i){if(i=n.payloads[t],"function"==typeofi){varo={},a={id:t,uri:"",exports:o,packaged:!0},l=function(e,i){returnr(t,e,i)},c=i(l,o,a);o=c||a.exports,n.modules[t]=o,deleten.payloads[t]}i=n.modules[t]=o||i}returni};e(t)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(e,t,i){"use strict";functionn(e){return(e.global?"g":"")+(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.extended?"x":"")+(e.sticky?"y":"")}functionr(e,t,i){if(Array.prototype.indexOf)returne.indexOf(t,i);for(varn=i||0;n<e.length;n++)if(e[n]===t)returnn;return-1}varo={exec:RegExp.prototype.exec,test:RegExp.prototype.test,match:String.prototype.match,replace:String.prototype.replace,split:String.prototype.split},s=void0===o.exec.call(/()??/,"")[1],a=function(){vare=/^/g;returno.test.call(e,""),!e.lastIndex}();a&&s||(RegExp.prototype.exec=function(e){vart,i,l=o.exec.apply(this,arguments);if("string"==typeofe&&l){if(!s&&l.length>1&&r(l,"")>-1&&(i=RegExp(this.source,o.replace.call(n(this),"g","")),o.replace.call(e.slice(l.index),i,function(){for(vare=1;e<arguments.length-2;e++)void0===arguments[e]&&(l[e]=void0)})),this._xregexp&&this._xregexp.captureNames)for(varc=1;c<l.length;c++)t=this._xregexp.captureNames[c-1],t&&(l[t]=l[c]);!a&&this.global&&!l[0].length&&this.lastIndex>l.index&&this.lastIndex--}returnl},a||(RegExp.prototype.test=function(e){vart=o.exec.call(this,e);returnt&&this.global&&!t[0].length&&this.lastIndex>t.index&&this.lastIndex--,!!t}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(e,t,i){functionn(){}functionr(e){try{returnObject.defineProperty(e,"sentinel",{}),"sentinel"ine}catch(t){}}functiono(e){returne=+e,e!==e?e=0:0!==e&&e!==1/0&&e!==-(1/0)&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}Function.prototype.bind||(Function.prototype.bind=function(e){vart=this;if("function"!=typeoft)thrownewTypeError("Function.prototype.bind called on incompatible "+t);vari=p.call(arguments,1),r=function(){if(thisinstanceofr){varn=t.apply(this,i.concat(p.call(arguments)));returnObject(n)===n?n:this}returnt.apply(e,i.concat(p.call(arguments)))};returnt.prototype&&(n.prototype=t.prototype,r.prototype=newn,n.prototype=null),r});vars,a,l,c,h,d=Function.prototype.call,u=Array.prototype,f=Object.prototype,p=u.slice,m=d.bind(f.toString),g=d.bind(f.hasOwnProperty);if((h=g(f,"__defineGetter__"))&&(s=d.bind(f.__defineGetter__),a=d.bind(f.__defineSetter__),l=d.bind(f.__lookupGetter__),c=d.bind(f.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){functione(e){vart=newArray(e+2);returnt[0]=t[1]=0,t}vart,i=[];returni.splice.apply(i,e(20)),i.splice.apply(i,e(26)),t=i.length,i.splice(5,0,"
}),this.range.compareEnd(e.start.row,e.start.column)>0?(this.end.row=e.end.row,this.end.column=e.end.column):this.range.compareStart(e.end.row,e.end.column)<0&&(this.start.row=e.start.row,this.start.column=e.start.column)}elseif(e.start.row==this.end.row)this.folds.push(e),this.end.row=e.end.row,this.end.column=e.end.column;else{if(e.end.row!=this.start.row)thrownewError("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(e),this.start.row=e.start.row,this.start.column=e.start.column}e.foldLine=this},this.containsRow=function(e){returne>=this.start.row&&e<=this.end.row},this.walk=function(e,t,i){varn,r,o,s=0,a=this.folds,l=!0;null==t&&(t=this.end.row,i=this.end.column);for(varc=0;c<a.length;c++){if(n=a[c],r=n.range.compareStart(t,i),-1==r)returnvoide(null,t,i,s,l);if(o=e(null,n.start.row,n.start.column,s,l),o=!o&&e(n.placeholder,n.start.row,n.start.column,s),o||0===r)return;l=!n.sameRow,s=n.end.column}e(null,t,i,s,l)},this.getNextFoldTo=function(e,t){for(vari,n,r=0;r<this.folds.length;r++){if(i=this.folds[r],n=i.range.compareEnd(e,t),-1==n)return{fold:i,kind:"after"};if(0===n)return{fold:i,kind:"inside"}}returnnull},this.addRemoveChars=function(e,t,i){varn,r,o=this.getNextFoldTo(e,t);if(o)if(n=o.fold,"inside"==o.kind&&n.start.column!=t&&n.start.row!=e)window.console&&window.console.log(e,t,n);elseif(n.start.row==e){r=this.folds;vars=r.indexOf(n);for(0===s&&(this.start.column+=i),s;s<r.length;s++){if(n=r[s],n.start.column+=i,!n.sameRow)return;n.end.column+=i}this.end.column+=i}},this.split=function(e,t){vari=this.getNextFoldTo(e,t);if(!i||"inside"==i.kind)returnnull;varr=i.fold,o=this.folds,s=this.foldData,a=o.indexOf(r),l=o[a-1];this.end.row=l.end.row,this.end.column=l.end.column,o=o.splice(a,o.length-a);varc=newn(s,o);returns.splice(s.indexOf(this)+1,0,c),c},this.merge=function(e){for(vart=e.folds,i=0;i<t.length;i++)this.addFold(t[i]);varn=this.foldData;n.splice(n.indexOf(e),1)},this.toString=function(){vare=[this.range.toString()+": ["];returnthis.folds.forEach(function(t){e.push(" "+t.toString())}),e.push("]"),e.join("\n")},this.idxToPosition=function(e){for(vart=0,i=0;i<this.folds.length;i++){varn=this.folds[i];if(e-=n.start.column-t,0>e)return{row:n.start.row,column:n.start.column+e};if(e-=n.placeholder.length,0>e)returnn.start;t=n.end.column}return{row:this.end.row,column:this.end.column+e}}}).call(n.prototype),t.FoldLine=n}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(e,t,i){"use strict";varn=e("./range").Range,r=n.comparePoints,o=function(){this.ranges=[]};(function(){this.comparePoints=r,this.pointIndex=function(e,t,i){for(varn=this.ranges,o=i||0;o<n.length;o++){vars=n[o],a=r(e,s.end);if(!(a>0)){varl=r(e,s.start);return0===a?t&&0!==l?-o-2:o:l>0||0===l&&!t?o:-o-1}}return-o-1},this.add=function(e){vart=!e.isEmpty(),i=this.pointIndex(e.start,t);0>i&&(i=-i-1);varn=this.pointIndex(e.end,t,i);return0>n?n=-n-1:n++,this.ranges.splice(i,n-i,e)},this.addList=function(e){for(vart=[],i=e.length;i--;)t.push.call(t,this.add(e[i]));returnt},this.substractPoint=function(e){vart=this.pointIndex(e);returnt>=0?this.ranges.splice(t,1):void0},this.merge=function(){vare=[],t=this.ranges;t=t.sort(function(e,t){returnr(e.start,t.start)});for(vari,n=t[0],o=1;o<t.length;o++){i=n,n=t[o];vars=r(i.end,n.start);0>s||(0!=s||i.isEmpty()||n.isEmpty())&&(r(i.end,n.end)<0&&(i.end.row=n.end.row,i.end.column=n.end.column),t.splice(o,1),e.push(n),n=i,o--)}returnthis.ranges=t,e},this.contains=function(e,t){returnthis.pointIndex({row:e,column:t})>=0},this.containsPoint=function(e){returnthis.pointIndex(e)>=0},this.rangeAtPoint=function(e){vart=this.pointIndex(e);returnt>=0?this.ranges[t]:void0},this.clipRows=function(e,t){vari=this.ranges;if(i[0].start.row>t||i[i.length-1].start.row<e)return[];varn=this.pointIndex({row:e,column:0});0>n&&(n=-n-1);varr=this.pointIndex({row:t,column:0},n);0>r&&(r=-r-1);for(varo=[],s=n;r>s;s++)o.push(i[s]);returno},this.removeAll=function(){returnthis.ranges.splice(0,this.ranges.length)},this.attac
},function(e,t,i){e.exports=function(){thrownewError("define cannot be used indirect")}},function(e,t,i){(function(t){functioni(){if(t.Blob)try{returnnewBlob(["asdf"],{type:"text/plain"}),Blob}catch(e){}vari=t.WebKitBlobBuilder||t.MozBlobBuilder||t.MSBlobBuilder;returnfunction(e,t){varn=newi,r=t.endings,o=t.type;if(r)for(vars=0,a=e.length;a>s;++s)n.append(e[s],r);elsefor(vars=0,a=e.length;a>s;++s)n.append(e[s]);returno?n.getBlob(o):n.getBlob()}}e.exports=i()}).call(t,function(){returnthis}())}])});