diff --git a/.gitignore b/.gitignore index 5ade3689..3fab450c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *~ *.swp *.pyc +*.class .DS_Store node_modules diff --git a/javascript/mailto-fix.html b/javascript/mailto-fix.html new file mode 100644 index 00000000..ed28ee62 --- /dev/null +++ b/javascript/mailto-fix.html @@ -0,0 +1,52 @@ + + + + PubNub JavaScript MailTO Fix + + +
+ + +
+ × +

PubNub MailTO Test for JavaScript on Mobile and Desktop Web Browser

+
+ + +
+ hello@pubnub.com +
+
0
+ +
+ + +
+ diff --git a/javascript/pubnub-3.1.js b/javascript/pubnub-3.1.js index e5a72b13..35e39edb 100644 --- a/javascript/pubnub-3.1.js +++ b/javascript/pubnub-3.1.js @@ -589,8 +589,8 @@ function ajax( setup ) { new XDomainRequest() || new XMLHttpRequest(); - xhr.onerror = function(){ done(1) }; - xhr.onload = finished; + xhr.onerror = xhr.onabort = function(){ done(1) }; + xhr.onload = xhr.onloadend = finished; xhr.timeout = XHRTME; xhr.open( 'GET', setup.url.join(URLBIT), true ); @@ -784,14 +784,16 @@ var PDIV = $('pubnub') || {} */ 'subscribe' : function( args, callback ) { - var channel = args['channel'] - , callback = callback || args['callback'] - , restore = args['restore'] - , timetoken = 0 - , error = args['error'] || function(){} - , connected = 0 - , connect = args['connect'] || function(){} - , origin = nextorigin(ORIGIN); + var channel = args['channel'] + , callback = callback || args['callback'] + , restore = args['restore'] + , timetoken = 0 + , connect = args['connect'] || function(){} + , reconnect = args['reconnect'] || function(){} + , disconnect = args['error']||args['disconnect']||function(){} + , disconnected = 0 + , connected = 0 + , origin = nextorigin(ORIGIN); // Reduce Status Flicker if (!READY) return READY_BUFFER.push([ args, callback, SELF ]); @@ -823,19 +825,29 @@ var PDIV = $('pubnub') || {} jsonp, timetoken ], fail : function() { + // Disconnect + if (!disconnected) { + disconnected = 1; + disconnect(); + } + timeout( pubnub, SECOND ); - SELF['time'](function(success){ - success || error(); - }); }, success : function(messages) { if (!CHANNELS[channel].connected) return; + // Connect if (!connected) { connected = 1; connect(); } + // Reconnect + if (disconnected) { + disconnected = 0; + reconnect(); + } + // Restore Previous Connection Point if Needed // Also Update Timetoken restore = db.set( diff --git a/javascript/pubnub-3.1.min.js b/javascript/pubnub-3.1.min.js index 60cb570c..8bdb84ea 100644 --- a/javascript/pubnub-3.1.min.js +++ b/javascript/pubnub-3.1.min.js @@ -1,18 +1,18 @@ -function s(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function y(c){k.lastIndex=0;return k.test(c)?'"'+c.replace(k,function(c){var g=f[c];return typeof g==="string"?g:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function u(c,f){var g,h,o,m,k=i,l,e=f[c];e&&typeof e==="object"&&typeof e.toJSON==="function"&&(e=e.toJSON(c));typeof p==="function"&&(e=p.call(f,c,e));switch(typeof e){case "string":return y(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e); -case "object":if(!e)return"null";i+=t;l=[];if(Object.prototype.toString.apply(e)==="[object Array]"){m=e.length;for(g=0;g1800)return f("Message Too Big");w({c:r,b:function(a){b(a)},a:function(){b([0,"Disconnected"])},url:c})},unsubscribe:function(a){a=a.channel;if(a in b)b[a].d=0,b[a].e&&b[a].e(0)},subscribe:function(a,d){function r(){var a=e();if(b[j].d)b[j].e=w({c:a,url:[m,"subscribe",q,z(j),a,h],a:function(){setTimeout(r,A);n.time(function(a){a|| -i()})},b:function(a){b[j].d&&(k||(k=1,l()),g=C.set(q+j,h=g&&C.get(q+j)||a[1]),c(a[0],function(b){d(b,a)}),setTimeout(r,10))}})}var j=a.channel,d=d||a.callback,g=a.restore,h=0,i=a.error||s(),k=0,l=a.connect||s(),m=N(v);if(!D)return I.push([a,d,n]);if(!j)return f("Missing Channel");if(!d)return f("Missing Callback");if(!q)return f("Missing Subscribe Key");j in b||(b[j]={});if(b[j].d)return f("Already Connected");b[j].d=1;r()},db:C,each:c,map:G,css:H,$:t,create:l,bind:h,supplant:g,head:o,search:p,attr:m, -now:k,unique:u,events:B,updater:i,init:y};return n}function u(){return"x"+ ++O+""+ +new Date}function k(){return+new Date}function i(a,b){function d(){c+b>k()?(clearTimeout(q),q=setTimeout(d,b)):(c=k(),a())}var q,c=0;return d}function t(a){return document.getElementById(a)}function f(a){console.log(a)}function p(a,b){var d=[];c(a.split(/\s+/),function(a){c((b||document).getElementsByTagName(a),function(a){d.push(a)})});return d}function c(a,b){if(a&&b)if(typeof a[0]!="undefined")for(var d=0,c=a.length;d< -c;)b.call(a[d],a[d],d++);else for(d in a)a.hasOwnProperty&&a.hasOwnProperty(d)&&b.call(a[d],d,a[d])}function G(a,b){var d=[];c(a||[],function(a,c){d.push(b(a,c))});return d}function g(a,b){return a.replace(P,function(a,c){return b[c]||a})}function h(a,b,d){c(a.split(","),function(a){function c(a){if(!a)a=window.event;if(!d(a))a.cancelBubble=true,a.returnValue=false,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation()}b.addEventListener?b.addEventListener(a,c,false):b.attachEvent? -b.attachEvent("on"+a,c):b["on"+a]=c})}function o(){return p("head")[0]}function m(a,b,d){if(d)a.setAttribute(b,d);else return a&&a.getAttribute&&a.getAttribute(b)}function H(a,b){for(var d in b)if(b.hasOwnProperty(d))try{a.style[d]=b[d]+("|width|height|top|left|".indexOf(d)>0&&typeof b[d]=="number"?"px":"")}catch(c){}}function l(a){return document.createElement(a)}function e(){return E||n()?0:u()}function z(a){return G(encodeURIComponent(a).split(""),function(a){return"-_.!~*'()".indexOf(a)<0?a:"%"+ -a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function w(a){function b(a,b){if(!f)f=1,a||i(b),d.onerror=null,clearTimeout(g),setTimeout(function(){a&&h();var b=t(e),d=b&&b.parentNode;d&&d.removeChild(b)},A)}if(E||n())return Q(a);var d=l("script"),c=a.c,e=u(),f=0,g=setTimeout(function(){b(1)},F),h=a.a||s(),i=a.b||s();window[c]=function(a){b(0,a)};d[J]=J;d.onerror=function(){b(1)};d.src=a.url.join(K);m(d,"id",e);o().appendChild(d);return b}function Q(a){function b(a){if(!e){e=1;clearTimeout(g); -if(c)c.onerror=c.onload=null,c.abort&&c.abort(),c=null;a&&h()}}function d(){if(!f){f=1;clearTimeout(g);try{response=JSON.parse(c.responseText)}catch(a){return b(1)}i(response)}}var c,e=0,f=0,g=setTimeout(function(){b(1)},F),h=a.a||s(),i=a.b||s();try{c=n()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest,c.onerror=function(){b(1)},c.onload=d,c.timeout=F,c.open("GET",a.url.join(K),true),c.send()}catch(k){return b(0),E=0,w(a)}return b}function L(){PUBNUB.time(k);PUBNUB.time(function(){setTimeout(function(){D|| -(D=1,c(I,function(a){a[2].subscribe(a[0],a[1])}))},A)})}function n(){if(!M.get)return 0;var a={id:n.id++,send:s(),abort:function(){a.id={}},open:function(b,c){n[a.id]=a;M.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||s());var C=function(){var a=window.localStorage;return{get:function(b){return a?a.getItem(b):document.cookie.indexOf(b)==-1?null:((document.cookie||"").match(RegExp(b+"=([^;]+)"))||[])[1]||null},set:function(b, +function q(){return function(){}} +window.JSON&&window.JSON.stringify||function(){function y(c){l.lastIndex=0;return l.test(c)?'"'+c.replace(l,function(c){var g=f[c];return typeof g==="string"?g:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function u(c,f){var g,h,n,k,l=i,m,e=f[c];e&&typeof e==="object"&&typeof e.toJSON==="function"&&(e=e.toJSON(c));typeof o==="function"&&(e=o.call(f,c,e));switch(typeof e){case "string":return y(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e); +case "object":if(!e)return"null";i+=t;m=[];if(Object.prototype.toString.apply(e)==="[object Array]"){k=e.length;for(g=0;g1800)return f("Message Too Big");w({c:s,b:function(a){b(a)},a:function(){b([0,"Disconnected"])},url:c})},unsubscribe:function(a){a=a.channel;if(a in b)b[a].d=0,b[a].e&&b[a].e(0)},subscribe:function(a,d){function s(){var a=e();if(b[j].d)b[j].e=w({c:a,url:[o,"subscribe",r,z(j),a,h],a:function(){k||(k=1,m());setTimeout(s, +A)},b:function(a){b[j].d&&(n||(n=1,i()),k&&(k=0,l()),g=C.set(r+j,h=g&&C.get(r+j)||a[1]),c(a[0],function(b){d(b,a)}),setTimeout(s,10))}})}var j=a.channel,d=d||a.callback,g=a.restore,h=0,i=a.connect||q(),l=a.reconnect||q(),m=a.error||a.disconnect||q(),k=0,n=0,o=N(v);if(!D)return I.push([a,d,p]);if(!j)return f("Missing Channel");if(!d)return f("Missing Callback");if(!r)return f("Missing Subscribe Key");j in b||(b[j]={});if(b[j].d)return f("Already Connected");b[j].d=1;s()},db:C,each:c,map:G,css:H,$:t, +create:m,bind:h,supplant:g,head:n,search:o,attr:k,now:l,unique:u,events:B,updater:i,init:y};return p}function u(){return"x"+ ++O+""+ +new Date}function l(){return+new Date}function i(a,b){function d(){c+b>l()?(clearTimeout(r),r=setTimeout(d,b)):(c=l(),a())}var r,c=0;return d}function t(a){return document.getElementById(a)}function f(a){console.log(a)}function o(a,b){var d=[];c(a.split(/\s+/),function(a){c((b||document).getElementsByTagName(a),function(a){d.push(a)})});return d}function c(a,b){if(a&& +b)if(typeof a[0]!="undefined")for(var d=0,c=a.length;d0&&typeof b[d]=="number"?"px":"")}catch(c){}}function m(a){return document.createElement(a)}function e(){return E||p()?0:u()}function z(a){return G(encodeURIComponent(a).split(""),function(a){return"-_.!~*'()".indexOf(a)< +0?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function w(a){function b(a,b){if(!f)f=1,a||i(b),d.onerror=null,clearTimeout(g),setTimeout(function(){a&&h();var b=t(e),d=b&&b.parentNode;d&&d.removeChild(b)},A)}if(E||p())return Q(a);var d=m("script"),c=a.c,e=u(),f=0,g=setTimeout(function(){b(1)},F),h=a.a||q(),i=a.b||q();window[c]=function(a){b(0,a)};d[J]=J;d.onerror=function(){b(1)};d.src=a.url.join(K);k(d,"id",e);n().appendChild(d);return b}function Q(a){function b(a){if(!e){e=1;clearTimeout(g); +if(c)c.onerror=c.onload=null,c.abort&&c.abort(),c=null;a&&h()}}function d(){if(!f){f=1;clearTimeout(g);try{response=JSON.parse(c.responseText)}catch(a){return b(1)}i(response)}}var c,e=0,f=0,g=setTimeout(function(){b(1)},F),h=a.a||q(),i=a.b||q();try{c=p()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest,c.onerror=c.onabort=function(){b(1)},c.onload=c.onloadend=d,c.timeout=F,c.open("GET",a.url.join(K),true),c.send()}catch(k){return b(0),E=0,w(a)}return b}function L(){PUBNUB.time(l);PUBNUB.time(function(){setTimeout(function(){D|| +(D=1,c(I,function(a){a[2].subscribe(a[0],a[1])}))},A)})}function p(){if(!M.get)return 0;var a={id:p.id++,send:q(),abort:function(){a.id={}},open:function(b,c){p[a.id]=a;M.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||q());var C=function(){var a=window.localStorage;return{get:function(b){return a?a.getItem(b):document.cookie.indexOf(b)==-1?null:((document.cookie||"").match(RegExp(b+"=([^;]+)"))||[])[1]||null},set:function(b, c){if(a)return a.setItem(b,c)&&0;document.cookie=b+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}}}(),O=1,P=/{([\w\-]+)}/g,J="async",K="/",F=14E4,A=1E3,E=navigator.userAgent.indexOf("MSIE 6")==-1,N=function(){var a=Math.floor(Math.random()*9)+1;return function(b){return b.indexOf("pubsub")>0&&b.replace("pubsub","ps"+(++a<10?a:a=1))||b}}(),B={list:{},unbind:function(a){B.list[a]=[]},bind:function(a,b){(B.list[a]=B.list[a]||[]).push(b)},fire:function(a,b){c(B.list[a]||[],function(a){a(b)})}}, -x=t("pubnub")||{},D=0,I=[];PUBNUB=y({publish_key:m(x,"pub-key"),subscribe_key:m(x,"sub-key"),ssl:m(x,"ssl")=="on",origin:m(x,"origin")});H(x,{position:"absolute",top:-A});if("opera"in window||m(x,"flash"))x.innerHTML="";var M=t("pubnubs")||{};h("load", -window,function(){setTimeout(L,0)});PUBNUB.rdx=function(a,b){if(!b)return n[a].onerror();n[a].responseText=unescape(b);n[a].onload()};n.id=A;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);typeof module!=="undefined"&&(module.f=PUBNUB)&&L()}(); +x=t("pubnub")||{},D=0,I=[];PUBNUB=y({publish_key:k(x,"pub-key"),subscribe_key:k(x,"sub-key"),ssl:k(x,"ssl")=="on",origin:k(x,"origin")});H(x,{position:"absolute",top:-A});if("opera"in window||k(x,"flash"))x.innerHTML="";var M=t("pubnubs")||{};h("load", +window,function(){setTimeout(L,0)});PUBNUB.rdx=function(a,b){if(!b)return p[a].onerror();p[a].responseText=unescape(b);p[a].onload()};p.id=A;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);typeof module!=="undefined"&&(module.f=PUBNUB)&&L()}(); diff --git a/javascript/unit-test.html b/javascript/unit-test.html index 3d6ff86c..3ba4ae22 100644 --- a/javascript/unit-test.html +++ b/javascript/unit-test.html @@ -225,6 +225,17 @@ } }); + + /* + restore : true, + disconnect : function() { + }, + reconnect : function() { + }, + connect : function() { + }, + */ + } start_test(); diff --git a/socket.io/bootstrap-mobile/.DS_Store b/socket.io/bootstrap-mobile/.DS_Store index 41774e53..856f8e30 100644 Binary files a/socket.io/bootstrap-mobile/.DS_Store and b/socket.io/bootstrap-mobile/.DS_Store differ diff --git a/socket.io/socket.io.min.js b/socket.io/socket.io.min.js index ef7d1da8..e1d5f694 100644 --- a/socket.io/socket.io.min.js +++ b/socket.io/socket.io.min.js @@ -1,20 +1,21 @@ -function n(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function u(c){x.lastIndex=0;return x.test(c)?'"'+c.replace(x,function(c){var d=B[c];return typeof d==="string"?d:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function q(p,l){var d,k,i,r,s=c,h,f=l[p];f&&typeof f==="object"&&typeof f.toJSON==="function"&&(f=f.toJSON(p));typeof g==="function"&&(f=g.call(l,p,f));switch(typeof f){case "string":return u(f);case "number":return isFinite(f)?String(f):"null";case "boolean":case "null":return String(f); -case "object":if(!f)return"null";c+=j;h=[];if(Object.prototype.toString.apply(f)==="[object Array]"){r=f.length;for(d=0;d1800)return j("Message Too Big");t({c:o,b:function(a){b(a)},a:function(){b([0,"Disconnected"])},url:c})},unsubscribe:function(a){a=a.channel;if(a in b)b[a].d=0,b[a].e&&b[a].e(0)},subscribe:function(a,e){function c(){var a=h();if(b[d].d)b[d].e=t({c:a,url:[v,"subscribe",y,f(d),a,o],a:function(){setTimeout(c,1E3);m.time(function(a){a|| -k()})},b:function(a){b[d].d&&(i||(i=1,l()),o=a[1],setTimeout(c,10),g(a[0],function(a){e(a)}))}})}var d=a.channel,e=e||a.callback,o=0,k=a.error||n(),i=0,l=a.connect||n();if(!D)return I.push([a,e,m]);if(!d)return j("Missing Channel");if(!e)return j("Missing Callback");if(!y)return j("Missing Subscribe Key");d in b||(b[d]={});if(b[d].d)return j("Already Connected");b[d].d=1;c()},each:g,map:p,css:r,$:c,create:s,bind:d,supplant:l,head:k,search:B,attr:i,now:q,events:z,updater:x,init:u};return m}function q(){return"x"+ -++M+""+ +new Date}function x(a,b){function e(){d+b>+new Date?(clearTimeout(c),c=setTimeout(e,b)):(d=+new Date,a())}var c,d=0;return e}function c(a){return document.getElementById(a)}function j(a){console.log(a)}function B(a,b){var e=[];g(a.split(/\s+/),function(a){g((b||document).getElementsByTagName(a),function(a){e.push(a)})});return e}function g(a,b){if(a&&b)if(typeof a[0]!="undefined")for(var e=0,c=a.length;e0&&typeof b[c]=="number"?"px":"")}catch(d){}}function s(a){return document.createElement(a)}function h(){return E||m()?0:q()}function f(a){return p(encodeURIComponent(a).split(""),function(a){return"-_.!~*'()".indexOf(a)<0?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function t(a){function b(a,b){if(!g)g= -1,a||l(b),e.onerror=null,clearTimeout(h),setTimeout(function(){a&&j();var b=c(f),e=b&&b.parentNode;e&&e.removeChild(b)},1E3)}if(E||m())return O(a);var e=s("script"),d=a.c,f=q(),g=0,h=setTimeout(function(){b(1)},F),j=a.a||n(),l=a.b||n();window[d]=function(a){b(0,a)};e[J]=J;e.onerror=function(){b(1)};e.src=a.url.join(K);i(e,"id",f);k().appendChild(e);return b}function O(a){function b(a){if(!f){f=1;clearTimeout(h);if(d)d.onerror=d.onload=null,d.abort&&d.abort(),d=null;a&&i()}}function c(){if(!g){g=1; -clearTimeout(h);try{response=JSON.parse(d.responseText)}catch(a){return b(1)}j(response)}}var d,f=0,g=0,h=setTimeout(function(){b(1)},F),i=a.a||n(),j=a.b||n();try{d=m()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest,d.onerror=function(){b(1)},d.onload=c,d.timeout=F,d.open("GET",a.url.join(K),true),d.send()}catch(k){return b(0),E=0,t(a)}return b}function G(){clearInterval(P);D||(D=1,g(I,function(a){a[2].subscribe(a[0],a[1])}))}function m(){if(!H.get)return 0;var a={id:m.id++,send:n(), -abort:function(){a.id={}},open:function(b,c){m[a.id]=a;H.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||n());var M=1,N=/{([\w\-]+)}/g,J="async",K="/",F=14E4,A=navigator.userAgent,E=A.indexOf("MSIE 6")==-1,z={list:{},unbind:function(a){z.list[a]=[]},bind:function(a,b){(z.list[a]=z.list[a]||[]).push(b)},fire:function(a,b){g(z.list[a]||[],function(a){a(b)})}},w=c("pubnub")||{},D=0,I=[],C=u({publish_key:i(w,"pub-key"), -subscribe_key:i(w,"sub-key"),ssl:i(w,"ssl")=="on",origin:i(w,"origin")}),L=!location.href.indexOf("https")?"https://dh15atwfs066y.cloudfront.net/pubnub.swf":"http://cdn.pubnub.com/pubnub.swf";r(w,{position:"absolute",top:-1E3});A.indexOf("Firefox")>0||A.indexOf("MSIE 9")>0||A.indexOf("WebKit")>0||A.indexOf("MSIE 6")>0||(w.innerHTML=""); -var H=c("pubnubs")||{},P=setInterval(function(){!("chrome"in window)&&H.get&&G()},100);d("load",window,function(){setTimeout(G,1E3)});C.rdx=function(a,b){if(!b)return m[a].onerror();m[a].responseText=unescape(b);m[a].onload()};m.id=1E3;window.jQuery&&(window.jQuery.PUBNUB=C);window.PUBNUB=C;typeof module!=="undefined"&&(module.f=C)&&G()}(); +function q(){return function(){}} +window.JSON&&window.JSON.stringify||function(){function y(c){l.lastIndex=0;return l.test(c)?'"'+c.replace(l,function(c){var g=f[c];return typeof g==="string"?g:"\\u"+("0000"+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+c+'"'}function u(c,f){var g,h,n,k,l=i,m,e=f[c];e&&typeof e==="object"&&typeof e.toJSON==="function"&&(e=e.toJSON(c));typeof o==="function"&&(e=o.call(f,c,e));switch(typeof e){case "string":return y(e);case "number":return isFinite(e)?String(e):"null";case "boolean":case "null":return String(e); +case "object":if(!e)return"null";i+=t;m=[];if(Object.prototype.toString.apply(e)==="[object Array]"){k=e.length;for(g=0;g1800)return f("Message Too Big");w({c:s,b:function(a){b(a)},a:function(){b([0,"Disconnected"])},url:c})},unsubscribe:function(a){a=a.channel;if(a in b)b[a].d=0,b[a].e&&b[a].e(0)},subscribe:function(a,d){function s(){var a=e();if(b[j].d)b[j].e=w({c:a,url:[o,"subscribe",r,z(j),a,h],a:function(){k||(k=1,m());setTimeout(s, +A)},b:function(a){b[j].d&&(n||(n=1,i()),k&&(k=0,l()),g=C.set(r+j,h=g&&C.get(r+j)||a[1]),c(a[0],function(b){d(b,a)}),setTimeout(s,10))}})}var j=a.channel,d=d||a.callback,g=a.restore,h=0,i=a.connect||q(),l=a.reconnect||q(),m=a.error||a.disconnect||q(),k=0,n=0,o=N(v);if(!D)return I.push([a,d,p]);if(!j)return f("Missing Channel");if(!d)return f("Missing Callback");if(!r)return f("Missing Subscribe Key");j in b||(b[j]={});if(b[j].d)return f("Already Connected");b[j].d=1;s()},db:C,each:c,map:G,css:H,$:t, +create:m,bind:h,supplant:g,head:n,search:o,attr:k,now:l,unique:u,events:B,updater:i,init:y};return p}function u(){return"x"+ ++O+""+ +new Date}function l(){return+new Date}function i(a,b){function d(){c+b>l()?(clearTimeout(r),r=setTimeout(d,b)):(c=l(),a())}var r,c=0;return d}function t(a){return document.getElementById(a)}function f(a){console.log(a)}function o(a,b){var d=[];c(a.split(/\s+/),function(a){c((b||document).getElementsByTagName(a),function(a){d.push(a)})});return d}function c(a,b){if(a&& +b)if(typeof a[0]!="undefined")for(var d=0,c=a.length;d0&&typeof b[d]=="number"?"px":"")}catch(c){}}function m(a){return document.createElement(a)}function e(){return E||p()?0:u()}function z(a){return G(encodeURIComponent(a).split(""),function(a){return"-_.!~*'()".indexOf(a)< +0?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function w(a){function b(a,b){if(!f)f=1,a||i(b),d.onerror=null,clearTimeout(g),setTimeout(function(){a&&h();var b=t(e),d=b&&b.parentNode;d&&d.removeChild(b)},A)}if(E||p())return Q(a);var d=m("script"),c=a.c,e=u(),f=0,g=setTimeout(function(){b(1)},F),h=a.a||q(),i=a.b||q();window[c]=function(a){b(0,a)};d[J]=J;d.onerror=function(){b(1)};d.src=a.url.join(K);k(d,"id",e);n().appendChild(d);return b}function Q(a){function b(a){if(!e){e=1;clearTimeout(g); +if(c)c.onerror=c.onload=null,c.abort&&c.abort(),c=null;a&&h()}}function d(){if(!f){f=1;clearTimeout(g);try{response=JSON.parse(c.responseText)}catch(a){return b(1)}i(response)}}var c,e=0,f=0,g=setTimeout(function(){b(1)},F),h=a.a||q(),i=a.b||q();try{c=p()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest,c.onerror=c.onabort=function(){b(1)},c.onload=c.onloadend=d,c.timeout=F,c.open("GET",a.url.join(K),true),c.send()}catch(k){return b(0),E=0,w(a)}return b}function L(){PUBNUB.time(l);PUBNUB.time(function(){setTimeout(function(){D|| +(D=1,c(I,function(a){a[2].subscribe(a[0],a[1])}))},A)})}function p(){if(!M.get)return 0;var a={id:p.id++,send:q(),abort:function(){a.id={}},open:function(b,c){p[a.id]=a;M.get(a.id,c)}};return a}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||q());var C=function(){var a=window.localStorage;return{get:function(b){return a?a.getItem(b):document.cookie.indexOf(b)==-1?null:((document.cookie||"").match(RegExp(b+"=([^;]+)"))||[])[1]||null},set:function(b, +c){if(a)return a.setItem(b,c)&&0;document.cookie=b+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}}}(),O=1,P=/{([\w\-]+)}/g,J="async",K="/",F=14E4,A=1E3,E=navigator.userAgent.indexOf("MSIE 6")==-1,N=function(){var a=Math.floor(Math.random()*9)+1;return function(b){return b.indexOf("pubsub")>0&&b.replace("pubsub","ps"+(++a<10?a:a=1))||b}}(),B={list:{},unbind:function(a){B.list[a]=[]},bind:function(a,b){(B.list[a]=B.list[a]||[]).push(b)},fire:function(a,b){c(B.list[a]||[],function(a){a(b)})}}, +x=t("pubnub")||{},D=0,I=[];PUBNUB=y({publish_key:k(x,"pub-key"),subscribe_key:k(x,"sub-key"),ssl:k(x,"ssl")=="on",origin:k(x,"origin")});H(x,{position:"absolute",top:-A});if("opera"in window||k(x,"flash"))x.innerHTML="";var M=t("pubnubs")||{};h("load", +window,function(){setTimeout(L,0)});PUBNUB.rdx=function(a,b){if(!b)return p[a].onerror();p[a].responseText=unescape(b);p[a].onload()};p.id=A;window.jQuery&&(window.jQuery.PUBNUB=PUBNUB);typeof module!=="undefined"&&(module.f=PUBNUB)&&L()}(); (function(){ "use strict";var sjcl=window['sjcl']={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(a){this.toString=function(){return"CORRUPT: "+this.message};this.message=a},invalid:function(a){this.toString=function(){return"INVALID: "+this.message};this.message=a},bug:function(a){this.toString=function(){return"BUG: "+this.message};this.message=a},notReady:function(a){this.toString=function(){return"NOT READY: "+this.message};this.message=a}}}; sjcl.cipher.aes=function(a){this.h[0][0][0]||this.w();var b,c,d,e,f=this.h[0][4],g=this.h[1];b=a.length;var h=1;if(b!==4&&b!==6&&b!==8)throw new sjcl.exception.invalid("invalid aes key size");this.a=[d=a.slice(0),e=[]];for(a=b;a<4*b+28;a++){c=d[a-1];if(a%b===0||b===8&&a%b===4){c=f[c>>>24]<<24^f[c>>16&255]<<16^f[c>>8&255]<<8^f[c&255];if(a%b===0){c=c<<8^c>>>24^h<<24;h=h<<1^(h>>7)*283}}d[a]=d[a-b]^c}for(b=0;a;b++,a--){c=d[b&3?a:a-4];e[b]=a<=4||b<4?c:g[0][f[c>>>24]]^g[1][f[c>>16&255]]^g[2][f[c>>8&255]]^ diff --git a/socket.io/socket.io.min.js.gz b/socket.io/socket.io.min.js.gz index 526f59f6..7a9493c5 100644 Binary files a/socket.io/socket.io.min.js.gz and b/socket.io/socket.io.min.js.gz differ