-
Notifications
You must be signed in to change notification settings - Fork 36
/
jsio-compile
executable file
·97 lines (97 loc) · 242 KB
/
jsio-compile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
#!/usr/bin/env node
jsio=function init(z){function D(a){a+=".js";return c.__modules[a]||new J(a)}function J(a){this.path=a;g.splitPath(a,this)}function N(){var a=require("fs"),b=require("path");this.name="node";this.global=GLOBAL;this.getCwd=process.cwd;this.log=function(){var a;try{a=Array.prototype.map.call(arguments,function(a){return a instanceof Error&&a.message?"Error:"+a.message+"\nStack:"+a.stack+"\nArguments:"+a.arguments:typeof a=="string"?a:JSON.stringify(a)}).join(" ")+"\n"}catch(b){a=Array.prototype.join.call(arguments,
" ")+"\n"}process.stderr.write(a);return a};this.getPath=function(){var a=__filename.split("/");a.pop();return g.makeRelativePath(a.join("/")||".",this.getCwd())};if(process.compile)this.eval=process.compile;else{var d=require("vm");this.eval=function(a,b){try{return d.runInThisContext(a,b)}catch(h){throw this.log("In "+b+":\n"+h.message),h;}}}this.fetch=function(d){try{var c=b.dirname(d),h=b.basename(d),k=h.toLowerCase(),G=a.readdirSync(c)}catch(g){return!1}for(var c=0,f;f=G[c];++c)if(f.toLowerCase()==
k&&f!=h)throw"Invalid case when importing ["+d+"]. You probably meant"+f;try{return a.readFileSync(d,"utf8")}catch(i){return!1}};this.require=require}function H(){var a=window.XMLHttpRequest||function(){return new ActiveXObject("Msxml2.XMLHTTP")},b=null,d=null,j=Array.prototype.join;this.name="browser";this.global=window;if(!this.global.jsio)this.global.jsio=c;this.log=window.console&&console.log?!console.log.apply||/Android|iPhone|iPad|iPod/.test(navigator.userAgent)?function(){var a=j.call(arguments,
" ");console.log(a);return a}:function(){console.log.apply(console,arguments);return j.call(arguments," ")}:function(){return j.call(arguments," ")};this.getCwd=function(){if(!b){var a=window.location,d=a.pathname;b=a.protocol+"//"+a.host+d.substring(0,d.lastIndexOf("/")+1)}return b};this.getPath=function(){if(!d){try{for(var a=RegExp("(.*?)"+c.__filename+"(\\?.*)?$"),b=document.getElementsByTagName("script"),j=0,e;e=b[j];++j){var f=e.src.match(a);if(f){d=f[1];/^[A-Za-z]*:\/\//.test(d)&&(d=g.makeRelativePath(d,
this.getCwd()));break}}}catch(i){}d||(d=".")}return d};this.debugPath=function(a){return a};var e=typeof eval("(function(){})")=="undefined"?function(a){return(new Function("return "+a))()}:function(a,b){return window.eval(a+"\n//@ sourceURL="+b)};this.eval=function(a,b,d){try{return e(a,this.debugPath(b))}catch(c){throw c instanceof SyntaxError&&(i.log("a syntax error is preventing execution of "+b),S&&this.checkSyntax&&this.checkSyntax(d,b)),c;}};this.checkSyntax=function(a,b){try{var d=c("import util.syntax",
{suppressErrors:!0,dontExport:!0}),j=d(a);d.display(j,b)}catch(e){}};this.fetch=function(b){var d=new a;try{d.open("GET",b,!1),d.send(null)}catch(c){return i.log("e:",c),!1}return d.status==404||d.status==-1100?!1:d.responseText}}function Q(a,b,d,j){for(var e=0,h=d.length;e<h;++e){var k=d[e],g=c.__modules["preprocessors."+k];(p=typeof k=="function"?k:g&&g.exports||c("import preprocessors."+k,{dontExport:!0,dontPreprocess:!0}))&&p(a,b,j)}}function T(a,b,d,j){a||(a={});if(!a.exports)a.exports={};a.jsio=
g.bind(this,E,a,d.directory,d.filename);a.require=function(b,d){d||(d={});d.dontExport=!0;try{var c=a.jsio(b,d);if(c===!1)throw"module failed to load";else return c}catch(j){i.log("Error loading request "+b+":"),i.log(j)}};a.module={id:b,exports:a.exports};!j&&b!="base"&&(a.jsio("from base import *",{dontPreprocess:!0}),a.logging.__create(b,a));a.jsio.__jsio=c;a.jsio.__env=c.__env;a.jsio.__dir=d.directory;a.jsio.__filename=d.filename;a.jsio.path=s;return a}function E(a,b,d,j,e){for(var e=e||{},b=
b||"./",d=d||"<initial file>",a=e.exportInto||a||i.global,h=e,k=c.__cmds,G=[],w=!1,f=0,r;r=k[f];++f)if(w=r(a,j,h,G))break;if(w!==!0)throw new (typeof SyntaxError!="undefined"?SyntaxError:Error)(String(w||"invalid jsio command: jsio('"+j+"')"));h=G.length;k=h>1?{}:null;for(w=0;w<h;++w){var f=G[w],l=f.from;r=c.__modules;var A,m,u;try{a:{for(var o=b,n=d,v=l,y=e,B=g.resolveModulePath(v,o),x=0,z=void 0;B[x];++x){var D=B[x].path;if(!y.reload&&D in c.__modules){m=B[x];break a}D in R&&B.splice(x--,1)}if(!B.length){if(y.suppressErrors){m=
!1;break a}var E=Error("Module failed to load (again)");E.jsioLogged=!0;throw E;}var q;b:{for(var J=B,O=void 0,H=0,C=void 0;C=J[H];++H){var P=C.path,I=K[P];if(I){C.src=I.src;C.pre=!0;q=C;break b}O=i.fetch(P);if(O!==!1){C.src=O;q=C;break b}else R[P]=!0}q=!1}if(!q){if(y.suppressErrors){m=!1;break a}u=[];for(x=0;z=B[x];++x)u.push(z.path);throw Error(o+n+": \n\tcurrent directory: "+i.getCwd()+"\n\tlooked in:\n\t\t"+u.join("\n\t\t")+"\n\tImport Stack:\n\t\t"+L.join("\n\t\t")+"\n\tError: requested import ("+
v+") not found.");}q.friendlyPath=v;if(q.baseMod&&!(q.baseMod in s.cache))s.cache[q.baseMod]=q.basePath;if(v!="base"&&(y.reload||!y.dontPreprocess&&!q.pre))q.pre=!0,Q(o,q,["import","cls"],y);y.preprocessors&&Q(o,q,y.preprocessors,y);m=q}}catch(M){u=M}if(m)A=m.path;else if(c.__env.require){A=l;try{r[A]={exports:c.__env.require(l)},u=null}catch(N){u||(u=N)}}else if(m==!1)return!1;if(u){if(e.suppressErrors)return!1;if(!u.jsioLogged)i.log("\nError loading module:\n\trequested:",l,"\n\tfrom:",b+d,"\n\tfull request:",
j,"\n"),u.jsioLogged=!0;throw u;}m&&L.push(L.length+" : "+m.friendlyPath+" ("+m.path+")");if(!(A in r)){l=T(e.context,l,m,f.dontAddBase);r[A]=m;m.exports=l.exports;if(f.dontUseExports){var o=[";(function(){"],t=1,F;for(F in f["import"])l.exports[F]=void 0,o[t++]="if(typeof "+F+'!="undefined"&&exports.'+F+"==undefined)exports."+F+"="+F+";";o[t]="})();";m.src+=o.join("")}o=l;n=m;v=n.src;delete n.src;x="(function(_){with(_){delete _;return function $$"+n.friendlyPath.replace(/[\/.]/g,"_")+"(){"+v+"\n}}})";
n=i.eval(x,n.path,v);n=n(o);n.call(o.exports);m.exports=l.exports}L.pop();l=r[A].exports;h==1&&(k=l);if(!e.dontExport)if(f.as){f=f.as.match(/^\.*(.*?)\.*$/)[1];r=f.split(".");o=r.length-1;n=a;for(t=0;t<o;++t)if(v=r[t])n[v]||(n[v]={}),n=n[v];n[r[o]]=l;h>1&&(k[f]=l)}else if(f["import"])if(f["import"]["*"])for(t in r[A].exports)a[t]=l[t];else for(t in f["import"])a[f["import"][t]]=l[t]}return k}var S=!0,I=Array.prototype.slice,i,M=/\/$/;J.prototype.setBase=function(a,b){this.baseMod=a;this.basePath=
b};var g={bind:function(a,b){var d=I.call(arguments,2);return function(){b=typeof b=="string"?a[b]:b;return b.apply(a,d.concat(I.call(arguments,0)))}},addEndSlash:function(a){return M.test(a)?a:a+"/"},removeEndSlash:function(a){return a.replace(M,"")},makeRelativePath:function(a,b){var d=b.length;if(a.substring(0,d)==b)return a.slice((a.charAt(d)=="/")+d);for(var d=g.removeEndSlash(a).split("/"),c=g.removeEndSlash(b).split("/"),e=0;d[e]==c[e];)++e;if(e){a=d.slice(e).join("/");for(d=c.length-e;d>0;--d)a=
"../"+a}return a},buildPath:function(){return g.resolveRelativePath(Array.prototype.join.call(arguments,"/"))},resolveRelativePath:function(a){var b=a.match(/^(\w+:\/\/)(.*)$/);b&&(a=b[2]);for(a=a.replace(/\/+/g,"/").replace(/\/\.\//g,"/");a!=(a=a.replace(/(^|\/)(?!\.?\.\/)([^\/]+)\/\.\.\//g,"$1")););return b?b[1]+a:a},resolveRelativeModule:function(a,b){for(var d=[],c=a.split("."),e=c.length,h=e>1&&!c[0],k=h?0:-1;++k<e;)d.push(c[k]?c[k]:"..");return g.buildPath(h?b:"",d.join("/"))},resolveModulePath:function(a,
b){if(a.charAt(0)==".")return[D(g.resolveRelativeModule(a,b))];var d=a.split("."),c=d[0],d=d.join("/");if(s.cache.hasOwnProperty(c))return[D(g.buildPath(s.cache[c],d))];for(var e=[],h=s.get(),k=h.length,i=0;i<k;++i){var w=D(g.buildPath(h[i],d));w.setBase(c,h[i]);e.push(w)}return e},splitPath:function(a,b){b||(b={});var d=a.lastIndexOf("/")+1;b.directory=a.substring(0,d);b.filename=a.substring(d);return b}},c=g.bind(this,E,null,null,null);c.__util=g;c.__init__=init;var K;c.setCache=function(a){K=c.__srcCache=
a};c.setCache(z&&z.__srcCache||{});c.setCachedSrc=function(a,b){K[a]={path:a,src:b}};c.getCachedSrc=function(a){return K[a]};c.__filename="jsio.js";c.__cmds=[];c.__jsio=c;c.__importer=E;c.__modules={preprocessors:{}};var s={set:function(a){s.value=typeof a=="string"?[a]:a},get:function(){return s.value.slice(0)},add:function(a){for(var b=s.value,d=b.length,c=0;c<d;++c)if(b[c]==a)return;b.push(a)},remove:function(a){for(var b=s.value,d=b.length,c=0;c<d;++c)b[c]==a&&b.splice(c,1)},value:[],cache:{}};
c.path=s;c.addPath=g.bind(s,"add");c.addCmd=g.bind(c.__cmds,"push");c.setEnv=function(a){!a&&z?i=z.__env:(typeof a=="string"&&(a={node:N,browser:H}[a]||H),i=new a(g));this.__env=i;this.__dir=i.getCwd();this.path.set(i.getPath())};z?c.setEnv():typeof process!=="undefined"&&process.version?c.setEnv("node"):(typeof XMLHttpRequest!="undefined"||typeof ActiveXObject!="undefined")&&c.setEnv("browser");var R={},L=[];c.addCmd(function(a,b,d,c){if(a=b.match(/^\s*(from|external)\s+([\w.$]+)\s+(import|grab)\s+(.*)$/))return c.push({from:a[2],
dontAddBase:a[1]=="external",dontUseExports:a[3]=="grab"||a[1]=="external","import":{}}),a[4].replace(/\s*([\w.$*]+)(?:\s+as\s+([\w.$]+))?/g,function(a,b,d){c[0]["import"][b]=d||b}),!0});c.addCmd(function(a,b,d,c){if(a=b.match(/^\s*import\s+(.*)$/))return a[1].replace(/\s*([\w.$]+)(?:\s+as\s+([\w.$]+))?,?/g,function(a,b,d){c.push(d?{from:b,as:d}:{from:b,as:b})}),!0});c.addCmd(function(a,b,d,c){if(a=b.match(/^\s*[\w.0-9$\/\-]+\s*$/))return a=g.resolveRelativePath(a[0]),b=a.charAt(0)==".",a=a.replace(/\.\.\//g,
".").replace(/\.\//g,"").replace(/\//g,"."),c[0]={from:(b?".":"")+a},!0});c.install=function(){c("from base import *");GLOBAL.logger=logging.get("jsiocore")};c.clone=g.bind(null,init,c);return c}();jsio.path.set(["../../packages"]);jsio.path.cache={preprocessors:"../../packages",base:"../../packages",lib:"../../packages",util:"../../packages",std:"../../packages",math:"../../packages",math2D:"../../packages",net:"../../packages",string:"../../packages",index:"../../packages",logging:"../../packages"};
jsio.setCache({"./node_interface.js":{path:"./node_interface.js",directory:"./",filename:"node_interface.js",friendlyPath:".node_interface",pre:!0,src:'jsio("import util.optparse;");jsio("import .optsDef;");var fs=require("fs"),path=require("path");try{var crypto=require("crypto")}catch(e$$5){}var closurePath="";(function(){var a=require("path"),a=a.join(a.dirname(jsio.__filename),"jsio_minify.jar");fs.existsSync(a)&&(closurePath=a)})();exports.logger=logger;function findMinifier(a){require("path");fs.existsSync(a)&&(closurePath=a)}\nfunction usage(){util.optparse.printUsage(\'jsio_compile <initial import>\\n\\t where <initial import> looks like "import .myModule"\',optsDef)}var _compiler;exports.setCompiler=function(a){_compiler=a};exports.run=function(a,b){if(!a)var c=util.optparse(process.argv,optsDef),a=c.args,b=c.opts;b.help&&(usage(),process.exit());findMinifier(b.closurePath);_compiler.run(a,b)};exports.onError=function(a,b){usage();jsio.__env.log("");logger.error("\\n"+b);jsio.__env.log("");process.exit(1)};\nexports.onFinish=function(a,b){a.outputFile?(logger.info("Writing output to",a.outputFile),require("fs").writeFileSync(a.outputFile,b)):(logger.info("Writing output to stdout"),process.stdout.write(b))};\nexports.compress=function(a,b,c,f){var d;if(closurePath){if(c.compressorCachePath&&a)try{var g=(/^\\.\\//.test(a)?"R-"+a.substring(2):"A-"+a).replace(/\\.\\.\\//g,"--U--").replace(/\\//g,"---");d=path.join(c.compressorCachePath,g);if(crypto){var i=crypto.createHash("md5");i.update(b);var e=i.digest("hex")}else e=""+fs.statSync(a).mtime;if(fs.existsSync(d)){var h=fs.readFileSync(d,"utf8"),j=h.indexOf("\\n"),k=h.substring(0,j);logger.debug(d,"current:",e,"cached:",k);if(e==k){f(h.substring(j+1));return}}}catch(n){logger.error(n)}a=\nrequire("child_process").spawn;g=["-jar",closurePath||"jsio_minify.jar","--compilation_level","SIMPLE_OPTIMIZATIONS"];c.noIE&&g.push("--jscomp_off=internetExplorerChecks");var c=a("java",g),l=[],m=[];c.stdout.on("data",function(a){l.push(a)});c.stderr.on("data",function(a){m.push(a)});c.on("exit",function(a){if(a==0){a=l.join("");try{d&&(logger.debug("updating cache for",d,e),fs.writeFileSync(d,e+"\\n"+a))}catch(c){logger.error(c)}f(a)}else(a=m.join(""))&&logger.error(a),f(b)});c.stdin.write(b);c.stdin.end()}else f(b)};\n'},
"../../packages/util/optparse.js":{path:"../../packages/util/optparse.js",directory:"../../packages/util/",filename:"optparse.js",friendlyPath:"util.optparse",pre:!0,src:'jsio("import util.jsonSchema");jsio("import lib.Enum;");function ERROR(e){logger.error(e);process.exit(1)}function addAlso(e,d,b){typeof d=="string"?e[d]=b:logger.warn("Key specified in option",e.name,"is invalid. Ignoring:",d)}var truthyValues=lib.Enum("true","1","yes"),falsyValues=lib.Enum("false","0","no");\nfunction addArg(e,d,b,a){var c,g=b[a],d=d[b[a]],h=b.length,f=d.type.toLowerCase();++a;switch(f){case "boolean":typeof b[a]=="undefined"?(c=!0,--a):b[a].toLowerCase()in truthyValues?c=!0:b[a].toLowerCase()in falsyValues?c=!1:(c=!0,--a);break;case "int":case "integer":c=parseInt(b[a]);break;case "float":case "double":case "number":c=parseFloat(b[a]);break;case "array":case "object":for(f=b[a];;){try{c=eval("("+f+")");break}catch(i){}++a;a>=h&&ERROR(\'Could not parse "\'+g+\'": \'+d.type+"\\n"+f+"\\n"+JSON.stringify(b));\nf+=b[a]}break;default:c=b[a]}h=util.jsonSchema.validate(c,d);if(h.valid)return e[d.name]=c,a+1;else{e=[];for(c=0;f=h.errors[c];++c)e.push("\\n\\t\\t"+(f.property?f.property+": ":"")+f.message);ERROR("\\n"+g+": provided value "+b[a]+"\\n\\t"+d.name+" option:"+e.join(""))}}\nexports=function(e,d){var b=merge({},d),a={},c;for(c in b){var g=b[c];"default"in g&&(a[g.name]=g["default"]);var h=g.also;if(h)if(isArray(h))for(var f=0,i=h.length;f<i;++f)addAlso(b,h[f],g);else addAlso(b,h,g)}g=[];c=0;for(i=e.length;c<i;)e[c]in b?c=addArg(a,b,e,c):(g.push(e[c]),c++);return{args:g,opts:a}};\nexports.printUsage=function(e,d){jsio("import util.wordWrap;");var b=jsio.__env.log;b("Usage:");b("\\t"+e);b("Options:");for(var a in d){var c=[a];d[a].also&&(isArray(d[a].also)?c=c.concat(d[a].also):c.push(d[a].also));b("\\t"+c.join(", "));d[a].description&&b(util.wordWrap(d[a].description,80,"\\t\\t"))}};\n'},
"../../packages/util/jsonSchema.js":{path:"../../packages/util/jsonSchema.js",directory:"../../packages/util/",filename:"jsonSchema.js",friendlyPath:"util.jsonSchema",pre:!0,src:'jsio("import std.js as JS;");exports={validate:validate,checkPropertyChange:function(b,a,f){return validate(b,a,f||"property")}};var gCheckPropChange=!1;function validate(b,a,f){gCheckPropChange=f;a=a?checkProp(b,a,"",f||""):[];!f&&b&&b.$schema&&checkProp(b,b.$schema,"","",a);return{valid:!a.length,errors:a}}\nfunction checkProp(b,a,f,d,e){function c(a){e.push({property:f,message:a})}e||(e=[]);f+=f?typeof d=="number"?"["+d+"]":typeof d=="undefined"?"":"."+d:d;var g=typeof a,h=g=="function";if((g!="object"||JS.isArray(a))&&(f||!h))return h?b instanceof a||c("is not an instance of the class/constructor "+a.name):a&&c("Invalid schema/property definition "+a),e;gCheckPropChange&&a.readonly&&c("is a readonly field, it can not be changed");a["extends"]&&checkProp(b,a["extends"],f,d,e);if(b===void 0)a.optional||\nc("is missing and it is not optional");else if(e=e.concat(checkType(a.type,b)),a.disallow&&!checkType(a.disallow,b).length&&c(" disallowed value was matched"),b!==null){if(JS.isArray(b)){if(a.items)if(JS.isArray(a.items))for(d=0,g=b.length;d<g;d++)e.concat(checkProp(b[d],a.items[d],f,d,e));else for(d=0,g=b.length;d<g;d++)e.concat(checkProp(b[d],a.items,f,d,e));a.minItems&&b.length<a.minItems&&c("There must be a minimum of "+a.minItems+" in the array");a.maxItems&&b.length>a.maxItems&&c("There must be a maximum of "+\na.maxItems+" in the array")}else a.properties&&e.concat(checkObj(b,a.properties,f,a.additionalProperties,e));a.pattern&&typeof b=="string"&&!b.match(a.pattern)&&c("does not match the regex pattern "+a.pattern);a.maxLength&&typeof b=="string"&&b.length>a.maxLength&&c("may only be "+a.maxLength+" characters long");a.minLength&&typeof b=="string"&&b.length<a.minLength&&c("must be at least "+a.minLength+" characters long");typeof a.minimum!==void 0&&typeof b==typeof a.minimum&&a.minimum>b&&c("must have a minimum value of "+\na.minimum);typeof a.maximum!==void 0&&typeof b==typeof a.maximum&&a.maximum<b&&c("must have a maximum value of "+a.maximum);if(a["enum"]){for(var d=a["enum"],i,g=d.length,h=0;h<g;h++)if(d[h]===b){i=1;break}i||c("does not have a value in the enumeration "+d.join(", "))}typeof a.maxDecimal=="number"&&b.toString().match(RegExp("\\\\.[0-9]{"+(a.maxDecimal+1)+",}"))&&c("may only have "+a.maxDecimal+" digits of decimal places")}return e}\nfunction checkObj(b,a,f,d,e){if(typeof a=="object"){(typeof b!="object"||JS.isArray(b))&&e.push({property:f,message:"an object is required"});for(var c in a)if(a.hasOwnProperty(c)&&!(c.charAt(0)=="_"&&c.charAt(1)=="_")){var g=b[c];checkProp(g,a[c],f,c,e)}}for(c in b)b.hasOwnProperty(c)&&!(c.charAt(0)=="_"&&c.charAt(1)=="_")&&a&&!a[c]&&d===!1&&e.push({property:f,message:typeof g+"The property "+c+" is not defined in the schema and the schema does not allow additional properties"}),(g=a&&a[c]&&a[c].requires)&&\n!(g in b)&&e.push({property:f,message:"the presence of the property "+c+" requires that "+g+" also be present"}),g=b[c],a&&typeof a=="object"&&!(c in a)&&checkProp(g,d,f,c,e),!gCheckPropChange&&g&&g.$schema&&(e=e.concat(checkProp(g,g.$schema,f,c,e)));return e}\nfunction checkType(b,a,f){if(b){var d=typeof a;if(typeof b=="string"){b=b.toLowerCase();switch(b){case "any":break;case "array":if(!JS.isArray(a))return[{property:path,message:"expected an array, but "+d+" found instead"}];break;case "integer":case "int":break;case "float":case "double":case "number":b="number";default:if(d!=b)return[{property:path,message:"expected "+b+", but "+d+" found instead"}]}return[]}if(JS.isArray(b)){for(var d=[],e=0;e<b.length;e++){var c=checkType(b[e],a,f);if(!c.length)return[];\nd=d.concat(c)}return d}else if(typeof b=="object")return checkProp(a,b,path)}return[]};\n'},
"../../packages/std/js.js":{path:"../../packages/std/js.js",directory:"../../packages/std/",filename:"js.js",baseMod:"std",basePath:"../../packages",friendlyPath:"std.js",pre:!0,src:'var SLICE=Array.prototype.slice;exports.vargs=function(a,c){return SLICE.call(a,c||0)};exports.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"};exports.shallowCopy=function(a){if(exports.isArray(a))return a.slice(0);else{var c={},b;for(b in a)a.hasOwnProperty(b)&&(c[b]=a[b])}return c};exports.merge=function(a,c){for(var a=a||{},b=1,f=arguments.length;b<f;++b){var e=arguments[b],d;for(d in e)e.hasOwnProperty(d)&&!a.hasOwnProperty(d)&&(a[d]=e[d])}return a};\nexports.curry=function(a){var c=SLICE.call(arguments,1),b=typeof a=="string"?function(){this[a].apply(ctx,c.concat(SLICE.call(arguments)))}:function(){a.apply(this,c.concat(SLICE.call(arguments)))};b.curried=!0;return b};exports.unbind=function(a){var c=SLICE.call(arguments,1),b=typeof a=="string"?function(b){b[a].apply(b,c.concat(SLICE.call(arguments,1)))}:function(b){a.apply(b,c.concat(SLICE.call(arguments,1)))};b.unbound=!0;return b};\n'},
"../../packages/lib/Enum.js":{path:"../../packages/lib/Enum.js",directory:"../../packages/lib/",filename:"Enum.js",friendlyPath:"lib.Enum",pre:!0,src:'exports=function(){if(arguments.length==1)if(typeof arguments[0]=="object"){var b=arguments[0],a;for(a in b)b[a]in b||(b[b[a]]=a);return b}else typeof arguments[0]!="string"&&(c=arguments[0]);if(!c)var c=arguments;b={};a=0;for(var d=c.length;a<d;++a)c[a]&&(b[c[a]]=a+1),b[a+1]=c[a];return b};\n'},"../../packages/util/wordWrap.js":{path:"../../packages/util/wordWrap.js",
directory:"../../packages/util/",filename:"wordWrap.js",src:'exports=function(a,d,c,g){function k(){e[f]=c+b.str.join(" ");++f}c=c||"";d-=exports.getLengthWithTabs(c,g);if(!d)return c+a;for(var a=a.split(" "),g=a.length,e=[{str:[],len:0}],f=0,b=e[f],h=0;h<g;++h){var i=a[h],j=i.length;b.len&&b.len+j+1>d?(k(),b=e[f]={str:[i],len:j}):(b.str.push(i),b.len&&b.len++,b.len+=j)}b.len?k():e.pop();return e.join("\\n")};exports.getLengthWithTabs=function(a,d){var c=0,a=a.replace(/\\t/g,function(){++c});return a.length+c*(d||8)};\n',
friendlyPath:"util.wordWrap",pre:!0},"./optsDef.js":{path:"./optsDef.js",directory:"./",filename:"optsDef.js",friendlyPath:".optsDef",pre:!0,src:'exports={"-g":{also:"--compressResult",name:"compressResult",type:"boolean",description:"Compress final output with Google\'s Closure Compiler"},"-c":{also:"--compress",name:"compressSources",type:"boolean","default":!1,description:"Compress individual source files with Google\'s Closure Compiler"},"--closure":{name:"closurePath",type:"string",description:"Path to closure.jar, if using compression (default: cwd)"},"--environment":{name:"environment",type:"string",description:"runtime environment to target"},\n"-d":{also:"--debug",name:"debug",type:"integer",minimum:0,maximum:5,constants:{DEBUG:1,LOG:2,INFO:3,WARN:4,ERROR:5},description:"Turn on the compiler logger. A value of i logs all levels i and higher. 1: DEBUG, 2: LOG, 3: INFO, 4: WARN, 5: ERROR"},"--dynamic":{name:"dynamicImports",type:"object",description:"Specify dynamic jsio imports"},"-p":{name:"package",also:"--package",type:"object",description:"Specifies a package file. The compiler looks for configuration parameters from the command line as well as the package file. Command line options have precedence over package settings provided in the package file."},\n"--no-ie":{name:"noIE",type:"boolean","default":!1,description:"Disables IE checks like trailing commas"},"-j":{name:"jsioPath",type:"string",also:"--jsio",description:"Provides an alternative path for jsio. This path must contain the file \'jsio.js\'. The compiler contains a copy of jsio, so this is optional (can be used to compile against custom versions of jsio)."},"--path":{name:"path",type:"array",description:"Provide extra paths (follow --path with a JSON literal array of strings)"},"-o":{name:"outputFile",\ntype:"string",also:"--output",description:"The filename to write the compiled code to. Defaults to stdout (prints to the console)."},"--includeJsio":{name:"includeJsio",type:"boolean","default":!0,description:"(advanced option) Defaults to true. Set to false to exclude jsio from the resulting source. Setting to false enables --preserveJsioSource."},"--appendImport":{name:"appendImport",type:"boolean","default":!0,description:"Defaults to true. When true, the import statement passed to the compiler is appended to the end of the file."},\n"--compressorCachePath":{name:"compressorCachePath",type:"string",description:"Provide a path to cache compressed source."},"--help":{type:"boolean",description:"prints this help message"}};\n'},
"../../packages/preprocessors/compiler.js":{path:"../../packages/preprocessors/compiler.js",directory:"../../packages/preprocessors/",filename:"compiler.js",friendlyPath:"preprocessors.compiler",pre:!0,src:'jsio("import util.path;");var JSIO=jsio.__jsio,gSrcTable={},gDynamicList={},gCompilerOpts={};function testComment(a){return!/\\/\\//.test(a[1])}\nexports=function(a,b,c){c=c||{};if(!gSrcTable[b.path]){logger.info("compiling",b.path);checkDynamicImports(b);gSrcTable[b.path]=!0;var e=b.path;if(c.path)if(isArray(c.path))for(var d=0,f=c.path.length;d<f;++d)jsio.path.add(c.path);else typeof c.path=="string"&&jsio.path.add(c.path);if(gCompilerOpts.autoDetectPaths){logger.debug("detecting paths for",e);for(c=/^(.*)jsio\\.path\\.add\\s*\\(\\s*([\'"][^\'"]+?[\'"])\\s*\\)/gm;;){d=c.exec(b.src);if(!d||!testComment(d))break;try{a=d[2],jsio.path.add(eval(a)),logger.info("added path",\na)}catch(i){logger.info("failed to add path",a)}}}for(f=/^(.*)jsio\\s*\\(\\s*([\'"].+?[\'"])\\s*(,\\s*\\{[^}]+\\})?\\)/gm;;){d=f.exec(b.src);if(!d)break;if(testComment(d)){logger.debug(b.path,"detected",d[0]);var c=d[2],g=d[3]?d[3].substring(1):"";try{c=eval(c)}catch(j){logger.warn("could not compile import from",e+":",c);continue}try{g=eval(g)||{}}catch(k){logger.warn("could not parse opts for jsio in",e+":",g),g={}}try{run(b,c,g)}catch(l){logger.warn("could not compile import from",e+":",c)}}}for(e=/^(.*)jsio\\s*\\(\\s*DYNAMIC_IMPORT_(.*?)\\s*(,\\s*\\{[^}]+\\})?\\)/gm;;){d=\ne.exec(b.src);if(!d||!testComment(d))break;c=d[2];try{g=eval(d[3]||"")||{}}catch(m){g={}}if(gCompilerOpts.dynamicImports&&c in gCompilerOpts.dynamicImports)if(d=gCompilerOpts.dynamicImports[c])if(isArray(d))for(var f=0,h;h=d[f];++f)logger.debug("Dynamic import "+c+": "+h),run(b,h,g);else logger.debug("Dynamic import "+c+": "+d),run(b,d,g);else logger.debug("Dynamic import "+c+": <nothing>");else logger.error("Missing: import definition\\nConstant",c,"for DYNAMIC_IMPORT_"+c," was not provided to the compiler for ",\na,"from",b.path)}gSrcTable[b.path]=merge({},b);delete gSrcTable[b.path].exports}b.src=""};exports.reset=function(){gSrcTable={}};exports.generateSrc=function(a,b){var a=merge(a,{compressSources:!1,includeJsio:!0}),c=bind(this,buildJsio,a,b);a.compressSources?compressTable(gSrcTable,a,c):c()};exports.getPathJS=function(){return"jsio.path.set("+JSON.stringify(jsio.path.get())+");jsio.path.cache="+JSON.stringify(jsio.path.cache)+";"};\nfunction buildJsio(a,b){function c(){var a=jsio.__jsio.__init__.toString(-1);a.substring(0,8)=="function"&&(a="jsio=("+a+")();");return a}var e;e=(a.includeJsio?c():"")+exports.getPathJS();if(a.includeJsio)logger.info("source include method: jsio.setCache"),e=e+"jsio.setCache("+JSON.stringify(gSrcTable)+");";else{logger.info("source include method: jsio.setCachedSrc");var d=[],f;for(f in gSrcTable)d.push("jsio.setCachedSrc(\'"+gSrcTable[f].path+"\',"+JSON.stringify(gSrcTable[f].src)+");");e+=d.join("\\n")}a.compressResult&&\ngCompilerOpts.compressor?(logger.info("compressing final code..."),gCompilerOpts.compressor(null,e,a,b)):b(e)}function compressTable(a,b,c){logger.info("compressing sources");var e=[],d;for(d in a)e.push(d);compressStep(e,a,b,e.pop(),c)}function compressStep(a,b,c,e,d){e&&gCompilerOpts.compressor?(logger.log("compressing",e+"..."),gCompilerOpts.compressor(e,b[e].src,c,function(f){b[e].src=f;compressStep(a,b,c,a.pop(),d)})):d()}exports.getTable=function(){return gSrcTable};\nexports.setCompilerOpts=function(a){gCompilerOpts=a;"debugLevel"in a&&logger.setLevel(a.debugLevel)};exports.compile=function(a,b){JSIO(a,updateOpts(b))};function run(a,b,c){JSIO.__importer({},a.directory,a.filename,b,updateOpts(c))}function updateOpts(a){a=a||{};a.preprocessors?a.preprocessors.indexOf("compiler")==-1&&a.preprocessors.push("compiler"):a.preprocessors=["compiler"];a.reload=!0;return a}\nfunction checkDynamicImports(a){var b=a.directory;if(!gDynamicList[b]){gDynamicList[b]=!0;logger.info("Checking directory",b,"for dynamic imports... ("+gCompilerOpts.environment+")");var c=util.path.join(b,"__imports__");if((b=JSIO(c,{dontExport:!0,suppressErrors:!0}))&&b.resolve){try{var e=b.resolve(gCompilerOpts.environment,gCompilerOpts)}catch(d){logger.error("Error running module.resolve for",c,"\\n\\n",d,"\\n\\n"),process.exit(1)}e&&e.forEach&&e.forEach(function(b){logger.log("dynamic import:",b);\ntry{run(a,"import "+b,{})}catch(d){logger.error("module",b,"does not exist\\n\\n\\trequested from",c,"\\n\\n"),process.exit(1)}})}else logger.info("None found.")}};\n'},
"../../packages/util/path.js":{path:"../../packages/util/path.js",directory:"../../packages/util/",filename:"path.js",baseMod:"util",basePath:"../../packages",friendlyPath:"util.path",pre:!0,src:'var util=jsio.__jsio.__util;exports.join=util.buildPath;exports.resolveRelativePath=util.resolveRelativePath;exports.splitPath=util.splitPath;exports.makeRelativePath=util.makeRelativePath;exports.splitExt=function(a){var a=exports.splitPath(a),b=a.filename.lastIndexOf(".");b==-1?(a.basename=a.filename,a.ext=""):(a.basename=a.filename.substring(0,b),a.ext=a.filename.substring(b));return a};\n'},
"./compiler.js":{path:"./compiler.js",directory:"./",filename:"compiler.js",src:'var JSIO="jsio",J=jsio.__jsio.clone(),supportedEnvs={node:!0,browser:!0},_interface=null;exports.start=function(d,a){if(a&&a["interface"])_interface=a["interface"];else{if(!J.__env.name in supportedEnvs){logger.error("autostart failed: unknown environment.\\n\\n\\tTry using compiler.run(args, opts) instead.");return}J.path.add("../../packages/");_interface=J("import ."+J.__env.name+"_interface")}_interface.setCompiler(this);_interface.run(d,a)};\nfunction getPackage(d){try{var a=eval("("+J.__env.fetch(d)+")");logger.info("Package definition loaded from",d);return a}catch(g){logger.log(J.__env.getCwd()),logger.warn(\'If "\'+d+\'" is a package file, it could not be read.\',g)}return!1}exports.setDebugLevel=function(d){logger.setLevel(d);_interface.logger&&_interface.logger.setLevel(d)};\nexports.run=function(d,a){var g="debug"in a?a.debug:5;exports.setDebugLevel(g);var c=JSON.stringify(a,null,"\\t");logger.info("Starting compiler with args: ",d,"and options:",c.substring(1,c.length-1));if(a.jsioPath){J.path.set([a.jsioPath]);J.__jsio.__init__.toString=function(){return J.__env.fetch(J.__jsio.__util.buildPath(a.jsioPath,"jsio.js"))};for(var h in J.path.cache)delete J.path.cache[h];var c=J.__jsio.__srcCache,b;for(b in c)delete c[b]}if(a.path){b=0;for(c=a.path.length;b<c;++b)a.path[b]&&\nJ.path.add(a.path[b])}logger.info("js.io path:",JSON.stringify(J.path.get()));var e;/\\.pkg$/.test(d[2])&&(b=getPackage(d[2]),b!=!1&&(d.splice(2,1),a["package"]=b));typeof a["package"]=="string"&&/\\.pkg$/.test(a["package"])&&(a["package"]=getPackage(a["package"]));if(a["package"]){var f=a["package"];logger.debug(f);if("root"in f)e=f.root,/^\\./.test(e)||(e="."+e),a.appendImport=!0;b=function(b,c){a[b]=(a[b]||[]).concat(f[c||b])};c=function(b,c){a[b]=JS.merge(a[b]||{},f[c||b])};f.environments&&b("environments");\nf.transports&&b("transports");f.additional_dependancies&&b("additionalDeps","additional_dependancies");f.dynamicImports&&c("dynamicImports")}d.length>2&&(e=d[2]);if(e){logger.info("dynamic imports: ",a.dynamicImports);if(!a.dynamicImports)a.dynamicImports={};if(!a.dynamicImports.ENV)a.dynamicImports.ENV=null;if(a.transports&&a.environments){a.dynamicImports.ENV=a.dynamicImports.ENV||[];b=0;for(c=a.transports.length;b<c;++b){h=0;for(var i=a.environments.length;h<i;++h)a.dynamicImports.ENV.push("import net.env."+\na.environments[h]+"."+a.transports[b])}}if(b=e.match(/^(.*)\\.js$/))e=b[1],e.charAt[0]!="/"&&e.charAt[0]!="."&&(e="./"+e);c=J("import preprocessors.compiler");c.setCompilerOpts({debugLevel:g,compressor:a.compressor||("compress"in _interface?bind(_interface,"compress"):null),autoDetectPaths:!0,environment:a.environment,dynamicImports:a.dynamicImports});c.compile("import base",a);if(a.additionalDeps){g=a.additionalDeps;h=g.length;logger.info("compiling dependencies...");for(b=0;b<h;++b)c.compile(g[b],\na)}logger.info("compiling main program",e);c.compile(e);c.generateSrc(a,function(b){a.appendImport&&(b=b+JSIO+\'("\'+e+\'")\');a.footer&&(b+=a.footer||"");_interface.onFinish(a,b)})}else _interface.onError(a,"No initial import specified")};\n',
friendlyPath:".compiler",pre:!0},"../../packages/lib/Callback.js":{path:"../../packages/lib/Callback.js",directory:"../../packages/lib/",filename:"Callback.js",baseMod:"lib",basePath:"../../packages",friendlyPath:"lib.Callback",pre:!0,src:'var packages_lib_Callback=__class__;\nexports=packages_lib_Callback(function(){return this.init&&this.init.apply(this,arguments)},function(){this._fired=!1;this._id=0;this._pending=null;this.init=function(){this._run=[]};this.fired=function(){return this._fired};this.reset=function(){this._args=[];this._fired=!1};this.clear=function(){this.reset();this._run=[];this._stat=this._pending=null};this.forward=function(a){this.run.apply(this,a)};this.run=function(a,b){var c=b?bind.apply(this,arguments):a;c&&(this._fired?c.apply(this,this._args):\nthis._run.push(c));return this};this.runOrTimeout=function(a,b,c){if(a||b)if(this._fired)a.apply(this,this._args);else{var d=bind(this,function(){clearTimeout(e);a.apply(this,this._args)});this.run(d);var e=setTimeout(bind(this,function(){for(var a=0,c=this._run.length;a<c;++a)if(this._run[a]==d){this._run.splice(a,1);break}b()}),c)}};this.fire=function(){if(!this._fired){this._fired=!0;var a=this._run;this._run=[];this._args=arguments;for(var b=0,c=a.length;b<c;++b)a[b]&&a[b].apply(this,arguments)}};\nthis.chain=function(a){if(!this._pending)this._pending={};a===void 0&&(a=this._id++);this._pending[a]=!0;this.reset();return bind(this,"_deferred",a)};this._deferred=function(a){if(!this._stat)this._stat={};if(!this._stat.hasOwnProperty(a)){this._stat[a]=Array.prototype.slice.call(arguments,1);var b=this._pending;delete b[a];for(a in b)if(b.hasOwnProperty(a))return;this.fire(this._stat)}}});\n'},
"../../packages/lib/Hash.js":{path:"../../packages/lib/Hash.js",directory:"../../packages/lib/",filename:"Hash.js",src:'var packages_lib_Hash=__class__;\nexports=packages_lib_Hash(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(){this._keys={};this._dict={};this._values={};if(arguments.length==1&&typeof arguments=="object"){var b=arguments[0],a;for(a in b)b.hasOwnProperty(a)&&(this._keys[a]=!0,this._values[a]=b[a])}else{a=0;for(b=arguments.length;a<b;a++)this._keys[arguments[a]]=!0,this._values[arguments[a]]=!0}};this.contains=function(b){return this._values.hasOwnProperty(b)};this.hasKey=this.containsKey=\nfunction(b){return this._keys.hasOwnProperty(b)};this.each=function(b,a){for(var c in keys)this._keys.hasOwnProperty(c)&&b.call(a||GLOBAL,c,this._values[c],this)}});\n',
friendlyPath:"lib.Hash",pre:!0},"../../packages/lib/Iterator.js":{path:"../../packages/lib/Iterator.js",directory:"../../packages/lib/",filename:"Iterator.js",src:'jsio("import std.js as JS;");var packages_lib_Iterator=__class__;\nexports=packages_lib_Iterator(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this._src=a;this._calls=this._i=0;if(JS.isArray(a))this._isArray=!0;else if(Object.keys)this._keys=Object.keys(a);else{var b=this._keys=[],c;for(c in a)a.hasOwnProperty(c)&&b.push(c)}};this.nextKey=function(){return this._keys[this._i++]};this.next=function(){if(this._isArray)return this._src[this._i++]||exports.END_OF_LOOP;else{var a=this._keys[this._i++];return a?this._src[a]:\nexports.END_OF_LOOP}};this.loop=function(a){arguments.length>1&&(a=bind.apply(this,arguments));var b;if(this._isArray)for(;b=this.next();)a(b);else for(;b=this.nextKey();)a(this._src[b],b)};this.asyncLoop=function(a){arguments.length>1&&(a=bind.apply(this,arguments));this._next=bind(this,"_onReturn",a);this._calls++;this._asyncLoop(a)};this._asyncLoop=function(a){for(this._inLoop=!0;this._calls;)--this._calls,a(this.next(),this._next);this._inLoop=!1};this._onReturn=function(a){this._calls++;this._inLoop||\nthis._asyncLoop(a)}});exports.END_OF_LOOP=Error("jsio.Iterator.END_OF_LOOP");\n',
friendlyPath:"lib.Iterator",pre:!0},"../../packages/lib/LogClass.js":{path:"../../packages/lib/LogClass.js",directory:"../../packages/lib/",filename:"LogClass.js",src:"exports=function(b,a,c){c||(c=a,a=null);var d={},b=bind(this,LogClassProto,b,c,logging.get(b),d);d.proto=b;return a?Class(a,b):Class(b)};function LogClassProto(b,a,c,d,e){a.prototype=d.proto.prototype;a=new a(c,e);a.__class__=b;return a};\n",friendlyPath:"lib.LogClass",pre:!0},"../../packages/lib/PubSub.js":{path:"../../packages/lib/PubSub.js",
directory:"../../packages/lib/",filename:"PubSub.js",src:"var ctx=jsio.__env.global,SLICE=Array.prototype.slice,packages_lib_PubSub=__class__;\nexports=packages_lib_PubSub(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(){};this.publish=function(c){if(this._subscribers){var d=SLICE.call(arguments,1);if(this._subscribers.__any)for(var e=[c].concat(d),b=this._subscribers.__any.slice(0),a=0,f;f=b[a];++a)f.apply(ctx,e);if(!this._subscribers[c])return this;b=this._subscribers[c].slice(0);for(a=0;f=b[a];++a)f.apply(ctx,d)}return this};this.subscribe=function(c,d,e){var b;arguments.length==2?b=d:(b=bind.apply(GLOBAL,\nSLICE.call(arguments,1)),b._ctx=d,b._method=e);var a=this._subscribers||(this._subscribers={});(a[c]||(a[c]=[])).push(b);return this};this.subscribeOnce=function(c,d,e){var b=arguments,a=bind(this,function(){this.unsubscribe(c,a);b.length==2?d.apply(GLOBAL,arguments):bind.apply(GLOBAL,SLICE.call(b,1)).apply(GLOBAL,arguments)});if(b.length===3)a._ctx=d,a._method=e;return this.subscribe(c,a)};this.unsubscribe=function(c,d,e){if(!this._subscribers||!this._subscribers[c])return this;for(var c=this._subscribers[c],\nb=0,a;a=c[b];++b)(a==d||a._ctx==d&&(!e||a._method==e))&&c.splice(b--,1);return this}});\n",
friendlyPath:"lib.PubSub",pre:!0},"../../packages/lib/sort.js":{path:"../../packages/lib/sort.js",directory:"../../packages/lib/",filename:"sort.js",src:'var zeroPadding=[];function ensurePadding(d){for(var e=zeroPadding.length;e<d;++e){for(var c=[],b=0;b<e;++b)c.push("0");zeroPadding[e]=c.join("")}}function sortIndex(d){return this[d]}\nexports=function(d,e){var c=d.length,b=Array(c),g=Array(c),k=Array(c),m=Array.prototype.slice.call(arguments,1),l=!!m[1];if(l)for(var a=0;a<c;++a)g[a]=[];for(var n=0;e=m[n];++n){for(a=0;a<c;++a)b[a]=e.call(d[a],a);if(typeof b[0]=="number"){for(var h=b[0],i=b[0],a=1;a<c;++a)b[a]>h?h=b[a]:b[a]<i&&(i=b[a]);var h=String(Math.floor(h)).length,o=String(Math.floor(i)).length;ensurePadding(Math.max(h,o));for(var j,a=0;a<c;++a){var f=b[a];f<0?(f=-(i-f),j=(""+Math.floor(f)).length,b[a]="-"+zeroPadding[o-j]+\nf):(j=(""+Math.floor(f)).length,b[a]=zeroPadding[h-j]+f)}}if(l)for(a=0;a<c;++a)g[a].push(b[a]);else g=b}for(a=0;a<c;++a)l&&(g[a]=g[a].join("|")),k[a]=d[a].hasOwnProperty("toString")&&d[a].toString||null,d[a].toString=bind(g,sortIndex,a);Array.prototype.sort.apply(d);for(a=0;a<c;++a)k[a]?d[a].toString=k[a]:delete d[a].toString};\n',
friendlyPath:"lib.sort",pre:!0},"../../packages/lib/Sortable.js":{path:"../../packages/lib/Sortable.js",directory:"../../packages/lib/",filename:"Sortable.js",src:'jsio("import .LogClass;");exports=LogClass("lib.Sortable",function(){this.toStringPush=function(c){!this._toString||!this._toString.push?this._toString=[this.toString]:this._toString.push(this.toString);this.toString=c};this.toStringPop=function(){this.toString=this._toString.pop()}});var zeroPadding=[];function ensurePadding(c){for(var e=zeroPadding.length;e<c;++e){for(var d=[],b=0;b<e;++b)d.push("0");zeroPadding[e]=d.join("")}}function sortIndex(c){return this[c]}\nexports.sort=function(c,e){var d=c.length,b=Array(d),g=Array(d),k=Array(d),m=Array.prototype.slice.call(arguments,1),l=!!m[1];if(l)for(var a=0;a<d;++a)g[a]=[];for(var n=0;e=m[n];++n){for(a=0;a<d;++a)b[a]=e.call(c[a],a);if(typeof b[0]=="number"){for(var h=b[0],i=b[0],a=1;a<d;++a)b[a]>h?h=b[a]:b[a]<i&&(i=b[a]);var h=String(Math.floor(h)).length,o=String(Math.floor(i)).length;ensurePadding(Math.max(h,o));for(var j,a=0;a<d;++a){var f=b[a];f<0?(f=-(i-f),j=(""+Math.floor(f)).length,b[a]="-"+zeroPadding[o-\nj]+f):(j=(""+Math.floor(f)).length,b[a]=zeroPadding[h-j]+f)}}if(l)for(a=0;a<d;++a)g[a].push(b[a]);else g=b}for(a=0;a<d;++a)l&&(g[a]=g[a].join("|")),k[a]=c[a].hasOwnProperty("toString")&&c[a].toString||null,c[a].toString=bind(g,sortIndex,a);Array.prototype.sort.apply(c);for(a=0;a<d;++a)k[a]?c[a].toString=k[a]:delete c[a].toString};\n',
friendlyPath:"lib.Sortable",pre:!0},"../../packages/math/arrays.js":{path:"../../packages/math/arrays.js",directory:"../../packages/math/",filename:"arrays.js",baseMod:"math",basePath:"../../packages",src:'jsio("import .util");exports.weightedAverage=function(b,e,c){for(var c=c||b.length,d=0,a=c-1;a>=0;--a)d+=b[a]*e;return d/c};exports.subtract=function(b,e){for(var c=b.length,d=Array(c),a=0;a<c;++a)d[a]=e[a]-b[a];return d};exports.average=function(b,e){for(var e=e||b.length,c=0,d=e-1;d>=0;--d)c+=b[d];return c/e};exports.stddev=function(b,e){for(var c=exports.average(b,e),e=e||b.length,d=0,a=e-1;a>=0;--a){var f=b[a]-c;d+=f*f}return Math.sqrt(d/(e-1))};\nexports.shuffle=function(b,e){for(var c=b.length,d=0;d<c;++d){var a=util.random(d,c,e),f=b[a];b[a]=b[d];b[d]=f}return b};exports.rotate=function(b,e){var c=b.length,d=Array(c),a=e%c;a<0&&(a%=c,a&&(a+=c));for(var f=0;f<c;++f)d[f]=b[a],a=(a+1)%c;return d};\n',
friendlyPath:"math.arrays",pre:!0},"../../packages/math/util.js":{path:"../../packages/math/util.js",directory:"../../packages/math/",filename:"util.js",src:'jsio("import lib.Enum as Enum");exports.interpolate=function(a,d,b){return a*(1-b)+d*b};exports.random=function(a,d,b){return a+((b||Math.random)()*(d-a)|0)};exports.randomInclusive=function(a,d,b){return exports.random(a,d+1,b)};exports.rand=Math.random;exports.integer=exports.truncate=function(a){return a|0};exports.clip=function(a,d,b){return Math.max(Math.min(a,b),d)};exports.sign=function(a){return a&&a/Math.abs(a)};\nvar round=exports.round=function(a,d,b){if(!b||b==round.ROUND_HALF_AWAY_FROM_ZERO)return a.toFixed(d);if(!d){b==round.ROUND_HALF_UP&&Math.round(a);var c=a|0,e=a-c;half=e==0.5||e==-0.5;if(!half)return Math.round(a);e=a<0?-1:1;switch(b){case round.ROUND_HALF_TO_EVEN:return c%2?c+e:c;case round.ROUND_HALF_TO_ODD:return c%2?c:c+e;case round.ROUND_HALF_STOCHASTIC:return Math.random()<0.5?c+e:c;case round.ROUND_HALF_ALTERNATE:return(round.alt=!round.alt)?c+e:c}}c=a|0;e=a-c;p=Math.pow(10,d);return(c+round(e*\np,0,b)/p).toFixed(d)};round.alt=!0;Enum.call(round,"ROUND_HALF_UP","ROUND_HALF_AWAY_FROM_ZERO","ROUND_HALF_TO_EVEN","ROUND_HALF_STOCHASTIC","ROUND_HALF_ALTERNATE");\n',
friendlyPath:".util",pre:!0},"../../packages/math2D/angle.js":{path:"../../packages/math2D/angle.js",directory:"../../packages/math2D/",filename:"angle.js",baseMod:"math2D",basePath:"../../packages",src:"var PI=Math.PI,TWOPI=Math.PI*2;exports.average=function(a,c,b){b===void 0&&(b=0.5);var d=exports.getRange(a,c),a=d<PI?a+d*(1-b):c+(2*PI-d)*b;return a>PI?a-2*PI:a<-PI?a+2*PI:a};exports.normalize=function(a){for(;a<-PI;)a+=2*PI;for(;a>PI;)a-=2*PI;return a};exports.add=function(a,c){var b=a+c;return b>PI?b-TWOPI:b<-PI?b+TWOPI:b};exports.difference=function(a,c){var b=exports.getRange(a,c);return b>PI?b-TWOPI:b};exports.getRange=function(a,c){var b=c-a;return b<0?b+TWOPI:b};\n",
friendlyPath:"math2D.angle",pre:!0},"../../packages/math2D/Circle.js":{path:"../../packages/math2D/Circle.js",directory:"../../packages/math2D/",filename:"Circle.js",src:'jsio("import .Point;");var packages_math2D_Circle=__class__;exports=packages_math2D_Circle(function(){return this.init&&this.init.apply(this,arguments)},Point,function(b){this.init=function(a,b,c){switch(arguments.length){case 0:this.radius=this.y=this.x=0;break;case 1:case 2:this.x=a.x||0;this.y=a.y||0;this.radius=a.radius||0;break;case 3:this.x=a,this.y=b,this.radius=c}};this.scale=function(a){b(this,"scale",arguments);this.radius*=a;return this}});\n',
friendlyPath:"math2D.Circle",pre:!0},"../../packages/math2D/Point.js":{path:"../../packages/math2D/Point.js",directory:"../../packages/math2D/",filename:"Point.js",src:'var packages_math2D_Point=__class__,Point=exports=packages_math2D_Point(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b){switch(arguments.length){case 0:this.y=this.x=0;break;case 1:this.x=a.x||0;this.y=a.y||0;break;case 2:this.x=a||0,this.y=b||0}};this.rotate=function(a){var b=this.x,c=this.y,d=Math.cos(a),a=Math.sin(a);this.x=b*d-c*a;this.y=b*a+c*d;return this};this.translate=this.add=function(a,b){typeof a=="number"?(this.x+=a,this.y+=b):(this.x+=\na.x,this.y+=a.y);return this};this.subtract=function(a,b){typeof a=="number"?(this.x-=a,this.y-=b):(this.x-=a.x,this.y-=a.y);return this};this.scale=function(a){this.x*=a;this.y*=a;return this};this.setMagnitude=function(a){var b=Math.atan2(this.y,this.x);this.x=a*Math.cos(b);this.y=a*Math.sin(b);return this};this.normalize=function(){var a=this.getMagnitude();this.x/=a;this.y/=a;return this};this.addMagnitude=function(a){return this.setMagnitude(this.getMagnitude()+a)};this.getMagnitude=function(){return Math.sqrt(this.x*\nthis.x+this.y*this.y)};this.getSquaredMagnitude=function(){return this.x*this.x+this.y*this.y};this.getDirection=this.getAngle=function(){return Math.atan2(this.y,this.x)}});Point.getPolarR=function(){throw"notImplemented";};Point.getPolarTheta=function(a,b){var c=Math.atan2(b,a)+Math.PI*2;return c>Math.PI*2?c%(Math.PI*2):c};\nPoint.add=Point.translate=function(a,b,c,d){switch(arguments.length){case 2:return(new Point(a)).add(b);case 3:return(new Point(a)).add(b,c);case 4:return(new Point(a,b)).add(c,d)}};Point.subtract=function(a,b,c,d){switch(arguments.length){case 2:return(new Point(a)).subtract(b);case 3:return(new Point(a)).subtract(b,c);case 4:return(new Point(a,b)).subtract(c,d)}};Point.scale=function(a,b,c){switch(arguments.length){case 2:return(new Point(a)).scale(b);case 3:return(new Point(a,b)).scale(c)}};\nPoint.setMagnitude=function(a,b,c){switch(arguments.length){case 2:return(new Point(a)).setMagnitude(c);case 3:return(new Point(a,b)).setMagnitude(c)}};Point.addMagnitude=function(a,b,c){switch(arguments.length){case 2:pt=new Point(a);break;case 3:pt=new Point(a,b),b=c}return pt.addMagnitude(b)};Point.getMagnitude=function(a,b){return(new Point(a,b)).getMagnitude()};Point.rotate=function(a,b,c){switch(arguments.length){case 2:return(new Point(a)).rotate(b);case 3:return(new Point(a,b)).rotate(c)}};\n',
friendlyPath:".Point",pre:!0},"../../packages/math2D/intersect.js":{path:"../../packages/math2D/intersect.js",directory:"../../packages/math2D/",filename:"intersect.js",src:'jsio("import .Point;");jsio("import .Line;");jsio("import .Rect;");var intersect=exports;intersect.rectAndPt=function(b,a){return intersect.ptAndRect(a,b)};intersect.ptAndRect=function(b,a){var c=b.x,d=b.y;return c>=a.x&&c<=a.x+a.width&&d>=a.y&&d<=a.y+a.height};intersect.circAndPt=function(b,a){return intersect.ptAndCirc(a,b)};intersect.ptAndCirc=function(b,a){var c=b.x-a.x,d=b.y-a.y;return c*c+d*d<a.radius*a.radius};\nintersect.rectAndRect=function(b,a){return!(b.y+b.height<a.y||a.y+a.height<b.y||b.x+b.width<a.x||a.x+a.width<b.x)};var SIDES=Rect.SIDES;intersect.rectAndCircle=function(b,a){return intersect.rectAndCircle(a,circ)};intersect.circleAndRect=function(b,a){return intersect.ptAndRect(b,a)?!0:intersect.lineAndCircle(a.getSide(1),b)||intersect.lineAndCircle(a.getSide(2),b)||intersect.lineAndCircle(a.getSide(3),b)||intersect.lineAndCircle(a.getSide(4),b)};\nintersect.circleAndLine=function(b,a){return intersect.lineAndCircle(a,b)};intersect.lineAndCircle=function(b,a){return intersect.util.ptToLine(a,b).getMagnitude()<a.radius};intersect.util={};intersect.util.ptToLine=function(b,a){var c=a.end.x-a.start.x,d=a.end.y-a.start.y,e=((b.x-a.start.x)*c+(b.y-a.start.y)*d)/(c*c+d*d),c=e<0?new Point(a.start):e>1?new Point(a.end):new Point(a.start.x+e*c,a.start.y+e*d);return new Line(c,b)};\nintersect.util.rectAndRect=function(b,a){if(b===!0)return new Rect(a);if(a===!0)return new Rect(a);if(intersect.rectAndRect(b,a)){var c=Math.max(b.x,a.x),d=Math.max(b.y,a.y),e=Math.min(b.x+b.width,a.x+a.width),f=Math.min(b.y+b.height,a.y+a.height);return new Rect(c,d,e-c,f-d)}return null};\n',
friendlyPath:"math2D.intersect",pre:!0},"../../packages/math2D/Line.js":{path:"../../packages/math2D/Line.js",directory:"../../packages/math2D/",filename:"Line.js",src:'jsio("import .Point;");var packages_math2D_Line=__class__;\nexports=packages_math2D_Line(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b,c,d){switch(arguments.length){case 0:this.start=new Point;this.end=new Point;break;case 1:this.start=new Point(a.start);this.end=new Point(a.end);break;case 2:this.start=new Point(a);this.end=new Point(b);break;case 3:this.start=new Point(a);this.end=new Point(b,c);break;default:this.start=new Point(a,b),this.end=new Point(c,d)}};this.getMagnitude=this.getLength=function(){var a=\nthis.end.x-this.start.x,b=this.end.y-this.start.y;return Math.sqrt(a*a+b*b)}});\n',
friendlyPath:".Line",pre:!0},"../../packages/math2D/Rect.js":{path:"../../packages/math2D/Rect.js",directory:"../../packages/math2D/",filename:"Rect.js",src:'jsio("import .intersect;");jsio("import lib.Enum;");jsio("import .Point;");jsio("import .Line;");\nvar packages_math2D_Rect=__class__,Rect=exports=packages_math2D_Rect(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b,c,d){switch(arguments.length){case 0:this.width=this.height=this.x=this.y=0;break;case 1:this.width=a.width;this.height=a.height;this.x=a.x;this.y=a.y;break;case 2:this.x=a.x;this.y=a.y;this.width=b.x;this.height=b.y;break;case 3:this.x=a.x;this.y=a.y;this.width=b;this.height=c;break;case 4:this.x=a,this.y=b,this.width=c,this.height=d}};\nthis.normalize=function(){if(this.width<0)this.x-=this.width,this.width=-this.width;if(this.height<0)this.y-=this.height,this.height=-this.height;return this};this.intersectRect=function(a){if(intersect.rectAndRect(this,a)){var b=this.y,c=this.x+this.width,d=this.y+this.height;this.x=Math.max(this.x,a.x);this.y=Math.max(b,a.y);this.width=Math.min(c,a.x+a.width)-this.x;this.height=Math.min(d,a.y+a.height)-this.y}else this.height=this.width=0};this.unionRect=function(a){this.normalize();a.normalize&&\na.normalize();var b=this.x+this.width,c=this.y+this.height,d=a.x+a.width,e=a.y+a.height;this.x=this.x<a.x?this.x:a.x;this.y=this.y<a.y?this.y:a.y;this.width=(b>d?b:d)-this.x;this.height=(c>e?c:e)-this.y};this.getCorner=function(a){switch(a){case CORNERS.TOP_LEFT:return new Point(this.x,this.y);case CORNERS.TOP_RIGHT:return new Point(this.x+this.width,this.y);case CORNERS.BOTTOM_LEFT:return new Point(this.x,this.y+this.height);case CORNERS.BOTTOM_RIGHT:return new Point(this.x+this.width,this.y+this.height)}};\nthis.getSide=function(a){switch(a){case SIDES.TOP:return new Line(this.getCorner(CORNERS.TOP_LEFT),this.getCorner(CORNERS.TOP_RIGHT));case SIDES.RIGHT:return new Line(this.getCorner(CORNERS.TOP_RIGHT),this.getCorner(CORNERS.BOTTOM_RIGHT));case SIDES.BOTTOM:return new Line(this.getCorner(CORNERS.BOTTOM_RIGHT),this.getCorner(CORNERS.BOTTOM_LEFT));case SIDES.LEFT:return new Line(this.getCorner(CORNERS.BOTTOM_LEFT),this.getCorner(CORNERS.TOP_LEFT))}};this.getCenter=function(){return new Point(this.x+\nthis.width/2,this.y+this.height/2)}}),SIDES=Rect.SIDES=lib.Enum("TOP","BOTTOM","LEFT","RIGHT"),CORNERS=Rect.CORNERS=lib.Enum("TOP_LEFT","TOP_RIGHT","BOTTOM_RIGHT","BOTTOM_LEFT");\n',
friendlyPath:".Rect",pre:!0},"../../packages/math2D/morphology.js":{path:"../../packages/math2D/morphology.js",directory:"../../packages/math2D/",filename:"morphology.js",src:'exports.open=function(a,b){return exports.dilate(exports.erode(a,b),b)};exports.close=function(a,b){return exports.erode(exports.dilate(a,b),b)};exports.getSquareMask=function(a){a%2==0&&a++;for(var b=[],e=0;e<a;++e){b[e]=[];for(var d=0;d<a;++d)b[e][d]=1}return b};exports.getCircleMask=function(a){a%2==0&&a++;for(var b=[],e=a/2-0.5,d=0;d<a;++d){b[d]=[];for(var c=0;c<a;++c){var f=c-e,h=d-e;b[d][c]=Math.sqrt(f*f+h*h)<=e?1:0}}return b};\nexports.multiply=function(a,b){for(var e=a.width,d=a.height,c=0;c<d;++c)for(var f=0;f<e;++f)a[c][f]*=b;return a};exports.subtract=function(a,b){for(var e=Math.min(a.width,b.width),d=Math.min(a.height,b.height),c=0;c<d;++c)for(var f=0;f<e;++f)a[c][f]-=b[c][f];return a};\nexports.erode=function(a,b){logger.info("erode");var e=(b.length-1)/2,d=(b[0].length-1)/2,c=[],f=a.width,h=a.height;c.width=f;c.height=h;for(var g=0;g<h;++g){c[g]=[];for(var i=0;i<f;++i){for(var n=!0,j=-e;j<e+1;++j)for(var k=-d;k<d+1;++k){var l=i+j,m=g+k;b[k+d][j+e]&&(n&=l>=0&&l<f&&m>=0&&m<h&&a[m][l])}c[g][i]=n&&255}}return c};\nexports.dilate=function(a,b){logger.info("dilate");var e=(b.length-1)/2,d=(b[0].length-1)/2,c=[],f=a.width,h=a.height;c.width=f;c.height=h;for(var g=0;g<h;++g){c[g]=[];for(var i=0;i<f;++i){for(var n=!1,j=-e;j<e+1;++j)for(var k=-d;k<d+1;++k){var l=i+j,m=g+k;n|=l>=0&&l<f&&m>=0&&m<h&&b[k+d][j+e]&&a[m][l]}c[g][i]=n&&255}}return c};\n',
friendlyPath:"math2D.morphology",pre:!0},"../../packages/math2D/Vec2D.js":{path:"../../packages/math2D/Vec2D.js",directory:"../../packages/math2D/",filename:"Vec2D.js",src:'var packages_math2D_Vec2D=__class__,Vec2D=exports=packages_math2D_Vec2D(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){"angle"in a?(this.x=a.magnitude*Math.cos(a.angle),this.y=a.magnitude*Math.sin(a.angle)):(this.x=a.x,this.y=a.y)};this.addForce=function(a){this.x+=a.x;this.y+=a.y};this.getAngle=function(){return Math.atan2(this.y,this.x)};this.getMagnitude=function(){return Math.sqrt(this.x*this.x+this.y*this.y)};this.getUnitVector=function(){var a=\nthis.getAngle();return new Vec2D({magnitude:1,angle:a})};this.dot=function(a){return this.x*a.x+this.y*a.y};this.add=function(a){return new Vec2D({x:this.x+a.x,y:this.y+a.y})};this.minus=function(a){return new Vec2D({x:this.x-a.x,y:this.y-a.y})};this.negate=function(){return new Vec2D({x:-this.x,y:-this.y})};this.multiply=function(a){return new Vec2D({angle:this.getAngle(),magnitude:this.getMagnitude()*a})}});\n',
friendlyPath:"math2D.Vec2D",pre:!0},"../../packages/net/csp/client.js":{path:"../../packages/net/csp/client.js",directory:"../../packages/net/csp/",filename:"client.js",baseMod:"net",basePath:"../../packages",src:'jsio("import std.base64 as base64");jsio("import std.utf8 as utf8");jsio("import std.uri as uri");jsio("import net.errors as errors");jsio("import .transports");jsio("import lib.Enum as Enum");var READYSTATE=exports.READYSTATE=Enum({INITIAL:0,CONNECTING:1,CONNECTED:2,DISCONNECTING:3,DISCONNECTED:4});exports.CometSession=__class__;\nexports.CometSession=exports.CometSession(function(){return this.init&&this.init.apply(this,arguments)},function(){var d=0;this.init=function(){this._id=++d;this._url=null;this.readyState=READYSTATE.INITIAL;this._options=this._transport=this._sessionKey=null;this._writeBuffer=this._utf8ReadBuffer="";this._handshakeLater=this._lastSentId=this._lastEventId=this._packetsInFlight=null;this._handshakeBackoff=50;this._timeoutTimer=this._handshakeTimeoutTimer=this._handshakeRetryTimer=null;this._cometBackoff=\nthis._writeBackoff=50;this._nullReceived=this._nullSent=this._nullInFlight=this._nullInBuffer=!1};this.setEncoding=function(a){if(a!=this._options.encoding){if(a!="utf8"&&a!="plain")throw new errors.InvalidEncodingError;if(a=="plain"&&this._buffer){var b=this._utf8ReadBuffer;this._utf8ReadBuffer="";this._doOnRead(b)}this._options.encoding=a}};this.connect=function(a,b){this._url=a.replace(/\\/$/,"");this._options=b||{};this._options.encoding=this._options.encoding||"utf8";this.setEncoding(this._options.encoding);\nthis._options.connectTimeout=this._options.connectTimeout||1E4;this._transport=new (transports.chooseTransport(a,this._options));this._transport.handshakeFailure=bind(this,this._handshakeFailure);this._transport.handshakeSuccess=bind(this,this._handshakeSuccess);this._transport.cometFailure=bind(this,this._cometFailure);this._transport.cometSuccess=bind(this,this._cometSuccess);this._transport.sendFailure=bind(this,this._writeFailure);this._transport.sendSuccess=bind(this,this._writeSuccess);this.readyState=\nREADYSTATE.CONNECTING;this._transport.handshake(this._url,this._options);this._handshakeTimeoutTimer=setTimeout(bind(this,this._handshakeTimeout),this._options.connectTimeout)};this.write=function(a,b){if(this.readyState!=READYSTATE.CONNECTED)throw new errors.ReadyStateError;b=b||this._options.encoding||"utf8";b=="utf8"&&(a=utf8.encode(a));this._writeBuffer+=a;this._doWrite()};this._protocolError=function(a){logger.debug("_protocolError",a);this.readyState=READYSTATE.DISCONNECTED;this._doWrite(!0);\nthis._doOnDisconnect(new errors.ServerProtocolError(a))};this._receivedNullPacket=function(){logger.debug("_receivedNullPacket");this._receivedNull=!0;!this._nullInFlight&&!this._nullInBuffer&&!this._nullSent?(this.readyState=READYSTATE.DISCONNECTING,this._doWrite(!0)):this.readyState=READYSTATE.DISCONNECTED;this._doOnDisconnect(new errors.ConnectionClosedCleanly)};this._sentNullPacket=function(){logger.debug("_sentNullPacket");if((this._nullSent=!0)&&this._nullReceived)this.readyState=READYSTATE.DISCONNECTED};\nthis.close=function(a){logger.debug("close called",a,"readyState",this.readyState);switch(this.readyState){case READYSTATE.CONNECTING:clearTimeout(this._handshakeRetryTimer);clearTimeout(this._handshakeTimeoutTimer);this.readyState=READYSTATE.DISCONNECTED;this._doOnDisconnect(a);break;case READYSTATE.CONNECTED:this.readyState=READYSTATE.DISCONNECTING;this._doWrite(!0);clearTimeout(this._timeoutTimer);break;case READYSTATE.DISCONNECTED:throw new errors.ReadyStateError("Session is already disconnected");\n}this._opened=!1;this.readyState=READYSTATE.DISCONNECTED;this._doOnDisconnect(a);this._sessionKey=null};this._handshakeTimeout=function(){logger.debug("handshake timeout");this._handshakeTimeoutTimer=null;clearTimeout(this._handshakeRetryTimer);if(this.readyState==READYSTATE.CONNECTING)this.readyState=READYSTATE.DISCONNECTED;this._doOnDisconnect(new errors.ServerUnreachable)};this._handshakeSuccess=function(a){logger.debug("handshake success",a);this.readyState!=READYSTATE.CONNECTING?logger.debug("received handshake success in invalid readyState:",\nthis.readyState):(clearTimeout(this._handshakeTimeoutTimer),this._handshakeTimeoutTimer=null,this._sessionKey=a.response.session,this._opened=!0,this.readyState=READYSTATE.CONNECTED,this._doOnConnect(),this._doConnectComet())};this._handshakeFailure=function(a){logger.debug("handshake failure",a);if(this.readyState==READYSTATE.CONNECTING){if(a.status==404)return clearTimeout(this._handshakeTimeoutTimer),this._doOnDisconnect(new errors.ServerUnreachable);logger.debug("trying again in ",this._handshakeBackoff);\nthis._handshakeRetryTimer=setTimeout(bind(this,function(){this._handshakeRetryTimer=null;this._transport.handshake(this._url,this._options)}),this._handshakeBackoff);this._handshakeBackoff*=2}};this._writeSuccess=function(){if(!(this.readyState!=READYSTATE.CONNECTED&&this.readyState!=READYSTATE.DISCONNECTING)){if(this._nullInFlight)return this._sentNullPacket();this._resetTimeoutTimer();this.writeBackoff=50;this._packetsInFlight=null;(this._writeBuffer||this._nullInBuffer)&&this._doWrite(this._nullInBuffer)}};\nthis._writeFailure=function(){if(!(this.readyState!=READYSTATE.CONNECTED&&this.READYSTATE!=READYSTATE.DISCONNECTING))this._writeTimer=setTimeout(bind(this,function(){this._writeTimer=null;this.__doWrite(this._nullInBuffer)}),this._writeBackoff),this._writeBackoff*=2};this._doWrite=function(a){if(this._packetsInFlight){if(a)this._nullInBuffer=!0}else this.__doWrite(a)};this.__doWrite=function(a){logger.debug("_writeBuffer:",this._writeBuffer);if(!this._packetsInFlight&&this._writeBuffer)this._packetsInFlight=\n[this._transport.encodePacket(++this._lastSentId,this._writeBuffer,this._options)],this._writeBuffer="";if(a&&!this._writeBuffer){if(!this._packetsInFlight)this._packetsInFlight=[];this._packetsInFlight.push([++this._lastSentId,0,null]);this._nullInFlight=!0}this._packetsInFlight?(logger.debug("sending packets:",JSON.stringify(this._packetsInFlight)),this._transport.send(this._url,this._sessionKey,this._lastEventId||0,JSON.stringify(this._packetsInFlight),this._options)):logger.debug("no packets to send")};\nthis._doConnectComet=function(){logger.debug("_doConnectComet");this._transport.comet(this._url,this._sessionKey,this._lastEventId||0,this._options)};this._cometFailure=function(a){if(this.readyState==READYSTATE.CONNECTED){if(a.status==404&&a.response=="Session not found")return this.close(new errors.ExpiredSession(a));this._cometTimer=setTimeout(bind(this,"_doConnectComet"),this._cometBackoff);this._cometBackoff*=2}};this._cometSuccess=function(a){if(!(this.readyState!=READYSTATE.CONNECTED&&this.readyState!=\nREADYSTATE.DISCONNECTING)){logger.debug("comet Success:",a);this._cometBackoff=50;this._resetTimeoutTimer();for(var b=a.response,e=0,c;(c=b[e])||e<b.length;e++){logger.debug("process packet:",c);if(c===null)return this.close(new errors.ServerProtocolError(a));logger.debug("process packet",c);var f=c[0],d=c[1],a=c[2];if(!(typeof this._lastEventId=="number"&&f<=this._lastEventId)){if(typeof this._lastEventId=="number"&&f!=this._lastEventId+1)return this._protocolError("Ack id too high");this._lastEventId=\nf;if(a==null)return this._receivedNullPacket();if(d==1)try{logger.debug("before base64 decode:",a),a=base64.decode(a),logger.debug("after base64 decode:",a)}catch(g){return this._protocolError("Unable to decode base64 payload")}if(this._options.encoding=="utf8")this._utf8ReadBuffer+=a,logger.debug("before utf8 decode, _utf8ReadBuffer:",this._utf8ReadBuffer),c=utf8.decode(this._utf8ReadBuffer),a=c[0],this._utf8ReadBuffer=this._utf8ReadBuffer.slice(c[1]),logger.debug("after utf8 decode, _utf8ReadBuffer:",\nthis._utf8ReadBuffer,"data:",a);logger.debug("dispatching data:",a);this._doOnRead(a)}}this.readyState!=READYSTATE.CONNECTED&&this.readyState!=READYSTATE.DISCONNECTING||this._doConnectComet()}};this._doOnRead=function(a){typeof this.onread=="function"?(logger.debug("call onread function",a),this.onread(a)):logger.debug("skipping onread callback (function missing)")};this._doOnDisconnect=function(a){typeof this.ondisconnect=="function"?(logger.debug("call ondisconnect function",a),this.ondisconnect(a)):\nlogger.debug("skipping ondisconnect callback (function missing)")};this._doOnConnect=function(){if(typeof this.onconnect=="function"){logger.debug("call onconnect function");try{this.onconnect()}catch(a){logger.debug("onconnect caused errror",a),setTimeout(function(){throw a;},0)}}else logger.debug("skipping onconnect callback (function missing)")};this._resetTimeoutTimer=function(){clearTimeout(this._timeoutTimer);this._timeoutTimer=setTimeout(bind(this,function(){logger.debug("connection timeout expired");\nthis.close(new errors.ConnectionTimeout)}),this._getTimeoutInterval())};this._getTimeoutInterval=function(){return 45E3}});\n',
friendlyPath:"net.csp.client",pre:!0},"../../packages/std/base64.js":{path:"../../packages/std/base64.js",directory:"../../packages/std/",filename:"base64.js",src:'for(var alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",trailingPad="=",padChar=alphabet.charAt(alphabet.length-1),decodeMap={},i=0,len=alphabet.length;i<len;i++)decodeMap[alphabet.charAt(i)]=i;var alphabet_inverse=RegExp("[^"+alphabet.replace("-","\\\\-")+"]");exports.Base64CodecError=__class__;\nexports.Base64CodecError=exports.Base64CodecError(function(){return this.init&&this.init.apply(this,arguments)},Error,function(a){this.name="Base64CodecError";this.init=function(b){a(this,"init",arguments);this.message=b}});var assertOrBadInput=function(a,b){if(!a)throw new exports.Base64CodecError(b);};\nexports.encode=function(a){assertOrBadInput(!/[^\\x00-\\xFF]/.test(a),"Input contains out-of-range characters.");var b="\\x00\\x00\\x00".slice(a.length%3||3);a+=b;for(var d=[],c=0,e=a.length;c<e;c+=3){var f=(a.charCodeAt(c)<<16)+(a.charCodeAt(c+1)<<8)+a.charCodeAt(c+2);d.push(alphabet.charAt(f>>18&63),alphabet.charAt(f>>12&63),alphabet.charAt(f>>6&63),alphabet.charAt(f&63))}d.length-=b.length;return d.join("")};\nexports.decode=function(a){logger.debug("decode",a);for(var a=a.replace(/\\s/g,""),b=a.length;a.charAt(--b)===trailingPad;);a=a.slice(0,b+1);assertOrBadInput(!alphabet_inverse.test(a),"Input contains out-of-range characters.");var d=4-(a.length%4||4),c=Array(d+1).join(padChar);a+=c;for(var c=[],e=b+d+1,b=0;b<e;b+=4)newchars=(decodeMap[a.charAt(b)]<<18)+(decodeMap[a.charAt(b+1)]<<12)+(decodeMap[a.charAt(b+2)]<<6)+decodeMap[a.charAt(b+3)],c.push(newchars>>16&255,newchars>>8&255,newchars&255);e=c.length-=\nd;if(e>65536){a=[];for(d=b=0;b<e;)a[d++]=String.fromCharCode.apply(String,c.slice(b,b+65536)),b+=65536;a=a.join("")}else a=String.fromCharCode.apply(String,c);logger.debug("decoded",a);return a};\n',
friendlyPath:"std.base64",pre:!0},"../../packages/std/utf8.js":{path:"../../packages/std/utf8.js",directory:"../../packages/std/",filename:"utf8.js",src:'exports.UnicodeCodecError=function(a){this.message=a};var UnicodeCodecError=exports.UnicodeCodecError;UnicodeCodecError.prototype.toString=function(){return"UnicodeCodecError"+(this.message?": "+this.message:"")};exports.encode=function(a){try{return unescape(encodeURIComponent(a))}catch(b){throw new UnicodeCodecError("invalid input string");}};\nexports.decode=function(a){if(/[^\\x00-\\xFF]/.test(a))throw new UnicodeCodecError("invalid utf-8 bytes");var b,c;b=c=a.length;if(a.charCodeAt(b-1)>=128){for(var d=1;d<=3;d++)if(a.charCodeAt(b-d)>=192){c=b-d;break}try{decodeURIComponent(escape(a.slice(c))),c=b}catch(e){}}try{return[decodeURIComponent(escape(a.slice(0,c))),c]}catch(f){throw new UnicodeCodecError("invalid utf-8 bytes");}};\n',
friendlyPath:"std.utf8",pre:!0},"../../packages/std/uri.js":{path:"../../packages/std/uri.js",directory:"../../packages/std/",filename:"uri.js",src:'var attrs="source,protocol,authority,userInfo,user,password,host,port,relative,path,directory,file,query,anchor".split(","),packages_std_uri=__class__,URI=exports=packages_std_uri(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(b,e){if(b instanceof URI)for(var c=0,a;a=attrs[c];++c)this["_"+a]=b["_"+a];else for(a in this._isStrict=e,c=exports.parse(b,e),c)this["_"+a]=c[a]};for(var a=0,d;d=attrs[a];++a)(function(b){var a=b.charAt(0).toUpperCase()+b.slice(1);\nthis["get"+a]=function(){return this["_"+b]};this["set"+a]=function(a){this["_"+b]=a;return this}}).call(this,d);this.query=function(b){return exports.parseQuery(this._query)[b]};this.hash=function(b){return exports.parseQuery(this._anchor)[b]};this.addHash=function(b){var a=exports.parseQuery(this._anchor),c;for(c in b)a[c]=b[c];this._anchor=exports.buildQuery(a);return this};this.push=function(b){if(b)this._path=(this._path+"/"+b).replace(/\\/\\/+/g,"/");return this};this.addQuery=function(b){var a=\nexports.parseQuery(this._query),c;for(c in b)a[c]=b[c];this._query=exports.buildQuery(a);return this};this.removeQuery=function(b){var a=exports.parseQuery(this._query);if(isArray(b))for(var c=0,d=b.length;c<d;++c)delete a[b[c]];else delete a[b];this._query=exports.buildQuery(a);return this};this.toJSON=function(){return this.toString(!1)};this.toString=function(a){var d=this._protocol?this._protocol+"://":"",c=this._host?this._host+((this._port||80)==80?"":":"+this._port):"";return a?d+c:d+c+this._path+\n(this._query?"?"+this._query:"")+(this._anchor?"#"+this._anchor:"")}});exports.relativeTo=function(a,d){if(!d)return a;a=String(a);if(/^http(s?):\\/\\//.test(a))return a;var b=(new exports(d)).setAnchor("").setQuery("").setFile("").toString(a.charAt(0)=="/");return new URI(exports.resolveRelative(b+a))};exports.resolveRelative=function(a){for(;a!=(a=a.replace(/(^|\\/)([^\\/]+)\\/\\.\\.\\//g,"/")););return a.replace(/[^.]\\.\\//g,"")};\nexports.buildQuery=function(a){var d=[],b;for(b in a)d.push(encodeURIComponent(b)+"="+encodeURIComponent(a[b]));return d.join("&")};exports.parseQuery=function(a){for(var a=a.split("&"),d=a.length,b={},e=0;e<d;++e){var c=a[e].split("="),f=decodeURIComponent(c[0]);f&&(b[f]=decodeURIComponent(c[1]))}return b};\nvar strictRegex=/^(?:([^:\\/?#]+):)?(?:\\/\\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?))?((((?:[^?#\\/]*\\/)*)([^?#]*))(?:\\?([^#]*))?(?:#(.*))?)/,looseRegex=/^(?:(?![^:@]+:[^:@\\/]*@)([^:\\/?#.]+):)?(?:\\/\\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/,queryStringRegex=/(?:^|&)([^&=]*)=?([^&]*)/g;\nexports.parse=function(a,d){for(var b={},e=(d?strictRegex:looseRegex).exec(a),c=0,f;f=attrs[c];++c)b[f]=e[c]||"";var g=b.queryKey={};b.query.replace(queryStringRegex,function(a,b,c){a&&(g[b]=c)});return b};exports.isSameDomain=function(a,d){var b=exports.parse(a),e=exports.parse(d);return b.port==e.port&&b.host==e.host&&b.protocol==e.protocol};\n',
friendlyPath:"std.uri",pre:!0},"../../packages/net/env/node/stdio.js":{path:"../../packages/net/env/node/stdio.js",directory:"../../packages/net/env/node/",filename:"stdio.js",src:'jsio("import net.interfaces");\nvar Transport=__class__,Transport=Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(b){this.init=function(a,b){this._inStream=a;this._outStream=b;this.setEncoding("plain")};this.setEncoding=function(a){b(this,"setEncoding",arguments);a=="plain"&&(a="binary");this._inStream.setEncoding(a);this._outStream.setEncoding(a)};this.makeConnection=function(a){this._inStream.on("data",bind(a,"dataReceived"));this._inStream.on("end",bind(a,"connectionLost"))};\nthis.write=function(a){this._outStream.write(a);this._outStream.flush()};this.loseConnection=function(){}});exports.Connector=__class__;exports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Connector,function(){this.connect=function(){var b=process.openStdin();this.onConnect(new Transport(b,process.stdout))}});\n',
friendlyPath:"net.env.node.stdio",pre:!0},"../../packages/net/interfaces.js":{path:"../../packages/net/interfaces.js",directory:"../../packages/net/",filename:"interfaces.js",src:'jsio("import net");jsio("import lib.Enum as Enum");var ctx=jsio.__env.global;exports.Protocol=__class__;\nexports.Protocol=exports.Protocol(function(){return this.init&&this.init.apply(this,arguments)},function(){this.connectionMade=function(){};this.dataReceived=function(){};this.connectionLost=function(){};this._connectionMade=function(){this._isConnected=!0;this.connectionMade.apply(this,arguments)};this._connectionLost=function(){this._isConnected=!0;this.connectionLost.apply(this,arguments)};this._isConnected=!1;this.isConnected=function(){return!!this._isConnected}});exports.Client=__class__;\nexports.Client=exports.Client(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this._protocol=a};this.connect=function(a,b){this._remote=new this._protocol;this._remote._client=this;net.connect(this._remote,a,b)}});exports.Server=__class__;\nexports.Server=exports.Server(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this._protocolClass=a};this.buildProtocol=function(){return new this._protocolClass};this.listen=function(a,b){return net.listen(this,a,b)}});exports.Transport=__class__;\nexports.Transport=exports.Transport(function(){return this.init&&this.init.apply(this,arguments)},function(){this._encoding="plain";this.write=function(){throw Error("Not implemented");};this.getPeer=function(){throw Error("Not implemented");};this.setEncoding=function(a){this._encoding=a};this.getEncoding=function(){return this._encoding}});exports.Listener=__class__;\nexports.Listener=exports.Listener(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b){this._server=a;this._opts=b||{}};this.onConnect=function(a){var b=this._server.buildProtocol();b.transport=a;b.server=this._server;a.protocol=b;a.makeConnection(b);b._connectionMade()};this.listen=function(){throw Error("Abstract class");};this.stop=function(){}});exports.STATE=Enum("INITIAL","DISCONNECTED","CONNECTING","CONNECTED");exports.Connector=__class__;\nexports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b){this._protocol=a;this._opts=b;this._state=exports.STATE.INITIAL};this.getState=function(){return this._state};this.onConnect=function(a){this._state=exports.STATE.CONNECTED;a.makeConnection(this._protocol);this._protocol.transport=a;try{this._protocol._connectionMade()}catch(b){throw logger.error(b);}};this.onDisconnect=function(a){var b=this._state==exports.STATE.CONNECTED;\nthis._state=exports.STATE.DISCONNECTED;try{this._protocol._connectionLost(a,b)}catch(c){throw logger.error(c);}};this.getProtocol=function(){return this._protocol}});\n',
friendlyPath:"net.interfaces",pre:!0},"../../packages/net.js":{path:"../../packages/net.js",directory:"../../packages/",filename:"net.js",src:'jsio("import net.env");jsio("import std.JSON as JSON");JSON.createGlobal();exports.listen=function(a,b,c){if(!b)throw logger.error("No transport provided for net.listen");a=new (typeof b=="string"?net.env.getListener(b):b)(a,c);a.listen();return a};exports.connect=function(a,b,c){a=new (typeof b=="string"?net.env.getConnector(b):b)(a,c);a.connect();return a};exports.quickServer=function(a){jsio("import net.interfaces");return new net.interfaces.Server(a)};\n',
friendlyPath:"net",pre:!0},"../../packages/net/env.js":{path:"../../packages/net/env.js",directory:"../../packages/net/",filename:"env.js",src:'function getObj(c,a,b){try{jsio("from .env."+(b||jsio.__env.name)+"."+a+" import "+c+" as result")}catch(d){throw logger.error("Invalid transport (",a,") or environment (",b,")");}return result}exports.getListener=bind(this,getObj,"Listener");exports.getConnector=bind(this,getObj,"Connector");\n',friendlyPath:"net.env",pre:!0},"../../packages/std/JSON.js":{path:"../../packages/std/JSON.js",
directory:"../../packages/std/",filename:"JSON.js",src:'exports.createGlobal=function(){typeof JSON=="undefined"&&(JSON={});if(typeof JSON.stringify!=="function")JSON.stringify=exports.stringify;if(typeof JSON.parse!=="function")JSON.parse=exports.parse};\n(function(){function n(a){o.lastIndex=0;return o.test(a)?\'"\'+a.replace(o,function(a){var c=q[a];return typeof c==="string"?c:"\\\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+\'"\':\'"\'+a+\'"\'}function l(a,j){var c=e,b=j[a];b&&typeof b==="object"&&typeof b.toJSON==="function"&&(b=b.toJSON(a));typeof k==="function"&&(b=k.call(j,a,b));switch(typeof b){case "string":return n(b);case "number":return isFinite(b)?String(b):"null";case "boolean":return String(b);case "object":if(b===null)return"null";\nif(b.constructor===Date)return exports.stringifyDate(b);e+=m;var g=[];if(b.constructor===Array){for(var i=b.length,d=0;d<i;d+=1)g[d]=l(d,b)||"null";var h=g.length===0?"[]":e?"[\\n"+e+g.join(",\\n"+e)+"\\n"+c+"]":"["+g.join(",")+"]";e=c;return h}if(k&&typeof k==="object"){i=k.length;for(d=0;d<i;d+=1){var f=k[d];typeof f==="string"&&(h=l(f,b))&&g.push(n(f)+(e?": ":":")+h)}}else for(f in b)Object.hasOwnProperty.call(b,f)&&(h=l(f,b))&&g.push(n(f)+(e?": ":":")+h);h=g.length===0?"{}":e?"{\\n"+e+g.join(",\\n"+\ne)+"\\n"+c+"}":"{"+g.join(",")+"}";e=c;return h}}var p=/[\\u0000\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,o=/[\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,e,m,q={"\\u0008":"\\\\b","\\t":"\\\\t","\\n":"\\\\n","\\u000c":"\\\\f","\\r":"\\\\r",\'"\':\'\\\\"\',"\\\\":"\\\\\\\\"},k;exports.stringify=function(a,j,c){m=e="";if(typeof c==="number")for(var b=0;b<c;b+=1)m+=" ";else typeof c==="string"&&(m=\nc);if((k=j)&&typeof j!=="function"&&(typeof j!=="object"||typeof j.length!=="number"))throw Error("JSON stringify: invalid replacer");return l("",{"":a})};exports.stringifyDate=function(a){var e=a.getUTCFullYear(),c=a.getUTCMonth()+1,b=a.getUTCDate(),g=a.getUTCHours(),i=a.getUTCMinutes(),d=a.getUTCSeconds(),a=a.getUTCMilliseconds();c<10&&(c="0"+c);b<10&&(b="0"+b);g<10&&(g="0"+g);i<10&&(i="0"+i);d<10&&(d="0"+d);a<10?a="00"+a:a<100&&(a="0"+a);return\'"\'+e+"-"+c+"-"+b+"T"+g+":"+i+":"+d+"."+a+\'Z"\'};exports.parse=\nfunction(a,e){p.lastIndex=0;p.test(a)&&(a=a.replace(p,function(a){return"\\\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)}));if(/^[\\],:{}\\s]*$/.test(a.replace(/\\\\(?:["\\\\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\\\\n\\r]*"|true|false|null|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?/g,"]").replace(/(?:^|:|,)(?:\\s*\\[)+/g,""))){var c=eval("("+a+")");if(e){var b=function(a,c){var d,h,f=a[c];if(f&&typeof f==="object")for(d in f)Object.hasOwnProperty.call(f,d)&&(h=b(f,d),h!==void 0?f[d]=h:delete f[d]);return e.call(a,\nc,f)};return b({"":c},"")}else return c}throw new SyntaxError("JSON.parse");}})();\n',
friendlyPath:"std.JSON",pre:!0},"../../packages/net/errors.js":{path:"../../packages/net/errors.js",directory:"../../packages/net/",filename:"errors.js",src:'var makeErrorClass=function(b){var c=function(a){typeof a=="string"?this.message=a:this.data=a};c.prototype={type:b,toString:function(){return b+(this.message?": "+this.message:"")}};return c};exports.ReadyStateError=makeErrorClass("ReadyStateError");exports.InvalidEncodingError=makeErrorClass("InvalidEncodingError");exports.ExpiredSession=makeErrorClass("ExpiredSession");exports.ServerUnreachable=makeErrorClass("ServerUnreachable",100);\nexports.ConnectionTimeout=makeErrorClass("ConnectionTimeout",101);exports.ServerProtocolError=makeErrorClass("ServerProtocolError",200);exports.ServerClosedConnection=makeErrorClass("ServerClosedConnection",301);exports.ConnectionClosedCleanly=makeErrorClass("ConnectionClosedCleanly",300);\n',
friendlyPath:"net.errors",pre:!0},"../../packages/net/csp/transports.js":{path:"../../packages/net/csp/transports.js",directory:"../../packages/net/csp/",filename:"transports.js",src:'jsio("import std.uri as uri");jsio("import std.base64 as base64");jsio("from util.browserdetect import BrowserDetect");\n(function(){var a;exports.getDoc=function(){if(a)return a;try{if(a=window.ActiveXObject&&new ActiveXObject("htmlfile"))a.open().write("<html></html>"),a.close(),window.attachEvent("onunload",function(){try{a.body.innerHTML=""}catch(b){}a=null})}catch(b){}a||(a=document);return a};exports.XHR=function(){var a=window;exports.getDoc();return new (exports.XHR=a.XMLHttpRequest?a.XMLHttpRequest:function(){return a.ActiveXObject&&new a.ActiveXObject("Msxml2.XMLHTTP")||null})};exports.createXHR=function(){return new exports.XHR}})();\nfunction isLocalFile(a){return/^file:\\/\\//.test(a)}function isWindowDomain(a){return uri.isSameDomain(a,window.location.href)}var xhrSupportsBinary=void 0;function checkXHRBinarySupport(a){xhrSupportsBinary=!!a.sendAsBinary}\nfunction canUseXHR(a){if(isLocalFile(a))return!1;var b=new exports.XHR;if(!b)return!1;checkXHRBinarySupport(b);if(isWindowDomain(a))return!0;if(window.XMLHttpRequest&&(b.__proto__==XMLHttpRequest.prototype||b instanceof window.XMLHttpRequest)&&b.withCredentials!==void 0||window.XDomainRequest&&b instanceof window.XDomainRequest)return!0}var transports=exports.transports={};\nexports.chooseTransport=function(a,b){switch(b.preferredTransport){case "jsonp":return transports.jsonp;default:return canUseXHR(a)?transports.xhr:transports.jsonp}};var PARAMS={xhrstream:{is:"1",bs:"\\n"},xhrpoll:{du:"0"},xhrlongpoll:{},sselongpoll:{bp:"data: ",bs:"\\r\\n",se:"1"},ssestream:{bp:"data: ",bs:"\\r\\n",se:"1",is:"1"}};exports.Transport=__class__;\nexports.Transport=exports.Transport(function(){return this.init&&this.init.apply(this,arguments)},function(){this.handshake=function(){throw Error("handshake Not Implemented");};this.comet=function(){throw Error("comet Not Implemented");};this.send=function(){throw Error("send Not Implemented");};this.encodePacket=function(){throw Error("encodePacket Not Implemented");};this.abort=function(){throw Error("abort Not Implemented");}});\nvar baseTransport=__class__,baseTransport=baseTransport(function(){return this.init&&this.init.apply(this,arguments)},exports.Transport,function(){this.init=function(){this._aborted=!1;this._handshakeArgs={ct:"application/javascript"};this._handshakeData="{}"};this.handshake=function(a,b){logger.debug("handshake:",a,b);this._makeRequest("send",a+"/handshake",this._handshakeArgs,this._handshakeData,this.handshakeSuccess,this.handshakeFailure)};this.comet=function(a,b,j,h){logger.debug("comet:",a,b,\nj,h);this._makeRequest("comet",a+"/comet",{s:b,a:j},null,this.cometSuccess,this.cometFailure)};this.send=function(a,b,j,h){this._makeRequest("send",a+"/send",{s:b,a:j},h,this.sendSuccess,this.sendFailure)}});transports.xhr=__class__;\ntransports.xhr=transports.xhr(function(){return this.init&&this.init.apply(this,arguments)},baseTransport,function(a){function b(a,b,c,i){try{var f={status:a.status}}catch(g){i({response:"Could not access status"})}try{if(a.readyState!=4)return;f.response=eval(a.responseText);if(f.status!=200){logger.debug("XHR failed with status ",a.status);i(f);return}logger.debug("XHR data received")}catch(d){logger.debug("Error in XHR::onReadyStateChange",d);i(f);this._abortXHR(b);logger.debug("done handling XHR error");\nreturn}c(f)}this.init=function(){a(this,"init");this._xhr={send:new exports.XHR,comet:new exports.XHR}};this.abort=function(){this._aborted=!0;for(var a in this._xhr)this._xhr.hasOwnProperty(a)&&this._abortXHR(a)};this._abortXHR=function(a){logger.debug("aborting XHR");var b=this._xhr[a];try{if("onload"in b)b.onload=b.onerror=b.ontimeout=null;else if("onreadystatechange"in b)b.onreadystatechange=null;b.abort&&b.abort()}catch(c){logger.debug("error aborting xhr",c)}this._xhr[a]=new exports.XHR};this.encodePacket=\nfunction(a,b){return!xhrSupportsBinary?[a,1,base64.encode(b)]:[a,0,b]};this._makeRequest=function(a,h,c,i,f,g){if(!this._aborted){var d=this._xhr[a];d.open("POST",h+"?"+uri.buildQuery(c));d.setRequestHeader("Content-Type","text/plain");if("onload"in d)d.onload=bind(this,b,d,a,f,g),d.onerror=d.ontimeout=g;else if("onreadystatechange"in d)d.onreadystatechange=bind(this,b,d,a,f,g);setTimeout(function(){d[xhrSupportsBinary?"sendAsBinary":"send"](i||null)},0)}}});\nvar EMPTY_FUNCTION=function(){},SLICE=Array.prototype.slice;transports.jsonp=__class__;\ntransports.jsonp=transports.jsonp(function(){return this.init&&this.init.apply(this,arguments)},baseTransport,function(a){function b(d,a){logger.debug("successful: ",d.url,a);d.completed=!0;logger.debug("calling the cb");d.cb.call(GLOBAL,{status:200,response:a});logger.debug("cb called")}function j(d,a){if(!(a&&a.readyState!="loaded"))a.onreadystatechange=function(){},h.call(this,d)}function h(d,a){i(this._ifr[d.type]);if(!d.completed){var b={status:a?200:404,response:a||"Unable to load resouce"};\nlogger.debug("error making request:",d.url,b);logger.debug("calling eb");d.eb.call(GLOBAL,b)}}var c=function(){var a=exports.getDoc();if(!a.body)return!1;var b=a.createElement("iframe");with(b.style)display="block",width=height=border=margin=padding="0",overflow=visibility="hidden",position="absolute",top=left="-999px";b.cbId=0;a.body.appendChild(b);b.src="about:blank";return b},i=function(a){var b=a.contentWindow,e=b.document;logger.debug("removing script tags");for(var f=e.getElementsByTagName("script"),\ng=f.length-1;g>=0;--g)e.body.removeChild(f[g]);logger.debug("deleting iframe callbacks");b["cb"+a.cbId]=b["eb"+a.cbId]=EMPTY_FUNCTION},f=function(a){setTimeout(function(){a&&a.parentNode&&a.parentNode.removeChild(a)},6E4)};this.init=function(){a(this,"init");this._onReady=[];this._isReady=!1;this._createIframes()};this._createIframes=function(){this._ifr={send:c(),comet:c()};if(this._ifr.send===!1)return setTimeout(bind(this,"_createIframes"),100);this._isReady=!0;var a=this._onReady;this._onReady=\n[];for(var b=0,e;e=a[b];++b)this._makeRequest.apply(this,e)};this.encodePacket=function(a,b){return[a,1,base64.encode(b)]};this.abort=function(){this._aborted=!0;for(var a in this._ifr)if(this._ifr.hasOwnProperty(a)){var b=this._ifr[a];i(b);f(b)}};this._makeRequest=function(a,b,e,g,f,h){if(!this._isReady)return this._onReady.push(arguments);var c=++this._ifr[a].cbId,c={type:a,id:c,cb:f,eb:h,cbName:"cb"+c,ebName:"eb"+c,completed:!1};e.d=g;e.n=Math.random();switch(a){case "send":e.rs=";";e.rp=c.cbName;\nbreak;case "comet":e.bs=";",e.bp=c.cbName}c.url=b+"?"+uri.buildQuery(e);setTimeout(bind(this,"_request",c),0)};this._request=function(a){var c=this._ifr[a.type].contentWindow,e=c.document,f=e.body;if(!f)return setTimeout(bind(this,"_request",a),100);c[a.ebName]=bind(this,h,a);c[a.cbName]=bind(this,b,a);if(BrowserDetect.isWebKit)e.open(),e.write(\'<script src="\'+a.url+\'"><\\/script><script>\'+ebName+"(false)<\\/script>"),e.close();else{c=e.createElement("script");c.src=a.url;if(c.onreadystatechange===\nnull)c.onreadystatechange=bind(this,j,a,c);f.appendChild(c);if(!BrowserDetect.isIE)c=e.createElement("script"),c.innerHTML=a.ebName+"(false)",f.appendChild(c)}g()};var g=BrowserDetect.isFirefox||BrowserDetect.isOpera?function(){var a=document.body;if(a){if(!g.iframe)g.iframe=document.createElement("iframe");a.insertBefore(g.iframe,a.firstChild);a.removeChild(g.iframe)}}:function(){}});\n',
friendlyPath:".transports",pre:!0},"../../packages/util/browserdetect.js":{path:"../../packages/util/browserdetect.js",directory:"../../packages/util/",filename:"browserdetect.js",src:'exports.BrowserDetect=new function(){function b(f){for(var c=0,a;a=f[c];c++){var b=a.string,d=a.prop;a.identity=a.identity||a.subString;e=a.versionSearch||a.identity;if(b){if(b.indexOf(a.subString)!=-1)return a.identity}else if(d)return a.identity}}function d(b){var c=b.indexOf(e);return c==-1?void 0:parseFloat(b.substring(c+e.length+1))}var e,g=[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac"},{string:navigator.userAgent,subString:"iPhone",\nidentity:"iPhone/iPod"},{string:navigator.platform,subString:"Linux"}];this.browser=b([{string:navigator.userAgent,subString:"Chrome"},{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/"},{string:navigator.vendor,subString:"Apple",identity:"Safari",versionSearch:"Version"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox"},{string:navigator.vendor,\nsubString:"Camino"},{string:navigator.userAgent,subString:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"IE",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}])||"unknown";this.version=d(navigator.userAgent)||d(navigator.appVersion)||"unknown";this.OS=b(g)||"unknown";this.isWebKit=/ AppleWebKit\\//.test(navigator.userAgent);this["is"+\nthis.browser]=this.version};\n',
friendlyPath:"util.browserdetect",pre:!0},"../../packages/net/env/browser/csp.js":{path:"../../packages/net/env/browser/csp.js",directory:"../../packages/net/env/browser/",filename:"csp.js",src:'jsio("import net.interfaces");jsio("from net.csp.client import CometSession");jsio("import std.utf8 as utf8");exports.Connector=__class__;\nexports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Connector,function(){this.connect=function(){this._state=net.interfaces.STATE.CONNECTING;var a=new CometSession;a.onconnect=bind(this,"cometSessionOnConnect",a);a.ondisconnect=bind(this,"onDisconnect");logger.debug("opening the connection");if(!this._opts.encoding)this._opts.encoding="plain";a.connect(this._opts.url,this._opts)};this.cometSessionOnConnect=function(a){logger.debug("conn has opened");\nthis.onConnect(new Transport(a))}});var Transport=__class__,Transport=Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(){this.init=function(a){this._conn=a};this.makeConnection=function(a){this._conn.onread=bind(a,"dataReceived")};this.write=function(a){this._conn.write(a)};this.loseConnection=function(){this._conn.close()}});\n',
friendlyPath:"net.env.browser.csp",pre:!0},"../../packages/net/env/browser/iframe.js":{path:"../../packages/net/env/browser/iframe.js",directory:"../../packages/net/env/browser/",filename:"iframe.js",src:'jsio("import net.interfaces;");jsio("from util.browser import $;");function findFrame(){var a=window;if(top==a)return"";var c=[],d=function(f){for(var b=0,e=f.length;b<e;++b)if(f[b]==a||d(f[b]))return c.unshift(b),!0};d(top);return c.join("-")}function findTarget(a){try{for(var c=a.split("-"),a=top,d=0,f;f=c[d];++d)a=a[f];return a&&a.postMessage?a:null}catch(b){return logger.error(b,"Could not find iframe target:",a,"(possibly a security error)"),null}}exports.Listener=__class__;\nexports.Listener=exports.Listener(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Listener,function(a){var c={background:"#442",border:"1px solid #885",margin:"0px 0px -1px 3px",MozBorderRadius:"3px 0px 0px 3px",WebkitBorderRadius:"3px 0px 0px 3px",boxSizing:"border-box",borderRightWidth:"0px",padding:"2px 0px 2px 5px",cursor:"pointer"};this.init=function(d,f){a(this,"init",arguments);this._clients={};this._opts=f;this._numTabs=0;this._frames=[]};this.buildTabUI=function(){$.style(document.documentElement,\n{overflow:"hidden",margin:"0px",padding:"0px",width:"100%",height:"100%"});$.style(document.body,{margin:"0px",padding:"0px",width:"100%",height:"100%"});$.onEvent(window,"resize",this,"onResize");this._leftCol=$({style:{position:"absolute",top:"0px",left:"0px",width:"150px",height:"100%",overflow:"hidden",paddingTop:"5px",background:"#444",fontWeight:"bold",color:"#EEA"},parent:document.body});this._rightCol=$({style:{position:"absolute",top:"0px",right:"0px",height:"100%",background:"#EEE",boxSizing:"border-box",\nborder:"1px solid #CCC",borderWidth:"0px 1px",overflowX:"hidden",overflowY:"auto"},parent:document.body});this._serverContent=$({style:{position:"absolute",top:"0px",right:"0px",width:"100%",height:"100%",boxSizing:"border-box",padding:"10px"},parent:this._rightCol});var d=this.createTab("server");$.onEvent(d,"click",this,"showFrame",this._serverContent);if(this._opts&&this._opts.clientURL)d=this.createTab("+ client",1),$.onEvent(d,"click",this,"onNewTabClick"),this._lastTab=d;this.onResize();return this._serverContent};\nthis.findFrame=function(){return findFrame()};this.getDOM=function(){return this._serverContent};this.onResize=function(){this._rightCol.style.width=$(window).width-150+"px"};this.createTab=function(d,a){var b=$({style:c});$.style(b,{marginLeft:(a||0)*10+"px"});b.text=$({text:d,parent:b});var e=$({style:{"float":"right"},before:b.text});b.status=function(d){$.setText(e,d)};this._lastTab?this._leftCol.insertBefore(b,this._lastTab):this._leftCol.appendChild(b);$.onEvent(b,"mouseover",bind($,$.style,\nb,{background:"#664"}));$.onEvent(b,"mouseout",bind($,$.style,b,{background:"#442"}));$.onEvent(b,"mousedown",bind($,$.style,b,{background:"#111"}));$.onEvent(b,"mouseup",bind($,$.style,b,{background:"#442"}));return b};this.createCloseableTab=function(d,a,b){d=b?this.newTab(b,d,a):this.createTab(d,a);d.close=$({text:"X",style:{"float":"right",border:"1px solid #AAF",background:"#000",padding:"1px"},before:d.firstChild});return d};this.onNewTabClick=function(){this.newTab()};this.newTab=function(d,\na,b){++this._numTabs;var a=a||this._numTabs,e=this.createTab(a,b);e.status("loading...");var c=$({tag:"iframe",attrs:{border:0,name:"tab"+this._numTabs},style:{position:"absolute",left:"200%",width:"100%",height:"100%",borderWidth:"0px"}});c.src=d||this._opts.clientURL;this._rightCol.appendChild(c);c.onload=bind(this,"onFrameLoad",c,e);this._frames.push(c);e._frame=c;$.onEvent(e,"click",this,"showFrame",c);e.reload=$({text:"R",style:{"float":"right",border:"1px solid #AAF",background:"#000",padding:"1px"},\nbefore:e.firstChild});$.onEvent(e.reload,"click",function(){e.status("loading...");c.contentWindow.location.reload(!0)});this.onResize();return e};this.onFrameLoad=function(a,c){this.showFrame(a);c.status("")};this.showFrame=function(a){this._currentFrame&&$.style(this._currentFrame,{left:"200%"});this._currentFrame=a;$.style(a,{left:"0%"})};this.listen=function(){$.onEvent(window,"message",bind(this,"_onMessage"))};this._onMessage=function(a){var c=a.source.name,b=this._clients[c],e=a.data;if(/^iS>/.test(e))switch(e=\neval("("+e.substring(3)+")"),e.type){case "open":this._clients[c]=new exports.Transport(a.source,"iC<");a.source.postMessage(\'iC<{type:"open"}\',"*");this.onConnect(this._clients[c]);break;case "data":b.onData(e.payload);break;case "close":b.onClose(),a.source.postMessage(\'iC<{type:"close"}\',"*"),delete this._clients[c]}}});exports.Connector=__class__;\nexports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Connector,function(){this.connect=function(){var a;a=this._opts.target?findTarget(this._opts.target):top;findFrame();$.onEvent(window,"message",bind(this,"_onMessage"));a.postMessage(\'iS>{"type":"open"}\',"*")};this._onMessage=function(a){var c=a.data;if(/^iC</.test(c))switch(c=eval("("+c.substring(3)+")"),c.type){case "open":this._transport=new exports.Transport(a.source,"iS>");this.onConnect(this._transport);\nbreak;case "close":this._transport.onClose();break;case "data":this._transport.onData(c.payload)}}});exports.Transport=__class__;\nexports.Transport=exports.Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(){this.init=function(a,c){this._win=a;this._prefix=c};this.makeConnection=function(a){this._protocol=a};this.write=function(a){this.encoding=="utf8"?this._win.postMessage(this._prefix+JSON.stringify({type:"data",payload:utf8.encode(a)}),"*"):this._win.postMessage(this._prefix+JSON.stringify({type:"data",payload:a}),"*")};this.loseConnection=function(){this._win.postMessage(JSON.stringify({type:"close",\ncode:301}),"*")};this.onData=function(){this._protocol.dataReceived.apply(this._protocol,arguments)};this.onClose=function(){this._protocol._connectionLost.apply(this._protocol,arguments)}});\n',
friendlyPath:"net.env.browser.iframe",pre:!0},"../../packages/util/browser.js":{path:"../../packages/util/browser.js",directory:"../../packages/util/",filename:"browser.js",src:'if(jsio.__env.name=="browser"){jsio("external .sizzle import Sizzle");jsio("import math2D.Rect");var isWindow=function(a){return a&&!$.isElement(a)&&$.isElement(a.document)},singleId=/^#([\\w-]+)$/,$=exports.$=function(a,b){switch(typeof a){case "object":if($.isElement(a))return $.remove(a);else if($.isElement(a.document&&a.document.body))return $.size(a);return $.create(a);case "string":return singleId.test(a)?$.id(a.substring(1),b):Sizzle.apply(GLOBAL,arguments)}},DOM2=typeof HTMLElement==="object";\n$.isElement=DOM2?function(a){return a&&a instanceof HTMLElement}:function(a){return a&&typeof a.nodeType=="number"&&typeof a.nodeName=="string"};$.id=function(a,b){return typeof a=="string"?(b||window).document.getElementById(a):a};$.apply=function(a,b){if(b.attrs)for(attr in b.attrs)a.setAttribute(attr,b.attrs[attr]);if(b.id)a.id=b.id;b.style&&$.style(a,b.style);if(b.src)a.src=b.src;if(b["class"]||b.className)a.className=b["class"]||b.className;var c=b.parent||b.parentNode;c&&b.first?$.insertBefore(c,\na,c.firstChild):b.before?$.insertBefore(b.before.parentNode||c,a,b.before):b.after?$.insertAfter(b.after.parentNode||c,a,b.after):c&&c.appendChild(a);if("html"in b)a.innerHTML=b.html;"text"in b&&$.setText(a,b.text);if(b.children)for(var c=b.children,d=0,e=c.length;d<e;++d)a.appendChild($.isElement(c[d])?c[d]:$(c[d]));return a};$.insertBefore=function(a,b,c){a&&b&&(c&&c.parentNode==a?a.insertBefore(b,c):a.appendChild(b))};$.insertAfter=function(a,b,c){a&&b&&(!c||c.parentNode!=a?$.insertBefore(a,b,\na.firstChild):c.nextSibling?a.insertBefore(b,c.nextSibling):a.appendChild(b))};$.create=function(a){var b=(a&&a.win||window).document;return!a||typeof a=="string"?b.createElement(a||"div"):$.apply(a.el||b.createElement(a.tag||a.tagName||"div"),a)};$.show=function(a,b){$.id(a).style.display=b||"block"};$.hide=function(a){$.id(a).style.display="none"};$.addClass=function(a,b){if(a){a=$.id(a);typeof b=="string"&&(b=b.split(" "));for(var c=" "+a.className+" ",d=0,e=b.length;d<e;++d){var f=b[d];c.indexOf(" "+\nf+" ")==-1&&(c+=f+" ")}a.className=c.replace(/^\\s+|\\s+$/g,"");return $}};$.getTag=function(a,b){return a.getElementsByTagName(b)};$.removeClass=function(a,b){if(a)a=$.id(a),a.className=(" "+a.className+" ").replace(" "," ").replace(RegExp("( "+b.replace("s+"," | ").replace("-","-")+" )","g")," ").replace(/\\s+/," ").replace(/^\\s+|\\s+$/g,"")};var ieGetAlpha=function(a){try{return a.filters.item("alpha")}catch(b){}try{return a.filters.item("progid:DXImageTransform.Microsoft.Alpha")}catch(c){}return null};\n$.style=function(a,b){if(a instanceof Array)for(var c=0,d;d=a[c];++c)$.style(d,b);else for(prop in a=$.id(a),c=a.style,b)switch(prop){case "styleFloat":case "cssFloat":case "float":c.styleFloat=c.cssFloat=b[prop];break;case "opacity":c.opacity=b[prop];if(a.filters)try{d=ieGetAlpha();var e=b[prop]==1?99.99:b[prop]*100;d?d.Opacity=e:c.filter="alpha(opacity="+e+")"}catch(f){}break;case "borderRadius":c.borderRadius=c.MozBorderRadius=b[prop];break;case "boxSizing":c.MsBoxSizing=c.MozBoxSizing=c.WebkitBoxSizing=\nb[prop];default:c[prop]=b[prop]}};$.onEvent=function(a,b,c){typeof c!="function"&&(c=bind.apply(GLOBAL,Array.prototype.slice.call(arguments,2)));var d=c,a=$.id(a);a.addEventListener?a.addEventListener(b,d,!1):(d=function(a){c(a||window.event)},a.attachEvent("on"+b,d));return bind($,"removeEvent",a,b,d)};$.removeEvent=function(a,b,c){a=$.id(a);a.addEventListener?a.removeEventListener(b,c,!1):a.detachEvent("on"+b,c)};$.stopEvent=function(a){if(a)a.cancelBubble=!0,a.stopPropagation&&a.stopPropagation(),\na.preventDefault&&a.preventDefault()};$.setText=function(a,b){a=$.id(a);b=String(b);"textContent"in a?a.textContent=b:"innerText"in a?a.innerText=b.replace(/\\n/g," "):(a.innerHTML="",a.appendChild(document.createTextNode(b)))};$.setValue=function(a,b){a=$.id(a);if("value"in a)a.value=b;else if("value"in a.firstChild)a.firstChild.value=b};$.remove=function(a){(a=$.id(a))&&a.parentNode&&a.parentNode.removeChild(a)};$.cursorPos=function(a,b){var c=$.pos(b);c.top=a.clientY-c.top+(window.pageYOffset||\ndocument.documentElement.scrollTop||document.body.scrollTop);c.left=a.clientX-c.left+(window.pageXOffset||document.documentElement.scrollLeft||document.body.scrollLeft);return c};$.pos=function(a){for(var b={top:0,left:0};a&&a!=document.body;){b.left+=a.offsetLeft;for(b.top+=a.offsetTop;a.offsetParent!=a.parentNode;)b.top-=a.scrollTop,b.left-=a.scrollLeft,a=a.parentNode;a=a.offsetParent}return b};$.size=function(a){if($.isElement(a))return{width:a.offsetWidth,height:a.offsetHeight};else if(a.document){var b=\na.document.documentElement||a.document.body;return new math2D.Rect(b.offsetTop,b.offsetLeft,a.innerWidth||b.clientWidth||b.clientWidth,a.innerHeight||b.clientHeight||b.clientHeight)}};$.insertCSSFile=function(a){document.getElementsByTagName("head")[0].appendChild($({tag:"link",attrs:{rel:"stylesheet",type:"text/css",href:a}}))}};\n',
friendlyPath:"util.browser",pre:!0},"../../packages/util/sizzle.js":{path:"../../packages/util/sizzle.js",directory:"../../packages/util/",filename:"sizzle.js",src:'Sizzle=function(){function w(a,b,c,d,f,e){for(var f=a=="previousSibling"&&!e,h=0,i=d.length;h<i;h++){var g=d[h];if(g){if(f&&g.nodeType===1)g.sizcache=c,g.sizset=h;for(var g=g[a],j=!1;g;){if(g.sizcache===c){j=d[g.sizset];break}if(g.nodeType===1&&!e)g.sizcache=c,g.sizset=h;if(g.nodeName===b){j=g;break}g=g[a]}d[h]=j}}}function x(a,b,c,d,f,e){for(var f=a=="previousSibling"&&!e,h=0,i=d.length;h<i;h++){var g=d[h];if(g){if(f&&g.nodeType===1)g.sizcache=c,g.sizset=h;for(var g=g[a],l=!1;g;){if(g.sizcache===\nc){l=d[g.sizset];break}if(g.nodeType===1){if(!e)g.sizcache=c,g.sizset=h;if(typeof b!=="string"){if(g===b){l=!0;break}}else if(j.filter(b,[g]).length>0){l=g;break}}g=g[a]}d[h]=l}}}var t=/((?:\\((?:\\([^()]+\\)|[^()]+)+\\)|\\[(?:\\[[^[\\]]*\\]|[\'"][^\'"]*[\'"]|[^[\\]\'"]+)+\\]|\\\\.|[^ >+~,(\\[\\\\]+)+|[>+~])(\\s*,\\s*)?/g,u=0,y=Object.prototype.toString,m=!1,j=function(a,b,c,d){var c=c||[],f=b=b||document;if(b.nodeType!==1&&b.nodeType!==9)return[];if(!a||typeof a!=="string")return c;var e=[],h,o,g,l,p=!0,r=s(b);for(t.lastIndex=\n0;(h=t.exec(a))!==null;)if(e.push(h[1]),h[2]){l=RegExp.rightContext;break}if(e.length>1&&A.exec(a))if(e.length===2&&i.relative[e[0]])o=z(e[0]+e[1],b);else for(o=i.relative[e[0]]?[b]:j(e.shift(),b);e.length;)a=e.shift(),i.relative[a]&&(a+=e.shift()),o=z(a,o);else if(!d&&e.length>1&&b.nodeType===9&&!r&&i.match.ID.test(e[0])&&!i.match.ID.test(e[e.length-1])&&(h=j.find(e.shift(),b,r),b=h.expr?j.filter(h.expr,h.set)[0]:h.set[0]),b){h=d?{expr:e.pop(),set:n(d)}:j.find(e.pop(),e.length===1&&(e[0]==="~"||\ne[0]==="+")&&b.parentNode?b.parentNode:b,r);o=h.expr?j.filter(h.expr,h.set):h.set;for(e.length>0?g=n(o):p=!1;e.length;){var k=e.pop();h=k;i.relative[k]?h=e.pop():k="";h==null&&(h=b);i.relative[k](g,h,r)}}else g=[];g||(g=o);if(!g)throw"Syntax error, unrecognized expression: "+(k||a);if(y.call(g)==="[object Array]")if(p)if(b&&b.nodeType===1)for(a=0;g[a]!=null;a++)g[a]&&(g[a]===!0||g[a].nodeType===1&&B(b,g[a]))&&c.push(o[a]);else for(a=0;g[a]!=null;a++)g[a]&&g[a].nodeType===1&&c.push(o[a]);else c.push.apply(c,\ng);else n(g,c);l&&(j(l,f,c,d),j.uniqueSort(c));return c};j.uniqueSort=function(a){if(q&&(m=!1,a.sort(q),m))for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)};j.matches=function(a,b){return j(a,null,null,b)};j.find=function(a,b,c){var d,f;if(!a)return[];for(var e=0,h=i.order.length;e<h;e++){var j=i.order[e];if(f=i.match[j].exec(a)){var g=RegExp.leftContext;if(g.substr(g.length-1)!=="\\\\"&&(f[1]=(f[1]||"").replace(/\\\\/g,""),d=i.find[j](f,b,c),d!=null)){a=a.replace(i.match[j],"");break}}}d||(d=\nb.getElementsByTagName("*"));return{set:d,expr:a}};j.filter=function(a,b,c,d){for(var f=a,e=[],h=b,j,g,l=b&&b[0]&&s(b[0]);a&&b.length;){for(var p in i.filter)if((j=i.match[p].exec(a))!=null){var r=i.filter[p],k,m;g=!1;h==e&&(e=[]);if(i.preFilter[p])if(j=i.preFilter[p](j,h,c,e,d,l)){if(j===!0)continue}else g=k=!0;if(j)for(var n=0;(m=h[n])!=null;n++)if(m){k=r(m,j,n,h);var q=d^!!k;c&&k!=null?q?g=!0:h[n]=!1:q&&(e.push(m),g=!0)}if(k!==void 0){c||(h=e);a=a.replace(i.match[p],"");if(!g)return[];break}}if(a==\nf)if(g==null)throw"Syntax error, unrecognized expression: "+a;else break;f=a}return h};var i=j.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\\w\\u00c0-\\uFFFF_-]|\\\\.)+)/,CLASS:/\\.((?:[\\w\\u00c0-\\uFFFF_-]|\\\\.)+)/,NAME:/\\[name=[\'"]*((?:[\\w\\u00c0-\\uFFFF_-]|\\\\.)+)[\'"]*\\]/,ATTR:/\\[\\s*((?:[\\w\\u00c0-\\uFFFF_-]|\\\\.)+)\\s*(?:(\\S?=)\\s*([\'"]*)(.*?)\\3|)\\s*\\]/,TAG:/^((?:[\\w\\u00c0-\\uFFFF\\*_-]|\\\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\\((even|odd|[\\dn+-]*)\\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\\((\\d*)\\))?(?=[^-]|$)/,\nPSEUDO:/:((?:[\\w\\u00c0-\\uFFFF_-]|\\\\.)+)(?:\\(([\'"]*)((?:\\([^\\)]+\\)|[^\\2\\(\\)]*)+)\\2\\))?/},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,b,c){var d=typeof b==="string",f=d&&!/\\W/.test(b),d=d&&!f;f&&!c&&(b=b.toUpperCase());for(var c=0,f=a.length,e;c<f;c++)if(e=a[c]){for(;(e=e.previousSibling)&&e.nodeType!==1;);a[c]=d||e&&e.nodeName===b?e||!1:e===b}d&&j.filter(b,a,!0)},">":function(a,b,c){var d=typeof b==="string";if(d&&\n!/\\W/.test(b))for(var b=c?b:b.toUpperCase(),c=0,f=a.length;c<f;c++){var e=a[c];if(e)d=e.parentNode,a[c]=d.nodeName===b?d:!1}else{c=0;for(f=a.length;c<f;c++)(e=a[c])&&(a[c]=d?e.parentNode:e.parentNode===b);d&&j.filter(b,a,!0)}},"":function(a,b,c){var d=u++,f=x;if(!/\\W/.test(b))var e=b=c?b:b.toUpperCase(),f=w;f("parentNode",b,d,a,e,c)},"~":function(a,b,c){var d=u++,f=x;if(typeof b==="string"&&!/\\W/.test(b))var e=b=c?b:b.toUpperCase(),f=w;f("previousSibling",b,d,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!==\n"undefined"&&!c)return(a=b.getElementById(a[1]))?[a]:[]},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){for(var c=[],d=b.getElementsByName(a[1]),f=0,e=d.length;f<e;f++)d[f].getAttribute("name")===a[1]&&c.push(d[f]);return c.length===0?null:c}},TAG:function(a,b){return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,f,e){a=" "+a[1].replace(/\\\\/g,"")+" ";if(e)return a;for(var e=0,h;(h=b[e])!=null;e++)h&&(f^(h.className&&(" "+h.className+" ").indexOf(a)>=0)?c||d.push(h):\nc&&(b[e]=!1));return!1},ID:function(a){return a[1].replace(/\\\\/g,"")},TAG:function(a,b){for(var c=0;b[c]===!1;c++);return b[c]&&s(b[c])?a[1]:a[1].toUpperCase()},CHILD:function(a){if(a[1]=="nth"){var b=/(-?)(\\d*)n((?:\\+|-)?\\d*)/.exec(a[2]=="even"&&"2n"||a[2]=="odd"&&"2n+1"||!/\\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0;a[3]=b[3]-0}a[0]=u++;return a},ATTR:function(a,b,c,d,f,e){b=a[1].replace(/\\\\/g,"");!e&&i.attrMap[b]&&(a[1]=i.attrMap[b]);a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(a,\nb,c,d,f){if(a[1]==="not")if(t.exec(a[3]).length>1||/^\\w/.test(a[3]))a[3]=j(a[3],null,null,b);else return a=j.filter(a[3],b,c,1^f),c||d.push.apply(d,a),!1;else if(i.match.POS.test(a[0])||i.match.CHILD.test(a[0]))return!0;return a},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){return a.selected===!0},parent:function(a){return!!a.firstChild},\nempty:function(a){return!a.firstChild},has:function(a,b,c){return!!j(c[3],a).length},header:function(a){return/h\\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===\na.type||a.nodeName.toUpperCase()==="BUTTON"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0==b},eq:function(a,b,c){return c[3]-0==b}},filter:{PSEUDO:function(a,b,c,d){var f=b[1],e=i.filters[f];if(e)return e(a,\nc,b,d);else if(f==="contains")return(a.textContent||a.innerText||"").indexOf(b[3])>=0;else if(f==="not"){b=b[3];c=0;for(d=b.length;c<d;c++)if(b[c]===a)return!1;return!0}},CHILD:function(a,b){var c=b[1],d=a;switch(c){case "only":case "first":for(;d=d.previousSibling;)if(d.nodeType===1)return!1;if(c=="first")return!0;d=a;case "last":for(;d=d.nextSibling;)if(d.nodeType===1)return!1;return!0;case "nth":var c=b[2],f=b[3];if(c==1&&f==0)return!0;var e=b[0],h=a.parentNode;if(h&&(h.sizcache!==e||!a.nodeIndex)){for(var i=\n0,d=h.firstChild;d;d=d.nextSibling)if(d.nodeType===1)d.nodeIndex=++i;h.sizcache=e}d=a.nodeIndex-f;return c==0?d==0:d%c==0&&d/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],c=i.attrHandle[c]?i.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),d=c+"",f=b[2],e=b[4];return c==null?f==="!=":f===\n"="?d===e:f==="*="?d.indexOf(e)>=0:f==="~="?(" "+d+" ").indexOf(e)>=0:!e?d&&c!==!1:f==="!="?d!=e:f==="^="?d.indexOf(e)===0:f==="$="?d.substr(d.length-e.length)===e:f==="|="?d===e||d.substr(0,e.length+1)===e+"-":!1},POS:function(a,b,c,d){var f=i.setFilters[b[2]];if(f)return f(a,c,b,d)}}},A=i.match.POS,v;for(v in i.match)i.match[v]=RegExp(i.match[v].source+/(?![^\\[]*\\])(?![^\\(]*\\))/.source);var n=function(a,b){a=Array.prototype.slice.call(a,0);return b?(b.push.apply(b,a),b):a};try{Array.prototype.slice.call(document.documentElement.childNodes,\n0)}catch(C){n=function(a,b){var c=b||[];if(y.call(a)==="[object Array]")Array.prototype.push.apply(c,a);else if(typeof a.length==="number")for(var d=0,f=a.length;d<f;d++)c.push(a[d]);else for(d=0;a[d];d++)c.push(a[d]);return c}}var q;document.documentElement.compareDocumentPosition?q=function(a,b){var c=a.compareDocumentPosition(b)&4?-1:a===b?0:1;c===0&&(m=!0);return c}:"sourceIndex"in document.documentElement?q=function(a,b){var c=a.sourceIndex-b.sourceIndex;c===0&&(m=!0);return c}:document.createRange&&\n(q=function(a,b){var c=a.ownerDocument.createRange(),d=b.ownerDocument.createRange();c.selectNode(a);c.collapse(!0);d.selectNode(b);d.collapse(!0);c=c.compareBoundaryPoints(Range.START_TO_END,d);c===0&&(m=!0);return c});(function(){var a=document.createElement("div"),b="script"+(new Date).getTime();a.innerHTML="<a name=\'"+b+"\'/>";var c=document.documentElement;c.insertBefore(a,c.firstChild);if(document.getElementById(b))i.find.ID=function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c)return(b=\nb.getElementById(a[1]))?b.id===a[1]||typeof b.getAttributeNode!=="undefined"&&b.getAttributeNode("id").nodeValue===a[1]?[b]:void 0:[]},i.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b};c.removeChild(a);c=a=null})();(function(){var a=document.createElement("div");a.appendChild(document.createComment(""));if(a.getElementsByTagName("*").length>0)i.find.TAG=function(a,c){var d=c.getElementsByTagName(a[1]);if(a[1]===\n"*"){for(var f=[],e=0;d[e];e++)d[e].nodeType===1&&f.push(d[e]);d=f}return d};a.innerHTML="<a href=\'#\'></a>";if(a.firstChild&&typeof a.firstChild.getAttribute!=="undefined"&&a.firstChild.getAttribute("href")!=="#")i.attrHandle.href=function(a){return a.getAttribute("href",2)};a=null})();document.querySelectorAll&&function(){var a=j,b=document.createElement("div");b.innerHTML="<p class=\'TEST\'></p>";if(!(b.querySelectorAll&&b.querySelectorAll(".TEST").length===0)){j=function(b,c,e,h){c=c||document;if(!h&&\nc.nodeType===9&&!s(c))try{return n(c.querySelectorAll(b),e)}catch(i){}return a(b,c,e,h)};for(var c in a)j[c]=a[c];b=null}}();document.getElementsByClassName&&document.documentElement.getElementsByClassName&&function(){var a=document.createElement("div");a.innerHTML="<div class=\'test e\'></div><div class=\'test\'></div>";if(a.getElementsByClassName("e").length!==0&&(a.lastChild.className="e",a.getElementsByClassName("e").length!==1))i.order.splice(1,0,"CLASS"),i.find.CLASS=function(a,c,d){if(typeof c.getElementsByClassName!==\n"undefined"&&!d)return c.getElementsByClassName(a[1])},a=null}();var B=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):!0)},s=function(a){return a.nodeType===9&&a.documentElement.nodeName!=="HTML"||!!a.ownerDocument&&a.ownerDocument.documentElement.nodeName!=="HTML"},z=function(a,b){for(var c=[],d="",f,e=b.nodeType?[b]:b;f=i.match.PSEUDO.exec(a);)d+=f[0],a=a.replace(i.match.PSEUDO,"");a=i.relative[a]?a+"*":\na;f=0;for(var h=e.length;f<h;f++)j(a,e[f],c);return j.filter(d,c)};return j}();\n',
friendlyPath:".sizzle",pre:!0},"../../packages/net/env/browser/postmessage.js":{path:"../../packages/net/env/browser/postmessage.js",directory:"../../packages/net/env/browser/",filename:"postmessage.js",src:'jsio("import net.interfaces");jsio("from util.browser import $");exports.Listener=__class__;\nexports.Listener=exports.Listener(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Listener,function(a){this.init=function(){a(this,"init",arguments);this._clients={};if(!this._opts.clientUrl)this._opts.clientUrl=jsio.__dir+"/networkConsole.html"};this.listen=function(){$.onEvent(window,"message",bind(this,"_onMessage"))};this.getButton=function(a,b){var c=$({tagName:"button",text:b||"launch client",className:"clientButton"});$.onEvent(c,"click",bind(this,"openWindow",\na||this._opts.clientUrl));return c};var e=1;this.openWindow=function(a){var b={menubar:"no",location:"no",toolbar:"no",width:550,height:350,scrollbars:"yes",status:"yes",resizable:"yes"},c=[],d;for(d in b)c.push(d+"="+b[d]);window.open(a,"W"+e++,c.join(",")).focus()};this._onMessage=function(a){var b=a.source.name,c=this._clients[b],d=eval("("+a.data+")");switch(d.type){case "open":this._clients[b]=new exports.Transport(a.source);a.source.postMessage(\'{type:"open"}\',"*");this.onConnect(this._clients[b]);\nbreak;case "data":c.onData(d.payload);break;case "close":c.onClose(),a.source.postMessage(\'{type:"close"}\',"*"),delete this._clients[b]}}});exports.Connector=__class__;\nexports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Connector,function(){this.connect=function(){$.onEvent(window,"message",bind(this,"_onMessage"));window.opener.postMessage(JSON.stringify({type:"open"}),"*")};this._onMessage=function(a){var e=eval("("+a.data+")");switch(e.type){case "open":this._transport=new exports.Transport(a.source);this.onConnect(this._transport);break;case "close":this._transport.onClose();break;case "data":this._transport.onData(e.payload)}}});\nexports.Transport=__class__;\nexports.Transport=exports.Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(){this.init=function(a){this._win=a};this.makeConnection=function(a){this._protocol=a};this.write=function(a){this.encoding=="utf8"?this._win.postMessage(JSON.stringify({type:"data",payload:utf8.encode(a)}),"*"):this._win.postMessage(JSON.stringify({type:"data",payload:a}),"*")};this.loseConnection=function(){this._win.postMessage(JSON.stringify({type:"close",code:301}),\n"*")};this.onData=function(){this._protocol.dataReceived.apply(this._protocol,arguments)};this.onClose=function(){this._protocol._connectionLost.apply(this._protocol,arguments)}});\n',
friendlyPath:"net.env.browser.postmessage",pre:!0},"../../packages/net/env/browser/websocket.js":{path:"../../packages/net/env/browser/websocket.js",directory:"../../packages/net/env/browser/",filename:"websocket.js",src:'jsio("import net.interfaces");jsio("import std.utf8 as utf8");jsio("import net.errors as Errors");exports.Connector=__class__;\nexports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Connector,function(){this.connect=function(){this._state=net.interfaces.STATE.CONNECTING;var a=this._opts.url,b=this._opts.wsConstructor||window.WebSocket;logger.info("this._opts",this._opts);a=new b(a);a.onopen=bind(this,"webSocketOnOpen",a);a.onclose=bind(this,"webSocketOnClose",a)};this.webSocketOnOpen=function(a){this.onConnect(new Transport(a))};this.webSocketOnClose=function(a,b){var c;\nc={rawError:b,webSocket:a};c=b.wasClean?new Errors.ServerClosedConnection("WebSocket Connection Closed",c):this._state==net.interfaces.STATE.CONNECTED?new Errors.ConnectionTimeout("WebSocket Connection Timed Out",c):new Errors.ServerUnreachable("WebSocket Connection Failed",c);logger.debug("conn closed",c);this.onDisconnect(c)}});\nvar Transport=__class__,Transport=Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(){this.init=function(a){this._ws=a};this.makeConnection=function(a){this._ws.onmessage=function(b){b=utf8.encode(b.data);a.dataReceived(b)}};this.write=function(a){this._encoding=="plain"&&(result=utf8.decode(a),a=result[0]);this._ws.send(a)};this.loseConnection=function(){this._ws.close()}});\n',
friendlyPath:"net.env.browser.websocket",pre:!0},"../../packages/net/env/node/csp/proxy.js":{path:"../../packages/net/env/node/csp/proxy.js",directory:"../../packages/net/env/node/csp/",filename:"proxy.js",src:'jsio("from .util import *");jsio("from .server import csp");var msp=this.msp=exports;\n(function(){var g=["open","close","data"],e={InvalidHandshake:102,UserConnectionReset:103,RemoteConnectionTimeout:104,Unauthorized:106,RemoteConnectionFailed:108,RemoteConnectionClosed:109,ProtocolError:110};msp.ProxyConnection=__class__;msp.ProxyConnection=msp.ProxyConnection(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this.inConnection=a;this.inBuffer="";this.outConnections={};this.inConnection.addListener("receive",bind(this,this.receiveData)).addListener("eof",\nbind(this,this.shutdown)).addListener("disconnect",bind(this,this.shutdown)).setEncoding("bytes")};this.receiveData=function(a){var b;this.inBuffer+=a;try{for(;(b=this.inBuffer.indexOf("["))!=-1;){var c=parseInt(this.inBuffer.slice(0,b))+b;assert(!isNaN(c),"Invalid frame size prefix");if(this.inBuffer.length<c)break;var d=JSON.parse(this.inBuffer.slice(b,c));this.inBuffer=this.inBuffer.slice(c);assert(d instanceof Array&&d.length>=2,"Invalid frame");var e=d.shift(),f=g[d.shift()];assert(f,"Unrecognized frame type");\na=d;a.unshift(e);dispatchFrame[f].apply(this,a)}}catch(h){debug("PROTOCOL ERROR: ",h.message||"unknown error"),this.shutdown(!0)}};this.shutdown=function(a){for(var b in this.outConnections)a?this.closeOutgoing(b,"ProtocolError"):this.closeOutgoing(b,"UserConnectionReset")};this.send=function(a){payload=JSON.stringify(a);this.inConnection.send(payload.length+","+payload,"bytes")};this.closeOutgoing=function(a,b){a in this.outConnections&&(this.send([a,1,e[b]]),this.outConnections[a].close(),delete this.outConnections[a])};\nthis.dispatchFrame={open:function(a,b,c){assert(!(a in this.outConnections),"OPEN frame for existing connection");assert(b&&c,"Invalid host or port");b=this.outConnections[a]=node.tcp.createConnection(c,b);b.setEncoding("bytes");b.addListener("connect",function(){this.send([a,0])}).addListener("receive",function(b){this.send([a,2,b])}).addListener("eof",function(){this.closeOutgoing(a,"RemoteConnectionClosed")}).addListener("disconnect",function(){this.closeOutgoing(a,"RemoteConnectionClosed")})},\nclose:function(a){this.closeOutgoing(a,"UserConnectionReset")},data:function(a,b){b=unescape(b);this.outConnections[a].send(b,"bytes")}}});msp.Proxy=__class__;msp.Proxy=msp.Proxy(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(){this.cspserver=csp.createServer(function(a){proxyConnection=new msp.ProxyConnection(a)})};this.listen=function(a,b){this.cspserver.listen(a,b)}})})();\nfunction start_server(){(new msp.Proxy).listen(8050);log("Proxying from http://:8050")}start_server();\n',
friendlyPath:"net.env.node.csp.proxy",pre:!0},"../../packages/net/env/node/csp/util.js":{path:"../../packages/net/env/node/csp/util.js",directory:"../../packages/net/env/node/csp/",filename:"util.js",src:'exports.startswith=function(a,b){return a.substring(0,b.length)==b};exports.JSIOError=__class__;exports.JSIOError=exports.JSIOError(function(){return this.init&&this.init.apply(this,arguments)},Error,function(){this.name="JSIOError";this.toString=Error.prototype.toString;this.init=function(a,b,c){this.name=this.name;this.message=a||"";this.fileName=b||"\\u00abfilename\\u00bb";this.lineNumber=isNaN(+c)?0:+c}});exports.AssertionError=__class__;\nexports.AssertionError=exports.AssertionError(function(){return this.init&&this.init.apply(this,arguments)},exports.JSIOError,function(a){this.name="AssertionError";this.init=function(){a(this,"init",arguments)}});exports.assert=function(a,b){if(!a)throw new exports.AssertionError(b);};exports.reschedule=function(a){return setTimeout(a,0)};\nexports.staticFile=function(){var a={};return function(b,c){cacheContent=a[b];cacheContent!==void 0?exports.reschedule(function(){c(null,[cacheContent])}):process.fs.readFile(b,"utf8",function(d,e){d?c("staticFile readFile error "+d):(a[b]=e,c(null,[e]))});return promise}}();\n',
friendlyPath:".util",pre:!0},"../../packages/net/env/node/csp/server.js":{path:"../../packages/net/env/node/csp/server.js",directory:"../../packages/net/env/node/csp/",filename:"server.js",src:'jsio("import std.uuid as uuid");jsio("import std.utf8 as utf8");jsio("import std.base64 as base64");jsio("import lib.Hash as Hash");jsio("from .util import *");var http=jsio.__env.require("http"),nodeUrl=jsio.__env.require("url"),sessionDict={},varNames={ct:"contentType",ps:"prebufferSize",p:"preamble",rp:"requestPrefix",rs:"requestSuffix",bp:"batchPrefix",bs:"batchSuffix",i:"interval",du:"duration",is:"isStreaming",g:"gzipOk",se:"sse"};exports.Session=__class__;\nexports.Session=exports.Session(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(){this.key=uuid.uuid(8);sessionDict[this.key]=this;this.connection=null;this.outgoingPacketBuffer=[];this.incomingPacketBuffer=[];this.lastSequentialIncomingId=0;this.timeoutTimer=this.intervalTimer=this.durationTimer=this.cometResponse=null;this.outgoingPacketId=1;this.variables={contentType:"text/html",prebuffer:"",preamble:"",requestPrefix:"",requestSuffix:"",batchPrefix:"",\nbatchSuffix:"",interval:"0",duration:"30",isStreaming:"0",gzipOk:"",sse:""};this.resetTimeoutTimer()};this.teardownSession=function(){clearTimeout(this.durationTimer);this.connection.readyState=this.connection.readyState==="open"?"writeOnly":"closed";this.connection.emit("eof");delete sessionDict[this.key]};this.send=function(a){a=typeof a==="string"&&/[^\\r\\n\\t\\x32-\\x7E]/.test(a)?[this.outgoingPacketId,1,base64.encode(a)]:[this.outgoingPacketId,0,a];this.outgoingPacketId+=1;this.outgoingPacketBuffer.push(a);\nthis.cometResponse&&this.sendBatch([a])};this.close=function(){this.send(null);this.connection.readyState=this.connection.readyState==="open"?"readOnly":"closed";this.connection.emit("close")};var d=new Hash("gzipOk","contentType");this.updateVars=function(a){for(var c in a){var b=varNames[c];if(b){var i=a[c];d.contains(b)&&i!=this.variables[b]&&this.cometResponse&&this.completeResponse();if(b in this.variables)this.variables[b]=i;else if(b=="prebufferSize"&&(b=parseInt(i),b>0))this.variables.prebuffer=\nArray(b+1).join(" ")}}};this.isStreaming=function(){return this.variables.isStreaming==="1"&&parseInt(this.variables.duration)>0};this.resetDurationTimer=function(){var a=1E3*parseInt(this.variables.duration);this.durationTimer=setTimeout(bind(this,this.completeResponse),a)};this.resetIntervalTimer=function(){clearTimeout(this.intervalTimer);if(this.variables.interval!=="0"){var a=1E3*parseInt(this.variables.interval);this.intervalTimer=setTimeout(bind(this,this.sendBatch),a)}};this.resetTimeoutTimer=\nfunction(){clearTimeout(this.timeoutTimer);var a=parseInt(this.variables.duration)*1500;this.timeoutTimer=setTimeout(bind(this,this.teardownSession),a)};this.sendHeaders=function(a,c){c==="stream"?a.writeHead(200,{"Content-Type":this.variables.contentType,"Cache-Control":"no-cache, must-revalidate","Transfer-Encoding":"chunked","Access-Control-Allow-Origin":"*"}):c>=0&&a.writeHead(200,{"Content-Type":this.variables.contentType,"Cache-Control":"no-cache, must-revalidate","Content-Length":c,"Access-Control-Allow-Origin":"*"})};\nthis.startStream=function(){this.sendHeaders(this.cometResponse,"stream");var a=this.variables.prebuffer+this.variables.preamble;a&&this.cometResponse.write(a);this.resetIntervalTimer()};this.sendBatch=function(a){a||(a=[]);var c=this.variables.batchPrefix+"(",b=")"+this.variables.batchSuffix;this.variables.sse==="1"&&a&&(b+="id: "+a[a.length-1][0]+"\\r\\n");a=c+JSON.stringify(a)+b;this.isStreaming()?(this.cometResponse.write(a),this.resetIntervalTimer()):(a=this.variables.prebuffer+this.variables.preamble+\na,this.sendHeaders(this.cometResponse,a.length),this.cometResponse.write(a),this.cometResponse.end(),this.cometResponse=null,clearTimeout(this.durationTimer))};this.completeResponse=function(){this.isStreaming()?(this.cometResponse.end(),this.cometResponse=null,clearTimeout(this.durationTimer),clearTimeout(this.intervalTimer)):this.sendBatch()};this.receiveAck=function(a){for(this.resetTimeoutTimer();this.outgoingPacketBuffer.length&&a>=this.outgoingPacketBuffer[0][0];)this.outgoingPacketBuffer.shift()};\nthis.renderResponse=function(a,c){c=this.variables.requestPrefix+"("+c+(")"+this.variables.requestSuffix);this.sendHeaders(a,c.length);a.write(c);a.end()};this.dispatch={handshake:function(a,c){this.renderResponse(c,JSON.stringify({session:this.key}))},comet:function(a,c){this.cometResponse=c;this.isStreaming()&&this.startStream();this.outgoingPacketBuffer.length&&this.sendBatch(this.outgoingPacketBuffer);(!this.outgoingPacketBuffer.length||this.isStreaming())&&this.resetDurationTimer()},send:function(a,\nc){var b=JSON.parse(a.data);for(logger.debug("received packet batch:",b);b[0]!=void 0;){var d,f=b.shift(),e=f[0],h=f[1],f=f[2];if(f===null)this.close();else if(h===0)d=f;else if(h===1)d=base64.decode(f);else{logger.debug("BAD PACKET ENCODING,",h,"... dropping packet");break}this.incomingPacketBuffer[e-1-this.lastSequentialIncomingId]=d}for(logger.debug("incomingPacketBuffer",this.incomingPacketBuffer);this.incomingPacketBuffer[0]!==void 0;)b=this.incomingPacketBuffer.shift(),this.lastSequentialIncomingId+=\n1,this.connection._receive(b);this.renderResponse(c,\'"OK"\')},close:function(a,c){this.teardownSession();this.renderResponse(c,\'"OK"\')},reflect:function(a,c){var b=a.data;this.sendHeaders(c,b.length);c.write(b);c.end()},streamtest:function(){logger.debug("streamtest")}}});exports.Connection=__class__;\nexports.Connection=exports.Connection(function(){return this.init&&this.init.apply(this,arguments)},process.EventEmitter,function(){this.init=function(a){this.remoteAddress=null;this.readyState="open";this._session=a;this._encoding="binary";this._utf8buffer=""};this._receive=function(a){if(this._encoding==="utf8"){this._utf8buffer+=a;var b=utf8.decode(this._utf8buffer),a=b[0];this._utf8buffer=this._utf8buffer.slice(b[1])}this.emit("receive",a)};var d=new Hash("utf8","plain","binary");this.setEncoding=\nfunction(a){assert(d.contains(a),"unrecognized encoding: "+a);a!=="utf8"&&assert(!this._utf8buffer,"cannot switch encodings with dirty utf8 buffer");this._encoding=a};var a=new Hash("writeOnly","open");this.send=function(c,b){if(!a.contains(this.readyState))throw Error("Socket is not writable in readyState: "+this.readyState);b=b||this._encoding||"binary";assert(d.contains(b),"unrecognized encoding: "+b);c=b==="utf8"?utf8.encode(c):c;this._session.send(c)};this.close=function(){this._session.close()}});\nexports.createServer=function(d){return(new exports.Server).addListener("connection",d)};exports.Server=__class__;\nexports.Server=exports.Server(function(){return this.init&&this.init.apply(this,arguments)},process.EventEmitter,function(){this.init=function(a){process.EventEmitter.call(this);this._sessionUrl=a||"";log("starting server, session url is <"+this._sessionUrl+">")};var d=__class__,d=d(function(){return this.init&&this.init.apply(this,arguments)},AssertionError,function(a){this.name="CSPError";this.init=function(c){a(this,"init",b);this.code=c;var b=Array.prototype.slice.call(arguments,1)}}),a=function(a,\nc,b){if(!a)throw new d(c,b);},c=function(a,c,b){a.writeHead(c,{"Content-Type":"text/plain","Content-Length":b.length});a.write(b);a.end()},b=function(a,c){if(a.method==="GET")reschedule(function(){c("")});else{var b=[];a.setEncoding("binary");a.addListener("data",function(a){b.push(a)}).addListener("end",function(){c(b.join(""))})}},i=new Hash("static","handshake","comet","send","close","reflect","streamtest"),f=new Hash("GET","POST");this._handleRequest=function(e,h){b(e,bind(this,function(b){logger.debug("received request",\ne.url);try{var o=nodeUrl.parse(e.url,!0),k=o.pathname,p=this._sessionUrl;a(startswith(k,p+"/"),404,"Request to invalid session URL");logger.debug(e.method);a(f.contains(e.method),405,"Invalid HTTP method, "+e.method);var l=k.split("/").pop();if(l==="static")a(startswith(k,p+"/"),404,"sendStatic Not Implemented");else{a(i.contains(l),404,"Invalid resource, "+k);var j=o.query;e.data=b||j.d||null;if(l==="handshake"){a(!j.s,400,"Handshake cannot have session");try{var q=JSON.parse(e.data);assert(q instanceof\nObject&&!(q instanceof Array))}catch(r){throw logger.debug("INVALID HANDSHAKE, ",e,r),new d(400,"Invalid data parameter for handshake");}var g=new exports.Session,n=new exports.Connection(g);g.connection=n;this.emit("connection",n);n.emit("connect")}else{g=sessionDict[j.s];a(g,400,"Invalid or missing session");var s=parseInt(e.headers["Last-Event-Id"])||parseInt(j.a)||-1;g.receiveAck(s)}g.updateVars(j);g.dispatch[l].call(g,e,h)}}catch(m){m instanceof d?c(h,m.code,m.message):(logger.warn("Unexpected Error: ",\nm.message),c(h,500,"Unknown Server error"))}}))};this.listen=function(a,b){var c=http.createServer(bind(this,this._handleRequest));if(!a)throw logger.error("No port specified");c.listen(a,b)}});\n',
friendlyPath:".server",pre:!0},"../../packages/std/uuid.js":{path:"../../packages/std/uuid.js",directory:"../../packages/std/",filename:"uuid.js",src:'var CHARS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");exports.uuid=function(f,c){var d=CHARS,a=[],g=Math.random,c=c||d.length;if(f)for(var b=0;b<f;b++)a[b]=d[0|g()*c];else{var e;a[8]=a[13]=a[18]=a[23]="-";a[14]="4";for(b=0;b<36;b++)a[b]||(e=0|g()*16,a[b]=d[b==19?e&3|8:e&15])}return a.join("")};\n',friendlyPath:"std.uuid",
pre:!0},"../../packages/net/env/node/csp.js":{path:"../../packages/net/env/node/csp.js",directory:"../../packages/net/env/node/",filename:"csp.js",src:'jsio("import net.interfaces");jsio("from .csp.server import createServer");\nvar Transport=__class__,Transport=Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(){this.init=function(a){this._socket=a;logger.debug("init",a)};this.makeConnection=function(a){logger.debug("makeConnection:",a);this._socket.addListener("receive",bind(a,"dataReceived"));this._socket.addListener("eof",this._socket.close);this._socket.addListener("close",bind(a,"connectionLost"))};this.write=function(a){this._socket.send(a)};this.loseConnection=\nfunction(){this._socket.forceClose()}});exports.Listener=__class__;\nexports.Listener=exports.Listener(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Listener,function(){this.listen=function(){var a=createServer(bind(this,function(a){logger.info("Incoming connection");a.setEncoding("utf8");a.addListener("connect",bind(this,function(){this.onConnect(new Transport(a))}))}));this._cspServer=a;var b=(this._opts["interface"]||"")+":"+this._opts.port;this._opts.skipListen||(logger.info("Listening csp@"+b),a.listen(this._opts.port,this._opts["interface"]||\n""))}});\n',
friendlyPath:"net.env.node.csp",pre:!0},"../../packages/net/env/node/tcp.js":{path:"../../packages/net/env/node/tcp.js",directory:"../../packages/net/env/node/",filename:"tcp.js",src:'jsio("import net.interfaces");\nvar nodeTcp=jsio.__env.require("net"),Transport=__class__,Transport=Transport(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Transport,function(){this.init=function(a){this._socket=a};this.makeConnection=function(a){this._socket.addListener("data",bind(a,"dataReceived"));this._socket.addListener("close",bind(a,"connectionLost"));this._socket.addListener("end",this._socket.close)};this.write=function(a){this._socket.write(a)};this.loseConnection=function(){this._socket.forceClose()}});\nexports.Connector=__class__;exports.Connector=exports.Connector(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Connector,function(){this.connect=function(){var a=nodeTcp.createConnection(this._opts.port,this._opts.host);a.addListener("connect",bind(this,function(){this.onConnect(new Transport(a))}));this._opts.encoding="plain";a.setEncoding("binary");typeof this._opts.timeout=="number"&&a.setTimeout(this._opts.timeout)}});exports.Listener=__class__;\nexports.Listener=exports.Listener(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Listener,function(){this.listen=function(){var a=nodeTcp.createServer(bind(this,function(a){typeof this._opts.timeout=="number"&&a.setTimeout(this._opts.timeout);a.setEncoding("utf8");a.addListener("connect",bind(this,function(){this.onConnect(new Transport(a))}))}));logger.info("Listening tcp@"+((this._opts["interface"]||"")+":"+this._opts.port));a.listen(this._opts.port,this._opts["interface"]||\n"")}});\n',
friendlyPath:"net.env.node.tcp",pre:!0},"../../packages/net/protocols/buffered.js":{path:"../../packages/net/protocols/buffered.js",directory:"../../packages/net/protocols/",filename:"buffered.js",src:'jsio("from net.interfaces import Protocol");jsio("from net.buffer import Buffer");exports.BufferedProtocol=__class__;exports.BufferedProtocol=exports.BufferedProtocol(function(){return this.init&&this.init.apply(this,arguments)},Protocol,function(){this.init=function(){this.buffer=new Buffer};this.bufferUpdated=function(){};this.dataReceived=function(a){this.buffer.append(a);this.bufferUpdated()}});\n',
friendlyPath:"net.protocols.buffered",pre:!0},"../../packages/net/buffer.js":{path:"../../packages/net/buffer.js",directory:"../../packages/net/",filename:"buffer.js",src:'jsio("from net.interfaces import Protocol");exports.EmptyBufferError=__class__;var EmptyBufferError=exports.EmptyBufferError=exports.EmptyBufferError(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this.message=a}});exports.Buffer=__class__;\nexports.Buffer=exports.Buffer(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this._rawBuffer=a?a:""};this.getLength=function(){return this._rawBuffer.length};this.append=function(a){logger.debug("append",JSON.stringify(a));this._rawBuffer+=a};this.peekBytes=function(a){return a?this._rawBuffer.slice(0,a):this._rawBuffer};this.peekToDelimiter=function(a){var a=a?a:"\\n",b=this._rawBuffer.indexOf(a);if(b==-1)throw new EmptyBufferError("delimiter "+a+"not present in buffer");\nelse return this._rawBuffer.slice(0,b)};this.consumeBytes=function(a){a=this.peekBytes(a);this._rawBuffer=this._rawBuffer.slice(a.length);return a};this.consumeMaxBytes=function(a){var b=this._rawBuffer.slice(0,a);this._rawBuffer=this._rawBuffer(a);return b};this.consumeAllBytes=function(){var a=this._rawBuffer;this._rawBuffer="";return a};this.consumeThroughDelimiter=function(a){return this.consumeToDelimiter(a)+this.consumeBytes(a.length)};this.consumeToDelimiter=function(a){a=this.peekToDelimiter(a?\na:"\\n");this._rawBuffer=this._rawBuffer.slice(a.length);return a};this.hasBytes=function(a){return this._rawBuffer.length>=(a?a:0)};this.hasDelimiter=function(a){return this._rawBuffer.indexOf(a?a:"\\n")!=-1}});\n',
friendlyPath:"net.buffer",pre:!0},"../../packages/net/protocols/Cuppa.js":{path:"../../packages/net/protocols/Cuppa.js",directory:"../../packages/net/protocols/",filename:"Cuppa.js",src:'jsio("import lib.Callback;");jsio("import lib.PubSub;");jsio("from net.protocols.rtjp import RTJPProtocol;");\nvar Error=__class__,Error=Error(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b,f,c,d){this.id=b;this.msg=f;this.details=c;this.requestId=d}}),RPCRequest=__class__,RPCRequest=RPCRequest(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b){this.protocol=a;this.id=b;this._onError=new lib.Callback;this._onSuccess=new lib.Callback};this.onError=function(){this._onError.forward(arguments)};this.onSuccess=function(){this._onSuccess.forward(arguments)};\nthis.bindLater=function(a){var b=[].slice(arguments,1);this._onError.forward([a,a.fail].concat(b));this._onSuccess.forward([a,a.succed].concat(b));return a}}),ReceivedRequest=__class__,ReceivedRequest=ReceivedRequest(function(){return this.init&&this.init.apply(this,arguments)},function(){this.type="request";this.init=function(a,b,f,c,d){this.protocol=a;this.id=b;this.name=f;this.responded=!1;this.args=c;this.target=d};this.error=function(a,b){if(this.responded)throw Error("already responded");if(this._timer)clearTimeout(this._timer),\nthis._timer=null;args={id:this.id,msg:a+""};if(b!==void 0)args.details=b;this.responded=!0;this.protocol.sendFrame("ERROR",args)};this.respond=function(a){if(this.responded)throw Error("already responded");if(this._timer)clearTimeout(this._timer),this._timer=null;this.responded=!0;this.protocol.sendFrame("RESPONSE",{id:this.id,args:a==void 0?{}:a})};this.timeoutAfter=function(a,b){if(!this.responded)this._timer&&clearTimeout(this._timer),this._timer=setTimeout(bind(this,"_timeout",b),a)};this._timeout=\nfunction(a){this.responded||this.error(a)}}),ReceivedEvent=__class__,ReceivedEvent=ReceivedEvent(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,b,f,c,d){this.id=b;this.name=f;this.args=c;this.target=d}}),packages_net_protocols_Cuppa=__class__;\nexports=packages_net_protocols_Cuppa(function(){return this.init&&this.init.apply(this,arguments)},RTJPProtocol,function(a){this.init=function(){a(this,"init",arguments);this._onConnect=new lib.Callback;this._onDisconnect=new lib.Callback;this._requests={};this.onEvent=new lib.PubSub;this.onRequest=new lib.PubSub};this.disconnect=function(){this.transport.loseConnection()};this.onConnect=function(){this._onConnect.forward(arguments)};this.onDisconnect=function(){this._onDisconnect.forward(arguments)};\nthis.reset=function(){this._onConnect.reset();this._onDisconnect.reset()};this.connectionMade=function(){this._isConnected=!0;this._onConnect.fire()};this.connectionLost=function(b){for(var a in this._requests){var c=this._requests[a];delete this._requests[a];c._onError.fire(b)}this._isConnected=!1;this._onDisconnect.fire(b)};this.sendRequest=function(b,a,c,d){arguments.length>4&&(d=bind.apply(GLOBAL,Array.prototype.slice.call(arguments,3)));var e={name:b,args:a};if(c)e.target=c;e=this.sendFrame("RPC",\ne);e=this._requests[e]=new RPCRequest(this,e);d&&(e.onSuccess(GLOBAL,d,!1),e.onError(GLOBAL,d));return e};this.sendEvent=function(b,a,c){this.sendFrame("EVENT",{name:b,args:a,target:c||null})};this.frameReceived=function(b,a,c){logger.debug("RECEIVED",b,a,c);switch(a.toUpperCase()){case "RESPONSE":var d=this._requests[c.id];if(!d)break;delete this._requests[c.id];d._onSuccess.fire(c.args);break;case "ERROR":var a=c.msg||"unknown",e=c.id,d=this._requests[e],b=Error(this,b,a,c.details,e);if(d)delete this._requests[e],\nd._onError.fire(b);else return this.errorReceived(b);break;case "RPC":case "EVENT":if(!c.name)return self.sendFrame("ERROR",{id:c.id||b,msg:\'missing "name"\'});var d=c.args||{},e=c.target||null,g=a.toUpperCase()=="RPC",a=g?this.onRequest:this.onEvent,d=new (g?ReceivedRequest:ReceivedEvent)(this,c.id||b,c.name,d,e);a.publish(d.name,d)}}});\n',
friendlyPath:"net.protocols.Cuppa",pre:!0},"../../packages/net/protocols/rtjp.js":{path:"../../packages/net/protocols/rtjp.js",directory:"../../packages/net/protocols/",filename:"rtjp.js",src:'jsio("import net.interfaces");jsio("from net.protocols.delimited import DelimitedProtocol");exports.RTJPProtocol=__class__;\nexports.RTJPProtocol=exports.RTJPProtocol(function(){return this.init&&this.init.apply(this,arguments)},DelimitedProtocol,function(c){this.init=function(){c(this,"init",["\\r\\n"]);this.frameId=0};this.connectionMade=function(){this._client&&this._client.connectionMade&&this._client.connectionMade();logger.debug("connectionMade")};this.frameReceived=function(){};this.sendFrame=function(b,a){a||(a={});logger.debug("sendFrame",b,JSON.stringify(a));this.sendLine(JSON.stringify([++this.frameId,b,a]));return this.frameId};\nthis.lineReceived=function(b){try{var a=JSON.parse(b);if(a.length!=3){logger.error("Invalid frame length");return}if(typeof a[0]!="number"){logger.error("Invalid frame id");return}if(typeof a[1]!="string"){logger.error("Invalid frame name");return}logger.debug("frameReceived:",a[0],a[1],JSON.stringify(a[2]))}catch(c){logger.error(c)}a&&this.frameReceived(a[0],a[1],a[2])};this.connectionLost=function(){logger.debug("conn lost")}});\n',
friendlyPath:"net.protocols.rtjp",pre:!0},"../../packages/net/protocols/delimited.js":{path:"../../packages/net/protocols/delimited.js",directory:"../../packages/net/protocols/",filename:"delimited.js",src:'jsio("import net.interfaces");exports.DelimitedProtocol=__class__;\nexports.DelimitedProtocol=exports.DelimitedProtocol(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Protocol,function(){this.init=function(a){a||(a="\\r\\n");this.delimiter=a;this.buffer=""};this.connectionMade=function(){logger.debug("connectionMade")};this.dataReceived=function(a){if(a){logger.debug("dataReceived:("+a.length+")",a);logger.debug("last 2:",a.slice(a.length-2));this.buffer+=a;for(logger.debug("index",this.buffer.indexOf(this.delimiter));(a=this.buffer.indexOf(this.delimiter))!=\n-1;){var b=this.buffer.slice(0,a);this.buffer=this.buffer.slice(a+this.delimiter.length);this.lineReceived(b)}}};this.lineReceived=function(a){logger.debug("Not implemented, lineReceived:",a)};this.sendLine=function(a){logger.debug("WRITE:",a+this.delimiter);this.transport.write(a+this.delimiter)};this.connectionLost=function(){logger.debug("connectionLost")}});\n',
friendlyPath:"net.protocols.delimited",pre:!0},"../../packages/net/protocols/echo.js":{path:"../../packages/net/protocols/echo.js",directory:"../../packages/net/protocols/",filename:"echo.js",src:'jsio("import net.interfaces");exports.Protocol=__class__;exports.Protocol=exports.Protocol(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Protocol,function(){this.connectionMade=function(){logger.debug("in connectionMade");this.transport.write("Welcome")};this.dataReceived=function(a){logger.debug("dataReceived:",a);this.transport.write("Echo: "+a)};this.connectionLost=function(){logger.debug("conn lost")}});exports.Server=__class__;\nexports.Server=exports.Server(function(){return this.init&&this.init.apply(this,arguments)},net.interfaces.Server,function(a){this.init=function(){a(this,"init",[exports.Protocol])}});\n',
friendlyPath:"net.protocols.echo",pre:!0},"../../packages/net/protocols/mspp.js":{path:"../../packages/net/protocols/mspp.js",directory:"../../packages/net/protocols/",filename:"mspp.js",src:'jsio("import net");jsio("from net.protocols.buffered import BufferedProtocol");jsio("import std.utf8 as utf8");var loggers={};loggers.stream=logging.get("MSPPStream");loggers.protocol=logging.get("MSPPProtocol");var frames={OPEN:0,CLOSE:1,DATA:2};exports.MSPPStream=__class__;\nexports.MSPPStream=exports.MSPPStream(function(){return this.init&&this.init.apply(this,arguments)},function(){this.setMultiplexer=function(b){loggers.stream.debug("setMultiplexer: "+b);this.multiplexer=b};this.setEncoding=function(b){loggers.stream.debug("setEncoding: "+b);this.encoding=b};this.open=function(b,a,e){if(e)this.encoding="utf8";this.id=this.multiplexer.openStream(this,b,a);loggers.stream.debug("open "+this.id+": "+b+" "+a+" "+e)};this.close=function(){loggers.stream.debug("close "+this.id);\nthis.multiplexer.close(this.id)};this.send=function(b,a){loggers.stream.debug("send "+this.id+": "+b+" "+a);if((a||this.encoding)=="utf8")b=utf8.encode(b);this.multiplexer.writeToStream(this.id,b)};this._onreadraw=function(b){if(this.encoding=="utf8"){var a=utf8.decode(b);if(a[1]!=b.length)throw Error("Incomplete utf8 codepoint");b=a[0]}loggers.stream.debug("_onreadraw "+b);this.onread(b)};this.onopen=function(){};this.onclose=function(){};this.onread=function(){}});\nvar state={closed:0,connecting:1,consuming:2};exports.MSPPProtocol=__class__;\nexports.MSPPProtocol=exports.MSPPProtocol(function(){return this.init&&this.init.apply(this,arguments)},BufferedProtocol,function(b){this.init=function(){loggers.protocol.debug("new MSPPProtocol");b(this,"init",[]);this.state=state.closed;this.transportOptions=this.transportType=null;this.currentId=0;this.streams={};this.writeBuffer=[]};this.setTransport=function(a,b){this.transportType=a;this.transportOptions=b};this.connectionMade=function(){loggers.protocol.debug("connectionMade");this.state=state.consuming;\nfor(var a=0;a<this.writeBuffer.length;a++)this._write(this.writeBuffer[a]);writeBuffer=[]};this.connectionLost=function(a){loggers.protocol.debug("closed: "+a);this.state=state.closed;for(var b in this.streams)this.streams[b].onclose(a)};this.openStream=function(a,b,c){if(this.state==state.closed)this.state=state.connecting,net.connect(this,this.transportType,this.transportOptions);var d=++this.currentId;this.streams[d]=a;this._write([d,frames.OPEN,b+","+c]);return d};this.closeStream=function(a){this._write([a,\nframes.CLOSE,""])};this.writeToStream=function(a,b){this._write([a,frames.DATA,b])};this.bufferUpdated=function(){loggers.protocol.debug("bufferUpdated. state: "+this.state+". buffer: "+this.buffer._rawBuffer);if(this.state!=state.consuming)throw Error("buffer update in invalid MSPP state: "+this.state);if(this.buffer.hasDelimiter(":")){var a=this.buffer.peekToDelimiter(":"),b=parseInt(a);if(this.buffer.hasBytes(b+a.length+1)){this.buffer.consumeThroughDelimiter(":");a=this.buffer.consumeToDelimiter(",");\nthis.buffer.consumeBytes(1);var c=parseInt(this.buffer.consumeBytes(1));b-=a.length+2;a=parseInt(a);b=this.buffer.consumeBytes(b);switch(c){case frames.OPEN:this.streams[a].onopen();break;case frames.CLOSE:this.streams[a].onclose(b);break;case frames.DATA:this.streams[a]._onreadraw(b);break;default:throw Error("invalid MSPP data type!");}}}};this._write=function(a){this.state!=state.consuming?(loggers.protocol.debug("buffering write: "+a),this.writeBuffer.push(a)):(a=a[0]+","+a[1]+a[2],a=a.length+\n":"+a,loggers.protocol.debug("write: "+a),this.transport.write(a))}});\n',
friendlyPath:"net.protocols.mspp",pre:!0},"../../packages/net/protocols/stomp.js":{path:"../../packages/net/protocols/stomp.js",directory:"../../packages/net/protocols/",filename:"stomp.js",src:'jsio("from net.protocols.buffered import BufferedProtocol");jsio("from util.sprintf import sprintf");exports.StompProtocol=__class__;\nexports.StompProtocol=exports.StompProtocol(function(){return this.init&&this.init.apply(this,arguments)},BufferedProtocol,function(a){this.init=function(){a(this,"init",[]);this.state="peek"};this.connect=function(d,a){var b=new StompFrame("CONNECT");d&&b.setHeader("login",d);a&&b.setHeader("passcode",a);this.sendFrame(b)};this.send=function(a,c,b){c=new StompFrame("SEND",c,b);c.setHeader("destination",a);this.sendFrame(c)};this.subscribe=function(a,c){var b=new StompFrame("SUBSCRIBE",null,c);b.setHeader("destination",\na);this.sendFrame(b)};this.unsubscribe=function(a,c){var b=new StompFrame("UNSUBSCRIBE",null,c);b.setHeader("destination",a);this.sendFrame(b)};this.sendFrame=function(a){this.transport.write(a.serialize())};this.frameReceived=function(a){logger.info("frame received",a)};this.bufferUpdated=function(){logger.debug("bufferUpdated");for(var a=0;++a<10;)switch(this.state){case "peek":this.buffer.peekBytes(1)=="\\n"&&(logger.debug("consuming a single \\n byte"),this.buffer.consumeBytes(1)),this.state="method";\ncase "method":logger.debug("case method");if(!this.buffer.hasLine())return;this._frame=new StompFrame;var c=this.buffer.consumeThroughDelimiter();logger.debug("method is",JSON.stringify(c));this._frame.setMethod(c);this.state="headers";case "headers":logger.debug("case headers");for(c=0;this.buffer.hasLine()&&++c<10;){var b=this.buffer.consumeThroughDelimiter();if(b.length==0){this.state="body";break}for(var e=b.split(":"),b=e[0],e=e.slice(1).join(":");e[0]==" ";)e=e.slice(1);for(;e[1]==" ";)e=e.slice(0,\ne.length-1);logger.debug("add header",b,e);this._frame.setHeader(b,e)}if(this.state=="headers")return;case "body":if(this._frame.getBodyMode()=="length"){if(!this.buffer.hasBytes(this._frame.getContentLength()+1))return;this._frame.setBody(this.buffer.consumeBytes(this._frame.getContentLength()));this.buffer.consumeBytes(1)}else{if(!this.buffer.hasLine("\\x00"))return;this._frame.setBody(this.buffer.consumeThroughDelimiter("\\x00"))}this.frameReceived(this._frame);this._frame=null;this.state="peek"}}});\nexports.StompFrame=__class__;\nvar StompFrame=exports.StompFrame=exports.StompFrame(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a,d,c){this._headers=c?c:{};this._method=a?a:null;this._body=d?d:""};this.setHeader=function(a,d){this._headers[a]=d};this.getHeader=function(a){return this._headers[a]};this.getHeaders=function(){return this._headers};this.setMethod=function(a){this._method=a};this.getMethod=function(){return this._method};this.setBody=function(a){this._body=a};this.getbody=\nfunction(){return this._body};this.toString=function(){var a=0,d;for(d in this._headers)++a;return sprintf("[StompFrame method(%s), num-headers(%d), body-length(%d)]",this._method,a,this._body.length)};this.getContentLength=function(){return parseInt(this._headers["content-length"])};this.getBodyMode=function(){return"content-length"in this._headers?"length":"delimited"};this.serialize=function(){var a=this._method+"\\n",d;for(d in this._headers)a+=d+": "+this._headers[d]+"\\n";a+="content-length: "+\nthis._body.length+"\\n";a+="\\n";a+=this._body;a+="\\x00";return a}});\n',
friendlyPath:"net.protocols.stomp",pre:!0},"../../packages/util/sprintf.js":{path:"../../packages/util/sprintf.js",directory:"../../packages/util/",filename:"sprintf.js",src:'var sprintfWrapper={init:function(){if(typeof arguments=="undefined")return null;if(arguments.length<1)return null;if(typeof arguments[0]!="string")return null;if(typeof RegExp=="undefined")return null;for(var a=arguments[0],d=RegExp(/(%([%]|(\\-)?(\\+|\\x20)?(0)?(\\d+)?(\\.(\\d)?)?([bcdfosxX])))/g),b=[],e=[],f=0,g=0,i=0,g=0,h="",c=null;c=d.exec(a);)c[9]&&(f+=1),i=d.lastIndex-c[0].length,e[e.length]=a.substring(g,i),g=d.lastIndex,b[b.length]={match:c[0],left:c[3]?!0:!1,sign:c[4]||"",pad:c[5]||" ",min:c[6]||\n0,precision:c[8],code:c[9]||"%",negative:parseInt(arguments[f])<0?!0:!1,argument:typeof arguments[f]=="object"?JSON.stringify(arguments[f]):String(arguments[f])};e[e.length]=a.substring(g);if(b.length==0)return a;if(arguments.length-1<f)return null;a=null;for(a=0;a<b.length;a++)b[a].code=="%"?substitution="%":b[a].code=="b"?(b[a].argument=String(Math.abs(parseInt(b[a].argument)).toString(2)),substitution=sprintfWrapper.convert(b[a],!0)):b[a].code=="c"?(b[a].argument=String(String.fromCharCode(parseInt(Math.abs(parseInt(b[a].argument))))),\nsubstitution=sprintfWrapper.convert(b[a],!0)):b[a].code=="d"?(b[a].argument=String(Math.abs(parseInt(b[a].argument))),substitution=sprintfWrapper.convert(b[a])):b[a].code=="f"?(b[a].argument=String(Math.abs(parseFloat(b[a].argument)).toFixed(b[a].precision?b[a].precision:6)),substitution=sprintfWrapper.convert(b[a])):b[a].code=="o"?(b[a].argument=String(Math.abs(parseInt(b[a].argument)).toString(8)),substitution=sprintfWrapper.convert(b[a])):b[a].code=="s"?(b[a].argument=b[a].argument.substring(0,\nb[a].precision?b[a].precision:b[a].argument.length),substitution=sprintfWrapper.convert(b[a],!0)):b[a].code=="x"?(b[a].argument=String(Math.abs(parseInt(b[a].argument)).toString(16)),substitution=sprintfWrapper.convert(b[a])):b[a].code=="X"?(b[a].argument=String(Math.abs(parseInt(b[a].argument)).toString(16)),substitution=sprintfWrapper.convert(b[a]).toUpperCase()):substitution=b[a].match,h+=e[a],h+=substitution;h+=e[a];return h},convert:function(a,d){a.sign=d?"":a.negative?"-":a.sign;var b=a.min-\na.argument.length+1-a.sign.length,b=Array(b<0?0:b).join(a.pad);return a.left?a.pad=="0"||d?a.sign+a.argument+b.replace(/0/g," "):a.sign+a.argument+b:a.pad=="0"||d?a.sign+b+a.argument:b+a.sign+a.argument}};exports.sprintf=sprintfWrapper.init;\n',
friendlyPath:"util.sprintf",pre:!0},"../../packages/net/__imports__.js":{path:"../../packages/net/__imports__.js",directory:"../../packages/net/",filename:"__imports__.js",src:'exports.map={node:["net.env.node.stdio"],browser:["net.env.browser.csp"],mobile:[]};exports.resolve=function(a){return exports.map[a]||[]};\n',friendlyPath:"net.__imports__",pre:!0},"../../packages/net/later.js":{path:"../../packages/net/later.js",directory:"../../packages/net/",filename:"later.js",src:'exports.Later=__class__;\nexports.Later=exports.Later(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(){this.eb=this.cb=null;this.values=[];this.errors=[];this.cancelback=null};this.succeed=this.callback=function(){logger.debug("callback",[].slice.call(arguments,0));this.cb?this.cb.apply(this,arguments)==!1&&this.cancel():this.values.push(arguments)};this.fail=this.errback=function(){logger.debug("eb",[].slice.call(arguments,0));this.eb?this.eb.apply(this,arguments):this.errors.push(arguments)};\nthis.cancel=function(){if(this.cancelback){var a=this.cancelback;this.cancelback=null;a.call(this)}};this.setCallback=function(a){this.cb=a;for(var a=0,b;b=this.values[a];++a)this.cb.apply(this,b);this.values=[];return this};this.setErrback=function(a){this.eb=a;for(a=0;e=this.errors[a];++a)this.eb.apply(this,e);this.errors=[];return this};this.setCancelback=function(a){this.cancelback=a;return this}});exports.Later.fail=function(){var a=new Later;return a.fail.apply(a,arguments)};\nexports.Later.succeed=function(){var a=new Later;return a.succeed.apply(a,arguments)};\n',
friendlyPath:"net.later",pre:!0},"../../packages/preprocessors/cls.js":{path:"../../packages/preprocessors/cls.js",directory:"../../packages/preprocessors/",filename:"cls.js",friendlyPath:"preprocessors.cls",src:'var classExport=/^(.*?)exports[ \\t]*=[ \\t]*Class\\(/gm,class2Export=/^(.*?[ \\t]+)?([a-zA-Z0-9\\.$]+)[ \\t]*=[ \\t]*Class\\(/gm;function replacer(c,b,a){return a+"=__class__;"+(b||"")+a+"="+a+"(function "+a.replace(/[\\.]/g,"_")+"(){return this.init&&this.init.apply(this,arguments)},"}\nexports=function(c,b){var a=b.path.replace(/(^[.\\/]+|\\.([^.]+?)$)/g,"").replace(/[\\/\\-\\.]/g,"_");b.src=b.src.replace(classExport,"var "+a+"=__class__;$1exports="+a+"(function "+a+"(){return this.init&&this.init.apply(this,arguments)},").replace(class2Export,replacer)};\n',
pre:!0},"../../packages/preprocessors/cpreprocess.js":{path:"../../packages/preprocessors/cpreprocess.js",directory:"../../packages/preprocessors/",filename:"cpreprocess.js",src:'var command=/^\\s+#([^\\s]+)/,_vars={},_macros={};exports=function(a,b){for(var d=b.src.split("\\n"),e=d.length,c=0;c<e;++c)command.match(d[c])};exports.reset=function(){_vars={};_macros={}};exports.addVariable=function(a,b){_vars[a]=b};exports.addMacro=function(a){_macros[a]=value};\n',friendlyPath:"preprocessors.cpreprocess",
pre:!0},"../../packages/preprocessors/import.js":{path:"../../packages/preprocessors/import.js",directory:"../../packages/preprocessors/",filename:"import.js",baseMod:"preprocessors",basePath:"../../packages",friendlyPath:"preprocessors.import",src:"var importExpr=/^(\\s*)(import\\s+[^=+*\"'\\r\\n]+|from\\s+[^=+*\"'\\r\\n]+)$/gm;function replace(b,a,c){return!/\\/\\//.test(a)?a+'jsio(\"'+c+'\");':b}exports=function(b,a){a.src=a.src.replace(importExpr,replace)};\n",pre:!0},"../../packages/std/XML.js":{path:"../../packages/std/XML.js",
directory:"../../packages/std/",filename:"XML.js",src:'exports.parseString=function(b){if(jsio.__env.name=="browser")if(window.ActiveXObject){var a=new ActiveXObject("Microsoft.XMLDOM");return a.loadXML(b)}else return a=new DOMParser,a.parseFromString(b,"text/xml")};\n',friendlyPath:"std.XML",pre:!0},"../../packages/string/pad.js":{path:"../../packages/string/pad.js",directory:"../../packages/string/",filename:"pad.js",baseMod:"string",basePath:"../../packages",src:'exports=function(a,c,b){a=String(a);for(b=b||" ";a.length<c;)a=b+a;return a};\n',
friendlyPath:"string.pad",pre:!0},"../../packages/string/timeAgo.js":{path:"../../packages/string/timeAgo.js",directory:"../../packages/string/",filename:"timeAgo.js",src:'var FORMATS=[[60,"just now",1],[120,"1 minute ago","just now"],[3600,"minutes",60],[7200,"1 hour ago","1 hour from now"],[86400,"hours",3600],[172800,"yesterday","tomorrow"],[604800,"days",86400],[1209600,"last week","next week"],[2419200,"weeks",604800],[4838400,"last month","next month"],[29030400,"months",2419200],[58060800,"last year","next year"],[290304E4,"years",29030400],[580608E4,"last century","next century"],[580608E5,"centuries",290304E4]];\nexports=function(a,e,b,c){c=c||0;a instanceof Date?b=!1:(typeof a=="string"?(a=(""+a).replace(/-/g,"/").replace(/[TZ]/g," ").replace(/^\\s+|\\s+$/g,""),a.charAt(a.length-4)=="."&&(a=a.substr(0,a.length-4))):b=!1,a=new Date(a));b=(new Date-a-c)/1E3+(b?(new Date).getTimezoneOffset()*60:0);c="ago";e=1;b<0&&(b=-b,c="from now",e=2);if(b<60)return"just now";for(var f=0,d;d=FORMATS[f];++f)if(b<d[0])return typeof d[2]=="string"?d[e]:(b/d[2]|0)+" "+d[1]+" "+c;return a};\n',
friendlyPath:"string.timeAgo",pre:!0},"../../packages/util/ajax.js":{path:"../../packages/util/ajax.js",directory:"../../packages/util/",filename:"ajax.js",src:'jsio("import std.uri as URI;");var SIMULTANEOUS=4,_inflight=0,doc;exports.getDoc=function(){if(doc)return doc;try{if(doc=window.ActiveXObject&&new ActiveXObject("htmlfile"))doc.open().write("<html></html>"),doc.close(),window.attachEvent("onunload",function(){try{doc.body.innerHTML=""}catch(a){}doc=null})}catch(b){}doc||(doc=document);return doc};\nvar ctor=function(){var b=window;exports.getDoc();return new (ctor=b.XMLHttpRequest?b.XMLHttpRequest:function(){return b.ActiveXObject&&new b.ActiveXObject("Msxml2.XMLHTTP")||null})};exports.createXHR=function(){return new ctor};exports.post=function(b,a){return exports.get(merge({method:"POST"},b),a)};\nvar Request=__class__,Request=Request(function(){return this.init&&this.init.apply(this,arguments)},function(){var b=0;this.init=function(a,d){if(!a||!a.url)logger.error("no url provided");else{this.method=(a.method||"GET").toUpperCase();this.url=a.url;this.type=a.type;this.async=a.async;this.timeout=a.timeout;this.id=++b;this.headers={};this.cb=d;if(a.headers)for(var c in a.headers)a.headers.hasOwnProperty(c)&&(this.headers[c]=a.headers[c]);c=a.data&&typeof a.data=="object";if(this.method=="GET"&&\na.data)this.url=(new URI(this.url)).addQuery(c?a.data:URI.parseQuery(a.data)).toString();try{this.data=this.method!="GET"?c?JSON.stringify(a.data):a.data:null}catch(e){d&&d({invalidData:!0},null,"")}}}}),_pending=[];exports.get=function(b,a){var d=new Request(b,a);_inflight>=SIMULTANEOUS?_pending.push(d):_send(d)};function _sendNext(){if(_inflight<SIMULTANEOUS){var b=_pending.shift();b&&_send(b)}}\nfunction _send(b){++_inflight;var a=exports.createXHR();a.open(b.method,b.url,b.async!=!1);var d=!1,c;for(c in b.headers)c.toLowerCase()=="content-type"&&(d=!0),a.setRequestHeader(c,b.headers[c]);d||a.setRequestHeader("Content-Type","text/plain");a.onreadystatechange=bind(this,onReadyStateChange,b,a);if(b.timeout)b.timeoutRef=setTimeout(bind(this,cancel,a,b),b.timeout);b.ts=+new Date;a.send(b.data||null)}\nfunction cancel(b,a){--_inflight;a.timedOut&&logger.log("already timed out?!");b.onreadystatechange=null;a.timedOut=!0;try{var d=b.getAllResponseHeaders()}catch(c){}a.cb&&a.cb({timeout:!0},null,d)}\nfunction onReadyStateChange(b,a){if(a.readyState==4){if(b.timedOut)throw"Unexpected?!";--_inflight;setTimeout(_sendNext,0);var d=b.cb;if("timeoutRef"in b)clearTimeout(b.timeoutRef),b.timeoutRef=null;if(d)if(a.status!=200&&a.status!=0){var c=a.response;if(a.getResponseHeader("Content-Type")=="application/json")try{c=JSON.parse(c)}catch(e){}d({status:a.status,response:c},null,a.getAllResponseHeaders())}else{c=a.responseText;if(b.type=="json")if(c)try{c=JSON.parse(c)}catch(f){d({status:a.status,response:a.response,\nparseError:!0},null,a.getAllResponseHeaders());return}else{d({status:a.status,response:a.response},null,a.getAllResponseHeaders());return}d(null,c,a.getAllResponseHeaders())}}};\n',
friendlyPath:"util.ajax",pre:!0},"../../packages/util/Animation.js":{path:"../../packages/util/Animation.js",directory:"../../packages/util/",filename:"Animation.js",src:'var SyncTimer=__class__,SyncTimer=SyncTimer(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(){this._items=[];this._tick=bind(this,"tick");this._length=0};this.tick=function(){var a=+new Date,b=a-this._last;this._last=a;for(a=0;a<this._length;++a)this._items[a](b)};this.add=function(a){a&&(this._items.push(a),++this._length,a(0),this.start())};this.remove=function(a){for(var b=0,c=this._items.length;b<c;++b)if(this._items[b]==a){this._items.splice(b,1);--this._length||\nthis.stop();break}};this.start=function(){if(!this._isRunning)this._isRunning=!0,this._last=+new Date,this._timer=setInterval(this._tick,15)};this.stop=function(){if(this._isRunning)this._isRunning=!1,clearInterval(this._timer)}}),timer=new SyncTimer,packages_util_Animation=__class__;\nexports=packages_util_Animation(function(){return this.init&&this.init.apply(this,arguments)},function(){this.init=function(a){this._start="start"in a?a.start:0;this._end="end"in a?a.end:1;this._transition=a.transition||null;this._easing=a.easing||!1;this._subject=a.subject;this._duration=a.duration||1E3;this._s=a.current||this._start;this._onFinish=a.onFinish||null;this._range=this._end-this._start;this._isAnimating=!1;this._animate=bind(this,"animate");this._timer=null};this.stop=function(){this.jumpTo(this._s)};\nthis.play=function(){this.seekTo(this._end)};this.seekTo=function(a,b){if(a!=this._s){this._t0=0;this._s0=this._s;this._s1=a;if(b)this._duration=b;this._ds=a-this._s;var c=this._ds/this._range*this._duration;this._dt=c<0?-c:c;if(!this._isAnimating)this._isAnimating=!0,timer.add(this._animate);return this}};this.onFinish=function(a){this._onFinish=a;return this};this.jumpTo=function(a){this._s1=this._s0=a;this._t0=0;this._dt=1;this._ds=0;this.animate(0);return this};this.animate=function(a){a=(this._t0+=\na)/this._dt;a>1&&(a=1);this._s=this._s0+a*this._ds;var b=this._transition?this._transition(this._s):this._s;try{this._subject(b,this._s)}finally{if(a==1)timer.remove(this._animate),this._isAnimating=!1,this._onFinish&&this._onFinish()}}});exports.linear=function(a){return a};exports.easeIn=function(a){return a*a};exports.easeInOut=function(a){return(a*=2)<1?0.5*a*a*a:0.5*((a-=2)*a*a+2)};exports.easeOut=function(a){return a*(2-a)};\n',
friendlyPath:"util.Animation",pre:!0},"../../packages/util/formatNumber.js":{path:"../../packages/util/formatNumber.js",directory:"../../packages/util/",filename:"formatNumber.js",src:'exports.integer=function(a,c,b,d){var c=c||"",b=b?" "+b:"",d=d?" "+d:b,e=(""+Math.round(a)).split(""),f=e.length;if(a==1)return c+1+d;else if(f>3)for(a=e.length-1;a>0;--a)(f-a)%3==0&&e.splice(a,0,",");return c+e.join("")+b};\n',friendlyPath:"util.formatNumber",pre:!0},"../../packages/util/jslint.js":{path:"../../packages/util/jslint.js",
directory:"../../packages/util/",filename:"jslint.js",src:'logger.warn("String.prototype has been modified. Current browser session should only be used for debugging.");\nvar JSLINT=exports=function(){function hb(){}function P(a,d){return Object.prototype.hasOwnProperty.call(a,d)}function ma(a,d){for(var b in d)P(d,b)&&(a[b]=d[b])}function Ja(){h.safe||(h.rhino&&ma(A,ub),h.devel&&ma(A,vb),h.browser&&ma(A,wb),h.windows&&ma(A,xb),h.widget&&ma(A,yb))}function Ka(a,d,b){throw{name:"JSLintError",line:d,character:b,message:a+" ("+Math.floor(d/na.length*100)+"% scanned)."};}function c(e,d,b,f,c,i){var u,d=d||a;d.id==="(end)"&&(d=g);u=d.line||0;d=d.from||0;b={id:"(error)",\nraw:e,evidence:na[u-1]||"",line:u,character:d,a:b,b:f,c:c,d:i};b.reason=e.supplant(b);JSLINT.errors.push(b);h.passfail&&Ka("Stopping. ",u,d);La+=1;La>=h.maxerr&&Ka("Too many errors.",u,d);return b}function p(a,d,b,f,g,i,h){return c(a,{line:d,from:b},f,g,i,h)}function k(a,d,b,f,g,i){a=c(a,d,b,f,g,i);Ka("Stopping, unable to continue.",a.line,a.character)}function H(a,d,b,f,c,g,h){return k(a,{line:d,from:b},f,c,g,h)}function ba(e,d){h.safe&&o["(global)"]&&typeof A[e]!=="boolean"?c("ADsafe global: "+\ne+".",g):e==="hasOwnProperty"&&c("\'hasOwnProperty\' is a really bad name.");P(o,e)&&!o["(global)"]&&c(o[e]===!0?"\'{a}\' was used before it was defined.":"\'{a}\' is already defined.",a,e);o[e]=d;o["(global)"]?(ib[e]=o,P(X,e)&&(c("\'{a}\' was used before it was defined.",a,e),delete X[e])):B[e]=o}function I(a){for(var a=a||0,d=0,b;d<=a;)(b=wa[d])||(b=wa[d]=S.token()),d+=1;return b}function f(e,d){switch(g.id){case "(number)":a.id==="."&&c("A dot following a number can be confused with a decimal point.",\ng);break;case "-":(a.id==="-"||a.id==="--")&&c("Confusing minusses.");break;case "+":(a.id==="+"||a.id==="++")&&c("Confusing plusses.")}if(g.type==="(string)"||g.identifier)Ma=g.value;e&&a.id!==e&&(d?a.id==="(end)"?c("Unmatched \'{a}\'.",d,d.id):c("Expected \'{a}\' to match \'{b}\' from line {c} and instead saw \'{d}\'.",a,e,d.id,d.line,a.value):(a.type!=="(identifier)"||a.value!==e)&&c("Expected \'{a}\' and instead saw \'{b}\'.",a,e,a.value));D=g;for(g=a;;){a=wa.shift()||S.token();if(a.id==="(end)"||a.id===\n"(error)")break;if(a.type==="special"){var b=void 0,f=void 0,M=void 0,i=a.value,u=b=void 0;switch(i){case "*/":k("Unbegun comment.");break;case "/*members":case "/*member":i="/*members";ca||(ca={});f=ca;break;case "/*jslint":h.safe&&c("ADsafe restriction.");f=h;M=zb;break;case "/*global":h.safe&&c("ADsafe restriction."),f=A}b=S.token();a:for(;;){for(;;){if(b.type==="special"&&b.value==="*/")break a;if(b.id!=="(endline)"&&b.id!==",")break;b=S.token()}b.type!=="(string)"&&b.type!=="(identifier)"&&i!==\n"/*members"&&k("Bad option.",b);u=S.token();u.id===":"?(u=S.token(),f===ca&&k("Expected \'{a}\' and instead saw \'{b}\'.",b,"*/",":"),b.value==="indent"&&i==="/*jslint"?(b=+u.value,(typeof b!=="number"||!isFinite(b)||b<=0||Math.floor(b)!==b)&&k("Expected a small integer and instead saw \'{a}\'.",u,u.value),f.white=!0,f.indent=b):b.value==="maxerr"&&i==="/*jslint"?(b=+u.value,(typeof b!=="number"||!isFinite(b)||b<=0||Math.floor(b)!==b)&&k("Expected a small integer and instead saw \'{a}\'.",u,u.value),f.maxerr=\nb):b.value==="maxlen"&&i==="/*jslint"?(b=+u.value,(typeof b!=="number"||!isFinite(b)||b<=0||Math.floor(b)!==b)&&k("Expected a small integer and instead saw \'{a}\'.",u,u.value),f.maxlen=b):u.value==="true"?f[b.value]=!0:u.value==="false"?f[b.value]=!1:k("Bad option value.",u),b=S.token()):(i==="/*jslint"&&k("Missing option value.",b),f[b.value]=!1,b=u)}M&&Ja()}else if(a.id!=="(endline)")break}}function j(e,d){var b;a.id==="(end)"&&k("Unexpected early end of program.",g);f();h.safe&&typeof A[g.value]===\n"boolean"&&a.id!=="("&&a.id!=="."&&c("ADsafe violation.",g);if(d)Ma="anonymous",o["(verb)"]=g.value;if(d===!0&&g.fud)b=g.fud();else{if(g.nud)b=g.nud();else if(a.type==="(number)"&&g.id===".")return c("A leading decimal point can be confused with a dot: \'.{a}\'.",g,a.value),f(),g;else k("Expected an identifier and instead saw \'{a}\'.",g,g.id);for(;e<a.lbp;)f(),g.led?b=g.led(b):k("Expected an operator and instead saw \'{a}\'.",g,g.id)}return b}function x(e,d){e=e||g;d=d||a;(h.white||q==="styleproperty"||\nq==="style")&&e.character!==d.from&&e.line===d.line&&c("Unexpected space after \'{a}\'.",d,e.value)}function Na(e,d){e=e||g;d=d||a;(e.character!==d.from||e.line!==d.line)&&c("Unexpected space before \'{a}\'.",d,d.value)}function E(e,d){e=e||g;d=d||a;h.white&&!e.comment&&e.line===d.line&&x(e,d)}function y(e,d){h.white&&(e=e||g,d=d||a,e.line===d.line&&e.character===d.from&&c("Missing space after \'{a}\'.",a,e.value))}function jb(e,d){e=e||g;d=d||a;!h.laxbreak&&e.line!==d.line?c("Bad line breaking before \'{a}\'.",\nd,d.id):h.white&&(e=e||g,d=d||a,e.character===d.from&&c("Missing space after \'{a}\'.",a,e.value))}function Q(e){h.white&&a.id!=="(end)"&&(e=C+(e||0),a.from!==e&&c("Expected \'{a}\' to have an indentation at {b} instead at {c}.",a,a.value,e,a.from))}function Y(e){e=e||g;e.line!==a.line&&c("Line breaking error \'{a}\'.",e,e.value)}function N(){g.line!==a.line?h.laxbreak||c("Bad line breaking before \'{a}\'.",g,a.id):g.character!==a.from&&h.white&&c("Unexpected space after \'{a}\'.",a,g.value);f(",");y(g,a)}\nfunction Z(a,d){var b=J[a];if(!b||typeof b!=="object")J[a]=b={id:a,lbp:d,value:a};return b}function z(a){return Z(a,0)}function $(a,d){var b=z(a);b.identifier=b.reserved=!0;b.fud=d;return b}function fa(a,d){var b=$(a,d);b.block=!0;return b}function Oa(a){var d=a.id.charAt(0);if(d>="a"&&d<="z"||d>="A"&&d<="Z")a.identifier=a.reserved=!0;return a}function K(a,d){var b=Z(a,150);Oa(b);b.nud=typeof d==="function"?d:function(){this.right=j(150);this.arity="unary";if(this.id==="++"||this.id==="--")h.plusplus?\nc("Unexpected use of \'{a}\'.",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!=="["&&c("Bad operand.",this);return this};return b}function xa(a,d){var b=z(a);b.type=a;b.nud=d;return b}function t(a,d){var b=xa(a,d);b.identifier=b.reserved=!0;return b}function T(a,d){return t(a,function(){typeof d==="function"&&d(this);return this})}function G(e,d,b,f){e=Z(e,b);Oa(e);e.led=function(e){f||(jb(D,g),y(g,a));return typeof d==="function"?d(e,this):(this.left=\ne,this.right=j(b),this)};return e}function aa(e,d){var b=Z(e,100);b.led=function(e){jb(D,g);y(g,a);var b=j(100);e&&e.id==="NaN"||b&&b.id==="NaN"?c("Use the isNaN function to compare with NaN.",this):d&&d.apply(this,[e,b]);e.id==="!"&&c("Confusing use of \'{a}\'.",e,"!");b.id==="!"&&c("Confusing use of \'{a}\'.",e,"!");this.left=e;this.right=b;return this};return b}function ya(a){return a&&(a.type==="(number)"&&+a.value===0||a.type==="(string)"&&a.value===""||a.type==="true"||a.type==="false"||a.type===\n"undefined"||a.type==="null")}function ga(a){Z(a,20).exps=!0;return G(a,function(a,e){var f;e.left=a;A[a.value]===!1&&B[a.value]["(global)"]===!0?c("Read only.",a):a["function"]&&c("\'{a}\' is a function.",a,a.value);if(h.safe){f=a;do typeof A[f.value]==="boolean"&&c("ADsafe violation.",f),f=f.left;while(f)}if(a){if(a.id==="."||a.id==="[")return(!a.left||a.left.value==="arguments")&&c("Bad assignment.",e),e.right=j(19),e;else if(a.identifier&&!a.reserved)return o[a.value]==="exception"&&c("Do not assign to the exception parameter.",\na),e.right=j(19),e;a===J["function"]&&c("Expected an identifier in an assignment and instead saw a function invocation.",g)}k("Bad assignment.",e)},20)}function ha(a,d,b){a=Z(a,b);Oa(a);a.led=typeof d==="function"?d:function(a){h.bitwise&&c("Unexpected use of \'{a}\'.",this,this.id);this.left=a;this.right=j(b);return this};return a}function ia(e){Z(e,20).exps=!0;return G(e,function(e,b){h.bitwise&&c("Unexpected use of \'{a}\'.",b,b.id);y(D,g);y(g,a);if(e){if(e.id==="."||e.id==="["||e.identifier&&!e.reserved)return j(19),\nb;e===J["function"]&&c("Expected an identifier in an assignment, and instead saw a function invocation.",g);return b}k("Bad assignment.",b)},20)}function kb(a){a=Z(a,150);a.led=function(a){h.plusplus?c("Unexpected use of \'{a}\'.",this,this.id):(!a.identifier||a.reserved)&&a.id!=="."&&a.id!=="["&&c("Bad operand.",this);this.left=a;return this};return a}function Pa(){if(a.identifier)return f(),h.safe&&Qa[g.value]?c("ADsafe violation: \'{a}\'.",g,g.value):g.reserved&&!h.es5&&c("Expected an identifier and instead saw \'{a}\' (a reserved word).",\ng,g.id),g.value}function oa(){var e=Pa();if(e)return e;g.id==="function"&&a.id==="("?c("Missing name in function statement."):k("Expected an identifier and instead saw \'{a}\'.",a,a.value)}function za(e){var d=0,b;if(!(a.id!==";"||Ra))for(;;){b=I(d);if(b.reach)break;if(b.id!=="(endline)"){if(b.id==="function"){c("Inner functions should be listed at the top of the outer function.",b);break}c("Unreachable \'{a}\' after \'{b}\'.",b,b.value,e);break}d+=1}}function Sa(e){var d=C,b=B,n=a;if(n.id===";")c("Unnecessary semicolon.",\nn),f(";");else{if(n.identifier&&!n.reserved&&I().id===":")f(),f(":"),B=Object.create(b),ba(n.value,"label"),a.labelled||c("Label \'{a}\' on {b} statement.",a,n.value,a.value),Ta.test(n.value+":")&&c("Label \'{a}\' looks like a javascript url.",n,n.value),a.label=n.value,n=a;e||Q();e=j(0,!0);n.block||(!e||!e.exps?c("Expected an assignment or function call and instead saw an expression.",g):e.id==="("&&e.left.id==="new"&&c("Do not use \'new\' for side effects."),a.id!==";"?p("Missing semicolon.",g.line,g.from+\ng.value.length):(x(g,a),f(";"),y(g,a)));C=d;B=b;return e}}function lb(){return a.value==="use strict"?(f(),f(";"),Aa=!0,h.newcap=!0,h.undef=!0):!1}function pa(e){var d=[],b;e&&!lb()&&h.strict&&c(\'Missing "use strict" statement.\',a);if(h.adsafe)switch(e){case "script":ja||(a.value!=="ADSAFE"||I(0).id!=="."||I(1).value!=="id"&&I(1).value!=="go")&&k("ADsafe violation: Missing ADSAFE.id or ADSAFE.go.",a);a.value==="ADSAFE"&&I(0).id==="."&&I(1).value==="id"&&(ja&&k("ADsafe violation.",a),f("ADSAFE"),f("."),\nf("id"),f("("),a.value!==O&&k("ADsafe violation: id does not match.",a),f("(string)"),f(")"),f(";"),ja=!0);break;case "lib":if(a.value==="ADSAFE")return f("ADSAFE"),f("."),f("lib"),f("("),f("(string)"),N(),e=j(0),e.id!=="function"&&k("The second argument to lib must be a function.",e),(b=(b=e.funct["(params)"])&&b.join(", "))&&b!=="lib"&&k("Expected \'{a}\' and instead saw \'{b}\'.",e,"(lib)","("+b+")"),f(")"),f(";"),d;else k("ADsafe lib violation.")}for(;!a.reach&&a.id!=="(end)";)a.id===";"?(c("Unnecessary semicolon."),\nf(";")):d.push(Sa());return d}function R(e){var d,b=qa,n=C,M=B,i;qa=e;B=Object.create(B);y(g,a);i=a;if(a.id==="{"){f("{");if(a.id!=="}"||g.line!==a.line){for(C+=h.indent;!e&&a.from>C;)C+=h.indent;e||lb();d=pa();C-=h.indent;Q()}f("}",i);C=n}else c("Expected \'{a}\' and instead saw \'{b}\'.",a,"{",a.value),Ra=!0,d=[Sa()],Ra=!1;o["(verb)"]=null;B=M;qa=b;e&&(!d||d.length===0)&&c("Empty block.");return d}function Ba(a){ca&&typeof ca[a]!=="boolean"&&c("Unexpected /*member \'{a}\'.",g,a);typeof da[a]==="number"?\nda[a]+=1:da[a]=1}function Ua(a){var d=a.value,a=a.line,b=X[d];typeof b==="function"&&(b=!1);b?b[b.length-1]!==a&&b.push(a):(b=[a],X[d]=b)}function Va(){if(a.identifier)return f(),!0}function Ca(){a.id==="-"&&(f("-"),x(),Y());if(a.type==="(number)")return f("(number)"),!0}function Wa(){if(a.type==="(string)")return f(),!0}function U(){var e,d,b;if(a.identifier)if(b=a.value,b==="rgb"||b==="rgba"){f();f("(");for(e=0;e<3;e+=1)e&&f(","),d=a.value,a.type!=="(number)"||d<0?(c("Expected a positive number and instead saw \'{a}\'",\na,d),f()):(f(),a.id==="%"?(f("%"),d>100&&c("Expected a percentage and instead saw \'{a}\'",g,d)):d>255&&c("Expected a small number and instead saw \'{a}\'",g,d));b==="rgba"&&(f(","),d=+a.value,(a.type!=="(number)"||d<0||d>1)&&c("Expected a number between 0 and 1 and instead saw \'{a}\'",a,d),f(),a.id==="%"&&(c("Unexpected \'%\'."),f("%")));f(")");return!0}else{if(Ab[a.value]===!0)return f(),!0}else if(a.type==="(color)")return f(),!0;return!1}function v(){a.id==="-"&&(f("-"),x(),Y());return a.type==="(number)"?\n(f(),a.type!=="(string)"&&mb[a.value]===!0?(x(),f()):+g.value!==0&&c("Expected a linear unit and instead saw \'{a}\'.",a,a.value),!0):!1}function ka(){if(a.identifier)switch(a.value){case "thin":case "medium":case "thick":return f(),!0}else return v()}function ra(){if(a.identifier){if(a.value==="auto")return f(),!0}else return v()}function ea(){var e,d;if(a.identifier&&a.value==="url"){a=S.range("(",")");d=a.value;e=d.charAt(0);if(e===\'"\'||e==="\'")d.slice(-1)!==e?c("Bad url string."):(d=d.slice(1,-1),\nd.indexOf(e)>=0&&c("Bad url string."));d||c("Missing url.");f();h.safe&&nb.test(d)&&k("ADsafe URL violation.");sa.push(d);return!0}return!1}function Xa(e){var d=0,b,c,g,h=0;switch(typeof e){case "function":return e();case "string":return a.identifier&&a.value===e?(f(),!0):!1}for(;;){if(d>=e.length)return!1;g=e[d];d+=1;if(g===!0)break;else typeof g==="number"?(b=g,g=e[d],d+=1):b=1;for(c=!1;b>0;)if(Xa(g))c=!0,b-=1;else break;if(c)return!0}h=d;for(b=[];;){g=!1;for(d=h;d<e.length;d+=1)if(!b[d]&&Xa(Da[e[d]])){g=\nc=!0;b[d]=!0;break}if(!g)return c}}function ob(){for(var e;;){if(a.id==="}"||a.id==="(end)"||L&&a.id===L)break;for(;a.id===";";)c("Misplaced \';\'."),f(";");for(e=void 0;a.id==="*"||a.id==="#"||a.value==="_";)h.css||c("Unexpected \'{a}\'.",a,a.value),f();a.id==="-"?(h.css||c("Unexpected \'{a}\'.",a,a.value),f("-"),a.identifier||c("Expected a non-standard style attribute and instead saw \'{a}\'.",a,a.value),f(),e=Ya):(a.identifier?P(Da,a.value)?e=Da[a.value]:(e=Ya,h.css||c("Unrecognized style attribute \'{a}\'.",\na,a.value)):c("Excepted a style attribute, and instead saw \'{a}\'.",a,a.value),f());f(":");a.identifier&&a.value==="inherit"?f():Xa(e)||(c("Unexpected token \'{a}\'.",a,a.value),f());a.id==="!"&&(f("!"),x(),a.identifier&&a.value==="important"?f():c("Expected \'{a}\' and instead saw \'{b}\'.",a,"important",a.value));a.id==="}"||a.id===L?c("Missing \'{a}\'.",a,";"):f(";")}}function Za(){if(a.identifier)P($a,h.cap?a.value.toLowerCase():a.value)||c("Expected a tagName, and instead saw {a}.",a,a.value),f();else switch(a.id){case ">":case "+":f();\nZa();break;case ":":f(":");switch(a.value){case "active":case "after":case "before":case "checked":case "disabled":case "empty":case "enabled":case "first-child":case "first-letter":case "first-line":case "first-of-type":case "focus":case "hover":case "last-child":case "last-of-type":case "link":case "only-of-type":case "root":case "target":case "visited":f();break;case "lang":f();f("(");a.identifier||c("Expected a lang code, and instead saw :{a}.",a,a.value);f(")");break;case "nth-child":case "nth-last-child":case "nth-last-of-type":case "nth-of-type":f();\nf("(");a:if(a.id==="(number)")f(),a.value==="n"&&a.identifier&&(x(),f(),a.id==="+"&&(x(),f("+"),x(),f("(number)")));else{switch(a.value){case "odd":case "even":if(a.identifier){f();break a}}c("Unexpected token \'{a}\'.",a,a.value)}f(")");break;case "not":f();f("(");a.id===":"&&I(0).value==="not"&&c("Nested not.");Za();f(")");break;default:c("Expected a pseudo, and instead saw :{a}.",a,a.value)}break;case "#":f("#");a.identifier||c("Expected an id, and instead saw #{a}.",a,a.value);f();break;case "*":f("*");\nbreak;case ".":f(".");a.identifier||c("Expected a class, and instead saw #.{a}.",a,a.value);f();break;case "[":f("[");a.identifier||c("Expected an attribute, and instead saw [{a}].",a,a.value);f();if(a.id==="="||a.value==="~="||a.value==="$="||a.value==="|="||a.id==="*="||a.id==="^=")f(),a.type!=="(string)"&&c("Expected a string, and instead saw {a}.",a,a.value),f();f("]");break;default:k("Expected a CSS selector, and instead saw {a}.",a,a.value)}}function pb(){for(;a.id!=="</"&&a.id!=="(end)";){a:for(a.id===\n"{"&&c("Expected a style pattern, and instead saw \'{a}\'.",a,a.id);;){Za();if(a.id==="</"||a.id==="{"||a.id==="(end)")break a;a.id===","&&N()}q="styleproperty";a.id===";"?f(";"):(f("{"),ob(),q="style",f("}"))}}function qb(){for(;a.id==="@";)if(I(),f("@"),a.identifier)switch(a.value){case "import":f();ea()||(c("Expected \'{a}\' and instead saw \'{b}\'.",a,"url",a.value),f());f(";");break;case "media":for(f();;){(!a.identifier||rb[a.value]===!0)&&k("Expected a CSS media type, and instead saw \'{a}\'.",a,a.id);\nf();if(a.id!==",")break;f(",")}f("{");pb();f("}");break;default:c("Expected an at-rule, and instead saw @{a}.",a,a.value)}else c("Expected an at-rule, and instead saw \'{a}\'.",a,a.value);pb()}function ab(){var e=Pa(!0);if(!e)a.id==="(string)"?(e=a.value,h.adsafe&&(e.charAt(0)==="_"||e.charAt(e.length-1)==="_")&&c("Unexpected {a} in \'{b}\'.",g,"dangling \'_\'",e),f()):a.id==="(number)"&&(e=a.value.toString(),f());return e}function Ea(e,d){var b,c=B;B=Object.create(c);b=o={"(name)":e||\'"\'+Ma+\'"\',"(line)":a.line,\n"(context)":o,"(breakage)":0,"(loopage)":0,"(scope)":B,"(statement)":d};g.funct=o;ta.push(o);e&&ba(e,"function");var h=o,i;a:{var u,k=a,w=[];f("(");E();if(a.id===")")f(")"),E(D,g),i=void 0;else for(;;)if(u=oa(),w.push(u),ba(u,"parameter"),a.id===",")N();else{f(")",k);E(D,g);i=w;break a}}h["(params)"]=i;R(!1);B=c;o["(last)"]=g.line;o=o["(context)"];return b}function bb(){function e(){var e={},d=a;f("{");if(a.id!=="}")for(;;){if(a.id==="(end)")k("Missing \'}\' to match \'{\' from line {a}.",a,d.line);else if(a.id===\n"}"){c("Unexpected comma.",g);break}else a.id===","?k("Unexpected comma.",a):a.id!=="(string)"&&c("Expected a string and instead saw {a}.",a,a.value);e[a.value]===!0?c("Duplicate key \'{a}\'.",a,a.value):a.value==="__proto__"?c("Stupid key \'{a}\'.",a,a.value):e[a.value]=!0;f();f(":");bb();if(a.id!==",")break;f(",")}f("}")}function d(){var e=a;f("[");if(a.id!=="]")for(;;){if(a.id==="(end)")k("Missing \']\' to match \'[\' from line {a}.",a,e.line);else if(a.id==="]"){c("Unexpected comma.",g);break}else a.id===\n","&&k("Unexpected comma.",a);bb();if(a.id!==",")break;f(",")}f("]")}switch(a.id){case "{":e();break;case "[":d();break;case "true":case "false":case "null":case "(number)":case "(string)":f();break;case "-":f("-");g.character!==a.from&&c("Unexpected space after \'-\'.",g);x(g,a);f("(number)");break;default:k("Expected a JSON value.",a)}}function sb(a){var d=[],b;for(b in a)P(a,b)&&d.push(b);return d}var O,ja,ua,Ma,Fa,Bb={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,\n"*":!0,"/":!0,"%":!0},Qa={arguments:!0,callee:!0,caller:!0,constructor:!0,eval:!0,prototype:!0,stack:!0,unwatch:!0,valueOf:!0,watch:!0},zb={adsafe:!0,bitwise:!0,browser:!0,cap:!0,css:!0,debug:!0,devel:!0,eqeqeq:!0,es5:!0,evil:!0,forin:!0,fragment:!0,immed:!0,laxbreak:!0,newcap:!0,nomen:!0,on:!0,onevar:!0,passfail:!0,plusplus:!0,regexp:!0,rhino:!0,undef:!0,safe:!0,windows:!0,strict:!0,sub:!0,white:!0,widget:!0},wb={addEventListener:!1,blur:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,defaultStatus:!1,\ndocument:!1,event:!1,focus:!1,frames:!1,getComputedStyle:!1,history:!1,Image:!1,length:!1,location:!1,moveBy:!1,moveTo:!1,name:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,setInterval:!1,setTimeout:!1,status:!1,top:!1,XMLHttpRequest:!1},Da,Ya,Ab={aliceblue:!0,antiquewhite:!0,aqua:!0,aquamarine:!0,azure:!0,beige:!0,\nbisque:!0,black:!0,blanchedalmond:!0,blue:!0,blueviolet:!0,brown:!0,burlywood:!0,cadetblue:!0,chartreuse:!0,chocolate:!0,coral:!0,cornflowerblue:!0,cornsilk:!0,crimson:!0,cyan:!0,darkblue:!0,darkcyan:!0,darkgoldenrod:!0,darkgray:!0,darkgreen:!0,darkkhaki:!0,darkmagenta:!0,darkolivegreen:!0,darkorange:!0,darkorchid:!0,darkred:!0,darksalmon:!0,darkseagreen:!0,darkslateblue:!0,darkslategray:!0,darkturquoise:!0,darkviolet:!0,deeppink:!0,deepskyblue:!0,dimgray:!0,dodgerblue:!0,firebrick:!0,floralwhite:!0,\nforestgreen:!0,fuchsia:!0,gainsboro:!0,ghostwhite:!0,gold:!0,goldenrod:!0,gray:!0,green:!0,greenyellow:!0,honeydew:!0,hotpink:!0,indianred:!0,indigo:!0,ivory:!0,khaki:!0,lavender:!0,lavenderblush:!0,lawngreen:!0,lemonchiffon:!0,lightblue:!0,lightcoral:!0,lightcyan:!0,lightgoldenrodyellow:!0,lightgreen:!0,lightpink:!0,lightsalmon:!0,lightseagreen:!0,lightskyblue:!0,lightslategray:!0,lightsteelblue:!0,lightyellow:!0,lime:!0,limegreen:!0,linen:!0,magenta:!0,maroon:!0,mediumaquamarine:!0,mediumblue:!0,\nmediumorchid:!0,mediumpurple:!0,mediumseagreen:!0,mediumslateblue:!0,mediumspringgreen:!0,mediumturquoise:!0,mediumvioletred:!0,midnightblue:!0,mintcream:!0,mistyrose:!0,moccasin:!0,navajowhite:!0,navy:!0,oldlace:!0,olive:!0,olivedrab:!0,orange:!0,orangered:!0,orchid:!0,palegoldenrod:!0,palegreen:!0,paleturquoise:!0,palevioletred:!0,papayawhip:!0,peachpuff:!0,peru:!0,pink:!0,plum:!0,powderblue:!0,purple:!0,red:!0,rosybrown:!0,royalblue:!0,saddlebrown:!0,salmon:!0,sandybrown:!0,seagreen:!0,seashell:!0,\nsienna:!0,silver:!0,skyblue:!0,slateblue:!0,slategray:!0,snow:!0,springgreen:!0,steelblue:!0,tan:!0,teal:!0,thistle:!0,tomato:!0,turquoise:!0,violet:!0,wheat:!0,white:!0,whitesmoke:!0,yellow:!0,yellowgreen:!0,activeborder:!0,activecaption:!0,appworkspace:!0,background:!0,buttonface:!0,buttonhighlight:!0,buttonshadow:!0,buttontext:!0,captiontext:!0,graytext:!0,highlight:!0,highlighttext:!0,inactiveborder:!0,inactivecaption:!0,inactivecaptiontext:!0,infobackground:!0,infotext:!0,menu:!0,menutext:!0,\nscrollbar:!0,threeddarkshadow:!0,threedface:!0,threedhighlight:!0,threedlightshadow:!0,threedshadow:!0,window:!0,windowframe:!0,windowtext:!0},V,cb,mb={"%":!0,cm:!0,em:!0,ex:!0,"in":!0,mm:!0,pc:!0,pt:!0,px:!0},rb,Ga,vb={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},Cb={"\\u0008":"\\\\b","\\t":"\\\\t","\\n":"\\\\n","\\u000c":"\\\\f","\\r":"\\\\r",\'"\':\'\\\\"\',"/":"\\\\/","\\\\":"\\\\\\\\"},o,va="closure,exception,global,label,outer,unused,var".split(","),ta,ib,$a={a:{},abbr:{},acronym:{},address:{},applet:{},\narea:{empty:!0,parent:" map "},article:{},aside:{},audio:{},b:{},base:{empty:!0,parent:" head "},bdo:{},big:{},blockquote:{},body:{parent:" html noframes "},br:{empty:!0},button:{},canvas:{parent:" body p div th td "},caption:{parent:" table "},center:{},cite:{},code:{},col:{empty:!0,parent:" table colgroup "},colgroup:{parent:" table "},command:{parent:" menu "},datalist:{},dd:{parent:" dl "},del:{},details:{},dialog:{},dfn:{},dir:{},div:{},dl:{},dt:{parent:" dl "},em:{},embed:{},fieldset:{},figure:{},\nfont:{},footer:{},form:{},frame:{empty:!0,parent:" frameset "},frameset:{parent:" html frameset "},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},head:{parent:" html "},header:{},hgroup:{},hr:{empty:!0},"hta:application":{empty:!0,parent:" head "},html:{parent:"*"},i:{},iframe:{},img:{empty:!0},input:{empty:!0},ins:{},kbd:{},keygen:{},label:{},legend:{parent:" details fieldset figure "},li:{parent:" dir menu ol ul "},link:{empty:!0,parent:" head "},map:{},mark:{},menu:{},meta:{empty:!0,parent:" head noframes noscript "},\nmeter:{},nav:{},noframes:{parent:" html body "},noscript:{parent:" body head noframes "},object:{},ol:{},optgroup:{parent:" select "},option:{parent:" optgroup select "},output:{},p:{},param:{empty:!0,parent:" applet object "},pre:{},progress:{},q:{},rp:{},rt:{},ruby:{},samp:{},script:{empty:!0,parent:" body div frame head iframe p pre span "},section:{},select:{},small:{},span:{},source:{},strong:{},style:{parent:" head ",empty:!0},sub:{},sup:{},table:{},tbody:{parent:" table "},td:{parent:" tr "},\ntextarea:{},tfoot:{parent:" table "},th:{parent:" tr "},thead:{parent:" table "},time:{},title:{parent:" head "},tr:{parent:" table tbody thead tfoot "},tt:{},u:{},ul:{},"var":{},video:{}},Ha,X,qa,C,la,na,wa,da,ca,a,Ra,h,A,db,D,ub={defineClass:!1,deserialize:!1,gc:!1,help:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},B,Ia,F,Db={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,\nError:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},Eb={E:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,MAX_VALUE:!0,MIN_VALUE:!0,NEGATIVE_INFINITY:!0,PI:!0,POSITIVE_INFINITY:!0,SQRT1_2:!0,SQRT2:!0},Aa,J={},eb,g,sa,La,yb={alert:!0,animator:!0,appleScript:!0,beep:!0,bytesToUIString:!0,Canvas:!0,chooseColor:!0,chooseFile:!0,chooseFolder:!0,\ncloseWidget:!0,COM:!0,convertPathToHFS:!0,convertPathToPlatform:!0,CustomAnimation:!0,escape:!0,FadeAnimation:!0,filesystem:!0,Flash:!0,focusWidget:!0,form:!0,FormField:!0,Frame:!0,HotKey:!0,Image:!0,include:!0,isApplicationRunning:!0,iTunes:!0,konfabulatorVersion:!0,log:!0,md5:!0,MenuItem:!0,MoveAnimation:!0,openURL:!0,play:!0,Point:!0,popupMenu:!0,preferenceGroups:!0,preferences:!0,print:!0,prompt:!0,random:!0,Rectangle:!0,reloadWidget:!0,ResizeAnimation:!0,resolvePath:!0,resumeUpdates:!0,RotateAnimation:!0,\nrunCommand:!0,runCommandInBg:!0,saveAs:!0,savePreferences:!0,screen:!0,ScrollBar:!0,showWidgetPreferences:!0,sleep:!0,speak:!0,Style:!0,suppressUpdates:!0,system:!0,tellWidget:!0,Text:!0,TextArea:!0,Timer:!0,unescape:!0,updateNow:!0,URL:!0,Web:!0,widget:!0,Window:!0,XMLDOM:!0,XMLHttpRequest:!0,yahooCheckLogin:!0,yahooLogin:!0,yahooLogout:!0},xb={ActiveXObject:!1,CScript:!1,Debug:!1,Enumerator:!1,System:!1,VBArray:!1,WScript:!1},q,L,fb=/@cc|<\\/?|script|\\]\\s*\\]|<\\s*!|</i,Fb=/[\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,\nGb=/^\\s*([(){}\\[.,:;\'"~\\?\\]#@]|==?=?|\\/(\\*(jslint|members?|global)?|=|\\/)?|\\*[\\/=]?|\\+(?:=|\\++)?|-(?:=|-+)?|%=?|&[&=]?|\\|[|=]?|>>?>?=?|<([\\/=!]|\\!(\\[|--)?|<=?)?|\\^=?|\\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\\.[0-9]*)?([eE][+\\-]?[0-9]+)?)/;V=/^\\s*([\'"=>\\/&#]|<(?:\\/|\\!(?:--)?)?|[a-zA-Z][a-zA-Z0-9_\\-:]*|[0-9]+|--)/;var Hb=/[\\u0000-\\u001f&<"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/,Ib=/[\\u0000-\\u001f&<"\\/\\\\\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,\nJb=/[>&]|<[\\/!]?|--/,Kb=/\\*\\/|\\/\\*/,tb=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,Ta=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\\s*:/i,nb=/&|\\+|\\u00AD|\\.\\.|\\/\\*|%[^;]|base64|url|expression|data|mailto/i,Lb=/[^a-zA-Z0-9+\\-_\\/ ]/,Mb=/[\\[\\]\\/\\\\"\'*<>.&:(){}+=#]/,Nb={outer:V,html:V,style:/^\\s*([{:#%.=,>+\\[\\]@()"\';]|\\*=?|\\$=|\\|=|\\^=|~=|[a-zA-Z_][a-zA-Z0-9_\\-]*|[0-9]+|<\\/|\\/\\*)/,styleproperty:/^\\s*([@#!"\'};:\\-%.=,+\\[\\]()*_]|[a-zA-Z][a-zA-Z0-9._\\-]*|\\/\\*?|\\d+(?:\\.\\d+)?|<\\/)/};if(typeof Object.create!==\n"function")Object.create=function(a){hb.prototype=a;return new hb};String.prototype.entityify=function(){return this.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")};String.prototype.isAlpha=function(){return this>="a"&&this<="z\\uffff"||this>="A"&&this<="Z\\uffff"};String.prototype.isDigit=function(){return this>="0"&&this<="9"};String.prototype.supplant=function(a){return this.replace(/\\{([^{}]*)\\}/g,function(d,b){var f=a[b];return typeof f==="string"||typeof f==="number"?f:d})};String.prototype.name=\nfunction(){return tb.test(this)?this:Hb.test(this)?\'"\'+this.replace(Ib,function(a){var d=Cb[a];return d?d:"\\\\u"+("0000"+a.charCodeAt().toString(16)).slice(-4)})+\'"\':\'"\'+this+\'"\'};var S=function(){function a(){var e;if(c>=na.length)return!1;b=1;i=na[c];c+=1;e=i.search(/ \\t/);e>=0&&p("Mixed spaces and tabs.",c,e+1);i=i.replace(/\\t/g,eb);e=i.search(Fb);e>=0&&p("Unsafe character.",c,e);h.maxlen&&h.maxlen<i.length&&p("Line too long.",c,i.length);return!0}function d(a,e){var d,g;g=a==="(color)"||a==="(range)"?\n{type:a}:a==="(punctuator)"||a==="(identifier)"&&P(J,e)?J[e]||J["(error)"]:J[a];g=Object.create(g);(a==="(string)"||a==="(range)")&&Ta.test(e)&&p("Script URL.",c,f);if(a==="(identifier)")g.identifier=!0,e==="__iterator__"||e==="__proto__"?H("Reserved name \'{a}\'.",c,f,e):h.nomen&&(e.charAt(0)==="_"||e.charAt(e.length-1)==="_")&&p("Unexpected {a} in \'{b}\'.",c,f,"dangling \'_\'",e);g.value=e;g.line=c;g.character=b;g.from=f;d=g.id;d!=="(endline)"&&(db=d&&("(,=:[!&|?{};".indexOf(d.charAt(d.length-1))>=0||\nd==="return"));return g}var b,f,c,i;return{init:function(b){na=typeof b==="string"?b.replace(/\\r\\n/g,"\\n").replace(/\\r/g,"\\n").split("\\n"):b;c=0;a();f=1},range:function(a,e){var g,h="";f=b;for(i.charAt(0)!==a&&H("Expected \'{a}\' and instead saw \'{b}\'.",c,b,a,i.charAt(0));;){i=i.slice(1);b+=1;g=i.charAt(0);switch(g){case "":H("Missing \'{a}\'.",c,b,g);break;case e:return i=i.slice(1),b+=1,d("(range)",h);case L:case "\\\\":p("Unexpected \'{a}\'.",c,b,g)}h+=g}},token:function(){function k(a){if(a=a.exec(i))return l=\na[0].length,a=a[1],m=a.charAt(0),i=i.substr(l),f=b+l-a.length,b+=l,a}function o(g){function m(a){var e=parseInt(i.substr(k+1,a),16);k+=a;e>=32&&e<=126&&e!==34&&e!==92&&e!==39&&p("Unnecessary escapement.",c,b);b+=a;l=String.fromCharCode(e)}var l,k,j="";la&&g!==\'"\'&&p("Strings must use doublequote.",c,b);if(L===g||q==="scriptstring"&&!L)return d("(punctuator)",g);for(k=0;;){for(;k>=i.length;)k=0,(q!=="html"||!a())&&H("Unclosed string.",c,f);l=i.charAt(k);if(l===g)return b+=1,i=i.substr(k+1),d("(string)",\nj,g);if(l<" "){if(l==="\\n"||l==="\\r")break;p("Control character in string: {a}.",c,b+k,i.slice(0,k))}else if(l===L)p("Bad HTML string",c,b+k);else if(l==="<")h.safe&&q==="html"?p("ADsafe string violation.",c,b+k):i.charAt(k+1)==="/"&&(q||h.safe)?p("Expected \'<\\\\/\' and instead saw \'</\'.",c,b):i.charAt(k+1)==="!"&&(q||h.safe)&&p("Unexpected \'<!\' in a string.",c,b);else if(l==="\\\\")if(q==="html")h.safe&&p("ADsafe string violation.",c,b+k);else if(q==="styleproperty")k+=1,b+=1,l=i.charAt(k),l!==g&&p("Escapement in style string.",\nc,b+k);else switch(k+=1,b+=1,l=i.charAt(k),l){case L:p("Bad HTML string",c,b+k);break;case "\\\\":case "\'":case \'"\':case "/":break;case "b":l="\\u0008";break;case "f":l="\\u000c";break;case "n":l="\\n";break;case "r":l="\\r";break;case "t":l="\\t";break;case "u":m(4);break;case "v":l="\\u000b";break;case "x":la&&p("Avoid \\\\x-.",c,b);m(2);break;default:p("Bad escapement.",c,b)}j+=l;b+=1;k+=1}}for(var w,m,s,j,l,r;;){if(!i)return d(a()?"(endline)":"(end)","");for(;q==="outer";)if(j=i.search(Jb),j===0)break;\nelse if(j>0){b+=1;i=i.slice(j);break}else if(!a())return d("(end)","");if(s=k(Nb[q]||Gb)){if(m.isAlpha()||m==="_"||m==="$")return d("(identifier)",s);if(m.isDigit())return q!=="style"&&!isFinite(Number(s))&&p("Bad number \'{a}\'.",c,b,s),q!=="style"&&q!=="styleproperty"&&i.substr(0,1).isAlpha()&&p("Missing space after \'{a}\'.",c,b,s),m==="0"&&(j=s.substr(1,1),j.isDigit()?g.id!=="."&&q!=="styleproperty"&&p("Don\'t use extra leading zeros \'{a}\'.",c,b,s):la&&(j==="x"||j==="X")&&p("Avoid 0x-. \'{a}\'.",c,b,\ns)),s.substr(s.length-1)==="."&&p("A trailing decimal point can be confused with a dot \'{a}\'.",c,b,s),d("(number)",s);switch(s){case \'"\':case "\'":return o(s);case "//":Ia||q&&q!=="script"?p("Unexpected comment.",c,b):q==="script"&&/<\\s*\\//i.test(i)?p("Unexpected </ in comment.",c,b):(h.safe||q==="script")&&fb.test(i)&&p("Dangerous comment.",c,b);i="";g.comment=!0;break;case "/*":(Ia||q&&q!=="script"&&q!=="style"&&q!=="styleproperty")&&p("Unexpected comment.",c,b);for(h.safe&&fb.test(i)&&p("ADsafe comment violation.",\nc,b);;){j=i.search(Kb);if(j>=0)break;a()?h.safe&&fb.test(i)&&p("ADsafe comment violation.",c,b):H("Unclosed comment.",c,b)}b+=j+2;i.substr(j,1)==="/"&&H("Nested comment.",c,b);i=i.substr(j+2);g.comment=!0;break;case "/*members":case "/*member":case "/*jslint":case "/*global":case "*/":return{value:s,type:"special",line:c,character:b,from:f};case "":break;case "/":g.id==="/="&&H("A regular expression literal can be confused with \'/=\'.",c,f);if(db){for(l=s=j=0;;){w=!0;m=i.charAt(l);l+=1;switch(m){case "":H("Unclosed regular expression.",\nc,f);return;case "/":j>0&&p("Unescaped \'{a}\'.",c,f+l,"/");m=i.substr(0,l-1);for(r={g:!0,i:!0,m:!0};r[i.charAt(l)]===!0;)r[i.charAt(l)]=!1,l+=1;b+=l;i=i.substr(l);r=i.charAt(0);(r==="/"||r==="*")&&H("Confusing regular expression.",c,f);return d("(regexp)",m);case "\\\\":m=i.charAt(l);m<" "?p("Unexpected control character in regular expression.",c,f+l):m==="<"&&p("Unexpected escaped character \'{a}\' in regular expression.",c,f+l,m);l+=1;break;case "(":j+=1;w=!1;if(i.charAt(l)==="?")switch(l+=1,i.charAt(l)){case ":":case "=":case "!":l+=\n1;break;default:p("Expected \'{a}\' and instead saw \'{b}\'.",c,f+l,":",i.charAt(l))}else s+=1;break;case "|":w=!1;break;case ")":j===0?p("Unescaped \'{a}\'.",c,f+l,")"):j-=1;break;case " ":for(r=1;i.charAt(l)===" ";)l+=1,r+=1;r>1&&p("Spaces are hard to count. Use {{a}}.",c,f+l,r);break;case "[":m=i.charAt(l);m==="^"&&(l+=1,h.regexp?p("Insecure \'{a}\'.",c,f+l,m):i.charAt(l)==="]"&&H("Unescaped \'{a}\'.",c,f+l,"^"));r=!1;m==="]"&&(p("Empty class.",c,f+l-1),r=!0);a:do switch(m=i.charAt(l),l+=1,m){case "[":case "^":p("Unescaped \'{a}\'.",\nc,f+l,m);r=!0;break;case "-":r?r=!1:(p("Unescaped \'{a}\'.",c,f+l,"-"),r=!0);break;case "]":r||p("Unescaped \'{a}\'.",c,f+l-1,"-");break a;case "\\\\":m=i.charAt(l);m<" "?p("Unexpected control character in regular expression.",c,f+l):m==="<"&&p("Unexpected escaped character \'{a}\' in regular expression.",c,f+l,m);l+=1;r=!0;break;case "/":p("Unescaped \'{a}\'.",c,f+l-1,"/");r=!0;break;case "<":q==="script"&&(m=i.charAt(l),(m==="!"||m==="/")&&p("HTML confusion in regular expression \'<{a}\'.",c,f+l,m));r=!0;break;\ndefault:r=!0}while(m);break;case ".":h.regexp&&p("Insecure \'{a}\'.",c,f+l,m);break;case "]":case "?":case "{":case "}":case "+":case "*":p("Unescaped \'{a}\'.",c,f+l,m);break;case "<":q==="script"&&(m=i.charAt(l),(m==="!"||m==="/")&&p("HTML confusion in regular expression \'<{a}\'.",c,f+l,m))}if(w)switch(i.charAt(l)){case "?":case "+":case "*":l+=1;i.charAt(l)==="?"&&(l+=1);break;case "{":l+=1;m=i.charAt(l);(m<"0"||m>"9")&&p("Expected a number and instead saw \'{a}\'.",c,f+l,m);l+=1;for(r=+m;;){m=i.charAt(l);\nif(m<"0"||m>"9")break;l+=1;r=+m+r*10}w=r;if(m===","&&(l+=1,w=Infinity,m=i.charAt(l),m>="0"&&m<="9")){l+=1;for(w=+m;;){m=i.charAt(l);if(m<"0"||m>"9")break;l+=1;w=+m+w*10}}i.charAt(l)!=="}"?p("Expected \'{a}\' and instead saw \'{b}\'.",c,f+l,"}",m):l+=1;i.charAt(l)==="?"&&(l+=1);r>w&&p("\'{a}\' should not be greater than \'{b}\'.",c,f+l,r,w)}}m=i.substr(0,l-1);b+=l;i=i.substr(l);return d("(regexp)",m)}return d("(punctuator)",s);case "<\\!--":l=c;for(m=b;;){j=i.indexOf("--");if(j>=0)break;j=i.indexOf("<!");j>=\n0&&H("Nested HTML comment.",c,b+j);a()||H("Unclosed HTML comment.",l,m)}l=i.indexOf("<!");l>=0&&l<j&&H("Nested HTML comment.",c,b+l);b+=j;i.charAt(j+2)!==">"&&H("Expected --\\>.",c,b);b+=3;i=i.slice(j+3);break;case "#":if(q==="html"||q==="styleproperty"){for(;;){m=i.charAt(0);if((m<"0"||m>"9")&&(m<"a"||m>"f")&&(m<"A"||m>"F"))break;b+=1;i=i.substr(1);s+=m}s.length!==4&&s.length!==7&&p("Bad hex color \'{a}\'.",c,f+l,s);return d("(color)",s)}return d("(punctuator)",s);default:if(q==="outer"&&m==="&"){b+=\n1;for(i=i.substr(1);;){m=i.charAt(0);b+=1;i=i.substr(1);if(m===";")break;m>="0"&&m<="9"||m>="a"&&m<="z"||m==="#"||H("Bad entity",c,f+l,b)}break}return d("(punctuator)",s)}}else{for(m=s="";i&&i<"!";)i=i.substr(1);if(i)if(q==="html")return d("(error)",i.charAt(0));else H("Unexpected \'{a}\'.",c,b,i.substr(0,1))}}}}}();Ya=[ea,function(){for(;;)if(a.identifier)switch(a.value.toLowerCase()){case "url":ea();break;case "expression":c("Unexpected expression \'{a}\'.",a,a.value);f();break;default:f()}else{if(a.id===\n";"||a.id==="!"||a.id==="(end)"||a.id==="}")return!0;f()}}];V="none,dashed,dotted,double,groove,hidden,inset,outset,ridge,solid".split(",");cb=["auto","always","avoid","left","right"];rb={all:!0,braille:!0,embossed:!0,handheld:!0,print:!0,projection:!0,screen:!0,speech:!0,tty:!0,tv:!0};Ga=["auto","hidden","scroll","visible"];Da={background:[!0,"background-attachment","background-color","background-image","background-position","background-repeat"],"background-attachment":["scroll","fixed"],"background-color":["transparent",\nU],"background-image":["none",ea],"background-position":[2,[v,"top","bottom","left","right","center"]],"background-repeat":["repeat","repeat-x","repeat-y","no-repeat"],border:[!0,"border-color","border-style","border-width"],"border-bottom":[!0,"border-bottom-color","border-bottom-style","border-bottom-width"],"border-bottom-color":U,"border-bottom-style":V,"border-bottom-width":ka,"border-collapse":["collapse","separate"],"border-color":["transparent",4,U],"border-left":[!0,"border-left-color","border-left-style",\n"border-left-width"],"border-left-color":U,"border-left-style":V,"border-left-width":ka,"border-right":[!0,"border-right-color","border-right-style","border-right-width"],"border-right-color":U,"border-right-style":V,"border-right-width":ka,"border-spacing":[2,v],"border-style":[4,V],"border-top":[!0,"border-top-color","border-top-style","border-top-width"],"border-top-color":U,"border-top-style":V,"border-top-width":ka,"border-width":[4,ka],bottom:[v,"auto"],"caption-side":["bottom","left","right",\n"top"],clear:["both","left","none","right"],clip:[function(){var e;if(a.identifier&&a.value==="rect"){f();f("(");for(e=0;e<4;e+=1)if(!v()){c("Expected a number and instead saw \'{a}\'.",a,a.value);break}f(")");return!0}return!1},"auto"],color:U,content:["open-quote","close-quote","no-open-quote","no-close-quote",Wa,ea,function(){if(a.identifier&&a.value==="counter")return f(),f("("),f(),a.id===","&&(N(),a.type!=="(string)"&&c("Expected a string and instead saw \'{a}\'.",a,a.value),f()),f(")"),!0;return a.identifier&&\na.value==="counters"?(f(),f("("),a.identifier||c("Expected a name and instead saw \'{a}\'.",a,a.value),f(),a.id===","&&(N(),a.type!=="(string)"&&c("Expected a string and instead saw \'{a}\'.",a,a.value),f()),a.id===","&&(N(),a.type!=="(string)"&&c("Expected a string and instead saw \'{a}\'.",a,a.value),f()),f(")"),!0):!1},function(){return a.identifier&&a.value==="attr"?(f(),f("("),a.identifier||c("Expected a name and instead saw \'{a}\'.",a,a.value),f(),f(")"),!0):!1}],"counter-increment":[Va,"none"],"counter-reset":[Va,\n"none"],cursor:[ea,"auto","crosshair","default","e-resize","help","move","n-resize","ne-resize","nw-resize","pointer","s-resize","se-resize","sw-resize","w-resize","text","wait"],direction:["ltr","rtl"],display:"block,compact,inline,inline-block,inline-table,list-item,marker,none,run-in,table,table-caption,table-cell,table-column,table-column-group,table-footer-group,table-header-group,table-row,table-row-group".split(","),"empty-cells":["show","hide"],"float":["left","none","right"],font:["caption",\n"icon","menu","message-box","small-caption","status-bar",!0,"font-size","font-style","font-weight","font-family"],"font-family":function(){for(;a.id!==";";){!Va()&&!Wa()&&c("Expected a name and instead saw \'{a}\'.",a,a.value);if(a.id!==",")return!0;N()}},"font-size":["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller",v],"font-size-adjust":["none",Ca],"font-stretch":"normal,wider,narrower,ultra-condensed,extra-condensed,condensed,semi-condensed,semi-expanded,expanded,extra-expanded".split(","),\n"font-style":["normal","italic","oblique"],"font-variant":["normal","small-caps"],"font-weight":["normal","bold","bolder","lighter",Ca],height:[v,"auto"],left:[v,"auto"],"letter-spacing":["normal",v],"line-height":["normal",function(){a.id==="-"&&(f("-"),x());return a.type==="(number)"?(f(),a.type!=="(string)"&&mb[a.value]===!0&&(x(),f()),!0):!1}],"list-style":[!0,"list-style-image","list-style-position","list-style-type"],"list-style-image":["none",ea],"list-style-position":["inside","outside"],\n"list-style-type":"circle,disc,square,decimal,decimal-leading-zero,lower-roman,upper-roman,lower-greek,lower-alpha,lower-latin,upper-alpha,upper-latin,hebrew,katakana,hiragana-iroha,katakana-oroha,none".split(","),margin:[4,ra],"margin-bottom":ra,"margin-left":ra,"margin-right":ra,"margin-top":ra,"marker-offset":[v,"auto"],"max-height":[v,"none"],"max-width":[v,"none"],"min-height":v,"min-width":v,opacity:Ca,outline:[!0,"outline-color","outline-style","outline-width"],"outline-color":["invert",U],\n"outline-style":"dashed,dotted,double,groove,inset,none,outset,ridge,solid".split(","),"outline-width":ka,overflow:Ga,"overflow-x":Ga,"overflow-y":Ga,padding:[4,v],"padding-bottom":v,"padding-left":v,"padding-right":v,"padding-top":v,"page-break-after":cb,"page-break-before":cb,position:["absolute","fixed","relative","static"],quotes:[8,Wa],right:[v,"auto"],"table-layout":["auto","fixed"],"text-align":["center","justify","left","right"],"text-decoration":["none","underline","overline","line-through",\n"blink"],"text-indent":v,"text-shadow":["none",4,[U,v]],"text-transform":["capitalize","uppercase","lowercase","none"],top:[v,"auto"],"unicode-bidi":["normal","embed","bidi-override"],"vertical-align":["baseline","bottom","sub","super","top","text-top","middle","text-bottom",v],visibility:["visible","hidden","collapse"],"white-space":"normal,nowrap,pre,pre-line,pre-wrap,inherit".split(","),width:[v,"auto"],"word-spacing":["normal",v],"word-wrap":["break-word","normal"],"z-index":["auto",Ca]};xa("(number)",\nfunction(){return this});xa("(string)",function(){return this});J["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var a=this.value,d=B[a],b;typeof d==="function"?d=void 0:typeof d==="boolean"&&(b=o,o=ta[0],ba(a,"var"),d=o,o=b);if(o===d)switch(o[a]){case "unused":o[a]="var";break;case "unction":o[a]="function";this["function"]=!0;break;case "function":this["function"]=!0;break;case "label":c("\'{a}\' is a statement label.",g,a)}else if(o["(global)"])h.undef&&A[a]!=="boolean"&&\nc("\'{a}\' is not defined.",g,a),Ua(g);else switch(o[a]){case "closure":case "function":case "var":case "unused":c("\'{a}\' used out of scope.",g,a);break;case "label":c("\'{a}\' is a statement label.",g,a);break;case "outer":case "global":break;default:if(d===!0)o[a]=!0;else if(d===null)c("\'{a}\' is not allowed.",g,a),Ua(g);else if(typeof d!=="object")h.undef?c("\'{a}\' is not defined.",g,a):o[a]=!0,Ua(g);else switch(d[a]){case "function":case "unction":this["function"]=!0;d[a]="closure";o[a]=d["(global)"]?\n"global":"outer";break;case "var":case "unused":d[a]="closure";o[a]=d["(global)"]?"global":"outer";break;case "closure":case "parameter":o[a]=d["(global)"]?"global":"outer";break;case "label":c("\'{a}\' is a statement label.",g,a)}}return this},led:function(){k("Expected an operator and instead saw \'{a}\'.",a,a.value)}};xa("(regexp)",function(){return this});z("(endline)");z("(begin)");z("(end)").reach=!0;z("</").reach=!0;z("<!");z("<\\!--");z("--\\>");z("(error)").reach=!0;z("}").reach=!0;z(")");z("]");\nz(\'"\').reach=!0;z("\'").reach=!0;z(";");z(":").reach=!0;z(",");z("#");z("@");t("else");t("case").reach=!0;t("catch");t("default").reach=!0;t("finally");T("arguments",function(a){Aa&&o["(global)"]?c("Strict violation.",a):h.safe&&c("ADsafe violation.",a)});T("eval",function(a){h.safe&&c("ADsafe violation.",a)});T("false");T("Infinity");T("NaN");T("null");T("this",function(a){Aa&&(o["(statement)"]&&o["(name)"].charAt(0)>"Z"||o["(global)"])?c("Strict violation.",a):h.safe&&c("ADsafe violation.",a)});\nT("true");T("undefined");ga("=","assign",20);ga("+=","assignadd",20);ga("-=","assignsub",20);ga("*=","assignmult",20);ga("/=","assigndiv",20).nud=function(){k("A regular expression literal can be confused with \'/=\'.")};ga("%=","assignmod",20);ia("&=","assignbitand",20);ia("|=","assignbitor",20);ia("^=","assignbitxor",20);ia("<<=","assignshiftleft",20);ia(">>=","assignshiftright",20);ia(">>>=","assignshiftrightunsigned",20);G("?",function(a,d){d.left=a;d.right=j(10);f(":");d["else"]=j(10);return d},\n30);G("||","or",40);G("&&","and",50);ha("|","bitor",70);ha("^","bitxor",80);ha("&","bitand",90);aa("==",function(a,d){h.eqeqeq?c("Expected \'{a}\' and instead saw \'{b}\'.",this,"===","=="):ya(a)?c("Use \'{a}\' to compare with \'{b}\'.",this,"===",a.value):ya(d)&&c("Use \'{a}\' to compare with \'{b}\'.",this,"===",d.value);return this});aa("===");aa("!=",function(a,d){h.eqeqeq?c("Expected \'{a}\' and instead saw \'{b}\'.",this,"!==","!="):ya(a)?c("Use \'{a}\' to compare with \'{b}\'.",this,"!==",a.value):ya(d)&&c("Use \'{a}\' to compare with \'{b}\'.",\nthis,"!==",d.value);return this});aa("!==");aa("<");aa(">");aa("<=");aa(">=");ha("<<","shiftleft",120);ha(">>","shiftright",120);ha(">>>","shiftrightunsigned",120);G("in","in",120);G("instanceof","instanceof",120);G("+",function(a,d){var b=j(130);if(a&&b&&a.id==="(string)"&&b.id==="(string)")return a.value+=b.value,a.character=b.character,Ta.test(a.value)&&c("JavaScript URL.",a),a;d.left=a;d.right=b;return d},130);K("+","num");K("+++",function(){c("Confusing pluses.");this.right=j(150);this.arity=\n"unary";return this});G("+++",function(a){c("Confusing pluses.");this.left=a;this.right=j(130);return this},130);G("-","sub",130);K("-","neg");K("---",function(){c("Confusing minuses.");this.right=j(150);this.arity="unary";return this});G("---",function(a){c("Confusing minuses.");this.left=a;this.right=j(130);return this},130);G("*","mult",140);G("/","div",140);G("%","mod",140);kb("++","postinc");K("++","preinc");J["++"].exps=!0;kb("--","postdec");K("--","predec");J["--"].exps=!0;K("delete",function(){var a=\nj(0);(!a||a.id!=="."&&a.id!=="[")&&c("Variables should not be deleted.");this.first=a;return this}).exps=!0;K("~",function(){h.bitwise&&c("Unexpected \'{a}\'.",this,"~");j(150);return this});K("!",function(){this.right=j(150);this.arity="unary";Bb[this.right.id]===!0&&c("Confusing use of \'{a}\'.",this,"!");return this});K("typeof","typeof");K("new",function(){var e=j(155),d;if(e&&e.id!=="function")if(e.identifier)switch(e["new"]=!0,e.value){case "Object":c("Use the object literal notation {}.",g);break;\ncase "Array":return a.id!=="("?c("Use the array literal notation [].",g):(f("("),a.id===")"?c("Use the array literal notation [].",g):(d=j(0),e.dimension=d,(d.id==="(number)"&&/[.+\\-Ee]/.test(d.value)||d.id==="-"&&!d.right||d.id==="(string)"||d.id==="["||d.id==="{"||d.id==="true"||d.id==="false"||d.id==="null"||d.id==="undefined"||d.id==="Infinity")&&c("Use the array literal notation [].",g),a.id!==")"&&k("Use the array literal notation [].",g)),f(")")),this.first=e,this;case "Number":case "String":case "Boolean":case "Math":case "JSON":c("Do not use {a} as a constructor.",\ng,e.value);break;case "Function":h.evil||c("The Function constructor is eval.");break;case "Date":case "RegExp":break;default:e.id!=="function"&&(d=e.value.substr(0,1),h.newcap&&(d<"A"||d>"Z")&&c("A constructor name should start with an uppercase letter.",g))}else e.id!=="."&&e.id!=="["&&e.id!=="("&&c("Bad constructor.",g);else c("Weird construction. Delete \'new\'.",this);x(g,a);a.id!=="("&&c("Missing \'()\' invoking a constructor.");this.first=e;return this});J["new"].exps=!0;G(".",function(e,d){x(D,\ng);Na();var b=oa();typeof b==="string"&&Ba(b);d.left=e;d.right=b;e&&e.value==="arguments"&&(b==="callee"||b==="caller")?c("Avoid arguments.{a}.",e,b):!h.evil&&e&&e.value==="document"&&(b==="write"||b==="writeln")?c("document.write can be a form of eval.",e):h.adsafe&&e&&e.value==="ADSAFE"&&(b==="id"||b==="lib"?c("ADsafe violation.",d):b==="go"&&(q!=="script"?c("ADsafe violation.",d):(ua||a.id!=="("||I(0).id!=="(string)"||I(0).value!==O||I(1).id!==",")&&k("ADsafe violation: go.",d),ua=!0,ja=!1));if(!h.evil&&\n(b==="eval"||b==="execScript"))c("eval is evil.");else if(h.safe)for(;;){Qa[b]===!0&&c("ADsafe restricted word \'{a}\'.",g,b);if(typeof A[e.value]!=="boolean"||a.id==="(")break;if(Eb[b]===!0){a.id==="."&&c("ADsafe violation.",d);break}if(a.id!=="."){c("ADsafe violation.",d);break}f(".");g.left=d;g.right=b;d=g;b=oa();typeof b==="string"&&Ba(b)}return d},160,!0);G("(",function(e,d){D.id!=="}"&&D.id!==")"&&Na(D,g);E();h.immed&&!e.immed&&e.id==="function"&&c("Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.");\nvar b=0,n=[];e&&(e.type==="(identifier)"?e.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&e.value!=="Number"&&e.value!=="String"&&e.value!=="Boolean"&&e.value!=="Date"&&(e.value==="Math"?c("Math is not a function.",e):h.newcap&&c("Missing \'new\' prefix when invoking a constructor.",e)):e.id==="."&&h.safe&&e.left.value==="Math"&&e.right==="random"&&c("ADsafe violation.",e));if(a.id!==")")for(;;){n[n.length]=j(10);b+=1;if(a.id!==",")break;N()}f(")");E(D,g);typeof e==="object"&&(e.value==="parseInt"&&\nb===1&&c("Missing radix parameter.",e),h.evil||(e.value==="eval"||e.value==="Function"||e.value==="execScript"?c("eval is evil.",e):n[0]&&n[0].id==="(string)"&&(e.value==="setTimeout"||e.value==="setInterval")&&c("Implied eval is evil. Pass a function instead of a string.",e)),!e.identifier&&e.id!=="."&&e.id!=="["&&e.id!=="("&&e.id!=="&&"&&e.id!=="||"&&e.id!=="?"&&c("Bad invocation.",e));d.left=e;return d},155,!0).exps=!0;K("(",function(){E();if(a.id==="function")a.immed=!0;var e=j(0);f(")",this);\nE(D,g);h.immed&&e.id==="function"&&(a.id==="("?c("Move the invocation into the parens that contain the function.",a):c("Do not wrap function literals in parens unless they are to be immediately invoked.",this));return e});G("[",function(a,d){Na(D,g);E();var b=j(0),n;b&&b.type==="(string)"?(h.safe&&Qa[b.value]===!0?c("ADsafe restricted word \'{a}\'.",d,b.value):!h.evil&&(b.value==="eval"||b.value==="execScript")?c("eval is evil.",d):h.safe&&(b.value.charAt(0)==="_"||b.value.charAt(0)==="-")&&c("ADsafe restricted subscript \'{a}\'.",\nd,b.value),Ba(b.value),!h.sub&&tb.test(b.value)&&(n=J[b.value],(!n||!n.reserved)&&c("[\'{a}\'] is better written in dot notation.",b,b.value))):(!b||b.type!=="(number)"||b.value<0)&&h.safe&&c("ADsafe subscripting.");f("]",d);E(D,g);d.left=a;d.right=b;return d},160,!0);K("[",function(){var e=g.line!==a.line;this.first=[];e&&(C+=h.indent,a.from===C+h.indent&&(C+=h.indent));for(;a.id!=="(end)";){for(;a.id===",";)c("Extra comma."),f(",");if(a.id==="]")break;e&&g.line!==a.line&&Q();this.first.push(j(10));\nif(a.id===","){if(N(),a.id==="]"&&!h.es5){c("Extra comma.",g);break}}else break}e&&(C-=h.indent,Q());f("]",this);return this},160);(function(e){e.nud=function(){var e,b,n,M,i={};if(e=g.line!==a.line)C+=h.indent,a.from===C+h.indent&&(C+=h.indent);for(;;){if(a.id==="}")break;e&&Q();if(a.value==="get"&&I().id!==":")f("get"),h.es5||k("get/set are ES5 features."),(n=ab())||k("Missing property name."),M=a,x(g,a),b=Ea(n),o["(loopage)"]&&c("Don\'t make functions within a loop.",M),(b=b["(params)"])&&c("Unexpected parameter \'{a}\' in get {b} function.",\nM,b[0],n),x(g,a),f(","),Q(),f("set"),M=ab(),n!==M&&k("Expected {a} and instead saw {b}.",g,n,M),M=a,x(g,a),b=Ea(n),b=b["(params)"],(!b||b.length!==1||b[0]!=="value")&&c("Expected (value) in set {a} function.",M,n);else{n=ab();if(typeof n!=="string")break;f(":");y(g,a);j(10)}i[n]===!0&&c("Duplicate member \'{a}\'.",a,n);i[n]=!0;Ba(n);if(a.id===",")N(),a.id===","?c("Extra comma.",g):a.id==="}"&&!h.es5&&c("Extra comma.",g);else break}e&&(C-=h.indent,Q());f("}",this);return this};e.fud=function(){k("Expected to see a statement and instead saw a block.",\ng)}})(z("{"));var gb=function(e){var d,b;o["(onevar)"]&&h.onevar?c("Too many var statements."):o["(global)"]||(o["(onevar)"]=!0);for(this.first=[];;){y(g,a);d=oa();o["(global)"]&&A[d]===!1&&c("Redefinition of \'{a}\'.",g,d);ba(d,"unused");if(e)break;b=g;this.first.push(g);if(a.id==="=")y(g,a),f("="),y(g,a),a.id==="undefined"&&c("It is not necessary to initialize \'{a}\' to \'undefined\'.",g,d),I(0).id==="="&&a.identifier&&(f(),f("="),f()),d=j(0),b.first=d;if(a.id!==",")break;N()}return this};$("var",gb).exps=\n!0;fa("function",function(){qa&&c("Function statements cannot be placed in blocks. Use a function expression or move the statement to the top of the outer function.",g);var e=oa();x(g,a);ba(e,"unction");Ea(e,!0);a.id==="("&&a.line===g.line&&k("Function statements are not invocable. Wrap the whole function invocation in parens.");return this});K("function",function(){var e=Pa();e?x(g,a):y(g,a);Ea(e);o["(loopage)"]&&c("Don\'t make functions within a loop.");return this});fa("if",function(){var e=a;f("(");\ny(this,e);E();j(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),f("="),j(20));f(")",e);E(D,g);R(!0);a.id==="else"&&(y(g,a),f("else"),a.id==="if"||a.id==="switch"?Sa(!0):R(!0));return this});fa("try",function(){var e,d;h.adsafe&&c("ADsafe try violation.",this);R(!1);if(a.id==="catch")f("catch"),y(g,a),f("("),d=B,B=Object.create(d),e=a.value,a.type!=="(identifier)"?c("Expected an identifier and instead saw \'{a}\'.",a,e):ba(e,"exception"),f(),f(")"),R(!1),e=!0,B=\nd;if(a.id==="finally")f("finally"),R(!1);else return e||k("Expected \'{a}\' and instead saw \'{b}\'.",a,"catch",a.value),this});fa("while",function(){var e=a;o["(breakage)"]+=1;o["(loopage)"]+=1;f("(");y(this,e);E();j(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),f("="),j(20));f(")",e);E(D,g);R(!0);o["(breakage)"]-=1;o["(loopage)"]-=1;return this}).labelled=!0;t("with");fa("switch",function(){var e=a,d=!1;o["(breakage)"]+=1;f("(");y(this,e);E();this.condition=\nj(20);f(")",e);E(D,g);y(g,a);e=a;f("{");y(g,a);C+=h.indent;for(this.cases=[];;)switch(a.id){case "case":switch(o["(verb)"]){case "break":case "case":case "continue":case "return":case "switch":case "throw":break;default:c("Expected a \'break\' statement before \'case\'.",g)}Q(-h.indent);f("case");this.cases.push(j(20));d=!0;f(":");o["(verb)"]="case";break;case "default":switch(o["(verb)"]){case "break":case "continue":case "return":case "throw":break;default:c("Expected a \'break\' statement before \'default\'.",\ng)}Q(-h.indent);f("default");d=!0;f(":");break;case "}":C-=h.indent;Q();f("}",e);(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false")&&c("This \'switch\' should be an \'if\'.",this);o["(breakage)"]-=1;o["(verb)"]=void 0;return;case "(end)":k("Missing \'{a}\'.",a,"}");return;default:if(d)switch(g.id){case ",":k("Each value should have its own case label.");return;case ":":pa();break;default:k("Missing \':\' on a case clause.",g)}else k("Expected \'{a}\' and instead saw \'{b}\'.",a,\n"case",a.value)}}).labelled=!0;$("debugger",function(){h.debug||c("All \'debugger\' statements should be removed.");return this}).exps=!0;(function(){var e=$("do",function(){o["(breakage)"]+=1;o["(loopage)"]+=1;this.first=R(!0);f("while");var e=a;y(g,e);f("(");E();j(20);a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),f("="),j(20));f(")",e);E(D,g);o["(breakage)"]-=1;o["(loopage)"]-=1;return this});e.labelled=!0;e.exps=!0})();fa("for",function(){var e=h.forin,d;d=a;\no["(breakage)"]+=1;o["(loopage)"]+=1;f("(");y(this,d);E();if(I(a.id==="var"?1:0).id==="in"){if(a.id==="var")f("var"),gb(!0);else{switch(o[a.value]){case "unused":o[a.value]="var";break;case "var":break;default:c("Bad for in variable \'{a}\'.",a,a.value)}f()}f("in");j(20);f(")",d);d=R(!0);!e&&(d.length>1||typeof d[0]!=="object"||d[0].value!=="if")&&c("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this)}else{if(a.id!==";")if(a.id==="var")f("var"),\ngb();else for(;;){j(0,"for");if(a.id!==",")break;N()}Y(g);f(";");a.id!==";"&&(j(20),a.id==="="&&(c("Expected a conditional expression and instead saw an assignment."),f("="),j(20)));Y(g);f(";");a.id===";"&&k("Expected \'{a}\' and instead saw \'{b}\'.",a,")",";");if(a.id!==")")for(;;){j(0,"for");if(a.id!==",")break;N()}f(")",d);E(D,g);R(!0)}o["(breakage)"]-=1;o["(loopage)"]-=1;return this}).labelled=!0;$("break",function(){var e=a.value;o["(breakage)"]===0&&c("Unexpected \'{a}\'.",a,this.value);Y(this);\nif(a.id!==";"&&g.line===a.line)o[e]!=="label"?c("\'{a}\' is not a statement label.",a,e):B[e]!==o&&c("\'{a}\' is out of scope.",a,e),this.first=a,f();za("break");return this}).exps=!0;$("continue",function(){var e=a.value;o["(breakage)"]===0&&c("Unexpected \'{a}\'.",a,this.value);Y(this);if(a.id!==";"){if(g.line===a.line)o[e]!=="label"?c("\'{a}\' is not a statement label.",a,e):B[e]!==o&&c("\'{a}\' is out of scope.",a,e),this.first=a,f()}else o["(loopage)"]||c("Unexpected \'{a}\'.",a,this.value);za("continue");\nreturn this}).exps=!0;$("return",function(){Y(this);a.id==="(regexp)"&&c("Wrap the /regexp/ literal in parens to disambiguate the slash operator.");if(a.id!==";"&&!a.reach)y(g,a),this.first=j(20);za("return");return this}).exps=!0;$("throw",function(){Y(this);y(g,a);this.first=j(20);za("throw");return this}).exps=!0;t("void");t("class");t("const");t("enum");t("export");t("extends");t("import");t("super");t("let");t("yield");t("implements");t("interface");t("package");t("private");t("protected");t("public");\nt("static");var W=function(e,d){var b,n;JSLINT.errors=[];A=Object.create(Db);if(d){b=d.predef;if(b instanceof Array)for(n=0;n<b.length;n+=1)A[b[n]]=!0;if(d.adsafe)d.safe=!0;if(d.safe)d.browser=d.css=d.debug=d.devel=d.evil=d.forin=d.on=d.rhino=d.windows=d.sub=d.widget=!1,d.eqeqeq=d.nomen=d.safe=d.strict=d.undef=!0,A.Date=A.eval=A.Function=A.Object=null,A.ADSAFE=A.lib=!1;h=d}else h={};h.indent=h.indent||4;h.maxerr=h.maxerr||50;O="";ua=ja=!1;Fa={};if(h.approved)for(n=0;n<h.approved.length;n+=1)Fa[h.approved[n]]=\nh.approved[n];else Fa.test="test";eb="";for(n=0;n<h.indent;n+=1)eb+=" ";C=1;B=ib=Object.create(A);o={"(global)":!0,"(name)":"(global)","(scope)":B,"(breakage)":0,"(loopage)":0};ta=[o];Ha={};sa=[];q=Ia=!1;F=null;da={};ca=null;X={};qa=!1;wa=[];la=!1;La=0;S.init(e);db=!0;Aa=!1;D=g=a=J["(begin)"];Ja();try{f();if(a.value.charAt(0)==="<"){a:{var j,i,u,p,w,m,s,v=h.white,l;q="html";L="";for(F=null;;){switch(a.value){case "<":q="html";f("<");i={};m=a;m.identifier||c("Bad identifier {a}.",m,m.value);p=m.value;\nh.cap&&(p=p.toLowerCase());m.name=p;f();if(!F)F=[],b=p,b!=="html"&&!h.fragment&&(b==="div"&&h.adsafe?k("ADSAFE: Use the fragment option."):k("Expected \'{a}\' and instead saw \'{b}\'.",g,"html",b)),h.adsafe&&(b==="html"&&k("Currently, ADsafe does not operate on whole HTML documents. It operates on <div> fragments and .js files.",g),h.fragment?b!=="div"&&k("ADsafe violation: Wrap the widget in a div.",g):k("Use the fragment option.",g)),h.browser=!0,Ja();s=$a[p];typeof s!=="object"&&k("Unrecognized tag \'<{a}>\'.",\nm,p);u=s.empty;for(m.type=p;;){if(a.id==="/"){f("/");a.id!==">"&&c("Expected \'{a}\' and instead saw \'{b}\'.",a,">",a.value);break}if(a.id&&a.id.substr(0,1)===">")break;a.identifier||((a.id==="(end)"||a.id==="(error)")&&k("Missing \'>\'.",a),c("Bad identifier."));h.white=!0;y(g,a);j=a.value;h.white=v;f();!h.cap&&j!==j.toLowerCase()&&c("Attribute \'{a}\' not all lower case.",a,j);j=j.toLowerCase();L="";P(i,j)&&c("Attribute \'{a}\' repeated.",a,j);j.slice(0,2)==="on"?(h.on||c("Avoid HTML event handlers."),q=\n"scriptstring",f("="),w=a.id,w!==\'"\'&&w!=="\'"&&k("Missing quote."),L=w,l=h.white,h.white=!1,f(w),pa("on"),h.white=l,a.id!==w&&k("Missing close quote on script attribute."),q="html",L="",f(w),s=!1):j==="style"?(q="scriptstring",f("="),w=a.id,w!==\'"\'&&w!=="\'"&&k("Missing quote."),q="styleproperty",L=w,f(w),ob(),q="html",L="",f(w),s=!1):a.id==="="?(f("="),s=a.value,!a.identifier&&a.id!==\'"\'&&a.id!=="\'"&&a.type!=="(string)"&&a.type!=="(number)"&&a.type!=="(color)"&&c("Expected an attribute value and instead saw \'{a}\'.",\ng,j),f()):s=!0;i[j]=s;b=j;n=s;var r=void 0,t=void 0;b==="id"?(r=typeof n==="string"?n.toUpperCase():"",Ha[r]===!0&&c("Duplicate id=\'{a}\'.",a,n),/^[A-Za-z][A-Za-z0-9._:\\-]*$/.test(n)?h.adsafe&&(O?n.slice(0,O.length)!==O?c("ADsafe violation: An id must have a \'{a}\' prefix",a,O):/^[A-Z]+_[A-Z]+$/.test(n)||c("ADSAFE violation: bad id."):(O=n,/^[A-Z]+_$/.test(n)||c("ADSAFE violation: bad id."))):c("Bad id: \'{a}\'.",a,n),t=n.search(Mb),t>=0&&c("Unexpected character \'{a}\' in {b}.",g,n.charAt(t),b),Ha[r]=\n!0):b==="class"||b==="type"||b==="name"?(t=n.search(Lb),t>=0&&c("Unexpected character \'{a}\' in {b}.",g,n.charAt(t),b),Ha[r]=!0):b==="href"||b==="background"||b==="content"||b==="data"||b.indexOf("src")>=0||b.indexOf("url")>=0?(h.safe&&nb.test(n)&&k("ADsafe URL violation."),sa.push(n)):b==="for"?h.adsafe&&(O?n.slice(0,O.length)!==O?c("ADsafe violation: An id must have a \'{a}\' prefix",a,O):/^[A-Z]+_[A-Z]+$/.test(n)||c("ADSAFE violation: bad id."):c("ADSAFE violation: bad id.")):b==="name"&&h.adsafe&&\nn.indexOf("_")>=0&&c("ADsafe name violation.")}b=p;n=i;var r=void 0,z=$a[b],t=void 0;Ia=!1;z||k("Unrecognized tag \'<{a}>\'.",a,b===b.toLowerCase()?b:b+" (capitalization error)");if(F.length>0)if(b==="html"&&k("Too many <html> tags.",g),t=z.parent)t.indexOf(" "+F[F.length-1].name+" ")<0&&k("A \'<{a}>\' must be within \'<{b}>\'.",g,b,t);else if(!h.adsafe&&!h.fragment){r=F.length;do r<=0&&k("A \'<{a}>\' must be within \'<{b}>\'.",g,b,"body"),r-=1;while(F[r].name!=="body")}switch(b){case "div":h.adsafe&&F.length===\n1&&!O&&c("ADSAFE violation: missing ID_.");break;case "script":q="script";f(">");C=a.from;n.lang&&c("lang is deprecated.",g);h.adsafe&&F.length!==1&&c("ADsafe script placement violation.",g);n.src?(h.adsafe&&(!ja||!Fa[n.src])&&c("ADsafe unapproved script source.",g),n.type&&c("type is unnecessary.",g)):(ua&&k("ADsafe script violation.",g),pa("script"));q="html";f("</");!a.identifier&&a.value!=="script"&&c("Expected \'{a}\' and instead saw \'{b}\'.",a,"script",a.value);f();q="outer";break;case "style":q=\n"style";f(">");qb();q="html";f("</");!a.identifier&&a.value!=="style"&&c("Expected \'{a}\' and instead saw \'{b}\'.",a,"style",a.value);f();q="outer";break;case "input":switch(n.type){case "radio":case "checkbox":case "button":case "reset":case "submit":break;case "text":case "file":case "password":case "file":case "hidden":case "image":h.adsafe&&n.autocomplete!=="off"&&c("ADsafe autocomplete violation.");break;default:c("Bad input type.")}break;case "applet":case "body":case "embed":case "frame":case "frameset":case "head":case "iframe":case "noembed":case "noframes":case "object":case "param":h.adsafe&&\nc("ADsafe violation: Disallowed tag: "+b)}u||F.push(m);q="outer";f(">");break;case "</":q="html";f("</");a.identifier||c("Bad identifier.");p=a.value;h.cap&&(p=p.toLowerCase());f();F||k("Unexpected \'{a}\'.",a,"</"+p+">");(m=F.pop())||k("Unexpected \'{a}\'.",a,"</"+p+">");m.name!==p&&k("Expected \'{a}\' and instead saw \'{b}\'.",a,"</"+m.name+">","</"+p+">");a.id!==">"&&k("Missing \'{a}\'.",a,">");q="outer";f(">");break;case "<!":h.safe&&c("ADsafe HTML violation.");for(q="html";;){f();if(a.id===">"||a.id===\n"(end)")break;a.value.indexOf("--")>=0&&k("Unexpected --.");a.value.indexOf("<")>=0&&k("Unexpected <.");a.value.indexOf(">")>=0&&k("Unexpected >.")}q="outer";f(">");break;case "(end)":break a;default:a.id==="(end)"?k("Missing \'{a}\'.",a,"</"+F[F.length-1].value+">"):f()}if(F&&F.length===0&&(h.adsafe||!h.fragment||a.id==="(end)"))break}a.id!=="(end)"&&k("Unexpected material after the end.")}h.adsafe&&!ua&&c("ADsafe violation: Missing ADSAFE.go.",this)}else switch(a.id){case "{":case "[":la=h.laxbreak=\n!0;bb();break;case "@":case "*":case "#":case ".":case ":":q="style";f();(g.id!=="@"||!a.identifier||a.value!=="charset"||g.line!==1||g.from!==1)&&k("A css file should begin with @charset \'UTF-8\';");f();a.type!=="(string)"&&a.value!=="UTF-8"&&k("A css file should begin with @charset \'UTF-8\';");f();f(";");qb();break;default:h.adsafe&&h.fragment&&k("Expected \'{a}\' and instead saw \'{b}\'.",a,"<div>",a.value),pa("lib")}f("(end)")}catch(x){x&&JSLINT.errors.push({reason:x.message,line:x.line||a.line,character:x.character||\na.from},null)}return JSLINT.errors.length===0};W.data=function(){var a={functions:[]},d;d=[];var b,c,f,g,h=[];if(W.errors.length)a.errors=W.errors;if(la)a.json=!0;for(g in X)P(X,g)&&d.push({name:g,line:X[g]});if(d.length>0)a.implieds=d;if(sa.length>0)a.urls=sa;d=sb(B);if(d.length>0)a.globals=d;for(c=1;c<ta.length;c+=1){b=ta[c];d={};for(f=0;f<va.length;f+=1)d[va[f]]=[];for(g in b)P(b,g)&&g.charAt(0)!=="("&&(f=b[g],f==="unction"&&(f="unused"),Object.prototype.toString.apply(d[f])==="[object Array]"&&\n(d[f].push(g),f==="unused"&&h.push({name:g,line:b["(line)"],"function":b["(name)"]})));for(f=0;f<va.length;f+=1)d[va[f]].length===0&&delete d[va[f]];d.name=b["(name)"];d.param=b["(params)"];d.line=b["(line)"];d.last=b["(last)"];a.functions.push(d)}if(h.length>0)a.unused=h;for(g in da)if(typeof da[g]==="number"){a.member=da;break}return a};W.report=function(a){function d(a,b){var d,c,e;if(b){j.push("<div><i>"+a+"</i> ");b=b.sort();for(c=0;c<b.length;c+=1)b[c]!==e&&(e=b[c],j.push((d?", ":"")+e),d=!0);\nj.push("</div>")}}var b=W.data(),c=[],f,g,h;f="";var k,j=[];if(b.errors||b.implieds||b.unused){g=!0;j.push("<div id=errors><i>Error:</i>");if(b.errors)for(h=0;h<b.errors.length;h+=1)if(c=b.errors[h])f=c.evidence||"",j.push("<p>Problem"+(isFinite(c.line)?" at line "+c.line+" character "+c.character:"")+": "+c.reason.entityify()+"</p><p class=evidence>"+(f&&(f.length>80?f.slice(0,77)+"...":f).entityify())+"</p>");if(b.implieds){c=[];for(h=0;h<b.implieds.length;h+=1)c[h]="<code>"+b.implieds[h].name+\n"</code> <i>"+b.implieds[h].line+"</i>";j.push("<p><i>Implied global:</i> "+c.join(", ")+"</p>")}if(b.unused){c=[];for(h=0;h<b.unused.length;h+=1)c[h]="<code><u>"+b.unused[h].name+"</u></code> <i>"+b.unused[h].line+"</i> <code>"+b.unused[h]["function"]+"</code>";j.push("<p><i>Unused variable:</i> "+c.join(", ")+"</p>")}b.json&&j.push("<p>JSON: bad.</p>");j.push("</div>")}if(!a){j.push("<br><div id=functions>");b.urls&&d("URLs<br>",b.urls,"<br>");q==="style"?j.push("<p>CSS.</p>"):b.json&&\n!g?j.push("<p>JSON: good.</p>"):b.globals?j.push("<div><i>Global</i> "+b.globals.sort().join(", ")+"</div>"):j.push("<div><i>No new global variables introduced.</i></div>");for(h=0;h<b.functions.length;h+=1)a=b.functions[h],j.push("<br><div class=function><i>"+a.line+"-"+a.last+"</i> "+(a.name||"")+"("+(a.param?a.param.join(", "):"")+")</div>"),d("<big><b>Unused</b></big>",a.unused),d("Closure",a.closure),d("Variable",a["var"]),d("Exception",a.exception),d("Outer",a.outer),d("Global",a.global),d("Label",\na.label);if(b.member){c=sb(b.member);if(c.length){c=c.sort();f="<br><pre id=members>/*members ";g=10;for(h=0;h<c.length;h+=1)a=c[h],k=a.name(),g+k.length>72&&(j.push(f+"<br>"),f=" ",g=1),g+=k.length+2,b.member[a]===1&&(k="<i>"+k+"</i>"),h<c.length-1&&(k+=", "),f+=k;j.push(f+"<br>*/</pre>")}j.push("</div>")}}return j.join("")};W.jslint=W;W.edition="2010-11-18";return W}();\n',
friendlyPath:"util.jslint",pre:!0},"../../packages/util/setProperty.js":{path:"../../packages/util/setProperty.js",directory:"../../packages/util/",filename:"setProperty.js",src:'function createGetter(b,c){return function(){return this[c]}}function createSetter(b,c,a,e){e!==void 0&&(b[c]=e);return typeof a=="function"?function(b){if(this[c]!==b){var d=this[c];this[c]=b;a.call(this,c,b,d)}}:typeof a=="string"?function(b){if(this[c]!==b){var d=this[c];this[c]=b;this[a](c,b,d)}}:function(a){this[c]=a}}\nexports=function(b,c,a){if(!a.get&&!a.set&&!a.cb&&"value"in a)b[c]=a.value;else{if(!a.get)a.get=createGetter(b,"_"+c);if(!a.set)a.set=createSetter(b,"_"+c,a.cb,a.value);delete a.value;Object.defineProperty?Object.defineProperty(b,c,a):b.__defineSetter__?(b.__defineSetter__(c,a.set),b.__defineGetter__(c,a.get)):b.name=a.value}};\n',
friendlyPath:"util.setProperty",pre:!0},"../../packages/util/syntax.js":{path:"../../packages/util/syntax.js",directory:"../../packages/util/",filename:"syntax.js",src:'jsio("import .jslint");var isBrowser=jsio.__env.name=="browser",isRhino=jsio.__env.name=="rhino",base=jsio("base"),globals=["exports","jsio","logger"],i;for(i in base)globals.push(i);exports=function(d,b){b=b||exports.defaultOpts;!jslint(d,b)&&b.display&&exports.display(jslint.errors);return jslint.errors};\nexports.display=function(d,b){for(var e=[b||""],c=[\'<div class="_jsioLint_title">\'+(b||"")+"</div>"],f=0,a;a=d[f];++f)e.push(a.line+"-"+a.character+": "+a.reason+"\\n> "+a.evidence),c.push(\'<span class="_jsioLint_lineNum">line \'+a.line+"</span>"),c.push(": "),c.push(\'<span class="_jsioLint_reason">\'+a.reason+"</span>"),"evidence"in a&&(c.push(\'<div class="_jsioLint_evidence">\'+a.evidence.replace(/ /g,\'<span class="_jsioLint_whitespace">\\u00b7</span>\').replace(/\\t/g,\'<span class="_jsioLint_whitespace">\\u21fe </span>\')+\n"</div>"),c.push(Array(a.character).join(" ")+\'\\u21d1<span class="_jsioLint_charNum">@\'+a.character+"</span>\\n")),c.push("\\n");logger.log(e.join("\\n"));jsio("util/browser").$({tag:"pre",id:"syntaxCheck",style:{padding:"50px",fontSize:"16px"},html:"<style>._jsioLint_title { color: #FFF; padding-bottom: 6px; border-bottom: 3px dashed #888; margin-bottom: 30px }._jsioLint_whitespace {color: #444}._jsioLint_lineNum { color: rgb(153,207,80)}._jsioLint_charNum { color: rgb(51,135,204)}._jsioLint_reason { color: rgb(137,189,255)}._jsioLint_evidence { color:rgb(226,137,100)}</style>"+\nc.join(""),parent:$({tag:"div",style:{background:"#000",position:"absolute",top:"0px",left:"0px",margin:"0px",padding:"0px",color:"#AAA",width:"100%",height:"100%",overflow:"auto",fontWeight:"bold",fontFamily:\'consolas, "courier new"\',zIndex:2E6},parent:document.body})})};\nexports.defaultOpts={adsafe:!1,bitwise:!1,browser:isBrowser,cap:!0,css:!0,debug:!0,devel:!0,eqeqeq:!1,es5:!1,evil:!1,forin:!1,fragment:!0,immed:!0,laxbreak:!0,newcap:!0,nomen:!1,on:!0,onevar:!1,passfail:!1,plusplus:!1,regexp:!1,rhino:isRhino,undef:!1,safe:!1,windows:!1,strict:!1,sub:!0,white:!1,widget:!1,predef:globals};\nexports.warnOpts={adsafe:!1,bitwise:!1,browser:!0,cap:!0,css:!0,debug:!1,devel:!1,eqeqeq:!1,es5:!1,evil:!1,forin:!1,fragment:!0,immed:!0,laxbreak:!0,newcap:!0,nomen:!1,on:!0,onevar:!1,passfail:!1,plusplus:!1,regexp:!1,rhino:!0,undef:!1,safe:!1,windows:!0,strict:!1,sub:!0,white:!0,widget:!1};\n',
friendlyPath:"util.syntax",pre:!0},"../../packages/base.js":{path:"../../packages/base.js",directory:"../../packages/",filename:"base.js",baseMod:"base",basePath:"../../packages",friendlyPath:"base",src:'exports.log=jsio.__env.log;exports.GLOBAL=jsio.__env.global;var SLICE=Array.prototype.slice;exports.isArray=typeof Array.isArray==="function"?Array.isArray:function(a){return Object.prototype.toString.call(a)==="[object Array]"};\nexports.bind=function(a,b){if(arguments.length>2){var c=SLICE.call(arguments,2);return typeof b=="string"?function(){if(a[b])return a[b].apply(a,c.concat(SLICE.call(arguments,0)));else throw logger.error("No method:",b,"for context",a);}:function(){return b.apply(a,c.concat(SLICE.call(arguments,0)))}}else return typeof b=="string"?function(){if(a[b])return a[b].apply(a,arguments);else throw logger.error("No method:",b,"for context",a);}:function(){return b.apply(a,arguments)}};\nexports.Class=function(a,b,c){return exports.__class__(function(){return this.init&&this.init.apply(this,arguments)},a,b,c)};\nexports.__class__=function(a,b,c,f){var d=function(){},e;typeof b!="string"&&(f=c,c=b,b=null);b&&(e=exports.logging.get(b));if(!c)throw Error("parent or prototype not provided");f||(f=c,c=null);if(c)if(exports.isArray(c)){d.prototype={};for(var g=0,h;h=c[g];++g){h==Error&&ErrorParentClass&&(h=ErrorParentClass);for(var i in h.prototype)i in d.prototype||(d.prototype[i]=h.prototype[i])}c=c[0]}else c==Error&&ErrorParentClass&&(c=ErrorParentClass),d.prototype=c.prototype;g=c?function(a,b,e){var g=c.prototype[b];\nif(!g)throw Error("method "+b+" does not exist");return g.apply(a,e||[])}:null;a.prototype=new d;f.call(a.prototype,e||g,e&&g);a.prototype.constructor=a;a.prototype.__parentClass__=c;if(b)a.prototype.__class__=b;return a};var ErrorParentClass=exports.__class__(function(){var a=Error.prototype.constructor.apply(this,arguments),b;for(b in a)a.hasOwnProperty(b)&&(this[b]=a[b])},function(){});\nexports.Class.defaults=exports.merge=function(a,b){for(var a=a||{},c=1,f=arguments.length;c<f;++c){var d=arguments[c],e;for(e in d)d.hasOwnProperty(e)&&!a.hasOwnProperty(e)&&(a[e]=d[e])}return a};exports.delay=function(a,b){var c=null,f,d,e=function(){a.apply(f,d)};return function(){f=this;d=arguments;c&&clearTimeout(c);c=setTimeout(e,b||0)}};\nexports.logging=function(){var a={DEBUG:1,LOG:2,INFO:3,WARN:4,ERROR:5},b={},c=!1,f="";a.setPrefix=function(a){f=a+" "};a.setProduction=function(a){c=!!a};a.get=function(a){return b.hasOwnProperty(a)?b[a]:b[a]=new d(a)};a.set=function(a,c){b[a]=c};a.getAll=function(){return b};a.__create=function(b,c){c.logger=a.get(b)};var d=exports.__class__(function(b,c){this._name=b;this._level=c||a.LOG},function(){function b(a,d){return function(){if(!c&&a>=this._level){var b=d+" "+f+this._name,e=this._listener||\nexports.log;return e&&e.apply(this._listener,[b].concat(SLICE.call(arguments)))}return arguments[0]}}this.setLevel=function(a){this._level=a};this.setListener=function(a){this._listener=a};this.debug=b(a.DEBUG,"DEBUG");this.log=b(a.LOG,"LOG");this.info=b(a.INFO,"INFO");this.warn=b(a.WARN,"WARN");this.error=b(a.ERROR,"ERROR")});return a}();var logger=exports.logging.get("jsiocore");\n'},
"../../packages/util/underscore.js":{path:"../../packages/util/underscore.js",directory:"../../packages/util/",filename:"underscore.js",src:'(function(){function u(a,c,d){if(a===c)return a!==0||1/a==1/c;if(a==null||c==null)return a===c;if(a._chain)a=a._wrapped;if(c._chain)c=c._wrapped;if(b.isFunction(a.isEqual))return a.isEqual(c);if(b.isFunction(c.isEqual))return c.isEqual(a);var e=typeof a;if(e!=typeof c)return!1;if(!a!=!c)return!1;if(b.isNaN(a))return b.isNaN(c);var g=b.isString(a),f=b.isString(c);if(g||f)return g&&f&&String(a)==String(c);g=b.isNumber(a);f=b.isNumber(c);if(g||f)return g&&f&&+a==+c;g=b.isBoolean(a);f=b.isBoolean(c);\nif(g||f)return g&&f&&+a==+c;g=b.isDate(a);f=b.isDate(c);if(g||f)return g&&f&&a.getTime()==c.getTime();g=b.isRegExp(a);f=b.isRegExp(c);if(g||f)return g&&f&&a.source==c.source&&a.global==c.global&&a.multiline==c.multiline&&a.ignoreCase==c.ignoreCase;if(e!="object")return!1;if(a.length!==c.length)return!1;if(a.constructor!==c.constructor)return!1;for(e=d.length;e--;)if(d[e]==a)return!0;d.push(a);var e=0,g=!0,h;for(h in a)if(m.call(a,h)&&(e++,!(g=m.call(c,h)&&u(a[h],c[h],d))))break;if(g){for(h in c)if(m.call(c,\nh)&&!e--)break;g=!e}d.pop();return g}var r=this,F=r._,o={},k=Array.prototype,p=Object.prototype,i=k.slice,G=k.unshift,l=p.toString,m=p.hasOwnProperty,v=k.forEach,w=k.map,x=k.reduce,y=k.reduceRight,z=k.filter,A=k.every,B=k.some,q=k.indexOf,C=k.lastIndexOf,p=Array.isArray,H=Object.keys,s=Function.prototype.bind,b=function(a){return new n(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=b;exports._=b}else typeof define==="function"&&define.amd?\ndefine("underscore",function(){return b}):r._=b;b.VERSION="1.2.1";var j=b.each=b.forEach=function(a,c,b){if(a!=null)if(v&&a.forEach===v)a.forEach(c,b);else if(a.length===+a.length)for(var e=0,g=a.length;e<g;e++){if(e in a&&c.call(b,a[e],e,a)===o)break}else for(e in a)if(m.call(a,e)&&c.call(b,a[e],e,a)===o)break};b.map=function(a,c,b){var e=[];if(a==null)return e;if(w&&a.map===w)return a.map(c,b);j(a,function(a,f,h){e[e.length]=c.call(b,a,f,h)});return e};b.reduce=b.foldl=b.inject=function(a,c,d,e){var g=\nd!==void 0;a==null&&(a=[]);if(x&&a.reduce===x)return e&&(c=b.bind(c,e)),g?a.reduce(c,d):a.reduce(c);j(a,function(a,b,i){g?d=c.call(e,d,a,b,i):(d=a,g=!0)});if(!g)throw new TypeError("Reduce of empty array with no initial value");return d};b.reduceRight=b.foldr=function(a,c,d,e){a==null&&(a=[]);if(y&&a.reduceRight===y)return e&&(c=b.bind(c,e)),d!==void 0?a.reduceRight(c,d):a.reduceRight(c);a=(b.isArray(a)?a.slice():b.toArray(a)).reverse();return b.reduce(a,c,d,e)};b.find=b.detect=function(a,c,b){var e;\nD(a,function(a,f,h){if(c.call(b,a,f,h))return e=a,!0});return e};b.filter=b.select=function(a,c,b){var e=[];if(a==null)return e;if(z&&a.filter===z)return a.filter(c,b);j(a,function(a,f,h){c.call(b,a,f,h)&&(e[e.length]=a)});return e};b.reject=function(a,c,b){var e=[];if(a==null)return e;j(a,function(a,f,h){c.call(b,a,f,h)||(e[e.length]=a)});return e};b.every=b.all=function(a,c,b){var e=!0;if(a==null)return e;if(A&&a.every===A)return a.every(c,b);j(a,function(a,f,h){if(!(e=e&&c.call(b,a,f,h)))return o});\nreturn e};var D=b.some=b.any=function(a,c,d){var c=c||b.identity,e=!1;if(a==null)return e;if(B&&a.some===B)return a.some(c,d);j(a,function(a,b,h){if(e|=c.call(d,a,b,h))return o});return!!e};b.include=b.contains=function(a,c){var b=!1;if(a==null)return b;return q&&a.indexOf===q?a.indexOf(c)!=-1:b=D(a,function(a){if(a===c)return!0})};b.invoke=function(a,c){var d=i.call(arguments,2);return b.map(a,function(a){return(c.call?c||a:a[c]).apply(a,d)})};b.pluck=function(a,c){return b.map(a,function(a){return a[c]})};\nb.max=function(a,c,d){if(!c&&b.isArray(a))return Math.max.apply(Math,a);if(!c&&b.isEmpty(a))return-Infinity;var e={computed:-Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b>=e.computed&&(e={value:a,computed:b})});return e.value};b.min=function(a,c,d){if(!c&&b.isArray(a))return Math.min.apply(Math,a);if(!c&&b.isEmpty(a))return Infinity;var e={computed:Infinity};j(a,function(a,b,h){b=c?c.call(d,a,b,h):a;b<e.computed&&(e={value:a,computed:b})});return e.value};b.shuffle=function(a){var b=[],d;\nj(a,function(a,g){g==0?b[0]=a:(d=Math.floor(Math.random()*(g+1)),b[g]=b[d],b[d]=a)});return b};b.sortBy=function(a,c,d){return b.pluck(b.map(a,function(a,b,f){return{value:a,criteria:c.call(d,a,b,f)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c<d?-1:c>d?1:0}),"value")};b.groupBy=function(a,c){var d={},e=b.isFunction(c)?c:function(a){return a[c]};j(a,function(a,b){var c=e(a,b);(d[c]||(d[c]=[])).push(a)});return d};b.sortedIndex=function(a,c,d){d||(d=b.identity);for(var e=0,g=a.length;e<\ng;){var f=e+g>>1;d(a[f])<d(c)?e=f+1:g=f}return e};b.toArray=function(a){return!a?[]:a.toArray?a.toArray():b.isArray(a)?i.call(a):b.isArguments(a)?i.call(a):b.values(a)};b.size=function(a){return b.toArray(a).length};b.first=b.head=function(a,b,d){return b!=null&&!d?i.call(a,0,b):a[0]};b.initial=function(a,b,d){return i.call(a,0,a.length-(b==null||d?1:b))};b.last=function(a,b,d){return b!=null&&!d?i.call(a,a.length-b):a[a.length-1]};b.rest=b.tail=function(a,b,d){return i.call(a,b==null||d?1:b)};b.compact=\nfunction(a){return b.filter(a,function(a){return!!a})};b.flatten=function(a,c){return b.reduce(a,function(a,e){if(b.isArray(e))return a.concat(c?e:b.flatten(e));a[a.length]=e;return a},[])};b.without=function(a){return b.difference(a,i.call(arguments,1))};b.uniq=b.unique=function(a,c,d){var d=d?b.map(a,d):a,e=[];b.reduce(d,function(d,f,h){if(0==h||(c===!0?b.last(d)!=f:!b.include(d,f)))d[d.length]=f,e[e.length]=a[h];return d},[]);return e};b.union=function(){return b.uniq(b.flatten(arguments,!0))};\nb.intersection=b.intersect=function(a){var c=i.call(arguments,1);return b.filter(b.uniq(a),function(a){return b.every(c,function(c){return b.indexOf(c,a)>=0})})};b.difference=function(a,c){return b.filter(a,function(a){return!b.include(c,a)})};b.zip=function(){for(var a=i.call(arguments),c=b.max(b.pluck(a,"length")),d=Array(c),e=0;e<c;e++)d[e]=b.pluck(a,""+e);return d};b.indexOf=function(a,c,d){if(a==null)return-1;var e;if(d)return d=b.sortedIndex(a,c),a[d]===c?d:-1;if(q&&a.indexOf===q)return a.indexOf(c);\nfor(d=0,e=a.length;d<e;d++)if(a[d]===c)return d;return-1};b.lastIndexOf=function(a,b){if(a==null)return-1;if(C&&a.lastIndexOf===C)return a.lastIndexOf(b);for(var d=a.length;d--;)if(a[d]===b)return d;return-1};b.range=function(a,b,d){arguments.length<=1&&(b=a||0,a=0);for(var d=arguments[2]||1,e=Math.max(Math.ceil((b-a)/d),0),g=0,f=Array(e);g<e;)f[g++]=a,a+=d;return f};var E=function(){};b.bind=function(a,c){var d,e;if(a.bind===s&&s)return s.apply(a,i.call(arguments,1));if(!b.isFunction(a))throw new TypeError;\ne=i.call(arguments,2);return d=function(){if(!(this instanceof d))return a.apply(c,e.concat(i.call(arguments)));E.prototype=a.prototype;var b=new E,f=a.apply(b,e.concat(i.call(arguments)));return Object(f)===f?f:b}};b.bindAll=function(a){var c=i.call(arguments,1);c.length==0&&(c=b.functions(a));j(c,function(c){a[c]=b.bind(a[c],a)});return a};b.memoize=function(a,c){var d={};c||(c=b.identity);return function(){var b=c.apply(this,arguments);return m.call(d,b)?d[b]:d[b]=a.apply(this,arguments)}};b.delay=\nfunction(a,b){var d=i.call(arguments,2);return setTimeout(function(){return a.apply(a,d)},b)};b.defer=function(a){return b.delay.apply(b,[a,1].concat(i.call(arguments,1)))};b.throttle=function(a,c){var d,e,g,f,h;h=b.debounce(function(){f=!1},c);return function(){e=this;g=arguments;var b;d||(d=setTimeout(function(){d=null;a.apply(e,g);h()},c));f||a.apply(e,g);h&&h();f=!0}};b.debounce=function(a,b){var d;return function(){var e=this,g=arguments;clearTimeout(d);d=setTimeout(function(){d=null;a.apply(e,\ng)},b)}};b.once=function(a){var b=!1,d;return function(){if(b)return d;b=!0;return d=a.apply(this,arguments)}};b.wrap=function(a,b){return function(){var d=[a].concat(i.call(arguments));return b.apply(this,d)}};b.compose=function(){var a=i.call(arguments);return function(){for(var b=i.call(arguments),d=a.length-1;d>=0;d--)b=[a[d].apply(this,b)];return b[0]}};b.after=function(a,b){return function(){if(--a<1)return b.apply(this,arguments)}};b.keys=H||function(a){if(a!==Object(a))throw new TypeError("Invalid object");\nvar b=[],d;for(d in a)m.call(a,d)&&(b[b.length]=d);return b};b.values=function(a){return b.map(a,b.identity)};b.functions=b.methods=function(a){var c=[],d;for(d in a)b.isFunction(a[d])&&c.push(d);return c.sort()};b.extend=function(a){j(i.call(arguments,1),function(b){for(var d in b)b[d]!==void 0&&(a[d]=b[d])});return a};b.defaults=function(a){j(i.call(arguments,1),function(b){for(var d in b)a[d]==null&&(a[d]=b[d])});return a};b.clone=function(a){return!b.isObject(a)?a:b.isArray(a)?a.slice():b.extend({},\na)};b.tap=function(a,b){b(a);return a};b.isEqual=function(a,b){return u(a,b,[])};b.isEmpty=function(a){if(b.isArray(a)||b.isString(a))return a.length===0;for(var c in a)if(m.call(a,c))return!1;return!0};b.isElement=function(a){return!!(a&&a.nodeType==1)};b.isArray=p||function(a){return l.call(a)=="[object Array]"};b.isObject=function(a){return a===Object(a)};b.isArguments=l.call(arguments)=="[object Arguments]"?function(a){return l.call(a)=="[object Arguments]"}:function(a){return!(!a||!m.call(a,\n"callee"))};b.isFunction=function(a){return l.call(a)=="[object Function]"};b.isString=function(a){return l.call(a)=="[object String]"};b.isNumber=function(a){return l.call(a)=="[object Number]"};b.isNaN=function(a){return a!==a};b.isBoolean=function(a){return a===!0||a===!1||l.call(a)=="[object Boolean]"};b.isDate=function(a){return l.call(a)=="[object Date]"};b.isRegExp=function(a){return l.call(a)=="[object RegExp]"};b.isNull=function(a){return a===null};b.isUndefined=function(a){return a===void 0};\nb.noConflict=function(){r._=F;return this};b.identity=function(a){return a};b.times=function(a,b,d){for(var e=0;e<a;e++)b.call(d,e)};b.escape=function(a){return(""+a).replace(/&(?!\\w+;|#\\d+;|#x[\\da-f]+;)/gi,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/\'/g,"'").replace(/\\//g,"/")};b.mixin=function(a){j(b.functions(a),function(c){I(c,b[c]=a[c])})};var J=0;b.uniqueId=function(a){var b=J++;return a?a+b:b};b.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,\nescape:/<%-([\\s\\S]+?)%>/g};b.template=function(a,c){var d=b.templateSettings,d="var __p=[],print=function(){__p.push.apply(__p,arguments);};with(obj||{}){__p.push(\'"+a.replace(/\\\\/g,"\\\\\\\\").replace(/\'/g,"\\\\\'").replace(d.escape,function(a,b){return"\',_.escape("+b.replace(/\\\\\'/g,"\'")+"),\'"}).replace(d.interpolate,function(a,b){return"\',"+b.replace(/\\\\\'/g,"\'")+",\'"}).replace(d.evaluate||null,function(a,b){return"\');"+b.replace(/\\\\\'/g,"\'").replace(/[\\r\\n\\t]/g," ")+"__p.push(\'"}).replace(/\\r/g,"\\\\r").replace(/\\n/g,\n"\\\\n").replace(/\\t/g,"\\\\t")+"\');}return __p.join(\'\');",d=new Function("obj",d);return c?d(c):d};var n=function(a){this._wrapped=a};b.prototype=n.prototype;var t=function(a,c){return c?b(a).chain():a},I=function(a,c){n.prototype[a]=function(){var a=i.call(arguments);G.call(a,this._wrapped);return t(c.apply(b,a),this._chain)}};b.mixin(b);j("pop,push,reverse,shift,sort,splice,unshift".split(","),function(a){var b=k[a];n.prototype[a]=function(){b.apply(this._wrapped,arguments);return t(this._wrapped,\nthis._chain)}});j(["concat","join","slice"],function(a){var b=k[a];n.prototype[a]=function(){return t(b.apply(this._wrapped,arguments),this._chain)}});n.prototype.chain=function(){this._chain=!0;return this};n.prototype.value=function(){return this._wrapped}})();\n',
friendlyPath:"util.underscore",pre:!0},"../../packages/index.js":{path:"../../packages/index.js",directory:"../../packages/",filename:"index.js",baseMod:"index",basePath:"../../packages",src:'require("./jsio");\n',friendlyPath:"index",pre:!0},"../../packages/logging.js":{path:"../../packages/logging.js",directory:"../../packages/",filename:"logging.js",baseMod:"logging",basePath:"../../packages",src:"exports.UIWatcher=__class__;exports.UIWatcher=exports.UIWatcher(function(){return this.init&&this.init.apply(this,arguments)},function(){});\n",
friendlyPath:"logging",pre:!0}});
jsio("import .compiler").start()