function z(){return function(){}}
window.JSON&&window.JSON.stringify||function(){function E(p){A.lastIndex=0;return A.test(p)?'"'+p.replace(A,function(q){var j=w[q];return typeof j==="string"?j:"\\u"+("0000"+q.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+p+'"'}function r(p,q){var j,m,t,B,x=g,n,h=q[p];if(h&&typeof h==="object"&&typeof h.toJSON==="function")h=h.toJSON(p);if(typeof u==="function")h=u.call(q,p,h);switch(typeof h){case "string":return E(h);case "number":return isFinite(h)?String(h):"null";case "boolean":case "null":return String(h);
case "object":if(!h)return"null";g+=C;n=[];if(Object.prototype.toString.apply(h)==="[object Array]"){B=h.length;for(j=0;j<B;j+=1)n[j]=r(j,h)||"null";t=n.length===0?"[]":g?"[\n"+g+n.join(",\n"+g)+"\n"+x+"]":"["+n.join(",")+"]";g=x;return t}if(u&&typeof u==="object"){B=u.length;for(j=0;j<B;j+=1){m=u[j];if(typeof m==="string")if(t=r(m,h))n.push(E(m)+(g?": ":":")+t)}}else for(m in h)if(Object.hasOwnProperty.call(h,m))if(t=r(m,h))n.push(E(m)+(g?": ":":")+t);t=n.length===0?"{}":g?"{\n"+g+n.join(",\n"+g)+
"\n"+x+"}":"{"+n.join(",")+"}";g=x;return t}}window.JSON||(window.JSON={});if(typeof String.prototype.toJSON!=="function")String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()};var A=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,g,C,w={"\u0008":"\\b","\t":"\\t","\n":"\\n","\u000c":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},u;if(typeof JSON.stringify!=="function")JSON.stringify=
function(p,q,j){var m;C=g="";if(typeof j==="number")for(m=0;m<j;m+=1)C+=" ";else if(typeof j==="string")C=j;if((u=q)&&typeof q!=="function"&&(typeof q!=="object"||typeof q.length!=="number"))throw Error("JSON.stringify");return r("",{"":p})};if(typeof JSON.parse!=="function")JSON.parse=function(p){return eval("("+p+")")}}();
window.PUBNUB||function(){function E(a){var b={},c=a.publish_key||"demo",d=a.subscribe_key||"demo",o=a.ssl?"s":"",k="http"+o+"://"+(a.origin||"pubsub.pubnub.com"),y={history:function(e,f){f=e.callback||f;var i=e.limit||100,l=e.channel,s=D?0:r();if(!l)return g("Missing Channel");if(!f)return g("Missing Callback");n({c:s,url:[k,"history",d,x(l),s,i],b:function(v){f(v)},a:function(v){g(v)}})},time:function(e){var f=D?0:r();n({c:f,url:[k,"time",f],b:function(i){e(i[0])},a:function(){e(0)}})},uuid:function(e){var f=
D?0:r();n({c:f,url:["http"+o+"://pubnub-prod.appspot.com/uuid?callback="+f],b:function(i){e(i[0])},a:function(){e(0)}})},publish:function(e,f){f=f||e.callback||z();var i=e.message,l=e.channel,s=D?0:r();if(!i)return g("Missing Message");if(!l)return g("Missing Channel");if(!c)return g("Missing Publish Key");i=JSON.stringify(i);if(i.length>1800)return g("Message Too Big");n({c:s,b:function(v){f(v)},a:function(){f([0,"Disconnected"])},url:[k,"publish",c,d,0,x(l),s,x(i)]})},unsubscribe:function(e){e=
e.channel;if(e in b){b[e].d=0;b[e].e&&b[e].e(0)}},subscribe:function(e,f){function i(){var H=D?0:r();if(b[l].d)b[l].e=n({c:H,url:[k,"subscribe",d,x(l),H,s],a:function(){setTimeout(i,1E3);v()},b:function(I){if(b[l].d){s=I[1];setTimeout(i,10);w(I[0],function(N){f(N)})}}})}if(!J)return K.push([e,f,y]);var l=e.channel;f=f||e.callback;var s=0,v=e.error||z();if(!l)return g("Missing Channel");if(!f)return g("Missing Callback");if(!d)return g("Missing Subscribe Key");l in b||(b[l]={});if(b[l].d)return g("Already Connected");
b[l].d=1;i()},clean:function(e){return function(f){f(y);e&&delete window.PUBNUB}},each:w,map:u,css:t,$:A,create:B,bind:q,supplant:p,head:j,search:C,attr:m,now:r,init:E};return y}function r(){return"x"+ ++O+""+ +new Date}function A(a){return document.getElementById(a)}function g(a){console.log(a)}function C(a){var b=[];w(a.split(/\s+/),function(c){w(document.getElementsByTagName(c),function(d){b.push(d)})});return b}function w(a,b){if(a&&b)if(typeof a[0]!="undefined")for(var c=0,d=a.length;c<d;)b.call(a[c],
a[c],c++);else for(c in a)a.hasOwnProperty&&a.hasOwnProperty(c)&&b.call(a[c],c,a[c])}function u(a,b){var c=[];w(a||[],function(d,o){c.push(b(d,o))});return c}function p(a,b){return a.replace(P,function(c,d){return""+b[d]||""})}function q(a,b,c){w(a.split(","),function(d){function o(k){if(!k)k=window.event;if(!c(k)){k.cancelBubble=true;k.returnValue=false;k.preventDefault&&k.preventDefault();k.stopPropagation&&k.stopPropagation()}}if(b.addEventListener)b.addEventListener(d,o,false);else if(b.attachEvent)b.attachEvent("on"+
d,o);else b["on"+d]=o})}function j(){return C("head")[0]}function m(a,b,c){if(c)a.setAttribute(b,c);else return a&&a.getAttribute&&a.getAttribute(b)}function t(a,b){for(var c in b)if(b.hasOwnProperty(c))try{a.style[c]=b[c]+("|width|height|top|left|".indexOf(c)>0&&typeof b[c]=="number"?"px":"")}catch(d){}}function B(a){return document.createElement(a)}function x(a){return u((""+a).split(""),function(b){return" ~`!@#$%^&*()+=[]\\{}|;':\",./<>?".indexOf(b)>-1?"%"+b.charCodeAt(0).toString(16).toUpperCase():
b}).join("")}function n(a){function b(i,l){if(!k){k=1;i||f(l);c.onerror=null;clearTimeout(y);setTimeout(function(){i&&e();var s=A(o),v=s&&s.parentNode;v&&v.removeChild(s)},1E3)}}if(D)return h(a);var c=B("script"),d=a.c,o=r(),k=0,y=setTimeout(function(){b(1)},G),e=a.a||z(),f=a.b||z();window[d]=function(i){b(0,i)};c[L]=L;c.onerror=function(){b(1)};c.src=a.url.join(M);m(c,"id",o);j().appendChild(c);return b}function h(a){function b(l){if(!o){o=1;clearTimeout(y);if(d){d.onerror=d.onload=null;d.abort&&
d.abort();d=null}l&&e()}}function c(){if(!k){k=1;clearTimeout(y);try{response=JSON.parse(d.responseText)}catch(l){return b(1)}f(response)}}var d,o=0,k=0,y=setTimeout(function(){b(1)},G),e=a.a||z(),f=a.b||z();try{d=window.XDomainRequest&&new XDomainRequest||new XMLHttpRequest;d.onerror=function(){b(1)};d.onload=c;d.timeout=G;d.open("GET",a.url.join(M),true);d.send()}catch(i){b(0);D=0;return n(a)}return b}window.console||(window.console=window.console||{});console.log||(console.log=(window.opera||{}).postError||
z());var O=1,P=/\$?{([\w\-]+)}/g,L="async",M="/",G=14E4,D=1,F=A("pubnub"),J="",K=[];F=E({publish_key:"b570d4bb-56f0-4a98-ab9d-0c511dc312b6",subscribe_key:"abf8f714-9592-11df-850b-418fdd756ef0",ssl:m(F,"ssl")=="on",origin:m(F,"origin")});q("load",window,function(){setTimeout(function(){J=1;w(K,function(a){a[2].subscribe(a[0],a[1])})},1E3)});window.jQuery&&(window.jQuery.PUBNUB=F);window.PUBNUB=F}();

