Comparing version 0.8.0 to 0.8.1
@@ -1,1 +0,1 @@ | ||
var DNode = (function () {var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e},__require=require;require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require.resolve=function(){var a={assert:!0,events:!0,fs:!0,path:!0,vm:!0};return function(b,c){function k(a){var b;a==="/"?b=[""]:b=d.normalize(a).split("/");var c=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";c.push(f)}return c}function j(a,b){var c=k(b);for(var d=0;d<c.length;d++){var e=c[d],f=h(e+"/"+a);if(f)return f;var g=i(e+"/"+a);if(g)return g}var f=h(a);if(f)return f}function i(a){a=a.replace(/\/+$/,"");var b=a+"/package.json";if(require.modules[b]){var c=require.modules[b](),e=c.browserify;if(typeof e=="object"&&e.main){var f=h(d.resolve(a,e.main));if(f)return f}else if(typeof e=="string"){var f=h(d.resolve(a,e));if(f)return f}else if(c.main){var f=h(d.resolve(a,c.main));if(f)return f}}return h(a+"/index")}function h(a){if(require.modules[a])return a;for(var b=0;b<require.extensions.length;b++){var c=require.extensions[b];if(require.modules[a+c])return a+c}}c||(c="/");if(a[b])return b;var d=require.modules.path(),e=c||".";if(b.match(/^(?:\.\.?\/|\/)/)){var f=h(d.resolve(e,b))||i(d.resolve(e,b));if(f)return f}var g=j(b,e);if(g)return g;throw new Error("Cannot find module '"+b+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d);Object.keys(require.modules).forEach(function(a){if(a.slice(0,f.length+1)===f+"/"){var c=a.slice(f.length);require.modules[b+c]=require.modules[f+c]}else a===f&&(require.modules[b]=require.modules[f])})},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(a){setTimeout(a,0)}),process.title||(process.title="browser"),process.binding||(process.binding=function(a){if(a==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.modules.path=function(){var a={exports:{}},b=a.exports,c=".",d="path",e=function(a){return __require(a,".")};e.resolve=function(a){return __require.resolve(name,".")},e.modules=__require.modules,__require.modules.path._cached=a.exports,function(){function a(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var c=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;b.resolve=function(){var b="",c=!1;for(var d=arguments.length;d>=-1&&!c;d--){var e=d>=0?arguments[d]:process.cwd();if(typeof e!="string"||!e)continue;b=e+"/"+b,c=e.charAt(0)==="/"}b=a(b.split("/").filter(function(a){return!!a}),!c).join("/");return(c?"/":"")+b||"."},b.normalize=function(b){var c=b.charAt(0)==="/",d=b.slice(-1)==="/";b=a(b.split("/").filter(function(a){return!!a}),!c).join("/"),!b&&!c&&(b="."),b&&d&&(b+="/");return(c?"/":"")+b},b.join=function(){var a=Array.prototype.slice.call(arguments,0);return b.normalize(a.filter(function(a,b){return a&&typeof a=="string"}).join("/"))},b.dirname=function(a){var b=c.exec(a)[1]||"",d=!1;return b?b.length===1||d&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},b.basename=function(a,b){var d=c.exec(a)[2]||"";b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d},b.extname=function(a){return c.exec(a)[3]||""}}.call(a.exports),__require.modules.path._cached=a.exports;return a.exports},require.modules["/index.js"]=function(){var a={exports:{}},b=a.exports,c="/",d="/index.js",e=function(a){return __require(a,"/")};e.resolve=function(a){return __require.resolve(name,"/")},e.modules=__require.modules,__require.modules["/index.js"]._cached=a.exports,function(){function g(a){if(this instanceof g){this.proto=b(a),this.stack=[];return this}return new g(a)}var b=e("dnode-protocol"),c=e("events").EventEmitter,d=e("./socket.io").io,f=a.exports=g;g.prototype=new c,g.prototype.use=function(a){this.stack.push(a);return this},g.prototype.connect=function(){var a=this,c=b.parseArgs(arguments),e=a.proto.create();c.port||(c.port=parseInt(window.location.port,10)),isNaN(c.port)&&delete c.port;var f=e.socketio=new d.Socket(c.host||window.location.hostname,c);e.end=function(){f.disconnect()},f.on("connect",function(){e.start(),a.emit("connect")}),f.on("disconnect",function(){e.emit("end"),a.emit("end")}),f.on("message",e.parse),e.on("request",function(a){f.send(JSON.stringify(a)+"\n")}),c.block&&e.on("remote",function(){c.block.call(e.instance,e.remote,e)}),this.stack.forEach(function(a){a.call(e.instance,e.remote,e)}),f.connect()},f.connect=function(){var a=f();return a.connect.apply(a,arguments)}}.call(a.exports),__require.modules["/index.js"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/package.json"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol",d="/node_modules/dnode-protocol/package.json",e=function(a){return __require(a,"/node_modules/dnode-protocol")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/package.json"]._cached=a.exports,function(){a.exports={name:"dnode-protocol",description:"Implements the dnode protocol abstractly",version:"0.0.12",repository:"https://github.com/substack/dnode-protocol.git",author:{name:"James Halliday",email:"mail@substack.net",url:"http://substack.net"},main:"./index.js",dependencies:{traverse:">=0.3.1"},scripts:{test:"expresso"},engines:{node:">=0.2.0"}}}.call(a.exports),__require.modules["/node_modules/dnode-protocol/package.json"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/index.js"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol",d="/node_modules/dnode-protocol/index.js",e=function(a){return __require(a,"/node_modules/dnode-protocol")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/index.js"]._cached=a.exports,function(){var b=e("traverse"),c=e("events").EventEmitter,d=process.title==="browser"?{}:e("stream"),f=a.exports=function(a){var b={};b.sessions={},b.create=function(){var c=null;do c=Math.floor(Math.random()*Math.pow(2,32)).toString(16);while(b.sessions[c]);var d=g(c,a);b.sessions[c]=d;return d},b.destroy=function(a){delete b.sessions[a]};return b},g=f.Session=function(a,b){function j(a,b,c){try{a.apply(b,c)}catch(e){d.emit("error",e)}}function i(a){typeof a!="object"&&(a={}),Object.keys(d.remote).forEach(function(a){delete d.remote[a]}),Object.keys(a).forEach(function(b){d.remote[b]=a[b]}),d.emit("remote",d.remote),d.emit("ready")}var d=new c;d.id=a,d.remote={};var e=d.instance=typeof b=="function"?new b(d.remote,d):b||{},f=new h;d.start=function(){d.request("methods",[e])},d.request=function(a,b){var c=f.scrub(b);d.emit("request",{method:a,arguments:c.arguments,callbacks:c.callbacks,links:c.links})},d.parse=function(a){var b=null;try{b=JSON.parse(a)}catch(c){d.emit("error",new SyntaxError("Error parsing JSON message: "+JSON.stringify(a)));return}try{d.handle(b)}catch(c){d.emit("error",c)}};var g={};d.handle=function(a){var b=f.unscrub(a,function(a){a in g||(g[a]=function(){d.request(a,[].slice.apply(arguments))});return g[a]});if(a.method==="methods")i(b[0]);else if(a.method==="error"){var c=b[0];d.emit("remoteError",c)}else typeof a.method=="string"?d.instance.propertyIsEnumerable(a.method)?j(d.instance[a.method],d.instance,b):d.emit("error",new Error("Request for non-enumerable method: "+a.method)):typeof a.method=="number"&&j(f.callbacks[a.method],d.instance,b)};return d},h=f.Scrubber=function(){function f(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(Object.propertyIsEnumerable.call(a,d))a=a[d];else return undefined}return a}function e(a,b,c){var d=a;for(var e=0;e<b.length-1;e++){var f=b[e];if(Object.propertyIsEnumerable.call(d,f))d=d[f];else return undefined}var g=b.slice(-1)[0];if(g===undefined)return c;d[g]=c;return a}var a={};a.callbacks={};var c=[],d=0;a.scrub=function(e){var f={},g=[],h=b(e).map(function(b){if(typeof b=="function"){var e=c.indexOf(b);e>=0&&!(e in f)?f[e]=this.path:(a.callbacks[d]=b,c.push(b),f[d]=this.path,d++),this.update("[Function]")}else this.circular&&(g.push({from:this.circular.path,to:this.path}),this.update("[Circular]"))});return{arguments:h,callbacks:f,links:g}},a.unscrub=function(a,b){var c=a.arguments||[];Object.keys(a.callbacks||{}).forEach(function(d){var f=parseInt(d,10),g=a.callbacks[f];c=e(c,g,b(f))}),(a.links||[]).forEach(function(a){var b=f(c,a.from);c=e(c,a.to,b)});return c};return a},i=f.parseArgs=function(a){var b={};[].slice.call(a).forEach(function(a){if(typeof a=="string")a.match(/^\d+$/)?b.port=parseInt(a,10):a.match("^/")?b.path=a:b.host=a;else if(typeof a=="number")b.port=a;else if(typeof a=="function")b.block=a;else if(typeof a=="object")a.__proto__===Object.prototype?Object.keys(a).forEach(function(c){b[c]=a[c]}):d.Stream&&a instanceof d.Stream?b.stream=a:b.server=a;else if(typeof a!="undefined")throw new Error("Not sure what to do about "+typeof a+" objects")});return b}}.call(a.exports),__require.modules["/node_modules/dnode-protocol/index.js"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/node_modules/traverse/package.json"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol/node_modules/traverse",d="/node_modules/dnode-protocol/node_modules/traverse/package.json",e=function(a){return __require(a,"/node_modules/dnode-protocol/node_modules/traverse")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol/node_modules/traverse")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/node_modules/traverse/package.json"]._cached=a.exports,function(){a.exports={name:"traverse",version:"0.4.6",description:"Traverse and transform objects by visiting every node on a recursive walk",author:"James Halliday",license:"MIT/X11",main:"./index",repository:{type:"git",url:"http://github.com/substack/js-traverse.git"},devDependencies:{expresso:"0.7.x"},scripts:{test:"expresso"}}}.call(a.exports),__require.modules["/node_modules/dnode-protocol/node_modules/traverse/package.json"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/node_modules/traverse/index.js"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol/node_modules/traverse",d="/node_modules/dnode-protocol/node_modules/traverse/index.js",e=function(a){return __require(a,"/node_modules/dnode-protocol/node_modules/traverse")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol/node_modules/traverse")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/node_modules/traverse/index.js"]._cached=a.exports,function(){function d(a){if(typeof a=="object"&&a!==null){var b;Array.isArray(a)?b=[]:a instanceof Date?b=new Date(a):a instanceof Boolean?b=new Boolean(a):a instanceof Number?b=new Number(a):a instanceof String?b=new String(a):b=Object.create(Object.getPrototypeOf(a)),Object.keys(a).forEach(function(c){b[c]=a[c]});return b}return a}function c(a,b,c){var e=[],f=[],g=!0;return function h(a){var i=c?d(a):a,j={},k=!0,l={node:i,node_:a,path:[].concat(e),parent:f[f.length-1],parents:f,key:e.slice(-1)[0],isRoot:e.length===0,level:e.length,circular:null,update:function(a,b){l.isRoot||(l.parent.node[l.key]=a),l.node=a,b&&(k=!1)},"delete":function(){delete l.parent.node[l.key]},remove:function(){Array.isArray(l.parent.node)?l.parent.node.splice(l.key,1):delete l.parent.node[l.key]},keys:null,before:function(a){j.before=a},after:function(a){j.after=a},pre:function(a){j.pre=a},post:function(a){j.post=a},stop:function(){g=!1},block:function(){k=!1}};if(!g)return l;if(typeof i=="object"&&i!==null){l.keys=Object.keys(i),l.isLeaf=l.keys.length==0;for(var m=0;m<f.length;m++)if(f[m].node_===a){l.circular=f[m];break}}else l.isLeaf=!0;l.notLeaf=!l.isLeaf,l.notRoot=!l.isRoot;var n=b.call(l,l.node);n!==undefined&&l.update&&l.update(n),j.before&&j.before.call(l,l.node);if(!k)return l;typeof l.node=="object"&&l.node!==null&&!l.circular&&(f.push(l),l.keys.forEach(function(a,b){e.push(a),j.pre&&j.pre.call(l,l.node[a],a);var d=h(l.node[a]);c&&Object.hasOwnProperty.call(l.node,a)&&(l.node[a]=d.node),d.isLast=b==l.keys.length-1,d.isFirst=b==0,j.post&&j.post.call(l,d),e.pop()}),f.pop()),j.after&&j.after.call(l,l.node);return l}(a).node}function b(a){if(this instanceof b)this.value=a;else return new b(a)}a.exports=b,b.prototype.get=function(a){var b=this.value;for(var c=0;c<a.length;c++){var d=a[c];if(!Object.hasOwnProperty.call(b,d)){b=undefined;break}b=b[d]}return b},b.prototype.set=function(a,b){var c=this.value;for(var d=0;d<a.length-1;d++){var e=a[d];Object.hasOwnProperty.call(c,e)||(c[e]={}),c=c[e]}c[a[d]]=b;return b},b.prototype.map=function(a){return c(this.value,a,!0)},b.prototype.forEach=function(a){this.value=c(this.value,a,!1);return this.value},b.prototype.reduce=function(a,b){var c=arguments.length===1,d=c?this.value:b;this.forEach(function(b){if(!this.isRoot||!c)d=a.call(this,d,b)});return d},b.prototype.deepEqual=function(a){if(arguments.length!==1)throw new Error("deepEqual requires exactly one object to compare against");var c=!0,d=a;this.forEach(function(e){var f=function(){c=!1;return undefined}.bind(this);if(!this.isRoot){if(typeof d!="object")return f();d=d[this.key]}var g=d;this.post(function(){d=g});var h=function(a){return Object.prototype.toString.call(a)};if(this.circular)b(a).get(this.circular.path)!==g&&f();else if(typeof g!=typeof e)f();else if(g===null||e===null||g===undefined||e===undefined)g!==e&&f();else if(g.__proto__!==e.__proto__)f();else if(g!==e)if(typeof g=="function")g instanceof RegExp?g.toString()!=e.toString()&&f():g!==e&&f();else if(typeof g=="object")if(h(e)==="[object Arguments]"||h(g)==="[object Arguments]")h(g)!==h(e)&&f();else if(g instanceof Date||e instanceof Date)(!(g instanceof Date)||!(e instanceof Date)||g.getTime()!==e.getTime())&&f();else{var i=Object.keys(g),j=Object.keys(e);if(i.length!==j.length)return f();for(var k=0;k<i.length;k++){var l=i[k];Object.hasOwnProperty.call(e,l)||f()}}});return c},b.prototype.paths=function(){var a=[];this.forEach(function(b){a.push(this.path)});return a},b.prototype.nodes=function(){var a=[];this.forEach(function(b){a.push(this.node)});return a},b.prototype.clone=function(){var a=[],b=[];return function c(e){for(var f=0;f<a.length;f++)if(a[f]===e)return b[f];if(typeof e=="object"&&e!==null){var g=d(e);a.push(e),b.push(g),Object.keys(e).forEach(function(a){g[a]=c(e[a])}),a.pop(),b.pop();return g}return e}(this.value)},Object.keys(b.prototype).forEach(function(a){b[a]=function(c){var d=[].slice.call(arguments,1),e=b(c);return e[a].apply(e,d)}})}.call(a.exports),__require.modules["/node_modules/dnode-protocol/node_modules/traverse/index.js"]._cached=a.exports;return a.exports},require.modules.events=function(){var a={exports:{}},b=a.exports,c=".",d="events",e=function(a){return __require(a,".")};e.resolve=function(a){return __require.resolve(name,".")},e.modules=__require.modules,__require.modules.events._cached=a.exports,function(){process.EventEmitter||(process.EventEmitter=function(){});var a=b.EventEmitter=process.EventEmitter,c=Array.isArray,d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(a){if(a==="error")if(!this._events||!this._events.error||c(this._events.error)&&!this._events.error.length)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var b=this._events[a];if(!b)return!1;if(typeof b=="function"){switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:var d=Array.prototype.slice.call(arguments,1);b.apply(this,d)}return!0}if(c(b)){var d=Array.prototype.slice.call(arguments,1),e=b.slice();for(var f=0,g=e.length;f<g;f++)e[f].apply(this,d);return!0}return!1},a.prototype.addListener=function(a,b){if("function"!=typeof b)throw new Error("addListener only takes instances of Function");this._events||(this._events={}),this.emit("newListener",a,b);if(!this._events[a])this._events[a]=b;else if(c(this._events[a])){if(!this._events[a].warned){var e;this._events.maxListeners!==undefined?e=this._events.maxListeners:e=d,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(a,b){var c=this;c.on(a,function d(){c.removeListener(a,d),b.apply(this,arguments)});return this},a.prototype.removeListener=function(a,b){if("function"!=typeof b)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[a])return this;var d=this._events[a];if(c(d)){var e=d.indexOf(b);if(e<0)return this;d.splice(e,1),d.length==0&&delete this._events[a]}else this._events[a]===b&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){a&&this._events&&this._events[a]&&(this._events[a]=null);return this},a.prototype.listeners=function(a){this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]);return this._events[a]}}.call(a.exports),__require.modules.events._cached=a.exports;return a.exports},require.modules.stream=function(){var a={exports:{}},b=a.exports,c=".",d="stream",e=function(a){return __require(a,".")};e.resolve=function(a){return __require.resolve(name,".")},e.modules=__require.modules,__require.modules.stream._cached=a.exports,function(){}.call(a.exports),__require.modules.stream._cached=a.exports;return a.exports},require.modules["/socket.io.js"]=function(){var a={exports:{}},b=a.exports,c="/",d="/socket.io.js",e=function(a){return __require(a,"/")};e.resolve=function(a){return __require.resolve(name,"/")},e.modules=__require.modules,__require.modules["/socket.io.js"]._cached=a.exports,function(){function f(a){var b=document.getElementsByTagName("object"),d=b.length,e=[];if(d>0)for(var f=0;f<d;f++)typeof b[f].SetVariable!="undefined"&&(e[e.length]=b[f]);var g=document.getElementsByTagName("embed"),h=g.length,i=[];if(h>0)for(var j=0;j<h;j++)typeof g[j].SetVariable!="undefined"&&(i[i.length]=g[j]);var k=e.length,l=i.length,m="bridgeName="+a;if(k==1&&!l||k==1&&l==1)c.attachBridge(e[0],a);else if(l==1&&!k)c.attachBridge(i[0],a);else{var n=!1;if(k>1)for(var o=0;o<k;o++){var p=e[o].childNodes;for(var q=0;q<p.length;q++){var r=p[q];if(r.nodeType==1&&r.tagName.toLowerCase()=="param"&&r.name.toLowerCase()=="flashvars"&&r.value.indexOf(m)>=0){c.attachBridge(e[o],a),n=!0;break}}if(n)break}if(!n&&l>1)for(var s=0;s<l;s++){var t=i[s].attributes.getNamedItem("flashVars").nodeValue;if(t.indexOf(m)>=0){c.attachBridge(i[s],a);break}}}return!0}function e(a){var b=a[0],d=a.concat();d.shift();var e=c.extractBridgeFromID(b);return e.invokeLocalFunction(b,d)}function d(a){this.fb_instance_id=a;return this}function c(a,b){this.target=a,this.remoteTypeCache={},this.remoteInstanceCache={},this.remoteFunctionCache={},this.localFunctionCache={},this.bridgeID=c.nextBridgeID++,this.name=b,this.nextLocalFuncID=0,c.instances[this.name]=this,c.idMap[this.bridgeID]=this;return this}var a=this.io={version:"0.6.2",setPath:function(a){window.console&&console.error&&console.error("io.setPath will be removed. Please set the variable WEB_SOCKET_SWF_LOCATION pointing to WebSocketMain.swf"),this.path=/\/$/.test(a)?a:a+"/",WEB_SOCKET_SWF_LOCATION=a+"lib/vendor/web-socket-js/WebSocketMain.swf"}};"jQuery"in this&&(jQuery.io=this.io),typeof window!="undefined"&&typeof WEB_SOCKET_SWF_LOCATION=="undefined"&&(WEB_SOCKET_SWF_LOCATION="/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf"),function(){var b=!1;a.util={ios:!1,load:function(a){if(/loaded|complete/.test(document.readyState)||b)return a();"attachEvent"in window?window.attachEvent("onload",a):window.addEventListener("load",a,!1)},inherit:function(a,b){for(var c in b.prototype)a.prototype[c]=b.prototype[c]},indexOf:function(a,b,c){for(var d=a.length,e=c<0?Math.max(0,d+c):c||0;e<d;e++)if(a[e]===b)return e;return-1},isArray:function(a){return Object.prototype.toString.call(a)==="[object Array]"},merge:function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}},a.util.ios=/iphone|ipad/i.test(navigator.userAgent),a.util.android=/android/i.test(navigator.userAgent),a.util.opera=/opera/i.test(navigator.userAgent),a.util.load(function(){b=!0})}(),function(){var b="~m~",c=function(a){if(Object.prototype.toString.call(a)=="[object Object]"){if("JSON"in window)return"~j~"+JSON.stringify(a);"console"in window&&console.error&&console.error("Trying to encode as JSON, but JSON.stringify is missing.");return'{ "$error": "Invalid message" }'}return String(a)};Transport=a.Transport=function(b,c){this.base=b,this.options={timeout:15e3},a.util.merge(this.options,c)},Transport.prototype.send=function(){throw new Error("Missing send() implementation")},Transport.prototype.connect=function(){throw new Error("Missing connect() implementation")},Transport.prototype.disconnect=function(){throw new Error("Missing disconnect() implementation")},Transport.prototype._encode=function(d){var e="",f,d=a.util.isArray(d)?d:[d];for(var g=0,h=d.length;g<h;g++)f=d[g]===null||d[g]===undefined?"":c(d[g]),e+=b+f.length+b+f;return e},Transport.prototype._decode=function(a){var c=[],d,e;do{if(a.substr(0,3)!==b)return c;a=a.substr(3),d="",e="";for(var f=0,g=a.length;f<g;f++){e=Number(a.substr(f,1));if(a.substr(f,1)==e)d+=e;else{a=a.substr(d.length+b.length),d=Number(d);break}}c.push(a.substr(0,d)),a=a.substr(d)}while(a!=="");return c},Transport.prototype._onData=function(a){this._setTimeout();var b=this._decode(a);if(b&&b.length)for(var c=0,d=b.length;c<d;c++)this._onMessage(b[c])},Transport.prototype._setTimeout=function(){var a=this;this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){a._onTimeout()},this.options.timeout)},Transport.prototype._onTimeout=function(){this._onDisconnect()},Transport.prototype._onMessage=function(a){this.sessionid?a.substr(0,3)=="~h~"?this._onHeartbeat(a.substr(3)):a.substr(0,3)=="~j~"?this.base._onMessage(JSON.parse(a.substr(3))):this.base._onMessage(a):(this.sessionid=a,this._onConnect())},Transport.prototype._onHeartbeat=function(a){this.send("~h~"+a)},Transport.prototype._onConnect=function(){this.connected=!0,this.connecting=!1,this.base._onConnect(),this._setTimeout()},Transport.prototype._onDisconnect=function(){this.connecting=!1,this.connected=!1,this.sessionid=null,this.base._onDisconnect()},Transport.prototype._prepareUrl=function(){return(this.base.options.secure?"https":"http")+"://"+this.base.host+":"+this.base.options.port+"/"+this.base.options.resource+"/"+this.type+(this.sessionid?"/"+this.sessionid:"/")}}(),function(){var b=new Function,c=function(){if("XMLHttpRequest"in window){var a=new XMLHttpRequest;return a.withCredentials!=undefined}return!1}(),d=function(a){if("XDomainRequest"in window&&a)return new XDomainRequest;if("XMLHttpRequest"in window&&(!a||c))return new XMLHttpRequest;if(!a){try{var b=new ActiveXObject("MSXML2.XMLHTTP");return b}catch(d){}try{var e=new ActiveXObject("Microsoft.XMLHTTP");return e}catch(d){}}return!1},e=a.Transport.XHR=function(){a.Transport.apply(this,arguments),this._sendBuffer=[]};a.util.inherit(e,a.Transport),e.prototype.connect=function(){this._get();return this},e.prototype._checkSend=function(){if(!this._posting&&this._sendBuffer.length){var a=this._encode(this._sendBuffer);this._sendBuffer=[],this._send(a)}},e.prototype.send=function(b){a.util.isArray(b)?this._sendBuffer.push.apply(this._sendBuffer,b):this._sendBuffer.push(b),this._checkSend();return this},e.prototype._send=function(a){var c=this;this._posting=!0,this._sendXhr=this._request("send","POST"),this._sendXhr.onreadystatechange=function(){var a;if(c._sendXhr.readyState==4){c._sendXhr.onreadystatechange=b;try{a=c._sendXhr.status}catch(d){}c._posting=!1,a==200?c._checkSend():c._onDisconnect()}},this._sendXhr.send("data="+encodeURIComponent(a))},e.prototype.disconnect=function(){this._onDisconnect();return this},e.prototype._onDisconnect=function(){if(this._xhr){this._xhr.onreadystatechange=b;try{this._xhr.abort()}catch(c){}this._xhr=null}if(this._sendXhr){this._sendXhr.onreadystatechange=b;try{this._sendXhr.abort()}catch(c){}this._sendXhr=null}this._sendBuffer=[],a.Transport.prototype._onDisconnect.call(this)},e.prototype._request=function(a,b,c){var e=d(this.base._isXDomain());c&&(e.multipart=!0),e.open(b||"GET",this._prepareUrl()+(a?"/"+a:"")),b=="POST"&&"setRequestHeader"in e&&e.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=utf-8");return e},e.check=function(a){try{if(d(a))return!0}catch(b){}return!1},e.xdomainCheck=function(){return e.check(!0)},e.request=d}(),function(){var b=a.Transport.websocket=function(){a.Transport.apply(this,arguments)};a.util.inherit(b,a.Transport),b.prototype.type="websocket",b.prototype.connect=function(){var a=this;this.socket=new WebSocket(this._prepareUrl()),this.socket.onmessage=function(b){a._onData(b.data)},this.socket.onclose=function(b){a._onClose()},this.socket.onerror=function(b){a._onError(b)};return this},b.prototype.send=function(a){this.socket&&this.socket.send(this._encode(a));return this},b.prototype.disconnect=function(){this.socket&&this.socket.close();return this},b.prototype._onClose=function(){this._onDisconnect();return this},b.prototype._onError=function(a){this.base.emit("error",[a])},b.prototype._prepareUrl=function(){return(this.base.options.secure?"wss":"ws")+"://"+this.base.host+":"+this.base.options.port+"/"+this.base.options.resource+"/"+this.type+(this.sessionid?"/"+this.sessionid:"")},b.check=function(){return"WebSocket"in window&&WebSocket.prototype&&WebSocket.prototype.send&&!!WebSocket.prototype.send.toString().match(/native/i)&&typeof WebSocket!="undefined"},b.xdomainCheck=function(){return!0}}(),function(){var b=a.Transport.flashsocket=function(){a.Transport.websocket.apply(this,arguments)};a.util.inherit(b,a.Transport.websocket),b.prototype.type="flashsocket",b.prototype.connect=function(){var b=this,c=arguments;WebSocket.__addTask(function(){a.Transport.websocket.prototype.connect.apply(b,c)});return this},b.prototype.send=function(){var b=this,c=arguments;WebSocket.__addTask(function(){a.Transport.websocket.prototype.send.apply(b,c)});return this},b.check=function(){if(typeof WebSocket!="undefined"&&"__addTask"in WebSocket){if(a.util.opera)return!1;if("navigator"in window&&"plugins"in navigator&&navigator.plugins["Shockwave Flash"])return!!navigator.plugins["Shockwave Flash"].description;if("ActiveXObject"in window)try{return!!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(b){}return!1}return!1},b.xdomainCheck=function(){return!0}}(),function(){var b=a.Transport.htmlfile=function(){a.Transport.XHR.apply(this,arguments)};a.util.inherit(b,a.Transport.XHR),b.prototype.type="htmlfile",b.prototype._get=function(){var a=this;this._open(),window.attachEvent("onunload",function(){a._destroy()})},b.prototype._open=function(){this._doc=new ActiveXObject("htmlfile"),this._doc.open(),this._doc.write("<html></html>"),this._doc.parentWindow.s=this,this._doc.close();var a=this._doc.createElement("div");this._doc.body.appendChild(a),this._iframe=this._doc.createElement("iframe"),a.appendChild(this._iframe),this._iframe.src=this._prepareUrl()+"/"+ +(new Date)},b.prototype._=function(a,b){this._onData(a);var c=b.getElementsByTagName("script")[0];c.parentNode.removeChild(c)},b.prototype._destroy=function(){this._iframe&&(this._iframe.src="about:blank",this._doc=null,CollectGarbage())},b.prototype.disconnect=function(){this._destroy();return a.Transport.XHR.prototype.disconnect.call(this)},b.check=function(){if("ActiveXObject"in window)try{var b=new ActiveXObject("htmlfile");return b&&a.Transport.XHR.check()}catch(c){}return!1},b.xdomainCheck=function(){return!1}}(),function(){var b=a.Transport["xhr-multipart"]=function(){a.Transport.XHR.apply(this,arguments)};a.util.inherit(b,a.Transport.XHR),b.prototype.type="xhr-multipart",b.prototype._get=function(){var a=this;this._xhr=this._request("","GET",!0),this._xhr.onreadystatechange=function(){a._xhr.readyState==4&&a._onData(a._xhr.responseText)},this._xhr.send(null)},b.check=function(){return"XMLHttpRequest"in window&&"prototype"in XMLHttpRequest&&"multipart"in XMLHttpRequest.prototype},b.xdomainCheck=function(){return!0}}(),function(){var b=new Function,c=a.Transport["xhr-polling"]=function(){a.Transport.XHR.apply(this,arguments)};a.util.inherit(c,a.Transport.XHR),c.prototype.type="xhr-polling",c.prototype.connect=function(){if(a.util.ios||a.util.android){var b=this;a.util.load(function(){setTimeout(function(){a.Transport.XHR.prototype.connect.call(b)},10)})}else a.Transport.XHR.prototype.connect.call(this)},c.prototype._get=function(){var a=this;this._xhr=this._request(+(new Date),"GET"),this._xhr.onreadystatechange=function(){var c;if(a._xhr.readyState==4){a._xhr.onreadystatechange=b;try{c=a._xhr.status}catch(d){}c==200?(a._onData(a._xhr.responseText),a._get()):a._onDisconnect()}},this._xhr.send(null)},c.check=function(){return a.Transport.XHR.check()},c.xdomainCheck=function(){return a.Transport.XHR.xdomainCheck()}}(),a.JSONP=[],JSONPPolling=a.Transport["jsonp-polling"]=function(){a.Transport.XHR.apply(this,arguments),this._insertAt=document.getElementsByTagName("script")[0],this._index=a.JSONP.length,a.JSONP.push(this)},a.util.inherit(JSONPPolling,a.Transport["xhr-polling"]),JSONPPolling.prototype.type="jsonp-polling",JSONPPolling.prototype._send=function(a){function h(){b._iframe&&b._form.removeChild(b._iframe);try{f=document.createElement('<iframe name="'+b._iframeId+'">')}catch(a){f=document.createElement("iframe"),f.name=b._iframeId}f.id=b._iframeId,b._form.appendChild(f),b._iframe=f}function g(){h(),b._posting=!1,b._checkSend()}var b=this;if(!("_form"in this)){var c=document.createElement("FORM"),d=document.createElement("TEXTAREA"),e=this._iframeId="socket_io_iframe_"+this._index,f;c.style.position="absolute",c.style.top="-1000px",c.style.left="-1000px",c.target=e,c.method="POST",c.action=this._prepareUrl()+"/"+ +(new Date)+"/"+this._index,d.name="data",c.appendChild(d),this._insertAt.parentNode.insertBefore(c,this._insertAt),document.body.appendChild(c),this._form=c,this._area=d}h(),this._posting=!0,this._area.value=a;try{this._form.submit()}catch(i){}this._iframe.attachEvent?f.onreadystatechange=function(){b._iframe.readyState=="complete"&&g()}:this._iframe.onload=g},JSONPPolling.prototype._get=function(){var a=this,b=document.createElement("SCRIPT");this._script&&(this._script.parentNode.removeChild(this._script),this._script=null),b.async=!0,b.src=this._prepareUrl()+"/"+ +(new Date)+"/"+this._index,b.onerror=function(){a._onDisconnect()},this._insertAt.parentNode.insertBefore(b,this._insertAt),this._script=b},JSONPPolling.prototype._=function(){this._onData.apply(this,arguments),this._get();return this},JSONPPolling.check=function(){return!0},JSONPPolling.xdomainCheck=function(){return!0},function(){var b=a.Socket=function(b,c){this.host=b||document.domain,this.options={secure:!1,document:document,port:document.location.port||80,resource:"socket.io",transports:["websocket","flashsocket","htmlfile","xhr-multipart","xhr-polling","jsonp-polling"],transportOptions:{"xhr-polling":{timeout:25e3},"jsonp-polling":{timeout:25e3}},connectTimeout:5e3,tryTransportsOnConnectTimeout:!0,rememberTransport:!0},a.util.merge(this.options,c),this.connected=!1,this.connecting=!1,this._events={},this.transport=this.getTransport(),!this.transport&&"console"in window&&console.error("No transport available")};b.prototype.getTransport=function(b){var c=b||this.options.transports,d;this.options.rememberTransport&&!b&&(d=this.options.document.cookie.match("(?:^|;)\\s*socketio=([^;]*)"),d&&(this._rememberedTransport=!0,c=[decodeURIComponent(d[1])]));for(var e=0,f;f=c[e];e++)if(a.Transport[f]&&a.Transport[f].check()&&(!this._isXDomain()||a.Transport[f].xdomainCheck()))return new a.Transport[f](this,this.options.transportOptions[f]||{});return null},b.prototype.connect=function(){if(this.transport&&!this.connected){this.connecting&&this.disconnect(),this.connecting=!0,this.emit("connecting",[this.transport.type]),this.transport.connect();if(this.options.connectTimeout){var a=this;this.connectTimeoutTimer=setTimeout(function(){if(!a.connected){a.disconnect();if(a.options.tryTransportsOnConnectTimeout&&!a._rememberedTransport){a._remainingTransports||(a._remainingTransports=a.options.transports.slice(0));var b=a._remainingTransports;while(b.length>0&&b.splice(0,1)[0]!=a.transport.type);b.length&&(a.transport=a.getTransport(b),a.connect())}(!a._remainingTransports||a._remainingTransports.length==0)&&a.emit("connect_failed")}a._remainingTransports&&a._remainingTransports.length==0&&delete a._remainingTransports},this.options.connectTimeout)}}return this},b.prototype.send=function(a){if(!this.transport||!this.transport.connected)return this._queue(a);this.transport.send(a);return this},b.prototype.disconnect=function(){this.connectTimeoutTimer&&clearTimeout(this.connectTimeoutTimer),this.transport.disconnect();return this},b.prototype.on=function(a,b){a in this._events||(this._events[a]=[]),this._events[a].push(b);return this},b.prototype.emit=function(a,b){if(a in this._events){var c=this._events[a].concat();for(var d=0,e=c.length;d<e;d++)c[d].apply(this,b===undefined?[]:b)}return this},b.prototype.removeEvent=function(a,b){if(a in this._events)for(var c=0,d=this._events[a].length;c<d;c++)this._events[a][c]==b&&this._events[a].splice(c,1);return this},b.prototype._queue=function(a){"_queueStack"in this||(this._queueStack=[]),this._queueStack.push(a);return this},b.prototype._doQueue=function(){if("_queueStack"in this&&!!this._queueStack.length){this.transport.send(this._queueStack),this._queueStack=[];return this}return this},b.prototype._isXDomain=function(){return this.host!==document.domain},b.prototype._onConnect=function(){this.connected=!0,this.connecting=!1,this._doQueue(),this.options.rememberTransport&&(this.options.document.cookie="socketio="+encodeURIComponent(this.transport.type)),this.emit("connect")},b.prototype._onMessage=function(a){this.emit("message",[a])},b.prototype._onDisconnect=function(){var a=this.connected;this.connected=!1,this.connecting=!1,this._queueStack=[],a&&this.emit("disconnect")},b.prototype.fire=b.prototype.emit,b.prototype.addListener=b.prototype.addEvent=b.prototype.addEventListener=b.prototype.on}();var b=function(){function W(b){var c=/[\\\"<>\.;]/,d=c.exec(b)!=null;return d&&typeof encodeURIComponent!=a?encodeURIComponent(b):b}function V(a,b){if(!!y){var c=b?"visible":"hidden";u&&Q(a)?Q(a).style.visibility=c:U("#"+a,"visibility:"+c)}}function U(b,d,e,f){if(!z.ie||!z.mac){var g=j.getElementsByTagName("head")[0];if(!g)return;var h=e&&typeof e=="string"?e:"screen";f&&(w=null,x=null);if(!w||x!=h){var i=R("style");i.setAttribute("type","text/css"),i.setAttribute("media",h),w=g.appendChild(i),z.ie&&z.win&&typeof j.styleSheets!=a&&j.styleSheets.length>0&&(w=j.styleSheets[j.styleSheets.length-1]),x=h}z.ie&&z.win?w&&typeof w.addRule==c&&w.addRule(b,d):w&&typeof j.createTextNode!=a&&w.appendChild(j.createTextNode(b+" {"+d+"}"))}}function T(a){var b=z.pv,c=a.split(".");c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0;return b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}function S(a,b,c){a.attachEvent(b,c),p[p.length]=[a,b,c]}function R(a){return j.createElement(a)}function Q(a){var b=null;try{b=j.getElementById(a)}catch(c){}return b}function P(a){var b=Q(a);if(b){for(var c in b)typeof b[c]=="function"&&(b[c]=null);b.parentNode.removeChild(b)}}function O(a){var b=Q(a);b&&b.nodeName=="OBJECT"&&(z.ie&&z.win?(b.style.display="none",function(){b.readyState==4?P(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function N(a,b,c){var d=R("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)}function M(b,d,e){var g,h=Q(e);if(z.wk&&z.wk<312)return g;if(h){typeof b.id==a&&(b.id=e);if(z.ie&&z.win){var i="";for(var j in b)b[j]!=Object.prototype[j]&&(j.toLowerCase()=="data"?d.movie=b[j]:j.toLowerCase()=="styleclass"?i+=' class="'+b[j]+'"':j.toLowerCase()!="classid"&&(i+=" "+j+'="'+b[j]+'"'));var k="";for(var l in d)d[l]!=Object.prototype[l]&&(k+='<param name="'+l+'" value="'+d[l]+'" />');h.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+k+"</object>",o[o.length]=b.id,g=Q(b.id)}else{var m=R(c);m.setAttribute("type",f);for(var n in b)b[n]!=Object.prototype[n]&&(n.toLowerCase()=="styleclass"?m.setAttribute("class",b[n]):n.toLowerCase()!="classid"&&m.setAttribute(n,b[n]));for(var p in d)d[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"&&N(m,p,d[p]);h.parentNode.replaceChild(m,h),g=m}}return g}function L(a){var b=R("div");if(z.win&&z.ie)b.innerHTML=a.innerHTML;else{var d=a.getElementsByTagName(c)[0];if(d){var e=d.childNodes;if(e){var f=e.length;for(var g=0;g<f;g++)(e[g].nodeType!=1||e[g].nodeName!="PARAM")&&e[g].nodeType!=8&&b.appendChild(e[g].cloneNode(!0))}}}return b}function K(a){if(z.ie&&z.win&&a.readyState!=4){var b=R("div");a.parentNode.insertBefore(b,a),b.parentNode.replaceChild(L(a),b),a.style.display="none",function(){a.readyState==4?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}else a.parentNode.replaceChild(L(a),a)}function J(b,c,d,e){v=!0,s=e||null,t={success:!1,id:d};var f=Q(d);if(f){f.nodeName=="OBJECT"?(q=L(f),r=null):(q=f,r=d),b.id=g;if(typeof b.width==a||!/%$/.test(b.width)&&parseInt(b.width,10)<310)b.width="310";if(typeof b.height==a||!/%$/.test(b.height)&&parseInt(b.height,10)<137)b.height="137";j.title=j.title.slice(0,47)+" - Flash Player Installation";var h=z.ie&&z.win?"ActiveX":"PlugIn",k="MMredirectURL="+i.location.toString().replace(/&/g,"%26")+"&MMplayerType="+h+"&MMdoctitle="+j.title;typeof c.flashvars!=a?c.flashvars+="&"+k:c.flashvars=k;if(z.ie&&z.win&&f.readyState!=4){var l=R("div");d+="SWFObjectNew",l.setAttribute("id",d),f.parentNode.insertBefore(l,f),f.style.display="none",function(){f.readyState==4?f.parentNode.removeChild(f):setTimeout(arguments.callee,10)}()}M(b,c,d)}}function I(){return!v&&T("6.0.65")&&(z.win||z.mac)&&!(z.wk&&z.wk<312)}function H(b){var d=null,e=Q(b);if(e&&e.nodeName=="OBJECT")if(typeof e.SetVariable!=a)d=e;else{var f=e.getElementsByTagName(c)[0];f&&(d=f)}return d}function G(){var b=n.length;if(b>0)for(var c=0;c<b;c++){var d=n[c].id,e=n[c].callbackFn,f={success:!1,id:d};if(z.pv[0]>0){var g=Q(d);if(g)if(T(n[c].swfVersion)&&!(z.wk&&z.wk<312))V(d,!0),e&&(f.success=!0,f.ref=H(d),e(f));else if(n[c].expressInstall&&I()){var h={};h.data=n[c].expressInstall,h.width=g.getAttribute("width")||"0",h.height=g.getAttribute("height")||"0",g.getAttribute("class")&&(h.styleclass=g.getAttribute("class")),g.getAttribute("align")&&(h.align=g.getAttribute("align"));var i={},j=g.getElementsByTagName("param"),k=j.length;for(var l=0;l<k;l++)j[l].getAttribute("name").toLowerCase()!="movie"&&(i[j[l].getAttribute("name")]=j[l].getAttribute("value"));J(h,i,d,e)}else K(g),e&&e(f)}else{V(d,!0);if(e){var m=H(d);m&&typeof m.SetVariable!=a&&(f.success=!0,f.ref=m),e(f)}}}}function F(){var b=j.getElementsByTagName("body")[0],d=R(c);d.setAttribute("type",f);var e=b.appendChild(d);if(e){var g=0;(function(){if(typeof e.GetVariable!=a){var c=e.GetVariable("$version");c&&(c=c.split(" ")[1].split(","),z.pv=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)])}else if(g<10){g++,setTimeout(arguments.callee,10);return}b.removeChild(d),e=null,G()})()}else G()}function E(){l?F():G()}function D(b){if(typeof i.addEventListener!=a)i.addEventListener("load",b,!1);else if(typeof j.addEventListener!=a)j.addEventListener("load",b,!1);else if(typeof i.attachEvent!=a)S(i,"onload",b);else if(typeof i.onload=="function"){var c=i.onload;i.onload=function(){c(),b()}}else i.onload=b}function C(a){u?a():m[m.length]=a}function B(){if(!u){try{var a=j.getElementsByTagName("body")[0].appendChild(R("span"));a.parentNode.removeChild(a)}catch(b){return}u=!0;var c=m.length;for(var d=0;d<c;d++)m[d]()}}var a="undefined",c="object",d="Shockwave Flash",e="ShockwaveFlash.ShockwaveFlash",f="application/x-shockwave-flash",g="SWFObjectExprInst",h="onreadystatechange",i=window,j=document,k=navigator,l=!1,m=[E],n=[],o=[],p=[],q,r,s,t,u=!1,v=!1,w,x,y=!0,z=function(){var b=typeof j.getElementById!=a&&typeof j.getElementsByTagName!=a&&typeof j.createElement!=a,g=k.userAgent.toLowerCase(),h=k.platform.toLowerCase(),m=h?/win/.test(h):/win/.test(g),n=h?/mac/.test(h):/mac/.test(g),o=/webkit/.test(g)?parseFloat(g.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,p=!1,q=[0,0,0],r=null;if(typeof k.plugins!=a&&typeof k.plugins[d]==c)r=k.plugins[d].description,r&&(typeof k.mimeTypes==a||!k.mimeTypes[f]||!!k.mimeTypes[f].enabledPlugin)&&(l=!0,p=!1,r=r.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),q[0]=parseInt(r.replace(/^(.*)\..*$/,"$1"),10),q[1]=parseInt(r.replace(/^.*\.(.*)\s.*$/,"$1"),10),q[2]=/[a-zA-Z]/.test(r)?parseInt(r.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof i.ActiveXObject!=a)try{var s=new ActiveXObject(e);s&&(r=s.GetVariable("$version"),r&&(p=!0,r=r.split(" ")[1].split(","),q=[parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10)]))}catch(t){}return{w3:b,pv:q,wk:o,ie:p,win:m,mac:n}}(),A=function(){!z.w3||((typeof j.readyState!=a&&j.readyState=="complete"||typeof j.readyState==a&&(j.getElementsByTagName("body")[0]||j.body))&&B(),u||(typeof j.addEventListener!=a&&j.addEventListener("DOMContentLoaded",B,!1),z.ie&&z.win&&(j.attachEvent(h,function(){j.readyState=="complete"&&(j.detachEvent(h,arguments.callee),B())}),i==top&&function(){if(!u){try{j.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}B()}}()),z.wk&&function(){if(!u){if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}B()}}(),D(B)))}(),X=function(){z.ie&&z.win&&window.attachEvent("onunload",function(){var a=p.length;for(var c=0;c<a;c++)p[c][0].detachEvent(p[c][1],p[c][2]);var d=o.length;for(var e=0;e<d;e++)O(o[e]);for(var f in z)z[f]=null;z=null;for(var g in b)b[g]=null;b=null})}();return{registerObject:function(a,b,c,d){if(z.w3&&a&&b){var e={};e.id=a,e.swfVersion=b,e.expressInstall=c,e.callbackFn=d,n[n.length]=e,V(a,!1)}else d&&d({success:!1,id:a})},getObjectById:function(a){if(z.w3)return H(a)},embedSWF:function(b,d,e,f,g,h,i,j,k,l){var m={success:!1,id:d};z.w3&&!(z.wk&&z.wk<312)&&b&&d&&e&&f&&g?(V(d,!1),C(function(){e+="",f+="";var n={};if(k&&typeof k===c)for(var o in k)n[o]=k[o];n.data=b,n.width=e,n.height=f;var p={};if(j&&typeof j===c)for(var q in j)p[q]=j[q];if(i&&typeof i===c)for(var r in i)typeof p.flashvars!=a?p.flashvars+="&"+r+"="+i[r]:p.flashvars=r+"="+i[r];if(T(g)){var s=M(n,p,d);n.id==d&&V(d,!0),m.success=!0,m.ref=s}else{if(h&&I()){n.data=h,J(n,p,d,l);return}V(d,!0)}l&&l(m)})):l&&l(m)},switchOffAutoHideShow:function(){y=!1},ua:z,getFlashPlayerVersion:function(){return{major:z.pv[0],minor:z.pv[1],release:z.pv[2]}},hasFlashPlayerVersion:T,createSWF:function(a,b,c){return z.w3?M(a,b,c):undefined},showExpressInstall:function(a,b,c,d){z.w3&&I()&&J(a,b,c,d)},removeSWF:function(a){z.w3&&O(a)},createCSS:function(a,b,c,d){z.w3&&U(a,b,c,d)},addDomLoadEvent:C,addLoadEvent:D,getQueryParamValue:function(a){var b=j.location.search||j.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return W(b);var c=b.split("&");for(var d=0;d<c.length;d++)if(c[d].substring(0,c[d].indexOf("="))==a)return W(c[d].substring(c[d].indexOf("=")+1))}return""},expressInstallCallback:function(){if(v){var a=Q(g);a&&q&&(a.parentNode.replaceChild(q,a),r&&(V(r,!0),z.ie&&z.win&&(q.style.display="block")),s&&s(t)),v=!1}}}}();c.TYPE_ASINSTANCE=1,c.TYPE_ASFUNCTION=2,c.TYPE_JSFUNCTION=3,c.TYPE_ANONYMOUS=4,c.initCallbacks={},c.userTypes={},c.addToUserTypes=function(){for(var a=0;a<arguments.length;a++)c.userTypes[arguments[a]]={typeName:arguments[a],enriched:!1}},c.argsToArray=function(a){var b=[];for(var c=0;c<a.length;c++)b[c]=a[c];return b},c.addInitializationCallback=function(a,b){var d=c.instances[a];if(d!=undefined)b.call(d);else{var e=c.initCallbacks[a];e==null&&(c.initCallbacks[a]=e=[]),e.push(b)}},c.nextBridgeID=0,c.instances={},c.idMap={},c.refCount=0,c.extractBridgeFromID=function(a){var b=a>>16;return c.idMap[b]},c.attachBridge=function(a,b){var d=new c(a,b);c[b]=d;var e=c.initCallbacks[b];if(e!=null){for(var f=0;f<e.length;f++)e[f].call(d);delete c.initCallbacks[b]}},c.blockedMethods={toString:!0,get:!0,set:!0,call:!0},c.prototype={root:function(){return this.deserialize(this.target.getRoot())},releaseASObjects:function(){return this.target.releaseASObjects()},releaseNamedASObject:function(a){if(typeof a!="object")return!1;var b=this.target.releaseNamedASObject(a.fb_instance_id);return b},create:function(a){return this.deserialize(this.target.create(a))},makeID:function(a){return(this.bridgeID<<16)+a},getPropertyFromAS:function(a,b){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,retVal=this.target.getPropFromAS(a,b),retVal=this.handleError(retVal),c.refCount--;return retVal},setPropertyInAS:function(a,b,d){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,retVal=this.target.setPropInAS(a,b,this.serialize(d)),retVal=this.handleError(retVal),c.refCount--;return retVal},callASFunction:function(a,b){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,retVal=this.target.invokeASFunction(a,this.serialize(b)),retVal=this.handleError(retVal),c.refCount--;return retVal},callASMethod:function(a,b,d){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,d=this.serialize(d),retVal=this.target.invokeASMethod(a,b,d),retVal=this.handleError(retVal),c.refCount--;return retVal},invokeLocalFunction:function(a,b){var c,d=this.localFunctionCache[a];d!=undefined&&(c=this.serialize(d.apply(null,this.deserialize(b))));return c},getTypeFromName:function(a){return this.remoteTypeCache[a]},createProxy:function(a,b){var c=this.getTypeFromName(b);d.prototype=c;var e=new d(a);this.remoteInstanceCache[a]=e;return e},getProxy:function(a){return this.remoteInstanceCache[a]},addTypeDataToCache:function(a){var b=new ASProxy(this,a.name),d=a.accessors;for(var e=0;e<d.length;e++)this.addPropertyToType(b,d[e]);var f=a.methods;for(var e=0;e<f.length;e++)c.blockedMethods[f[e]]==undefined&&this.addMethodToType(b,f[e]);this.remoteTypeCache[b.typeName]=b;return b},addPropertyToType:function(a,b){var c=b.charAt(0),d,e;c>="a"&&c<="z"?(e="get"+c.toUpperCase()+b.substr(1),d="set"+c.toUpperCase()+b.substr(1)):(e="get"+b,d="set"+b),a[d]=function(a){this.bridge.setPropertyInAS(this.fb_instance_id,b,a)},a[e]=function(){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,b))}},addMethodToType:function(a,b){a[b]=function(){return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id,b,c.argsToArray(arguments)))}},getFunctionProxy:function(a){var b=this;this.remoteFunctionCache[a]==null&&(this.remoteFunctionCache[a]=function(){b.callASFunction(a,c.argsToArray(arguments))});return this.remoteFunctionCache[a]},getFunctionID:function(a){a.__bridge_id__==undefined&&(a.__bridge_id__=this.makeID(this.nextLocalFuncID++),this.localFunctionCache[a.__bridge_id__]=a);return a.__bridge_id__},serialize:function(a){var b={},d=typeof a;if(d=="number"||d=="string"||d=="boolean"||d==null||d==undefined)b=a;else if(a instanceof Array){b=[];for(var e=0;e<a.length;e++)b[e]=this.serialize(a[e])}else d=="function"?(b.type=c.TYPE_JSFUNCTION,b.value=this.getFunctionID(a)):a instanceof ASProxy?(b.type=c.TYPE_ASINSTANCE,b.value=a.fb_instance_id):(b.type=c.TYPE_ANONYMOUS,b.value=a);return b},deserialize:function(a){var b,d=typeof a;if(d=="number"||d=="string"||d=="boolean"||a==null||a==undefined)b=this.handleError(a);else if(a instanceof Array){b=[];for(var e=0;e<a.length;e++)b[e]=this.deserialize(a[e])}else if(d=="object"){for(var e=0;e<a.newTypes.length;e++)this.addTypeDataToCache(a.newTypes[e]);for(var f in a.newRefs)this.createProxy(f,a.newRefs[f]);a.type==c.TYPE_PRIMITIVE?b=a.value:a.type==c.TYPE_ASFUNCTION?b=this.getFunctionProxy(a.value):a.type==c.TYPE_ASINSTANCE?b=this.getProxy(a.value):a.type==c.TYPE_ANONYMOUS&&(b=a.value)}return b},addRef:function(a){this.target.incRef(a.fb_instance_id)},release:function(a){this.target.releaseRef(a.fb_instance_id)},handleError:function(a){if(typeof a=="string"&&a.indexOf("__FLASHERROR")==0){var b=a.split("||");c.refCount>0&&c.refCount--;throw new Error(b[1])}return a}},ASProxy=function(a,b){this.bridge=a,this.typeName=b;return this},ASProxy.prototype={get:function(a){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,a))},set:function(a,b){this.bridge.setPropertyInAS(this.fb_instance_id,a,b)},call:function(a,b){this.bridge.callASMethod(this.fb_instance_id,a,b)},addRef:function(){this.bridge.addRef(this)},release:function(){this.bridge.release(this)}},function(){function d(){}if(!window.WebSocket){var a=window.console;if(!a||!a.log||!a.error)a={log:function(){},error:function(){}};if(!b.hasFlashPlayerVersion("9.0.0")){a.error("Flash Player is not installed.");return}location.protocol=="file:"&&a.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),WebSocket=function(a,b,c,d,e){var f=this;f.readyState=WebSocket.CONNECTING,f.bufferedAmount=0,setTimeout(function(){WebSocket.__addTask(function(){f.__createFlash(a,b,c,d,e)})},0)},WebSocket.prototype.__createFlash=function(a,b,c,d,e){var f=this;f.__flash=WebSocket.__flash.create(a,b,c||null,d||0,e||null),f.__flash.addEventListener("event",function(a){setTimeout(function(){f.__handleEvents()},0)})},WebSocket.prototype.send=function(a){if(!this.__flash||this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var b=this.__flash.send(encodeURIComponent(a));if(b<0)return!0;this.bufferedAmount+=b;return!1},WebSocket.prototype.close=function(){var a=this;if(!!a.__flash){if(a.readyState==WebSocket.CLOSED||a.readyState==WebSocket.CLOSING)return;a.__flash.close(),a.readyState=WebSocket.CLOSED,a.__timer&&clearInterval(a.__timer),a.onclose&&setTimeout(a.onclose,0)}},WebSocket.prototype.addEventListener=function(a,b,c){"__events"in this||(this.__events={}),a in this.__events||(this.__events[a]=[],"function"==typeof this["on"+a]&&(this.__events[a].defaultHandler=this["on"+a],this["on"+a]=this.__createEventHandler(this,a))),this.__events[a].push(b)},WebSocket.prototype.removeEventListener=function(a,b,c){"__events"in this||(this.__events={});if(a in this.__events)for(var d=this.__events.length;d>-1;--d)if(b===this.__events[a][d]){this.__events[a].splice(d,1);break}},WebSocket.prototype.dispatchEvent=function(a){if(!("__events"in this))throw"UNSPECIFIED_EVENT_TYPE_ERR";if(!(a.type in this.__events))throw"UNSPECIFIED_EVENT_TYPE_ERR";for(var b=0,c=this.__events[a.type].length;b<c;++b){this.__events[a.type][b](a);if(a.cancelBubble)break}!1!==a.returnValue&&"function"==typeof this.__events[a.type].defaultHandler&&this.__events[a.type].defaultHandler(a)},WebSocket.prototype.__handleEvents=function(){var b=this.__flash.receiveEvents();for(var c=0;c<b.length;c++)try{var d=b[c];"readyState"in d&&(this.readyState=d.readyState);if(d.type=="open")this.__timer&&clearInterval(this.__timer),window.opera&&(this.__timer=setInterval(function(){this.__handleEvents()},500)),this.onopen&&this.onopen();else if(d.type=="close")this.__timer&&clearInterval(this.__timer),this.onclose&&this.onclose();else if(d.type=="message"){if(this.onmessage){var e=decodeURIComponent(d.data),f;window.MessageEvent&&!window.opera?(f=document.createEvent("MessageEvent"),f.initMessageEvent("message",!1,!1,e,null,null,window,null)):f={data:e},this.onmessage(f)}}else if(d.type=="error")this.__timer&&clearInterval(this.__timer),this.onerror&&this.onerror();else throw"unknown event type: "+d.type}catch(f){a.error(f.toString())}},WebSocket.prototype.__createEventHandler=function(a,b){return function(c){var e=new d;e.initEvent(b,!0,!0),e.target=e.currentTarget=a;for(var f in c)e[f]=c[f];a.dispatchEvent(e,arguments)}},d.prototype.cancelable=!0,d.prototype.cancelBubble=!1,d.prototype.preventDefault=function(){this.cancelable&&(this.returnValue=!1)},d.prototype.stopPropagation=function(){this.cancelBubble=!0},d.prototype.initEvent=function(a,b,c){this.type=a,this.cancelable=c,this.timeStamp=new Date},WebSocket.CONNECTING=0,WebSocket.OPEN=1,WebSocket.CLOSING=2,WebSocket.CLOSED=3,WebSocket.__tasks=[],WebSocket.loadFlashPolicyFile=function(a){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(a)})},WebSocket.__initialize=function(){WebSocket.__swfLocation&&(window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation);if(!window.WEB_SOCKET_SWF_LOCATION)a.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");else{var d=document.createElement("div");d.id="webSocketContainer",d.style.position="absolute",WebSocket.__isFlashLite()?(d.style.left="0px",d.style.top="0px"):(d.style.left="-100px",d.style.top="-100px");var e=document.createElement("div");e.id="webSocketFlash",d.appendChild(e),document.body.appendChild(d),b.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","9.0.0",null,{bridgeName:"webSocket"},{hasPriority:!0,allowScriptAccess:"always"},null,function(b){b.success||a.error("[WebSocket] swfobject.embedSWF failed")}),c.addInitializationCallback("webSocket",function(){try{WebSocket.__flash=c.webSocket.root(),WebSocket.__flash.setCallerUrl(location.href),WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);for(var b=0;b<WebSocket.__tasks.length;++b)WebSocket.__tasks[b]();WebSocket.__tasks=[]}catch(d){a.error("[WebSocket] "+d.toString())}})}},WebSocket.__addTask=function(a){WebSocket.__flash?a():WebSocket.__tasks.push(a)},WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return!1;var a=window.navigator.mimeTypes["application/x-shockwave-flash"];return!a||!a.enabledPlugin||!a.enabledPlugin.filename?!1:a.enabledPlugin.filename.match(/flashlite/i)?!0:!1},window.webSocketLog=function(b){a.log(decodeURIComponent(b))},window.webSocketError=function(b){a.error(decodeURIComponent(b))},window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",WebSocket.__initialize,!1):window.attachEvent("onload",WebSocket.__initialize))}}()}.call(a.exports),__require.modules["/socket.io.js"]._cached=a.exports;return a.exports}; return require("/index.js")})() | ||
var DNode = (function () {var require=function(a,b){var c=require.resolve(a,b||"/"),d=require.modules[c];if(!d)throw new Error("Failed to resolve module "+a+", tried "+c);var e=d._cached?d._cached:d();return e},__require=require;require.paths=[],require.modules={},require.extensions=[".js",".coffee"],require.resolve=function(){var a={assert:!0,events:!0,fs:!0,path:!0,vm:!0};return function(b,c){function k(a){var b;a==="/"?b=[""]:b=d.normalize(a).split("/");var c=[];for(var e=b.length-1;e>=0;e--){if(b[e]==="node_modules")continue;var f=b.slice(0,e+1).join("/")+"/node_modules";c.push(f)}return c}function j(a,b){var c=k(b);for(var d=0;d<c.length;d++){var e=c[d],f=h(e+"/"+a);if(f)return f;var g=i(e+"/"+a);if(g)return g}var f=h(a);if(f)return f}function i(a){a=a.replace(/\/+$/,"");var b=a+"/package.json";if(require.modules[b]){var c=require.modules[b](),e=c.browserify;if(typeof e=="object"&&e.main){var f=h(d.resolve(a,e.main));if(f)return f}else if(typeof e=="string"){var f=h(d.resolve(a,e));if(f)return f}else if(c.main){var f=h(d.resolve(a,c.main));if(f)return f}}return h(a+"/index")}function h(a){if(require.modules[a])return a;for(var b=0;b<require.extensions.length;b++){var c=require.extensions[b];if(require.modules[a+c])return a+c}}c||(c="/");if(a[b])return b;var d=require.modules.path(),e=c||".";if(b.match(/^(?:\.\.?\/|\/)/)){var f=h(d.resolve(e,b))||i(d.resolve(e,b));if(f)return f}var g=j(b,e);if(g)return g;throw new Error("Cannot find module '"+b+"'")}}(),require.alias=function(a,b){var c=require.modules.path(),d=null;try{d=require.resolve(a+"/package.json","/")}catch(e){d=require.resolve(a,"/")}var f=c.dirname(d);Object.keys(require.modules).forEach(function(a){if(a.slice(0,f.length+1)===f+"/"){var c=a.slice(f.length);require.modules[b+c]=require.modules[f+c]}else a===f&&(require.modules[b]=require.modules[f])})},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(a){setTimeout(a,0)}),process.title||(process.title="browser"),process.binding||(process.binding=function(a){if(a==="evals")return require("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),require.modules.path=function(){var a={exports:{}},b=a.exports,c=".",d="path",e=function(a){return __require(a,".")};e.resolve=function(a){return __require.resolve(name,".")},e.modules=__require.modules,__require.modules.path._cached=a.exports,function(){function a(a,b){var c=0;for(var d=a.length;d>=0;d--){var e=a[d];e=="."?a.splice(d,1):e===".."?(a.splice(d,1),c++):c&&(a.splice(d,1),c--)}if(b)for(;c--;c)a.unshift("..");return a}var c=/^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/;b.resolve=function(){var b="",c=!1;for(var d=arguments.length;d>=-1&&!c;d--){var e=d>=0?arguments[d]:process.cwd();if(typeof e!="string"||!e)continue;b=e+"/"+b,c=e.charAt(0)==="/"}b=a(b.split("/").filter(function(a){return!!a}),!c).join("/");return(c?"/":"")+b||"."},b.normalize=function(b){var c=b.charAt(0)==="/",d=b.slice(-1)==="/";b=a(b.split("/").filter(function(a){return!!a}),!c).join("/"),!b&&!c&&(b="."),b&&d&&(b+="/");return(c?"/":"")+b},b.join=function(){var a=Array.prototype.slice.call(arguments,0);return b.normalize(a.filter(function(a,b){return a&&typeof a=="string"}).join("/"))},b.dirname=function(a){var b=c.exec(a)[1]||"",d=!1;return b?b.length===1||d&&b.length<=3&&b.charAt(1)===":"?b:b.substring(0,b.length-1):"."},b.basename=function(a,b){var d=c.exec(a)[2]||"";b&&d.substr(-1*b.length)===b&&(d=d.substr(0,d.length-b.length));return d},b.extname=function(a){return c.exec(a)[3]||""}}.call(a.exports),__require.modules.path._cached=a.exports;return a.exports},require.modules["/index.js"]=function(){var a={exports:{}},b=a.exports,c="/",d="/index.js",e=function(a){return __require(a,"/")};e.resolve=function(a){return __require.resolve(name,"/")},e.modules=__require.modules,__require.modules["/index.js"]._cached=a.exports,function(){function g(a){if(this instanceof g){this.proto=b(a),this.stack=[];return this}return new g(a)}var b=e("dnode-protocol"),c=e("events").EventEmitter,d=e("./socket.io").io,f=a.exports=g;g.prototype=new c,g.prototype.use=function(a){this.stack.push(a);return this},g.prototype.connect=function(){var a=this,c=b.parseArgs(arguments),e=a.proto.create();c.port||(c.port=parseInt(window.location.port,10)),isNaN(c.port)&&delete c.port;var f=e.socketio=new d.Socket(c.host||window.location.hostname,c);e.end=function(){f.disconnect()},f.on("connect",function(){e.start(),a.emit("connect")}),f.on("disconnect",function(){e.emit("end"),a.emit("end")}),f.on("message",e.parse),e.on("request",function(a){f.send(JSON.stringify(a)+"\n")}),c.block&&e.on("remote",function(){c.block.call(e.instance,e.remote,e)}),this.stack.forEach(function(a){a.call(e.instance,e.remote,e)}),f.connect()},f.connect=function(){var a=f();return a.connect.apply(a,arguments)}}.call(a.exports),__require.modules["/index.js"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/package.json"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol",d="/node_modules/dnode-protocol/package.json",e=function(a){return __require(a,"/node_modules/dnode-protocol")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/package.json"]._cached=a.exports,function(){a.exports={name:"dnode-protocol",description:"Implements the dnode protocol abstractly",version:"0.0.12",repository:"https://github.com/substack/dnode-protocol.git",author:{name:"James Halliday",email:"mail@substack.net",url:"http://substack.net"},main:"./index.js",dependencies:{traverse:">=0.3.1"},scripts:{test:"expresso"},engines:{node:">=0.2.0"}}}.call(a.exports),__require.modules["/node_modules/dnode-protocol/package.json"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/index.js"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol",d="/node_modules/dnode-protocol/index.js",e=function(a){return __require(a,"/node_modules/dnode-protocol")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/index.js"]._cached=a.exports,function(){var b=e("traverse"),c=e("events").EventEmitter,d=process.title==="browser"?{}:e("stream"),f=a.exports=function(a){var b={};b.sessions={},b.create=function(){var c=null;do c=Math.floor(Math.random()*Math.pow(2,32)).toString(16);while(b.sessions[c]);var d=g(c,a);b.sessions[c]=d;return d},b.destroy=function(a){delete b.sessions[a]};return b},g=f.Session=function(a,b){function j(a,b,c){try{a.apply(b,c)}catch(e){d.emit("error",e)}}function i(a){typeof a!="object"&&(a={}),Object.keys(d.remote).forEach(function(a){delete d.remote[a]}),Object.keys(a).forEach(function(b){d.remote[b]=a[b]}),d.emit("remote",d.remote),d.emit("ready")}var d=new c;d.id=a,d.remote={};var e=d.instance=typeof b=="function"?new b(d.remote,d):b||{},f=new h;d.start=function(){d.request("methods",[e])},d.request=function(a,b){var c=f.scrub(b);d.emit("request",{method:a,arguments:c.arguments,callbacks:c.callbacks,links:c.links})},d.parse=function(a){var b=null;try{b=JSON.parse(a)}catch(c){d.emit("error",new SyntaxError("Error parsing JSON message: "+JSON.stringify(a)));return}try{d.handle(b)}catch(c){d.emit("error",c)}};var g={};d.handle=function(a){var b=f.unscrub(a,function(a){a in g||(g[a]=function(){d.request(a,[].slice.apply(arguments))});return g[a]});if(a.method==="methods")i(b[0]);else if(a.method==="error"){var c=b[0];d.emit("remoteError",c)}else typeof a.method=="string"?d.instance.propertyIsEnumerable(a.method)?j(d.instance[a.method],d.instance,b):d.emit("error",new Error("Request for non-enumerable method: "+a.method)):typeof a.method=="number"&&j(f.callbacks[a.method],d.instance,b)};return d},h=f.Scrubber=function(){function f(a,b){for(var c=0;c<b.length;c++){var d=b[c];if(Object.propertyIsEnumerable.call(a,d))a=a[d];else return undefined}return a}function e(a,b,c){var d=a;for(var e=0;e<b.length-1;e++){var f=b[e];if(Object.propertyIsEnumerable.call(d,f))d=d[f];else return undefined}var g=b.slice(-1)[0];if(g===undefined)return c;d[g]=c;return a}var a={};a.callbacks={};var c=[],d=0;a.scrub=function(e){var f={},g=[],h=b(e).map(function(b){if(typeof b=="function"){var e=c.indexOf(b);e>=0&&!(e in f)?f[e]=this.path:(a.callbacks[d]=b,c.push(b),f[d]=this.path,d++),this.update("[Function]")}else this.circular&&(g.push({from:this.circular.path,to:this.path}),this.update("[Circular]"))});return{arguments:h,callbacks:f,links:g}},a.unscrub=function(a,b){var c=a.arguments||[];Object.keys(a.callbacks||{}).forEach(function(d){var f=parseInt(d,10),g=a.callbacks[f];c=e(c,g,b(f))}),(a.links||[]).forEach(function(a){var b=f(c,a.from);c=e(c,a.to,b)});return c};return a},i=f.parseArgs=function(a){var b={};[].slice.call(a).forEach(function(a){if(typeof a=="string")a.match(/^\d+$/)?b.port=parseInt(a,10):a.match("^/")?b.path=a:b.host=a;else if(typeof a=="number")b.port=a;else if(typeof a=="function")b.block=a;else if(typeof a=="object")a.__proto__===Object.prototype?Object.keys(a).forEach(function(c){b[c]=a[c]}):d.Stream&&a instanceof d.Stream?b.stream=a:b.server=a;else if(typeof a!="undefined")throw new Error("Not sure what to do about "+typeof a+" objects")});return b}}.call(a.exports),__require.modules["/node_modules/dnode-protocol/index.js"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/node_modules/traverse/package.json"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol/node_modules/traverse",d="/node_modules/dnode-protocol/node_modules/traverse/package.json",e=function(a){return __require(a,"/node_modules/dnode-protocol/node_modules/traverse")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol/node_modules/traverse")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/node_modules/traverse/package.json"]._cached=a.exports,function(){a.exports={name:"traverse",version:"0.4.6",description:"Traverse and transform objects by visiting every node on a recursive walk",author:"James Halliday",license:"MIT/X11",main:"./index",repository:{type:"git",url:"http://github.com/substack/js-traverse.git"},devDependencies:{expresso:"0.7.x"},scripts:{test:"expresso"}}}.call(a.exports),__require.modules["/node_modules/dnode-protocol/node_modules/traverse/package.json"]._cached=a.exports;return a.exports},require.modules["/node_modules/dnode-protocol/node_modules/traverse/index.js"]=function(){var a={exports:{}},b=a.exports,c="/node_modules/dnode-protocol/node_modules/traverse",d="/node_modules/dnode-protocol/node_modules/traverse/index.js",e=function(a){return __require(a,"/node_modules/dnode-protocol/node_modules/traverse")};e.resolve=function(a){return __require.resolve(name,"/node_modules/dnode-protocol/node_modules/traverse")},e.modules=__require.modules,__require.modules["/node_modules/dnode-protocol/node_modules/traverse/index.js"]._cached=a.exports,function(){function d(a){if(typeof a=="object"&&a!==null){var b;Array.isArray(a)?b=[]:a instanceof Date?b=new Date(a):a instanceof Boolean?b=new Boolean(a):a instanceof Number?b=new Number(a):a instanceof String?b=new String(a):b=Object.create(Object.getPrototypeOf(a)),Object.keys(a).forEach(function(c){b[c]=a[c]});return b}return a}function c(a,b,c){var e=[],f=[],g=!0;return function h(a){var i=c?d(a):a,j={},k=!0,l={node:i,node_:a,path:[].concat(e),parent:f[f.length-1],parents:f,key:e.slice(-1)[0],isRoot:e.length===0,level:e.length,circular:null,update:function(a,b){l.isRoot||(l.parent.node[l.key]=a),l.node=a,b&&(k=!1)},"delete":function(){delete l.parent.node[l.key]},remove:function(){Array.isArray(l.parent.node)?l.parent.node.splice(l.key,1):delete l.parent.node[l.key]},keys:null,before:function(a){j.before=a},after:function(a){j.after=a},pre:function(a){j.pre=a},post:function(a){j.post=a},stop:function(){g=!1},block:function(){k=!1}};if(!g)return l;if(typeof i=="object"&&i!==null){l.keys=Object.keys(i),l.isLeaf=l.keys.length==0;for(var m=0;m<f.length;m++)if(f[m].node_===a){l.circular=f[m];break}}else l.isLeaf=!0;l.notLeaf=!l.isLeaf,l.notRoot=!l.isRoot;var n=b.call(l,l.node);n!==undefined&&l.update&&l.update(n),j.before&&j.before.call(l,l.node);if(!k)return l;typeof l.node=="object"&&l.node!==null&&!l.circular&&(f.push(l),l.keys.forEach(function(a,b){e.push(a),j.pre&&j.pre.call(l,l.node[a],a);var d=h(l.node[a]);c&&Object.hasOwnProperty.call(l.node,a)&&(l.node[a]=d.node),d.isLast=b==l.keys.length-1,d.isFirst=b==0,j.post&&j.post.call(l,d),e.pop()}),f.pop()),j.after&&j.after.call(l,l.node);return l}(a).node}function b(a){if(this instanceof b)this.value=a;else return new b(a)}a.exports=b,b.prototype.get=function(a){var b=this.value;for(var c=0;c<a.length;c++){var d=a[c];if(!Object.hasOwnProperty.call(b,d)){b=undefined;break}b=b[d]}return b},b.prototype.set=function(a,b){var c=this.value;for(var d=0;d<a.length-1;d++){var e=a[d];Object.hasOwnProperty.call(c,e)||(c[e]={}),c=c[e]}c[a[d]]=b;return b},b.prototype.map=function(a){return c(this.value,a,!0)},b.prototype.forEach=function(a){this.value=c(this.value,a,!1);return this.value},b.prototype.reduce=function(a,b){var c=arguments.length===1,d=c?this.value:b;this.forEach(function(b){if(!this.isRoot||!c)d=a.call(this,d,b)});return d},b.prototype.deepEqual=function(a){if(arguments.length!==1)throw new Error("deepEqual requires exactly one object to compare against");var c=!0,d=a;this.forEach(function(e){var f=function(){c=!1;return undefined}.bind(this);if(!this.isRoot){if(typeof d!="object")return f();d=d[this.key]}var g=d;this.post(function(){d=g});var h=function(a){return Object.prototype.toString.call(a)};if(this.circular)b(a).get(this.circular.path)!==g&&f();else if(typeof g!=typeof e)f();else if(g===null||e===null||g===undefined||e===undefined)g!==e&&f();else if(g.__proto__!==e.__proto__)f();else if(g!==e)if(typeof g=="function")g instanceof RegExp?g.toString()!=e.toString()&&f():g!==e&&f();else if(typeof g=="object")if(h(e)==="[object Arguments]"||h(g)==="[object Arguments]")h(g)!==h(e)&&f();else if(g instanceof Date||e instanceof Date)(!(g instanceof Date)||!(e instanceof Date)||g.getTime()!==e.getTime())&&f();else{var i=Object.keys(g),j=Object.keys(e);if(i.length!==j.length)return f();for(var k=0;k<i.length;k++){var l=i[k];Object.hasOwnProperty.call(e,l)||f()}}});return c},b.prototype.paths=function(){var a=[];this.forEach(function(b){a.push(this.path)});return a},b.prototype.nodes=function(){var a=[];this.forEach(function(b){a.push(this.node)});return a},b.prototype.clone=function(){var a=[],b=[];return function c(e){for(var f=0;f<a.length;f++)if(a[f]===e)return b[f];if(typeof e=="object"&&e!==null){var g=d(e);a.push(e),b.push(g),Object.keys(e).forEach(function(a){g[a]=c(e[a])}),a.pop(),b.pop();return g}return e}(this.value)},Object.keys(b.prototype).forEach(function(a){b[a]=function(c){var d=[].slice.call(arguments,1),e=b(c);return e[a].apply(e,d)}})}.call(a.exports),__require.modules["/node_modules/dnode-protocol/node_modules/traverse/index.js"]._cached=a.exports;return a.exports},require.modules.events=function(){var a={exports:{}},b=a.exports,c=".",d="events",e=function(a){return __require(a,".")};e.resolve=function(a){return __require.resolve(name,".")},e.modules=__require.modules,__require.modules.events._cached=a.exports,function(){process.EventEmitter||(process.EventEmitter=function(){});var a=b.EventEmitter=process.EventEmitter,c=Array.isArray,d=10;a.prototype.setMaxListeners=function(a){this._events||(this._events={}),this._events.maxListeners=a},a.prototype.emit=function(a){if(a==="error")if(!this._events||!this._events.error||c(this._events.error)&&!this._events.error.length)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var b=this._events[a];if(!b)return!1;if(typeof b=="function"){switch(arguments.length){case 1:b.call(this);break;case 2:b.call(this,arguments[1]);break;case 3:b.call(this,arguments[1],arguments[2]);break;default:var d=Array.prototype.slice.call(arguments,1);b.apply(this,d)}return!0}if(c(b)){var d=Array.prototype.slice.call(arguments,1),e=b.slice();for(var f=0,g=e.length;f<g;f++)e[f].apply(this,d);return!0}return!1},a.prototype.addListener=function(a,b){if("function"!=typeof b)throw new Error("addListener only takes instances of Function");this._events||(this._events={}),this.emit("newListener",a,b);if(!this._events[a])this._events[a]=b;else if(c(this._events[a])){if(!this._events[a].warned){var e;this._events.maxListeners!==undefined?e=this._events.maxListeners:e=d,e&&e>0&&this._events[a].length>e&&(this._events[a].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[a].length),console.trace())}this._events[a].push(b)}else this._events[a]=[this._events[a],b];return this},a.prototype.on=a.prototype.addListener,a.prototype.once=function(a,b){var c=this;c.on(a,function d(){c.removeListener(a,d),b.apply(this,arguments)});return this},a.prototype.removeListener=function(a,b){if("function"!=typeof b)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[a])return this;var d=this._events[a];if(c(d)){var e=d.indexOf(b);if(e<0)return this;d.splice(e,1),d.length==0&&delete this._events[a]}else this._events[a]===b&&delete this._events[a];return this},a.prototype.removeAllListeners=function(a){a&&this._events&&this._events[a]&&(this._events[a]=null);return this},a.prototype.listeners=function(a){this._events||(this._events={}),this._events[a]||(this._events[a]=[]),c(this._events[a])||(this._events[a]=[this._events[a]]);return this._events[a]}}.call(a.exports),__require.modules.events._cached=a.exports;return a.exports},require.modules.stream=function(){var a={exports:{}},b=a.exports,c=".",d="stream",e=function(a){return __require(a,".")};e.resolve=function(a){return __require.resolve(name,".")},e.modules=__require.modules,__require.modules.stream._cached=a.exports,function(){}.call(a.exports),__require.modules.stream._cached=a.exports;return a.exports},require.modules["/socket.io.js"]=function(){var a={exports:{}},b=a.exports,c="/",d="/socket.io.js",e=function(a){return __require(a,"/")};e.resolve=function(a){return __require.resolve(name,"/")},e.modules=__require.modules,__require.modules["/socket.io.js"]._cached=a.exports,function(){function f(a){var b=document.getElementsByTagName("object"),d=b.length,e=[];if(d>0)for(var f=0;f<d;f++)typeof b[f].SetVariable!="undefined"&&(e[e.length]=b[f]);var g=document.getElementsByTagName("embed"),h=g.length,i=[];if(h>0)for(var j=0;j<h;j++)typeof g[j].SetVariable!="undefined"&&(i[i.length]=g[j]);var k=e.length,l=i.length,m="bridgeName="+a;if(k==1&&!l||k==1&&l==1)c.attachBridge(e[0],a);else if(l==1&&!k)c.attachBridge(i[0],a);else{var n=!1;if(k>1)for(var o=0;o<k;o++){var p=e[o].childNodes;for(var q=0;q<p.length;q++){var r=p[q];if(r.nodeType==1&&r.tagName.toLowerCase()=="param"&&r.name.toLowerCase()=="flashvars"&&r.value.indexOf(m)>=0){c.attachBridge(e[o],a),n=!0;break}}if(n)break}if(!n&&l>1)for(var s=0;s<l;s++){var t=i[s].attributes.getNamedItem("flashVars").nodeValue;if(t.indexOf(m)>=0){c.attachBridge(i[s],a);break}}}return!0}function e(a){var b=a[0],d=a.concat();d.shift();var e=c.extractBridgeFromID(b);return e.invokeLocalFunction(b,d)}function d(a){this.fb_instance_id=a;return this}function c(a,b){this.target=a,this.remoteTypeCache={},this.remoteInstanceCache={},this.remoteFunctionCache={},this.localFunctionCache={},this.bridgeID=c.nextBridgeID++,this.name=b,this.nextLocalFuncID=0,c.instances[this.name]=this,c.idMap[this.bridgeID]=this;return this}var a=this.io={version:"0.6.2",setPath:function(a){window.console&&console.error&&console.error("io.setPath will be removed. Please set the variable WEB_SOCKET_SWF_LOCATION pointing to WebSocketMain.swf"),this.path=/\/$/.test(a)?a:a+"/",WEB_SOCKET_SWF_LOCATION=a+"lib/vendor/web-socket-js/WebSocketMain.swf"}};"jQuery"in this&&(jQuery.io=this.io),typeof window!="undefined"&&typeof WEB_SOCKET_SWF_LOCATION=="undefined"&&(WEB_SOCKET_SWF_LOCATION="/socket.io/lib/vendor/web-socket-js/WebSocketMain.swf"),function(){var b=!1;a.util={ios:!1,load:function(a){if(/loaded|complete/.test(document.readyState)||b)return a();"attachEvent"in window?window.attachEvent("onload",a):window.addEventListener("load",a,!1)},inherit:function(a,b){for(var c in b.prototype)a.prototype[c]=b.prototype[c]},indexOf:function(a,b,c){for(var d=a.length,e=c<0?Math.max(0,d+c):c||0;e<d;e++)if(a[e]===b)return e;return-1},isArray:function(a){return Object.prototype.toString.call(a)==="[object Array]"},merge:function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])}},a.util.ios=/iphone|ipad/i.test(navigator.userAgent),a.util.android=/android/i.test(navigator.userAgent),a.util.opera=/opera/i.test(navigator.userAgent),a.util.load(function(){b=!0})}(),function(){var b="~m~",c=function(a){if(Object.prototype.toString.call(a)=="[object Object]"){if("JSON"in window)return"~j~"+JSON.stringify(a);"console"in window&&console.error&&console.error("Trying to encode as JSON, but JSON.stringify is missing.");return'{ "$error": "Invalid message" }'}return String(a)};Transport=a.Transport=function(b,c){this.base=b,this.options={timeout:15e3},a.util.merge(this.options,c)},Transport.prototype.send=function(){throw new Error("Missing send() implementation")},Transport.prototype.connect=function(){throw new Error("Missing connect() implementation")},Transport.prototype.disconnect=function(){throw new Error("Missing disconnect() implementation")},Transport.prototype._encode=function(d){var e="",f,d=a.util.isArray(d)?d:[d];for(var g=0,h=d.length;g<h;g++)f=d[g]===null||d[g]===undefined?"":c(d[g]),e+=b+f.length+b+f;return e},Transport.prototype._decode=function(a){var c=[],d,e;do{if(a.substr(0,3)!==b)return c;a=a.substr(3),d="",e="";for(var f=0,g=a.length;f<g;f++){e=Number(a.substr(f,1));if(a.substr(f,1)==e)d+=e;else{a=a.substr(d.length+b.length),d=Number(d);break}}c.push(a.substr(0,d)),a=a.substr(d)}while(a!=="");return c},Transport.prototype._onData=function(a){this._setTimeout();var b=this._decode(a);if(b&&b.length)for(var c=0,d=b.length;c<d;c++)this._onMessage(b[c])},Transport.prototype._setTimeout=function(){var a=this;this._timeout&&clearTimeout(this._timeout),this._timeout=setTimeout(function(){a._onTimeout()},this.options.timeout)},Transport.prototype._onTimeout=function(){this._onDisconnect()},Transport.prototype._onMessage=function(a){this.sessionid?a.substr(0,3)=="~h~"?this._onHeartbeat(a.substr(3)):a.substr(0,3)=="~j~"?this.base._onMessage(JSON.parse(a.substr(3))):this.base._onMessage(a):(this.sessionid=a,this._onConnect())},Transport.prototype._onHeartbeat=function(a){this.send("~h~"+a)},Transport.prototype._onConnect=function(){this.connected=!0,this.connecting=!1,this.base._onConnect(),this._setTimeout()},Transport.prototype._onDisconnect=function(){this.connecting=!1,this.connected=!1,this.sessionid=null,this.base._onDisconnect()},Transport.prototype._prepareUrl=function(){return(this.base.options.secure?"https":"http")+"://"+this.base.host+":"+this.base.options.port+"/"+this.base.options.resource+"/"+this.type+(this.sessionid?"/"+this.sessionid:"/")}}(),function(){var b=new Function,c=function(){if("XMLHttpRequest"in window){var a=new XMLHttpRequest;return a.withCredentials!=undefined}return!1}(),d=function(a){if("XDomainRequest"in window&&a)return new XDomainRequest;if("XMLHttpRequest"in window&&(!a||c))return new XMLHttpRequest;if(!a){try{var b=new ActiveXObject("MSXML2.XMLHTTP");return b}catch(d){}try{var e=new ActiveXObject("Microsoft.XMLHTTP");return e}catch(d){}}return!1},e=a.Transport.XHR=function(){a.Transport.apply(this,arguments),this._sendBuffer=[]};a.util.inherit(e,a.Transport),e.prototype.connect=function(){this._get();return this},e.prototype._checkSend=function(){if(!this._posting&&this._sendBuffer.length){var a=this._encode(this._sendBuffer);this._sendBuffer=[],this._send(a)}},e.prototype.send=function(b){a.util.isArray(b)?this._sendBuffer.push.apply(this._sendBuffer,b):this._sendBuffer.push(b),this._checkSend();return this},e.prototype._send=function(a){var c=this;this._posting=!0,this._sendXhr=this._request("send","POST"),this._sendXhr.onreadystatechange=function(){var a;if(c._sendXhr.readyState==4){c._sendXhr.onreadystatechange=b;try{a=c._sendXhr.status}catch(d){}c._posting=!1,a==200?c._checkSend():c._onDisconnect()}},this._sendXhr.send("data="+encodeURIComponent(a))},e.prototype.disconnect=function(){this._onDisconnect();return this},e.prototype._onDisconnect=function(){if(this._xhr){this._xhr.onreadystatechange=b;try{this._xhr.abort()}catch(c){}this._xhr=null}if(this._sendXhr){this._sendXhr.onreadystatechange=b;try{this._sendXhr.abort()}catch(c){}this._sendXhr=null}this._sendBuffer=[],a.Transport.prototype._onDisconnect.call(this)},e.prototype._request=function(a,b,c){var e=d(this.base._isXDomain());c&&(e.multipart=!0),e.open(b||"GET",this._prepareUrl()+(a?"/"+a:"")),b=="POST"&&"setRequestHeader"in e&&e.setRequestHeader("Content-type","application/x-www-form-urlencoded; charset=utf-8");return e},e.check=function(a){try{if(d(a))return!0}catch(b){}return!1},e.xdomainCheck=function(){return e.check(!0)},e.request=d}(),function(){var b=a.Transport.websocket=function(){a.Transport.apply(this,arguments)};a.util.inherit(b,a.Transport),b.prototype.type="websocket",b.prototype.connect=function(){var a=this;this.socket=new WebSocket(this._prepareUrl()),this.socket.onmessage=function(b){a._onData(b.data)},this.socket.onclose=function(b){a._onClose()},this.socket.onerror=function(b){a._onError(b)};return this},b.prototype.send=function(a){this.socket&&this.socket.send(this._encode(a));return this},b.prototype.disconnect=function(){this.socket&&this.socket.close();return this},b.prototype._onClose=function(){this._onDisconnect();return this},b.prototype._onError=function(a){this.base.emit("error",[a])},b.prototype._prepareUrl=function(){return(this.base.options.secure?"wss":"ws")+"://"+this.base.host+":"+this.base.options.port+"/"+this.base.options.resource+"/"+this.type+(this.sessionid?"/"+this.sessionid:"")},b.check=function(){return"WebSocket"in window&&WebSocket.prototype&&WebSocket.prototype.send&&!!WebSocket.prototype.send.toString().match(/native/i)&&typeof WebSocket!="undefined"},b.xdomainCheck=function(){return!0}}(),function(){var b=a.Transport.flashsocket=function(){a.Transport.websocket.apply(this,arguments)};a.util.inherit(b,a.Transport.websocket),b.prototype.type="flashsocket",b.prototype.connect=function(){var b=this,c=arguments;WebSocket.__addTask(function(){a.Transport.websocket.prototype.connect.apply(b,c)});return this},b.prototype.send=function(){var b=this,c=arguments;WebSocket.__addTask(function(){a.Transport.websocket.prototype.send.apply(b,c)});return this},b.check=function(){if(typeof WebSocket!="undefined"&&"__addTask"in WebSocket){if(a.util.opera)return!1;if("navigator"in window&&"plugins"in navigator&&navigator.plugins["Shockwave Flash"])return!!navigator.plugins["Shockwave Flash"].description;if("ActiveXObject"in window)try{return!!(new ActiveXObject("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}catch(b){}return!1}return!1},b.xdomainCheck=function(){return!0}}(),function(){var b=a.Transport.htmlfile=function(){a.Transport.XHR.apply(this,arguments)};a.util.inherit(b,a.Transport.XHR),b.prototype.type="htmlfile",b.prototype._get=function(){var a=this;this._open(),window.attachEvent("onunload",function(){a._destroy()})},b.prototype._open=function(){this._doc=new ActiveXObject("htmlfile"),this._doc.open(),this._doc.write("<html></html>"),this._doc.parentWindow.s=this,this._doc.close();var a=this._doc.createElement("div");this._doc.body.appendChild(a),this._iframe=this._doc.createElement("iframe"),a.appendChild(this._iframe),this._iframe.src=this._prepareUrl()+"/"+ +(new Date)},b.prototype._=function(a,b){this._onData(a);var c=b.getElementsByTagName("script")[0];c.parentNode.removeChild(c)},b.prototype._destroy=function(){this._iframe&&(this._iframe.src="about:blank",this._doc=null,CollectGarbage())},b.prototype.disconnect=function(){this._destroy();return a.Transport.XHR.prototype.disconnect.call(this)},b.check=function(){if("ActiveXObject"in window)try{var b=new ActiveXObject("htmlfile");return b&&a.Transport.XHR.check()}catch(c){}return!1},b.xdomainCheck=function(){return!1}}(),function(){var b=a.Transport["xhr-multipart"]=function(){a.Transport.XHR.apply(this,arguments)};a.util.inherit(b,a.Transport.XHR),b.prototype.type="xhr-multipart",b.prototype._get=function(){var a=this;this._xhr=this._request("","GET",!0),this._xhr.onreadystatechange=function(){a._xhr.readyState==4&&a._onData(a._xhr.responseText)},this._xhr.send(null)},b.check=function(){return"XMLHttpRequest"in window&&"prototype"in XMLHttpRequest&&"multipart"in XMLHttpRequest.prototype},b.xdomainCheck=function(){return!0}}(),function(){var b=new Function,c=a.Transport["xhr-polling"]=function(){a.Transport.XHR.apply(this,arguments)};a.util.inherit(c,a.Transport.XHR),c.prototype.type="xhr-polling",c.prototype.connect=function(){if(a.util.ios||a.util.android){var b=this;a.util.load(function(){setTimeout(function(){a.Transport.XHR.prototype.connect.call(b)},10)})}else a.Transport.XHR.prototype.connect.call(this)},c.prototype._get=function(){var a=this;this._xhr=this._request(+(new Date),"GET"),this._xhr.onreadystatechange=function(){var c;if(a._xhr.readyState==4){a._xhr.onreadystatechange=b;try{c=a._xhr.status}catch(d){}c==200?(a._onData(a._xhr.responseText),a._get()):a._onDisconnect()}},this._xhr.send(null)},c.check=function(){return a.Transport.XHR.check()},c.xdomainCheck=function(){return a.Transport.XHR.xdomainCheck()}}(),a.JSONP=[],JSONPPolling=a.Transport["jsonp-polling"]=function(){a.Transport.XHR.apply(this,arguments),this._insertAt=document.getElementsByTagName("script")[0],this._index=a.JSONP.length,a.JSONP.push(this)},a.util.inherit(JSONPPolling,a.Transport["xhr-polling"]),JSONPPolling.prototype.type="jsonp-polling",JSONPPolling.prototype._send=function(a){function h(){b._iframe&&b._form.removeChild(b._iframe);try{f=document.createElement('<iframe name="'+b._iframeId+'">')}catch(a){f=document.createElement("iframe"),f.name=b._iframeId}f.id=b._iframeId,b._form.appendChild(f),b._iframe=f}function g(){h(),b._posting=!1,b._checkSend()}var b=this;if(!("_form"in this)){var c=document.createElement("FORM"),d=document.createElement("TEXTAREA"),e=this._iframeId="socket_io_iframe_"+this._index,f;c.style.position="absolute",c.style.top="-1000px",c.style.left="-1000px",c.target=e,c.method="POST",c.action=this._prepareUrl()+"/"+ +(new Date)+"/"+this._index,d.name="data",c.appendChild(d),this._insertAt.parentNode.insertBefore(c,this._insertAt),document.body.appendChild(c),this._form=c,this._area=d}h(),this._posting=!0,this._area.value=a;try{this._form.submit()}catch(i){}this._iframe.attachEvent?f.onreadystatechange=function(){b._iframe.readyState=="complete"&&g()}:this._iframe.onload=g},JSONPPolling.prototype._get=function(){var a=this,b=document.createElement("SCRIPT");this._script&&(this._script.parentNode.removeChild(this._script),this._script=null),b.async=!0,b.src=this._prepareUrl()+"/"+ +(new Date)+"/"+this._index,b.onerror=function(){a._onDisconnect()},this._insertAt.parentNode.insertBefore(b,this._insertAt),this._script=b},JSONPPolling.prototype._=function(){this._onData.apply(this,arguments),this._get();return this},JSONPPolling.check=function(){return!0},JSONPPolling.xdomainCheck=function(){return!0},function(){var b=a.Socket=function(b,c){this.host=b||document.domain,this.options={secure:!1,document:document,port:document.location.port||80,resource:"socket.io",transports:["websocket","flashsocket","htmlfile","xhr-multipart","xhr-polling","jsonp-polling"],transportOptions:{"xhr-polling":{timeout:25e3},"jsonp-polling":{timeout:25e3}},connectTimeout:5e3,tryTransportsOnConnectTimeout:!0,rememberTransport:!0},a.util.merge(this.options,c),this.connected=!1,this.connecting=!1,this._events={},this.transport=this.getTransport(),!this.transport&&"console"in window&&console.error("No transport available")};b.prototype.getTransport=function(b){var c=b||this.options.transports,d;this.options.rememberTransport&&!b&&(d=this.options.document.cookie.match("(?:^|;)\\s*socketio=([^;]*)"),d&&(this._rememberedTransport=!0,c=[decodeURIComponent(d[1])]));for(var e=0,f;f=c[e];e++)if(a.Transport[f]&&a.Transport[f].check()&&(!this._isXDomain()||a.Transport[f].xdomainCheck()))return new a.Transport[f](this,this.options.transportOptions[f]||{});return null},b.prototype.connect=function(){if(this.transport&&!this.connected){this.connecting&&this.disconnect(),this.connecting=!0,this.emit("connecting",[this.transport.type]),this.transport.connect();if(this.options.connectTimeout){var a=this;this.connectTimeoutTimer=setTimeout(function(){if(!a.connected){a.disconnect();if(a.options.tryTransportsOnConnectTimeout&&!a._rememberedTransport){a._remainingTransports||(a._remainingTransports=a.options.transports.slice(0));var b=a._remainingTransports;while(b.length>0&&b.splice(0,1)[0]!=a.transport.type);b.length&&(a.transport=a.getTransport(b),a.connect())}(!a._remainingTransports||a._remainingTransports.length==0)&&a.emit("connect_failed")}a._remainingTransports&&a._remainingTransports.length==0&&delete a._remainingTransports},this.options.connectTimeout)}}return this},b.prototype.send=function(a){if(!this.transport||!this.transport.connected)return this._queue(a);this.transport.send(a);return this},b.prototype.disconnect=function(){this.connectTimeoutTimer&&clearTimeout(this.connectTimeoutTimer),this.transport.disconnect();return this},b.prototype.on=function(a,b){a in this._events||(this._events[a]=[]),this._events[a].push(b);return this},b.prototype.emit=function(a,b){if(a in this._events){var c=this._events[a].concat();for(var d=0,e=c.length;d<e;d++)c[d].apply(this,b===undefined?[]:b)}return this},b.prototype.removeEvent=function(a,b){if(a in this._events)for(var c=0,d=this._events[a].length;c<d;c++)this._events[a][c]==b&&this._events[a].splice(c,1);return this},b.prototype._queue=function(a){"_queueStack"in this||(this._queueStack=[]),this._queueStack.push(a);return this},b.prototype._doQueue=function(){if("_queueStack"in this&&!!this._queueStack.length){this.transport.send(this._queueStack),this._queueStack=[];return this}return this},b.prototype._isXDomain=function(){return this.host!==document.domain},b.prototype._onConnect=function(){this.connected=!0,this.connecting=!1,this._doQueue(),this.options.rememberTransport&&(this.options.document.cookie="socketio="+encodeURIComponent(this.transport.type)),this.emit("connect")},b.prototype._onMessage=function(a){this.emit("message",[a])},b.prototype._onDisconnect=function(){var a=this.connected;this.connected=!1,this.connecting=!1,this._queueStack=[],a&&this.emit("disconnect")},b.prototype.fire=b.prototype.emit,b.prototype.addListener=b.prototype.addEvent=b.prototype.addEventListener=b.prototype.on}();var b=function(){function W(b){var c=/[\\\"<>\.;]/,d=c.exec(b)!=null;return d&&typeof encodeURIComponent!=a?encodeURIComponent(b):b}function V(a,b){if(!!y){var c=b?"visible":"hidden";u&&Q(a)?Q(a).style.visibility=c:U("#"+a,"visibility:"+c)}}function U(b,d,e,f){if(!z.ie||!z.mac){var g=j.getElementsByTagName("head")[0];if(!g)return;var h=e&&typeof e=="string"?e:"screen";f&&(w=null,x=null);if(!w||x!=h){var i=R("style");i.setAttribute("type","text/css"),i.setAttribute("media",h),w=g.appendChild(i),z.ie&&z.win&&typeof j.styleSheets!=a&&j.styleSheets.length>0&&(w=j.styleSheets[j.styleSheets.length-1]),x=h}z.ie&&z.win?w&&typeof w.addRule==c&&w.addRule(b,d):w&&typeof j.createTextNode!=a&&w.appendChild(j.createTextNode(b+" {"+d+"}"))}}function T(a){var b=z.pv,c=a.split(".");c[0]=parseInt(c[0],10),c[1]=parseInt(c[1],10)||0,c[2]=parseInt(c[2],10)||0;return b[0]>c[0]||b[0]==c[0]&&b[1]>c[1]||b[0]==c[0]&&b[1]==c[1]&&b[2]>=c[2]?!0:!1}function S(a,b,c){a.attachEvent(b,c),p[p.length]=[a,b,c]}function R(a){return j.createElement(a)}function Q(a){var b=null;try{b=j.getElementById(a)}catch(c){}return b}function P(a){var b=Q(a);if(b){for(var c in b)typeof b[c]=="function"&&(b[c]=null);b.parentNode.removeChild(b)}}function O(a){var b=Q(a);b&&b.nodeName=="OBJECT"&&(z.ie&&z.win?(b.style.display="none",function(){b.readyState==4?P(a):setTimeout(arguments.callee,10)}()):b.parentNode.removeChild(b))}function N(a,b,c){var d=R("param");d.setAttribute("name",b),d.setAttribute("value",c),a.appendChild(d)}function M(b,d,e){var g,h=Q(e);if(z.wk&&z.wk<312)return g;if(h){typeof b.id==a&&(b.id=e);if(z.ie&&z.win){var i="";for(var j in b)b[j]!=Object.prototype[j]&&(j.toLowerCase()=="data"?d.movie=b[j]:j.toLowerCase()=="styleclass"?i+=' class="'+b[j]+'"':j.toLowerCase()!="classid"&&(i+=" "+j+'="'+b[j]+'"'));var k="";for(var l in d)d[l]!=Object.prototype[l]&&(k+='<param name="'+l+'" value="'+d[l]+'" />');h.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+i+">"+k+"</object>",o[o.length]=b.id,g=Q(b.id)}else{var m=R(c);m.setAttribute("type",f);for(var n in b)b[n]!=Object.prototype[n]&&(n.toLowerCase()=="styleclass"?m.setAttribute("class",b[n]):n.toLowerCase()!="classid"&&m.setAttribute(n,b[n]));for(var p in d)d[p]!=Object.prototype[p]&&p.toLowerCase()!="movie"&&N(m,p,d[p]);h.parentNode.replaceChild(m,h),g=m}}return g}function L(a){var b=R("div");if(z.win&&z.ie)b.innerHTML=a.innerHTML;else{var d=a.getElementsByTagName(c)[0];if(d){var e=d.childNodes;if(e){var f=e.length;for(var g=0;g<f;g++)(e[g].nodeType!=1||e[g].nodeName!="PARAM")&&e[g].nodeType!=8&&b.appendChild(e[g].cloneNode(!0))}}}return b}function K(a){if(z.ie&&z.win&&a.readyState!=4){var b=R("div");a.parentNode.insertBefore(b,a),b.parentNode.replaceChild(L(a),b),a.style.display="none",function(){a.readyState==4?a.parentNode.removeChild(a):setTimeout(arguments.callee,10)}()}else a.parentNode.replaceChild(L(a),a)}function J(b,c,d,e){v=!0,s=e||null,t={success:!1,id:d};var f=Q(d);if(f){f.nodeName=="OBJECT"?(q=L(f),r=null):(q=f,r=d),b.id=g;if(typeof b.width==a||!/%$/.test(b.width)&&parseInt(b.width,10)<310)b.width="310";if(typeof b.height==a||!/%$/.test(b.height)&&parseInt(b.height,10)<137)b.height="137";j.title=j.title.slice(0,47)+" - Flash Player Installation";var h=z.ie&&z.win?"ActiveX":"PlugIn",k="MMredirectURL="+i.location.toString().replace(/&/g,"%26")+"&MMplayerType="+h+"&MMdoctitle="+j.title;typeof c.flashvars!=a?c.flashvars+="&"+k:c.flashvars=k;if(z.ie&&z.win&&f.readyState!=4){var l=R("div");d+="SWFObjectNew",l.setAttribute("id",d),f.parentNode.insertBefore(l,f),f.style.display="none",function(){f.readyState==4?f.parentNode.removeChild(f):setTimeout(arguments.callee,10)}()}M(b,c,d)}}function I(){return!v&&T("6.0.65")&&(z.win||z.mac)&&!(z.wk&&z.wk<312)}function H(b){var d=null,e=Q(b);if(e&&e.nodeName=="OBJECT")if(typeof e.SetVariable!=a)d=e;else{var f=e.getElementsByTagName(c)[0];f&&(d=f)}return d}function G(){var b=n.length;if(b>0)for(var c=0;c<b;c++){var d=n[c].id,e=n[c].callbackFn,f={success:!1,id:d};if(z.pv[0]>0){var g=Q(d);if(g)if(T(n[c].swfVersion)&&!(z.wk&&z.wk<312))V(d,!0),e&&(f.success=!0,f.ref=H(d),e(f));else if(n[c].expressInstall&&I()){var h={};h.data=n[c].expressInstall,h.width=g.getAttribute("width")||"0",h.height=g.getAttribute("height")||"0",g.getAttribute("class")&&(h.styleclass=g.getAttribute("class")),g.getAttribute("align")&&(h.align=g.getAttribute("align"));var i={},j=g.getElementsByTagName("param"),k=j.length;for(var l=0;l<k;l++)j[l].getAttribute("name").toLowerCase()!="movie"&&(i[j[l].getAttribute("name")]=j[l].getAttribute("value"));J(h,i,d,e)}else K(g),e&&e(f)}else{V(d,!0);if(e){var m=H(d);m&&typeof m.SetVariable!=a&&(f.success=!0,f.ref=m),e(f)}}}}function F(){var b=j.getElementsByTagName("body")[0],d=R(c);d.setAttribute("type",f);var e=b.appendChild(d);if(e){var g=0;(function(){if(typeof e.GetVariable!=a){var c=e.GetVariable("$version");c&&(c=c.split(" ")[1].split(","),z.pv=[parseInt(c[0],10),parseInt(c[1],10),parseInt(c[2],10)])}else if(g<10){g++,setTimeout(arguments.callee,10);return}b.removeChild(d),e=null,G()})()}else G()}function E(){l?F():G()}function D(b){if(typeof i.addEventListener!=a)i.addEventListener("load",b,!1);else if(typeof j.addEventListener!=a)j.addEventListener("load",b,!1);else if(typeof i.attachEvent!=a)S(i,"onload",b);else if(typeof i.onload=="function"){var c=i.onload;i.onload=function(){c(),b()}}else i.onload=b}function C(a){u?a():m[m.length]=a}function B(){if(!u){try{var a=j.getElementsByTagName("body")[0].appendChild(R("span"));a.parentNode.removeChild(a)}catch(b){return}u=!0;var c=m.length;for(var d=0;d<c;d++)m[d]()}}var a="undefined",c="object",d="Shockwave Flash",e="ShockwaveFlash.ShockwaveFlash",f="application/x-shockwave-flash",g="SWFObjectExprInst",h="onreadystatechange",i=window,j=document,k=navigator,l=!1,m=[E],n=[],o=[],p=[],q,r,s,t,u=!1,v=!1,w,x,y=!0,z=function(){var b=typeof j.getElementById!=a&&typeof j.getElementsByTagName!=a&&typeof j.createElement!=a,g=k.userAgent.toLowerCase(),h=k.platform.toLowerCase(),m=h?/win/.test(h):/win/.test(g),n=h?/mac/.test(h):/mac/.test(g),o=/webkit/.test(g)?parseFloat(g.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):!1,p=!1,q=[0,0,0],r=null;if(typeof k.plugins!=a&&typeof k.plugins[d]==c)r=k.plugins[d].description,r&&(typeof k.mimeTypes==a||!k.mimeTypes[f]||!!k.mimeTypes[f].enabledPlugin)&&(l=!0,p=!1,r=r.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),q[0]=parseInt(r.replace(/^(.*)\..*$/,"$1"),10),q[1]=parseInt(r.replace(/^.*\.(.*)\s.*$/,"$1"),10),q[2]=/[a-zA-Z]/.test(r)?parseInt(r.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0);else if(typeof i.ActiveXObject!=a)try{var s=new ActiveXObject(e);s&&(r=s.GetVariable("$version"),r&&(p=!0,r=r.split(" ")[1].split(","),q=[parseInt(r[0],10),parseInt(r[1],10),parseInt(r[2],10)]))}catch(t){}return{w3:b,pv:q,wk:o,ie:p,win:m,mac:n}}(),A=function(){!z.w3||((typeof j.readyState!=a&&j.readyState=="complete"||typeof j.readyState==a&&(j.getElementsByTagName("body")[0]||j.body))&&B(),u||(typeof j.addEventListener!=a&&j.addEventListener("DOMContentLoaded",B,!1),z.ie&&z.win&&(j.attachEvent(h,function(){j.readyState=="complete"&&(j.detachEvent(h,arguments.callee),B())}),i==top&&function(){if(!u){try{j.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}B()}}()),z.wk&&function(){if(!u){if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}B()}}(),D(B)))}(),X=function(){z.ie&&z.win&&window.attachEvent("onunload",function(){var a=p.length;for(var c=0;c<a;c++)p[c][0].detachEvent(p[c][1],p[c][2]);var d=o.length;for(var e=0;e<d;e++)O(o[e]);for(var f in z)z[f]=null;z=null;for(var g in b)b[g]=null;b=null})}();return{registerObject:function(a,b,c,d){if(z.w3&&a&&b){var e={};e.id=a,e.swfVersion=b,e.expressInstall=c,e.callbackFn=d,n[n.length]=e,V(a,!1)}else d&&d({success:!1,id:a})},getObjectById:function(a){if(z.w3)return H(a)},embedSWF:function(b,d,e,f,g,h,i,j,k,l){var m={success:!1,id:d};z.w3&&!(z.wk&&z.wk<312)&&b&&d&&e&&f&&g?(V(d,!1),C(function(){e+="",f+="";var n={};if(k&&typeof k===c)for(var o in k)n[o]=k[o];n.data=b,n.width=e,n.height=f;var p={};if(j&&typeof j===c)for(var q in j)p[q]=j[q];if(i&&typeof i===c)for(var r in i)typeof p.flashvars!=a?p.flashvars+="&"+r+"="+i[r]:p.flashvars=r+"="+i[r];if(T(g)){var s=M(n,p,d);n.id==d&&V(d,!0),m.success=!0,m.ref=s}else{if(h&&I()){n.data=h,J(n,p,d,l);return}V(d,!0)}l&&l(m)})):l&&l(m)},switchOffAutoHideShow:function(){y=!1},ua:z,getFlashPlayerVersion:function(){return{major:z.pv[0],minor:z.pv[1],release:z.pv[2]}},hasFlashPlayerVersion:T,createSWF:function(a,b,c){return z.w3?M(a,b,c):undefined},showExpressInstall:function(a,b,c,d){z.w3&&I()&&J(a,b,c,d)},removeSWF:function(a){z.w3&&O(a)},createCSS:function(a,b,c,d){z.w3&&U(a,b,c,d)},addDomLoadEvent:C,addLoadEvent:D,getQueryParamValue:function(a){var b=j.location.search||j.location.hash;if(b){/\?/.test(b)&&(b=b.split("?")[1]);if(a==null)return W(b);var c=b.split("&");for(var d=0;d<c.length;d++)if(c[d].substring(0,c[d].indexOf("="))==a)return W(c[d].substring(c[d].indexOf("=")+1))}return""},expressInstallCallback:function(){if(v){var a=Q(g);a&&q&&(a.parentNode.replaceChild(q,a),r&&(V(r,!0),z.ie&&z.win&&(q.style.display="block")),s&&s(t)),v=!1}}}}();c.TYPE_ASINSTANCE=1,c.TYPE_ASFUNCTION=2,c.TYPE_JSFUNCTION=3,c.TYPE_ANONYMOUS=4,c.initCallbacks={},c.userTypes={},c.addToUserTypes=function(){for(var a=0;a<arguments.length;a++)c.userTypes[arguments[a]]={typeName:arguments[a],enriched:!1}},c.argsToArray=function(a){var b=[];for(var c=0;c<a.length;c++)b[c]=a[c];return b},c.addInitializationCallback=function(a,b){var d=c.instances[a];if(d!=undefined)b.call(d);else{var e=c.initCallbacks[a];e==null&&(c.initCallbacks[a]=e=[]),e.push(b)}},c.nextBridgeID=0,c.instances={},c.idMap={},c.refCount=0,c.extractBridgeFromID=function(a){var b=a>>16;return c.idMap[b]},c.attachBridge=function(a,b){var d=new c(a,b);c[b]=d;var e=c.initCallbacks[b];if(e!=null){for(var f=0;f<e.length;f++)e[f].call(d);delete c.initCallbacks[b]}},c.blockedMethods={toString:!0,get:!0,set:!0,call:!0},c.prototype={root:function(){return this.deserialize(this.target.getRoot())},releaseASObjects:function(){return this.target.releaseASObjects()},releaseNamedASObject:function(a){if(typeof a!="object")return!1;var b=this.target.releaseNamedASObject(a.fb_instance_id);return b},create:function(a){return this.deserialize(this.target.create(a))},makeID:function(a){return(this.bridgeID<<16)+a},getPropertyFromAS:function(a,b){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,retVal=this.target.getPropFromAS(a,b),retVal=this.handleError(retVal),c.refCount--;return retVal},setPropertyInAS:function(a,b,d){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,retVal=this.target.setPropInAS(a,b,this.serialize(d)),retVal=this.handleError(retVal),c.refCount--;return retVal},callASFunction:function(a,b){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,retVal=this.target.invokeASFunction(a,this.serialize(b)),retVal=this.handleError(retVal),c.refCount--;return retVal},callASMethod:function(a,b,d){if(c.refCount>0)throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");c.refCount++,d=this.serialize(d),retVal=this.target.invokeASMethod(a,b,d),retVal=this.handleError(retVal),c.refCount--;return retVal},invokeLocalFunction:function(a,b){var c,d=this.localFunctionCache[a];d!=undefined&&(c=this.serialize(d.apply(null,this.deserialize(b))));return c},getTypeFromName:function(a){return this.remoteTypeCache[a]},createProxy:function(a,b){var c=this.getTypeFromName(b);d.prototype=c;var e=new d(a);this.remoteInstanceCache[a]=e;return e},getProxy:function(a){return this.remoteInstanceCache[a]},addTypeDataToCache:function(a){var b=new ASProxy(this,a.name),d=a.accessors;for(var e=0;e<d.length;e++)this.addPropertyToType(b,d[e]);var f=a.methods;for(var e=0;e<f.length;e++)c.blockedMethods[f[e]]==undefined&&this.addMethodToType(b,f[e]);this.remoteTypeCache[b.typeName]=b;return b},addPropertyToType:function(a,b){var c=b.charAt(0),d,e;c>="a"&&c<="z"?(e="get"+c.toUpperCase()+b.substr(1),d="set"+c.toUpperCase()+b.substr(1)):(e="get"+b,d="set"+b),a[d]=function(a){this.bridge.setPropertyInAS(this.fb_instance_id,b,a)},a[e]=function(){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,b))}},addMethodToType:function(a,b){a[b]=function(){return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id,b,c.argsToArray(arguments)))}},getFunctionProxy:function(a){var b=this;this.remoteFunctionCache[a]==null&&(this.remoteFunctionCache[a]=function(){b.callASFunction(a,c.argsToArray(arguments))});return this.remoteFunctionCache[a]},getFunctionID:function(a){a.__bridge_id__==undefined&&(a.__bridge_id__=this.makeID(this.nextLocalFuncID++),this.localFunctionCache[a.__bridge_id__]=a);return a.__bridge_id__},serialize:function(a){var b={},d=typeof a;if(d=="number"||d=="string"||d=="boolean"||d==null||d==undefined)b=a;else if(a instanceof Array){b=[];for(var e=0;e<a.length;e++)b[e]=this.serialize(a[e])}else d=="function"?(b.type=c.TYPE_JSFUNCTION,b.value=this.getFunctionID(a)):a instanceof ASProxy?(b.type=c.TYPE_ASINSTANCE,b.value=a.fb_instance_id):(b.type=c.TYPE_ANONYMOUS,b.value=a);return b},deserialize:function(a){var b,d=typeof a;if(d=="number"||d=="string"||d=="boolean"||a==null||a==undefined)b=this.handleError(a);else if(a instanceof Array){b=[];for(var e=0;e<a.length;e++)b[e]=this.deserialize(a[e])}else if(d=="object"){for(var e=0;e<a.newTypes.length;e++)this.addTypeDataToCache(a.newTypes[e]);for(var f in a.newRefs)this.createProxy(f,a.newRefs[f]);a.type==c.TYPE_PRIMITIVE?b=a.value:a.type==c.TYPE_ASFUNCTION?b=this.getFunctionProxy(a.value):a.type==c.TYPE_ASINSTANCE?b=this.getProxy(a.value):a.type==c.TYPE_ANONYMOUS&&(b=a.value)}return b},addRef:function(a){this.target.incRef(a.fb_instance_id)},release:function(a){this.target.releaseRef(a.fb_instance_id)},handleError:function(a){if(typeof a=="string"&&a.indexOf("__FLASHERROR")==0){var b=a.split("||");c.refCount>0&&c.refCount--;throw new Error(b[1])}return a}},ASProxy=function(a,b){this.bridge=a,this.typeName=b;return this},ASProxy.prototype={get:function(a){return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id,a))},set:function(a,b){this.bridge.setPropertyInAS(this.fb_instance_id,a,b)},call:function(a,b){this.bridge.callASMethod(this.fb_instance_id,a,b)},addRef:function(){this.bridge.addRef(this)},release:function(){this.bridge.release(this)}},function(){function d(){}if(!window.WebSocket){var a=window.console;if(!a||!a.log||!a.error)a={log:function(){},error:function(){}};if(!b.hasFlashPlayerVersion("9.0.0")){a.error("Flash Player is not installed.");return}location.protocol=="file:"&&a.error("WARNING: web-socket-js doesn't work in file:///... URL unless you set Flash Security Settings properly. Open the page via Web server i.e. http://..."),WebSocket=function(a,b,c,d,e){var f=this;f.readyState=WebSocket.CONNECTING,f.bufferedAmount=0,setTimeout(function(){WebSocket.__addTask(function(){f.__createFlash(a,b,c,d,e)})},0)},WebSocket.prototype.__createFlash=function(a,b,c,d,e){var f=this;f.__flash=WebSocket.__flash.create(a,b,c||null,d||0,e||null),f.__flash.addEventListener("event",function(a){setTimeout(function(){f.__handleEvents()},0)})},WebSocket.prototype.send=function(a){if(!this.__flash||this.readyState==WebSocket.CONNECTING)throw"INVALID_STATE_ERR: Web Socket connection has not been established";var b=this.__flash.send(encodeURIComponent(a));if(b<0)return!0;this.bufferedAmount+=b;return!1},WebSocket.prototype.close=function(){var a=this;if(!!a.__flash){if(a.readyState==WebSocket.CLOSED||a.readyState==WebSocket.CLOSING)return;a.__flash.close(),a.readyState=WebSocket.CLOSED,a.__timer&&clearInterval(a.__timer),a.onclose&&setTimeout(a.onclose,0)}},WebSocket.prototype.addEventListener=function(a,b,c){"__events"in this||(this.__events={}),a in this.__events||(this.__events[a]=[],"function"==typeof this["on"+a]&&(this.__events[a].defaultHandler=this["on"+a],this["on"+a]=this.__createEventHandler(this,a))),this.__events[a].push(b)},WebSocket.prototype.removeEventListener=function(a,b,c){"__events"in this||(this.__events={});if(a in this.__events)for(var d=this.__events.length;d>-1;--d)if(b===this.__events[a][d]){this.__events[a].splice(d,1);break}},WebSocket.prototype.dispatchEvent=function(a){if(!("__events"in this))throw"UNSPECIFIED_EVENT_TYPE_ERR";if(!(a.type in this.__events))throw"UNSPECIFIED_EVENT_TYPE_ERR";for(var b=0,c=this.__events[a.type].length;b<c;++b){this.__events[a.type][b](a);if(a.cancelBubble)break}!1!==a.returnValue&&"function"==typeof this.__events[a.type].defaultHandler&&this.__events[a.type].defaultHandler(a)},WebSocket.prototype.__handleEvents=function(){var b=this.__flash.receiveEvents();for(var c=0;c<b.length;c++)try{var d=b[c];"readyState"in d&&(this.readyState=d.readyState);if(d.type=="open")this.__timer&&clearInterval(this.__timer),window.opera&&(this.__timer=setInterval(function(){this.__handleEvents()},500)),this.onopen&&this.onopen();else if(d.type=="close")this.__timer&&clearInterval(this.__timer),this.onclose&&this.onclose();else if(d.type=="message"){if(this.onmessage){var e=decodeURIComponent(d.data),f;window.MessageEvent&&!window.opera?(f=document.createEvent("MessageEvent"),f.initMessageEvent("message",!1,!1,e,null,null,window,null)):f={data:e},this.onmessage(f)}}else if(d.type=="error")this.__timer&&clearInterval(this.__timer),this.onerror&&this.onerror();else throw"unknown event type: "+d.type}catch(f){a.error(f.toString())}},WebSocket.prototype.__createEventHandler=function(a,b){return function(c){var e=new d;e.initEvent(b,!0,!0),e.target=e.currentTarget=a;for(var f in c)e[f]=c[f];a.dispatchEvent(e,arguments)}},d.prototype.cancelable=!0,d.prototype.cancelBubble=!1,d.prototype.preventDefault=function(){this.cancelable&&(this.returnValue=!1)},d.prototype.stopPropagation=function(){this.cancelBubble=!0},d.prototype.initEvent=function(a,b,c){this.type=a,this.cancelable=c,this.timeStamp=new Date},WebSocket.CONNECTING=0,WebSocket.OPEN=1,WebSocket.CLOSING=2,WebSocket.CLOSED=3,WebSocket.__tasks=[],WebSocket.loadFlashPolicyFile=function(a){WebSocket.__addTask(function(){WebSocket.__flash.loadManualPolicyFile(a)})},WebSocket.__initialize=function(){WebSocket.__swfLocation&&(window.WEB_SOCKET_SWF_LOCATION=WebSocket.__swfLocation);if(!window.WEB_SOCKET_SWF_LOCATION)a.error("[WebSocket] set WEB_SOCKET_SWF_LOCATION to location of WebSocketMain.swf");else{var d=document.createElement("div");d.id="webSocketContainer",d.style.position="absolute",WebSocket.__isFlashLite()?(d.style.left="0px",d.style.top="0px"):(d.style.left="-100px",d.style.top="-100px");var e=document.createElement("div");e.id="webSocketFlash",d.appendChild(e),document.body.appendChild(d),b.embedSWF(WEB_SOCKET_SWF_LOCATION,"webSocketFlash","1","1","9.0.0",null,{bridgeName:"webSocket"},{hasPriority:!0,allowScriptAccess:"always"},null,function(b){b.success||a.error("[WebSocket] swfobject.embedSWF failed")}),c.addInitializationCallback("webSocket",function(){try{WebSocket.__flash=c.webSocket.root(),WebSocket.__flash.setCallerUrl(location.href),WebSocket.__flash.setDebug(!!window.WEB_SOCKET_DEBUG);for(var b=0;b<WebSocket.__tasks.length;++b)WebSocket.__tasks[b]();WebSocket.__tasks=[]}catch(d){a.error("[WebSocket] "+d.toString())}})}},WebSocket.__addTask=function(a){WebSocket.__flash?a():WebSocket.__tasks.push(a)},WebSocket.__isFlashLite=function(){if(!window.navigator||!window.navigator.mimeTypes)return!1;var a=window.navigator.mimeTypes["application/x-shockwave-flash"];return!a||!a.enabledPlugin||!a.enabledPlugin.filename?!1:a.enabledPlugin.filename.match(/flashlite/i)?!0:!1},window.webSocketLog=function(b){a.log(decodeURIComponent(b))},window.webSocketError=function(b){a.error(decodeURIComponent(b))},window.WEB_SOCKET_DISABLE_AUTO_INITIALIZATION||(window.addEventListener?window.addEventListener("load",WebSocket.__initialize,!1):window.attachEvent("onload",WebSocket.__initialize))}}()}.call(a.exports),__require.modules["/socket.io.js"]._cached=a.exports;return a.exports}; return require("/index.js")})() |
@@ -9,19 +9,38 @@ var EventEmitter = require('events').EventEmitter; | ||
return function (res) { | ||
return function (req, res) { | ||
if (cache) { | ||
res.setHeader('content-type', 'text/javascript'); | ||
res.setHeader('last-modified', cache.modified.toGMTString()); | ||
res.setHeader('date', new Date().toGMTString()); | ||
var ims = req.headers['if-modified-since']; | ||
if (ims) { | ||
var m = new Date(ims); | ||
if (m >= cache.modified) { | ||
res.statusCode = 304; | ||
res.end(); | ||
return; | ||
} | ||
} | ||
res.statusCode = 200; | ||
res.setHeader('content-type', 'text/javascript'); | ||
res.end(cache); | ||
res.end(cache.source); | ||
} | ||
else fs.readFile(file, function (err, src) { | ||
if (err) { | ||
console.error(err); | ||
res.statusCode = 500; | ||
res.setHeader('content-type', 'text/plain'); | ||
res.end('an error occured loading the bundle'); | ||
} | ||
else { | ||
cache = src; | ||
bundle(res); | ||
} | ||
else fs.stat(file, function (err0, stat) { | ||
fs.readFile(file, function (err1, src) { | ||
if (err0 || err1) { | ||
var e = err0 || err1; | ||
console.error(e.message || e); | ||
res.statusCode = 500; | ||
res.setHeader('content-type', 'text/plain'); | ||
res.end('an error occured loading the bundle'); | ||
} | ||
else { | ||
cache = { | ||
source : src, | ||
modified : stat.mtime, | ||
}; | ||
bundle(req, res); | ||
} | ||
}); | ||
}); | ||
@@ -38,3 +57,3 @@ }; | ||
if (req.url.split('?')[0] === mount) { | ||
bundle(res); | ||
bundle(req, res); | ||
} | ||
@@ -53,3 +72,3 @@ else next() | ||
if (!res.finished && req.url.split('?')[0] === mount) { | ||
bundle(res); | ||
bundle(req, res); | ||
} | ||
@@ -56,0 +75,0 @@ }); |
{ | ||
"name" : "dnode", | ||
"version" : "0.8.0", | ||
"version" : "0.8.1", | ||
"description" : "freestyle RPC", | ||
@@ -5,0 +5,0 @@ "main" : "./index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
195670
3603