| 1 | window.require=function(e,t){var n=require.resolve(e,t||"/"),r=require.modules[n]||require.initModule(n);if(!r)throw new Error("Failed to resolve module "+e+", tried "+n);return r._cached?r._cached:r()},require.paths=[],require.modules={},require._core={events:!0,path:!0,vm:!0},require.resolve=function(e,t){function s(){for(var e=0,t;t=arguments[e];++e)if(require.modules[t])return t}t||(t="/");if(require._core[e])return e;var n=require.modules.path(),r=n.extname(e);r&&(e=e.substring(0,e.length-r.length)),e=e.charAt(0)==="/"?n.resolve(t,e.substring(1)):e,e=e.match(/^(?:\.\.?\/)/)?n.resolve(t,e):e;var i=s(e,n.join(e,"index"));if(i)return i;throw new Error("Cannot find module '"+e+"' within '"+t+"'")},require.alias=function(e,t){var n=require.modules.path(),r=null;try{r=require.resolve(e+"/package.json","/")}catch(i){r=require.resolve(e,"/")}var s=n.dirname(r),o=(Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t})(require.modules);for(var u=0;u<o.length;u++){var a=o[u];if(a.slice(0,s.length+1)===s+"/"){var f=a.slice(s.length);require.modules[t+f]=require.modules[s+f]}else a===s&&(require.modules[t]=require.modules[s])}},require.define=function(e,t){var n=require._core[e]?"":require.modules.path().dirname(e),r=function(e){return require(e,n)};r.resolve=function(e){return require.resolve(e,n)},r.modules=require.modules,r.define=require.define;var i={exports:{}};require.modules[e]=function(){return require.modules[e]._cached=i.exports,t.call(i.exports,r,i,i.exports,n,e),require.modules[e]._cached=i.exports,i.exports}},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(){var e=[],t=typeof window!="undefined"&&window.postMessage&&window.addEventListener;return t&&window.addEventListener("message",function(t){if(t.source===window&&t.data==="browserify-tick"){t.stopPropagation();if(e.length>0){var n=e.shift();n()}}},!0),function(n){t?(e.push(n),window.postMessage("browserify-tick","*")):setTimeout(n,0)}}()),process.title||(process.title="browser"),process.binding||(process.binding=function(e){if(e==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.define("path",function(e,t,n){function r(e,t){var n=[];for(var r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}function i(e,t){var n=0;for(var r=e.length;r>=0;r--){var i=e[r];i=="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var s=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;n.resolve=function(){var e="",t=!1;for(var n=arguments.length;n>=-1&&!t;n--){var s=n>=0?arguments[n]:process.cwd();if(typeof s!="string"||!s)continue;e=s+"/"+e,t=s.charAt(0)==="/"}return e=e.replace(/\/\.\//,"/"),e=i(r(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},n.normalize=function(e){var t=e.charAt(0)==="/",n=e.slice(-1)==="/";return e=i(r(e.split("/"),function(e){return!!e}),!t).join("/"),!e&&!t&&(e="."),e&&n&&(e+="/"),(t?"/":"")+e},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,function(e){return e&&typeof e=="string"}).join("/"))},n.dirname=function(e){var t=s.exec(e)[1]||"";return t?t==="/"?t:t.substring(0,t.length-1):"."},n.basename=function(e,t){var n=s.exec(e)[2]||"";return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return s.exec(e)[3]||""}}); |
| 2 | require.define("eventemitter2",function(e,t,n,r,i){!function(e,t){function i(){this._events=new Object}function s(e){e&&(this.wildcard=e.wildcard,this.delimiter=e.delimiter||".",this.wildcard&&(this.listenerTree=new Object))}function o(e){this._events=new Object,s.call(this,e)}function u(e,t,n,r){if(!n)return;var i;if(r===t.length&&n._listeners){if(typeof n._listeners=="function")return e&&e.push(n._listeners),n;for(var s=0,o=n._listeners.length;s<o;s++)e&&e.push(n._listeners[s]);return n}if(t[r]==="*"||n[t[r]]){if(t[r]==="*"){for(var a in n)a!=="_listeners"&&n.hasOwnProperty(a)&&(i=u(e,t,n[a],r+1));return i}i=u(e,t,n[t[r]],r+1)}return n["*"]&&u(e,t,n["*"],r+1),i}function a(e,t){e=typeof e=="string"?e.split(this.delimiter):e.slice();var i=this.listenerTree,s=e.shift();while(s){i[s]||(i[s]=new Object),i=i[s];if(e.length===0){if(!i._listeners)i._listeners=t;else if(typeof i._listeners=="function")i._listeners=[i._listeners,t];else if(n(i._listeners)){i._listeners.push(t);if(!i._listeners.warned){var o=r;o>0&&i._listeners.length>o&&(i._listeners.warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",i._listeners.length),console.trace())}}return!0}s=e.shift()}return!0}var n=Array.isArray?Array.isArray:function(t){return Object.prototype.toString.call(t)==="[object Array]"},r=10;o.prototype.setMaxListeners=function(e){this._events||i.call(this),this._events.maxListeners=e},o.prototype.event="",o.prototype.once=function(e,t){return this.many(e,1,t),this},o.prototype.many=function(e,t,n){function i(){--t===0&&r.off(e,i),n.apply(null,arguments)}var r=this;if(typeof n!="function")throw new Error("many only accepts instances of Function");return i._origin=n,this.on(e,i),r},o.prototype.emit=function(){this._events||i.call(this);var e=arguments[0];if(e==="newListener"&&!this._events.newListener)return!1;if(this._all){var t=arguments.length,n=new Array(t-1);for(var r=1;r<t;r++)n[r-1]=arguments[r];for(r=0,t=this._all.length;r<t;r++)this.event=e,this._all[r].apply(this,n)}if(e==="error"&&!this._all&&!this._events.error&&(!this.wildcard||!this.listenerTree.error))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");var s;if(this.wildcard){s=[];var o=typeof e=="string"?e.split(this.delimiter):e.slice();u.call(this,s,o,this.listenerTree,0)}else s=this._events[e];if(typeof s=="function"){this.event=e;if(arguments.length===1)s.call(this);else if(arguments.length>1)switch(arguments.length){case 2:s.call(this,arguments[1]);break;case 3:s.call(this,arguments[1],arguments[2]);break;default:var t=arguments.length,n=new Array(t-1);for(var r=1;r<t;r++)n[r-1]=arguments[r];s.apply(this,n)}return!0}if(s){var t=arguments.length,n=new Array(t-1);for(var r=1;r<t;r++)n[r-1]=arguments[r];var a=s.slice();for(var r=0,t=a.length;r<t;r++)this.event=e,a[r].apply(this,n);return!0}},o.prototype.on=function(e,s){this._events||i.call(this),this.emit("newListener",e,s);if(this.wildcard)return a.call(this,e,s),this;if(!this._events[e])this._events[e]=s;else if(typeof this._events[e]=="function")this._events[e]=[this._events[e],s];else if(n(this._events[e])){this._events[e].push(s);if(!this._events[e].warned){var o;this._events.maxListeners!==t?o=this._events.maxListeners:o=r,o&&o>0&&this._events[e].length>o&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),console.trace())}}return this},o.prototype.onAny=function(e){this._all||(this._all=[]);if(typeof e!="function")throw new Error("onAny only accepts instances of Function");return this._all.push(e),this},o.prototype.addListener=o.prototype.on,o.prototype.off=function(e,t){if(typeof t!="function")throw new Error("removeListener only takes instances of Function");var r;if(this.wildcard){var i=typeof e=="string"?e.split(this.delimiter):e.slice(),s=u.call(this,null,i,this.listenerTree,0);if("undefined"==typeof s)return this;r=s._listeners}else{if(!this._events[e])return this;r=this._events[e]}if(n(r)){var o=-1;for(var a=0,f=r.length;a<f;a++)if(r[a]===t||r[a].listener&&r[a].listener===t||r[a]._origin&&r[a]._origin===t){o=a;break}if(o<0)return this;this.wildcard?s._listeners.splice(o,1):this._events[e].splice(o,1),r.length===0&&(this.wildcard?delete s._listeners:delete this._events[e])}else if(r===t||r.listener&&r.listener===t||r._origin&&r._origin===t)this.wildcard?delete s._listeners:delete this._events[e];return this},o.prototype.offAny=function(e){var t=0,n=0,r;if(e&&this._all&&this._all.length>0){r=this._all;for(t=0,n=r.length;t<n;t++)if(e===r[t])return r.splice(t,1),this}else this._all=[];return this},o.prototype.removeListener=o.prototype.off,o.prototype.removeAllListeners=function(e){if(arguments.length===0)return!this._events||i.call(this),this;if(this.wildcard){var t=typeof e=="string"?e.split(this.delimiter):e.slice(),n=u.call(this,null,t,this.listenerTree,0);if("undefined"==typeof n)return this;n._listeners=null}else{if(!this._events[e])return this;this._events[e]=null}return this},o.prototype.listeners=function(e){if(this.wildcard){var t=[],r=typeof e=="string"?e.split(this.delimiter):e.slice();return u.call(this,t,r,this.listenerTree,0),t}return this._events||i.call(this),this._events[e]||(this._events[e]=[]),n(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},o.prototype.listenersAny=function(){return this._all?this._all:[]},e.EventEmitter2=o}(typeof n=="undefined"?window:n)}); |
| 3 | require.define("socketstream",function(e,t,n,r,i){"use strict";var s,o,u,a,f;s=e("eventemitter2").EventEmitter2,a=n.server=new s,u=n.message=new s,n.tmpl={},f=null,n.assignTransport=function(t){return f=e("socketstream-transport")(a,u,t),f.send=f.connect(),f.send},n.registerApi=function(e,t){var r;return r=n[e],r?console.error("SocketStream Error: Unable to register the 'ss."+e+"' responder as this name has already been taken"):(n[e]=t,n[e])},n.send=function(e){return function(t){return f.send(e+"|"+t)}},o={loaded:{},loading:new s},n.load={code:function(e,t){var n,r,i;e&&e.substr(0,1)==="/"&&(e=e.substr(1)),n="SocketStream Error: The ss.load.code() command ";if(!jQuery)return console.error(n+"requires jQuery to be present");if(!e)return console.error(n+"requires a directory to load. Specify it as the first argument. "+"E.g. The ss.load.code('/mail',cb) will load code in /client/code/mail");if(!t)return console.error(n+"requires a callback. Specify it as the last argument");if(o.loaded[e])return t();o.loading.once(e,t);if(o.loading.listeners(e).length===1)return r=function(){return console.error("SocketStream Error: Could not asynchronously load "+e),console.log(arguments)},i=function(){return o.loaded[e]=!0,o.loading.emit(e)},$.ajax({url:"/_serve/code?"+e,type:"GET",cache:!1,dataType:"script",success:i,error:r})},worker:function(e){return new Worker("/_serve/worker?"+e)}},a.on("__ss:reload",function(){return window.location.reload()}),a.on("__ss:updateCSS",function(){var e,t,n,r,i;i=document.getElementsByTagName("link");for(n=0,r=i.length;n<r;n++)t=i[n],t.rel.toLowerCase().indexOf("stylesheet")>=0&&t.href&&(e=t.href.replace(/(&|%5C?)\d+/,""),t.href=e+(e.indexOf("?")>=0?"&":"?")+(new Date).valueOf());return console.log("CSS updated")})}); |