UNPKG

node-wings

Version:

node-wings ==========

1 lines 80.8 kB
"no use strict";(function(e){if(typeof e.window!="undefined"&&e.document)return;e.console={log:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})},error:function(){var e=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:e})}},e.window=e,e.ace=e,e.normalizeModule=function(e,t){if(t.indexOf("!")!==-1){var n=t.split("!");return normalizeModule(e,n[0])+"!"+normalizeModule(e,n[1])}if(t.charAt(0)=="."){var r=e.split("/").slice(0,-1).join("/");t=r+"/"+t;while(t.indexOf(".")!==-1&&i!=t){var i=t;t=t.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return t},e.require=function(e,t){t||(t=e,e=null);if(!t.charAt)throw new Error("worker.js require() accepts only (parentId, id) as arguments");t=normalizeModule(e,t);var n=require.modules[t];if(n)return n.initialized||(n.initialized=!0,n.exports=n.factory().exports),n.exports;var r=t.split("/");r[0]=require.tlns[r[0]]||r[0];var i=r.join("/")+".js";return require.id=t,importScripts(i),require(e,t)},require.modules={},require.tlns={},e.define=function(e,t,n){arguments.length==2?(n=t,typeof e!="string"&&(t=e,e=require.id)):arguments.length==1&&(n=e,e=require.id);if(e.indexOf("text!")===0)return;var r=function(t,n){return require(e,t,n)};require.modules[e]={factory:function(){var e={exports:{}},t=n(r,e.exports,e);return t&&(e.exports=t),e}}},e.initBaseUrls=function(e){require.tlns=e},e.initSender=function(){var e=require("ace/lib/event_emitter").EventEmitter,t=require("ace/lib/oop"),n=function(){};return function(){t.implement(this,e),this.callback=function(e,t){postMessage({type:"call",id:t,data:e})},this.emit=function(e,t){postMessage({type:"event",name:e,data:t})}}.call(n.prototype),new n},e.main=null,e.sender=null,e.onmessage=function(e){var t=e.data;if(t.command){if(!main[t.command])throw new Error("Unknown command:"+t.command);main[t.command].apply(main,t.args)}else if(t.init){initBaseUrls(t.tlns),require("ace/lib/es5-shim"),sender=initSender();var n=require(t.module)[t.classname];main=new n(sender)}else t.event&&sender&&sender._emit(t.event,t.data)}})(this),define("ace/lib/event_emitter",["require","exports","module"],function(e,t,n){var r={},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={});var n=this._eventRegistry[e]||[],r=this._defaultHandlers[e];if(!n.length&&!r)return;if(typeof t!="object"||!t)t={};t.type||(t.type=e),t.stopPropagation||(t.stopPropagation=i),t.preventDefault||(t.preventDefault=s);for(var o=0;o<n.length;o++){n[o](t,this);if(t.propagationStopped)break}if(r&&!t.defaultPrevented)return r(t,this)},r._signal=function(e,t){var n=(this._eventRegistry||{})[e];if(!n)return;for(var r=0;r<n.length;r++)n[r](t,this)},r.once=function(e,t){var n=this;t&&this.addEventListener(e,function r(){n.removeEventListener(e,r),t.apply(null,arguments)})},r.setDefaultHandler=function(e,t){var n=this._defaultHandlers;n||(n=this._defaultHandlers={_disabled_:{}});if(n[e]){var r=n[e],i=n._disabled_[e];i||(n._disabled_[e]=i=[]),i.push(r);var s=i.indexOf(t);s!=-1&&i.splice(s,1)}n[e]=t},r.removeDefaultHandler=function(e,t){var n=this._defaultHandlers;if(!n)return;var r=n._disabled_[e];if(n[e]==t){var i=n[e];r&&this.setDefaultHandler(e,r.pop())}else if(r){var s=r.indexOf(t);s!=-1&&r.splice(s,1)}},r.on=r.addEventListener=function(e,t,n){this._eventRegistry=this._eventRegistry||{};var r=this._eventRegistry[e];return r||(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||{};var n=this._eventRegistry[e];if(!n)return;var r=n.indexOf(t);r!==-1&&n.splice(r,1)},r.removeAllListeners=function(e){this._eventRegistry&&(this._eventRegistry[e]=[])},t.EventEmitter=r}),define("ace/lib/oop",["require","exports","module"],function(e,t,n){t.inherits=function(){var e=function(){};return function(t,n){e.prototype=n.prototype,t.super_=n.prototype,t.prototype=new e,t.prototype.constructor=t}}(),t.mixin=function(e,t){for(var n in t)e[n]=t[n];return e},t.implement=function(e,n){t.mixin(e,n)}}),define("ace/lib/es5-shim",["require","exports","module"],function(e,t,n){function r(){}function i(e){try{return Object.defineProperty(e,"sentinel",{}),"sentinel"in e}catch(t){}}function s(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 o(e){var t=typeof e;return e===null||t==="undefined"||t==="boolean"||t==="number"||t==="string"}function u(e){var t,n,r;if(o(e))return e;n=e.valueOf;if(typeof n=="function"){t=n.call(e);if(o(t))return t}r=e.toString;if(typeof r=="function"){t=r.call(e);if(o(t))return t}throw new TypeError}Function.prototype.bind||(Function.prototype.bind=function(e){var t=this;if(typeof t!="function")throw new TypeError("Function.prototype.bind called on incompatible "+t);var n=c.call(arguments,1),i=function(){if(this instanceof i){var r=t.apply(this,n.concat(c.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(c.call(arguments)))};return t.prototype&&(r.prototype=t.prototype,i.prototype=new r,r.prototype=null),i});var a=Function.prototype.call,f=Array.prototype,l=Object.prototype,c=f.slice,h=a.bind(l.toString),p=a.bind(l.hasOwnProperty),d,v,m,g,y;if(y=p(l,"__defineGetter__"))d=a.bind(l.__defineGetter__),v=a.bind(l.__defineSetter__),m=a.bind(l.__lookupGetter__),g=a.bind(l.__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=c.call(arguments,2),s=i.length;if(e===n)s&&this.push.apply(this,i);else{var o=Math.min(t,n-e),u=e+o,a=u+s-o,f=n-u,l=n-o;if(a<u)for(var h=0;h<f;++h)this[a+h]=this[u+h];else if(a>u)for(h=f;h--;)this[a+h]=this[u+h];if(s&&e===l)this.length=l,this.push.apply(this,i);else{this.length=l+s;for(h=0;h<s;++h)this[e+h]=i[h]}}return r};else{var b=Array.prototype.splice;Array.prototype.splice=function(e,t){return arguments.length?b.apply(this,[e===void 0?0:e,t===void 0?this.length-e:t].concat(c.call(arguments,2))):[]}}Array.isArray||(Array.isArray=function(e){return h(e)=="[object Array]"});var w=Object("a"),E=w[0]!="a"||!(0 in w);Array.prototype.forEach||(Array.prototype.forEach=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=arguments[1],i=-1,s=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError;while(++i<s)i in n&&e.call(r,n[i],i,t)}),Array.prototype.map||(Array.prototype.map=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=Array(r),s=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var o=0;o<r;o++)o in n&&(i[o]=e.call(s,n[o],o,t));return i}),Array.prototype.filter||(Array.prototype.filter=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=[],s,o=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var u=0;u<r;u++)u in n&&(s=n[u],e.call(o,s,u,t)&&i.push(s));return i}),Array.prototype.every||(Array.prototype.every=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&!e.call(i,n[s],s,t))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0,i=arguments[1];if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");for(var s=0;s<r;s++)if(s in n&&e.call(i,n[s],s,t))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduce of empty array with no initial value");var i=0,s;if(arguments.length>=2)s=arguments[1];else do{if(i in n){s=n[i++];break}if(++i>=r)throw new TypeError("reduce of empty array with no initial value")}while(!0);for(;i<r;i++)i in n&&(s=e.call(void 0,s,n[i],i,t));return s}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(e){var t=F(this),n=E&&h(this)=="[object String]"?this.split(""):t,r=n.length>>>0;if(h(e)!="[object Function]")throw new TypeError(e+" is not a function");if(!r&&arguments.length==1)throw new TypeError("reduceRight of empty array with no initial value");var i,s=r-1;if(arguments.length>=2)i=arguments[1];else do{if(s in n){i=n[s--];break}if(--s<0)throw new TypeError("reduceRight of empty array with no initial value")}while(!0);do s in this&&(i=e.call(void 0,i,n[s],s,t));while(s--);return i});if(!Array.prototype.indexOf||[0,1].indexOf(1,2)!=-1)Array.prototype.indexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=0;arguments.length>1&&(r=s(arguments[1])),r=r>=0?r:Math.max(0,n+r);for(;r<n;r++)if(r in t&&t[r]===e)return r;return-1};if(!Array.prototype.lastIndexOf||[0,1].lastIndexOf(0,-3)!=-1)Array.prototype.lastIndexOf=function(e){var t=E&&h(this)=="[object String]"?this.split(""):F(this),n=t.length>>>0;if(!n)return-1;var r=n-1;arguments.length>1&&(r=Math.min(r,s(arguments[1]))),r=r>=0?r:n-Math.abs(r);for(;r>=0;r--)if(r in t&&e===t[r])return r;return-1};Object.getPrototypeOf||(Object.getPrototypeOf=function(e){return e.__proto__||(e.constructor?e.constructor.prototype:l)});if(!Object.getOwnPropertyDescriptor){var S="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(e,t){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(S+e);if(!p(e,t))return;var n,r,i;n={enumerable:!0,configurable:!0};if(y){var s=e.__proto__;e.__proto__=l;var r=m(e,t),i=g(e,t);e.__proto__=s;if(r||i)return r&&(n.get=r),i&&(n.set=i),n}return n.value=e[t],n}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(e){return Object.keys(e)});if(!Object.create){var x;Object.prototype.__proto__===null?x=function(){return{__proto__:null}}:x=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(e,t){var n;if(e===null)n=x();else{if(typeof e!="object")throw new TypeError("typeof prototype["+typeof e+"] != 'object'");var r=function(){};r.prototype=e,n=new r,n.__proto__=e}return t!==void 0&&Object.defineProperties(n,t),n}}if(Object.defineProperty){var T=i({}),N=typeof document=="undefined"||i(document.createElement("div"));if(!T||!N)var C=Object.defineProperty}if(!Object.defineProperty||C){var k="Property description must be an object: ",L="Object.defineProperty called on non-object: ",A="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(e,t,n){if(typeof e!="object"&&typeof e!="function"||e===null)throw new TypeError(L+e);if(typeof n!="object"&&typeof n!="function"||n===null)throw new TypeError(k+n);if(C)try{return C.call(Object,e,t,n)}catch(r){}if(p(n,"value"))if(y&&(m(e,t)||g(e,t))){var i=e.__proto__;e.__proto__=l,delete e[t],e[t]=n.value,e.__proto__=i}else e[t]=n.value;else{if(!y)throw new TypeError(A);p(n,"get")&&d(e,t,n.get),p(n,"set")&&v(e,t,n.set)}return e}}Object.defineProperties||(Object.defineProperties=function(e,t){for(var n in t)p(t,n)&&Object.defineProperty(e,n,t[n]);return e}),Object.seal||(Object.seal=function(e){return e}),Object.freeze||(Object.freeze=function(e){return e});try{Object.freeze(function(){})}catch(O){Object.freeze=function(e){return function(t){return typeof t=="function"?t:e(t)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(e){return e}),Object.isSealed||(Object.isSealed=function(e){return!1}),Object.isFrozen||(Object.isFrozen=function(e){return!1}),Object.isExtensible||(Object.isExtensible=function(e){if(Object(e)===e)throw new TypeError;var t="";while(p(e,t))t+="?";e[t]=!0;var n=p(e,t);return delete e[t],n});if(!Object.keys){var M=!0,_=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],D=_.length;for(var P in{toString:null})M=!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)p(e,t)&&I.push(t);if(M)for(var n=0,r=D;n<r;n++){var i=_[n];p(e,i)&&I.push(i)}return I}}Date.now||(Date.now=function(){return(new Date).getTime()});var H=" \n \f\r   ᠎              \u2028\u2029";if(!String.prototype.trim||H.trim()){H="["+H+"]";var B=new RegExp("^"+H+H+"*"),j=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(B,"").replace(j,"")}}var F=function(e){if(e==null)throw new TypeError("can't convert "+e+" to object");return Object(e)}}),define("ace/mode/javascript_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/javascript/jshint"],function(require,exports,module){function startRegex(e){return RegExp("^("+e.join("|")+")")}var oop=require("../lib/oop"),Mirror=require("../worker/mirror").Mirror,lint=require("./javascript/jshint").JSHINT,disabledWarningsRe=startRegex(["Bad for in variable '(.+)'.",'Missing "use strict"']),errorsRe=startRegex(["Unexpected","Expected ","Confusing (plus|minus)","\\{a\\} unterminated regular expression","Unclosed ","Unmatched ","Unbegun comment","Bad invocation","Missing space after","Missing operator at"]),infoRe=startRegex(["Expected an assignment","Bad escapement of EOL","Unexpected comma","Unexpected space","Missing radix parameter.","A leading decimal point can","\\['{a}'\\] is better written in dot notation.","'{a}' used out of scope"]),JavaScriptWorker=exports.JavaScriptWorker=function(e){Mirror.call(this,e),this.setTimeout(500),this.setOptions()};oop.inherits(JavaScriptWorker,Mirror),function(){this.setOptions=function(e){this.options=e||{es5:!0,esnext:!0,devel:!0,browser:!0,node:!0,laxcomma:!0,laxbreak:!0,lastsemic:!0,onevar:!1,passfail:!1,maxerr:100,expr:!0,multistr:!0,globalstrict:!0},this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.changeOptions=function(e){oop.mixin(this.options,e),this.doc.getValue()&&this.deferredUpdate.schedule(100)},this.isValidJS=function(str){try{eval("throw 0;"+str)}catch(e){if(e===0)return!0}return!1},this.onUpdate=function(){var e=this.doc.getValue();e=e.replace(/^#!.*\n/,"\n");if(!e){this.sender.emit("jslint",[]);return}var t=[],n=this.isValidJS(e)?"warning":"error";lint(e,this.options);var r=lint.errors,i=!1;for(var s=0;s<r.length;s++){var o=r[s];if(!o)continue;var u=o.raw,a="warning";if(u=="Missing semicolon."){var f=o.evidence.substr(o.character);f=f.charAt(f.search(/\S/)),n=="error"&&f&&/[\w\d{(['"]/.test(f)?(o.reason='Missing ";" before statement',a="error"):a="info"}else{if(disabledWarningsRe.test(u))continue;infoRe.test(u)?a="info":errorsRe.test(u)?(i=!0,a=n):u=="'{a}' is not defined."?a="warning":u=="'{a}' is defined but never used."&&(a="info")}t.push({row:o.line-1,column:o.character-1,text:o.reason,type:a,raw:u}),i}this.sender.emit("jslint",t)}}.call(JavaScriptWorker.prototype)}),define("ace/worker/mirror",["require","exports","module","ace/document","ace/lib/lang"],function(e,t,n){var r=e("../document").Document,i=e("../lib/lang"),s=t.Mirror=function(e){this.sender=e;var t=this.doc=new r(""),n=this.deferredUpdate=i.delayedCall(this.onUpdate.bind(this)),s=this;e.on("change",function(e){t.applyDeltas(e.data),n.schedule(s.$timeout)})};(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(){}}).call(s.prototype)}),define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=e("./range").Range,o=e("./anchor").Anchor,u=function(e){this.$lines=[],e.length==0?this.$lines=[""]:Array.isArray(e)?this._insertLines(0,e):this.insert({row:0,column:0},e)};(function(){r.implement(this,i),this.setValue=function(e){var t=this.getLength();this.remove(new s(0,0,t,this.getLine(t-1).length)),this.insert({row:0,column:0},e)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(e,t){return new o(this,e,t)},"aaa".split(/a/).length==0?this.$split=function(e){return e.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(e){return e.split(/\r\n|\r|\n/)},this.$detectNewLine=function(e){var t=e.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=t?t[1]:"\n"},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine}},this.$autoNewLine="\n",this.$newLineMode="auto",this.setNewLineMode=function(e){if(this.$newLineMode===e)return;this.$newLineMode=e},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(e){return e=="\r\n"||e=="\r"||e=="\n"},this.getLine=function(e){return this.$lines[e]||""},this.getLines=function(e,t){return this.$lines.slice(e,t+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(e){if(e.start.row==e.end.row)return this.$lines[e.start.row].substring(e.start.column,e.end.column);var t=this.getLines(e.start.row,e.end.row);t[0]=(t[0]||"").substring(e.start.column);var n=t.length-1;return e.end.row-e.start.row==n&&(t[n]=t[n].substring(0,e.end.column)),t.join(this.getNewLineCharacter())},this.$clipPosition=function(e){var t=this.getLength();return e.row>=t?(e.row=Math.max(0,t-1),e.column=this.getLine(t-1).length):e.row<0&&(e.row=0),e},this.insert=function(e,t){if(!t||t.length===0)return e;e=this.$clipPosition(e),this.getLength()<=1&&this.$detectNewLine(t);var n=this.$split(t),r=n.splice(0,1)[0],i=n.length==0?null:n.splice(n.length-1,1)[0];return e=this.insertInLine(e,r),i!==null&&(e=this.insertNewLine(e),e=this._insertLines(e.row,n),e=this.insertInLine(e,i||"")),e},this.insertLines=function(e,t){return e>=this.getLength()?this.insert({row:e,column:0},"\n"+t.join("\n")):this._insertLines(Math.max(e,0),t)},this._insertLines=function(e,t){if(t.length==0)return{row:e,column:0};if(t.length>65535){var n=this._insertLines(e,t.slice(65535));t=t.slice(0,65535)}var r=[e,0];r.push.apply(r,t),this.$lines.splice.apply(this.$lines,r);var i=new s(e,0,e+t.length,0),o={action:"insertLines",range:i,lines:t};return this._emit("change",{data:o}),n||i.end},this.insertNewLine=function(e){e=this.$clipPosition(e);var t=this.$lines[e.row]||"";this.$lines[e.row]=t.substring(0,e.column),this.$lines.splice(e.row+1,0,t.substring(e.column,t.length));var n={row:e.row+1,column:0},r={action:"insertText",range:s.fromPoints(e,n),text:this.getNewLineCharacter()};return this._emit("change",{data:r}),n},this.insertInLine=function(e,t){if(t.length==0)return e;var n=this.$lines[e.row]||"";this.$lines[e.row]=n.substring(0,e.column)+t+n.substring(e.column);var r={row:e.row,column:e.column+t.length},i={action:"insertText",range:s.fromPoints(e,r),text:t};return this._emit("change",{data:i}),r},this.remove=function(e){e.start=this.$clipPosition(e.start),e.end=this.$clipPosition(e.end);if(e.isEmpty())return e.start;var t=e.start.row,n=e.end.row;if(e.isMultiLine()){var r=e.start.column==0?t:t+1,i=n-1;e.end.column>0&&this.removeInLine(n,0,e.end.column),i>=r&&this._removeLines(r,i),r!=t&&(this.removeInLine(t,e.start.column,this.getLine(t).length),this.removeNewLine(e.start.row))}else this.removeInLine(t,e.start.column,e.end.column);return e.start},this.removeInLine=function(e,t,n){if(t==n)return;var r=new s(e,t,e,n),i=this.getLine(e),o=i.substring(t,n),u=i.substring(0,t)+i.substring(n,i.length);this.$lines.splice(e,1,u);var a={action:"removeText",range:r,text:o};return this._emit("change",{data:a}),r.start},this.removeLines=function(e,t){return e<0||t>=this.getLength()?this.remove(new s(e,0,t+1,0)):this._removeLines(e,t)},this._removeLines=function(e,t){var n=new s(e,0,t+1,0),r=this.$lines.splice(e,t-e+1),i={action:"removeLines",range:n,nl:this.getNewLineCharacter(),lines:r};return this._emit("change",{data:i}),r},this.removeNewLine=function(e){var t=this.getLine(e),n=this.getLine(e+1),r=new s(e,t.length,e+1,0),i=t+n;this.$lines.splice(e,2,i);var o={action:"removeText",range:r,text:this.getNewLineCharacter()};this._emit("change",{data:o})},this.replace=function(e,t){if(t.length==0&&e.isEmpty())return e.start;if(t==this.getTextRange(e))return e.end;this.remove(e);if(t)var n=this.insert(e.start,t);else n=e.start;return n},this.applyDeltas=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this.insertLines(r.start.row,n.lines):n.action=="insertText"?this.insert(r.start,n.text):n.action=="removeLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="removeText"&&this.remove(r)}},this.revertDeltas=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t],r=s.fromPoints(n.range.start,n.range.end);n.action=="insertLines"?this._removeLines(r.start.row,r.end.row-1):n.action=="insertText"?this.remove(r):n.action=="removeLines"?this._insertLines(r.start.row,n.lines):n.action=="removeText"&&this.insert(r.start,n.text)}},this.indexToPosition=function(e,t){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length;for(var i=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){var n=this.$lines||this.getAllLines(),r=this.getNewLineCharacter().length,i=0,s=Math.min(e.row,n.length);for(var o=t||0;o<s;++o)i+=n[o].length+r;return i+e.column}}).call(u.prototype),t.Document=u}),define("ace/range",["require","exports","module"],function(e,t,n){var r=function(e,t){return e.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){return this.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){return this.compare(e,t)==0},this.compareRange=function(e){var t,n=e.end,r=e.start;return t=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){return this.compare(e.row,e.column)},this.containsRange=function(e){return this.comparePoint(e.start)==0&&this.comparePoint(e.end)==0},this.intersects=function(e){var t=this.compareRange(e);return t==-1||t==0||t==1},this.isEnd=function(e,t){return this.end.row==e&&this.end.column==t},this.isStart=function(e,t){return this.start.row==e&&this.start.column==t},this.setStart=function(e,t){typeof e=="object"?(this.start.column=e.column,this.start.row=e.row):(this.start.row=e,this.start.column=t)},this.setEnd=function(e,t){typeof e=="object"?(this.end.column=e.column,this.end.row=e.row):(this.end.row=e,this.end.column=t)},this.inside=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)||this.isStart(e,t)?!1:!0:!1},this.insideStart=function(e,t){return this.compare(e,t)==0?this.isEnd(e,t)?!1:!0:!1},this.insideEnd=function(e,t){return this.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){return this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.compareEnd=function(e,t){return this.end.row==e&&this.end.column==t?1:this.compare(e,t)},this.compareInside=function(e,t){return this.end.row==e&&this.end.column==t?1:this.start.row==e&&this.start.column==t?-1:this.compare(e,t)},this.clipRows=function(e,t){if(this.end.row>t)var n={row:t+1,column:0};else if(this.end.row<e)var n={row:e,column:0};if(this.start.row>t)var r={row:t+1,column:0};else if(this.start.row<e)var r={row:e,column:0};return i.fromPoints(r||this.start,n||this.end)},this.extend=function(e,t){var n=this.compare(e,t);if(n==0)return this;if(n==-1)var r={row:e,column:t};else var s={row:e,column:t};return i.fromPoints(r||this.start,s||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return i.fromPoints(this.start,this.end)},this.collapseRows=function(){return this.end.column==0?new i(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new i(this.start.row,0,this.end.row,0)},this.toScreenRange=function(e){var t=e.documentToScreenPosition(this.start),n=e.documentToScreenPosition(this.end);return new i(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){return new i(e.row,e.column,t.row,t.column)},i.comparePoints=r,i.comparePoints=function(e,t){return e.row-t.row||e.column-t.column},t.Range=i}),define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(e,t,n){var r=e("./lib/oop"),i=e("./lib/event_emitter").EventEmitter,s=t.Anchor=function(e,t,n){this.document=e,typeof n=="undefined"?this.setPosition(t.row,t.column):this.setPosition(t,n),this.$onChange=this.onChange.bind(this),e.on("change",this.$onChange)};(function(){r.implement(this,i),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(e){var t=e.data,n=t.range;if(n.start.row==n.end.row&&n.start.row!=this.row)return;if(n.start.row>this.row)return;if(n.start.row==this.row&&n.start.column>this.column)return;var r=this.row,i=this.column,s=n.start,o=n.end;t.action==="insertText"?s.row===r&&s.column<=i?s.row===o.row?i+=o.column-s.column:(i-=s.column,r+=o.row-s.row):s.row!==o.row&&s.row<r&&(r+=o.row-s.row):t.action==="insertLines"?s.row<=r&&(r+=o.row-s.row):t.action==="removeText"?s.row===r&&s.column<i?o.column>=i?i=s.column:i=Math.max(0,i-(o.column-s.column)):s.row!==o.row&&s.row<r?(o.row===r&&(i=Math.max(0,i-o.column)+s.column),r-=o.row-s.row):o.row===r&&(r-=o.row-s.row,i=Math.max(0,i-o.column)+s.column):t.action=="removeLines"&&s.row<=r&&(o.row<=r?r-=o.row-s.row:(r=s.row,i=0)),this.setPosition(r,i,!0)},this.setPosition=function(e,t,n){var r;n?r={row:e,column:t}:r=this.$clipPositionToDocument(e,t);if(this.row==r.row&&this.column==r.column)return;var i={row:this.row,column:this.column};this.row=r.row,this.column=r.column,this._emit("change",{old:i,value:r})},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.$clipPositionToDocument=function(e,t){var n={};return e>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):e<0?(n.row=0,n.column=0):(n.row=e,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,t))),t<0&&(n.column=0),n}}).call(s.prototype)}),define("ace/lib/lang",["require","exports","module"],function(e,t,n){t.stringReverse=function(e){return e.split("").reverse().join("")},t.stringRepeat=function(e,t){var n="";while(t>0){t&1&&(n+=e);if(t>>=1)e+=e}return n};var r=/^\s\s*/,i=/\s\s*$/;t.stringTrimLeft=function(e){return e.replace(r,"")},t.stringTrimRight=function(e){return e.replace(i,"")},t.copyObject=function(e){var t={};for(var n in e)t[n]=e[n];return t},t.copyArray=function(e){var t=[];for(var n=0,r=e.length;n<r;n++)e[n]&&typeof e[n]=="object"?t[n]=this.copyObject(e[n]):t[n]=e[n];return t},t.deepCopy=function(e){if(typeof e!="object")return e;var t=e.constructor();for(var n in e)typeof e[n]=="object"?t[n]=this.deepCopy(e[n]):t[n]=e[n];return t},t.arrayToMap=function(e){var t={};for(var n=0;n<e.length;n++)t[e[n]]=1;return t},t.createMap=function(e){var t=Object.create(null);for(var n in e)t[n]=e[n];return t},t.arrayRemove=function(e,t){for(var n=0;n<=e.length;n++)t===e[n]&&e.splice(n,1)},t.escapeRegExp=function(e){return e.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1")},t.escapeHTML=function(e){return e.replace(/&/g,"&#38;").replace(/"/g,"&#34;").replace(/'/g,"&#39;").replace(/</g,"&#60;")},t.getMatchOffsets=function(e,t){var n=[];return e.replace(t,function(e){n.push({offset:arguments[arguments.length-2],length:e.length})}),n},t.deferredCall=function(e){var t=null,n=function(){t=null,e()},r=function(e){return r.cancel(),t=setTimeout(n,e||0),r};return r.schedule=r,r.call=function(){return this.cancel(),e(),r},r.cancel=function(){return clearTimeout(t),t=null,r},r},t.delayedCall=function(e,t){var n=null,r=function(){n=null,e()},i=function(e){n&&clearTimeout(n),n=setTimeout(r,e||t)};return i.delay=i,i.schedule=function(e){n==null&&(n=setTimeout(r,e||0))},i.call=function(){this.cancel(),e()},i.cancel=function(){n&&clearTimeout(n),n=null},i.isPending=function(){return n},i}}),define("ace/mode/javascript/jshint",["require","exports","module"],function(e,t,n){var r=function(){function e(){}function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function n(e,t){ht[e]===undefined&&ct[e]===undefined&&d("Bad option: '"+e+"'.",t)}function i(e){return Object.prototype.toString.call(e)==="[object String]"}function s(e){return e>="a"&&e<="z￿"||e>="A"&&e<="Z￿"}function o(e){return e>="0"&&e<="9"}function u(e,t){return e?!e.identifier||e.value!==t?!1:!0:!1}function a(e,t){return e.replace(/\{([^{}]*)\}/g,function(e,n){var r=t[n];return typeof r=="string"||typeof r=="number"?r:e})}function f(e,n){var i;for(i in n)t(n,i)&&!t(r.blacklist,i)&&(e[i]=n[i])}function l(){Object.keys(r.blacklist).forEach(function(e){delete Ft[e]})}function c(){jt.couch&&f(Ft,mt),jt.rhino&&f(Ft,zt),jt.prototypejs&&f(Ft,Rt),jt.node&&(f(Ft,Ht),jt.globalstrict=!0),jt.devel&&f(Ft,yt),jt.dojo&&f(Ft,bt),jt.browser&&f(Ft,vt),jt.nonstandard&&f(Ft,$t),jt.jquery&&f(Ft,Lt),jt.mootools&&f(Ft,Dt),jt.worker&&f(Ft,nn),jt.wsh&&f(Ft,rn),jt.esnext&&en(),jt.globalstrict&&jt.strict!==!1&&(jt.strict=!0),jt.yui&&f(Ft,sn)}function h(e,t,n){var r=Math.floor(t/At.length*100);throw{name:"JSHintError",line:t,character:n,message:e+" ("+r+"% scanned).",raw:e}}function p(e,t,n,i){return r.undefs.push([e,t,n,i])}function d(e,t,n,i,s,o){var u,f,l;return t=t||Pt,t.id==="(end)"&&(t=Gt),f=t.line||0,u=t.from||0,l={id:"(error)",raw:e,evidence:At[f-1]||"",line:f,character:u,scope:r.scope,a:n,b:i,c:s,d:o},l.reason=a(e,l),r.errors.push(l),jt.passfail&&h("Stopping. ",f,u),tn+=1,tn>=jt.maxerr&&h("Too many errors.",f,u),l}function v(e,t,n,r,i,s,o){return d(e,{line:t,from:n},r,i,s,o)}function m(e,t,n,r,i,s){d(e,t,n,r,i,s)}function g(e,t,n,r,i,s,o){return m(e,{line:t,from:n},r,i,s,o)}function y(e,t){var n;return n={id:"(internal)",elem:e,value:t},r.internals.push(n),n}function b(e,n,r){e==="hasOwnProperty"&&d("'hasOwnProperty' is a really bad name."),n==="exception"&&t(wt["(context)"],e)&&wt[e]!==!0&&!jt.node&&d("Value of '{a}' may be overwritten in IE.",Pt,e),t(wt,e)&&!wt["(global)"]&&(wt[e]===!0?jt.latedef&&d("'{a}' was used before it was defined.",Pt,e):!jt.shadow&&n!=="exception"&&d("'{a}' is already defined.",Pt,e)),wt[e]=n,r&&(wt["(tokens)"][e]=r),wt["(global)"]?(xt[e]=wt,t(Tt,e)&&(jt.latedef&&d("'{a}' was used before it was defined.",Pt,e),delete Tt[e])):Wt[e]=wt}function w(){var e=Pt,i=e.value,s=jt.quotmark,o={},u,a,h,p,d,v,g;switch(i){case"*/":m("Unbegun comment.");break;case"/*members":case"/*member":i="/*members",_t||(_t={}),a=_t,jt.quotmark=!1;break;case"/*jshint":case"/*jslint":a=jt,h=ct;break;case"/*global":a=o;break;default:m("What?")}p=vn.token();for(;;){g=!1;var y;for(;;){if(p.type==="special"&&p.value==="*/"){y=!0;break}if(p.id!=="(endline)"&&p.id!==",")break;p=vn.token()}if(y)break;i==="/*global"&&p.value==="-"&&(g=!0,p=vn.token()),p.type!=="(string)"&&p.type!=="(identifier)"&&i!=="/*members"&&m("Bad option.",p),v=vn.token();if(v.id===":"){v=vn.token(),a===_t&&m("Expected '{a}' and instead saw '{b}'.",p,"*/",":"),i==="/*jshint"&&n(p.value,p);var b=["maxstatements","maxparams","maxdepth","maxcomplexity","maxerr","maxlen","indent"];if(b.indexOf(p.value)>-1&&(i==="/*jshint"||i==="/*jslint"))u=+v.value,(typeof u!="number"||!isFinite(u)||u<=0||Math.floor(u)!==u)&&m("Expected a small integer and instead saw '{a}'.",v,v.value),p.value==="indent"&&(a.white=!0),a[p.value]=u;else if(p.value==="validthis")wt["(global)"]?m("Option 'validthis' can't be used in a global scope."):v.value==="true"||v.value==="false"?a[p.value]=v.value==="true":m("Bad option value.",v);else if(p.value==="quotmark"&&i==="/*jshint")switch(v.value){case"true":a.quotmark=!0;break;case"false":a.quotmark=!1;break;case"double":case"single":a.quotmark=v.value;break;default:m("Bad option value.",v)}else v.value==="true"||v.value==="false"?(i==="/*jslint"?(d=dt[p.value]||p.value,a[d]=v.value==="true",pt[d]!==undefined&&(a[d]=!a[d])):a[p.value]=v.value==="true",p.value==="newcap"&&(a["(explicitNewcap)"]=!0)):m("Bad option value.",v);p=vn.token()}else(i==="/*jshint"||i==="/*jslint")&&m("Missing option value.",p),a[p.value]=!1,i==="/*global"&&g===!0&&(r.blacklist[p.value]=p.value,l()),p=v}i==="/*members"&&(jt.quotmark=s),f(Ft,o);for(var w in o)t(o,w)&&(gt[w]=e);h&&c()}function E(e){var t=e||0,n=0,r;while(n<=t)r=Ot[n],r||(r=Ot[n]=vn.token()),n+=1;return r}function S(e,t){switch(Gt.id){case"(number)":Pt.id==="."&&d("A dot following a number can be confused with a decimal point.",Gt);break;case"-":(Pt.id==="-"||Pt.id==="--")&&d("Confusing minusses.");break;case"+":(Pt.id==="+"||Pt.id==="++")&&d("Confusing plusses.")}if(Gt.type==="(string)"||Gt.identifier)ft=Gt.value;e&&Pt.id!==e&&(t?Pt.id==="(end)"?d("Unmatched '{a}'.",t,t.id):d("Expected '{a}' to match '{b}' from line {c} and instead saw '{d}'.",Pt,e,t.id,t.line,Pt.value):(Pt.type!=="(identifier)"||Pt.value!==e)&&d("Expected '{a}' and instead saw '{b}'.",Pt,e,Pt.value)),qt=Gt,Gt=Pt;for(;;){Pt=Ot.shift()||vn.token();if(Pt.id==="(end)"||Pt.id==="(error)")return;if(Pt.type==="special")w();else if(Pt.id!=="(endline)")break}}function x(e,t){var n,r=!1,i=!1;Pt.id==="(end)"&&m("Unexpected early end of program.",Gt),S(),t&&(ft="anonymous",wt["(verb)"]=Gt.value);if(t===!0&&Gt.fud)n=Gt.fud();else{if(Gt.nud)n=Gt.nud();else{if(Pt.type==="(number)"&&Gt.id===".")return d("A leading decimal point can be confused with a dot: '.{a}'.",Gt,Pt.value),S(),Gt;m("Expected an identifier and instead saw '{a}'.",Gt,Gt.id)}while(e<Pt.lbp)r=Gt.value==="Array",i=Gt.value==="Object",n&&(n.value||n.first&&n.first.value)&&(n.value!=="new"||n.first&&n.first.value&&n.first.value===".")&&(r=!1,n.value!==Gt.value&&(i=!1)),S(),r&&Gt.id==="("&&Pt.id===")"&&d("Use the array literal notation [].",Gt),i&&Gt.id==="("&&Pt.id===")"&&d("Use the object literal notation {}.",Gt),Gt.led?n=Gt.led(n):m("Expected an operator and instead saw '{a}'.",Gt,Gt.id)}return n}function T(e,t){e=e||Gt,t=t||Pt,jt.white&&e.character!==t.from&&e.line===t.line&&(e.from+=e.character-e.from,d("Unexpected space after '{a}'.",e,e.value))}function N(e,t){e=e||Gt,t=t||Pt,jt.white&&(e.character!==t.from||e.line!==t.line)&&d("Unexpected space before '{a}'.",t,t.value)}function C(e,t){e=e||Gt,t=t||Pt,jt.white&&!e.comment&&e.line===t.line&&T(e,t)}function k(e,t){if(jt.white){e=e||Gt,t=t||Pt;if(e.value===";"&&t.value===";")return;e.line===t.line&&e.character===t.from&&(e.from+=e.character-e.from,d("Missing space after '{a}'.",e,e.value))}}function L(e,t){e=e||Gt,t=t||Pt,!jt.laxbreak&&e.line!==t.line?d("Bad line breaking before '{a}'.",t,t.id):jt.white&&(e=e||Gt,t=t||Pt,e.character===t.from&&(e.from+=e.character-e.from,d("Missing space after '{a}'.",e,e.value)))}function A(e){var t;jt.white&&Pt.id!=="(end)"&&(t=Ct+(e||0),Pt.from!==t&&d("Expected '{a}' to have an indentation at {b} instead at {c}.",Pt,Pt.value,t,Pt.from))}function O(e){e=e||Gt,e.line!==Pt.line&&d("Line breaking error '{a}'.",e,e.value)}function M(){Gt.line!==Pt.line?jt.laxcomma||(M.first&&(d("Comma warnings can be turned off with 'laxcomma'"),M.first=!1),d("Bad line breaking before '{a}'.",Gt,Pt.id)):!Gt.comment&&Gt.character!==Pt.from&&jt.white&&(Gt.from+=Gt.character-Gt.from,d("Unexpected space after '{a}'.",Gt,Gt.value)),S(","),k(Gt,Pt)}function _(e,t){var n=Kt[e];if(!n||typeof n!="object")Kt[e]=n={id:e,lbp:t,value:e};return n}function D(e){return _(e,0)}function P(e,t){var n=D(e);return n.identifier=n.reserved=!0,n.fud=t,n}function H(e,t){var n=P(e,t);return n.block=!0,n}function B(e){var t=e.id.charAt(0);if(t>="a"&&t<="z"||t>="A"&&t<="Z")e.identifier=e.reserved=!0;return e}function j(e,t){var n=_(e,150);return B(n),n.nud=typeof t=="function"?t:function(){this.right=x(150),this.arity="unary";if(this.id==="++"||this.id==="--")jt.plusplus?d("Unexpected use of '{a}'.",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!=="["&&d("Bad operand.",this);return this},n}function F(e,t){var n=D(e);return n.type=e,n.nud=t,n}function I(e,t){var n=F(e,t);return n.identifier=n.reserved=!0,n}function q(e,t){return I(e,function(){return typeof t=="function"&&t(this),this})}function R(e,t,n,r){var i=_(e,n);return B(i),i.led=function(i){return r||(L(qt,Gt),k(Gt,Pt)),e==="in"&&i.id==="!"&&d("Confusing use of '{a}'.",i,"!"),typeof t=="function"?t(i,this):(this.left=i,this.right=x(n),this)},i}function U(e,t){var n=_(e,100);return n.led=function(e){L(qt,Gt),k(Gt,Pt);var n=x(100);return u(e,"NaN")||u(n,"NaN")?d("Use the isNaN function to compare with NaN.",this):t&&t.apply(this,[e,n]),e.id==="!"&&d("Confusing use of '{a}'.",e,"!"),n.id==="!"&&d("Confusing use of '{a}'.",n,"!"),this.left=e,this.right=n,this},n}function z(e){return e&&(e.type==="(number)"&&+e.value===0||e.type==="(string)"&&e.value===""||e.type==="null"&&!jt.eqnull||e.type==="true"||e.type==="false"||e.type==="undefined")}function W(e){return _(e,20).exps=!0,R(e,function(e,t){t.left=e,Ft[e.value]===!1&&Wt[e.value]["(global)"]===!0?d("Read only.",e):e["function"]&&d("'{a}' is a function.",e,e.value);if(e){jt.esnext&&wt[e.value]==="const"&&d("Attempting to override '{a}' which is a constant",e,e.value);if(e.id==="."||e.id==="[")return(!e.left||e.left.value==="arguments")&&d("Bad assignment.",t),t.right=x(19),t;if(e.identifier&&!e.reserved)return wt[e.value]==="exception"&&d("Do not assign to the exception parameter.",e),t.right=x(19),t;e===Kt["function"]&&d("Expected an identifier in an assignment and instead saw a function invocation.",Gt)}m("Bad assignment.",t)},20)}function X(e,t,n){var r=_(e,n);return B(r),r.led=typeof t=="function"?t:function(e){return jt.bitwise&&d("Unexpected use of '{a}'.",this,this.id),this.left=e,this.right=x(n),this},r}function V(e){return _(e,20).exps=!0,R(e,function(e,t){jt.bitwise&&d("Unexpected use of '{a}'.",t,t.id),k(qt,Gt),k(Gt,Pt);if(e)return e.id==="."||e.id==="["||e.identifier&&!e.reserved?(x(19),t):(e===Kt["function"]&&d("Expected an identifier in an assignment, and instead saw a function invocation.",Gt),t);m("Bad assignment.",t)},20)}function $(e){var t=_(e,150);return t.led=function(e){return jt.plusplus?d("Unexpected use of '{a}'.",this,this.id):(!e.identifier||e.reserved)&&e.id!=="."&&e.id!=="["&&d("Bad operand.",this),this.left=e,this},t}function J(e){if(Pt.identifier)return S(),Gt.reserved&&!jt.es5&&(!e||Gt.value!=="undefined")&&d("Expected an identifier and instead saw '{a}' (a reserved word).",Gt,Gt.id),Gt.value}function K(e){var t=J(e);if(t)return t;Gt.id==="function"&&Pt.id==="("?d("Missing name in function declaration."):m("Expected an identifier and instead saw '{a}'.",Pt,Pt.value)}function Q(e){var t=0,n;if(Pt.id!==";"||Bt)return;for(;;){n=E(t);if(n.reach)return;if(n.id!=="(endline)"){if(n.id==="function"){if(!jt.latedef)break;d("Inner functions should be listed at the top of the outer function.",n);break}d("Unreachable '{a}' after '{b}'.",n,n.value,e);break}t+=1}}function G(e){var t=Ct,n,r=Wt,i=Pt;if(i.id===";"){S(";");return}i.identifier&&!i.reserved&&E().id===":"&&(S(),S(":"),Wt=Object.create(r),b(i.value,"label"),!Pt.labelled&&Pt.value!=="{"&&d("Label '{a}' on {b} statement.",Pt,i.value,Pt.value),pn.test(i.value+":")&&d("Label '{a}' looks like a javascript url.",i,i.value),Pt.label=i.value,i=Pt);if(i.id==="{"){et(!0,!0);return}e||A(),n=x(0,!0);if(!i.block){!jt.expr&&(!n||!n.exps)?d("Expected an assignment or function call and instead saw an expression.",Gt):jt.nonew&&n.id==="("&&n.left.id==="new"&&d("Do not use 'new' for side effects.",i);if(Pt.id===",")return M();Pt.id!==";"?jt.asi||(!jt.lastsemic||Pt.id!=="}"||Pt.line!==Gt.line)&&v("Missing semicolon.",Gt.line,Gt.character):(T(Gt,Pt),S(";"),k(Gt,Pt))}return Ct=t,Wt=r,n}function Y(e){var t=[],n;while(!Pt.reach&&Pt.id!=="(end)")Pt.id===";"?(n=E(),(!n||n.id!=="(")&&d("Unnecessary semicolon."),S(";")):t.push(G(e===Pt.line));return t}function Z(){var e,t,n;for(;;){if(Pt.id==="(string)"){t=E(0);if(t.id==="(endline)"){e=1;do n=E(e),e+=1;while(n.id==="(endline)");if(n.id!==";"){if(n.id!=="(string)"&&n.id!=="(number)"&&n.id!=="(regexp)"&&n.identifier!==!0&&n.id!=="}")break;d("Missing semicolon.",Pt)}else t=n}else if(t.id==="}")d("Missing semicolon.",t);else if(t.id!==";")break;A(),S(),Jt[Gt.value]&&d('Unnecessary directive "{a}".',Gt,Gt.value),Gt.value==="use strict"&&(jt["(explicitNewcap)"]||(jt.newcap=!0),jt.undef=!0),Jt[Gt.value]=!0,t.id===";"&&S(";");continue}break}}function et(e,n,r){var i,s=Nt,o=Ct,u,a=Wt,f,l,c;Nt=e;if(!e||!jt.funcscope)Wt=Object.create(Wt);k(Gt,Pt),f=Pt;var h=wt["(metrics)"];h.nestedBlockDepth+=1,h.verifyMaxNestedBlockDepthPerFunction();if(Pt.id==="{"){S("{"),l=Gt.line;if(Pt.id!=="}"){Ct+=jt.indent;while(!e&&Pt.from>Ct)Ct+=jt.indent;if(r){u={};for(c in Jt)t(Jt,c)&&(u[c]=Jt[c]);Z(),jt.strict&&wt["(context)"]["(global)"]&&!u["use strict"]&&!Jt["use strict"]&&d('Missing "use strict" statement.')}i=Y(l),h.statementCount+=i.length,r&&(Jt=u),Ct-=jt.indent,l!==Pt.line&&A()}else l!==Pt.line&&A();S("}",f),Ct=o}else e?((!n||jt.curly)&&d("Expected '{a}' and instead saw '{b}'.",Pt,"{",Pt.value),Bt=!0,Ct+=jt.indent,i=[G(Pt.line===Gt.line)],Ct-=jt.indent,Bt=!1):m("Expected '{a}' and instead saw '{b}'.",Pt,"{",Pt.value);wt["(verb)"]=null;if(!e||!jt.funcscope)Wt=a;return Nt=s,e&&jt.noempty&&(!i||i.length===0)&&d("Empty block."),h.nestedBlockDepth-=1,i}function tt(e){_t&&typeof _t[e]!="boolean"&&d("Unexpected /*member '{a}'.",Gt,e),typeof Mt[e]=="number"?Mt[e]+=1:Mt[e]=1}function nt(e){var t=e.value,n=e.line,r=Tt[t];typeof r=="function"&&(r=!1),r?r[r.length-1]!==n&&r.push(n):(r=[n],Tt[t]=r)}function rt(){var e=J(!0);return e||(Pt.id==="(string)"?(e=Pt.value,S()):Pt.id==="(number)"&&(e=Pt.value.toString(),S())),e}function it(){var e=Pt,t=[],n;S("("),C();if(Pt.id===")"){S(")");return}for(;;){n=K(!0),t.push(n),b(n,"unused",Gt);if(Pt.id!==",")return S(")",e),C(qt,Gt),t;M()}}function st(e,t){var n,r=jt,i=Wt;return jt=Object.create(jt),Wt=Object.create(Wt),wt={"(name)":e||'"'+ft+'"',"(line)":Pt.line,"(character)":Pt.character,"(context)":wt,"(breakage)":0,"(loopage)":0,"(metrics)":ot(Pt),"(scope)":Wt,"(statement)":t,"(tokens)":{}},n=wt,Gt.funct=wt,St.push(wt),e&&b(e,"function"),wt["(params)"]=it(),wt["(metrics)"].verifyMaxParametersPerFunction(wt["(params)"]),et(!1,!1,!0),wt["(metrics)"].verifyMaxStatementsPerFunction(),wt["(metrics)"].verifyMaxComplexityPerFunction(),Wt=i,jt=r,wt["(last)"]=Gt.line,wt["(lastcharacter)"]=Gt.character,wt=wt["(context)"],n}function ot(e){return{statementCount:0,nestedBlockDepth:-1,ComplexityCount:1,verifyMaxStatementsPerFunction:function(){if(jt.maxstatements&&this.statementCount>jt.maxstatements){var t="Too many statements per function ("+this.statementCount+").";d(t,e)}},verifyMaxParametersPerFunction:function(t){t=t||[];if(jt.maxparams&&t.length>jt.maxparams){var n="Too many parameters per function ("+t.length+").";d(n,e)}},verifyMaxNestedBlockDepthPerFunction:function(){if(jt.maxdepth&&this.nestedBlockDepth>0&&this.nestedBlockDepth===jt.maxdepth+1){var e="Blocks are nested too deeply ("+this.nestedBlockDepth+").";d(e)}},verifyMaxComplexityPerFunction:function(){var t=jt.maxcomplexity,n=this.ComplexityCount;if(t&&n>t){var r="Cyclomatic complexity is too high per function ("+n+").";d(r,e)}}}}function ut(){wt["(metrics)"].ComplexityCount+=1}function at(){function e(){var e={},t=Pt;S("{");if(Pt.id!=="}")for(;;){if(Pt.id==="(end)")m("Missing '}' to match '{' from line {a}.",Pt,t.line);else{if(Pt.id==="}"){d("Unexpected comma.",Gt);break}Pt.id===","?m("Unexpected comma.",Pt):Pt.id!=="(string)"&&d("Expected a string and instead saw {a}.",Pt,Pt.value)}e[Pt.value]===!0?d("Duplicate key '{a}'.",Pt,Pt.value):Pt.value==="__proto__"&&!jt.proto||Pt.value==="__iterator__"&&!jt.iterator?d("The '{a}' key may produce unexpected results.",Pt,Pt.value):e[Pt.value]=!0,S(),S(":"),at();if(Pt.id!==",")break;S(",")}S("}")}function t(){var e=Pt;S("[");if(Pt.id!=="]")for(;;){if(Pt.id==="(end)")m("Missing ']' to match '[' from line {a}.",Pt,e.line);else{if(Pt.id==="]"){d("Unexpected comma.",Gt);break}Pt.id===","&&m("Unexpected comma.",Pt)}at();if(Pt.id!==",")break;S(",")}S("]")}switch(Pt.id){case"{":e();break;case"[":t();break;case"true":case"false":case"null":case"(number)":case"(string)":S();break;case"-":S("-"),Gt.character!==Pt.from&&d("Unexpected space after '-'.",Gt),T(Gt,Pt),S("(number)");break;default:m("Expected a JSON value.",Pt)}}var ft,lt={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},ct={asi:!0,bitwise:!0,boss:!0,browser:!0,camelcase:!0,couch:!0,curly:!0,debug:!0,devel:!0,dojo:!0,eqeqeq:!0,eqnull:!0,es5:!0,esnext:!0,evil:!0,expr:!0,forin:!0,funcscope:!0,globalstrict:!0,immed:!0,iterator:!0,jquery:!0,lastsemic:!0,latedef:!0,laxbreak:!0,laxcomma:!0,loopfunc:!0,mootools:!0,multistr:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonew:!0,nonstandard:!0,nomen:!0,onevar:!0,onecase:!0,passfail:!0,plusplus:!0,proto:!0,prototypejs:!0,regexdash:!0,regexp:!0,rhino:!0,undef:!0,unused:!0,scripturl:!0,shadow:!0,smarttabs:!0,strict:!0,sub:!0,supernew:!0,trailing:!0,validthis:!0,withstmt:!0,white:!0,worker:!0,wsh:!0,yui:!0},ht={maxlen:!1,indent:!1,maxerr:!1,predef:!1,quotmark:!1,scope:!1,maxstatements:!1,maxdepth:!1,maxparams:!1,maxcomplexity:!1},pt={bitwise:!0,forin:!0,newcap:!0,nomen:!0,plusplus:!0,regexp:!0,undef:!0,white:!0,eqeqeq:!0,onevar:!0},dt={eqeq:"eqeqeq",vars:"onevar",windows:"wsh"},vt={ArrayBuffer:!1,ArrayBufferView:!1,Audio:!1,Blob:!1,addEventListener:!1,applicationCache:!1,atob:!1,blur:!1,btoa:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,DataView:!1,DOMParser:!1,defaultStatus:!1,document:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!1,FormData:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,HTMLAnchorElement:!1,HTMLBaseElement:!1,HTMLBlockquoteElement:!1,HTMLBodyElement:!1,HTMLBRElement:!1,HTMLButtonElement:!1,HTMLCanvasElement:!1,HTMLDirectoryElement:!1,HTMLDivElement:!1,HTMLDListElement:!1,HTMLFieldSetElement:!1,HTMLFontElement:!1,HTMLFormElement:!1,HTMLFrameElement:!1,HTMLFrameSetElement:!1,HTMLHeadElement:!1,HTMLHeadingElement:!1,HTMLHRElement:!1,HTMLHtmlElement:!1,HTMLIFrameElement:!1,HTMLImageElement:!1,HTMLInputElement:!1,HTMLIsIndexElement:!1,HTMLLabelElement:!1,HTMLLayerElement:!1,HTMLLegendElement:!1,HTMLLIElement:!1,HTMLLinkElement:!1,HTMLMapElement:!1,HTMLMenuElement:!1,HTMLMetaElement:!1,HTMLModElement:!1,HTMLObjectElement:!1,HTMLOListElement:!1,HTMLOptGroupElement:!1,HTMLOptionElement:!1,HTMLParagraphElement:!1,HTMLParamElement:!1,HTMLPreElement:!1,HTMLQuoteElement:!1,HTMLScriptElement:!1,HTMLSelectElement:!1,HTMLStyleElement:!1,HTMLTableCaptionElement:!1,HTMLTableCellElement:!1,HTMLTableColElement:!1,HTMLTableElement:!1,HTMLTableRowElement:!1,HTMLTableSectionElement:!1,HTMLTextAreaElement:!1,HTMLTitleElement:!1,HTMLUListElement:!1,HTMLVideoElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,MessageChannel:!1,MessageEvent:!1,MessagePort:!1,moveBy:!1,moveTo:!1,MutationObserver:!1,name:!1,Node:!1,NodeFilter:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,sessionStorage:!1,setInterval:!1,setTimeout:!1,SharedWorker:!1,status:!1,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XMLSerializer:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},mt={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1,provides:!1},gt,yt={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},bt={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},wt,Et=["closure","exception","global","label","outer","unused","var"],St,xt,Tt,Nt,Ct,kt,Lt={$:!1,jQuery:!1},At,Ot,Mt,_t,Dt={$:!1,$$:!1,Asset:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMEvent:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1}