* angular-ui-ace - This directive allows you to add ACE editor elements.
* @version v0.2.3 - 2015-01-29
* @link http://angular-ui.github.com
* @license MIT
*/
"use strict";angular.module("ui.ace",[]).constant("uiAceConfig",{}).directive("uiAce",["uiAceConfig",function(a){if(angular.isUndefined(window.ace))thrownewError("ui-ace need ace to work... (o rly?)");varb=function(a,b,c){if(angular.isDefined(c.workerPath)){vard=window.ace.require("ace/config");d.set("workerPath",c.workerPath)}angular.isDefined(c.require)&&c.require.forEach(function(a){window.ace.require(a)}),angular.isDefined(c.showGutter)&&a.renderer.setShowGutter(c.showGutter),angular.isDefined(c.useWrapMode)&&b.setUseWrapMode(c.useWrapMode),angular.isDefined(c.showInvisibles)&&a.renderer.setShowInvisibles(c.showInvisibles),angular.isDefined(c.showIndentGuides)&&a.renderer.setDisplayIndentGuides(c.showIndentGuides),angular.isDefined(c.useSoftTabs)&&b.setUseSoftTabs(c.useSoftTabs),angular.isDefined(c.showPrintMargin)&&a.setShowPrintMargin(c.showPrintMargin),angular.isDefined(c.disableSearch)&&c.disableSearch&&a.commands.addCommands([{name:"unfind",bindKey:{win:"Ctrl-F",mac:"Command-F"},exec:function(){return!1},readOnly:!0}]),angular.isString(c.theme)&&a.setTheme("ace/theme/"+c.theme),angular.isString(c.mode)&&b.setMode("ace/mode/"+c.mode),angular.isDefined(c.firstLineNumber)&&(angular.isNumber(c.firstLineNumber)?b.setOption("firstLineNumber",c.firstLineNumber):angular.isFunction(c.firstLineNumber)&&b.setOption("firstLineNumber",c.firstLineNumber()));vare,f;if(angular.isDefined(c.advanced))for(einc.advanced)f={name:e,value:c.advanced[e]},a.setOption(f.name,f.value);if(angular.isDefined(c.rendererOptions))for(einc.rendererOptions)f={name:e,value:c.rendererOptions[e]},a.renderer.setOption(f.name,f.value);angular.forEach(c.callbacks,function(b){angular.isFunction(b)&&b(a)})};return{restrict:"EA",require:"?ngModel",link:function(c,d,e,f){varg,h,i=a.ace||{},j=angular.extend({},i,c.$eval(e.uiAce)),k=window.ace.edit(d[0]),l=k.getSession(),m=function(){vara=arguments[0],b=Array.prototype.slice.call(arguments,1);angular.isDefined(a)&&c.$evalAsync(function(){if(!angular.isFunction(a))thrownewError("ui-ace use a function as callback.");a(b)})},n={onChange:function(a){returnfunction(b){vard=l.getValue();!f||d===f.$viewValue||c.$$phase||c.$root.$$phase||c.$evalAsync(function(){f.$setViewValue(d)}),m(a,b,k)}},onBlur:function(a){returnfunction(){m(a,k)}}};e.$observe("readonly",function(a){k.setReadOnly(!!a||""===a)}),f&&(f.$formatters.push(function(a){if(angular.isUndefined(a)||null===a)return"";if(angular.isObject(a)||angular.isArray(a))thrownewError("ui-ace cannot use an object or an array as a model");returna}),f.$render=function(){l.setValue(f.$viewValue)});varo=function(a,d){a!==d&&(j=angular.extend({},i,c.$eval(e.uiAce)),j.callbacks=[j.onLoad],j.onLoad!==i.onLoad&&j.callbacks.unshift(i.onLoad),l.removeListener("change",g),g=n.onChange(j.onChange),l.on("change",g),k.removeListener("blur",h),h=n.onBlur(j.onBlur),k.on("blur",h),b(k,l,j))};c.$watch(e.uiAce,o,!0),o(i),d.on("$destroy",function(){k.session.$stopWorker(),k.destroy()}),c.$watch(function(){return[d[0].offsetWidth,d[0].offsetHeight]},function(){k.resize(),k.renderer.updateFull()},!0)}}}]);
"no use strict";!function(e){functiont(e,t){varn=e,r="";while(n){vari=t[n];if(typeofi=="string")returni+r;if(i)returni.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";vars=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}returne}if(typeofe.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){vare=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i.data,file:t,line:n,col:r,stack:i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){varr=n.split("!");returne.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){vari=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){vars=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}returnn},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)thrownewError("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);vars=e.require.modules[i];if(s)returns.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)returnconsole.log("unable to load "+i);varo=t(i,e.require.tlns);returno.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeoft!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeofr!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);vari=function(n){returne.require(t,n)};e.require.modules[t]={exports:{},factory:function(){vare=this,t=r.apply(this,n.map(function(t){switch(t){case"require":returni;case"exports":returne.exports;case"module":returne;default:returni(t)}}));returnt&&(e.exports=t),e}}},e.define.amd={},require.tlns={},e.initBaseUrls=function(t){for(varnint)require.tlns[n]=t[n]},e.initSender=function(){varn=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};returnfunction(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),newi};varn=e.main=null,r=e.sender=null;e.onmessage=function(t){vari=t.data;if(i.event&&r)r._signal(i.event,i.data);elseif(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])thrownewError("Unknown command:"+i.command);e[i.command].apply(e,i.args)}elseif(i.init){e.initBaseUrls(i.tlns),require("ace/lib/es5-shim"),r=e.sender=e.initSender();vars=require(i.module)[i.classname];n=e.main=news(r)}}}(this),define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(varnint)e[n]=t[n];returne},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/range",["require","exports","module"],function(e,t,n){"use strict";varr=function(e,t){returne.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){returnthis.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){returnthis.compare(e,t)==0},this.compareRange=function(e){vart,n=e.end,r=e.start;returnt=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){returnthis.compare(e.row,e.column)},this.containsRange=function(e){returnthis.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){vart=this.compareRange(e);returnt==-1||t==0||t==1},this.isEnd=function(e,t){returnthis.end.row==e&&this.end.column==t},this.isStart=function(e,t){returnthis.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeofe=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeofe=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){returnthis.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){returnthis.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){returnthis.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){returnthis.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){returnthis.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){returnthis.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)varn={row:t+1,column:0};elseif(this.end.row<e)varn={row:e,column:0};if(this.start.row>t)varr={row:t+1,column:0};elseif(this.start.row<e)varr={row:e,column:0};returni.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){varn=this.compare(e,t);if(n==0)returnthis;if(n==-1)varr={row:e,column:t};elsevars={row:e,column:t};returni.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){returnthis.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){returnthis.start.row!==this.end.row},this.clone=function(){returni.fromPoints(this.start,this.end)},this.collapseRows=function(){returnthis.end.column==0?newi(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):newi(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){vart=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);returnnewi(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){returnnewi(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){returne.row-t.row||e.column-t.column},t.Range=i}),define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";functionr(e,t){throwconsole.log("Invalid Delta:",e),"Invalid Delta: "+t}functioni(e,t){returnt.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}functions(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.linesinstanceofArray||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");varn=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");vars=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");varo=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){varr=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":varo=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{varu=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":vara=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";varr={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});varn=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeoft!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(varo=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)returnr(t,this)},r._signal=function(e,t){varn=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(varr=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){varn=this;t&&this.addEventListener(e,functionr(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){varn=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){varr=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);vars=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){varn=this._defaultHandlers;if(!n)return;varr=n._disabled_[e];if(n[e]==t){vari=n[e];r&&this.setDefaultHandler(e,r.pop())}elseif(r){vars=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};varr=this._eventRegistry[e];returnr||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};varn=this._eventRegistry[e];if(!n)return;varr=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";varr=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeofn=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){functione(e,t,n){varr=n?e.column<=t.column:e.column<t.column;returne.row<t.row||e.row==t.row&&r}functiont(t,n,r){vari=t.action=="insert",s=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),u=t.start,a=i?u:t.end;returne(n,u,r)?{row:n.row,column:n.column}:e(a,n,!r)?{row:n.row+s,column:n.column+(n.row==a.row?o:0)}:{row:u.row,column:u.column}}r.implement(this,i),this.getPosition=function(){returnthis.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){returnthis.document},this.$insertRight=!1,this.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;varn=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){varr;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;vari={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){varn={};returne>=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}}).call(s.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";varr=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){vart=this.getLength()-1;this.remove(newo(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){returnthis.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){returnnewu(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){returne.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){returne.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){vart=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:returnthis.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){returnthis.$newLineMode},this.isNewLine=function(e){returne=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){returnthis.$lines[e]||""},this.getLines=function(e,t){returnthis.$lines.slice(e,t+1)},this.getAllLines=function(){returnthis.getLines(0,this.getLength())},this.getLength=function(){returnthis.$lines.length},this.getTextRange=function(e){returnthis.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){vart;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);varn=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}returnt},this.insertLines=function(e,t){returnconsole.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){returnconsole.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){returnconsole.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){returnthis.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){varn=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);returnthis.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){varn=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);varr=this.getLine(e);returnt==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){vart=this.getLength();returne.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());varn=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){varn=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};returnthis.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){vart=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);returnthis.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){varr=this.clippedPos(e,t),i=this.clippedPos(e,n);returnthis.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);varn=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=newo(i,s,u,a),l=this.$lines.slice(e,t+1);returnthis.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){einstanceofo||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())returne.start;if(t==this.getTextRange(e))returne.end;this.remove(e);varn;returnt?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(vart=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(vart=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){varn=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e)},this.$splitAndapplyLargeDelta=function(e,t){varn=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;do{o=u,u+=t-1;vara=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}while(!0)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){varn=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(vari=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){varn=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(varo=t||0;o<s;++o)i+=n[o].length+r;returni+e.column}}).call(a.prototype),t.Document=a}),define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){returne[e.length-1]},t.stringReverse=function(e){returne.split("").reverse().join("")},t.stringRepeat=function(e,t){varn="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}returnn};varr=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){returne.replace(r,"")},t.stringTrimRight=function(e){returne.replace(i,"")},t.copyObject=function(e){vart={};for(varnine)t[n]=e[n];returnt},t.copyArray=function(e){vart=[];for(varn=0,r=e.length;n<r;n++)e[n]&&typeofe[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];returnt},t.deepCopy=functions(e){if(typeofe!="object"||!e)returne;vart;if(Array.isArray(e)){t=[];for(varn=0;n<e.length;n++)t[n]=s(e[n]);returnt}if(Object.prototype.toString.call(e)!=="[object Object]")returne;t={};for(varnine)t[n]=s(e[n]);returnt},t.arrayToMap=function(e){vart={};for(varn=0;n<e.length;n++)t[e[n]]=1;returnt},t.createMap=function(e){vart=Object.create(null);for(varnine)t[n]=e[n];returnt},t.arrayRemove=function(e,t){for(varn=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){returne.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){returne.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){varn=[];returne.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){vart=null,n=function(){t=null,e()},r=function(e){returnr.cancel(),t=setTimeout(n,e||0),r};returnr.schedule=r,r.call=function(){returnthis.cancel(),e(),r},r.cancel=function(){returnclearTimeout(t),t=null,r},r.isPending=function(){returnt},r},t.delayedCall=function(e,t){varn=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};returni.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){returnn},i}}),define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(e,t,n){"use strict";varr=e("../range").Range,i=e("../document").Document,s=e("../lib/lang"),o=t.Mirror=function(e){this.sender=e;vart=this.doc=newi(""),n=this.deferredUpdate=s.delayedCall(this.onUpdate.bind(this)),r=this;e.on("change",function(e){vari=e.data;if(i[0].start)t.applyDeltas(i);elsefor(vars=0;s<i.length;s+=2){if(Array.isArray(i[s+1]))varo={action:"insert",start:i[s],lines:i[s+1]};elsevaro={action:"remove",start:i[s],end:i[s+1]};t.applyDelta(o,!0)}if(r.$timeout)returnn.schedule(r.$timeout);r.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){returnthis.deferredUpdate.isPending()}}).call(o.prototype)}),define("ace/mode/json/json_parse",["require","exports","module"],function(e,t,n){"use strict";varr,i,s={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:""},o,u=function(e){throw{name:"SyntaxError",message:e,at:r,text:o}},a=function(e){return e&&e!==i&&u("Expected'"+e+"'insteadof'"+i+"'"),i=o.charAt(r),r+=1,i},f=function(){var e,t="";i==="-"&&(t="-",a("-"));while(i>="0"&&i<="9")t+=i,a();if(i==="."){t+=".";while(a()&&i>="0"&&i<="9")t+=i}if(i==="e"||i==="E"){t+=i,a();if(i==="-"||i==="+")t+=i,a();while(i>="0"&&i<="9")t+=i,a()}e=+t;if(!isNaN(e))return e;u("Badnumber")},l=function(){var e,t,n="",r;if(i==='"')while(a()){if(i==='"')return a(),n;if(i==="\\"){a();if(i==="u"){r=0;for(t=0;t<4;t+=1){e=parseInt(a(),16);if(!isFinite(e))break;r=r*16+e}n+=String.fromCharCode(r)}else{if(typeof s[i]!="string")break;n+=s[i]}}else n+=i}u("Badstring")},c=function(){while(i&&i<="")a()},h=function(){switch(i){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}u("Unexpected'"+i+"'")},p,d=function(){var e=[];if(i==="["){a("["),c();if(i==="]")return a("]"),e;while(i){e.push(p()),c();if(i==="]")return a("]"),e;a(","),c()}}u("Badarray")},v=function(){var e,t={};if(i==="{"){a("{"),c();if(i==="}")return a("}"),t;while(i){e=l(),c(),a(":"),Object.hasOwnProperty.call(t,e)&&u('Duplicate key "'+e+'"'),t[e]=p(),c();if(i==="}")return a("}"),t;a(","),c()}}u("Badobject")};return p=function(){c();switch(i){case"{":return v();case"[":return d();case'"':return l();case"-":return f();default:return i>="0"&&i<="9"?f():h()}},function(e,t){var n;return o=e,r=0,i=" ",n=p(),c(),i&&u("Syntax error"),typeof t=="function"?function s(e,n){var r,i,o=e[n];if(o&&typeof o=="object")for(r in o)Object.hasOwnProperty.call(o,r)&&(i=s(o,r),i!==undefined?o[r]=i:delete o[r]);return t.call(e,n,o)}({"":n},""):n}}),define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../worker/mirror").Mirror,s=e("./json/json_parse"),o=t.JsonWorker=function(e){i.call(this,e),this.setTimeout(200)};r.inherits(o,i),function(){this.onUpdate=function(){var e=this.doc.getValue(),t=[];try{e&&s(e)}catch(n){var r=this.doc.indexToPosition(n.at-1);t.push({row:r.row,column:r.column,text:n.message,type:"error"})}this.sender.emit("annotate",t)}}.call(o.prototype)}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function w(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function H(e){return e=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}function B(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function j(e){var t,n,r;if(B(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(B(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(B(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(t){var n=this;if(typeof n!="function")throw new TypeError("Function.prototype.bind called on incompatible "+n);var i=u.call(arguments,1),s=function(){if(this instanceof s){var e=n.apply(this,i.concat(u.call(arguments)));return Object(e)===e?e:this}return n.apply(t,i.concat(u.call(arguments)))};return n.prototype&&(r.prototype=n.prototype,s.prototype=new r,r.prototype=null),s});var i=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){function e(e){var t=new Array(e+2);return t[0]=t[1]=0,t}var t=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){var n=this.length;e>0?e>n&&(e=n):e==void 0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);var r=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(var h=0;h<l;++h)this[f+h]=this[a+h];else if(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var v=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?v.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){return a(t)=="[object Array]"});var m=Object("a"),g=m[0]!="a"||!(0 in m);Array.prototype.forEach||(Array.prototype.forEach=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError;while(++s<o)s in r&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var u=0;u<i;u++)u in r&&(s[u]=t.call(o,r[u],u,n));return s}),Array.prototype.filter||(Array.prototype.filter=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var f=0;f<i;f++)f in r&&(o=r[f],t.call(u,o,f,n)&&s.push(o));return s}),Array.prototype.every||(Array.prototype.every=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");for(var o=0;o<i;o++)if(o in r&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var s=0,o;if(arguments.length>=2)o=arguments[1];else do{if(s in r){o=r[s++];break}if(++s>=i)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)s in r&&(o=t.call(void 0,o,r[s],s,n));return o}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){var n=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")throw new TypeError(t+" is not a function");if(!i&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var s,o=i-1;if(arguments.length>=2)s=arguments[1];else do{if(o in r){s=r[o--];break}if(--o<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do o in this&&(s=t.call(void 0,s,r[o],o,n));while(o--);return s});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(i in n&&n[i]===t)return i;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){var n=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;var i=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(i in n&&t===n[i])return i;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){return t.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){var y="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(y+t);if(!f(t,n))return;var r,i,s;r={enumerable:!0,configurable:!0};if(d){var u=t.__proto__;t.__proto__=o;var i=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)return i&&(r.get=i),s&&(r.set=s),r}return r.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){return Object.keys(t)});if(!Object.create){var b;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){var e={};for(var t in e)e[t]=null;return e.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){var r;if(t===null)r=b();else{if(typeof t!="object")throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var i=function(){};i.prototype=t,r=new i,r.__proto__=t}return n!==void 0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){var E=w({}),S=typeof document=="undefined"||w(document.createElement("div"));if(!E||!S)var x=Object.defineProperty}if(!Object.defineProperty||x){var T="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeof t!="object"&&typeof t!="function"||t===null)throw new TypeError(N+t);if(typeof r!="object"&&typeof r!="function"||r===null)throw new TypeError(T+r);if(x)try{return x.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){var s=t.__proto__;t.__proto__=o,delete t[n],t[n]=r.value,t.__proto__=s}else t[n]=r.value;else{if(!d)throw new TypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}return t}}Object.defineProperties||(Object.defineProperties=function(t,n){for(var r in n)f(n,r)&&Object.defineProperty(t,r,n[r]);return t}),Object.seal||(Object.seal=function(t){return t}),Object.freeze||(Object.freeze=function(t){return t});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){return function(n){return typeof n=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){return t}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)throw new TypeError;var n="";while(f(t,n))n+="?";t[n]=!0;var r=f(t,n);return delete t[n],r});if(!Object.keys){var L=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(var M in{toString:null})L=!1;Object.keys=function I(e){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError("Object.keys called on a non-object");var I=[];for(var t in e)f(e,t)&&I.push(t);if(L)for(var n=0,r=O;n<r;n++){var i=A[n];f(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var _=" \n\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";var D=new RegExp("^"+_+_+"*"),P=new RegExp(_+_+"*$");String.prototype.trim=function(){return String(this).replace(D,"").replace(P,"")}}var F=function(e){if(e==null)throw new TypeError("can'tconvert"+e+"toobject");return Object(e)}})
"no use strict";!function(e){functiont(e,t){varn=e,r="";while(n){vari=t[n];if(typeofi=="string")returni+r;if(i)returni.location.replace(/\/*$/,"/")+(r||i.main||i.name);if(i===!1)return"";vars=n.lastIndexOf("/");if(s===-1)break;r=n.substr(s)+r,n=n.slice(0,s)}returne}if(typeofe.window!="undefined"&&e.document)return;if(e.require&&e.define)return;e.console||(e.console=function(){vare=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},e.console.error=e.console.warn=e.console.log=e.console.trace=e.console),e.window=e,e.ace=e,e.onerror=function(e,t,n,r,i){postMessage({type:"error",data:{message:e,data:i.data,file:t,line:n,col:r,stack:i.stack}})},e.normalizeModule=function(t,n){if(n.indexOf("!")!==-1){varr=n.split("!");returne.normalizeModule(t,r[0])+"!"+e.normalizeModule(t,r[1])}if(n.charAt(0)=="."){vari=t.split("/").slice(0,-1).join("/");n=(i?i+"/":"")+n;while(n.indexOf(".")!==-1&&s!=n){vars=n;n=n.replace(/^\.\//,"").replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}returnn},e.require=function(r,i){i||(i=r,r=null);if(!i.charAt)thrownewError("worker.js require() accepts only (parentId, id) as arguments");i=e.normalizeModule(r,i);vars=e.require.modules[i];if(s)returns.initialized||(s.initialized=!0,s.exports=s.factory().exports),s.exports;if(!e.require.tlns)returnconsole.log("unable to load "+i);varo=t(i,e.require.tlns);returno.slice(-3)!=".js"&&(o+=".js"),e.require.id=i,e.require.modules[i]={},importScripts(o),e.require(r,i)},e.require.modules={},e.require.tlns={},e.define=function(t,n,r){arguments.length==2?(r=n,typeoft!="string"&&(n=t,t=e.require.id)):arguments.length==1&&(r=t,n=[],t=e.require.id);if(typeofr!="function"){e.require.modules[t]={exports:r,initialized:!0};return}n.length||(n=["require","exports","module"]);vari=function(n){returne.require(t,n)};e.require.modules[t]={exports:{},factory:function(){vare=this,t=r.apply(this,n.map(function(t){switch(t){case"require":returni;case"exports":returne.exports;case"module":returne;default:returni(t)}}));returnt&&(e.exports=t),e}}},e.define.amd={},require.tlns={},e.initBaseUrls=function(t){for(varnint)require.tlns[n]=t[n]},e.initSender=function(){varn=e.require("ace/lib/event_emitter").EventEmitter,r=e.require("ace/lib/oop"),i=function(){};returnfunction(){r.implement(this,n),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(i.prototype),newi};varn=e.main=null,r=e.sender=null;e.onmessage=function(t){vari=t.data;if(i.event&&r)r._signal(i.event,i.data);elseif(i.command)if(n[i.command])n[i.command].apply(n,i.args);else{if(!e[i.command])thrownewError("Unknown command:"+i.command);e[i.command].apply(e,i.args)}elseif(i.init){e.initBaseUrls(i.tlns),require("ace/lib/es5-shim"),r=e.sender=e.initSender();vars=require(i.module)[i.classname];n=e.main=news(r)}}}(this),define("ace/lib/oop",["require","exports","module"],function(e,t,n){"use strict";t.inherits=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})},t.mixin=function(e,t){for(varnint)e[n]=t[n];returne},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/lib/lang",["require","exports","module"],function(e,t,n){"use strict";t.last=function(e){returne[e.length-1]},t.stringReverse=function(e){returne.split("").reverse().join("")},t.stringRepeat=function(e,t){varn="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}returnn};varr=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){returne.replace(r,"")},t.stringTrimRight=function(e){returne.replace(i,"")},t.copyObject=function(e){vart={};for(varnine)t[n]=e[n];returnt},t.copyArray=function(e){vart=[];for(varn=0,r=e.length;n<r;n++)e[n]&&typeofe[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];returnt},t.deepCopy=functions(e){if(typeofe!="object"||!e)returne;vart;if(Array.isArray(e)){t=[];for(varn=0;n<e.length;n++)t[n]=s(e[n]);returnt}if(Object.prototype.toString.call(e)!=="[object Object]")returne;t={};for(varnine)t[n]=s(e[n]);returnt},t.arrayToMap=function(e){vart={};for(varn=0;n<e.length;n++)t[e[n]]=1;returnt},t.createMap=function(e){vart=Object.create(null);for(varnine)t[n]=e[n];returnt},t.arrayRemove=function(e,t){for(varn=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){returne.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){returne.replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(/</g,"<")},t.getMatchOffsets=function(e,t){varn=[];returne.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){vart=null,n=function(){t=null,e()},r=function(e){returnr.cancel(),t=setTimeout(n,e||0),r};returnr.schedule=r,r.call=function(){returnthis.cancel(),e(),r},r.cancel=function(){returnclearTimeout(t),t=null,r},r.isPending=function(){returnt},r},t.delayedCall=function(e,t){varn=null,r=function(){n=null,e()},i=function(e){n==null&&(n=setTimeout(r,e||t))};returni.delay=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)},i.schedule=i,i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){returnn},i}}),define("ace/range",["require","exports","module"],function(e,t,n){"use strict";varr=function(e,t){returne.row-t.row||e.column-t.column},i=function(e,t,n,r){this.start={row:e,column:t},this.end={row:n,column:r}};(function(){this.isEqual=function(e){returnthis.start.row===e.start.row&&this.end.row===e.end.row&&this.start.column===e.start.column&&this.end.column===e.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(e,t){returnthis.compare(e,t)==0},this.compareRange=function(e){vart,n=e.end,r=e.start;returnt=this.compare(n.row,n.column),t==1?(t=this.compare(r.row,r.column),t==1?2:t==0?1:0):t==-1?-2:(t=this.compare(r.row,r.column),t==-1?-1:t==1?42:0)},this.comparePoint=function(e){returnthis.compare(e.row,e.column)},this.containsRange=function(e){returnthis.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){vart=this.compareRange(e);returnt==-1||t==0||t==1},this.isEnd=function(e,t){returnthis.end.row==e&&this.end.column==t},this.isStart=function(e,t){returnthis.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeofe=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeofe=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){returnthis.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){returnthis.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){returnthis.compare(e,t)==0?this.isStart(e,t)?!1:!0:!1},this.compare=function(e,t){return!this.isMultiLine()&&e===this.start.row?t<this.start.column?-1:t>this.end.column?1:0:e<this.start.row?-1:e>this.end.row?1:this.start.row===e?t>=this.start.column?0:-1:this.end.row===e?t<=this.end.column?0:1:0},this.compareStart=function(e,t){returnthis.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){returnthis.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){returnthis.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)varn={row:t+1,column:0};elseif(this.end.row<e)varn={row:e,column:0};if(this.start.row>t)varr={row:t+1,column:0};elseif(this.start.row<e)varr={row:e,column:0};returni.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){varn=this.compare(e,t);if(n==0)returnthis;if(n==-1)varr={row:e,column:t};elsevars={row:e,column:t};returni.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){returnthis.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){returnthis.start.row!==this.end.row},this.clone=function(){returni.fromPoints(this.start,this.end)},this.collapseRows=function(){returnthis.end.column==0?newi(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):newi(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){vart=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);returnnewi(t.row,t.column,n.row,n.column)},this.moveBy=function(e,t){this.start.row+=e,this.start.column+=t,this.end.row+=e,this.end.column+=t}}).call(i.prototype),i.fromPoints=function(e,t){returnnewi(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){returne.row-t.row||e.column-t.column},t.Range=i}),define("ace/apply_delta",["require","exports","module"],function(e,t,n){"use strict";functionr(e,t){throwconsole.log("Invalid Delta:",e),"Invalid Delta: "+t}functioni(e,t){returnt.row>=0&&t.row<e.length&&t.column>=0&&t.column<=e[t.row].length}functions(e,t){t.action!="insert"&&t.action!="remove"&&r(t,"delta.action must be 'insert' or 'remove'"),t.linesinstanceofArray||r(t,"delta.lines must be an Array"),(!t.start||!t.end)&&r(t,"delta.start/end must be an present");varn=t.start;i(e,t.start)||r(t,"delta.start must be contained in document");vars=t.end;t.action=="remove"&&!i(e,s)&&r(t,"delta.end must contained in document for 'remove' actions");varo=s.row-n.row,u=s.column-(o==0?n.column:0);(o!=t.lines.length-1||t.lines[o].length!=u)&&r(t,"delta.range must match delta lines")}t.applyDelta=function(e,t,n){varr=t.start.row,i=t.start.column,s=e[r]||"";switch(t.action){case"insert":varo=t.lines;if(o.length===1)e[r]=s.substring(0,i)+t.lines[0]+s.substring(i);else{varu=[r,1].concat(t.lines);e.splice.apply(e,u),e[r]=s.substring(0,i)+e[r],e[r+t.lines.length-1]+=s.substring(i)}break;case"remove":vara=t.end.column,f=t.end.row;r===f?e[r]=s.substring(0,i)+s.substring(a):e.splice(r,f-r+1,s.substring(0,i)+e[f].substring(a))}}}),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){"use strict";varr={},i=function(){this.propagationStopped=!0},s=function(){this.defaultPrevented=!0};r._emit=r._dispatchEvent=function(e,t){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});varn=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeoft!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s),n=n.slice();for(varo=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)returnr(t,this)},r._signal=function(e,t){varn=(this._eventRegistry||{})[e];if(!n)return;n=n.slice();for(varr=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){varn=this;t&&this.addEventListener(e,functionr(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){varn=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){varr=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);vars=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){varn=this._defaultHandlers;if(!n)return;varr=n._disabled_[e];if(n[e]==t){vari=n[e];r&&this.setDefaultHandler(e,r.pop())}elseif(r){vars=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};varr=this._eventRegistry[e];returnr||(r=this._eventRegistry[e]=[]),r.indexOf(t)==-1&&r[n?"unshift":"push"](t),t},r.off=r.removeListener=r.removeEventListener=function(e,t){this._eventRegistry=this._eventRegistry||{};varn=this._eventRegistry[e];if(!n)return;varr=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){"use strict";varr=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.$onChange=this.onChange.bind(this),this.attach(e),typeofn=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n)};(function(){functione(e,t,n){varr=n?e.column<=t.column:e.column<t.column;returne.row<t.row||e.row==t.row&&r}functiont(t,n,r){vari=t.action=="insert",s=(i?1:-1)*(t.end.row-t.start.row),o=(i?1:-1)*(t.end.column-t.start.column),u=t.start,a=i?u:t.end;returne(n,u,r)?{row:n.row,column:n.column}:e(a,n,!r)?{row:n.row+s,column:n.column+(n.row==a.row?o:0)}:{row:u.row,column:u.column}}r.implement(this,i),this.getPosition=function(){returnthis.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){returnthis.document},this.$insertRight=!1,this.onChange=function(e){if(e.start.row==e.end.row&&e.start.row!=this.row)return;if(e.start.row>this.row)return;varn=t(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)},this.setPosition=function(e,t,n){varr;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;vari={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._signal("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(e){this.document=e||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){varn={};returne>=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}}).call(s.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){"use strict";varr=e("./lib/oop"),i=e("./apply_delta").applyDelta,s=e("./lib/event_emitter").EventEmitter,o=e("./range").Range,u=e("./anchor").Anchor,a=function(e){this.$lines=[""],e.length===0?this.$lines=[""]:Array.isArray(e)?this.insertMergedLines({row:0,column:0},e):this.insert({row:0,column:0},e)};(function(){r.implement(this,s),this.setValue=function(e){vart=this.getLength()-1;this.remove(newo(0,0,t,this.getLine(t).length)),this.insert({row:0,column:0},e)},this.getValue=function(){returnthis.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){returnnewu(this,e,t)},"aaa".split(/a/).length===0?this.$split=function(e){returne.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){returne.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){vart=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:returnthis.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e,this._signal("changeNewLineMode")},this.getNewLineMode=function(){returnthis.$newLineMode},this.isNewLine=function(e){returne=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){returnthis.$lines[e]||""},this.getLines=function(e,t){returnthis.$lines.slice(e,t+1)},this.getAllLines=function(){returnthis.getLines(0,this.getLength())},this.getLength=function(){returnthis.$lines.length},this.getTextRange=function(e){returnthis.getLinesForRange(e).join(this.getNewLineCharacter())},this.getLinesForRange=function(e){vart;if(e.start.row===e.end.row)t=[this.getLine(e.start.row).substring(e.start.column,e.end.column)];else{t=this.getLines(e.start.row,e.end.row),t[0]=(t[0]||"").substring(e.start.column);varn=t.length-1;e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column))}returnt},this.insertLines=function(e,t){returnconsole.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(e,t)},this.removeLines=function(e,t){returnconsole.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(e,t)},this.insertNewLine=function(e){returnconsole.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(e,["",""])},this.insert=function(e,t){returnthis.getLength()<=1&&this.$detectNewLine(t),this.insertMergedLines(e,this.$split(t))},this.insertInLine=function(e,t){varn=this.clippedPos(e.row,e.column),r=this.pos(e.row,e.column+t.length);returnthis.applyDelta({start:n,end:r,action:"insert",lines:[t]},!0),this.clonePos(r)},this.clippedPos=function(e,t){varn=this.getLength();e===undefined?e=n:e<0?e=0:e>=n&&(e=n-1,t=undefined);varr=this.getLine(e);returnt==undefined&&(t=r.length),t=Math.min(Math.max(t,0),r.length),{row:e,column:t}},this.clonePos=function(e){return{row:e.row,column:e.column}},this.pos=function(e,t){return{row:e,column:t}},this.$clipPosition=function(e){vart=this.getLength();returne.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):(e.row=Math.max(0,e.row),e.column=Math.min(Math.max(e.column,0),this.getLine(e.row).length)),e},this.insertFullLines=function(e,t){e=Math.min(Math.max(e,0),this.getLength());varn=0;e<this.getLength()?(t=t.concat([""]),n=0):(t=[""].concat(t),e--,n=this.$lines[e].length),this.insertMergedLines({row:e,column:n},t)},this.insertMergedLines=function(e,t){varn=this.clippedPos(e.row,e.column),r={row:n.row+t.length-1,column:(t.length==1?n.column:0)+t[t.length-1].length};returnthis.applyDelta({start:n,end:r,action:"insert",lines:t}),this.clonePos(r)},this.remove=function(e){vart=this.clippedPos(e.start.row,e.start.column),n=this.clippedPos(e.end.row,e.end.column);returnthis.applyDelta({start:t,end:n,action:"remove",lines:this.getLinesForRange({start:t,end:n})}),this.clonePos(t)},this.removeInLine=function(e,t,n){varr=this.clippedPos(e,t),i=this.clippedPos(e,n);returnthis.applyDelta({start:r,end:i,action:"remove",lines:this.getLinesForRange({start:r,end:i})},!0),this.clonePos(r)},this.removeFullLines=function(e,t){e=Math.min(Math.max(0,e),this.getLength()-1),t=Math.min(Math.max(0,t),this.getLength()-1);varn=t==this.getLength()-1&&e>0,r=t<this.getLength()-1,i=n?e-1:e,s=n?this.getLine(i).length:0,u=r?t+1:t,a=r?0:this.getLine(u).length,f=newo(i,s,u,a),l=this.$lines.slice(e,t+1);returnthis.applyDelta({start:f.start,end:f.end,action:"remove",lines:this.getLinesForRange(f)}),l},this.removeNewLine=function(e){e<this.getLength()-1&&e>=0&&this.applyDelta({start:this.pos(e,this.getLine(e).length),end:this.pos(e+1,0),action:"remove",lines:["",""]})},this.replace=function(e,t){einstanceofo||(e=o.fromPoints(e.start,e.end));if(t.length===0&&e.isEmpty())returne.start;if(t==this.getTextRange(e))returne.end;this.remove(e);varn;returnt?n=this.insert(e.start,t):n=e.start,n},this.applyDeltas=function(e){for(vart=0;t<e.length;t++)this.applyDelta(e[t])},this.revertDeltas=function(e){for(vart=e.length-1;t>=0;t--)this.revertDelta(e[t])},this.applyDelta=function(e,t){varn=e.action=="insert";if(n?e.lines.length<=1&&!e.lines[0]:!o.comparePoints(e.start,e.end))return;n&&e.lines.length>2e4&&this.$splitAndapplyLargeDelta(e,2e4),i(this.$lines,e,t),this._signal("change",e)},this.$splitAndapplyLargeDelta=function(e,t){varn=e.lines,r=n.length,i=e.start.row,s=e.start.column,o=0,u=0;do{o=u,u+=t-1;vara=n.slice(o,u);if(u>r){e.lines=a,e.start.row=i+o,e.start.column=s;break}a.push(""),this.applyDelta({start:this.pos(i+o,s),end:this.pos(i+u,s=0),action:e.action,lines:a},!0)}while(!0)},this.revertDelta=function(e){this.applyDelta({start:this.clonePos(e.start),end:this.clonePos(e.end),action:e.action=="insert"?"remove":"insert",lines:e.lines.slice()})},this.indexToPosition=function(e,t){varn=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(vari=t||0,s=n.length;i<s;i++){e-=n[i].length+r;if(e<0)return{row:i,column:e+n[i].length+r}}return{row:s-1,column:n[s-1].length}},this.positionToIndex=function(e,t){varn=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(varo=t||0;o<s;++o)i+=n[o].length+r;returni+e.column}}).call(a.prototype),t.Document=a}),define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"],function(e,t,n){"use strict";varr=e("../range").Range,i=e("../document").Document,s=e("../lib/lang"),o=t.Mirror=function(e){this.sender=e;vart=this.doc=newi(""),n=this.deferredUpdate=s.delayedCall(this.onUpdate.bind(this)),r=this;e.on("change",function(e){vari=e.data;if(i[0].start)t.applyDeltas(i);elsefor(vars=0;s<i.length;s+=2){if(Array.isArray(i[s+1]))varo={action:"insert",start:i[s],lines:i[s+1]};elsevaro={action:"remove",start:i[s],end:i[s+1]};t.applyDelta(o,!0)}if(r.$timeout)returnn.schedule(r.$timeout);r.onUpdate()})};(function(){this.$timeout=500,this.setTimeout=function(e){this.$timeout=e},this.setValue=function(e){this.doc.setValue(e),this.deferredUpdate.schedule(this.$timeout)},this.getValue=function(e){this.sender.callback(this.doc.getValue(),e)},this.onUpdate=function(){},this.isPending=function(){returnthis.deferredUpdate.isPending()}}).call(o.prototype)}),define("ace/mode/xml/sax",["require","exports","module"],function(e,t,n){functiond(){}functionv(e,t,n,r,i){functions(e){if(e>65535){e-=65536;vart=55296+(e>>10),n=56320+(e&1023);returnString.fromCharCode(t,n)}returnString.fromCharCode(e)}functiono(e){vart=e.slice(1,-1);returntinn?n[t]:t.charAt(0)==="#"?s(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}functionu(t){varn=e.substring(v,t).replace(/&#?\w+;/g,o);h&&a(v),r.characters(n,0,t-v),v=t}functiona(t,n){while(t>=l&&(n=c.exec(e)))f=n.index,l=f+n[0].length,h.lineNumber++;h.columnNumber=t-f+1}varf=0,l=0,c=/.+(?:\r\n?|\n)|.*$/g,h=r.locator,p=[{currentNSMap:t}],d={},v=0;for(;;){varE=e.indexOf("<",v);if(E<0){if(!e.substr(v).match(/^\s*$/)){varN=r.document,C=N.createTextNode(e.substr(v));N.appendChild(C),r.currentElement=C}return}E>v&&u(E);switch(e.charAt(E+1)){case"/":vark=e.indexOf(">",E+3),L=e.substring(E+2,k),A;if(!(p.length>1)){i.fatalError("end tag name not found for: "+L);break}A=p.pop();varO=A.localNSMap;A.tagName!=L&&i.fatalError("end tag name: "+L+" does not match the current start tagName: "+A.tagName),r.endElement(A.uri,A.localName,L);if(O)for(varMinO)r.endPrefixMapping(M);k++;break;case"?":h&&a(E),k=x(e,E,r);break;case"!":h&&a(E),k=S(e,E,r,i);break;default:try{h&&a(E);var_=newT,k=g(e,E,_,o,i),D=_.length;if(D&&h){varP=m(h,{});for(varE=0;E<D;E++){varH=_[E];a(H.offset),H.offset=m(h,{})}m(P,h)}!_.closed&&w(e,k,_.tagName,d)&&(_.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),y(_,r,p),_.uri==="http://www.w3.org/1999/xhtml"&&!_.closed?k=b(e,k,_.tagName,o,r):k++}catch(B){i.error("element parse error: "+B),k=-1}}k<0?u(E+1):v=k}}functionm(e,t){returnt.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}functiong(e,t,n,r,i){vars,d,v=++t,m=o;for(;;){varg=e.charAt(v);switch(g){case"=":if(m===u)s=e.slice(t,v),m=f;else{if(m!==a)thrownewError("attribute equal must after attrName");m=f}break;case"'":case'"':if(m===f){t=v+1,v=e.indexOf(g,t);if(!(v>0))thrownewError("attribute value no end '"+g+"' match");d=e.slice(t,v).replace(/&#?\w+;/g,r),n.add(s,d,t-1),m=c}else{if(m!=l)thrownewError('attribute value must after "="');d=e.slice(t,v).replace(/&#?\w+;/g,r),n.add(s,d,t),i.warning('attribute "'+s+'" missed start quot('+g+")!!"),t=v+1,m=c}break;case"/":switch(m){caseo:n.setTagName(e.slice(t,v));casec:caseh:casep:m=p,n.closed=!0;casel:caseu:casea:break;default:thrownewError("attribute invalid close char('/')")}break;case"":i.error("unexpected end of input");case">":switch(m){caseo:n.setTagName(e.slice(t,v));casec:caseh:casep:break;casel:caseu:d=e.slice(t,v),d.slice(-1)==="/"&&(n.closed=!0,d=d.slice(0,-1));casea:m===a&&(d=s),m==l?(i.warning('attribute "'+d+'" missed quot(")!!'),n.add(s,d.replace(/&#?\w+;/g,r),t)):(i.warning('attribute "'+d+'" missed value!! "'+d+'" instead!!'),n.add(d,d,t));break;casef:thrownewError("attribute value missed!!")}returnv;case"\u0080":g=" ";default:if(g<=" ")switch(m){caseo:n.setTagName(e.slice(t,v)),m=h;break;caseu:s=e.slice(t,v),m=a;break;casel:vard=e.slice(t,v).replace(/&#?\w+;/g,r);i.warning('attribute "'+d+'" missed quot(")!!'),n.add(s,d,t);casec:m=h}elseswitch(m){casea:i.warning('attribute "'+s+'" missed value!! "'+s+'" instead!!'),n.add(s,s,t),t=v,m=u;break;casec:i.warning('attribute space is required"'+s+'"!!');caseh:m=u,t=v;break;casef:m=l,t=v;break;casep:thrownewError("elements closed character '/' and '>' must be connected to")}}v++}}functiony(e,t,n){varr=e.tagName,i=null,s=n[n.length-1].currentNSMap,o=e.length;while(o--){varu=e[o],a=u.qName,f=u.value,l=a.indexOf(":");if(l>0)varc=u.prefix=a.slice(0,l),h=a.slice(l+1),p=c==="xmlns"&&h;elseh=a,c=null,p=a==="xmlns"&&"";u.localName=h,p!==!1&&(i==null&&(i={},E(s,s={})),s[p]=i[p]=f,u.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(p,f))}varo=e.length;while(o--){u=e[o];varc=u.prefix;c&&(c==="xml"&&(u.uri="http://www.w3.org/XML/1998/namespace"),c!=="xmlns"&&(u.uri=s[c]))}varl=r.indexOf(":");l>0?(c=e.prefix=r.slice(0,l),h=e.localName=r.slice(l+1)):(c=null,h=e.localName=r);vard=e.uri=s[c||""];t.startElement(d,h,r,e);if(e.closed){t.endElement(d,h,r);if(i)for(cini)t.endPrefixMapping(c)}elsee.currentNSMap=s,e.localNSMap=i,n.push(e)}functionb(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){vars=e.indexOf("</"+n+">",t),o=e.substring(t+1,s);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),s):(o=o.replace(/&#?\w+;/g,r),i.characters(o,0,o.length),s)}returnt+1}functionw(e,t,n,r){vari=r[n];returni==null&&(i=r[n]=e.lastIndexOf("</"+n+">")),i<t}functionE(e,t){for(varnine)t[n]=e[n]}functionS(e,t,n,r){vari=e.charAt(t+2);switch(i){case"-":if(e.charAt(t+3)==="-"){vars=e.indexOf("-->",t+4);returns>t?(n.comment(e,t+4,s-t-4),s+3):(r.error("Unclosed comment"),-1)}return-1;default:if(e.substr(t+3,6)=="CDATA["){vars=e.indexOf("]]>",t+9);returnn.startCDATA(),n.characters(e,t+9,s-t-9),n.endCDATA(),s+3}varo=C(e,t),u=o.length;if(u>1&&/!doctype/i.test(o[0][0])){vara=o[1][0],f=u>3&&/^public$/i.test(o[2][0])&&o[3][0],l=u>4&&o[4][0],c=o[u-1];returnn.startDTD(a,f&&f.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),c.index+c[0].length}}return-1}functionx(e,t,n){varr=e.indexOf("?>",t);if(r){vari=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){vars=i[0].length;returnn.processingInstruction(i[1],i[2]),r+2}return-1}return-1}functionT(e){}functionN(e,t){returne.__proto__=t,e}functionC(e,t){varn,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);while(n=i.exec(e)){r.push(n);if(n[1])returnr}}varr=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,i=newRegExp("[\\-\\.0-9"+r.source.slice(1,-1)+"\u00b7\u0300-\u036f\\ux203F-\u2040]"),s=newRegExp("^"+r.source+i.source+"*(?::"+r.source+i.source+"*)?$"),o=0,u=1,a=2,f=3,l=4,c=5,h=6,p=7;returnd.prototype={parse:function(e,t,n){varr=this.domBuilder;r.startDocument(),E(t,t={}),v(e,t,n,r,this.errorHandler),r.endDocument()}},T.prototype={setTagName:function(e){if(!s.test(e))thrownewError("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!s.test(e))thrownewError("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){returnthis[e].localName},getOffset:function(e){returnthis[e].offset},getQName:function(e){returnthis[e].qName},getURI:function(e){returnthis[e].uri},getValue:function(e){returnthis[e].value}},N({},N.prototype)instanceofN||(N=function(e,t){functionn(){}n.prototype=t,n=newn;for(tine)n[t]=e[t];returnn}),d}),define("ace/mode/xml/dom",["require","exports","module"],function(e,t,n){functionr(e,t){for(varnine)t[n]=e[n]}functioni(e,t){varn=e.prototype;if(Object.create){vari=Object.create(t.prototype);n.__proto__=i}if(!(ninstanceoft)){functions(){}s.prototype=t.prototype,s=news,r(n,s),e.prototype=n=s}n.constructor!=e&&(typeofe!="function"&&console.error("unknow Class:"+e),n.constructor=e)}functionB(e,t){if(tinstanceofError)varn=t;elsen=this,Error.call(this,w[e]),this.message=w[e],Error.captureStackTrace&&Error.captureStackTrace(this,B);returnn.code=e,t&&(this.message=this.message+": "+t),n}functionj(){}functionF(e,t){this._node=e,this._refresh=t,I(this)}functionI(e){vart=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){varn=e._refresh(e._node);gt(e,"length",n.length),r(n,e),e._inc=t}}functionq(){}functionR(e,t){varn=e.length;while(n--)if(e[n]===t)returnn}functionU(e,t,n,r){r?t[R(t,r)]=n:t[t.length++]=n;if(e){n.ownerElement=e;vari=e.ownerDocument;i&&(r&&Q(i,e,r),K(i,e,n))}}functionz(e,t,n){varr=R(t,n);if(!(r>=0))throwB(L,newError);vari=t.length-1;while(r<i)t[r]=t[++r];t.length=i;if(e){vars=e.ownerDocument;s&&(Q(s,e,n),n.ownerElement=null)}}functionW(e){this._features={};if(e)for(vartine)this._features=e[t]}functionX(){}functionV(e){returne=="<"&&"<"||e==">"&&">"||e=="&"&&"&"||e=='"'&&"""||"&#"+e.charCodeAt()+";"}function$(e,t){if(t(e))return!0;if(e=e.firstChild)doif($(e,t))return!0;while(e=e.nextSibling)}functionJ(){}functionK(e,t,n){e&&e._inc++;varr=n.namespaceURI;r=="http://www.w3.org/2000/xmlns/"&&(t._nsMap[n.prefix?n.localName:""]=n.value)}functionQ(e,t,n,r){e&&e._inc++;vari=n.namespaceURI;i=="http://www.w3.org/2000/xmlns/"&&deletet._nsMap[n.prefix?n.localName:""]}functionG(e,t,n){if(e&&e._inc){e._inc++;varr=t.childNodes;if(n)r[r.length++]=n;else{vari=t.firstChild,s=0;while(i)r[s++]=i,i=i.nextSibling;r.length=s}}}functionY(e,t){varn=t.previousSibling,r=t.nextSibling;returnn?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,G(e.ownerDocument,e),t}functionZ(e,t,n){varr=t.parentNode;r&&r.removeChild(t);if(t.nodeType===g){vari=t.firstChild;if(i==null)returnt;vars=t.lastChild}elsei=s=t;varo=n?n.previousSibling:e.lastChild;i.previousSibling=o,s.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,n==null?e.lastChild=s:n.previousSibling=s;doi.parentNode=e;while(i!==s&&(i=i.nextSibling));returnG(e.ownerDocument||e,e),t.nodeType==g&&(t.firstChild=t.lastChild=null),t}functionet(e,t){varn=t.parentNode;if(n){varr=e.lastChild;n.removeChild(t);varr=e.lastChild}varr=e.lastChild;returnt.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,G(e.ownerDocument,e,t),t}functiontt(){this._nsMap={}}functionnt(){}functionrt(){}functionit(){}functionst(){}functionot(){}functionut(){}functionat(){}functionft(){}functionlt(){}functionct(){}functionht(){}functionpt(){}functiondt(e,t){switch(e.nodeType){caseu:varn=e.attributes,r=n.length,i=e.firstChild,o=e.tagName,h=s===e.namespaceURI;t.push("<",o);for(vary=0;y<r;y++)dt(n.item(y),t,h);if(i||h&&!/^(?:meta|link|img|br|hr|input|button)$/i.test(o)){t.push(">");if(h&&/^script$/i.test(o))i&&t.push(i.data);elsewhile(i)dt(i,t),i=i.nextSibling;t.push("</",o,">")}elset.push("/>");return;casev:caseg:vari=e.firstChild;while(i)dt(i,t),i=i.nextSibling;return;casea:returnt.push(" ",e.name,'="',e.value.replace(/[<&"]/g,V),'"');casef:returnt.push(e.data.replace(/[<&]/g,V));casel:returnt.push("<![CDATA[",e.data,"]]>");cased:returnt.push("<!--",e.data,"-->");casem:varb=e.publicId,w=e.systemId;t.push("<!DOCTYPE ",e.name);if(b)t.push(' PUBLIC "',b),w&&w!="."&&t.push('" "',w),t.push('">');elseif(w&&w!=".")t.push(' SYSTEM "',w,'">');else{varE=e.internalSubset;E&&t.push(" [",E,"]"),t.push(">")}return;casep:returnt.push("<?",e.target," ",e.data,"?>");casec:returnt.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}functionvt(e,t,n){varr;switch(t.nodeType){caseu:r=t.cloneNode(!1),r.ownerDocument=e;caseg:break;casea:n=!0}r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null;if(n){vari=t.firstChild;while(i)r.appendChild(vt(e,i,n)),i=i.nextSibling}returnr}functionmt(e,t,n){varr=newt.constructor;for(variint){vars=t[i];typeofs!="object"&&s!=r[i]&&(r[i]=s)}t.childNodes&&(r.childNodes=newj),r.ownerDocument=e;switch(r.nodeType){caseu:varo=t.attributes,f=r.attributes=newq,l=o.length;f._ownerElement=r;for(varc=0;c<l;c++)r.setAttributeNode(mt(e,o.item(c),!0));break;casea:n=!0}if(n){varh=t.firstChild;while(h)r.appendChild(mt(e,h,n)),h=h.nextSibling}returnr}functiongt(e,t,n){e[t]=n}vars="http://www.w3.org/1999/xhtml",o={},u=o.ELEMENT_NODE=1,a=o.ATTRIBUTE_NODE=2,f=o.TEXT_NODE=3,l=o.CDATA_SECTION_NODE=4,c=o.ENTITY_REFERENCE_NODE=5,h=o.ENTITY_NODE=6,p=o.PROCESSING_INSTRUCTION_NODE=7,d=o.COMMENT_NODE=8,v=o.DOCUMENT_NODE=9,m=o.DOCUMENT_TYPE_NODE=10,g=o.DOCUMENT_FRAGMENT_NODE=11,y=o.NOTATION_NODE=12,b={},w={},E=b.INDEX_SIZE_ERR=(w[1]="Index size error",1),S=b.DOMSTRING_SIZE_ERR=(w[2]="DOMString size error",2),x=b.HIERARCHY_REQUEST_ERR=(w[3]="Hierarchy request error",3),T=b.WRONG_DOCUMENT_ERR=(w[4]="Wrong document",4),N=b.INVALID_CHARACTER_ERR=(w[5]="Invalid character",5),C=b.NO_DATA_ALLOWED_ERR=(w[6]="No data allowed",6),k=b.NO_MODIFICATION_ALLOWED_ERR=(w[7]="No modification allowed",7),L=b.NOT_FOUND_ERR=(w[8]="Not found",8),A=b.NOT_SUPPORTED_ERR=(w[9]="Not supported",9),O=b.INUSE_ATTRIBUTE_ERR=(w[10]="Attribute in use",10),M=b.INVALID_STATE_ERR=(w[11]="Invalid state",11),_=b.SYNTAX_ERR=(w[12]="Syntax error",12),D=b.INVALID_MODIFICATION_ERR=(w[13]="Invalid modification",13),P=b.NAMESPACE_ERR=(w[14]="Invalid namespace",14),H=b.INVALID_ACCESS_ERR=(w[15]="Invalid access",15);B.prototype=Error.prototype,r(b,B),j.prototype={length:0,item:function(e){returnthis[e]||null}},F.prototype.item=function(e){returnI(this),this[e]},i(F,j),q.prototype={length:0,item:j.prototype.item,getNamedItem:function(e){vart=this.length;while(t--){varn=this[t];if(n.nodeName==e)returnn}},setNamedItem:function(e){vart=e.ownerElement;if(t&&t!=this._ownerElement)thrownewB(O);varn=this.getNamedItem(e.nodeName);returnU(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){vart=e.ownerElement,n;if(t&&t!=this._ownerElement)thrownewB(O);returnn=this.getNamedItemNS(e.namespaceURI,e.localName),U(this._ownerElement,this,e,n),n},removeNamedItem:function(e){vart=this.getNamedItem(e);returnz(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){varn=this.getNamedItemNS(e,t);returnz(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){varn=this.length;while(n--){varr=this[n];if(r.localName==t&&r.namespaceURI==e)returnr}returnnull}},W.prototype={hasFeature:function(e,t){varn=this._features[e.toLowerCase()];returnn&&(!t||tinn)?!0:!1},createDocument:function(e,t,n){varr=newJ;r.implementation=this,r.childNodes=newj,r.doctype=n,n&&r.appendChild(n);if(t){vari=r.createElementNS(e,t);r.appendChild(i)}returnr},createDocumentType:function(e,t,n){varr=newut;returnr.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},X.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){returnZ(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){returnY(this,e)},appendChild:function(e){returnthis.insertBefore(e,null)},hasChildNodes:function(){returnthis.firstChild!=null},cloneNode:function(e){returnmt(this.ownerDocument||this,this,e)},normalize:function(){vare=this.firstChild;while(e){vart=e.nextSibling;t&&t.nodeType==f&&e.nodeType==f?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){returnthis.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){returnthis.attributes.length>0},lookupPrefix:function(e){vart=this;while(t){varn=t._nsMap;if(n)for(varrinn)if(n[r]==e)returnr;t=t.nodeType==2?t.ownerDocument:t.parentNode}returnnull},lookupNamespaceURI:function(e){vart=this;while(t){varn=t._nsMap;if(n&&einn)returnn[e];t=t.nodeType==2?t.ownerDocument:t.parentNode}returnnull},isDefaultNamespace:function(e){vart=this.lookupPrefix(e);returnt==null}},r(o,X),r(o,X.prototype),J.prototype={nodeName:"#document",nodeType:v,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==g){varn=e.firstChild;while(n){varr=n.nextSibling;this.insertBefore(n,t),n=r}returne}returnthis.documentElement==null&&e.nodeType==1&&(this.documentElement=e),Z(this,e,t),e.ownerDocument=this,e},removeChild:function(e){returnthis.documentElement==e&&(this.documentElement=null),Y(this,e)},importNode:function(e,t){returnvt(this,e,t)},getElementById:function(e){vart=null;return$(this.documentElement,function(n){if(n.nodeType==1&&n.getAttribute("id")==e)returnt=n,!0}),t},createElement:function(e){vart=newtt;t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=newj;varn=t.attributes=newq;returnn._ownerElement=t,t},createDocumentFragment:function(){vare=newct;returne.ownerDocument=this,e.childNodes=newj,e},createTextNode:function(e){vart=newit;returnt.ownerDocument=this,t.appendData(e),t},createComment:function(e){vart=newst;returnt.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){vart=newot;returnt.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){varn=newht;returnn.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){vart=newnt;returnt.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){vart=newlt;returnt.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){varn=newtt,r=t.split(":"),i=n.attributes=newq;returnn.childNodes=newj,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){varn=newnt,r=t.split(":");returnn.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,r.length==2?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},i(J,X),tt.prototype={nodeType:u,hasAttribute:function(e){returnthis.getAttributeNode(e)!=null},getAttribute:function(e){vart=this.getAttributeNode(e);returnt&&t.value||""},getAttributeNode:function(e){returnthis.attributes.getNamedItem(e)},setAttribute:function(e,t){varn=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){vart=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){returne.nodeType===g?this.insertBefore(e,null):et(this,e)},setAttributeNode:function(e){returnthis.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){returnthis.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){returnthis.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){varn=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){returnthis.getAttributeNodeNS(e,t)!=null},getAttributeNS:function(e,t){varn=this.getAttributeNodeNS(e,t);returnn&&n.value||""},setAttributeNS:function(e,t,n){varr=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){returnthis.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){returnnewF(this,function(t){varn=[];return$(t,function(r){r!==t&&r.nodeType==u&&(e==="*"||r.tagName==e)&&n.push(r)}),n})},getElementsByTagNameNS:function(e,t){returnnewF(this,function(n){varr=[];return$(n,function(i){i!==n&&i.nodeType===u&&(e==="*"||i.namespaceURI===e)&&(t==="*"||i.localName==t)&&r.push(i)}),r})}},J.prototype.getElementsByTagName=tt.prototype.getElementsByTagName,J.prototype.getElementsByTagNameNS=tt.prototype.getElementsByTagNameNS,i(tt,X),nt.prototype.nodeType=a,i(nt,X),rt.prototype={data:"",substringData:function(e,t){returnthis.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){thrownewError(w[3])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){varr=this.data.substring(0,e),i=this.data.substring(e+t);n=r+n+i,this.nodeValue=this.data=n,this.length=n.length}},i(rt,X),it.prototype={nodeName:"#text",nodeType:f,splitText:function(e){vart=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;varr=this.ownerDocument.createTextNode(n);returnthis.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},i(it,rt),st.prototype={nodeName:"#comment",nodeType:d},i(st,rt),ot.prototype={nodeName:"#cdata-section",nodeType:l},i(ot,rt),ut.prototype.nodeType=m,i(ut,X),at.prototype.nodeType=y,i(at,X),ft.prototype.nodeType=h,i(ft,X),lt.prototype.nodeType=c,i(lt,X),ct.prototype.nodeName="#document-fragment",ct.prototype.nodeType=g,i(ct,X),ht.prototype.nodeType=p,i(ht,X),pt.prototype.serializeToString=function(e){vart=[];returndt(e,t),t.join("")},X.prototype.toString=function(){returnpt.prototype.serializeToString(this)};try{if(Object.defineProperty){Object.defineProperty(F.prototype,"length",{get:function(){returnI(this),this.$$length}}),Object.defineProperty(X.prototype,"textContent",{get:function(){returnyt(this)},set:function(e){switch(this.nodeType){case1:case11:while(this.firstChild)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=value,this.nodeValue=e}}});functionyt(e){switch(e.nodeType){case1:case11:vart=[];e=e.firstChild;while(e)e.nodeType!==7&&e.nodeType!==8&&t.push(yt(e)),e=e.nextSibling;returnt.join("");default:returne.nodeValue}}gt=function(e,t,n){e["$$"+t]=n}}}catch(bt){}returnW}),define("ace/mode/xml/dom-parser",["require","exports","module","ace/mode/xml/sax","ace/mode/xml/dom"],function(e,t,n){"use strict";functions(e){this.options=e||{locator:{}}}functiono(e,t,n){functions(t){vars=e[t];if(!s)if(i)s=e.length==2?function(n){e(t,n)}:e;else{varo=arguments.length;while(--o)if(s=e[arguments[o]])break}r[t]=s&&function(e){s(e+f(n),e,n)}||function(){}}if(!e){if(tinstanceofu)returnt;e=t}varr={},i=einstanceofFunction;returnn=n||{},s("warning","warn"),s("error","warn","warning"),s("fatalError","warn","warning","error"),r}functionu(){this.cdata=!1}functiona(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}functionf(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}functionl(e,t,n){returntypeofe=="string"?e.substr(t,n):e.length>=t+n||t?newjava.lang.String(e,t,n)+"":e}functionc(e,t){e.currentElement?e.currentElement.appendChild(t):e.document.appendChild(t)}varr=e("./sax"),i=e("./dom");returns.prototype.parseFromString=function(e,t){varn=this.options,i=newr,s=n.domBuilder||newu,a=n.errorHandler,f=n.locator,l=n.xmlns||{},c={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};returnf&&s.setDocumentLocator(f),i.errorHandler=o(a,s,f),i.domBuilder=n.domBuilder||s,/\/x?html?$/.test(t)&&(c.nbsp="\u00a0",c.copy="\u00a9",l[""]="http://www.w3.org/1999/xhtml"),e?i.parse(e,l,c):i.errorHandler.error("invalid document source"),s.document},u.prototype={startDocument:function(){this.document=(newi).createDocument(null,null,null),this.locator&&(this.document.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){vari=this.document,s=i.createElementNS(e,n||t),o=r.length;c(this,s),this.currentElement=s,this.locator&&a(this.locator,s);for(varu=0;u<o;u++){vare=r.getURI(u),f=r.getValue(u),n=r.getQName(u),l=i.createAttributeNS(e,n);l.getOffset&&a(l.getOffset(1),l),l.value=l.nodeValue=f,s.setAttributeNode(l)}},endElement:function(e,t,n){varr=this.currentElement,i=r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){varn=this.document.createProcessingInstruction(e,t);this.locator&&a(this.locator,n),c(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){e=l.apply(this,arguments);if(this.currentElement&&e){if(this.cdata){varr=this.document.createCDATASection(e);this.currentElement.appendChild(r)}else{varr=this.document.createTextNode(e);this.currentElement.appendChild(r)}this.locator&&a(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.document.normalize()},setDocumentLocator:function(e){if(this.locator=e)e.lineNumber=0},comment:function(e,t,n){e=l.apply(this,arguments);varr=this.document.createComment(e);this.locator&&a(this.locator,r),c(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){varr=this.document.implementation;if(r&&r.createDocumentType){vari=r.createDocumentType(e,t,n);this.locator&&a(this.locator,i),c(this,i)}},warning:function(e){console.warn(e,f(this.locator))},error:function(e){console.error(e,f(this.locator))},fatalError:function(e){throwconsole.error(e,f(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(e){u.prototype[e]=function(){returnnull}}),{DOMParser:s}}),define("ace/mode/xml_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/xml/dom-parser"],function(e,t,n){"use strict";varr=e("../lib/oop"),i=e("../lib/lang"),s=e("../worker/mirror").Mirror,o=e("./xml/dom-parser").DOMParser,u=t.Worker=function(e){s.call(this,e),this.setTimeout(400),this.context=null};r.inherits(u,s),function(){this.setOptions=function(e){this.context=e.context},this.onUpdate=function(){vare=this.doc.getValue();if(!e)return;vart=newo,n=[];t.options.errorHandler={fatalError:function(e,t,r){n.push({row:r.lineNumber,column:r.columnNumber,text:t,type:"error"})},error:function(e,t,r){n.push({row:r.lineNumber,column:r.columnNumber,text:t,type:"error"})},warning:function(e,t,r){n.push({row:r.lineNumber,column:r.columnNumber,text:t,type:"warning"})}},t.parseFromString(e),this.sender.emit("error",n)}}.call(u.prototype)}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){functionr(){}functionw(e){try{returnObject.defineProperty(e,"sentinel",{}),"sentinel"ine}catch(t){}}functionH(e){returne=+e,e!==e?e=0:e!==0&&e!==1/0&&e!==-1/0&&(e=(e>0||-1)*Math.floor(Math.abs(e))),e}functionB(e){vart=typeofe;returne===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}functionj(e){vart,n,r;if(B(e))returne;n=e.valueOf;if(typeofn=="function"){t=n.call(e);if(B(t))returnt}r=e.toString;if(typeofr=="function"){t=r.call(e);if(B(t))returnt}thrownewTypeError}Function.prototype.bind||(Function.prototype.bind=function(t){varn=this;if(typeofn!="function")thrownewTypeError("Function.prototype.bind called on incompatible "+n);vari=u.call(arguments,1),s=function(){if(thisinstanceofs){vare=n.apply(this,i.concat(u.call(arguments)));returnObject(e)===e?e:this}returnn.apply(t,i.concat(u.call(arguments)))};returnn.prototype&&(r.prototype=n.prototype,s.prototype=newr,r.prototype=null),s});vari=Function.prototype.call,s=Array.prototype,o=Object.prototype,u=s.slice,a=i.bind(o.toString),f=i.bind(o.hasOwnProperty),l,c,h,p,d;if(d=f(o,"__defineGetter__"))l=i.bind(o.__defineGetter__),c=i.bind(o.__defineSetter__),h=i.bind(o.__lookupGetter__),p=i.bind(o.__lookupSetter__);if([1,2].splice(0).length!=2)if(!function(){functione(e){vart=newArray(e+2);returnt[0]=t[1]=0,t}vart=[],n;t.splice.apply(t,e(20)),t.splice.apply(t,e(26)),n=t.length,t.splice(5,0,"XXX"),n+1==t.length;if(n+1==t.length)return!0}())Array.prototype.splice=function(e,t){varn=this.length;e>0?e>n&&(e=n):e==void0?e=0:e<0&&(e=Math.max(n+e,0)),e+t<n||(t=n-e);varr=this.slice(e,e+t),i=u.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{varo=Math.min(t,n-e),a=e+o,f=a+s-o,l=n-a,c=n-o;if(f<a)for(varh=0;h<l;++h)this[f+h]=this[a+h];elseif(f>a)for(h=l;h--;)this[f+h]=this[a+h];if(s&&e===c)this.length=c,this.push.apply(this,i);else{this.length=c+s;for(h=0;h<s;++h)this[e+h]=i[h]}}returnr};else{varv=Array.prototype.splice;Array.prototype.splice=function(e,t){returnarguments.length?v.apply(this,[e===void0?0:e,t===void0?this.length-e:t].concat(u.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(t){returna(t)=="[object Array]"});varm=Object("a"),g=m[0]!="a"||!(0inm);Array.prototype.forEach||(Array.prototype.forEach=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=arguments[1],s=-1,o=r.length>>>0;if(a(t)!="[object Function]")thrownewTypeError;while(++s<o)sinr&&t.call(i,r[s],s,n)}),Array.prototype.map||(Array.prototype.map=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=Array(i),o=arguments[1];if(a(t)!="[object Function]")thrownewTypeError(t+" is not a function");for(varu=0;u<i;u++)uinr&&(s[u]=t.call(o,r[u],u,n));returns}),Array.prototype.filter||(Array.prototype.filter=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=[],o,u=arguments[1];if(a(t)!="[object Function]")thrownewTypeError(t+" is not a function");for(varf=0;f<i;f++)finr&&(o=r[f],t.call(u,o,f,n)&&s.push(o));returns}),Array.prototype.every||(Array.prototype.every=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")thrownewTypeError(t+" is not a function");for(varo=0;o<i;o++)if(oinr&&!t.call(s,r[o],o,n))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0,s=arguments[1];if(a(t)!="[object Function]")thrownewTypeError(t+" is not a function");for(varo=0;o<i;o++)if(oinr&&t.call(s,r[o],o,n))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")thrownewTypeError(t+" is not a function");if(!i&&arguments.length==1)thrownewTypeError("reduce of empty array with no initial value");vars=0,o;if(arguments.length>=2)o=arguments[1];elsedo{if(sinr){o=r[s++];break}if(++s>=i)thrownewTypeError("reduce of empty array with no initial value")}while(!0);for(;s<i;s++)sinr&&(o=t.call(void0,o,r[s],s,n));returno}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(t){varn=F(this),r=g&&a(this)=="[object String]"?this.split(""):n,i=r.length>>>0;if(a(t)!="[object Function]")thrownewTypeError(t+" is not a function");if(!i&&arguments.length==1)thrownewTypeError("reduceRight of empty array with no initial value");vars,o=i-1;if(arguments.length>=2)s=arguments[1];elsedo{if(oinr){s=r[o--];break}if(--o<0)thrownewTypeError("reduceRight of empty array with no initial value")}while(!0);doointhis&&(s=t.call(void0,s,r[o],o,n));while(o--);returns});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(t){varn=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;vari=0;arguments.length>1&&(i=H(arguments[1])),i=i>=0?i:Math.max(0,r+i);for(;i<r;i++)if(iinn&&n[i]===t)returni;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(t){varn=g&&a(this)=="[object String]"?this.split(""):F(this),r=n.length>>>0;if(!r)return-1;vari=r-1;arguments.length>1&&(i=Math.min(i,H(arguments[1]))),i=i>=0?i:r-Math.abs(i);for(;i>=0;i--)if(iinn&&t===n[i])returni;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(t){returnt.__proto__||(t.constructor?t.constructor.prototype:o)});if(!Object.getOwnPropertyDescriptor){vary="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(t,n){if(typeoft!="object"&&typeoft!="function"||t===null)thrownewTypeError(y+t);if(!f(t,n))return;varr,i,s;r={enumerable:!0,configurable:!0};if(d){varu=t.__proto__;t.__proto__=o;vari=h(t,n),s=p(t,n);t.__proto__=u;if(i||s)returni&&(r.get=i),s&&(r.set=s),r}returnr.value=t[n],r}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(t){returnObject.keys(t)});if(!Object.create){varb;Object.prototype.__proto__===null?b=function(){return{__proto__:null}}:b=function(){vare={};for(vartine)e[t]=null;returne.constructor=e.hasOwnProperty=e.propertyIsEnumerable=e.isPrototypeOf=e.toLocaleString=e.toString=e.valueOf=e.__proto__=null,e},Object.create=function(t,n){varr;if(t===null)r=b();else{if(typeoft!="object")thrownewTypeError("typeof prototype["+typeoft+"] != 'object'");vari=function(){};i.prototype=t,r=newi,r.__proto__=t}returnn!==void0&&Object.defineProperties(r,n),r}}if(Object.defineProperty){varE=w({}),S=typeofdocument=="undefined"||w(document.createElement("div"));if(!E||!S)varx=Object.defineProperty}if(!Object.defineProperty||x){varT="Property description must be an object: ",N="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(t,n,r){if(typeoft!="object"&&typeoft!="function"||t===null)thrownewTypeError(N+t);if(typeofr!="object"&&typeofr!="function"||r===null)thrownewTypeError(T+r);if(x)try{returnx.call(Object,t,n,r)}catch(i){}if(f(r,"value"))if(d&&(h(t,n)||p(t,n))){vars=t.__proto__;t.__proto__=o,deletet[n],t[n]=r.value,t.__proto__=s}elset[n]=r.value;else{if(!d)thrownewTypeError(C);f(r,"get")&&l(t,n,r.get),f(r,"set")&&c(t,n,r.set)}returnt}}Object.defineProperties||(Object.defineProperties=function(t,n){for(varrinn)f(n,r)&&Object.defineProperty(t,r,n[r]);returnt}),Object.seal||(Object.seal=function(t){returnt}),Object.freeze||(Object.freeze=function(t){returnt});try{Object.freeze(function(){})}catch(k){Object.freeze=function(t){returnfunction(n){returntypeofn=="function"?n:t(n)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(t){returnt}),Object.isSealed||(Object.isSealed=function(t){return!1}),Object.isFrozen||(Object.isFrozen=function(t){return!1}),Object.isExtensible||(Object.isExtensible=function(t){if(Object(t)===t)thrownewTypeError;varn="";while(f(t,n))n+="?";t[n]=!0;varr=f(t,n);returndeletet[n],r});if(!Object.keys){varL=!0,A=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],O=A.length;for(varMin{toString:null})L=!1;Object.keys=functionI(e){if(typeofe!="object"&&typeofe!="function"||e===null)thrownewTypeError("Object.keys called on a non-object");varI=[];for(vartine)f(e,t)&&I.push(t);if(L)for(varn=0,r=O;n<r;n++){vari=A[n];f(e,i)&&I.push(i)}returnI}}Date.now||(Date.now=function(){return(newDate).getTime()});var_=" \n\f\r \u00a0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff";if(!String.prototype.trim||_.trim()){_="["+_+"]";varD=newRegExp("^"+_+_+"*"),P=newRegExp(_+_+"*$");String.prototype.trim=function(){returnString(this).replace(D,"").replace(P,"")}}varF=function(e){if(e==null)thrownewTypeError("can't convert "+e+" to object");returnObject(e)}})