!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(i){if(n[i])returnn[i].exports;varo=n[i]={exports:{},id:i,loaded:!1};returne[i].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}varn={};returnt.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";functioni(e,t,n){if(!(thisinstanceofi))thrownewError('JSONEditor constructor called without "new".');varo=a.getInternetExplorerVersion();if(-1!=o&&o<9)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)){varr=["ajv","schema","schemaRefs","templates","ace","theme","autocomplete","onChange","onEditable","onError","onModeChange","onSelectionChange","onTextSelectionChange","escapeUnicode","history","search","mode","modes","name","indentation","sortObjectKeys","navigationBar","statusBar","languages","language"];Object.keys(t).forEach(function(e){-1===r.indexOf(e)&&console.warn('Unknown option "'+e+'". This option will be ignored')})}arguments.length&&this._create(e,t,n)}varo;try{o=n(!function(){vare=newError('Cannot find module "ajv"');throwe.code="MODULE_NOT_FOUND",e}())}catch(e){}varr=n(1),s=n(20),a=n(4);i.modes={},i.prototype.DEBOUNCE_INTERVAL=150,i.prototype._create=function(e,t,n){this.container=e,this.options=t||{},this.json=n||{};vari=this.options.mode||this.options.modes&&this.options.modes[0]||"tree";this.setMode(i)},i.prototype.destroy=function(){},i.prototype.set=function(e){this.json=e},i.prototype.get=function(){returnthis.json},i.prototype.setText=function(e){this.json=a.parse(e)},i.prototype.getText=function(){returnJSON.stringify(this.json)},i.prototype.setName=function(e){this.options||(this.options={}),this.options.name=e},i.prototype.getName=function(){returnthis.options&&this.options.name},i.prototype.setMode=function(e){vart,n,o=this.container,r=a.extend({},this.options),s=r.mode;r.mode=e;varl=i.modes[e];if(!l)thrownewError('Unknown mode "'+r.mode+'"');try{varc="text"==l.data;if(n=this.getName(),t=this[c?"getText":"get"](),this.destroy(),a.clear(this),a.extend(this,l.mixin),this.create(o,r),this.setName(n),this[c?"setText":"set"](t),"function"==typeofl.load)try{l.load.call(this)}catch(e){console.error(e)}if("function"==typeofr.onModeChange&&e!==s)try{r.onModeChange(e,s)}catch(e){console.error(e)}}catch(e){this._onError(e)}},i.prototype.getMode=function(){returnthis.options.mode},i.prototype._onError=function(e){if(!this.options||"function"!=typeofthis.options.onError)throwe;this.options.onError(e)},i.prototype.setSchema=function(e,t){if(e){varn;try{n=this.options.ajv||o({allErrors:!0,verbose:!0})}catch(e){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`.")}if(n){if(t){for(variint)n.removeSchema(i),t[i]&&n.addSchema(t[i],i);this.options.schemaRefs=t}this.validateSchema=n.compile(e),this.options.schema=e,this.validate()}this.refresh()}elsethis.validateSchema=null,this.options.schema=null,this.options.schemaRefs=null,this.validate(),this.refresh()},i.prototype.validate=function(){},i.prototype.refresh=function(){},i.registerMode=function(e){vart,n;if(a.isArray(e))for(t=0;t<e.length;t++)i.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');varo=e.mode;if(oini.modes)thrownewError('Mode "'+o+'" already registered');if("functi
t[e.getField()]=e.getValue()}),t}returnvoid0===this.value&&this._getDomValue(),this.value},i.prototype.getLevel=function(){returnthis.parent?this.parent.getLevel()+1:0},i.prototype.getNodePath=function(){vare=this.parent?this.parent.getNodePath():[];returne.push(this),e},i.prototype.clone=function(){vare=newi(this.editor);if(e.type=this.type,e.field=this.field,e.fieldInnerText=this.fieldInnerText,e.fieldEditable=this.fieldEditable,e.value=this.value,e.valueInnerText=this.valueInnerText,e.expanded=this.expanded,e.visibleChilds=this.visibleChilds,this.childs){vart=[];this.childs.forEach(function(n){vari=n.clone();i.setParent(e),t.push(i)}),e.childs=t}elsee.childs=void0;returne},i.prototype.expand=function(e){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="jsoneditor-expanded"),this.showChilds(),!1!==e&&this.childs.forEach(function(t){t.expand(e)}))},i.prototype.collapse=function(e){this.childs&&(this.hideChilds(),!1!==e&&this.childs.forEach(function(t){t.collapse(e)}),this.dom.expand&&(this.dom.expand.className="jsoneditor-collapsed"),this.expanded=!1)},i.prototype.showChilds=function(){if(this.childs&&this.expanded){vare=this.dom.tr,t=e?e.parentNode:void0;if(t){varn=this.getAppendDom();if(!n.parentNode){vari=e.nextSibling;i?t.insertBefore(n,i):t.appendChild(n)}for(varo=Math.min(this.childs.length,this.visibleChilds),i=this._getNextTr(),r=0;r<o;r++){vars=this.childs[r];s.getDom().parentNode||t.insertBefore(s.getDom(),i),s.showChilds()}vara=this.getShowMoreDom(),i=this._getNextTr();a.parentNode||t.insertBefore(a,i),this.showMore.updateDom()}}},i.prototype._getNextTr=function(){returnthis.showMore&&this.showMore.getDom().parentNode?this.showMore.getDom():this.append&&this.append.getDom().parentNode?this.append.getDom():void0},i.prototype.hide=function(e){vart=this.dom.tr,n=t?t.parentNode:void0;n&&n.removeChild(t),this.hideChilds(e)},i.prototype.hideChilds=function(e){if(this.childs&&this.expanded){vart=this.getAppendDom();t.parentNode&&t.parentNode.removeChild(t),this.childs.forEach(function(e){e.hide()});varn=this.getShowMoreDom();n.parentNode&&n.parentNode.removeChild(n),e&&!e.resetVisibleChilds||deletethis.visibleChilds}},i.prototype.expandTo=function(){for(vare=this.parent;e;)e.expanded||e.expand(),e=e.parent},i.prototype.appendChild=function(e,t,n){if(this._hasChilds()){if(e.setParent(this),e.fieldEditable="object"==this.type,"array"==this.type&&(e.index=this.childs.length),this.childs.push(e),this.expanded&&!1!==t){vari=e.getDom(),o=this._getNextTr(),r=o?o.parentNode:void0;o&&r&&r.insertBefore(i,o),e.showChilds(),this.visibleChilds++}!1!==n&&(this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0}))}},i.prototype.moveBefore=function(e,t){if(this._hasChilds()){varn=this.dom.tr?this.dom.tr.parentNode:void0;if(n){vari=document.createElement("tr");i.style.height=n.clientHeight+"px",n.appendChild(i)}if(e.parent&&e.parent.removeChild(e),tinstanceoff)if(this.childs.length+1>this.visibleChilds){varo=this.childs[this.visibleChilds-1];this.insertBefore(e,o)}elsethis.appendChild(e);elsethis.insertBefore(e,t);n&&n.removeChild(i)}},i.prototype.moveTo=function(e,t){if(e.parent==this){this.childs.indexOf(e)<t&&t++}varn=this.childs[t]||this.append;this.moveBefore(e,n)},i.prototype.insertBefore=function(e,t){if(this._hasChilds()){if(this.visibleChilds++,t==this.append)e.setParent(this),e.fieldEditable="object"==this.type,this.childs.push(e);else{varn=this.childs.indexOf(t);if(-1==n)thrownewError("Node not found");e.setParent(this),e.fieldEditable="object"==this.type,this.childs.splice(n,0,e)}if(this.expanded){vari=e.getDom(),o=t.getDom(),r=o?o.parentNode:void0;o&&r&&r.insertBefore(i,o),e.showChilds(),this.showChilds()}this.updateDom({updateIndexes:!0}),e.updateDom({recurse:!0})}},i.prototype.insertAfter=function(e,t){if(this._hasChilds()){varn=this.childs.indexOf(t),i=this.childs[n+1];i?this.insertBefore(e,i):this.appendChild(e)}},i.prototype.search=function(e,t){Array.isArray(t)||(t=[]);varn,i=e?e.toLowerCase():void0;if(deletethis.searchField,deletethis.s