From 8ed6e118e40f915f33a24b216afe23569d71d26b Mon Sep 17 00:00:00 2001 From: Brian Lonsdorf Date: Thu, 12 Feb 2015 12:56:27 -0800 Subject: [PATCH 1/4] Update pubnub.js --- web/pubnub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pubnub.js b/web/pubnub.js index 687427e67..afb05f35b 100644 --- a/web/pubnub.js +++ b/web/pubnub.js @@ -3354,7 +3354,7 @@ function error(message) { console['error'](message) } function search( elements, start) { var list = []; each( elements.split(/\s+/), function(el) { - each( (start || document).getElementsByTagName(el), function(node) { + each( (start || document).getElementsByTagName(el), function(i, node) { list.push(node); } ); }); From d27a7d34a5d057a43e9848fa8f42651f9cfdac3b Mon Sep 17 00:00:00 2001 From: Brian Lonsdorf Date: Fri, 13 Feb 2015 08:57:16 -0800 Subject: [PATCH 2/4] Update VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a0fc9e07c..c77a7de85 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.7.8 +3.7.9 From 1ac245f58edcba78a98ab2dd74037d45216c8f30 Mon Sep 17 00:00:00 2001 From: Brian Lonsdorf Date: Fri, 13 Feb 2015 08:57:30 -0800 Subject: [PATCH 3/4] Update bower.json --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 60c81651b..4fa097634 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pubnub", - "version": "3.7.8", + "version": "3.7.9", "main": "web/pubnub.min.js", "license": "https://github.com/pubnub/javascript/blob/master/LICENSE", "ignore" : [ "**/*", "!web/pubnub.js", "!web/pubnub.min.js"], From e50ee615b84fa61178d7229806313f1685f222fa Mon Sep 17 00:00:00 2001 From: Brian Lonsdorf Date: Fri, 13 Feb 2015 09:07:39 -0800 Subject: [PATCH 4/4] updated versions via make file --- web/pubnub-3.7.8.min.js | 107 ----------------------- web/{pubnub-3.7.8.js => pubnub-3.7.9.js} | 32 +------ web/pubnub-3.7.9.min.js | 2 + 3 files changed, 5 insertions(+), 136 deletions(-) delete mode 100644 web/pubnub-3.7.8.min.js rename web/{pubnub-3.7.8.js => pubnub-3.7.9.js} (95%) create mode 100644 web/pubnub-3.7.9.min.js diff --git a/web/pubnub-3.7.8.min.js b/web/pubnub-3.7.8.min.js deleted file mode 100644 index a644d80de..000000000 --- a/web/pubnub-3.7.8.min.js +++ /dev/null @@ -1,107 +0,0 @@ -// Version: 3.7.8 -(function(){ -var ca=void 0,v=!0,y=null,z=!1;function A(){return function(){}} -window.JSON&&window.JSON.stringify||function(){function a(){try{return this.valueOf()}catch(a){return y}}function d(a){c.lastIndex=0;return c.test(a)?'"'+a.replace(c,function(a){var b=q[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(c,q){var u,r,f,h,m,g=e,l=q[c];l&&"object"===typeof l&&(l=a.call(l));"function"===typeof j&&(l=j.call(q,c,l));switch(typeof l){case "string":return d(l);case "number":return isFinite(l)?String(l):"null";case "boolean":case "null":return String(l); -case "object":if(!l)return"null";e+=p;m=[];if("[object Array]"===Object.prototype.toString.apply(l)){h=l.length;for(u=0;u++qa?qa:qa=1))||a}; -function sa(a,d){var b=a.join(ja),c=[];if(!d)return b;M(d,function(a,b){var d="object"==typeof b?JSON.stringify(b):b;"undefined"!=typeof b&&(b!=y&&0G()?(clearTimeout(c),c=setTimeout(b,d)):(e=G(),a())}var c,e=0;return b}function ua(a,d){var b=[];M(a||[],function(a){d(a)&&b.push(a)});return b}function va(a,d){return a.replace(la,function(a,c){return d[c]||a})} -function ra(a){var d="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var c=16*Math.random()|0;return("x"==a?c:c&3|8).toString(16)});a&&a(d);return d}function wa(a){return!!a&&"string"!==typeof a&&(Array.isArray&&Array.isArray(a)||"number"===typeof a.length)}function M(a,d){if(a&&d)if(wa(a))for(var b=0,c=a.length;ba.search("-pnpres")&&e.e&&b.push(a):e.e&&b.push(a)});return b.sort()}function za(a,d){var b=[];M(a,function(a,e){d?0>a.search("-pnpres")&&e.e&&b.push(a):e.e&&b.push(a)});return b.sort()}function Aa(){setTimeout(function(){ea||(ea=1,M(fa,function(a){a()}))},E)}var T,U=14,X=8,Ba=z; -function Ca(a,d){var b="",c,e;if(d){c=a[15];if(16e;e++)b+=String.fromCharCode(a[e]);return b}function Da(a,d){var b=[],c;if(!d)try{a=unescape(encodeURIComponent(a))}catch(e){throw"Error on UTF-8 encode";}for(c=0;cC.length&&(r=16-C.length,u=[r,r,r,r,r,r,r,r,r,r,r,r,r,r,r,r]);for(r=0;rc;c++)b[c]=d[a[c]];return b}function Ua(a){var d=[],b=Ba?[0,13,10,7,4,1,14,11,8,5,2,15,12,9,6,3]:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11],c;for(c=0;16>c;c++)d[c]=a[b[c]];return d} -function Va(a){var d=[],b;if(Ba)for(b=0;4>b;b++)d[4*b]=Ya[a[4*b]]^Za[a[1+4*b]]^$a[a[2+4*b]]^bb[a[3+4*b]],d[1+4*b]=bb[a[4*b]]^Ya[a[1+4*b]]^Za[a[2+4*b]]^$a[a[3+4*b]],d[2+4*b]=$a[a[4*b]]^bb[a[1+4*b]]^Ya[a[2+4*b]]^Za[a[3+4*b]],d[3+4*b]=Za[a[4*b]]^$a[a[1+4*b]]^bb[a[2+4*b]]^Ya[a[3+4*b]];else for(b=0;4>b;b++)d[4*b]=cb[a[4*b]]^ib[a[1+4*b]]^a[2+4*b]^a[3+4*b],d[1+4*b]=a[4*b]^cb[a[1+4*b]]^ib[a[2+4*b]]^a[3+4*b],d[2+4*b]=a[4*b]^a[1+4*b]^cb[a[2+4*b]]^ib[a[3+4*b]],d[3+4*b]=ib[a[4*b]]^a[1+4*b]^a[2+4*b]^cb[a[3+4* -b]];return d}function Ma(a,d,b){var c=[],e;for(e=0;16>e;e++)c[e]=a[e]^d[b][e];return c}function Ha(a,d){var b=[],c;for(c=0;16>c;c++)b[c]=a[c]^d[c];return b} -function Ga(a){var d=[],b=[],c,e,p=[];for(c=0;ca;a++)b[a]=d[c-1][a];if(0===c%X){a=b[0];e=ca;for(e=0;4>e;e++)b[e]=b[e+1];b[3]=a;b=jb(b);b[0]^=kb[c/X-1]}else 6a;a++)d[c][a]=d[c-X][a]^b[a]}for(c=0;cb;b++)p[c].push(d[4*c+b][0],d[4*c+b][1],d[4*c+b][2],d[4*c+b][3])}return p}function jb(a){for(var d=0;4>d;d++)a[d]=Xa[a[d]];return a} -function lb(a,d){var b=[];for(i=0;ib;b++){for(var c=a,e=b,p=ca,q=ca,p=q=0;8>p;p++)q=1==(e&1)?q^c:q,c=127>>=1;d[b]=q}return d} -var Xa=lb("637c777bf26b6fc53001672bfed7ab76ca82c97dfa5947f0add4a2af9ca472c0b7fd9326363ff7cc34a5e5f171d8311504c723c31896059a071280e2eb27b27509832c1a1b6e5aa0523bd6b329e32f8453d100ed20fcb15b6acbbe394a4c58cfd0efaafb434d338545f9027f503c9fa851a3408f929d38f5bcb6da2110fff3d2cd0c13ec5f974417c4a77e3d645d197360814fdc222a908846eeb814de5e0bdbe0323a0a4906245cc2d3ac629195e479e7c8376d8dd54ea96c56f4ea657aae08ba78252e1ca6b4c6e8dd741f4bbd8b8a703eb5664803f60e613557b986c11d9ee1f8981169d98e949b1e87e9ce5528df8ca1890dbfe6426841992d0fb054bb16",2), -Wa,nb=Xa,ob=[];for(i=0;i>2],b+=rb[(d[c]&3)<<4|d[c+1]>>4],b=d[c+1]!==ca?b+rb[(d[c+1]&15)<<2|d[c+2]>>6]:b+"=",b=d[c+2]!==ca?b+rb[d[c+2]&63]:b+"=";a=b.slice(0,64);for(c=1;c>4,c[1]=(b[1]&15)<<4|b[2]>>2,c[2]=(b[2]&3)<<6|b[3],d.push(c[0],c[1],c[2]);return d=d.slice(0,d.length-d.length%16)}}; -T={size:function(a){switch(a){case 128:U=10;X=4;break;case 192:U=12;X=6;break;case 256:U=14;X=8;break;default:throw"Invalid Key Size Specified:"+a;}},h2a:function(a){var d=[];a.replace(/(..)/g,function(a){d.push(parseInt(a,16))});return d},expandKey:Ga,encryptBlock:Ia,decryptBlock:La,Decrypt:Ba,s2a:Da,rawEncrypt:Fa,rawDecrypt:Ka,dec:function(a,d,b){var a=pb.s(a),c=a.slice(8,16),c=Ea(Da(d,b),c),d=c.key,c=c.l,a=a.slice(16,a.length);return a=Ka(a,d,c,b)},openSSLKey:Ea,a2h:function(a){var d="",b;for(b= -0;ba[b]?"0":"")+a[b].toString(16);return d},enc:function(a,d,b){var c;c=[];var e;for(e=0;8>e;e++)c=c.concat(Math.floor(256*Math.random()));e=Ea(Da(d,b),c);d=e.key;e=e.l;c=[[83,97,108,116,101,100,95,95].concat(c)];a=Da(a,b);a=Fa(a,d,e);a=c.concat(a);return pb.t(a)},Hash:{MD5:function(a){function d(a,b){var c,d,e,f,j;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;j=(a&1073741823)+(b&1073741823);return c&d?j^2147483648^e^f:c|d?j&1073741824?j^3221225472^e^f:j^1073741824^ -e^f:j^e^f}function b(a,b,c,e,f,j,h){a=d(a,d(d(b&c|~b&e,f),h));return d(a<>>32-j,b)}function c(a,b,c,e,f,j,h){a=d(a,d(d(b&e|c&~e,f),h));return d(a<>>32-j,b)}function e(a,b,c,e,j,f,h){a=d(a,d(d(b^c^e,j),h));return d(a<>>32-f,b)}function p(a,b,c,e,f,j,h){a=d(a,d(d(c^(b|~e),f),h));return d(a<>>32-j,b)}function q(a){var b,c,d=[];for(c=0;3>=c;c++)b=a>>>8*c&255,d=d.concat(b);return d}var j=[],s,C,u,r,f,h,m,g,l=lb("67452301efcdab8998badcfe10325476d76aa478e8c7b756242070dbc1bdceeef57c0faf4787c62aa8304613fd469501698098d88b44f7afffff5bb1895cd7be6b901122fd987193a679438e49b40821f61e2562c040b340265e5a51e9b6c7aad62f105d02441453d8a1e681e7d3fbc821e1cde6c33707d6f4d50d87455a14eda9e3e905fcefa3f8676f02d98d2a4c8afffa39428771f6816d9d6122fde5380ca4beea444bdecfa9f6bb4b60bebfbc70289b7ec6eaa127fad4ef308504881d05d9d4d039e6db99e51fa27cf8c4ac5665f4292244432aff97ab9423a7fc93a039655b59c38f0ccc92ffeff47d85845dd16fa87e4ffe2ce6e0a30143144e0811a1f7537e82bd3af2352ad7d2bbeb86d391", -8),j=a.length;s=j+8;C=16*((s-s%64)/64+1);u=[];for(f=r=0;f>>29;j=u;f=l[0];h=l[1];m=l[2];g=l[3];for(a=0;aO||!ya(F,v).length&&!za(N,v).length?eb=z:(eb=v,B.presence_heartbeat({callback:function(){Pa=setTimeout(h,O*E)},error:function(a){t&&t("Presence Heartbeat unable to reach Pubnub servers."+JSON.stringify(a));Pa=setTimeout(h,O*E)}}))}function m(a,b){return Qa.decrypt(a,b||V)||Qa.decrypt(a,V)||a}function g(a, -b,c){var d=z;if("number"===typeof a)d=5 5 or x = 0). Current Value : "+(b||5)),b||5):a}function l(a){var b="",c=[];M(a,function(a){c.push(a)});var d=c.sort(),e;for(e in d){var f=d[e],b=b+(f+"="+encodeURIComponent(a[f]));e!=d.length-1&&(b+="&")}return b}function D(a){a||(a={});M(P,function(b,c){b in a||(a[b]=c)});return a}function x(a){return ac(a)}function Ja(a){function b(a, -c){var d=(a&65535)+(c&65535);return(a>>16)+(c>>16)+(d>>16)<<16|d&65535}function c(a,b){return a>>>b|a<<32-b}var d;d=a.replace(/\r\n/g,"\n");for(var a="",e=0;ef?a+=String.fromCharCode(f):(127f?a+=String.fromCharCode(f>>6|192):(a+=String.fromCharCode(f>>12|224),a+=String.fromCharCode(f>>6&63|128)),a+=String.fromCharCode(f&63|128))}e=a;d=[];for(f=0;f<8*e.length;f+=8)d[f>>5]|=(e.charCodeAt(f/8)&255)<<24-f%32;var j=8*a.length,e=[1116352408,1899447441,3049323471, -3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616, -659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),h,m,l,g,p,q,t,r,s,u,w;d[j>>5]|=128<<24-j%32;d[(j+64>>9<<4)+15]=j;for(r=0;rs;s++)f[s]=16>s?d[s+r]:b(b(b(c(f[s-2],17)^c(f[s-2],19)^f[s-2]>>>10,f[s-7]),c(f[s-15],7)^ -c(f[s-15],18)^f[s-15]>>>3),f[s-16]),u=b(b(b(b(t,c(g,6)^c(g,11)^c(g,25)),g&p^~g&q),e[s]),f[s]),w=b(c(j,2)^c(j,13)^c(j,22),j&h^j&m^h&m),t=q,q=p,p=g,g=b(l,u),l=m,m=h,h=j,j=b(u,w);a[0]=b(j,a[0]);a[1]=b(h,a[1]);a[2]=b(m,a[2]);a[3]=b(l,a[3]);a[4]=b(g,a[4]);a[5]=b(p,a[5]);a[6]=b(q,a[6]);a[7]=b(t,a[7])}d="";for(e=0;e<4*a.length;e++)d+="0123456789abcdef".charAt(a[e>>2]>>8*(3-e%4)+4&15)+"0123456789abcdef".charAt(a[e>>2]>>8*(3-e%4)&15);return d}Cb=a.jsonp?0:-1==Ob.indexOf("MSIE 6");var Y=a.subscribe_key||""; -a.uuid||Pb.get(Y+"uuid");var ab=a.leave_on_unload||0;a.xdr=Fb;a.db=Pb;a.error=a.error||ub;a._is_online=Hb;a.jsonp_cb=Eb;a.hmac_SHA256=sb;T.size(256);var yb=T.s2a("0123456789012345");a.crypto_obj={encrypt:function(a,b){if(!b)return a;var c=T.s2a(Ja(b).slice(0,32)),d=T.s2a(JSON.stringify(a)),c=T.rawEncrypt(d,c,yb);return T.Base64.encode(c)||a},decrypt:function(a,b){if(!b)return a;var c=T.s2a(Ja(b).slice(0,32));try{var d=T.Base64.decode(a),e=T.rawDecrypt(d,c,yb,z);return JSON.parse(e)}catch(f){}}};a.params= -{pnsdk:"PubNub-JS-Web/3.7.8"};var Wb=+a.windowing||10,$b=(+a.timeout||310)*E,Db=(+a.keepalive||60)*E,bc=a.timecheck||0,Jb=a.noleave||0,Q=a.publish_key||"demo",w=a.subscribe_key||"demo",J=a.auth_key||"",Ra=a.secret_key||"",Kb=a.hmac_SHA256,ba=a.ssl?"s":"",oa="http"+ba+"://"+(a.origin||"pubsub.pubnub.com"),L=pa(oa),Lb=pa(oa),aa=[],fb=v,db=0,gb=0,Mb=0,Oa=0,Sa=a.restore||0,ha=0,hb=z,F={},N={},S={},Pa=y,W=g(a.heartbeat||a.pnexpires||0,a.error),O=a.heartbeat_interval||W-3,eb=z,dc=a.no_wait_for_pending, -Nb=a["compatible_3.5"]||z,H=a.xdr,P=a.params||{},t=a.error||A(),cc=a._is_online||function(){return 1},I=a.jsonp_cb||function(){return 0},ia=a.db||{get:A(),set:A()},V=a.cipher_key,K=a.uuid||!a.unique_uuid&&ia&&ia.get(w+"uuid")||"",$,R,Qa=a.crypto_obj||{encrypt:function(a){return a},decrypt:function(a){return a}},B={LEAVE:function(a,b,c,d,e){var c={uuid:K,auth:c||J},f=pa(oa),d=d||A(),h=e||A(),e=I();if(0b.indexOf("-pnpres"))&&(b+="-pnpres"),c=N[b]||F[b]||{callback:A()}):c=F[a];a=[c.a||gb,a.split(ga)[0]];b&&a.push(b.split(ga)[0]);return a};var g=G()-db-+a[1]/1E4;M(a[0],function(c){var d=b(),c=m(c,F[d[1]]?F[d[1]].cipher_key:y);d[0]&&d[0](c,a,d[2]||d[1],g,d[1])})}setTimeout(h,$)}})}}var g=a.channel,l=a.channel_group,b=(b=b||a.callback)||a.message,p=a.auth_key||J,q=a.connect||A(),r=a.reconnect||A(), -s=a.disconnect||A(),x=a.error||A(),O=a.idle||A(),na=a.presence||0,P=a.noheresync||0,Q=a.backfill||0,Y=a.timetoken||0,aa=a.timeout||$b,$=a.windowing||Wb,R=a.state,V=a.heartbeat||a.pnexpires,ba=a.restore||Sa;Sa=ba;ha=Y;if(!g&&!l)return t("Missing Channel");if(!b)return t("Missing Callback");if(!w)return t("Missing Subscribe Key");(V||0===V)&&B.set_heartbeat(V);g&&M((g.join?g.join(","):""+g).split(","),function(c){var d=F[c]||{};F[Mb=c]={name:c,f:d.f,d:d.d,e:1,a:gb=b,cipher_key:a.cipher_key,i:q,j:s, -k:r};R&&(S[c]=c in R?R[c]:R);na&&(B.subscribe({channel:c+ga,callback:na,restore:ba}),!d.e&&!P&&B.here_now({channel:c,callback:function(a){M("uuids"in a?a.uuids:[],function(b){na({action:"join",uuid:b,timestamp:Math.floor(G()/1E3),occupancy:a.occupancy||1},a,c)})}}))});l&&M((l.join?l.join(","):""+l).split(","),function(c){var d=N[c]||{};N[c]={name:c,f:d.f,d:d.d,e:1,a:gb=b,cipher_key:a.cipher_key,i:q,j:s,k:r};na&&(B.subscribe({channel_group:c+ga,callback:na,restore:ba}),!d.e&&!P&&B.here_now({channel_group:c, -callback:function(a){M("uuids"in a?a.uuids:[],function(b){na({action:"join",uuid:b,timestamp:Math.floor(G()/1E3),occupancy:a.occupancy||1},a,c)})}}))});d=function(){c();setTimeout(h,$)};if(!ea)return fa.push(d);d()},here_now:function(a,b){var b=a.callback||b,c=a.error||A(),d=a.auth_key||J,e=a.channel,f=a.channel_group,h=I(),g=a.state,d={uuid:K,auth:d};if(!("uuids"in a?a.uuids:1))d.disable_uuids=1;g&&(d.state=1);if(!b)return t("Missing Callback");if(!w)return t("Missing Subscribe Key");g=[L,"v2","presence", -"sub_key",w];e&&g.push("channel")&&g.push(encodeURIComponent(e));"0"!=h&&(d.callback=h);f&&(d["channel-group"]=f,!e&&g.push("channel")&&g.push(","));H({a:h,data:D(d),c:function(a){s(a,b,c)},b:function(a){j(a,c)},url:g})},where_now:function(a,b){var b=a.callback||b,c=a.error||A(),d=a.auth_key||J,e=I(),f=a.uuid||K,d={auth:d};if(!b)return t("Missing Callback");if(!w)return t("Missing Subscribe Key");"0"!=e&&(d.callback=e);H({a:e,data:D(d),c:function(a){s(a,b,c)},b:function(a){j(a,c)},url:[L,"v2","presence", -"sub_key",w,"uuid",encodeURIComponent(f)]})},state:function(a,b){var b=a.callback||b||A(),c=a.error||A(),d=a.auth_key||J,e=I(),f=a.state,h=a.uuid||K,g=a.channel,l=a.channel_group,d=D({auth:d});if(!w)return t("Missing Subscribe Key");if(!h)return t("Missing UUID");if(!g&&!l)return t("Missing Channel");"0"!=e&&(d.callback=e);"undefined"!=typeof g&&F[g]&&F[g].e&&f&&(S[g]=f);"undefined"!=typeof l&&(N[l]&&N[l].e)&&(f&&(S[l]=f),d["channel-group"]=l,g||(g=","));d.state=JSON.stringify(f);f=f?[L,"v2","presence", -"sub-key",w,"channel",g,"uuid",h,"data"]:[L,"v2","presence","sub-key",w,"channel",g,"uuid",encodeURIComponent(h)];H({a:e,data:D(d),c:function(a){s(a,b,c)},b:function(a){j(a,c)},url:f})},grant:function(a,b){var b=a.callback||b,c=a.error||A(),d=a.channel,e=a.channel_group,f=I(),h=a.ttl,g=a.read?"1":"0",m=a.write?"1":"0",p=a.manage?"1":"0",q=a.auth_key;if(!b)return t("Missing Callback");if(!w)return t("Missing Subscribe Key");if(!Q)return t("Missing Publish Key");if(!Ra)return t("Missing Secret Key"); -var r=w+"\n"+Q+"\ngrant\n",g={w:m,r:g,timestamp:Math.floor((new Date).getTime()/1E3)};a.manage&&(g.m=p);"undefined"!=typeof d&&(d!=y&&0W&&(d.heartbeat=W);"0"!=a&&(d.callback=a);var e;e=ya(F,v).join(",");e=encodeURIComponent(e);var f=za(N,v).join(",");e||(e=",");f&&(d["channel-group"]=f);H({a:a,data:D(d),timeout:5*E,url:[L,"v2","presence","sub-key",w,"channel",e,"heartbeat"],c:function(a){s(a,b,c)},b:function(a){j(a,c)}})},stop_timers:function(){clearTimeout($);clearTimeout(R)},xdr:H,ready:Aa,db:ia,uuid:ra,map:xa,each:M,"each-channel":C, -grep:ua,offline:function(){c(1,{message:"Offline. Please check your network settings."})},supplant:va,now:G,unique:ma,updater:ta};K||(K=B.uuid());ia.set(w+"uuid",K);$=setTimeout(p,E);R=setTimeout(e,Db);Pa=setTimeout(f,(O-3)*E);b();var Y=B,Ta;for(Ta in Y)Y.hasOwnProperty(Ta)&&(x[Ta]=Y[Ta]);x.css=Ab;x.$=tb;x.create=Bb;x.bind=wb;x.head=xb;x.search=vb;x.attr=zb;x.events=Yb;x.init=x;x.secure=x;wb("beforeunload",window,function(){if(ab)x["each-channel"](function(a){x.LEAVE(a.name,0)});return v});if(a.notest)return x; -wb("offline",window,x.offline);wb("offline",document,x.offline);return x};ac.init=ac;ac.secure=ac;"complete"===document.readyState?setTimeout(Aa,0):wb("load",window,function(){setTimeout(Aa,0)});var ec=Zb||{};PUBNUB=ac({notest:1,publish_key:zb(ec,"pub-key"),subscribe_key:zb(ec,"sub-key"),ssl:!document.location.href.indexOf("https")||"on"==zb(ec,"ssl"),origin:zb(ec,"origin"),uuid:zb(ec,"uuid")});window.jQuery&&(window.jQuery.PUBNUB=ac);"undefined"!==typeof module&&(module.exports=PUBNUB)&&Aa();var Ib= -tb("pubnubs")||0;if(Zb){Ab(Zb,{position:"absolute",top:-E});if("opera"in window||zb(Zb,"flash"))Zb.innerHTML="";PUBNUB.rdx=function(a,d){if(!d)return Z[a].onerror();Z[a].responseText=unescape(d);Z[a].onload()};Z.id=E}} -var fc=PUBNUB.ws=function(a,d){if(!(this instanceof fc))return new fc(a,d);var b=this,a=b.url=a||"";b.protocol=d||"Sec-WebSocket-Protocol";var c=a.split("/"),c={ssl:"wss:"===c[0],origin:c[2],publish_key:c[3],subscribe_key:c[4],channel:c[5]};b.CONNECTING=0;b.OPEN=1;b.CLOSING=2;b.CLOSED=3;b.CLOSE_NORMAL=1E3;b.CLOSE_GOING_AWAY=1001;b.CLOSE_PROTOCOL_ERROR=1002;b.CLOSE_UNSUPPORTED=1003;b.CLOSE_TOO_LARGE=1004;b.CLOSE_NO_STATUS=1005;b.CLOSE_ABNORMAL=1006;b.onclose=b.onerror=b.onmessage=b.onopen=b.onsend= -A();b.binaryType="";b.extensions="";b.bufferedAmount=0;b.trasnmitting=z;b.buffer=[];b.readyState=b.CONNECTING;if(!a)return b.readyState=b.CLOSED,b.onclose({code:b.CLOSE_ABNORMAL,reason:"Missing URL",wasClean:v}),b;b.g=PUBNUB.init(c);b.g.o=c;b.o=c;b.g.subscribe({restore:z,channel:c.channel,disconnect:b.onerror,reconnect:b.onopen,error:function(){b.onclose({code:b.CLOSE_ABNORMAL,reason:"Missing URL",wasClean:z})},callback:function(a){b.onmessage({data:a})},connect:function(){b.readyState=b.OPEN;b.onopen()}})}; -fc.prototype.send=function(a){var d=this;d.g.publish({channel:d.g.o.channel,message:a,callback:function(a){d.onsend({data:a})}})}; -})(); -/* -CryptoJS v3.1.2 -code.google.com/p/crypto-js -(c) 2009-2013 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -var CryptoJS=CryptoJS||function(h,s){var f={},g=f.lib={},q=function(){},m=g.Base={extend:function(a){q.prototype=this;var c=new q;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, -r=g.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||k).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< -32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, -2),16)<<24-4*(b%8);return new r.init(d,c/2)}},n=l.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(d,c)}},j=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, -u=g.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var g=0;gn;){var j;a:{j=k;for(var u=h.sqrt(j),t=2;t<=u;t++)if(!(j%t)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=l(h.pow(k,0.5))),r[n]=l(h.pow(k,1/3)),n++);k++}var a=[],f=f.SHA256=q.extend({_doReset:function(){this._hash=new g.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],j=b[3],h=b[4],m=b[5],n=b[6],q=b[7],p=0;64>p;p++){if(16>p)a[p]= -c[d+p]|0;else{var k=a[p-15],l=a[p-2];a[p]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[p-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[p-16]}k=q+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&m^~h&n)+r[p]+a[p];l=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);q=n;n=m;m=h;h=j+k|0;j=g;g=f;f=e;e=k+l|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+m|0;b[6]=b[6]+n|0;b[7]=b[7]+q|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; -d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=q._createHelper(f);s.HmacSHA256=q._createHmacHelper(f)})(Math); -(function(){var h=CryptoJS,s=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(f,g){f=this._hasher=new f.init;"string"==typeof g&&(g=s.parse(g));var h=f.blockSize,m=4*h;g.sigBytes>m&&(g=f.finalize(g));g.clamp();for(var r=this._oKey=g.clone(),l=this._iKey=g.clone(),k=r.words,n=l.words,j=0;j>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< -e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/web/pubnub-3.7.8.js b/web/pubnub-3.7.9.js similarity index 95% rename from web/pubnub-3.7.8.js rename to web/pubnub-3.7.9.js index 687427e67..c73772e3a 100644 --- a/web/pubnub-3.7.8.js +++ b/web/pubnub-3.7.9.js @@ -1,4 +1,4 @@ -// Version: 3.7.8 +// Version: 3.7.9 /* =-====================================================================-= */ /* =-====================================================================-= */ /* =-========================= JSON =============================-= */ @@ -162,7 +162,7 @@ var NOW = 1 , PARAMSBIT = '&' , PRESENCE_HB_THRESHOLD = 5 , PRESENCE_HB_DEFAULT = 30 -, SDK_VER = '3.7.8' +, SDK_VER = '3.7.9' , REPL = /{([\w\-]+)}/g; /** @@ -3265,7 +3265,7 @@ window['PUBNUB'] || (function() { var SWF = 'https://pubnub.a.ssl.fastly.net/pubnub.swf' , ASYNC = 'async' , UA = navigator.userAgent -, PNSDK = 'PubNub-JS-' + 'Web' + '/' + '3.7.8' +, PNSDK = 'PubNub-JS-' + 'Web' + '/' + '3.7.9' , XORIGN = UA.indexOf('MSIE 6') == -1; /** @@ -3867,29 +3867,3 @@ WS.prototype.close = function() { }; })(); -/* -CryptoJS v3.1.2 -code.google.com/p/crypto-js -(c) 2009-2013 by Jeff Mott. All rights reserved. -code.google.com/p/crypto-js/wiki/License -*/ -var CryptoJS=CryptoJS||function(h,s){var f={},g=f.lib={},q=function(){},m=g.Base={extend:function(a){q.prototype=this;var c=new q;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, -r=g.WordArray=m.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=s?c:4*a.length},toString:function(a){return(a||k).stringify(this)},concat:function(a){var c=this.words,d=a.words,b=this.sigBytes;a=a.sigBytes;this.clamp();if(b%4)for(var e=0;e>>2]|=(d[e>>>2]>>>24-8*(e%4)&255)<<24-8*((b+e)%4);else if(65535>>2]=d[e>>>2];else c.push.apply(c,d);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< -32-8*(c%4);a.length=h.ceil(c/4)},clone:function(){var a=m.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],d=0;d>>2]>>>24-8*(b%4)&255;d.push((e>>>4).toString(16));d.push((e&15).toString(16))}return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>3]|=parseInt(a.substr(b, -2),16)<<24-4*(b%8);return new r.init(d,c/2)}},n=l.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var d=[],b=0;b>>2]>>>24-8*(b%4)&255));return d.join("")},parse:function(a){for(var c=a.length,d=[],b=0;b>>2]|=(a.charCodeAt(b)&255)<<24-8*(b%4);return new r.init(d,c)}},j=l.Utf8={stringify:function(a){try{return decodeURIComponent(escape(n.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return n.parse(unescape(encodeURIComponent(a)))}}, -u=g.BufferedBlockAlgorithm=m.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=j.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,d=c.words,b=c.sigBytes,e=this.blockSize,f=b/(4*e),f=a?h.ceil(f):h.max((f|0)-this._minBufferSize,0);a=f*e;b=h.min(4*a,b);if(a){for(var g=0;gn;){var j;a:{j=k;for(var u=h.sqrt(j),t=2;t<=u;t++)if(!(j%t)){j=!1;break a}j=!0}j&&(8>n&&(m[n]=l(h.pow(k,0.5))),r[n]=l(h.pow(k,1/3)),n++);k++}var a=[],f=f.SHA256=q.extend({_doReset:function(){this._hash=new g.init(m.slice(0))},_doProcessBlock:function(c,d){for(var b=this._hash.words,e=b[0],f=b[1],g=b[2],j=b[3],h=b[4],m=b[5],n=b[6],q=b[7],p=0;64>p;p++){if(16>p)a[p]= -c[d+p]|0;else{var k=a[p-15],l=a[p-2];a[p]=((k<<25|k>>>7)^(k<<14|k>>>18)^k>>>3)+a[p-7]+((l<<15|l>>>17)^(l<<13|l>>>19)^l>>>10)+a[p-16]}k=q+((h<<26|h>>>6)^(h<<21|h>>>11)^(h<<7|h>>>25))+(h&m^~h&n)+r[p]+a[p];l=((e<<30|e>>>2)^(e<<19|e>>>13)^(e<<10|e>>>22))+(e&f^e&g^f&g);q=n;n=m;m=h;h=j+k|0;j=g;g=f;f=e;e=k+l|0}b[0]=b[0]+e|0;b[1]=b[1]+f|0;b[2]=b[2]+g|0;b[3]=b[3]+j|0;b[4]=b[4]+h|0;b[5]=b[5]+m|0;b[6]=b[6]+n|0;b[7]=b[7]+q|0},_doFinalize:function(){var a=this._data,d=a.words,b=8*this._nDataBytes,e=8*a.sigBytes; -d[e>>>5]|=128<<24-e%32;d[(e+64>>>9<<4)+14]=h.floor(b/4294967296);d[(e+64>>>9<<4)+15]=b;a.sigBytes=4*d.length;this._process();return this._hash},clone:function(){var a=q.clone.call(this);a._hash=this._hash.clone();return a}});s.SHA256=q._createHelper(f);s.HmacSHA256=q._createHmacHelper(f)})(Math); -(function(){var h=CryptoJS,s=h.enc.Utf8;h.algo.HMAC=h.lib.Base.extend({init:function(f,g){f=this._hasher=new f.init;"string"==typeof g&&(g=s.parse(g));var h=f.blockSize,m=4*h;g.sigBytes>m&&(g=f.finalize(g));g.clamp();for(var r=this._oKey=g.clone(),l=this._iKey=g.clone(),k=r.words,n=l.words,j=0;j>>2]>>>24-8*(a%4)&255)<<16|(e[a+1>>>2]>>>24-8*((a+1)%4)&255)<<8|e[a+2>>>2]>>>24-8*((a+2)%4)&255,g=0;4>g&&a+0.75*g>>6*(3-g)&63));if(e=c.charAt(64))for(;b.length%4;)b.push(e);return b.join("")},parse:function(b){var e=b.length,f=this._map,c=f.charAt(64);c&&(c=b.indexOf(c),-1!=c&&(e=c));for(var c=[],a=0,d=0;d< -e;d++)if(d%4){var g=f.indexOf(b.charAt(d-1))<<2*(d%4),h=f.indexOf(b.charAt(d))>>>6-2*(d%4);c[a>>>2]|=(g|h)<<24-8*(a%4);a++}return j.create(c,a)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); diff --git a/web/pubnub-3.7.9.min.js b/web/pubnub-3.7.9.min.js new file mode 100644 index 000000000..2a2a144b2 --- /dev/null +++ b/web/pubnub-3.7.9.min.js @@ -0,0 +1,2 @@ +// Version: 3.7.9 +(function(){