From 009e06f2ff274ca9c5e0ebd5071899093c48df42 Mon Sep 17 00:00:00 2001 From: Drew Freyling Date: Fri, 28 Jun 2013 09:32:41 +1000 Subject: [PATCH 1/2] Updated pubnub to 3.5.3 --- ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js | 31 ++++++++++++++++++++++ ajax/libs/pubnub/package.json | 2 +- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js diff --git a/ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js b/ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js new file mode 100644 index 000000000..457bd5278 --- /dev/null +++ b/ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js @@ -0,0 +1,31 @@ +// Version: 3.5.3 +(function(){ +var n=null,r=!1;function t(){return function(){}} +window.JSON&&window.JSON.stringify||function(){function a(){try{return this.valueOf()}catch(a){return n}}function c(a){d.lastIndex=0;return d.test(a)?'"'+a.replace(d,function(a){var b=q[a];return"string"===typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function b(d,H){var h,i,l,j,m,q=e,f=H[d];f&&"object"===typeof f&&(f=a.call(f));"function"===typeof k&&(f=k.call(H,d,f));switch(typeof f){case "string":return c(f);case "number":return isFinite(f)?String(f):"null";case "boolean":case "null":return String(f); +case "object":if(!f)return"null";e+=s;m=[];if("[object Array]"===Object.prototype.toString.apply(f)){j=f.length;for(h=0;h++ia?ia:ia=1))||a}; +function ka(a,c){var b=a.join(da),d=[];if(!c)return b;M(c,function(a,b){d.push(a+"="+N(b))});return b+="?"+d.join(ea)}function la(a,c){function b(){e+c>G()?(clearTimeout(d),d=setTimeout(b,c)):(e=G(),a())}var d,e=0;return b}function ma(a,c){var b=[];M(a||[],function(a){c(a)&&b.push(a)});return b}function na(a,c){return a.replace(ha,function(a,d){return c[d]||a})} +function ja(a){var c="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(c);return c}function M(a,c){if(a&&c)if("undefined"!=typeof a[0])for(var b=0,d=a.length;b"-_.!~*'()".indexOf(a)?a:"%"+a.charCodeAt(0).toString(16).toUpperCase()}).join("")}function oa(a){var c=[];M(a,function(a,d){d.j&&c.push(a)});return c.sort()}function pa(){setTimeout(function(){v||(v=1,M(ba,function(a){a()}))},z)} +if(!window.PUBNUB){var Q=function(a){return document.getElementById(a)},qa=function(a){console.error(a)},ra=function(a,c){var b=[];M(a.split(/\s+/),function(a){M((c||document).getElementsByTagName(a),function(a){b.push(a)})});return b},R=function(a,c,b){M(a.split(","),function(a){function e(a){a||(a=window.event);b(a)||(a.cancelBubble=!0,a.returnValue=r,a.preventDefault&&a.preventDefault(),a.stopPropagation&&a.stopPropagation())}c.addEventListener?c.addEventListener(a,e,r):c.attachEvent?c.attachEvent("on"+ +a,e):c["on"+a]=e})},sa=function(){return ra("head")[0]},S=function(a,c,b){if(b)a.setAttribute(c,b);else return a&&a.getAttribute&&a.getAttribute(c)},ua=function(a,c){for(var b in c)if(c.hasOwnProperty(b))try{a.style[b]=c[b]+(0<"|width|height|top|left|".indexOf(b)&&"number"==typeof c[b]?"px":"")}catch(d){}},va=function(a){return document.createElement(a)},wa=function(){return T||U()?0:E()},ya=function(a){function c(a,b){O||(O=1,f.onerror=n,clearTimeout(u),a||!b||X(b),setTimeout(function(){a&&Y();var b= +Q(x),c=b&&b.parentNode;c&&c.removeChild(b)},z))}if(T||U()){a:{var b,d,e=function(){if(!q){q=1;clearTimeout(g);try{d=JSON.parse(b.responseText)}catch(a){return j(1)}s=1;i(d)}},s=0,q=0,k=a.timeout||1E4,g=setTimeout(function(){j(1)},k),H=a.b||t(),h=a.data||{},i=a.c||t(),l="undefined"===typeof a.g,j=function(a){s||(s=1,clearTimeout(g),b&&(b.onerror=b.onload=n,b.abort&&b.abort(),b=n),a&&H())};try{b=U()||window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;b.onerror=b.onabort=function(){j(1)}; +b.onload=b.onloadend=e;l&&(b.timeout=k);h.pnsdk=xa;var m=ka(a.url,h);b.open("GET",m,l);b.send()}catch(D){j(0);T=0;a=ya(a);break a}a=j}return a}var f=va("script"),e=a.a,x=E(),O=0,u=setTimeout(function(){c(1)},a.timeout||1E4),Y=a.b||t(),k=a.data||{},X=a.c||t();window[e]=function(a){c(0,a)};a.g||(f[za]=za);f.onerror=function(){c(1)};k.pnsdk=xa;f.src=ka(a.url,k);S(f,"id",x);sa().appendChild(f);return c},Aa=function(){return!("onLine"in navigator)?1:navigator.onLine},U=function(){if(!Ba||!Ba.get)return 0; +var a={id:U.id++,send:t(),abort:function(){a.id={}},open:function(c,b){U[a.id]=a;Ba.get(a.id,b)}};return a},za="async",xa="PubNub-JS-Web/3.5.3",T=-1==navigator.userAgent.indexOf("MSIE 6");window.console||(window.console=window.console||{});console.log||(console.log=console.error=(window.opera||{}).postError||t());var Ca,V=window.localStorage;Ca={get:function(a){try{return V?V.getItem(a):-1==document.cookie.indexOf(a)?n:((document.cookie||"").match(RegExp(a+"=([^;]+)"))||[])[1]||n}catch(c){}},set:function(a, +c){try{if(V)return V.setItem(a,c)&&0;document.cookie=a+"="+c+"; expires=Thu, 1 Aug 2030 20:00:00 UTC; path=/"}catch(b){}}};var W={list:{},unbind:function(a){W.list[a]=[]},bind:function(a,c){(W.list[a]=W.list[a]||[]).push(c)},fire:function(a,c){M(W.list[a]||[],function(a){a(c)})}},Z=Q("pubnub")||0,Da=function(a){function c(){}function b(a){J&&J(a);J=n}function d(){y.time(function(a){a||b(1);setTimeout(d,i)})}function e(){fa()||b(1);setTimeout(e,z)}function s(a){var b=0;M(oa(A),function(c){if(c=A[c])b++, +(a||t())(c)});return b}function q(a){a&&(u.h=0);!u.h&&u.length&&(u.h=1,B(u.shift()))}a.jsonp&&(T=0);var k=a.subscribe_key||"";a.uuid||Ca.get(k+"uuid");a.xdr=ya;a.db=Ca;a.error=qa;a._is_online=Aa;a.jsonp_cb=wa;var g,H=+a.windowing||10,h=(+a.timeout||310)*z,i=(+a.keepalive||60)*z,l=a.publish_key||"",j=a.subscribe_key||"",m=a.auth_key||"",D=a.ssl?"s":"",f="http"+D+"://"+(a.origin||"pubsub.pubnub.com"),x=I(f),O=I(f),u=[],Y=0,X=0,J=0,ca=0,K=0,A={},B=a.xdr,p=a.error||t(),fa=a._is_online||function(){return 1}, +F=a.jsonp_cb||function(){return 0},L=a.db||{get:t(),set:t()},C=a.uuid||L&&L.get(j+"uuid")||"",y={LEAVE:function(a,b){var c={uuid:C,auth:m},d=I(f),e=F();0 Date: Fri, 28 Jun 2013 10:51:02 +1000 Subject: [PATCH 2/2] Fixed incorrect filename --- ajax/libs/pubnub/3.5.3/{pubnub-3.5.3.min.js => pubnub.min.js} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ajax/libs/pubnub/3.5.3/{pubnub-3.5.3.min.js => pubnub.min.js} (100%) diff --git a/ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js b/ajax/libs/pubnub/3.5.3/pubnub.min.js similarity index 100% rename from ajax/libs/pubnub/3.5.3/pubnub-3.5.3.min.js rename to ajax/libs/pubnub/3.5.3/pubnub.min.js