/*! @license Firebase v2.0.2 - License: https://www.firebase.com/terms/terms-of-service.html */ (function() {var h,aa=this;function n(a){return void 0!==a}function ba(){}function ca(a){a.Qb=function(){return a.ef?a.ef:a.ef=new a}} function da(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function ea(a){return"array"==da(a)}function fa(a){var b=da(a);return"array"==b||"object"==b&&"number"==typeof a.length}function p(a){return"string"==typeof a}function ga(a){return"number"==typeof a}function ha(a){return"function"==da(a)}function ia(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function ja(a,b,c){return a.call.apply(a.bind,arguments)} function ka(a,b,c){if(!a)throw Error();if(2b?e+="000":256>b?e+="00":4096>b&&(e+="0");return sa[a]=e+b.toString(16)}),'"')};function ua(a){return"undefined"!==typeof JSON&&n(JSON.parse)?JSON.parse(a):oa(a)}function t(a){if("undefined"!==typeof JSON&&n(JSON.stringify))a=JSON.stringify(a);else{var b=[];qa(new pa,a,b);a=b.join("")}return a};function u(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function v(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]}function va(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])}function wa(a){var b={};va(a,function(a,d){b[a]=d});return b};function xa(a){this.xc=a;this.Hd="firebase:"}h=xa.prototype;h.set=function(a,b){null==b?this.xc.removeItem(this.Hd+a):this.xc.setItem(this.Hd+a,t(b))};h.get=function(a){a=this.xc.getItem(this.Hd+a);return null==a?null:ua(a)};h.remove=function(a){this.xc.removeItem(this.Hd+a)};h.ff=!1;h.toString=function(){return this.xc.toString()};function ya(){this.ia={}}ya.prototype.set=function(a,b){null==b?delete this.ia[a]:this.ia[a]=b};ya.prototype.get=function(a){return u(this.ia,a)?this.ia[a]:null};ya.prototype.remove=function(a){delete this.ia[a]};ya.prototype.ff=!0;function za(a){try{if("undefined"!==typeof window&&"undefined"!==typeof window[a]){var b=window[a];b.setItem("firebase:sentinel","cache");b.removeItem("firebase:sentinel");return new xa(b)}}catch(c){}return new ya}var Aa=za("localStorage"),Ba=za("sessionStorage");function Ca(a,b,c,d,e){this.host=a.toLowerCase();this.domain=this.host.substr(this.host.indexOf(".")+1);this.Cb=b;this.yb=c;this.xg=d;this.Gd=e||"";this.Ka=Aa.get("host:"+a)||this.host}function Da(a,b){b!==a.Ka&&(a.Ka=b,"s-"===a.Ka.substr(0,2)&&Aa.set("host:"+a.host,a.Ka))}Ca.prototype.toString=function(){var a=(this.Cb?"https://":"http://")+this.host;this.Gd&&(a+="<"+this.Gd+">");return a};function Ea(){this.Sa=-1};function Fa(){this.Sa=-1;this.Sa=64;this.R=[];this.be=[];this.Af=[];this.Dd=[];this.Dd[0]=128;for(var a=1;ae;e++)d[e]=b.charCodeAt(c)<<24|b.charCodeAt(c+1)<<16|b.charCodeAt(c+2)<<8|b.charCodeAt(c+3),c+=4;else for(e=0;16>e;e++)d[e]=b[c]<<24|b[c+1]<<16|b[c+2]<<8|b[c+3],c+=4;for(e=16;80>e;e++){var f=d[e-3]^d[e-8]^d[e-14]^d[e-16];d[e]=(f<<1|f>>>31)&4294967295}b=a.R[0];c=a.R[1];for(var g=a.R[2],k=a.R[3],l=a.R[4],m,e=0;80>e;e++)40>e?20>e?(f=k^c&(g^k),m=1518500249):(f=c^g^k,m=1859775393):60>e?(f=c&g|k&(c|g),m=2400959708):(f=c^g^k,m=3395469782),f=(b<< 5|b>>>27)+f+l+m+d[e]&4294967295,l=k,k=g,g=(c<<30|c>>>2)&4294967295,c=b,b=f;a.R[0]=a.R[0]+b&4294967295;a.R[1]=a.R[1]+c&4294967295;a.R[2]=a.R[2]+g&4294967295;a.R[3]=a.R[3]+k&4294967295;a.R[4]=a.R[4]+l&4294967295} Fa.prototype.update=function(a,b){n(b)||(b=a.length);for(var c=b-this.Sa,d=0,e=this.be,f=this.Tb;dc?Math.max(0,a.length+c):c;if(p(a))return p(b)&&1==b.length?a.indexOf(b,c):-1;for(;cc?null:p(a)?a.charAt(c):a[c]}function Pa(a,b,c){for(var d=a.length,e=p(a)?a.split(""):a,f=0;f=arguments.length?w.slice.call(a,b):w.slice.call(a,b,c)} function Ta(a,b){a.sort(b||Ua)}function Ua(a,b){return a>b?1:aparseFloat(a))?String(b):a})();var cb=null,db=null; function eb(a,b){if(!fa(a))throw Error("encodeByteArray takes an array as a parameter");if(!cb){cb={};db={};for(var c=0;65>c;c++)cb[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c),db[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(c)}for(var c=b?db:cb,d=[],e=0;e>2,f=(f&3)<<4|k>>4,k=(k&15)<<2|m>>6,m=m&63;l||(m=64,g||(k=64));d.push(c[r],c[f],c[k],c[m])}return d.join("")} ;var fb=function(){var a=1;return function(){return a++}}();function x(a,b){if(!a)throw gb(b);}function gb(a){return Error("Firebase INTERNAL ASSERT FAILED:"+a)}function hb(a){try{if("undefined"!==typeof atob)return atob(a)}catch(b){ib("base64DecodeIfNativeSupport failed: ",b)}return null} function jb(a){var b=kb(a);a=new Fa;a.update(b);var b=[],c=8*a.Rd;56>a.Tb?a.update(a.Dd,56-a.Tb):a.update(a.Dd,a.Sa-(a.Tb-56));for(var d=a.Sa-1;56<=d;d--)a.be[d]=c&255,c/=256;Ga(a,a.be);for(d=c=0;5>d;d++)for(var e=24;0<=e;e-=8)b[c]=a.R[d]>>e&255,++c;return eb(b)}function lb(a){for(var b="",c=0;ca?c.push(a.substring(d,a.length)):c.push(a.substring(d,d+b));return c}function Ab(a,b){if(ea(a))for(var c=0;ca,a=Math.abs(a),a>=Math.pow(2,-1022)?(d=Math.min(Math.floor(Math.log(a)/Math.LN2),1023),c=d+1023,d=Math.round(a*Math.pow(2,52-d)-Math.pow(2,52))):(c=0,d=Math.round(a/Math.pow(2,-1074))));e=[];for(a=52;a;a-=1)e.push(d%2?1:0),d=Math.floor(d/2);for(a=11;a;a-=1)e.push(c%2?1:0),c=Math.floor(c/2);e.push(b?1:0);e.reverse();b=e.join("");c="";for(a=0;64>a;a+=8)d=parseInt(b.substr(a,8),2).toString(16),1===d.length&& (d="0"+d),c+=d;return c.toLowerCase()}var Cb=/^-?\d{1,10}$/;function wb(a){return Cb.test(a)&&(a=Number(a),-2147483648<=a&&2147483647>=a)?a:null}function Db(a){try{a()}catch(b){setTimeout(function(){throw b;},Math.floor(0))}}function B(a,b){if(ha(a)){var c=Array.prototype.slice.call(arguments,1).slice();Db(function(){a.apply(null,c)})}};function Eb(a,b,c,d){this.me=b;this.Ld=c;this.Rc=d;this.nd=a}Eb.prototype.Rb=function(){var a=this.Ld.hc();return"value"===this.nd?a.path:a.parent().path};Eb.prototype.oe=function(){return this.nd};Eb.prototype.Pb=function(){return this.me.Pb(this)};Eb.prototype.toString=function(){return this.Rb().toString()+":"+this.nd+":"+t(this.Ld.Xe())};function Fb(a,b,c){this.me=a;this.error=b;this.path=c}Fb.prototype.Rb=function(){return this.path};Fb.prototype.oe=function(){return"cancel"}; Fb.prototype.Pb=function(){return this.me.Pb(this)};Fb.prototype.toString=function(){return this.path.toString()+":cancel"};function Gb(a,b,c){this.Kb=a;this.mb=b;this.vc=c||null}h=Gb.prototype;h.pf=function(a){return"value"===a};h.createEvent=function(a,b){var c=b.u.w;return new Eb("value",this,new C(a.Wa,b.hc(),c))};h.Pb=function(a){var b=this.vc;if("cancel"===a.oe()){x(this.mb,"Raising a cancel event on a listener with no cancel callback");var c=this.mb;return function(){c.call(b,a.error)}}var d=this.Kb;return function(){d.call(b,a.Ld)}};h.Te=function(a,b){return this.mb?new Fb(this,a,b):null}; h.matches=function(a){return a instanceof Gb&&(!a.Kb||!this.Kb||a.Kb===this.Kb)&&a.vc===this.vc};h.cf=function(){return null!==this.Kb};function Hb(a,b,c){this.ca=a;this.mb=b;this.vc=c}h=Hb.prototype;h.pf=function(a){a="children_added"===a?"child_added":a;return("children_removed"===a?"child_removed":a)in this.ca};h.Te=function(a,b){return this.mb?new Fb(this,a,b):null};h.createEvent=function(a,b){var c=b.hc().k(a.nb);return new Eb(a.type,this,new C(a.Wa,c,b.u.w),a.Rc)}; h.Pb=function(a){var b=this.vc;if("cancel"===a.oe()){x(this.mb,"Raising a cancel event on a listener with no cancel callback");var c=this.mb;return function(){c.call(b,a.error)}}var d=this.ca[a.nd];return function(){d.call(b,a.Ld,a.Rc)}};h.matches=function(a){if(a instanceof Hb){if(this.ca&&a.ca){var b=Ib(a.ca);if(b===Ib(this.ca)){if(1===b){var b=Jb(a.ca),c=Jb(this.ca);return c===b&&(!a.ca[b]||!this.ca[c]||a.ca[b]===this.ca[c])}return Kb(this.ca,function(b,c){return a.ca[c]===b})}return!1}return!0}return!1}; h.cf=function(){return null!==this.ca};function kb(a){for(var b=[],c=0,d=0;d=e&&(e-=55296,d++,x(de?b[c++]=e:(2048>e?b[c++]=e>>6|192:(65536>e?b[c++]=e>>12|224:(b[c++]=e>>18|240,b[c++]=e>>12&63|128),b[c++]=e>>6&63|128),b[c++]=e&63|128)}return b};function D(a,b,c,d){var e;dc&&(e=0===c?"none":"no more than "+c);if(e)throw Error(a+" failed: Was called with "+d+(1===d?" argument.":" arguments.")+" Expects "+e+".");}function E(a,b,c){var d="";switch(b){case 1:d=c?"first":"First";break;case 2:d=c?"second":"Second";break;case 3:d=c?"third":"Third";break;case 4:d=c?"fourth":"Fourth";break;default:throw Error("errorPrefix called with argumentNumber > 4. Need to update it?");}return a=a+" failed: "+(d+" argument ")} function F(a,b,c,d){if((!d||n(c))&&!ha(c))throw Error(E(a,b,d)+"must be a valid function.");}function Lb(a,b,c){if(n(c)&&(!ia(c)||null===c))throw Error(E(a,b,!0)+"must be a valid context object.");};var Mb=/[\[\].#$\/\u0000-\u001F\u007F]/,Nb=/[\[\].#$\u0000-\u001F\u007F]/;function Ob(a){return p(a)&&0!==a.length&&!Mb.test(a)}function Pb(a){return null===a||p(a)||ga(a)&&!tb(a)||ia(a)&&u(a,".sv")}function Qb(a,b,c){c&&!n(b)||Rb(E(a,1,c),b)} function Rb(a,b,c,d){c||(c=0);d=d||[];if(!n(b))throw Error(a+"contains undefined"+Sb(d));if(ha(b))throw Error(a+"contains a function"+Sb(d)+" with contents: "+b.toString());if(tb(b))throw Error(a+"contains "+b.toString()+Sb(d));if(1E310485760/3&&10485760=a)throw Error("Query.limit: First argument must be a positive integer.");if(this.u.ja)throw Error("Query.limit: Limit was previously set");var b=this.u.ve(a);wc(b);return new M(this.g,this.path,b,this.dc)};M.prototype.limit=M.prototype.ve; M.prototype.we=function(a){D("Query.limitToFirst",1,1,arguments.length);if(!ga(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToFirst: First argument must be a positive integer.");if(this.u.ja)throw Error("Query.limitToFirst: Limit was previously set");return new M(this.g,this.path,this.u.we(a),this.dc)};M.prototype.limitToFirst=M.prototype.we; M.prototype.xe=function(a){D("Query.limitToLast",1,1,arguments.length);if(!ga(a)||Math.floor(a)!==a||0>=a)throw Error("Query.limitToLast: First argument must be a positive integer.");if(this.u.ja)throw Error("Query.limitToLast: Limit was previously set");return new M(this.g,this.path,this.u.xe(a),this.dc)};M.prototype.limitToLast=M.prototype.xe; M.prototype.gg=function(a){D("Query.orderByChild",1,1,arguments.length);if("$key"===a)throw Error('Query.orderByChild: "$key" is invalid. Use Query.orderByKey() instead.');if("$priority"===a)throw Error('Query.orderByChild: "$priority" is invalid. Use Query.orderByPriority() instead.');Wb("Query.orderByChild",1,a,!1);xc(this,"Query.orderByChild");return new M(this.g,this.path,tc(this.u,new hc(a)),!0)};M.prototype.orderByChild=M.prototype.gg; M.prototype.hg=function(){D("Query.orderByKey",0,0,arguments.length);xc(this,"Query.orderByKey");var a=tc(this.u,kc);vc(a);return new M(this.g,this.path,a,!0)};M.prototype.orderByKey=M.prototype.hg;M.prototype.ig=function(){D("Query.orderByPriority",0,0,arguments.length);xc(this,"Query.orderByPriority");return new M(this.g,this.path,tc(this.u,L),!0)};M.prototype.orderByPriority=M.prototype.ig; M.prototype.Md=function(a,b){D("Query.startAt",0,2,arguments.length);Qb("Query.startAt",a,!0);Wb("Query.startAt",2,b,!0);var c=this.u.Md(a,b);wc(c);vc(c);if(this.u.la)throw Error("Query.startAt: startAt() or equalTo() previously called");n(a)||(b=a=null);return new M(this.g,this.path,c,this.dc)};M.prototype.startAt=M.prototype.Md; M.prototype.md=function(a,b){D("Query.endAt",0,2,arguments.length);Qb("Query.endAt",a,!0);Wb("Query.endAt",2,b,!0);var c=this.u.md(a,b);wc(c);vc(c);if(this.u.sa)throw Error("Query.endAt: endAt() or equalTo() previously called");return new M(this.g,this.path,c,this.dc)};M.prototype.endAt=M.prototype.md; M.prototype.Of=function(a,b){D("Query.equalTo",1,2,arguments.length);Qb("Query.equalTo",a,!1);Wb("Query.equalTo",2,b,!0);if(this.u.la)throw Error("Query.equalTo: startAt() or equalTo() previously called!");if(this.u.sa)throw Error("Query.equalTo: endAt() or equalTo() previously called!");return this.Md(a,b).md(a,b)};M.prototype.equalTo=M.prototype.Of; function Bc(a){a=a.u;var b={};a.la&&(b.sp=a.Bc,a.nc&&(b.sn=a.Xb));a.sa&&(b.ep=a.Ac,a.yc&&(b.en=a.Ub));if(a.ja){b.l=a.xb;var c=a.Hb;""===c&&(c=a.la?"l":"r");b.vf=c}a.w!==L&&(b.i=a.w.toString());return b}M.prototype.Da=function(){var a=yb(Bc(this));return"{}"===a?"default":a}; function yc(a,b,c){var d={cancel:null,Ha:null};if(b&&c)d.cancel=b,F(a,3,d.cancel,!0),d.Ha=c,Lb(a,4,d.Ha);else if(b)if("object"===typeof b&&null!==b)d.Ha=b;else if("function"===typeof b)d.cancel=b;else throw Error(E(a,3,!0)+" must either be a cancel callback or a context object.");return d};function P(a,b){if(1==arguments.length){this.m=a.split("/");for(var c=0,d=0;d=a.m.length?null:a.m[a.ba]}function Q(a){return a.m.length-a.ba}function R(a){var b=a.ba;b=this.m.length)return null;for(var a=[],b=this.ba;b=this.m.length};var S=new P(""); function T(a,b){var c=G(a);if(null===c)return b;if(c===G(b))return T(R(a),R(b));throw Error("INTERNAL ERROR: innerPath ("+b+") is not within outerPath ("+a+")");}P.prototype.ea=function(a){if(Q(this)!==Q(a))return!1;for(var b=this.ba,c=a.ba;b<=this.m.length;b++,c++)if(this.m[b]!==a.m[c])return!1;return!0};P.prototype.contains=function(a){var b=this.ba,c=a.ba;if(Q(this)>Q(a))return!1;for(;bb?c=c.left:0c?d=d.left:0e)a=this.te?a.left:a.right;else if(0===e){this.ac.push(a);break}else this.ac.push(a),a=this.te?a.right:a.left} function U(a){if(0===a.ac.length)return null;var b=a.ac.pop(),c;c=a.qf?a.qf(b.key,b.value):{key:b.key,value:b.value};if(a.te)for(b=b.left;!b.e();)a.ac.push(b),b=b.right;else for(b=b.right;!b.e();)a.ac.push(b),b=b.left;return c}function Nc(a,b,c,d,e){this.key=a;this.value=b;this.color=null!=c?c:!0;this.left=null!=d?d:Kc;this.right=null!=e?e:Kc}h=Nc.prototype;h.W=function(a,b,c,d,e){return new Nc(null!=a?a:this.key,null!=b?b:this.value,null!=c?c:this.color,null!=d?d:this.left,null!=e?e:this.right)}; h.count=function(){return this.left.count()+1+this.right.count()};h.e=function(){return!1};h.Ba=function(a){return this.left.Ba(a)||a(this.key,this.value)||this.right.Ba(a)};function Oc(a){return a.left.e()?a:Oc(a.left)}h.Ic=function(){return Oc(this).key};h.Zb=function(){return this.right.e()?this.key:this.right.Zb()};h.Ja=function(a,b,c){var d,e;e=this;d=c(a,e.key);e=0>d?e.W(null,null,null,e.left.Ja(a,b,c),null):0===d?e.W(null,b,null,null,null):e.W(null,null,null,null,e.right.Ja(a,b,c));return Pc(e)}; function Qc(a){if(a.left.e())return Kc;a.left.aa()||a.left.left.aa()||(a=Rc(a));a=a.W(null,null,null,Qc(a.left),null);return Pc(a)} h.remove=function(a,b){var c,d;c=this;if(0>b(a,c.key))c.left.e()||c.left.aa()||c.left.left.aa()||(c=Rc(c)),c=c.W(null,null,null,c.left.remove(a,b),null);else{c.left.aa()&&(c=Sc(c));c.right.e()||c.right.aa()||c.right.left.aa()||(c=Tc(c),c.left.left.aa()&&(c=Sc(c),c=Tc(c)));if(0===b(a,c.key)){if(c.right.e())return Kc;d=Oc(c.right);c=c.W(d.key,d.value,null,null,Qc(c.right))}c=c.W(null,null,null,null,c.right.remove(a,b))}return Pc(c)};h.aa=function(){return this.color}; function Pc(a){a.right.aa()&&!a.left.aa()&&(a=Uc(a));a.left.aa()&&a.left.left.aa()&&(a=Sc(a));a.left.aa()&&a.right.aa()&&(a=Tc(a));return a}function Rc(a){a=Tc(a);a.right.left.aa()&&(a=a.W(null,null,null,null,Sc(a.right)),a=Uc(a),a=Tc(a));return a}function Uc(a){return a.right.W(null,null,a.color,a.W(null,null,!0,null,a.right.left),null)}function Sc(a){return a.left.W(null,null,a.color,null,a.W(null,null,!0,a.left.right,null))} function Tc(a){return a.W(null,null,!a.color,a.left.W(null,null,!a.left.color,null,null),a.right.W(null,null,!a.right.color,null,null))}function Vc(){}h=Vc.prototype;h.W=function(){return this};h.Ja=function(a,b){return new Nc(a,b,null)};h.remove=function(){return this};h.count=function(){return 0};h.e=function(){return!0};h.Ba=function(){return!1};h.Ic=function(){return null};h.Zb=function(){return null};h.aa=function(){return!1};var Kc=new Vc;function I(a,b){this.name=a;this.K=b}function Wc(a,b){return new I(a,b)};function Xc(a,b){this.A=a;x(null!==this.A,"LeafNode shouldn't be created with null value.");this.ha=b||K;Yc(this.ha);this.wb=null}h=Xc.prototype;h.P=function(){return!0};h.O=function(){return this.ha};h.ib=function(a){return new Xc(this.A,a)};h.B=function(a){return".priority"===a?this.ha:K};h.$=function(a){return a.e()?this:".priority"===G(a)?this.ha:K};h.Y=function(){return!1};h.af=function(){return null};h.I=function(a,b){return".priority"===a?this.ib(b):K.I(a,b).ib(this.ha)}; h.L=function(a,b){var c=G(a);if(null===c)return b;x(".priority"!==c||1===Q(a),".priority must be the last token in a path");return this.I(c,K.L(R(a),b))};h.e=function(){return!1};h.Ta=function(){return 0};h.N=function(a){return a&&!this.O().e()?{".value":this.ta(),".priority":this.O().N()}:this.ta()};h.hash=function(){if(null===this.wb){var a="";this.ha.e()||(a+="priority:"+Zc(this.ha.N())+":");var b=typeof this.A,a=a+(b+":"),a="number"===b?a+Bb(this.A):a+this.A;this.wb=jb(a)}return this.wb}; h.ta=function(){return this.A};h.he=function(a){if(a===K)return 1;if(a instanceof $c)return-1;x(a.P(),"Unknown node type");var b=typeof a.A,c=typeof this.A,d=Ia(ad,b),e=Ia(ad,c);x(0<=d,"Unknown leaf type: "+b);x(0<=e,"Unknown leaf type: "+c);return d===e?"object"===c?0:this.A=a.length){var b=Number(a);if(!isNaN(b)){e.Oe=b;e.frames=[];a=null;break a}}e.Oe=1;e.frames=[]}null!==a&&Pd(e,a)}};this.na.onerror=function(a){e.f("WebSocket error. Closing connection.");(a=a.message||a.data)&&e.f(a);e.eb()}};Md.prototype.start=function(){}; Md.isAvailable=function(){var a=!1;if("undefined"!==typeof navigator&&navigator.userAgent){var b=navigator.userAgent.match(/Android ([0-9]{0,}\.[0-9]{0,})/);b&&1parseFloat(b[1])&&(a=!0)}return!a&&null!==Ld&&!Nd};Md.responsesRequiredToBeHealthy=2;Md.healthyTimeout=3E4;h=Md.prototype;h.wd=function(){Aa.remove("previous_websocket_failure")};function Pd(a,b){a.frames.push(b);if(a.frames.length==a.Oe){var c=a.frames.join("");a.frames=null;c=ua(c);a.bg(c)}} h.send=function(a){Od(this);a=t(a);this.lb+=a.length;Ed(this.Pa,"bytes_sent",a.length);a=zb(a,16384);1document.domain="'+document.domain+'";\x3c/script>');a=""+a+"";try{this.va.$a.open(),this.va.$a.write(a),this.va.$a.close()}catch(f){ib("frame writing exception"),f.stack&&ib(f.stack),ib(f)}} Yd.prototype.close=function(){this.Zd=!1;if(this.va){this.va.$a.body.innerHTML="";var a=this;setTimeout(function(){null!==a.va&&(document.body.removeChild(a.va),a.va=null)},Math.floor(0))}var b=this.fb;b&&(this.fb=null,b())}; function ae(a){if(a.Zd&&a.Jd&&a.Fe.count()<(0=a.Qc[0].We.length+30+c.length){var e=a.Qc.shift(),c=c+"&seg"+d+"="+e.ng+"&ts"+d+"="+e.vg+"&d"+d+"="+e.We;d++}else break;be(a,b+c,a.ke);return!0}return!1}function be(a,b,c){function d(){a.Fe.remove(c);ae(a)}a.Fe.add(c);var e=setTimeout(d,Math.floor(25E3));$d(a,b,function(){clearTimeout(e);d()})} function $d(a,b,c){setTimeout(function(){try{if(a.Jd){var d=a.va.$a.createElement("script");d.type="text/javascript";d.async=!0;d.src=b;d.onload=d.onreadystatechange=function(){var a=d.readyState;a&&"loaded"!==a&&"complete"!==a||(d.onload=d.onreadystatechange=null,d.parentNode&&d.parentNode.removeChild(d),c())};d.onerror=function(){ib("Long-poll script failed to load: "+b);a.Jd=!1;a.close()};a.va.$a.body.appendChild(d)}}catch(e){}},Math.floor(1))};function ce(a){de(this,a)}var ee=[Vd,Md];function de(a,b){var c=Md&&Md.isAvailable(),d=c&&!(Aa.ff||!0===Aa.get("previous_websocket_failure"));b.xg&&(c||z("wss:// URL used, but browser isn't known to support websockets. Trying anyway."),d=!0);if(d)a.$c=[Md];else{var e=a.$c=[];Ab(ee,function(a,b){b&&b.isAvailable()&&e.push(b)})}}function fe(a){if(0=a.tf?(a.f("Secondary connection is healthy."),a.vb=!0,a.C.wd(),a.C.start(),a.f("sending client ack on secondary"),a.C.send({t:"c",d:{t:"a",d:{}}}),a.f("Ending transmission on primary"),a.J.send({t:"c",d:{t:"n",d:{}}}),a.ad=a.C,me(a)):(a.f("sending ping on secondary."),a.C.send({t:"c",d:{t:"p",d:{}}}))}ge.prototype.Bd=function(a){oe(this);this.cc(a)};function oe(a){a.vb||(a.He--,0>=a.He&&(a.f("Primary connection is healthy."),a.vb=!0,a.J.wd()))} function le(a,b){a.C=new b("c:"+a.id+":"+a.Se++,a.Q,a.Kd);a.tf=b.responsesRequiredToBeHealthy||0;a.C.open(ie(a,a.C),je(a,a.C));setTimeout(function(){a.C&&(a.f("Timed out trying to upgrade."),a.C.close())},Math.floor(6E4))}function ke(a,b,c){a.f("Realtime connection established.");a.J=b;a.Oa=1;a.Kc&&(a.Kc(c),a.Kc=null);0===a.He?(a.f("Primary connection is healthy."),a.vb=!0):setTimeout(function(){pe(a)},Math.floor(5E3))} function pe(a){a.vb||1!==a.Oa||(a.f("sending ping on primary."),re(a,{t:"c",d:{t:"p",d:{}}}))}function re(a,b){if(1!==a.Oa)throw"Connection is not connected";a.ad.send(b)}ge.prototype.close=function(){2!==this.Oa&&(this.f("Closing realtime connection."),this.Oa=2,ne(this),this.ga&&(this.ga(),this.ga=null))};function ne(a){a.f("Shutting down all connections");a.J&&(a.J.close(),a.J=null);a.C&&(a.C.close(),a.C=null);a.rd&&(clearTimeout(a.rd),a.rd=null)};function se(a){var b={},c={},d={},e="";try{var f=a.split("."),b=ua(hb(f[0])||""),c=ua(hb(f[1])||""),e=f[2],d=c.d||{};delete c.d}catch(g){}return{Ag:b,fe:c,data:d,rg:e}}function te(a){a=se(a).fe;return"object"===typeof a&&a.hasOwnProperty("iat")?v(a,"iat"):null}function ue(a){a=se(a);var b=a.fe;return!!a.rg&&!!b&&"object"===typeof b&&b.hasOwnProperty("iat")};function ve(a,b,c,d){this.id=we++;this.f=pb("p:"+this.id+":");this.Eb=!0;this.ua={};this.ka=[];this.Nc=0;this.Jc=[];this.da=!1;this.Va=1E3;this.xd=3E5;this.Cd=b;this.Ad=c;this.Ee=d;this.Q=a;this.Ke=null;this.Tc={};this.mg=0;this.Dc=this.ue=null;xe(this,0);td.Qb().zb("visible",this.eg,this);-1===a.host.indexOf("fblocal")&&ud.Qb().zb("online",this.cg,this)}var we=0,ye=0;h=ve.prototype; h.wa=function(a,b,c){var d=++this.mg;a={r:d,a:a,b:b};this.f(t(a));x(this.da,"sendRequest call when we're not connected not allowed.");this.Ua.wa(a);c&&(this.Tc[d]=c)};function ze(a,b,c,d,e){var f=b.Da(),g=b.path.toString();a.f("Listen called for "+g+" "+f);a.ua[g]=a.ua[g]||{};x(!a.ua[g][f],"listen() called twice for same path/queryId.");b={H:e,qd:c,jg:Bc(b),tag:d};a.ua[g][f]=b;a.da&&Ae(a,g,f,b)} function Ae(a,b,c,d){a.f("Listen on "+b+" for "+c);var e={p:b};d.tag&&(e.q=d.jg,e.t=d.tag);e.h=d.qd();a.wa("q",e,function(e){if((a.ua[b]&&a.ua[b][c])===d){a.f("listen response",e);var g=e.s;"ok"!==g&&Be(a,b,c);e=e.d;d.H&&d.H(g,e)}})}h.T=function(a,b,c){this.Lb={Mf:a,Ye:!1,sc:b,cd:c};this.f("Authenticating using credential: "+a);Ce(this);(b=40==a.length)||(a=se(a).fe,b="object"===typeof a&&!0===v(a,"admin"));b&&(this.f("Admin auth credential detected. Reducing max reconnect time."),this.xd=3E4)}; h.Pe=function(a){delete this.Lb;this.da&&this.wa("unauth",{},function(b){a(b.s,b.d)})};function Ce(a){var b=a.Lb;a.da&&b&&a.wa("auth",{cred:b.Mf},function(c){var d=c.s;c=c.d||"error";"ok"!==d&&a.Lb===b&&delete a.Lb;b.Ye?"ok"!==d&&b.cd&&b.cd(d,c):(b.Ye=!0,b.sc&&b.sc(d,c))})}function De(a,b,c,d){a.da?Ee(a,"o",b,c,d):a.Jc.push({Pc:b,action:"o",data:c,H:d})}function Ge(a,b,c,d){a.da?Ee(a,"om",b,c,d):a.Jc.push({Pc:b,action:"om",data:c,H:d})} h.Ce=function(a,b){this.da?Ee(this,"oc",a,null,b):this.Jc.push({Pc:a,action:"oc",data:null,H:b})};function Ee(a,b,c,d,e){c={p:c,d:d};a.f("onDisconnect "+b,c);a.wa(b,c,function(a){e&&setTimeout(function(){e(a.s,a.d)},Math.floor(0))})}h.put=function(a,b,c,d){He(this,"p",a,b,c,d)};function Ie(a,b,c,d){He(a,"m",b,c,d,void 0)}function He(a,b,c,d,e,f){d={p:c,d:d};n(f)&&(d.h=f);a.ka.push({action:b,of:d,H:e});a.Nc++;b=a.ka.length-1;a.da?Je(a,b):a.f("Buffering put: "+c)} function Je(a,b){var c=a.ka[b].action,d=a.ka[b].of,e=a.ka[b].H;a.ka[b].kg=a.da;a.wa(c,d,function(d){a.f(c+" response",d);delete a.ka[b];a.Nc--;0===a.Nc&&(a.ka=[]);e&&e(d.s,d.d)})} h.Bd=function(a){if("r"in a){this.f("from server: "+t(a));var b=a.r,c=this.Tc[b];c&&(delete this.Tc[b],c(a.b))}else{if("error"in a)throw"A server-side error has occurred: "+a.error;"a"in a&&(b=a.a,c=a.b,this.f("handleServerMessage",b,c),"d"===b?this.Cd(c.p,c.d,!1,c.t):"m"===b?this.Cd(c.p,c.d,!0,c.t):"c"===b?Ke(this,c.p,c.q):"ac"===b?(a=c.s,b=c.d,c=this.Lb,delete this.Lb,c&&c.cd&&c.cd(a,b)):"sd"===b?this.Ke?this.Ke(c):"msg"in c&&"undefined"!==typeof console&&console.log("FIREBASE: "+c.msg.replace("\n", "\nFIREBASE: ")):qb("Unrecognized action received from server: "+t(b)+"\nAre you using the latest client?"))}};h.Kc=function(a){this.f("connection ready");this.da=!0;this.Dc=(new Date).getTime();this.Ee({serverTimeOffset:a-(new Date).getTime()});Le(this);this.Ad(!0)};function xe(a,b){x(!a.Ua,"Scheduling a connect when we're already connected/ing?");a.Nb&&clearTimeout(a.Nb);a.Nb=setTimeout(function(){a.Nb=null;Me(a)},Math.floor(b))} h.eg=function(a){a&&!this.qc&&this.Va===this.xd&&(this.f("Window became visible. Reducing delay."),this.Va=1E3,this.Ua||xe(this,0));this.qc=a};h.cg=function(a){a?(this.f("Browser went online. Reconnecting."),this.Va=1E3,this.Eb=!0,this.Ua||xe(this,0)):(this.f("Browser went offline. Killing connection; don't reconnect."),this.Eb=!1,this.Ua&&this.Ua.close())}; h.jf=function(){this.f("data client disconnected");this.da=!1;this.Ua=null;for(var a=0;ae.status){try{a=ua(e.responseText)}catch(b){}c(null,a)}else 500<=e.status&&600>e.status?c(V("SERVER_ERROR")):c(V("NETWORK_ERROR"));c=null;cf(window,"beforeunload",d)}};if("GET"===f)a+=(/\?/.test(a)?"":"?")+ff(b),g=null;else{var k=this.options.headers.content_type; "application/json"===k&&(g=t(b));"application/x-www-form-urlencoded"===k&&(g=ff(b))}e.open(f,a,!0);a={"X-Requested-With":"XMLHttpRequest",Accept:"application/json;text/plain"};Cd(a,this.options.headers);for(var l in a)e.setRequestHeader(l,a[l]);e.send(g)};kf.isAvailable=function(){return!!window.XMLHttpRequest&&"string"===typeof(new XMLHttpRequest).responseType&&(!(navigator.userAgent.match(/MSIE/)||navigator.userAgent.match(/Trident/))||jf())};kf.prototype.uc=function(){return"json"};function lf(a){a=a||{};this.Uc=Ha()+Ha()+Ha();this.kf=a||{}} lf.prototype.open=function(a,b,c){function d(){c&&(c(V("USER_CANCELLED")),c=null)}var e=this,f=sb(We),g;b.requestId=this.Uc;b.redirectTo=f.scheme+"://"+f.host+"/blank/page.html";a+=/\?/.test(a)?"":"?";a+=ff(b);(g=window.open(a,"_blank","location=no"))&&ha(g.addEventListener)?(g.addEventListener("loadstart",function(a){var b;if(b=a&&a.url)a:{var f=a.url;try{var r=document.createElement("a");r.href=f;b=r.host===sb(We).host&&"/blank/page.html"===r.pathname;break a}catch(s){}b=!1}b&&(a=ef(a.url),g.removeEventListener("exit", d),g.close(),a=new Xe(null,null,{requestId:e.Uc,requestKey:a}),e.kf.requestWithCredential("/auth/session",a,c),c=null)}),g.addEventListener("exit",d)):c(V("TRANSPORT_UNAVAILABLE"))};lf.isAvailable=function(){return hf()};lf.prototype.uc=function(){return"redirect"};function mf(a){a=a||{};if(!a.window_features||-1!==navigator.userAgent.indexOf("Fennec/")||-1!==navigator.userAgent.indexOf("Firefox/")&&-1!==navigator.userAgent.indexOf("Android"))a.window_features=void 0;a.window_name||(a.window_name="_blank");a.relay_url||(a.relay_url=gf()+"/auth/channel");this.options=a} mf.prototype.open=function(a,b,c){function d(a){g&&(document.body.removeChild(g),g=void 0);r&&(r=clearInterval(r));cf(window,"message",e);cf(window,"unload",d);if(m&&!a)try{m.close()}catch(b){k.postMessage("die",l)}m=k=void 0}function e(a){if(a.origin===l)try{var b=ua(a.data);"ready"===b.a?k.postMessage(s,l):"error"===b.a?(d(!1),c&&(c(b.d),c=null)):"response"===b.a&&(d(b.forceKeepWindowOpen),c&&(c(null,b.d),c=null))}catch(e){}}var f=jf(),g,k,l=df(a);if(l!==df(this.options.relay_url))c&&setTimeout(function(){c(Error("invalid arguments: origin of url and relay_url must match"))}, 0);else{f&&(g=document.createElement("iframe"),g.setAttribute("src",this.options.relay_url),g.style.display="none",g.setAttribute("name","__winchan_relay_frame"),document.body.appendChild(g),k=g.contentWindow);a+=(/\?/.test(a)?"":"?")+ff(b);var m=window.open(a,this.options.window_name,this.options.window_features);k||(k=m);var r=setInterval(function(){m&&m.closed&&(d(!1),c&&(c(V("USER_CANCELLED")),c=null))},500),s=t({a:"request",d:b});bf(window,"unload",d);bf(window,"message",e)}}; mf.isAvailable=function(){return"postMessage"in window&&!/^file:\//.test(location.href)&&!(hf()||navigator.userAgent.match(/Windows Phone/)||window.Windows&&/^ms-appx:/.test(location.href)||navigator.userAgent.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i)||navigator.userAgent.match(/CriOS/)||navigator.userAgent.match(/Twitter for iPhone/)||navigator.userAgent.match(/FBAN\/FBIOS/)||window.navigator.standalone)&&!navigator.userAgent.match(/PhantomJS/)};mf.prototype.uc=function(){return"popup"};function nf(a){a=a||{};a.callback_parameter||(a.callback_parameter="callback");this.options=a;window.__firebase_auth_jsonp=window.__firebase_auth_jsonp||{}} nf.prototype.open=function(a,b,c){function d(){c&&(c(V("REQUEST_INTERRUPTED")),c=null)}function e(){setTimeout(function(){delete window.__firebase_auth_jsonp[f];zd(window.__firebase_auth_jsonp)&&delete window.__firebase_auth_jsonp;try{var a=document.getElementById(f);a&&a.parentNode.removeChild(a)}catch(b){}},1);cf(window,"beforeunload",d)}var f="fn"+(new Date).getTime()+Math.floor(99999*Math.random());b[this.options.callback_parameter]="__firebase_auth_jsonp."+f;a+=(/\?/.test(a)?"":"?")+ff(b);bf(window, "beforeunload",d);window.__firebase_auth_jsonp[f]=function(a){c&&(c(null,a),c=null);e()};of(f,a,c)};function of(a,b,c){setTimeout(function(){try{var d=document.createElement("script");d.type="text/javascript";d.id=a;d.async=!0;d.src=b;d.onerror=function(){var b=document.getElementById(a);null!==b&&b.parentNode.removeChild(b);c&&c(V("NETWORK_ERROR"))};var e=document.getElementsByTagName("head");(e&&0!=e.length?e[0]:document.documentElement).appendChild(d)}catch(f){c&&c(V("NETWORK_ERROR"))}},0)} nf.isAvailable=function(){return!hf()};nf.prototype.uc=function(){return"json"};function pf(a,b){this.Ge=["session",a.Gd,a.yb].join(":");this.Pd=b}pf.prototype.set=function(a,b){if(!b)if(this.Pd.length)b=this.Pd[0];else throw Error("fb.login.SessionManager : No storage options available!");b.set(this.Ge,a)};pf.prototype.get=function(){var a=La(this.Pd,q(this.Sf,this)),a=Ka(a,function(a){return null!==a});Ta(a,function(a,c){return te(c.token)-te(a.token)});return 0N?(N=v(g,r.name),n(N)?(f.push(d[N]),d[N]=null):(k[r.name]=e.length,e.push(r)),r=U(l)):(0=f(k,e)&&(k=U(g));k;)c=c.I(k.name,K),k=U(g);return c}; Wf.prototype.Fa=function(a,b,c,d,e){Rf(this,a);if(1=H(this.index)(this.Fb,e):0>=H(this.index)(e,this.pb))d=d.I(e.name,e.K),f++,e=U(c);else break;else{d=this.Ia(a);var k,l,m=H(this.index);if(this.La){c=c.bf(this.index);k=this.pb;l=this.Fb;var r=m,m=function(a,b){return-1*r(a,b)}}else c= c.Aa(this.index),k=this.Fb,l=this.pb;f=0;var s=!1;for(e=U(c);e;)!s&&0>=m(k,e)&&(s=!0),(g=s&&f=m(e,l))?f++:d=d.I(e.name,K),e=U(c)}return d};Xf.prototype.Qa=function(a,b,c,d,e,f,g){var k=X(a);return!k||k.Ta()=H(a.index)(a.Fb,l)&&0>=H(a.index)(l,a.pb);if(b.Y(c)){f=e.de(f,m,1,a.La,a.index);e=null;0=H(a.index)(a.Fb, e)&&0>=H(a.index)(e,a.pb)?c.I(e.name,e.K):c}return d.e()?null:r?0<=k(m,l)?b.I(c,d).I(m.name,K):null:null};function Zf(a){this.w=a}na(Zf,Nf);Zf.prototype.Ia=function(a){return a.Wd(this.w)};Zf.prototype.Yb=function(a){return a.Yb(this.w)};function $f(a){this.U=a;this.w=a.u.w} function ag(a,b,c,d){var e=[],f=a.w,g=La(Ka(b,function(a){return"child_changed"===a.type&&f.df(a.Zf,a.Wa)}),function(a){return new W("child_moved",a.Wa,a.nb)}),k=Pa(b,function(a){return"child_removed"!==a.type&&"child_added"!==a.type});for(la(Ra,b,k,0).apply(null,g);0=c&&Bg(l,d.path)?e=!0:!f&&d.path.contains(l.path)&&(k>=c?f=!0:g=!0);k--}e||(f||g?Cg(a):d.Na?a.V=a.V.remove(d.path):A(d.children,function(b,c){a.V=a.V.remove(d.path.k(c))}));c=d.path;if(kg(a.V,c)){if(g)return c;x(e,"Must have found a shadow");return null}return c}h=zg.prototype; h.Ob=function(a){var b=kg(this.V,a);if(b){var c=b.value;a=T(b.path,a);return c.$(a)}return null}; h.xa=function(a,b,c,d){var e,f;if(c||d)return e=this.V.subtree(a),!d&&e.e()?b:d||null!==b||null!==e.value?(e=Dg(this.qa,function(b){return(b.visible||d)&&(!c||!(0<=Ia(c,b.Xd)))&&(b.path.contains(a)||a.contains(b.path))},a),f=b||K,sg(e,function(a,b){f=f.L(a,b)}),f):null;if(e=kg(this.V,a))return b=T(e.path,a),e.value.$(b);e=this.V.subtree(a);return e.e()?b:b||e.value?(f=b||K,sg(e,function(a,b){f=f.L(a,b)}),f):null}; h.ce=function(a,b){var c=!1,d=K,e=this.Ob(a);if(e)return e.P()||e.fa(L,function(a,b){d=d.I(a,b)}),d;if(b)return d=b,ug(this.V.subtree(a),function(a,b){d=d.I(a,b)}),d;ug(this.V.subtree(a),function(a,b){c=!0;d=d.I(a,b)});return c?d:null}; h.Ya=function(a,b,c,d){x(c||d,"Either existingEventSnap or existingServerSnap must exist");a=a.k(b);if(kg(this.V,a))return null;a=this.V.subtree(a);if(a.e())return d.$(b);var e;c?(e=!1,sg(a,function(a,b){e||c.$(a).ea(b)||(e=!0)})):e=!0;if(e){var f=d.$(b);sg(a,function(a,b){f=f.L(a,b)});return f}return null}; h.de=function(a,b,c,d,e,f){var g;a=this.V.subtree(a);a.value?g=a.value:b&&(g=b,sg(a,function(a,b){g=g.L(a,b)}));if(g){b=[];g=g.Wd(f);a=H(f);e=e?g.Sb(c,f):g.rb(c,f);for(f=U(e);f&&b.lengthe.Ec,"Stacking an older write on top of newer ones");n(f)||(f=!0);e.qa.push({path:a,Na:b,Xd:c,visible:f});f&&(e.V=Fg(e.V,a,b));e.Ec=c;return d?Qg(this,new Ig(Kg,a,b)):[]};h.ae=function(a,b,c){var d=this.Bb;x(c>d.Ec,"Stacking an older merge on top of newer ones");d.qa.push({path:a,children:b,Xd:c,visible:!0});d.V=Gg(d.V,a,b);d.Ec=c;return Qg(this,new Mg(Kg,a,b))}; h.Ea=function(a,b){b=b||!1;var c=Ag(this.Bb,a);return null==c?[]:Qg(this,new Jg(c,b))};h.Ra=function(a,b){return Qg(this,new Ig(Og,a,b))};h.$d=function(a,b){return Qg(this,new Mg(Og,a,b))};function Rg(a,b,c,d){d=Ad(a.Zc,"_"+d);if(null!=d){var e=Sg(d);d=e.path;e=e.fc;b=T(d,b);c=new Ig(new Ng(!1,!0,e,!0),b,c);return Tg(a,d,c)}return[]}function Ug(a,b,c,d){if(d=Ad(a.Zc,"_"+d)){var e=Sg(d);d=e.path;e=e.fc;b=T(d,b);c=new Mg(new Ng(!1,!0,e,!0),b,c);return Tg(a,d,c)}return[]} h.Jb=function(a,b){var c=a.path,d=null,e=!1;qg(this.ma,c,function(a,b){var f=T(a,c);d=b.za(f);e=e||null!=wg(b);return!d});var f=this.ma.get(c);f?(e=e||null!=wg(f),d=d||f.za(S)):(f=new vg,this.ma=this.ma.set(c,f));var g=null;if(!d){var k=!1,g=K;ug(this.ma.subtree(c),function(a,b){var c=b.za(S);c&&(k=!0,g=g.I(a,c))});k||(g=null)}var l=null!=yg(f,a);if(!l&&!uc(a.u)){var m=Vg(a);x(!(m in this.gc),"View does not exist, but we have a tag");var r=Wg++;this.gc[m]=r;this.Zc["_"+r]=m}m=f.Jb(a,b,new Hg(c,this.Bb), d,g);l||e||(f=yg(f,a),m=m.concat(Xg(this,a,f)));return m}; h.hb=function(a,b,c){var d=a.path,e=this.ma.get(d),f=[];if(e&&("default"===a.Da()||null!=yg(e,a))){f=e.hb(a,b,c);e.e()&&(this.ma=this.ma.remove(d));e=f.lg;f=f.Pf;b=-1!==Pa(e,function(a){return uc(a.u)});var g=og(this.ma,d,function(a,b){return null!=wg(b)});if(b&&!g&&(d=this.ma.subtree(d),!d.e()))for(var d=Yg(d),k=0;kf;f++)b[f]=Math.floor(64*Math.random());for(f=0;12>f;f++)c+="-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".charAt(b[f]);x(20===c.length,"NextPushId: Length should be 20."); return c}}();function O(a,b){var c,d,e;if(a instanceof dh)c=a,d=b;else{D("new Firebase",1,2,arguments.length);d=sb(arguments[0]);c=d.ug;"firebase"===d.domain&&rb(d.host+" is no longer supported. Please use .firebaseio.com instead");c||rb("Cannot parse Firebase url. Please use https://.firebaseio.com");d.Cb||"undefined"!==typeof window&&window.location&&window.location.protocol&&-1!==window.location.protocol.indexOf("https:")&&z("Insecure Firebase access from a secure page. Please use https in calls to new Firebase()."); c=new Ca(d.host,d.Cb,c,"ws"===d.scheme||"wss"===d.scheme);d=new P(d.Pc);e=d.toString();var f;!(f=!p(c.host)||0===c.host.length||!Ob(c.yb))&&(f=0!==e.length)&&(e&&(e=e.replace(/^\/*\.info(\/|$)/,"/")),f=!(p(e)&&0!==e.length&&!Nb.test(e)));if(f)throw Error(E("new Firebase",1,!1)+'must be a valid firebase URL and the path can\'t contain ".", "#", "$", "[", or "]".');if(b)if(b instanceof xh)e=b;else if(p(b))e=xh.Qb(),c.Gd=b;else throw Error("Expected a valid Firebase.Context for second argument to new Firebase()"); else e=xh.Qb();f=c.toString();var g=v(e.jc,f);g||(g=new dh(c),e.jc[f]=g);c=g}M.call(this,c,d,mc,!1)}na(O,M);var Bh=O,Ch=["Firebase"],Dh=aa;Ch[0]in Dh||!Dh.execScript||Dh.execScript("var "+Ch[0]);for(var Eh;Ch.length&&(Eh=Ch.shift());)!Ch.length&&n(Bh)?Dh[Eh]=Bh:Dh=Dh[Eh]?Dh[Eh]:Dh[Eh]={};O.prototype.name=function(){z("Firebase.name() being deprecated. Please use Firebase.key() instead.");D("Firebase.name",0,0,arguments.length);return this.key()};O.prototype.name=O.prototype.name; O.prototype.key=function(){D("Firebase.key",0,0,arguments.length);var a;this.path.e()?a=null:(a=this.path,a=a.ba