/*!
* @license Firebase v4.9.0 * Build: rev-a586a7f * Terms: https://firebase.google.com/terms/ */
var firebase=function(){var e=void 0===e?self:e;return function(t){function r(e){if(o)return o.exports;var n=o={i:e,l:!1,exports:{}};return t.call(n.exports,n,n.exports,r),n.l=!0,n.exports}var n=e.webpackJsonpFirebase;e.webpackJsonpFirebase=function(e,o,a){for(var c,s,u,f=0,h=[];fe
“ failed.”)),i=void 0)}var n=i;if(0===n)return new Promise(function(e){e()});if(n)return n;var o=new Promise(function(t,r){n=i=[t,r]});n=o;var a=document.getElementsByTagName(“head”),c=document.createElement(“script”);c.type=“text/javascript”,c.charset=“utf-8”,c.async=!0,c.timeout=12e4,r.nc&&c.setAttribute(“nonce”,r.nc),c.src=r.p+“”e
“.js”;var s=setTimeout(t,12e4);return c.onerror=c.onload=t,a.appendChild©,o},r.m=t,r.c=o,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,“a”,t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=“”,r.oe=function(e){throw console.error(e),e},r(r.s=57)}([function(e,t,r){“use strict”;function n(e){for(var r in e)t.hasOwnProperty®||(t=e)}Object.defineProperty(t,“__esModule”,{value:!0}),n(r(28)),n(r(29)),n(r(20)),n(r(65)),n(r(66)),n(r(67)),n(r(68)),n(r(30)),n(r(69)),n(r(31)),n(r(70)),n(r(71)),n(r(73)),n(r(74)),n(r(75))},,,,,,function(e,t,r){“use strict”;function n(){function e(e){l(d,“delete”),delete d}function t(e){return e=e||c,a(d,e)||o(“no-app”,{name:e}),d}function r(e,t){void 0===t?t=c:“string”==typeof t&&“”!==t||o(“bad-app-name”,{name:t+“”}),a(d,t)&&o(“duplicate-app”,{name:t});var r=new u(e,t,b);return d=r,l(r,“create”),r}function s(){return Object.keys(d).map(function(e){return d})}function f(e,r,n,a,c){v&&o(“duplicate-service”,{name:e}),v=r,a&&(y=a,s().forEach(function(e){a(“create”,e)}));var f=function®{return void 0===r&&(r=t()),“function”!=typeof r&&o(“invalid-app-argument”,{name:e}),r()};return void 0!==n&&Object(i.deepExtend)(f,n),b=f,u.prototype=function(){for(var t=[],r=0;rn.CONSTANTS.SDK_VERSION
“) INTERNAL ASSERT FAILED: ”+e)}},function(e,t,r){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var n=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var o=e.charCodeAt(n);o<128?t=o:o<2048?(t=o>>6|192,t=63&o|128):55296==(64512&o)&&n+1r
“?>”}),r=this.serviceName+“: ”r
“ (”o
“).”;var i=new a(o,r);for(var c in t)t.hasOwnProperty©&&“_”!==c.slice(-1)&&(i=t);return i},e}();t.ErrorFactory=c},function(e,t,r){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var n=r(29),o=r(30);t.decode=function(e){var t={},r={},i={},a=“”;try{var c=e.split(“.”);t=o.jsonEval(n.base64Decode(c)||“”),r=o.jsonEval(n.base64Decode(c)||“”),a=c,i=r.d||{},delete r.d}catch(e){}return{header:t,claims:r,data:i,signature:a}},t.isValidTimestamp=function(e){var r,n,o=t.decode(e).claims,i=Math.floor((new Date).getTime()/1e3);return“object”==typeof o&&(o.hasOwnProperty(“nbf”)?r=o.nbf:o.hasOwnProperty(“iat”)&&(r=o.iat),n=o.hasOwnProperty(“exp”)?o.exp:r+86400),i&&r&&n&&i>=r&&i<=n},t.issuedAtTime=function(e){var r=t.decode(e).claims;return“object”==typeof r&&r.hasOwnProperty(“iat”)?r.iat:null},t.isValidFormat=function(e){var r=t.decode(e),n=r.claims;return!!r.signature&&!!n&&“object”==typeof n&&n.hasOwnProperty(“iat”)},t.isAdmin=function(e){var r=t.decode(e).claims;return“object”==typeof r&&!0===r.admin}},function(e,t,r){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var n=r(31);t.querystring=function(e){var t=[];return n.forEach(e,function(e,r){Array.isArray®?r.forEach(function®{t.push(encodeURIComponent(e)+“=”+encodeURIComponent®)}):t.push(encodeURIComponent(e)+“=”+encodeURIComponent®)}),t.length?“&”+t.join(“&”):“”},t.querystringDecode=function(e){var t={};return e.replace(/^?/,“”).split(“&”).forEach(function(e){if(e){var r=e.split(“=”);t[r]=r}}),t}},function(e,t,r){“use strict”;var n=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty®&&(e=t)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create®:(n.prototype=r.prototype,new n)}}();Object.defineProperty(t,“__esModule”,{value:!0});var o=r(72),i=function(e){function t(){var t=e.call(this)||this;t.D=[],t.I=,t.x=[],t.F=,t.L=0,t.R=0,t.blockSize=64,t.F=128;for(var r=1;rn
(1===n?“ argument.”:“ arguments.”)+“ Expects ”o
“.”;throw Error(i)}},t.errorPrefix=n,t.validateNamespace=o,t.validateCallback=i,t.validateContextObject=a},function(e,t,r){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var n=r(28);t.stringToByteArray=function(e){for(var t=[],r=0,o=0;o<e.length;o++){var i=e.charCodeAt(o);if(i>=55296&&i<=56319){var a=i-55296;o++,n.assert(o<e.length,“Surrogate pair missing trail surrogate.”),i=65536+(a<<10)+(e.charCodeAt(o)-56320)}i<128?t=i:i<2048?(t=i>>6|192,t=63&i|128):i<65536?(t=i>>12|224,t=i>>6&63|128,t=63&i|128):(t=i>>18|240,t=i>>12&63|128,t=i>>6&63|128,t=63&i|128)}return t},t.stringLength=function(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt®;n<128?t++:n<2048?t+=2:n>=55296&&n<=56319?(t+=4,r++):t+=3}return t}}])}().default;
/*!
* @license Firebase v4.9.0 * Build: rev-a586a7f * Terms: https://firebase.google.com/terms/ */
try{webpackJsonpFirebase(,{76:function(t,n,e){e(77)},77:function(t,n,e){(function(t){(function(){function t(t){return“string”==typeof t}function n(t){return“boolean”==typeof t}function i(){}function r(t){var n=typeof t;if(“object”==n){if(!t)return“null”;if(t instanceof Array)return“array”;if(t instanceof Object)return n;var e=Object.prototype.toString.call(t);if(“[object Window]”==e)return“object”;if(“[object Array]”==e||“number”==typeof t.length&&void 0!==t.splice&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable(“splice”))return“array”;if(“[object Function]”==e||void 0!==t.call&&void 0!==t.propertyIsEnumerable&&!t.propertyIsEnumerable(“call”))return“function”}else if(“function”==n&&void 0===t.call)return“object”;return n}function o(t){return null===t}function a(t){return“array”==r(t)}function s(t){var n=r(t);return“array”==n||“object”==n&&“number”==typeof t.length}function u(t){return“function”==r(t)}function c(t){var n=typeof t;return“object”==n&&null!=t||“function”==n}function h(t,n,e){return t.call.apply(t.bind,arguments)}function f(t,n,e){if(!t)throw Error();if(2<arguments.length){var i=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(e,i),t.apply(n,e)}}return function(){return t.apply(n,arguments)}}function l(t,n,e){return l=Function.prototype.bind&&-1!=(“”+Function.prototype.bind).indexOf(“native code”)?h:f,l.apply(null,arguments)}function d(t,n){var e=Array.prototype.slice.call(arguments,1);return function(){var n=e.slice();return n.push.apply(n,arguments),t.apply(this,n)}}function p(t,n){function e(){}e.prototype=n.prototype,t.ib=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.Rc=function(t,e,i){for(var r=Array(arguments.length-2),o=2;ot
”'“),”type_error:Const“)}function It(t){var n=new wt;return n.a=t,n}function Tt(){this.a=”“,this.b=nc}function At(t){return t instanceof Tt&&t.constructor===Tt&&t.b===nc?t.a:(I(”expected object of type TrustedResourceUrl, got '“t
”' of type “+r(t)),”type_error:TrustedResourceUrl“)}function kt(t,n){return t=Et(t,n),n=new Tt,n.a=t,n}function Et(t,n){var e=yt(t);if(!tc.test(e))throw Error(”Invalid TrustedResourceUrl format: “+e);return e.replace(Qu,function(t,i){if(!Object.prototype.hasOwnProperty.call(n,i))throw Error('Found marker, ”'i
'“, in format string, ”'e
'“, but no valid label mapping found in args: '+JSON.stringify(n));return t=n,t instanceof wt?yt(t):encodeURIComponent(t+”“)})}function Nt(){this.a=”“,this.b=ic}function St(t){return t instanceof Nt&&t.constructor===Nt&&t.b===ic?t.a:(I(”expected object of type SafeUrl, got '“t
”' of type “+r(t)),”type_error:SafeUrl“)}function Ot(t){return t instanceof Nt?t:(t=t.la?t.ja():t+”“,ec.test(t)||(t=”about:invalid#zClosurez“),Pt(t))}function Pt(t){var n=new Nt;return n.a=t,n}function Ct(){this.a=”“,this.b=rc}function Rt(t){return t instanceof Ct&&t.constructor===Ct&&t.b===rc?t.a:(I(”expected object of type SafeHtml, got '“t
”' of type “+r(t)),”type_error:SafeHtml“)}function _t(t){var n=new Ct;return n.a=t,n}function Dt(n){var e=document;return t(n)?e.getElementById(n):n}function Lt(t,n){C(n,function(n,e){n&&n.la&&(n=n.ja()),”style“==e?t.style.cssText=n:”class“==e?t.className=n:”for“==e?t.htmlFor=n:oc.hasOwnProperty(e)?t.setAttribute(oc,n):0==e.lastIndexOf(”aria-“,0)||0==e.lastIndexOf(”data-“,0)?t.setAttribute(e,n):t=n})}function xt(n,e,i){var r=arguments,o=document,s=r+”“,u=r;if(!$u&&u&&(u.name||u.type)){if(s=,u.name&&s.push(' name=”',g(u.name),'“'),u.type){s.push(' type=”',g(u.type),'“');var c={};U(c,u),delete c.type,u=c}s.push(”>“),s=s.join(”“)}return s=o.createElement(s),u&&(t(u)?s.className=u:a(u)?s.className=u.join(” “):Lt(s,u)),2<r.length&&Ut(o,s,r),s}function Ut(n,e,i){function r(i){i&&e.appendChild(t(i)?n.createTextNode(i):i)}for(var o=2;o<i.length;o++){var a=i;!s(a)||c(a)&&0<a.nodeType?r(a):Tu(jt(a)?O(a):a,r)}}function jt(t){if(t&&”number“==typeof t.length){if(c(t))return”function“==typeof t.item||”string“==typeof t.item;if(u(t))return”function“==typeof t.item}return!1}function Mt(t){var n=[];return Ft(new Vt,t,n),n.join(”“)}function Vt(){}function Ft(t,n,e){if(null==n)e.push(”null“);else{if(”object“==typeof n){if(a(n)){var i=n;n=i.length,e.push(”[“);for(var r=”“,o=0;o,i||(t.Ha=!1)):(t=new Wt(e,t.src,a,!!r,o),t.Ha=i,n.push(t)),t}function Yt(t,n){var e=n.type;e in t.a&&E(t.a,n)&&(Gt(n),0==t.a.length&&(delete t.a,t.b–))}function $t(t,n,e,i){for(var r=0;r<t.length;++r){var o=t;if(!o.ma&&o.listener==n&&o.capture==!!e&&o.La==i)return r}return-1}function Zt(t,n,e,i,r){if(i&&i.once)nn(t,n,e,i,r);else if(a(n))for(var o=0;ot.i
”; newUri=“+n);e=e?e.toUpperCase():”GET“,t.i=n,t.g=”“,t.I=e,t.A=!1,t.b=!0,t.a=t.w?t.w.a():Bc.a(),t.v=ge(t.w?t.w:Bc),t.a.onreadystatechange=l(t.Ab,t);try{Nn(t.J,_e(t,”Opening Xhr“)),t.G=!0,t.a.open(e,n+”“,!0),t.G=!1}catch(n){return Nn(t.J,_e(t,”Error opening Xhr: “+n.message)),void ke(t,n)}n=i||”“;var o=new An(t.headers);r&&zn(r,function(t,n){o.set(n,t)}),r=A(o.S()),i=uu.FormData&&n instanceof uu.FormData,!k(Jc,e)||r||i||o.set(”Content-Type“,”application/x-www-form-urlencoded;charset=utf-8“),o.forEach(function(t,n){this.a.setRequestHeader(n,t)},t),t.l&&(t.a.responseType=t.l),”withCredentials“in t.a&&t.a.withCredentials!==t.N&&(t.a.withCredentials=t.N);try{Oe(t),0<t.f&&(t.o=Te(t.a),Nn(t.J,_e(t,”Will abort after “t.f
”ms if incomplete, xhr2 “+t.o)),t.o?(t.a.timeout=t.f,t.a.ontimeout=l(t.Ea,t)):t.m=mn(t.Ea,t.f,t)),Nn(t.J,_e(t,”Sending request“)),t.h=!0,t.a.send(n),t.h=!1}catch(n){Nn(t.J,_e(t,”Send error: “+n.message)),ke(t,n)}}function Te(t){return Cu&&F(9)&&”number“==typeof t.timeout&&void 0!==t.ontimeout}function Ae(t){return”content-type“==t.toLowerCase()}function ke(t,n){t.b=!1,t.a&&(t.c=!0,t.a.abort(),t.c=!1),t.g=n,Ee(t),Se(t)}function Ee(t){t.A||(t.A=!0,ln(t,”complete“),ln(t,”error“))}function Ne(t){if(t.b&&void 0!==su)if(t.v&&4==Pe(t)&&2==Ce(t))Nn(t.J,_e(t,”Local request error detected and ignored“));else if(t.h&&4==Pe(t))mn(t.Ab,0,t);else if(ln(t,”readystatechange“),4==Pe(t)){Nn(t.J,_e(t,”Request complete“)),t.b=!1;try{var n=Ce(t);t:switch(n){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var e=!0;break t;default:e=!1}var i;if(!(i=e)){var r;if(r=0===n){var o=(t.i+”“).match(Mc)||null;if(!o&&uu.self&&uu.self.location){var a=uu.self.location.protocol;o=a.substr(0,a.length-1)}r=!zc.test(o?o.toLowerCase():”“)}i=r}if(i)ln(t,”complete“),ln(t,”success“);else{try{var s=2<Pe(t)?t.a.statusText:”“}catch(n){Nn(t.J,”Can not get status: “+n.message),s=”“}t.g=s+” [“+Ce(t)+”]“,Ee(t)}}finally{Se(t)}}}function Se(t,n){if(t.a){Oe(t);var e=t.a,r=t.v?i:null;t.a=null,t.v=null,n||ln(t,”ready“);try{e.onreadystatechange=r}catch(n){(t=t.J)&&t.log(Tc,”Problem encountered resetting onreadystatechange: “+n.message,void 0)}}}function Oe(t){t.a&&t.o&&(t.a.ontimeout=null),”number“==typeof t.m&&(uu.clearTimeout(t.m),t.m=null)}function Pe(t){return t.a?t.a.readyState:0}function Ce(t){try{return 2<Pe(t)?t.a.status:-1}catch(t){return-1}}function Re(t){try{return t.a?t.a.responseText:”“}catch(n){return Nn(t.J,”Can not get responseText: “+n.message),”“}}function _e(t,n){return n+” [“t.I
” “t.i
” “+Ce(t)+”]“}function De(t){var n={},e=n.document||document,i=At(t),r=document.createElement(”SCRIPT“),o={Cb:r,Ea:void 0},a=new Rn(xe,o),s=null,u=null!=n.timeout?n.timeout:5e3;return 0<u&&(s=window.setTimeout(function(){Ue(r,!0);var t=new je(Zc,”Timeout reached for loading script “+i);Dn(a),_n(a,!1,t)},u),o.Ea=s),r.onload=r.onreadystatechange=function(){r.readyState&&”loaded“!=r.readyState&&”complete“!=r.readyState||(Ue(r,n.Sc||!1,s),a.A(null))},r.onerror=function(){Ue(r,!0,s);var t=new je($c,”Error while loading script “+i);Dn(a),_n(a,!1,t)},o=n.attributes||{},U(o,{type:”text/javascript“,charset:”UTF-8“}),Lt(r,o),r.src=At(t),Le(e).appendChild®,a}function Le(t){var n;return(n=(t||document).getElementsByTagName(”HEAD“))&&0!=n.length?n:t.documentElement}function xe(){if(this&&this.Cb){var t=this.Cb;t&&”SCRIPT“==t.tagName&&Ue(t,!0,this.Ea)}}function Ue(t,n,e){null!=e&&uu.clearTimeout(e),t.onload=i,t.onerror=i,t.onreadystatechange=i,n&&window.setTimeout(function(){t&&t.parentNode&&t.parentNode.removeChild(t)},0)}function je(t,n){var e=”Jsloader error (code #“t
”)“;n&&(e+=”: “+n),v.call(this,e),this.code=t}function Me(){}function Ve(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseText=”“,this.status=-1,this.statusText=this.responseXML=null,this.a.onload=l(this.Wb,this),this.a.onerror=l(this.xb,this),this.a.onprogress=l(this.Xb,this),this.a.ontimeout=l(this.Yb,this)}function Fe(t,n){t.readyState=n,t.onreadystatechange&&t.onreadystatechange()}function Ke(){var t=ri();return Cu&&!!Mu&&11==Mu||/Edge/d+/.test(t)}function qe(){return uu.window&&uu.window.location.href||”“}function Xe(t,n){n=n||uu.window;var e=”about:blank“;t&&(e=St(Ot(t))),n.location.href=e}function Be(t,n){var e,i=[];for(e in t)e in n?typeof t!=typeof n?i.push(e):a(t)?L(t,n)||i.push(e):”object“==typeof t&&null!=t&&null!=n?0t
”/“+n.join(”,“)}function ri(){return uu.navigator&&uu.navigator.userAgent||”“}function oi(t,n){t=t.split(”.“),n=n||uu;for(var e=0;e<t.length&&”object“==typeof n&&null!=n;e++)n=n[t];return e!=t.length&&(n=void 0),n}function ai(){try{var t=uu.localStorage,n=pi();if(t)return t.setItem(n,”1“),t.removeItem(n),!Ke()||!!uu.indexedDB}catch(t){}return!1}function si(){return(ui()||”chrome-extension:“===ci()||Ze())&&!ni()&&ai()}function ui(){return”“===ci()||”https:“===ci()}function ci(){return uu.location&&uu.location.protocol||null}function hi(t){return t=t||ri(),!We(t)&&ei(t)!=th}function fi(t){return void 0===t?null:Mt(t)}function li(t){var n,e={};for(n in t)t.hasOwnProperty(n)&&null!==t&&void 0!==t&&(e=t);return e}function di(t){if(null!==t)return JSON.parse(t)}function pi(t){return t||”“+Math.floor(1e9*Math.random())}function vi(t){return t=t||ri(),”Safari“!=ei(t)&&!t.toLowerCase().match(/iphone|ipad|ipod/)}function mi(){var t=uu.___jsl;if(t&&t.H)for(var n in t.H)if(t.H.r=t.H.r||[],t.H.L=t.H.L||[],t.H.r=t.H.L.concat(),t.CP)for(var e=0;eo
”|“o
”)$“,”i“).test(a)),a){t=!0;break t}}t=!1}if(!t)throw new lr(qe())})}function $r(t){return t.l?t.l:(t.l=Ye().then(function(){if(!t.o){var n=t.c,e=t.h,i=zr(t.b),r=new Wr(t.u,t.f,t.b);r.f=n,r.b=e,r.c=O(i||[]),t.o=”“+r}t.i=new Kr(t.o),to(t)}),t.l)}function Zr(t){return t.m||(t.v=t.c?ii(t.c,zr(t.b)):null,t.m=new mr(t.f,Fr(t.h),t.v)),t.m}function Qr(t,n,e,i,r,o,a,s,u,c){return t=new Gr(t,n,e,i,r),t.h=o,t.g=a,t.i=s,t.b=x(u||null),t.f=c,”“+t}function to(t){if(!t.i)throw Error(”IfcHandler must be initialized!“);Br(t.i,function(n){var e={};if(n&&n.authEvent){var i=!1;for(n=fr(n.authEvent),e=0;et.o
”'!“)}}function Oa(t){return new fa(function(){return t.F(!0)},function(t){return!(!t||”auth/network-request-failed“!=t.code)},function(){var n=t.h.c-fu()-3e5;return 0<n?n:0},3e4,96e4,!1)}function Pa(t){t.m||t.l.b||(t.l.start(),en(t,”tokenChanged“,t.U),Zt(t,”tokenChanged“,t.U))}function Ca(t){en(t,”tokenChanged“,t.U),pa(t.l)}function Ra(t,n){t.pa=n,Ti(t,”_lat“,n)}function _a(t,n){N(t.N,function(t){return t==n})}function Da(t){for(var n=[],e=0;eo
” arguments“)+” but got “e.length
”.“;else{for(r=0;rn.name
'“ ':”“)+”must be “n.K
”.“;break t}i=null}}if(i)throw new Pi(”argument-error“,t+” failed: “+i)}function Ls(n,e){return{name:n||”“,K:”a valid string“,optional:!!e,M:t}}function xs(){return{name:”opt_forceRefresh“,K:”a boolean“,optional:!0,M:n}}function Us(t,n){return{name:t||”“,K:”a valid object“,optional:!!n,M:c}}function js(t,n){return{name:t||”“,K:”a function“,optional:!!n,M:u}}function Ms(t,n){return{name:t||”“,K:”null“,optional:!!n,M:o}}function Vs(){return{name:”“,K:”an HTML element“,optional:!1,M:function(t){return!!(t&&t instanceof Element)}}}function Fs(){return{name:”auth“,K:”an instance of Firebase Auth“,optional:!0,M:function(t){return!!(t&&t instanceof vs)}}}function Ks(){return{name:”app“,K:”an instance of Firebase App“,optional:!0,M:function(t){return!!(t&&t instanceof au.app.App)}}}function qs(t){return{name:t?t+”Credential“:”credential“,K:t?”a valid “t
” credential“:”a valid credential“,optional:!1,M:function(n){if(!n)return!1;var e=!t||n.providerId===t;return!(!n.wa||!e)}}}function Xs(){return{name:”authProvider“,K:”a valid Auth provider“,optional:!1,M:function(t){return!!(t&&t.providerId&&t.hasOwnProperty&&t.hasOwnProperty(”isOAuthProvider“))}}}function Bs(){return{name:”applicationVerifier“,K:”an implementation of firebase.auth.ApplicationVerifier“,optional:!1,M:function(n){return!!(n&&t(n.type)&&u(n.verify))}}}function Hs(t,n,e,i){return{name:e||”“,K:t.K+” or “+n.K,optional:!!i,M:function(e){return t.M(e)||n.M(e)}}}function Ws(t,n,e,i,r,o){if(Ti(this,”type“,”recaptcha“),this.b=this.c=null,this.m=!1,this.l=n,this.a=e||{theme:”light“,type:”image“},this.g=[],this.a)throw new Pi(”argument-error“,”sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.“);if(this.h=”invisible“===this.a,!Dt(n)||!this.h&&Dt(n).hasChildNodes())throw new Pi(”argument-error“,”reCAPTCHA container is either not found or already contains inner elements!“);this.u=new mr(t,o||null,r||null),this.o=i||function(){return null};var a=this;this.i=[];var s=this.a;this.a=function(t){if(Gs(a,t),”function“==typeof s)s(t);else if(”string“==typeof s){var n=oi(s,uu);”function“==typeof n&&n(t)}};var u=this.a;this.a=function(){if(Gs(a,null),”function“==typeof u)u();else if(”string“==typeof u){var t=oi(u,uu);”function“==typeof t&&t()}}}function Gs(t,n){for(var e=0;e<t.i.length;e++)try{t.i(n)}catch(t){}}function zs(t,n){N(t.i,function(t){return t==n})}function Js(t,n){return t.g.push(n),at(n,function(){E(t.g,n)}),n}function Ys(t){if(t.m)throw new Pi(”internal-error“,”RecaptchaVerifier instance has been destroyed.“)}function $s(){this.b=uu.grecaptcha?1/0:0,this.c=null,this.a=”__rcb“+Math.floor(1e6*Math.random())}function Zs(t,n){return new Z(function(e,i){if(gi())if(!uu.grecaptcha||n!==t.c&&!t.b){uu=function(){if(uu.grecaptcha){t.c=n;var r=uu.grecaptcha.render;uu.grecaptcha.render=function(n,e){return n=r(n,e),t.b++,n},e()}else i(new Pi(”internal-error“));delete uu};var r=kt(Df,{onload:t.a,hl:n||”“});nt(De®).s(function(){i(new Pi(”internal-error“,”Unable to load external reCAPTCHA dependencies!“))})}else e();else i(new Pi(”network-request-failed“))})}function Qs(){return Lf||(Lf=new $s),Lf}function tu(t,n,e){try{this.f=e||au.app()}catch(t){throw new Pi(”argument-error“,”No firebase.app.App instance is currently initialized.“)}if(!this.f.options||!this.f.options.apiKey)throw new Pi(”invalid-api-key“);e=this.f.options.apiKey;var i=this,r=null;try{r=this.f.auth().Ka()}catch(t){}r=au.SDK_VERSION?ii(au.SDK_VERSION,r):null,Ws.call(this,e,t,n,function(){try{var t=i.f.auth().$()}catch(n){t=null}return t},r,Fr(jh))}function nu(t,n){for(var e in n){var i=n.name;t=iu(i,t,n.j)}}function eu(t,n,e,i){t=iu(n,e,i)}function iu(t,n,e){function i(){var t=Array.prototype.slice.call(arguments);return Ds(o,e,t),n.apply(this,t)}if(!e)return n;var r,o=ru(t);for(r in n)i=n;for(r in n.prototype)i.prototype=n.prototype;return i}function ru(t){return t=t.split(”.“),t}var ou,au=e(6).default,su=su||{},uu=this,cu=”closure_uid_“+(1e9*Math.random()>>>0),hu=0,fu=Date.now||function(){return+new Date};p(v,Error),v.prototype.name=”CustomError“;var lu=String.prototype.trim?function(t){return t.trim()}:function(t){return t.replace(/^+|[sxa0]+$/g,”“)},n&&n===e)return i;return-1},Tu=Array.prototype.forEach?function(t,n,e){Array.prototype.forEach.call(t,n,e)}:function(n,e,i){for(var r=n.length,o=t(n)?n.split(“”):n,a=0;a<r;a++)a in o&&e.call(i,o,a,n)},Au=Array.prototype.map?function(t,n,e){return Array.prototype.map.call(t,n,e)}:function(n,e,i){for(var r=n.length,o=Array®,a=t(n)?n.split(“”):n,s=0;s<r;s++)s in a&&(o=e.call(i,a,s,n));return o},ku=Array.prototype.some?function(t,n,e){return Array.prototype.some.call(t,n,e)}:function(n,e,i){for(var r=n.length,o=t(n)?n.split(“”):n,a=0;a<r;a++)if(a in o&&e.call(i,o,a,n))return!0;return!1};t:{var Eu=uu.navigator;if(Eu){var Nu=Eu.userAgent;if(Nu){yu=Nu;break t}}yu=“”}var Su=“constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf”.split(“ ”);j[“ ”]=i;var Ou,Pu=P(“Opera”),Cu=P(“Trident”)||P(“MSIE”),Ru=P(“Edge”),_u=Ru||Cu,Du=P(“Gecko”)&&!(b(yu.toLowerCase(),“webkit”)&&!P(“Edge”))&&!(P(“Trident”)||P(“MSIE”))&&!P(“Edge”),Lu=b(yu.toLowerCase(),“webkit”)&&!P(“Edge”);t:{var xu=“”,Uu=function(){var t=yu;return Du?/rv:(+)()|;)/.exec(t):Ru?/Edge/([d.]+)/.exec(t):Cu?/b(?:MSIE|rv)[: ]([^);]+)()|;)/.exec(t):Lu?/WebKit/(S+)/.exec(t):Pu?/(?:Version)[ /]?(S+)/.exec(t):void 0}();if(Uu&&(xu=Uu?Uu:“”),Cu){var ju=V();if(null!=ju&&ju>parseFloat(xu)){Ou=ju+“”;break t}}Ou=xu}var Mu,Vu={},Fu=uu.document;Mu=Fu&&Cu?V()||(“CSS1Compat”==Fu.compatMode?parseInt(Ou,10):5):void 0,X.prototype.get=function(){if(0<this.b){this.b–;var t=this.a;this.a=t.next,t.next=null}else t=this.c();return t};var Ku=new X(function(){return new W},function(t){t.reset()},100);W.prototype.set=function(t,n){this.a=t,this.b=n,this.next=null},W.prototype.reset=function(){this.next=this.b=this.a=null};var qu,Xu,Bu=!1,Hu=new function(){this.b=this.a=null},Wu=0,Gu=2,zu=3;Q.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Ju=new X(function(){return new Q},function(t){t.reset()},100);Z.prototype.then=function(t,n,e){return ct(this,u(t)?t:null,u(n)?n:null,e)},K(Z),ou=Z.prototype,ou.s=function(t,n){return ct(this,null,t,n)},ou.cancel=function(t){this.a==Wu&&J(function(){st(this,new bt(t))},this)},ou.Ac=function(t){this.a=Wu,ht(this,Gu,t)},ou.Bc=function(t){this.a=Wu,ht(this,zu,t)},ou.Qb=function(){for(var t;t=pt(this);)vt(this,t,this.a,this.i);this.h=!1};var Yu=G;p(bt,v),bt.prototype.name=“cancel”;var $u=!Cu||9<=+Mu;wt.prototype.la=!0,wt.prototype.ja=function(){return this.a},wt.prototype.toString=function(){return“Const{”this.a
“}”};var Zu={};It(“”),Tt.prototype.la=!0,Tt.prototype.ja=function(){return this.a},Tt.prototype.toString=function(){return“TrustedResourceUrl{”this.a
“}”};var Qu=/%{(w+)}/g,tc=/^(?:https:)?//[0-9a-z.:[]-]+/|^/[^/\]|^about:blank(#|$)/i,nc={};Nt.prototype.la=!0,Nt.prototype.ja=function(){return this.a},Nt.prototype.toString=function(){return“SafeUrl{”this.a
“}”};var ec=/^(?:(?:https?|mailto|ftp):|*(?:[/?#]|$))/i,ic={};Pt(“about:blank”),Ct.prototype.la=!0,Ct.prototype.ja=function(){return this.a},Ct.prototype.toString=function(){return“SafeHtml{”this.a
“}”};var rc={};_t(“<!DOCTYPE html>”),_t(“”),_t(“
”);var oc={cellpadding:“cellPadding”,cellspacing:“cellSpacing”,colspan:“colSpan”,frameborder:“frameBorder”,height:“height”,maxlength:“maxLength”,nonce:“nonce”,role:“role”,rowspan:“rowSpan”,type:“type”,usemap:“useMap”,valign:“vAlign”,width:“width”},ac={'“':'\”',“\”:“\\”,“/”:“\/”,“b”:“\b”,“f”:“\f”,“n”:“\n”,“r”:“\r”,“t”:“\t”,“v”:“\u000b”},sc=/uffff/.test(“”)?//g://g,uc=0,cc={};qt.prototype.oa=!1,qt.prototype.ta=function(){if(this.Fa)for(;this.Fa.length;)this.Fa.shift()()};var hc=Object.freeze||function(t){return t},fc=!Cu||9<=+Mu,lc=Cu&&!F(“9”),dc=function(){if(!uu.addEventListener||!Object.defineProperty)return!1;var t=!1,n=Object.defineProperty({},“passive”,{get:function(){t=!0}});return uu.addEventListener(“test”,i,n),uu.removeEventListener(“test”,i,n),t}();Bt.prototype.c=function(){this.Bb=!1},p(Ht,Bt);var pc=hc({2:“touch”,3:“pen”,4:“mouse”});Ht.prototype.c=function(){Ht.ib.c.call(this);var t=this.a;if(t.preventDefault)t.preventDefault();else if(t.returnValue=!1,lc)try{(t.ctrlKey||112<=t.keyCode&&123>=t.keyCode)&&(t.keyCode=-1)}catch(t){}},Ht.prototype.g=function(){return this.a};var vc=“closure_listenable_”+(1e6*Math.random()|0),mc=0,gc=“closure_lm_”+(1e6*Math.random()|0),bc={},wc=0,yc=“_closure_events_fn”+(1e9*Math.random()>>>0);p(fn,qt),fn.prototype=!0,fn.prototype.removeEventListener=function(t,n,e,i){en(this,t,n,e,i)},fn.prototype.ta=function(){if(fn.ib.ta.call(this),this.u){var t,n=this.u,e=0;for(t in n.a){for(var i=n.a,r=0;rthis.f
“ms, aborting”,Nn(this.J,_e(this,this.g)),ln(this,“timeout”),this.abort(8))},ou.abort=function(){this.a&&this.b&&(Nn(this.J,_e(this,“Aborting”)),this.b=!1,this.c=!0,this.a.abort(),this.c=!1,ln(this,“complete”),ln(this,“abort”),Se(this))},ou.ta=function(){this.a&&(this.b&&(this.b=!1,this.c=!0,this.a.abort(),this.c=!1),Se(this,!0)),ye.ib.ta.call(this)},ou.Ab=function(){this.oa||(this.G||this.h||this.c?Ne(this):this.jc())},ou.jc=function(){Ne(this)},ou.getResponse=function(){try{if(!this.a)return null;if(“response”in this.a)return this.a.response;switch(this.l){case Hc:case“text”:return this.a.responseText;case“arraybuffer”:if(“mozResponseArrayBuffer”in this.a)return this.a.mozResponseArrayBuffer}var t=this.J;return t&&t.log(Tc,“Response type ”this.l
“ is not supported on this browser”,void 0),null}catch(t){return Nn(this.J,“Can not get response: ”+t.message),null}};var Yc=/^+@([a-zA-Z0-9-]\.)
[a-zA-Z0-9]{2,63}$/,$c=0,Zc=1;p(je,v),p(Me,me),Me.prototype.a=function(){var t=new XMLHttpRequest;if(“withCredentials”in t)return t;if(“undefined”!=typeof XDomainRequest)return new Ve;throw Error(“Unsupported browser”)},Me.prototype.b=function(){return{}},ou=Ve.prototype,ou.open=function(t,n,e){if(null!=e&&!e)throw Error(“Only async requests are supported.”);this.a.open(t,n)},ou.send=function(t){if(t){if(“string”!=typeof t)throw Error(“Only string data is supported”);this.a.send(t)}else this.a.send()},ou.abort=function(){this.a.abort()},ou.setRequestHeader=function(){},ou.getResponseHeader=function(t){return“content-type”==t.toLowerCase()?this.a.contentType:“”},ou.Wb=function(){this.status=200,this.responseText=this.a.responseText,Fe(this,4)},ou.xb=function(){this.status=500,this.responseText=“”,Fe(this,4)},ou.Yb=function(){this.xb()},ou.Xb=function(){this.status=200,Fe(this,1)},ou.getAllResponseHeaders=function(){return“content-type: ”+this.a.contentType};var Qc=/^d{1,3}.d{1,3}.d{1,3}.d{1,3}$/,th=“Firefox”,nh=“Chrome”,eh={Gc:“FirebaseCore-web”,Ic:“FirebaseUI-web”};bi.prototype.get=function(){return this.a?this.b:this.c};var ih,rh={};try{var oh={};Object.defineProperty(oh,“abcd”,{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(oh,“abcd”,{configurable:!0,enumerable:!0,value:2}),ih=2==oh.abcd}catch(t){ih=!1}var ah=“email”,sh=“newEmail”,uh=“requestType”,ch=“email”,hh=“fromEmail”,fh=“data”,lh=“operation”;p(Pi,Error),Pi.prototype.B=function(){return{code:this.code,message:this.message}},Pi.prototype.toJSON=function(){return this.B()};var dh=“auth/”,ph={“argument-error”:“”,“app-not-authorized”:“This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.”,“app-not-installed”:“The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.”,“captcha-check-failed”:“The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.”,“code-expired”:“The SMS code has expired. Please re-send the verification code to try again.”,“cordova-not-ready”:“Cordova framework is not ready.”,“cors-unsupported”:“This browser is not supported.”,“credential-already-in-use”:“This credential is already associated with a different user account.”,“custom-token-mismatch”:“The custom token corresponds to a different audience.”,“requires-recent-login”:“This operation is sensitive and requires recent authentication. Log in again before retrying this request.”,“dynamic-link-not-activated”:“Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.”,“email-already-in-use”:“The email address is already in use by another account.”,“expired-action-code”:“The action code has expired. ”,“cancelled-popup-request”:“This operation has been cancelled due to another conflicting popup being opened.”,“internal-error”:“An internal error has occurred.”,“invalid-app-credential”:“The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.”,“invalid-app-id”:“The mobile app identifier is not registed for the current project.”,“invalid-user-token”:“The user's credential is no longer valid. The user must sign in again.”,“invalid-auth-event”:“An internal error has occurred.”,“invalid-verification-code”:“The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure use the verification code provided by the user.”,“invalid-continue-uri”:“The continue URL provided in the request is invalid.”,“invalid-cordova-configuration”:“The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.”,“invalid-custom-token”:“The custom token format is incorrect. Please check the documentation.”,“invalid-email”:“The email address is badly formatted.”,“invalid-api-key”:“Your API key is invalid, please check you have copied it correctly.”,“invalid-cert-hash”:“The SHA-1 certificate hash provided is invalid.”,“invalid-credential”:“The supplied auth credential is malformed or has expired.”,“invalid-persistence-type”:“The specified persistence type is invalid. It can only be local, session or none.”,“invalid-message-payload”:“The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.”,“invalid-oauth-provider”:“EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.”,“invalid-oauth-client-id”:“The OAuth client ID provided is either invalid or does not match the specified API key.”,“unauthorized-domain”:“This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.”,“invalid-action-code”:“The action code is invalid. This can happen if the code is malformed, expired, or has already been used.”,“wrong-password”:“The password is invalid or the user does not have a password.”,“invalid-phone-number”:“The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].”,“invalid-recipient-email”:“The email corresponding to this action failed to send as the provided recipient email address is invalid.”,“invalid-sender”:“The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.”,“invalid-verification-id”:“The verification ID used to create the phone auth credential is invalid.”,“missing-android-pkg-name”:“An Android Package Name must be provided if the Android App is required to be installed.”,“auth-domain-config-required”:“Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.”,“missing-app-credential”:“The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.”,“missing-verification-code”:“The phone auth credential was created with an empty SMS verification code.”,“missing-continue-uri”:“A continue URL must be provided in the request.”,“missing-iframe-start”:“An internal error has occurred.”,“missing-ios-bundle-id”:“An iOS Bundle ID must be provided if an App Store ID is provided.”,“missing-phone-number”:“To send verification codes, provide a phone number for the recipient.”,“missing-verification-id”:“The phone auth credential was created with an empty verification ID.”,“app-deleted”:“This instance of FirebaseApp has been deleted.”,“account-exists-with-different-credential”:“An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.”,“network-request-failed”:“A network error (such as timeout, interrupted connection or unreachable host) has occurred.”,“no-auth-event”:“An internal error has occurred.”,“no-such-provider”:“User was not linked to an account with the given provider.”,“operation-not-allowed”:“The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.”,“operation-not-supported-in-this-environment”:'This operation is not supported in the environment this application is running on. “location.protocol” must be http, https or chrome-extension and web storage must be enabled.',“popup-blocked”:“Unable to establish a connection with the popup. It may have been blocked by the browser.”,“popup-closed-by-user”:“The popup has been closed by the user before finalizing the operation.”,“provider-already-linked”:“User can only be linked to one identity for the given provider.”,“quota-exceeded”:“The project's quota for this operation has been exceeded.”,“redirect-cancelled-by-user”:“The redirect operation has been cancelled by the user before finalizing.”,“redirect-operation-pending”:“A redirect sign-in operation is already pending.”,timeout:“The operation has timed out.”,“user-token-expired”:“The user's credential is no longer valid. The user must sign in again.”,“too-many-requests”:“We have blocked all requests from this device due to unusual activity. Try again later.”,“unauthorized-continue-uri”:“The domain of the continue URL is not whitelisted. Please whitelist the domain in the Firebase console.”,“unsupported-persistence-type”:“The current environment does not support the specified persistence type.”,“user-cancelled”:“User did not grant your application the permissions it requested.”,“user-not-found”:“There is no user record corresponding to this identifier. The user may have been deleted.”,“user-disabled”:“The user account has been disabled by an administrator.”,“user-mismatch”:“The supplied credentials do not correspond to the previously signed in user.”,“user-signed-out”:“”,“weak-password”:“The password must be 6 characters long or more.”,“web-storage-unsupported”:“This browser is not supported or 3rd party cookies and data may be disabled.”},vh=“android”,mh=“handleCodeInApp”,gh=“iOS”,bh=“url”,wh=“installApp”,yh=“minimumVersion”,Ih=“packageName”,Th=“bundleId”,Ah=“oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version”.split(“ ”),kh=,Eh={Hc:{Ma:“locale”,za:500,ya:600,Na:“facebook.com”,$a:kh},Jc:{Ma:null,za:500,ya:620,Na:“github.com”,$a:kh},Kc:{Ma:“hl”,za:515,ya:680,Na:“google.com”,$a:kh},Qc:{Ma:“lang”,za:485,ya:705,Na:“twitter.com”,$a:Ah}},Nh=“idToken”,Sh=“providerId”;p(Mi,ji),p(Vi,Mi),p(Fi,Mi),p(Ki,Mi),p(qi,Mi),Bi.prototype.wa=function(t){return Dr(t,Hi(this))},Bi.prototype.b=function(t,n){var e=Hi(this);return e.idToken=n,Lr(t,e)},Bi.prototype.c=function(t,n){return Xi(xr(t,Hi(this)),n)},Bi.prototype.B=function(){var t={providerId:this.providerId};return this.idToken&&(t.oauthIdToken=this.idToken),this.accessToken&&(t.oauthAccessToken=this.accessToken),this.secret&&(t.oauthTokenSecret=this.secret),t},Wi.prototype.Ba=function(t){return this.rb=x(t),this},p(Gi,Wi),Gi.prototype.sa=function(t){return k(this.a,t)||this.a.push(t),this},Gi.prototype.wb=function(){return O(this.a)},Gi.prototype.credential=function(t,n){if(!t&&!n)throw new Pi(“argument-error”,“credential failed: must provide the ID token and/or the access token.”);return new Bi(this.providerId,{idToken:t||null,accessToken:n||null})},p(zi,Gi),Ti(zi,“PROVIDER_ID”,“facebook.com”),p(Yi,Gi),Ti(Yi,“PROVIDER_ID”,“github.com”),p(Zi,Gi),Ti(Zi,“PROVIDER_ID”,“google.com”),p(tr,Wi),Ti(tr,“PROVIDER_ID”,“twitter.com”),er.prototype.wa=function(t){return jr(t,of,{email:this.a,password:this.f})},er.prototype.b=function(t,n){return jr(t,Zh,{idToken:n,email:this.a,password:this.f})},er.prototype.c=function(t,n){return Xi(this.wa(t),n)},er.prototype.B=function(){return{email:this.a,password:this.f}},Ai(ir,{PROVIDER_ID:“password”}),rr.prototype.wa=function(t){return t.Qa(or(this))},rr.prototype.b=function(t,n){var e=or(this);return e.idToken=n,jr(t,sf,e)},rr.prototype.c=function(t,n){var e=or(this);return e.operation=“REAUTH”,t=jr(t,uf,e),Xi(t,n)},rr.prototype.B=function(){var t={providerId:“phone”};return this.a.Pa&&(t.verificationId=this.a.Pa),this.a.Oa&&(t.verificationCode=this.a.Oa),this.a.Da&&(t.temporaryProof=this.a.Da),this.a.Y&&(t.phoneNumber=this.a.Y),t},ar.prototype.Qa=function(n,e){var i=this.a.c;return nt(e.verify()).then(function®{if(!t®)throw new Pi(“argument-error”,“An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.”);switch(e.type){case“recaptcha”:return Pr(i,{phoneNumber:n,recaptchaToken:r}).then(function(t){return“function”==typeof e.reset&&e.reset(),t},function(t){throw“function”==typeof e.reset&&e.reset(),t});default:throw new Pi(“argument-error”,'Only firebase.auth.ApplicationVerifiers with type=“recaptcha” are currently supported.')}})},Ai(ar,{PROVIDER_ID:“phone”}),hr.prototype.B=function(){return{type:this.b,eventId:this.c,urlResponse:this.f,sessionId:this.g,error:this.a&&this.a.B()}},p(lr,Pi),p(dr,Pi),dr.prototype.B=function(){var t={code:this.code,message:this.message};this.email&&(t.email=this.email),this.phoneNumber&&(t.phoneNumber=this.phoneNumber);var n=this.credential&&this.credential.B();return n&&U(t,n),t},dr.prototype.toJSON=function(){return this.B()},p(vr,me),vr.prototype.a=function(){return new this.f},vr.prototype.b=function(){return{}};var Oh,Ph=“idToken”,Ch=new bi(3e4,6e4),Rh={“Content-Type”:“application/x-www-form-urlencoded”},_h=new bi(3e4,6e4),Dh={“Content-Type”:“application/json”};mr.prototype.m=function(t,n,e,i,r,o){var a=“Node”==ti(),s=ni()?a?new ye(this.o):new ye:new ye(this.f);if(o){s.f=Math.max(0,o);var u=setTimeout(function(){ln(s,“timeout”)},o)}dn(s,“complete”,function(){u&&clearTimeout(u);var t=null;try{t=JSON.parse(Re(this))||null}catch(n){t=null}n&&n(t)}),pn(s,“ready”,function(){u&&clearTimeout(u),Xt(this)}),pn(s,“timeout”,function(){u&&clearTimeout(u),Xt(this),n&&n(null)}),Ie(s,t,e,i,r)};var Lh=It(“apis.google.com/js/client.js?onload=%{onload}”),xh=“__fcb”+Math.floor(1e6*Math.random());mr.prototype.u=function(t,n,e,i,r){var o=this;Oh.then(function(){window.gapi.client.setApiKey(o.b);var a=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:t,method:e,body:i,headers:r,authType:“none”,callback:function(t){window.gapi.auth.setToken(a),n&&n(t)}})}).s(function(t){n&&n({error:{message:t&&t.message||“CORS_UNSUPPORTED”}})})},mr.prototype.gb=function(){return jr(this,Qh,{})},mr.prototype.kb=function(t,n){return jr(this,$h,{idToken:t,email:n})},mr.prototype.lb=function(t,n){return jr(this,Zh,{idToken:t,password:n})};var Uh={displayName:“DISPLAY_NAME”,photoUrl:“PHOTO_URL”};ou=mr.prototype,ou.mb=function(t,n){var e={idToken:t},i=[];return C(Uh,function(t,r){var o=n;null===o?i.push(t):r in n&&(e=o)}),i.length&&(e.deleteAttribute=i),jr(this,$h,e)},ou.cb=function(t,n){return t={requestType:“PASSWORD_RESET”,email:t},U(t,n),jr(this,Wh,t)},ou.bb=function(t,n){return t={requestType:“VERIFY_EMAIL”,idToken:t},U(t,n),jr(this,Hh,t)},ou.Qa=function(t){return jr(this,af,t)},ou.Ta=function(t,n){return jr(this,Jh,{oobCode:t,newPassword:n})},ou.Ia=function(t){return jr(this,Vh,{oobCode:t})},ou.Sa=function(t){return jr(this,Mh,{oobCode:t})};var jh,Mh={endpoint:“setAccountInfo”,D:Ur,ga:“email”},Vh={endpoint:“resetPassword”,D:Ur,O:function(t){if(!t.email||!t.requestType)throw new Pi(“internal-error”)}},Fh={endpoint:“signupNewUser”,D:function(t){if(Ar(t),!t.password)throw new Pi(“weak-password”)},O:Sr,T:!0},Kh={endpoint:“createAuthUri”},qh={endpoint:“deleteAccount”,ea:},Xh={endpoint:“setAccountInfo”,ea:,D:function(t){if(!a(t.deleteProvider))throw new Pi(“internal-error”)}},Bh={endpoint:“getAccountInfo”},Hh={endpoint:“getOobConfirmationCode”,ea:,D:function(t){if(“VERIFY_EMAIL”!=t.requestType)throw new Pi(“internal-error”)},ga:“email”},Wh={endpoint:“getOobConfirmationCode”,ea:,D:function(t){if(“PASSWORD_RESET”!=t.requestType)throw new Pi(“internal-error”);Ar(t)},ga:“email”},Gh={nb:!0,endpoint:“getProjectConfig”,zb:“GET”},zh={nb:!0,endpoint:“getRecaptchaParam”,zb:“GET”,O:function(t){if(!t.recaptchaSiteKey)throw new Pi(“internal-error”)}},Jh={endpoint:“resetPassword”,D:Ur,ga:“email”},Yh={endpoint:“sendVerificationCode”,ea:,ga:“sessionInfo”},$h={endpoint:“setAccountInfo”,ea:,D:kr,T:!0},Zh={endpoint:“setAccountInfo”,ea:,D:function(t){if(kr(t),!t.password)throw new Pi(“weak-password”)},O:Sr,T:!0},Qh={endpoint:“signupNewUser”,O:Sr,T:!0},tf={endpoint:“verifyAssertion”,D:Rr,O:_r,T:!0},nf={endpoint:“verifyAssertion”,D:Rr,O:function(t){if(t.errorMessage&&“USER_NOT_FOUND”==t.errorMessage)throw new Pi(“user-not-found”);if(t.errorMessage)throw Mr(t.errorMessage);if(!t)throw new Pi(“internal-error”)},T:!0},ef={endpoint:“verifyAssertion”,D:function(t){if(Rr(t),!t.idToken)throw new Pi(“internal-error”)},O:_r,T:!0},rf={endpoint:“verifyCustomToken”,D:function(t){if(!t.token)throw new Pi(“invalid-custom-token”)},O:Sr,T:!0},of={endpoint:“verifyPassword”,D:function(t){if(Ar(t),!t.password)throw new Pi(“wrong-password”)},O:Sr,T:!0},af={endpoint:“verifyPhoneNumber”,D:Or,O:Sr},sf={endpoint:“verifyPhoneNumber”,D:function(t){if(!t.idToken)throw new Pi(“internal-error”);Or(t)},O:function(t){if(t.temporaryProof)throw t.code=“credential-already-in-use”,pr(t);Sr(t)}},uf={Pb:{USER_NOT_FOUND:“user-not-found”},endpoint:“verifyPhoneNumber”,D:Or,O:Sr},cf={Mc:{Va:“www.googleapis.com/identitytoolkit/v3/relyingparty/”,ab:“https://securetoken.googleapis.com/v1/token”,id:“p”},Oc:{Va:“https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/”,ab:“https://staging-securetoken.sandbox.googleapis.com/v1/token”,id:“s”},Pc:{Va:“https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/”,ab:“https://test-securetoken.sandbox.googleapis.com/v1/token”,id:“t”}};jh=Fr(“__EID__”)?“__EID__”:void 0;var hf=It(“apis.google.com/js/api.js?onload=%{onload}”),ff=new bi(3e4,6e4),lf=new bi(5e3,15e3),df=null;Wr.prototype.toString=function(){return this.f?te(this.a,“v”,this.f):fe(this.a.a,“v”),this.b?te(this.a,“eid”,this.b):fe(this.a.a,“eid”),this.c.length?te(this.a,“fw”,this.c.join(“,”)):fe(this.a.a,“fw”),“”+this.a},Gr.prototype.toString=function(){var t=ie(this.m,“/__/auth/handler”);if(te(t,“apiKey”,this.u),te(t,“appName”,this.c),te(t,“authType”,this.l),this.a.isOAuthProvider){var n=this.a;try{var e=au.app(this.c).auth().$()}catch(t){e=null}n.Ua=e,te(t,“providerId”,this.a.providerId),n=this.a,e=li(n.rb);for(var i in e)e=“”+e;i=n.rc,e=x(e);for(var r=0;r<i.length;r++){var o=i;o in e&&delete e}n.Wa&&n.Ua&&!e&&(e=n.Ua),D(e)||te(t,“customParameters”,fi(e))}if(“function”==typeof this.a.wb&&(n=this.a.wb(),n.length&&te(t,“scopes”,n.join(“,”))),this.h?te(t,“redirectUrl”,this.h):fe(t.a,“redirectUrl”),this.g?te(t,“eventId”,this.g):fe(t.a,“eventId”),this.i?te(t,“v”,this.i):fe(t.a,“v”),this.b)for(var a in this.b)this.b.hasOwnProperty(a)&&!ne(t,a)&&te(t,a,this.b);return this.f?te(t,“eid”,this.f):fe(t.a,“eid”),a=zr(this.c),a.length&&te(t,“fw”,a.join(“,”)),“”+t},ou=Jr.prototype,ou.Ca=function(t,n,e){var i=new Pi(“popup-closed-by-user”),r=new Pi(“web-storage-unsupported”),o=this,a=!1;return this.ba().then(function(){no(o).then(function(e){e||(t&&Ge(t),n®,a=!0)})}).s(function(){}).then(function(){if(!a)return Je(t)}).then(function(){if(!a)return gn(e).then(function(){n(i)})})},ou.Db=function(){var t=ri();return!hi(t)&&!vi(t)},ou.yb=function(){return!1},ou.vb=function(t,n,e,i,r,o,a){if(!t)return et(new Pi(“popup-blocked”));if(a&&!hi())return this.ba().s(function(n){Ge(t),r(n)}),i(),nt();this.a||(this.a=Yr(Zr(this)));var s=this;return this.a.then(function(){var n=s.ba().s(function(n){throw Ge(t),r(n),n});return i(),n}).then(function(){cr(e),a||Xe(Qr(s.u,s.f,s.b,n,e,null,o,s.c,void 0,s.h),t)}).s(function(t){throw“auth/network-request-failed”==t.code&&(s.a=null),t})},ou.Aa=function(t,n,e){this.a||(this.a=Yr(Zr(this)));var i=this;return this.a.then(function(){cr(n),Xe(Qr(i.u,i.f,i.b,t,n,qe(),e,i.c,void 0,i.h))}).s(function(t){throw“auth/network-request-failed”==t.code&&(i.a=null),t})},ou.ba=function(){var t=this;return $r(this).then(function(){return t.i.Ya}).s(function(){throw t.a=null,new Pi(“network-request-failed”)})},ou.Hb=function(){return!0},ou.ua=function(t){this.g.push(t)},ou.Ja=function(t){N(this.g,function(n){return n==t})},ou=eo.prototype,ou.get=function(t){return nt(this.a.getItem(t)).then(function(t){return t&&di(t)})},ou.set=function(t,n){return nt(this.a.setItem(t,fi(n)))},ou.X=function(t){return nt(this.a.removeItem(t))},ou.ia=function(){},ou.da=function(){},ou=io.prototype,ou.get=function(t){return nt(this.a)},ou.set=function(t,n){return this.a=n,nt()},ou.X=function(t){return delete this.a,nt()},ou.ia=function(){},ou.da=function(){};var pf;ou=ro.prototype,ou.set=function(t,n){var e,i=!1,r=this;return at(ao(this).then(function(n){return e=n,n=so(r,uo(r,e,!0)),co(n.get(t))}).then(function(o){var a=so(r,uo(r,e,!0));return o?(o.value=n,co(a.put(o))):(r.a++,i=!0,o={},o=t,o=n,co(a.add(o)))}).then(function(){r.f=n}),function(){i&&r.a–})},ou.get=function(t){var n=this;return ao(this).then(function(e){return co(so(n,uo(n,e,!1)).get(t))}).then(function(t){return t&&t.value})},ou.X=function(t){var n=!1,e=this;return at(ao(this).then(function(i){return n=!0,e.a++,co(so(e,uo(e,i,!0)).delete(t))}).then(function(){delete e.f}),function(){n&&e.a–})},ou.zc=function(){var t=this;return ao(this).then(function(n){var e=so(t,uo(t,n,!1));return e.getAll?co(e.getAll()):new Z(function(t,n){var i=[],r=e.openCursor();r.onsuccess=function(n){(n=n.target.result)?(i.push(n.value),n.continue()):t(i)},r.onerror=function(t){n(Error(t.target.errorCode))}})}).then(function(n){var e={},i=[];if(0==t.a){for(i=0;i
/*!
* @license Firebase v4.9.0 * Build: rev-a586a7f * Terms: https://firebase.google.com/terms/ */
try{webpackJsonpFirebase(,[,function(e,t,n){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var r=n(0),i=n(0),o=n(0),a=n(0),s=n(0),u=n(0),l=n(13),h=n(0);t.LUIDGenerator=function(){var e=1;return function(){return e++}}(),t.sha1=function(e){var t=s.stringToByteArray(e),n=new a.Sha1;n.update(t);var r=n.digest();return o.base64.encodeByteArray®};var c=function(){for(var e=[],t=0;te
“) in object: ”+u.stringify(t))},t.ObjectToUniqueKey=function(e){if(“object”!=typeof e||null===e)return u.stringify(e);var n=[];for(var r in e)n.push®;n.sort();for(var i=“{”,o=0;ot.path
“: ”+n);return r.code=e.toUpperCase(),r},t.e=RegExp(“^-?\d{1,10}$”),t.tryParseInt=function(e){if(t.e.test(e)){var n=+e;if(n>=-2147483648&&n<=2147483647)return n}return null},t.exceptionGuard=function(e){try{e()}catch(e){setTimeout(function(){var n=e.stack||“”;throw t.warn(“Exception was thrown by user callback.”,n),e},Math.floor(0))}},t.callUserCallback=function(e){for(var n=[],r=1;rn
“) is not within outerPath (”t
“)”)},e.comparePaths=function(e,t){for(var n=e.slice(),i=t.slice(),o=0;o<n.length&&o<i.length;o++){var a=r.nameCompare(n,i);if(0!==a)return a}return n.length===i.length?0:n.length<i.length?-1:1},e.prototype.equals=function(e){if(this.getLength()!==e.getLength())return!1;for(var t=this.i,n=e.i;t<=this.n.length;t++,n++)if(this.n!==e.n)return!1;return!0},e.prototype.contains=function(e){var t=this.i,n=e.i;if(this.getLength()>e.getLength())return!1;for(;t<this.n.length;){if(this.n!==e.n)return!1;++t,++n}return!0},e}();t.Path=o;var a=function(){function e(e,t){this.o=t,this.u=e.slice(),this.l=Math.max(1,this.u.length);for(var n=0;ne.MAX_PATH_LENGTH_BYTES
“ bytes (”this.l
“).”);if(this.u.length>e.MAX_PATH_DEPTH)throw Error(this.o+“path specified exceeds the maximum depth that can be written (”e.MAX_PATH_DEPTH
“) or object contains a cycle ”+this.toErrorString())},e.prototype.toErrorString=function(){return 0==this.u.length?“”:“in property '”+this.u.join(“.”)+“'”},e}();t.ValidationPath=a},function(e,t,n){“use strict”;function r(e){a=e}function i(e){s=e}var o=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e=t)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,“__esModule”,{value:!0});var a,s,u=n(15),l=n(1),h=n(5),c=n(16);t.setNodeFromJSON=r,t.setMaxNode=i;var p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.compare=function(e,t){var n=e.node.getPriority(),r=t.node.getPriority(),i=n.compareTo®;return 0===i?l.nameCompare(e.name,t.name):i},t.prototype.isDefinedOn=function(e){return!e.getPriority().isEmpty()},t.prototype.indexedValueChanged=function(e,t){return!e.getPriority().equals(t.getPriority())},t.prototype.minPost=function(){return h.NamedNode.MIN},t.prototype.maxPost=function(){return new h.NamedNode(l.MAX_NAME,new c.LeafNode(“”,s))},t.prototype.makePost=function(e,t){var n=a(e);return new h.NamedNode(t,new c.LeafNode(“”,n))},t.prototype.toString=function(){return“.priority”},t}(u.Index);t.PriorityIndex=p,t.PRIORITY_INDEX=new p},function(e,t,n){“use strict”;var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e=t)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,“__esModule”,{value:!0});var i,o=n(0),a=n(1),s=n(17),u=n(5),l=n(37),h=n(3),c=n(10),p=n(39),d=n(16),f=n(41),_=function(){function e(e,t,n){this._=e,this.y=t,this.g=n,this.m=null,this.y&&l.validatePriorityNode(this.y),this._.isEmpty()&&o.assert(!this.y||this.y.isEmpty(),“An empty node cannot have a priority”)}return Object.defineProperty(e,“EMPTY_NODE”,{get:function(){return i||(i=new e(new s.SortedMap(f.NAME_COMPARATOR),null,p.IndexMap.Default))},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!1},e.prototype.getPriority=function(){return this.y||i},e.prototype.updatePriority=function(t){return this._.isEmpty()?this:new e(this._,t,this.g)},e.prototype.getImmediateChild=function(e){if(“.priority”===e)return this.getPriority();var t=this._.get(e);return null===t?i:t},e.prototype.getChild=function(e){var t=e.getFront();return null===t?this:this.getImmediateChild(t).getChild(e.popFront())},e.prototype.hasChild=function(e){return null!==this._.get(e)},e.prototype.updateImmediateChild=function(t,n){if(o.assert(n,“We should always be passing snapshot nodes”),“.priority”===t)return this.updatePriority(n);var r=new u.NamedNode(t,n),a=void 0,s=void 0,l=void 0;return n.isEmpty()?(a=this._.remove(t),s=this.g.removeFromIndexes(r,this._)):(a=this._.insert(t,n),s=this.g.addToIndexes(r,this._)),l=a.isEmpty()?i:this.y,new e(a,l,s)},e.prototype.updateChild=function(e,t){var n=e.getFront();if(null===n)return t;o.assert(“.priority”!==e.getFront()||1===e.getLength(),“.priority must be the last token in a path”);var r=this.getImmediateChild(n).updateChild(e.popFront(),t);return this.updateImmediateChild(n,r)},e.prototype.isEmpty=function(){return this._.isEmpty()},e.prototype.numChildren=function(){return this._.count()},e.prototype.val=function(t){if(this.isEmpty())return null;var n={},r=0,i=0,o=!0;if(this.forEachChild(h.PRIORITY_INDEX,function(a,s){n=s.val(t),r++,o&&e.e.test(a)?i=Math.max(i,+a):o=!1}),!t&&o&&i<2*r){var a=[];for(var s in n)a=n;return a}return t&&!this.getPriority().isEmpty()&&(n=this.getPriority().val()),n},e.prototype.hash=function(){if(null===this.m){var e=“”;this.getPriority().isEmpty()||(e+=“priority:”+l.priorityHashText(this.getPriority().val())+“:”),this.forEachChild(h.PRIORITY_INDEX,function(t,n){var r=n.hash();“”!==r&&(e+=“:”t
“:”+r)}),this.m=“”===e?“”:a.sha1(e)}return this.m},e.prototype.getPredecessorChildName=function(e,t,n){var r=this.C(n);if®{var i=r.getPredecessorKey(new u.NamedNode(e,t));return i?i.name:null}return this._.getPredecessorKey(e)},e.prototype.getFirstChildName=function(e){var t=this.C(e);if(t){var n=t.minKey();return n&&n.name}return this._.minKey()},e.prototype.getFirstChild=function(e){var t=this.getFirstChildName(e);return t?new u.NamedNode(t,this._.get(t)):null},e.prototype.getLastChildName=function(e){var t=this.C(e);if(t){var n=t.maxKey();return n&&n.name}return this._.maxKey()},e.prototype.getLastChild=function(e){var t=this.getLastChildName(e);return t?new u.NamedNode(t,this._.get(t)):null},e.prototype.forEachChild=function(e,t){var n=this.C(e);return n?n.inorderTraversal(function(e){return t(e.name,e.node)}):this._.inorderTraversal(t)},e.prototype.getIterator=function(e){return this.getIteratorFrom(e.minPost(),e)},e.prototype.getIteratorFrom=function(e,t){var n=this.C(t);if(n)return n.getIteratorFrom(e,function(e){return e});for(var r=this._.getIteratorFrom(e.name,u.NamedNode.Wrap),i=r.peek();null!=i&&t.compare(i,e)<0;)r.getNext(),i=r.peek();return r},e.prototype.getReverseIterator=function(e){return this.getReverseIteratorFrom(e.maxPost(),e)},e.prototype.getReverseIteratorFrom=function(e,t){var n=this.C(t);if(n)return n.getReverseIteratorFrom(e,function(e){return e});for(var r=this._.getReverseIteratorFrom(e.name,u.NamedNode.Wrap),i=r.peek();null!=i&&t.compare(i,e)>0;)r.getNext(),i=r.peek();return r},e.prototype.compareTo=function(e){return this.isEmpty()?e.isEmpty()?0:-1:e.isLeafNode()||e.isEmpty()?1:e===t.MAX_NODE?-1:0},e.prototype.withIndex=function(t){if(t===c.KEY_INDEX||this.g.hasIndex(t))return this;var n=this.g.addIndex(t,this._);return new e(this._,this.y,n)},e.prototype.isIndexed=function(e){return e===c.KEY_INDEX||this.g.hasIndex(e)},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode())return!1;var t=e;if(this.getPriority().equals(t.getPriority())){if(this._.count()===t._.count()){for(var n=this.getIterator(h.PRIORITY_INDEX),r=t.getIterator(h.PRIORITY_INDEX),i=n.getNext(),o=r.getNext();i&&o;){if(i.name!==o.name||!i.node.equals(o.node))return!1;i=n.getNext(),o=r.getNext()}return null===i&&null===o}return!1}return!1},e.prototype.C=function(e){return e===c.KEY_INDEX?null:this.g.get(“”+e)},e.e=/^(0|d*)$/,e}();t.ChildrenNode=_;var y=function(e){function t(){return e.call(this,new s.SortedMap(f.NAME_COMPARATOR),_.EMPTY_NODE,p.IndexMap.Default)||this}return r(t,e),t.prototype.compareTo=function(e){return e===this?0:1},t.prototype.equals=function(e){return e===this},t.prototype.getPriority=function(){return this},t.prototype.getImmediateChild=function(e){return _.EMPTY_NODE},t.prototype.isEmpty=function(){return!1},t}(_);t.MaxNode=y,t.MAX_NODE=new y,Object.defineProperties(u.NamedNode,{MIN:{value:new u.NamedNode(a.MIN_NAME,_.EMPTY_NODE)},MAX:{value:new u.NamedNode(a.MAX_NAME,t.MAX_NODE)}}),c.KeyIndex._EMPTY_NODE=.EMPTY_NODE,d.LeafNode._childrenNodeConstructor=,l.setMaxNode(t.MAX_NODE),h.setMaxNode(t.MAX_NODE)},function(e,t,n){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var r=function(){function e(e,t){this.name=e,this.node=t}return e.Wrap=function(t,n){return new e(t,n)},e}();t.NamedNode=r},,function(e,t,n){“use strict”;Object.defineProperty(t,“__esModule”,{value:!0});var r=n(2),i=n(0),o=n(1),a=n(0),s=n(0);t.N=/[.#$/u0000-u001Fu007F]/,t.P=/[.#$u0000-u001Fu007F]/,t.S=10485760,t.isValidKey=function(e){return”string“==typeof e&&0!==e.length&&!t.N.test(e)},t.isValidPathString=function(e){return”string“==typeof e&&0!==e.length&&!t.P.test(e)},t.isValidRootPathString=function(e){return e&&(e=e.replace(/^/*.info(/|$)/,”/“)),t.isValidPathString(e)},t.isValidPriority=function(e){return null===e||”string“==typeof e||”number“==typeof e&&!o.isInvalidJSONNumber(e)||e&&”object“==typeof e&&i.contains(e,”.sv“)},t.validateFirebaseDataArg=function(e,n,r,i,o){o&&void 0===r||t.validateFirebaseData(a.errorPrefix(e,n,o),r,i)},t.validateFirebaseData=function(e,n,a){var u=a instanceof r.Path?new r.ValidationPath(a,e):a;if(void 0===n)throw Error(e+”contains undefined “+u.toErrorString());if(”function“==typeof n)throw Error(e+”contains a function “+u.toErrorString()+” with contents = “+n);if(o.isInvalidJSONNumber(n))throw Error(e+”contains “n
” “+u.toErrorString());if(”string“==typeof n&&n.length>t.S/3&&s.stringLength(n)>t.S)throw Error(e+”contains a string greater than “t.S
” utf8 bytes “+u.toErrorString()+” ('“+n.substring(0,50)+”…')“);if(n&&”object“==typeof n){var l=!1,h=!1;if(i.forEach(n,function(n,r){if(”.value“===n)l=!0;else if(”.priority“!==n&&”.sv“!==n&&(h=!0,!t.isValidKey(n)))throw Error(e+” contains an invalid key (“n
”) “+u.toErrorString()+'. Keys must be non-empty strings and can't contain ”.“, ”#“, ”$“, ”/“, ”[“, or ”]“');u.push(n),t.validateFirebaseData(e,r,u),u.pop()}),l&&h)throw Error(e+' contains ”.value“ child '+u.toErrorString()+” in addition to actual children.“)}},t.validateFirebaseMergePaths=function(e,n){var i,o;for(i=0;i<n.length;i++){o=n;for(var a=o.slice(),s=0;sa[s]
”) in path “o
'. Keys must be non-empty strings and can't contain ”.“, ”#“, ”$“, ”/“, ”[“, or ”]“')}n.sort(r.Path.comparePaths);var u=null;for(i=0;i<n.length;i++){if(o=n,null!==u&&u.contains(o))throw Error(e+”contains a path “u
” that is ancestor of another path “+o);u=o}},t.validateFirebaseMergeDataArg=function(e,n,o,s,u){if(!u||void 0!==o){var l=a.errorPrefix(e,n,u);if(!o||”object“!=typeof o||Array.isArray(o))throw Error(l+” must be an object containing the children to replace.“);var h=[];i.forEach(o,function(e,n){var i=new r.Path(e);if(t.validateFirebaseData(l,n,s.child(i)),”.priority“===i.getBack()&&!t.isValidPriority(n))throw Error(l+”contains an invalid value for '“i
”', which must be a valid Firebase priority (a string, finite number, server value, or null).“);h.push(i)}),t.validateFirebaseMergePaths(l,h)}},t.validatePriority=function(e,n,r,i){if(!i||void 0!==r){if(o.isInvalidJSONNumber®)throw Error(a.errorPrefix(e,n,i)+”is “r
”, but must be a valid Firebase priority (a string, finite number, server value, or null).“);if(!t.isValidPriority®)throw Error(a.errorPrefix(e,n,i)+”must be a valid Firebase priority (a string, finite number, server value, or null).“)}},t.validateEventType=function(e,t,n,r){if(!r||void 0!==n)switch(n){case”value“:case”child_added“:case”child_removed“:case”child_changed“:case”child_moved“:break;default:throw Error(a.errorPrefix(e,t,r)+'must be a valid event type = ”value“, ”child_added“, ”child_removed“, ”child_changed“, or ”child_moved“.')}},t.validateKey=function(e,n,r,i){if(!(i&&void 0===r||t.isValidKey®))throw Error(a.errorPrefix(e,n,i)+'was an invalid key = ”'r
'“. Firebase keys must be non-empty strings and can't contain ”.“, ”#“, ”$“, ”/“, ”[“, or ”]“).')},t.validatePathString=function(e,n,r,i){if(!(i&&void 0===r||t.isValidPathString®))throw Error(a.errorPrefix(e,n,i)+'was an invalid path = ”'r
'“. Paths must be non-empty strings and can't contain ”.“, ”#“, ”$“, ”[“, or ”]“')},t.validateRootPathString=function(e,n,r,i){r&&(r=r.replace(/^/*.info(/|$)/,”/“)),t.validatePathString(e,n,r,i)},t.validateWritablePath=function(e,t){if(”.info“===t.getFront())throw Error(e+” failed = Can't modify data under /.info/“)},t.validateUrl=function(e,n,r){var i=”“+r.path;if(”string“!=typeof r.repoInfo.host||0===r.repoInfo.host.length||!t.isValidKey(r.repoInfo.namespace)||0!==i.length&&!t.isValidRootPathString(i))throw Error(a.errorPrefix(e,n,!1)+'must be a valid firebase URL and the path can't contain ”.“, ”#“, ”$“, ”[“, or ”]“.')},t.validateCredential=function(e,t,n,r){if((!r||void 0!==n)&&”string“!=typeof n)throw Error(a.errorPrefix(e,t,r)+”must be a valid credential (a string).“)},t.validateBoolean=function(e,t,n,r){if((!r||void 0!==n)&&”boolean“!=typeof n)throw Error(a.errorPrefix(e,t,r)+”must be a boolean.“)},t.validateString=function(e,t,n,r){if((!r||void 0!==n)&&”string“!=typeof n)throw Error(a.errorPrefix(e,t,r)+”must be a valid string.“)},t.validateObject=function(e,t,n,r){if(!(r&&void 0===n||n&&”object“==typeof n&&null!==n))throw Error(a.errorPrefix(e,t,r)+”must be a valid object.“)},t.validateObjectContainsKey=function(e,t,n,r,o,s){if(!n||”object“!=typeof n||!i.contains(n,r)){if(o)return;throw Error(a.errorPrefix(e,t,o)+'must contain the key ”'r
'“')}if(s){var u=i.safeGet(n,r);if(”number“===s&&”number“!=typeof u||”string“===s&&”string“!=typeof u||”boolean“===s&&”boolean“!=typeof u||”function“===s&&”function“!=typeof u||”object“===s&&”object“!=typeof u&&u)throw o?Error(a.errorPrefix(e,t,o)+'contains invalid value for key ”'r
'“ (must be of type ”'s
'“)'):Error(a.errorPrefix(e,t,o)+'must contain the key ”'r
'“ with type ”'s
'“')}}},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0);!function(e){e=”OVERWRITE“,e=”MERGE“,e=”ACK_USER_WRITE“,e=”LISTEN_COMPLETE“}(t.OperationType||(t.OperationType={}));var i=function(){function e(e,t,n,i){this.fromUser=e,this.fromServer=t,this.queryId=n,this.tagged=i,r.assert(!i||t,”Tagged queries must be from server.“)}return e.User=new e(!0,!1,null,!1),e.Server=new e(!1,!0,null,!1),e.forServerTaggedQuery=function(t){return new e(!1,!0,t,!0)},e}();t.OperationSource=i},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=function(){function e(e,t,n,r,i){this.type=e,this.snapshotNode=t,this.childName=n,this.oldSnap=r,this.prevName=i}return e.valueChange=function(t){return new e(e.VALUE,t)},e.childAddedChange=function(t,n){return new e(e.CHILD_ADDED,n,t)},e.childRemovedChange=function(t,n){return new e(e.CHILD_REMOVED,n,t)},e.childChangedChange=function(t,n,r){return new e(e.CHILD_CHANGED,n,t,r)},e.childMovedChange=function(t,n){return new e(e.CHILD_MOVED,n,t)},e.CHILD_ADDED=”child_added“,e.CHILD_REMOVED=”child_removed“,e.CHILD_CHANGED=”child_changed“,e.CHILD_MOVED=”child_moved“,e.VALUE=”value“,e}();t.Change=r},function(e,t,n){”use strict“;var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e=t)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,”__esModule“,{value:!0});var i,o=n(15),a=n(5),s=n(1),u=n(0),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),Object.defineProperty(t,”__EMPTY_NODE“,{get:function(){return i},set:function(e){i=e},enumerable:!0,configurable:!0}),t.prototype.compare=function(e,t){return s.nameCompare(e.name,t.name)},t.prototype.isDefinedOn=function(e){throw u.assertionError(”KeyIndex.isDefinedOn not expected to be called.“)},t.prototype.indexedValueChanged=function(e,t){return!1},t.prototype.minPost=function(){return a.NamedNode.MIN},t.prototype.maxPost=function(){return new a.NamedNode(s.MAX_NAME,i)},t.prototype.makePost=function(e,t){return u.assert(”string“==typeof e,”KeyIndex indexValue must always be a string.“),new a.NamedNode(e,i)},t.prototype.toString=function(){return”.key“},t}(o.Index);t.KeyIndex=l,t.KEY_INDEX=new l},function(e,t,n){”use strict“;function r(e,t){if(void 0===t&&(t=null),null===e)return i.ChildrenNode.EMPTY_NODE;if(”object“==typeof e&&”.priority“in e&&(t=e),u.assert(null===t||”string“==typeof t||”number“==typeof t||”object“==typeof t&&”.sv“in t,”Invalid priority type found: “+typeof t),”object“==typeof e&&”.value“in e&&null!==e&&(e=e),”object“!=typeof e||”.sv“in e){var n=e;return new o.LeafNode(n,r(t))}if(e instanceof Array||!d){var f=i.ChildrenNode.EMPTY_NODE,_=e;return s.forEach(_,function(e,t){if(s.contains(_,e)&&”.“!==e.substring(0,1)){var n=r(t);!n.isLeafNode()&&n.isEmpty()||(f=f.updateImmediateChild(e,n))}}),f.updatePriority(r(t))}var y=[],v=!1,g=e;if(s.forEach(g,function(e,t){if(”string“!=typeof e||”.“!==e.substring(0,1)){var n=r(g);n.isEmpty()||(v=v||!n.getPriority().isEmpty(),y.push(new a.NamedNode(e,n)))}}),0==y.length)return i.ChildrenNode.EMPTY_NODE;var m=l.buildChildSet(y,h.NAME_ONLY_COMPARATOR,function(e){return e.name},h.NAME_COMPARATOR);if(v){var C=l.buildChildSet(y,p.PRIORITY_INDEX.getCompare());return new i.ChildrenNode(m,r(t),new c.IndexMap({”.priority“:C},{”.priority“:p.PRIORITY_INDEX}))}return new i.ChildrenNode(m,r(t),c.IndexMap.Default)}Object.defineProperty(t,”__esModule“,{value:!0});var i=n(4),o=n(16),a=n(5),s=n(0),u=n(0),l=n(40),h=n(41),c=n(39),p=n(3),d=!0;t.nodeFromJSON=r,p.setNodeFromJSON®},,function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(80),i=n(81),o=function(e){try{if(”undefined“!=typeof window&&void 0!==window){var t=window;return t.setItem(”firebase:sentinel“,”cache“),t.removeItem(”firebase:sentinel“),new r.DOMStorageWrapper(t)}}catch(e){}return new i.MemoryStorage};t.PersistentStorage=o(”localStorage“),t.SessionStorage=o(”sessionStorage“)},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0}),t.PROTOCOL_VERSION=”5“,t.VERSION_PARAM=”v“,t.TRANSPORT_SESSION_PARAM=”s“,t.REFERER_PARAM=”r“,t.FORGE_REF=”f“,t.FORGE_DOMAIN=”firebaseio.com“,t.LAST_SESSION_PARAM=”ls“,t.WEBSOCKET=”websocket“,t.LONG_POLLING=”long_polling“},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(5),i=n(1),o=function(){function e(){}return e.prototype.getCompare=function(){return this.compare.bind(this)},e.prototype.indexedValueChanged=function(e,t){var n=new r.NamedNode(i.MIN_NAME,e),o=new r.NamedNode(i.MIN_NAME,t);return 0!==this.compare(n,o)},e.prototype.minPost=function(){return r.NamedNode.MIN},e}();t.Index=o},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r,i=n(0),o=n(1),a=n(37),s=function(){function e(t,n){void 0===n&&(n=e.__childrenNodeConstructor.EMPTY_NODE),this.T=t,this.y=n,this.m=null,i.assert(void 0!==this.T&&null!==this.T,”LeafNode shouldn't be created with null/undefined value.“),a.validatePriorityNode(this.y)}return Object.defineProperty(e,”__childrenNodeConstructor“,{get:function(){return r},set:function(e){r=e},enumerable:!0,configurable:!0}),e.prototype.isLeafNode=function(){return!0},e.prototype.getPriority=function(){return this.y},e.prototype.updatePriority=function(t){return new e(this.T,t)},e.prototype.getImmediateChild=function(t){return”.priority“===t?this.y:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.getChild=function(t){return t.isEmpty()?this:”.priority“===t.getFront()?this.y:e.__childrenNodeConstructor.EMPTY_NODE},e.prototype.hasChild=function(){return!1},e.prototype.getPredecessorChildName=function(e,t){return null},e.prototype.updateImmediateChild=function(t,n){return”.priority“===t?this.updatePriority(n):n.isEmpty()&&”.priority“!==t?this:e.__childrenNodeConstructor.EMPTY_NODE.updateImmediateChild(t,n).updatePriority(this.y)},e.prototype.updateChild=function(t,n){var r=t.getFront();return null===r?n:n.isEmpty()&&”.priority“!==r?this:(i.assert(”.priority“!==r||1===t.getLength(),”.priority must be the last token in a path“),this.updateImmediateChild(r,e.__childrenNodeConstructor.EMPTY_NODE.updateChild(t.popFront(),n)))},e.prototype.isEmpty=function(){return!1},e.prototype.numChildren=function(){return 0},e.prototype.forEachChild=function(e,t){return!1},e.prototype.val=function(e){return e&&!this.getPriority().isEmpty()?{”.value“:this.getValue(),”.priority“:this.getPriority().val()}:this.getValue()},e.prototype.hash=function(){if(null===this.m){var e=”“;this.y.isEmpty()||(e+=”priority:“+a.priorityHashText(this.y.val())+”:“);var t=typeof this.T;e+=t+”:“,e+=”number“===t?o.doubleToIEEE754String(this.T):this.T,this.m=o.sha1(e)}return this.m},e.prototype.getValue=function(){return this.T},e.prototype.compareTo=function(t){return t===e.__childrenNodeConstructor.EMPTY_NODE?1:t instanceof e.__childrenNodeConstructor?-1:(i.assert(t.isLeafNode(),”Unknown node type“),this.w(t))},e.prototype.w=function(t){var n=typeof t.T,r=typeof this.T,o=e.VALUE_TYPE_ORDER.indexOf(n),a=e.VALUE_TYPE_ORDER.indexOf®;return i.assert(o>=0,”Unknown leaf type: “+n),i.assert(a>=0,”Unknown leaf type: “+r),o===a?”object“===r?0:this.T<t.T?-1:this.T===t.T?0:1:a-o},e.prototype.withIndex=function(){return this},e.prototype.isIndexed=function(){return!0},e.prototype.equals=function(e){if(e===this)return!0;if(e.isLeafNode()){var t=e;return this.T===t.T&&this.y.equals(t.y)}return!1},e.VALUE_TYPE_ORDER=,e}();t.LeafNode=s},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.I=r,this.R=i,this.O=[];for(var o=1;!e.isEmpty();)if(e=e,o=t?n(e.key,t):1,r&&(o*=-1),o<0)e=this.I?e.left:e.right;else{if(0===o){this.O.push(e);break}this.O.push(e),e=this.I?e.right:e.left}}return e.prototype.getNext=function(){if(0===this.O.length)return null;var e,t=this.O.pop();if(e=this.R?this.R(t.key,t.value):{key:t.key,value:t.value},this.I)for(t=t.left;!t.isEmpty();)this.O.push(t),t=t.right;else for(t=t.right;!t.isEmpty();)this.O.push(t),t=t.left;return e},e.prototype.hasNext=function(){return this.O.length>0},e.prototype.peek=function(){if(0===this.O.length)return null;var e=this.O;return this.R?this.R(e.key,e.value):{key:e.key,value:e.value}},e}();t.SortedMapIterator=r;var i=function(){function e(t,n,r,i,o){this.key=t,this.value=n,this.color=null!=r?r:e.RED,this.left=null!=i?i:a.EMPTY_NODE,this.right=null!=o?o:a.EMPTY_NODE}return e.prototype.copy=function(t,n,r,i,o){return new e(null!=t?t:this.key,null!=n?n:this.value,null!=r?r:this.color,null!=i?i:this.left,null!=o?o:this.right)},e.prototype.count=function(){return this.left.count()+1+this.right.count()},e.prototype.isEmpty=function(){return!1},e.prototype.inorderTraversal=function(e){return this.left.inorderTraversal(e)||e(this.key,this.value)||this.right.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.right.reverseTraversal(e)||e(this.key,this.value)||this.left.reverseTraversal(e)},e.prototype.A=function(){return this.left.isEmpty()?this:this.left.A()},e.prototype.minKey=function(){return this.A().key},e.prototype.maxKey=function(){return this.right.isEmpty()?this.key:this.right.maxKey()},e.prototype.insert=function(e,t,n){var r,i;return i=this,r=n(e,i.key),i=r<0?i.copy(null,null,null,i.left.insert(e,t,n),null):0===r?i.copy(null,t,null,null,null):i.copy(null,null,null,null,i.right.insert(e,t,n)),i.D()},e.prototype.M=function(){if(this.left.isEmpty())return a.EMPTY_NODE;var e=this;return e.left.L()||e.left.left.L()||(e=e.F()),e=e.copy(null,null,null,e.left.M(),null),e.D()},e.prototype.remove=function(e,t){var n,r;if(n=this,t(e,n.key)<0)n.left.isEmpty()||n.left.L()||n.left.left.L()||(n=n.F()),n=n.copy(null,null,null,n.left.remove(e,t),null);else{if(n.left.L()&&(n=n.x()),n.right.isEmpty()||n.right.L()||n.right.left.L()||(n=n.k()),0===t(e,n.key)){if(n.right.isEmpty())return a.EMPTY_NODE;r=n.right.A(),n=n.copy(r.key,r.value,null,null,n.right.M())}n=n.copy(null,null,null,null,n.right.remove(e,t))}return n.D()},e.prototype.L=function(){return this.color},e.prototype.D=function(){var e=this;return e.right.L()&&!e.left.L()&&(e=e.W()),e.left.L()&&e.left.left.L()&&(e=e.x()),e.left.L()&&e.right.L()&&(e=e.j()),e},e.prototype.F=function(){var e=this.j();return e.right.left.L()&&(e=e.copy(null,null,null,null,e.right.x()),e=e.W(),e=e.j()),e},e.prototype.k=function(){var e=this.j();return e.left.left.L()&&(e=e.x(),e=e.j()),e},e.prototype.W=function(){var t=this.copy(null,null,e.RED,null,this.right.left);return this.right.copy(null,null,this.color,t,null)},e.prototype.x=function(){var t=this.copy(null,null,e.RED,this.left.right,null);return this.left.copy(null,null,this.color,null,t)},e.prototype.j=function(){var e=this.left.copy(null,null,!this.left.color,null,null),t=this.right.copy(null,null,!this.right.color,null,null);return this.copy(null,null,!this.color,e,t)},e.prototype.V=function(){var e=this.Q();return Math.pow(2,e)<=this.count()+1},e.prototype.Q=function(){var e;if(this.L()&&this.left.L())throw Error(”Red node has red child(“this.key
”,“this.value
”)“);if(this.right.L())throw Error(”Right child of (“this.key
”,“this.value
”) is red“);if((e=this.left.Q())!==this.right.Q())throw Error(”Black depths differ“);return e+(this.L()?0:1)},e.RED=!0,e.BLACK=!1,e}();t.LLRBNode=i;var o=function(){function e(){}return e.prototype.copy=function(e,t,n,r,i){return this},e.prototype.insert=function(e,t,n){return new i(e,t,null)},e.prototype.remove=function(e,t){return this},e.prototype.count=function(){return 0},e.prototype.isEmpty=function(){return!0},e.prototype.inorderTraversal=function(e){return!1},e.prototype.reverseTraversal=function(e){return!1},e.prototype.minKey=function(){return null},e.prototype.maxKey=function(){return null},e.prototype.Q=function(){return 0},e.prototype.L=function(){return!1},e}();t.LLRBEmptyNode=o;var a=function(){function e(t,n){void 0===n&&(n=e.EMPTY_NODE),this.U=t,this.B=n}return e.prototype.insert=function(t,n){return new e(this.U,this.B.insert(t,n,this.U).copy(null,null,i.BLACK,null,null))},e.prototype.remove=function(t){return new e(this.U,this.B.remove(t,this.U).copy(null,null,i.BLACK,null,null))},e.prototype.get=function(e){for(var t,n=this.B;!n.isEmpty();){if(0===(t=this.U(e,n.key)))return n.value;t<0?n=n.left:t>0&&(n=n.right)}return null},e.prototype.getPredecessorKey=function(e){for(var t,n=this.B,r=null;!n.isEmpty();){if(0===(t=this.U(e,n.key))){if(n.left.isEmpty())return r?r.key:null;for(n=n.left;!n.right.isEmpty();)n=n.right;return n.key}t<0?n=n.left:t>0&&(r=n,n=n.right)}throw Error(”Attempted to find predecessor key for a nonexistent key. What gives?“)},e.prototype.isEmpty=function(){return this.B.isEmpty()},e.prototype.count=function(){return this.B.count()},e.prototype.minKey=function(){return this.B.minKey()},e.prototype.maxKey=function(){return this.B.maxKey()},e.prototype.inorderTraversal=function(e){return this.B.inorderTraversal(e)},e.prototype.reverseTraversal=function(e){return this.B.reverseTraversal(e)},e.prototype.getIterator=function(e){return new r(this.B,null,this.U,!1,e)},e.prototype.getIteratorFrom=function(e,t){return new r(this.B,e,this.U,!1,t)},e.prototype.getReverseIteratorFrom=function(e,t){return new r(this.B,e,this.U,!0,t)},e.prototype.getReverseIterator=function(e){return new r(this.B,null,this.U,!0,e)},e.EMPTY_NODE=new o,e}();t.SortedMap=a},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(43),i=n(11),o=n(2),a=n(44),s=n(86),u=n(97),l=n(0),h=n(1),c=n(0),p=n(98),d=n(25),f=n(100),_=n(49),y=n(101),v=n(50),g=n(106),m=n(32),C=function(){function e(e,t,n){var r=this;this.H=e,this.app=n,this.dataUpdateCount=0,this.G=null,this.K=new y.EventQueue,this.Y=1,this.X=null,this.z=new a.SparseSnapshotTree,this.J=null;var i=new p.AuthTokenProvider(n);if(this.$=d.StatsManager.getCollection(e),t||h.beingCrawled())this.Z=new g.ReadonlyRestClient(this.H,this.ee.bind(this),i),setTimeout(this.te.bind(this,!0),0);else{var o=n.options.databaseAuthVariableOverride;if(void 0!==o&&null!==o){if(”object“!=typeof o)throw Error(”Only objects are supported for option databaseAuthVariableOverride“);try{l.stringify(o)}catch(e){throw Error(”Invalid authOverride provided: “+e)}}this.J=new v.PersistentConnection(this.H,this.ee.bind(this),this.te.bind(this),this.ne.bind(this),i,o),this.Z=this.J}i.addTokenChangeListener(function(e){r.Z.refreshAuthToken(e)}),this.re=d.StatsManager.getOrCreateReporter(e,function(){return new f.StatsReporter(r.$,r.Z)}),this.ie(),this.oe=new u.SnapshotHolder,this.ae=new s.SyncTree({startListening:function(e,t,n,i){var o=[],a=r.oe.getNode(e.path);return a.isEmpty()||(o=r.ae.applyServerOverwrite(e.path,a),setTimeout(function(){i(”ok“)},0)),o},stopListening:function(){}}),this.se(”connected“,!1),this.ue=new s.SyncTree({startListening:function(e,t,n,i){return r.Z.listen(e,n,t,function(t,n){var o=i(t,n);r.K.raiseEventsForChangedPath(e.path,o)}),[]},stopListening:function(e,t){r.Z.unlisten(e,t)}})}return e.prototype.toString=function(){return(this.H.secure?”“:”http://“)+this.H.host},e.prototype.name=function(){return this.H.namespace},e.prototype.serverTime=function(){var e=this.oe.getNode(new o.Path(”.info/serverTimeOffset“)),t=e.val()||0;return(new Date).getTime()+t},e.prototype.generateServerValues=function(){return r.generateWithValues({timestamp:this.serverTime()})},e.prototype.ee=function(e,t,n,r){this.dataUpdateCount++;var a=new o.Path(e);t=this.X?this.X(e,t):t;var s=[];if®if(n){var u=c.map(t,function(e){return i.nodeFromJSON(e)});s=this.ue.applyTaggedQueryMerge(a,u,r)}else{var l=i.nodeFromJSON(t);s=this.ue.applyTaggedQueryOverwrite(a,l,r)}else if(n){var h=c.map(t,function(e){return i.nodeFromJSON(e)});s=this.ue.applyServerMerge(a,h)}else{var p=i.nodeFromJSON(t);s=this.ue.applyServerOverwrite(a,p)}var d=a;s.length>0&&(d=this.le(a)),this.K.raiseEventsForChangedPath(d,s)},e.prototype.he=function(e){this.X=e},e.prototype.te=function(e){this.se(”connected“,e),!1===e&&this.ce()},e.prototype.ne=function(e){var t=this;h.each(e,function(e,n){t.se(n,e)})},e.prototype.se=function(e,t){var n=new o.Path(”/.info/“+e),r=i.nodeFromJSON(t);this.oe.updateSnapshot(n,r);var a=this.ae.applyServerOverwrite(n,r);this.K.raiseEventsForChangedPath(n,a)},e.prototype.pe=function(){return this.Y++},e.prototype.setWithPriority=function(e,t,n,o){var a=this;this.de(”set“,{path:”“+e,value:t,priority:n});var s=this.generateServerValues(),u=i.nodeFromJSON(t,n),l=r.resolveDeferredValueSnapshot(u,s),c=this.pe(),p=this.ue.applyUserOverwrite(e,l,c,!0);this.K.queueEvents(p),this.Z.put(”“+e,u.val(!0),function(t,n){var r=”ok“===t;r||h.warn(”set at “e
” failed: “+t);var i=a.ue.ackUserWrite(c,!r);a.K.raiseEventsForChangedPath(e,i),a.callOnCompleteCallback(o,t,n)});var d=this.fe(e);this.le(d),this.K.raiseEventsForChangedPath(d,[])},e.prototype.update=function(e,t,n){var o=this;this.de(”update“,{path:”“+e,value:t});var a=!0,s=this.generateServerValues(),u={};if(c.forEach(t,function(e,t){a=!1;var n=i.nodeFromJSON(t);u=r.resolveDeferredValueSnapshot(n,s)}),a)h.log(”update() called with empty data. Don't do anything.“),this.callOnCompleteCallback(n,”ok“);else{var l=this.pe(),p=this.ue.applyUserMerge(e,u,l);this.K.queueEvents(p),this.Z.merge(”“+e,t,function(t,r){var i=”ok“===t;i||h.warn(”update at “e
” failed: “+t);var a=o.ue.ackUserWrite(l,!i),s=a.length>0?o.le(e):e;o.K.raiseEventsForChangedPath(s,a),o.callOnCompleteCallback(n,t,r)}),c.forEach(t,function(t){var n=o.fe(e.child(t));o.le(n)}),this.K.raiseEventsForChangedPath(e,[])}},e.prototype.ce=function(){var e=this;this.de(”onDisconnectEvents“);var t=this.generateServerValues(),n=r.resolveDeferredValueTree(this.z,t),i=[];n.forEachTree(o.Path.Empty,function(t,n){i=i.concat(e.ue.applyServerOverwrite(t,n));var r=e.fe(t);e.le®}),this.z=new a.SparseSnapshotTree,this.K.raiseEventsForChangedPath(o.Path.Empty,i)},e.prototype.onDisconnectCancel=function(e,t){var n=this;this.Z.onDisconnectCancel(”“+e,function(r,i){”ok“===r&&n.z.forget(e),n.callOnCompleteCallback(t,r,i)})},e.prototype.onDisconnectSet=function(e,t,n){var r=this,o=i.nodeFromJSON(t);this.Z.onDisconnectPut(”“+e,o.val(!0),function(t,i){”ok“===t&&r.z.remember(e,o),r.callOnCompleteCallback(n,t,i)})},e.prototype.onDisconnectSetWithPriority=function(e,t,n,r){var o=this,a=i.nodeFromJSON(t,n);this.Z.onDisconnectPut(”“+e,a.val(!0),function(t,n){”ok“===t&&o.z.remember(e,a),o.callOnCompleteCallback(r,t,n)})},e.prototype.onDisconnectUpdate=function(e,t,n){var r=this;if(c.isEmpty(t))return h.log(”onDisconnect().update() called with empty data. Don't do anything.“),void this.callOnCompleteCallback(n,”ok“);this.Z.onDisconnectMerge(”“+e,t,function(o,a){”ok“===o&&c.forEach(t,function(t,n){var o=i.nodeFromJSON(n);r.z.remember(e.child(t),o)}),r.callOnCompleteCallback(n,o,a)})},e.prototype.addEventCallbackForQuery=function(e,t){var n;n=”.info“===e.path.getFront()?this.ae.addEventRegistration(e,t):this.ue.addEventRegistration(e,t),this.K.raiseEventsAtPath(e.path,n)},e.prototype.removeEventCallbackForQuery=function(e,t){var n;n=”.info“===e.path.getFront()?this.ae.removeEventRegistration(e,t):this.ue.removeEventRegistration(e,t),this.K.raiseEventsAtPath(e.path,n)},e.prototype.interrupt=function(){this.J&&this.J.interrupt(”repo_interrupt“)},e.prototype.resume=function(){this.J&&this.J.resume(”repo_interrupt“)},e.prototype.stats=function(e){if(void 0===e&&(e=!1),”undefined“!=typeof console){var t;e?(this.G||(this.G=new _.StatsListener(this.$)),t=this.G.get()):t=this.$.get();var n=Object.keys(t).reduce(function(e,t){return Math.max(t.length,e)},0);c.forEach(t,function(e,t){for(var r=e.length;r<n+2;r++)e+=” “;console.log(e+t)})}},e.prototype.statsIncrementCounter=function(e){this.$.incrementCounter(e),this.re.includeStat(e)},e.prototype.de=function(){for(var e=[],t=0;te.app.name
”(“e.H
”) has already been deleted.“),e.interrupt(),delete t},e.prototype.createRepo=function(e,t){var n=r.safeGet(this.Te,t.name);n||(n={},this.Te=n);var a=r.safeGet(n,e.toURLString());return a&&o.fatal(”Database initialized multiple times. Please make sure the format of the database URL matches with each database() call.“),a=new i.Repo(e,this.we,t),n=a,a},e.prototype.forceRestClient=function(e){this.we=e},e}();t.RepoManager=l},,,,,,function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(1),i=n(33),o=n(2),a=n(21),s=n(18),u=n(26),l=n(0),h=n(7),c=function(){function e(e){this.Ie=e,e instanceof s.Repo||r.fatal(”Don't call new Database() directly - please use firebase.database().“),this.B=new a.Reference(e,o.Path.Empty),this.INTERNAL=new p(this)}return Object.defineProperty(e.prototype,”app“,{get:function(){return this.Ie.app},enumerable:!0,configurable:!0}),e.prototype.ref=function(e){return this.Re(”ref“),l.validateArgCount(”database.ref“,0,1,arguments.length),void 0!==e?this.B.child(e):this.B},e.prototype.refFromURL=function(e){var t=”database.refFromURL“;this.Re(t),l.validateArgCount(t,1,1,arguments.length);var n=i.parseRepoInfo(e);h.validateUrl(t,1,n);var o=n.repoInfo;return o.host!==this.Ie.H.host&&r.fatal(t+”: Host name does not match the current database: (found “o.host
” but expected “this.Ie.H.host
”)“),this.ref(”“+n.path)},e.prototype.Re=function(e){null===this.Ie&&r.fatal(”Cannot call “e
” on a deleted database.“)},e.prototype.goOffline=function(){l.validateArgCount(”database.goOffline“,0,0,arguments.length),this.Re(”goOffline“),this.Ie.interrupt()},e.prototype.goOnline=function(){l.validateArgCount(”database.goOnline“,0,0,arguments.length),this.Re(”goOnline“),this.Ie.resume()},e.ServerValue={TIMESTAMP:{”.sv“:”timestamp“}},e}();t.Database=c;var p=function(){function e(e){this.database=e}return e.prototype.delete=function(){return this.database.Re(”delete“),u.RepoManager.getInstance().deleteRepo(this.database.Ie),this.database.Ie=null,this.database.B=null,this.database.INTERNAL=null,this.database=null,Promise.resolve()},e}();t.DatabaseInternals=p},function(e,t,n){”use strict“;function r(e){for(var t=”“,n=e.split(”/“),r=0;rthis.internalHost
”/.ws?“;else{if(e!==a.LONG_POLLING)throw Error(”Unknown connection type: “+e);n=(this.secure?”“:”http://“)this.internalHost
”/.lp?“}this.needsQueryParam()&&(t.ns=this.namespace);var o=[];return i.forEach(t,function(e,t){o.push(e+”=“+t)}),n+o.join(”&“)},e.prototype.toString=function(){var e=this.toURLString();return this.persistenceKey&&(e+=”<“this.persistenceKey
”>“),e},e.prototype.toURLString=function(){return(this.secure?”“:”http://“)+this.host},e}();t.RepoInfo=s},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(7),o=n(1),a=n(0),s=function(){function e(e,t){this.Ie=e,this.Oe=t}return e.prototype.cancel=function(e){r.validateArgCount(”OnDisconnect.cancel“,0,1,arguments.length),r.validateCallback(”OnDisconnect.cancel“,1,e,!0);var t=new a.Deferred;return this.Ie.onDisconnectCancel(this.Oe,t.wrapCallback(e)),t.promise},e.prototype.remove=function(e){r.validateArgCount(”OnDisconnect.remove“,0,1,arguments.length),i.validateWritablePath(”OnDisconnect.remove“,this.Oe),r.validateCallback(”OnDisconnect.remove“,1,e,!0);var t=new a.Deferred;return this.Ie.onDisconnectSet(this.Oe,null,t.wrapCallback(e)),t.promise},e.prototype.set=function(e,t){r.validateArgCount(”OnDisconnect.set“,1,2,arguments.length),i.validateWritablePath(”OnDisconnect.set“,this.Oe),i.validateFirebaseDataArg(”OnDisconnect.set“,1,e,this.Oe,!1),r.validateCallback(”OnDisconnect.set“,2,t,!0);var n=new a.Deferred;return this.Ie.onDisconnectSet(this.Oe,e,n.wrapCallback(t)),n.promise},e.prototype.setWithPriority=function(e,t,n){r.validateArgCount(”OnDisconnect.setWithPriority“,2,3,arguments.length),i.validateWritablePath(”OnDisconnect.setWithPriority“,this.Oe),i.validateFirebaseDataArg(”OnDisconnect.setWithPriority“,1,e,this.Oe,!1),i.validatePriority(”OnDisconnect.setWithPriority“,2,t,!1),r.validateCallback(”OnDisconnect.setWithPriority“,3,n,!0);var o=new a.Deferred;return this.Ie.onDisconnectSetWithPriority(this.Oe,e,t,o.wrapCallback(n)),o.promise},e.prototype.update=function(e,t){if(r.validateArgCount(”OnDisconnect.update“,1,2,arguments.length),i.validateWritablePath(”OnDisconnect.update“,this.Oe),Array.isArray(e)){for(var n={},s=0;sl.id
”:“),l.ze={},l.Je={},l.$e=[],l.Ze=0,l.et=,l.tt=!1,l.nt=v,l.rt=g,l.it=null,l.lastSessionId=null,l.ot=null,l.at=!1,l.st={},l.ut=0,l.lt=null,l.ht=null,l.ct=!1,l.pt=0,l.dt=!0,l.ft=null,l._t=null,s&&!_.isNodeSdk())throw Error(”Auth override specified in options, but not supported on non Node.js platforms“);return l.yt(0),h.VisibilityMonitor.getInstance().on(”visible“,l.vt,l),-1===n.host.indexOf(”fblocal“)&&c.OnlineMonitor.getInstance().on(”online“,l.gt,l),l}return r(t,e),t.prototype.sendRequest=function(e,t,n){var r=++this.ut,i={r:r,a:e,b:t};this.de(a.stringify(i)),s.assert(this.tt,”sendRequest call when we're not connected not allowed.“),this.lt.sendRequest(i),n&&(this.st=n)},t.prototype.listen=function(e,t,n,r){var i=e.queryIdentifier(),o=”“+e.path;this.de(”Listen called for “o
” “+i),this.Je=this.Je||{},s.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),”listen() called for non-default but complete query“),s.assert(!this.Je[i],”listen() called twice for same path/queryId.“);var a={onComplete:r,hashFn:t,query:e,tag:n};this.Je[i]=a,this.tt&&this.mt(a)},t.prototype.mt=function(e){var n=this,r=e.query,i=”“+r.path,o=r.queryIdentifier();this.de(”Listen on “i
” for “+o);var a={p:i};e.tag&&(a.q=r.queryObject(),a.t=e.tag),a.h=e.hashFn(),this.sendRequest(”q“,a,function(a){var s=a.d,u=a.s;t.Ct(s,r),(n.Je&&n.Je[o])===e&&(n.de(”listen response“,a),”ok“!==u&&n.Et(i,o),e.onComplete&&e.onComplete(u,s))})},t.Ct=function(e,t){if(e&&”object“==typeof e&&o.contains(e,”w“)){var n=o.safeGet(e,”w“);if(Array.isArray(n)&&~n.indexOf(”no_index“)){var r='”.indexOn“: ”'+t.getQueryParams().getIndex()+'“',i=”“+t.path;u.warn(”Using an unspecified index. Your data will be downloaded and filtered on the client. Consider adding “r
” at “i
” to your security rules for better performance.“)}}},t.prototype.refreshAuthToken=function(e){this.ht=e,this.de(”Auth token refreshed“),this.ht?this.tryAuth():this.tt&&this.sendRequest(”unauth“,{},function(){}),this.Nt(e)},t.prototype.Nt=function(e){(e&&40===e.length||p.isAdmin(e))&&(this.de(”Admin auth credential detected. Reducing max reconnect time.“),this.rt=3e4)},t.prototype.tryAuth=function(){var e=this;if(this.tt&&this.ht){var t=this.ht,n=p.isValidFormat(t)?”auth“:”gauth“,r={cred:t};null===this.Ye?r.noauth=!0:”object“==typeof this.Ye&&(r.authvar=this.Ye),this.sendRequest(n,r,function(n){var r=n.s,i=n.d||”error“;e.ht===t&&(”ok“===r?e.pt=0:e.Pt(r,i))})}},t.prototype.unlisten=function(e,t){var n=”“+e.path,r=e.queryIdentifier();this.de(”Unlisten called for “n
” “+r),s.assert(e.getQueryParams().isDefault()||!e.getQueryParams().loadsAllData(),”unlisten() called for non-default but complete query“),this.Et(n,r)&&this.tt&&this.bt(n,r,e.queryObject(),t)},t.prototype.bt=function(e,t,n,r){this.de(”Unlisten on “e
” for “+t);var i={p:e};r&&(i.q=n,i.t=r),this.sendRequest(”n“,i)},t.prototype.onDisconnectPut=function(e,t,n){this.tt?this.St(”o“,e,t,n):this.et.push({pathString:e,action:”o“,data:t,onComplete:n})},t.prototype.onDisconnectMerge=function(e,t,n){this.tt?this.St(”om“,e,t,n):this.et.push({pathString:e,action:”om“,data:t,onComplete:n})},t.prototype.onDisconnectCancel=function(e,t){this.tt?this.St(”oc“,e,null,t):this.et.push({pathString:e,action:”oc“,data:null,onComplete:t})},t.prototype.St=function(e,t,n,r){var i={p:t,d:n};this.de(”onDisconnect “+e,i),this.sendRequest(e,i,function(e){r&&setTimeout(function(){r(e.s,e.d)},Math.floor(0))})},t.prototype.put=function(e,t,n,r){this.putInternal(”p“,e,t,n,r)},t.prototype.merge=function(e,t,n,r){this.putInternal(”m“,e,t,n,r)},t.prototype.putInternal=function(e,t,n,r,i){var o={p:t,d:n};void 0!==i&&(o.h=i),this.$e.push({action:e,request:o,onComplete:r}),this.Ze++;var a=this.$e.length-1;this.tt?this.Tt(a):this.de(”Buffering put: “+t)},t.prototype.Tt=function(e){var t=this,n=this.$e.action,r=this.$e.request,i=this.$e.onComplete;this.$e.queued=this.tt,this.sendRequest(n,r,function®{t.de(n+” response“,r),delete t.$e,t.Ze–,0===t.Ze&&(t.$e=[]),i&&i(r.s,r.d)})},t.prototype.reportStats=function(e){var t=this;if(this.tt){var n={c:e};this.de(”reportStats“,n),this.sendRequest(”s“,n,function(e){if(”ok“!==e.s){var n=e.d;t.de(”reportStats“,”Error sending stats: “+n)}})}},t.prototype.wt=function(e){if(”r“in e){this.de(”from server: “+a.stringify(e));var t=e.r,n=this.st;n&&(delete this.st,n(e.b))}else{if(”error“in e)throw”A server-side error has occurred: “+e.error;”a“in e&&this.It(e.a,e.b)}},t.prototype.It=function(e,t){this.de(”handleServerMessage“,e,t),”d“===e?this.ee(t.p,t.d,!1,t.t):”m“===e?this.ee(t.p,t.d,!0,t.t):”c“===e?this.Rt(t.p,t.q):”ac“===e?this.Pt(t.s,t.d):”sd“===e?this.Ot(t):u.error(”Unrecognized action received from server: “+a.stringify(e)+”nAre you using the latest client?“)},t.prototype.At=function(e,t){this.de(”connection ready“),this.tt=!0,this._t=(new Date).getTime(),this.Dt(e),this.lastSessionId=t,this.dt&&this.Mt(),this.Lt(),this.dt=!1,this.te(!0)},t.prototype.yt=function(e){var t=this;s.assert(!this.lt,”Scheduling a connect when we're already connected/ing?“),this.ot&&clearTimeout(this.ot),this.ot=setTimeout(function(){t.ot=null,t.Ft()},Math.floor(e))},t.prototype.vt=function(e){e&&!this.at&&this.nt===this.rt&&(this.de(”Window became visible. Reducing delay.“),this.nt=v,this.lt||this.yt(0)),this.at=e},t.prototype.gt=function(e){e?(this.de(”Browser went online.“),this.nt=v,this.lt||this.yt(0)):(this.de(”Browser went offline. Killing connection.“),this.lt&&this.lt.close())},t.prototype.xt=function(){if(this.de(”data client disconnected“),this.tt=!1,this.lt=null,this.kt(),this.st={},this.Wt()){if(this.at){if(this._t){var e=(new Date).getTime()-this._t;e>3e4&&(this.nt=v),this._t=null}}else this.de(”Window isn't visible. Delaying reconnect.“),this.nt=this.rt,this.ft=(new Date).getTime();var t=(new Date).getTime()-this.ft,n=Math.max(0,this.nt-t);n=Math.random()*n,this.de(”Trying to reconnect in “n
”ms“),this.yt(n),this.nt=Math.min(this.rt,1.3*this.nt)}this.te(!1)},t.prototype.Ft=function(){if(this.Wt()){this.de(”Making a connection attempt“),this.ft=(new Date).getTime(),this._t=null;var e=this.wt.bind(this),n=this.At.bind(this),r=this.xt.bind(this),i=this.id+”:“t.jt+
,o=this,a=this.lastSessionId,l=!1,h=null,c=function(){h?h.close():(l=!0,r())},p=function(e){s.assert(h,”sendRequest call when we're not connected not allowed.“),h.sendRequest(e)};this.lt={close:c,sendRequest:p};var _=this.ct;this.ct=!1,this.Ke.getToken(_).then(function(t){l?u.log(”getToken() completed but was canceled“):(u.log(”getToken() completed. Creating connection.“),o.ht=t&&t.accessToken,h=new d.Connection(i,o.H,e,n,r,function(e){u.warn(e+” (“o.H
”)“),o.interrupt(”server_kill“)},a))}).then(null,function(e){o.de(”Failed to get token: “+e),l||(f.CONSTANTS.NODE_ADMIN&&u.warn(e),c())})}},t.prototype.interrupt=function(e){u.log(”Interrupting connection for reason: “+e),this.ze=!0,this.lt?this.lt.close():(this.ot&&(clearTimeout(this.ot),this.ot=null),this.tt&&this.xt())},t.prototype.resume=function(e){u.log(”Resuming connection for reason: “+e),delete this.ze,o.isEmpty(this.ze)&&(this.nt=v,this.lt||this.yt(0))},t.prototype.Dt=function(e){var t=e-(new Date).getTime();this.ne({serverTimeOffset:t})},t.prototype.kt=function(){for(var e=0;e<this.$e.length;e++){var t=this.$e;t&&”h“in t.request&&t.queued&&(t.onComplete&&t.onComplete(”disconnect“),delete this.$e,this.Ze–)}0===this.Ze&&(this.$e=[])},t.prototype.Rt=function(e,t){var n;n=t?t.map(function(e){return u.ObjectToUniqueKey(e)}).join(”$“):”default“;var r=this.Et(e,n);r&&r.onComplete&&r.onComplete(”permission_denied“)},t.prototype.Et=function(e,t){var n,r=”“+new l.Path(e);return void 0!==this.Je?(n=this.Je[t],delete this.Je[t],0===o.getCount(this.Je)&&delete this.Je):n=void 0,n},t.prototype.Pt=function(e,t){u.log(”Auth token revoked: “e
”/“+t),this.ht=null,this.ct=!0,this.lt.close(),”invalid_token“!==e&&”permission_denied“!==e||++this.pt>=3&&(this.nt=3e4,this.Ke.notifyForInvalidToken())},t.prototype.Ot=function(e){this.it?this.it(e):”msg“in e&&”undefined“!=typeof console&&console.log(”FIREBASE: “+e.msg.replace(”n“,”nFIREBASE: “))},t.prototype.Lt=function(){var e=this;this.tryAuth(),o.forEach(this.Je,function(t,n){o.forEach(n,function(t,n){e.mt(n)})});for(var t=0;tt
”.“+i.default.SDK_VERSION.replace(/./g,”-“)]=1,_.isMobileCordova()?e=1:_.isReactNative()&&(e=1),this.reportStats(e)},t.prototype.Wt=function(){var e=c.OnlineMonitor.getInstance().currentlyOnline();return o.isEmpty(this.ze)&&e},t.Xe=0,t.jt=0,t}(y.ServerActions);t.PersistentConnection=m},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=function(){function e(e){this.Vt=e,this.Qt={},r.assert(Array.isArray(e)&&e.length>0,”Requires a non-empty array“)}return e.prototype.trigger=function(e){for(var t=[],n=1;nthis.id
”:“),this.Gt=new a.TransportManager(t),this.de(”Connection created“),this.Kt()}return e.prototype.Kt=function(){var e=this,t=this.Gt.initialTransport();this.Yt=new t(this.Xt(),this.H,void 0,this.lastSessionId),this.zt=t.responsesRequiredToBeHealthy||0;var n=this.Jt(this.Yt),i=this.$t(this.Yt);this.Zt=this.Yt,this.en=this.Yt,this.tn=null,this.nn=!1,setTimeout(function(){e.Yt&&e.Yt.open(n,i)},Math.floor(0));var o=t.healthyTimeout||0;o>0&&(this.rn=r.setTimeoutNonBlocking(function(){e.rn=null,e.nn||(e.Yt&&e.Yt.bytesReceived>102400?(e.de(”Connection exceeded healthy timeout but has received “e.Yt.bytesReceived
” bytes. Marking connection healthy.“),e.nn=!0,e.Yt.markConnectionHealthy()):e.Yt&&e.Yt.bytesSent>10240?e.de(”Connection exceeded healthy timeout but has sent “e.Yt.bytesSent
” bytes. Leaving connection alive.“):(e.de(”Closing unhealthy connection after timeout.“),e.close()))},Math.floor(o)))},e.prototype.Xt=function(){return”c:“this.id
”:“this.connectionCount+
},e.prototype.$t=function(e){var t=this;return function(n){e===t.Yt?t.in(n):e===t.tn?(t.de(”Secondary connection lost.“),t.an()):t.de(”closing an old connection“)}},e.prototype.Jt=function(e){var t=this;return function(n){2!=t.Ht&&(e===t.en?t.sn(n):e===t.tn?t.un(n):t.de(”message on old connection“))}},e.prototype.sendRequest=function(e){var t={t:”d“,d:e};this.ln(t)},e.prototype.tryCleanupConnection=function(){this.Zt===this.tn&&this.en===this.tn&&(this.de(”cleaning up and promoting a connection: “+this.tn.connId),this.Yt=this.tn,this.tn=null)},e.prototype.hn=function(e){if(”t“in e){var t=e.t;”a“===t?this.cn():”r“===t?(this.de(”Got a reset on secondary, closing it“),this.tn.close(),this.Zt!==this.tn&&this.en!==this.tn||this.close()):”o“===t&&(this.de(”got pong on secondary.“),this.pn–,this.cn())}},e.prototype.un=function(e){var t=r.requireKey(”t“,e),n=r.requireKey(”d“,e);if(”c“==t)this.hn(n);else{if(”d“!=t)throw Error(”Unknown protocol layer: “+t);this.pendingDataMessages.push(n)}},e.prototype.cn=function(){this.pn<=0?(this.de(”Secondary connection is healthy.“),this.nn=!0,this.tn.markConnectionHealthy(),this.dn()):(this.de(”sending ping on secondary.“),this.tn.send({t:”c“,d:{t:”p“,d:{}}}))},e.prototype.dn=function(){this.tn.start(),this.de(”sending client ack on secondary“),this.tn.send({t:”c“,d:{t:”a“,d:{}}}),this.de(”Ending transmission on primary“),this.Yt.send({t:”c“,d:{t:”n“,d:{}}}),this.Zt=this.tn,this.tryCleanupConnection()},e.prototype.sn=function(e){var t=r.requireKey(”t“,e),n=r.requireKey(”d“,e);”c“==t?this.fn(n):”d“==t&&this.wt(n)},e.prototype.wt=function(e){this._n(),this.Ut(e)},e.prototype._n=function(){this.nn||–this.zt<=0&&(this.de(”Primary connection is healthy.“),this.nn=!0,this.Yt.markConnectionHealthy())},e.prototype.fn=function(e){var t=r.requireKey(”t“,e);if(”d“in e){var n=e.d;if(”h“===t)this.yn(n);else if(”n“===t){this.de(”recvd end transmission on primary“),this.en=this.tn;for(var i=0;idocument.domain
'“;</script>');var h=”<html><body>“u
”</body></html>“;try{this.myIFrame.doc.open(),this.myIFrame.doc.write(h),this.myIFrame.doc.close()}catch(e){r.log(”frame writing exception“),e.stack&&r.log(e.stack),r.log(e)}}}return e.Dn=function(){var e=document.createElement(”iframe“);if(e.style.display=”none“,!document.body)throw”Document body has not initialized. Wait to initialize Firebase until after the document is ready.“;document.body.appendChild(e);try{e.contentWindow.document||r.log(”No IE domain setting required“)}catch(n){var t=document.domain;e.src=”javascript:void((function(){document.open();document.domain='“t
”';document.close();})())“}return e.contentDocument?e.doc=e.contentDocument:e.contentWindow?e.doc=e.contentWindow.document:e.document&&(e.doc=e.document),e},e.prototype.close=function(){var n=this;if(this.alive=!1,this.myIFrame&&(this.myIFrame.doc.body.innerHTML=”“,setTimeout(function(){null!==n.myIFrame&&(document.body.removeChild(n.myIFrame),n.myIFrame=null)},Math.floor(0))),l.isNodeSdk()&&this.myID){var r={};r=”t“,r=this.myID,r=this.myPW;var i=this.urlFn®;e.nodeRestRequest(i)}var o=this.onDisconnect;o&&(this.onDisconnect=null,o())},e.prototype.startLongPoll=function(e,t){for(this.myID=e,this.myPW=t,this.alive=!0;this.Mn(););},e.prototype.Mn=function(){if(this.alive&&this.sendNewPolls&&this.outstandingRequests.count()<(this.pendingSegs.length>0?2:1)){this.currentSerial++;var e={};e=this.myID,e=this.myPW,e=this.currentSerial;for(var n=this.urlFn(e),r=”“,i=0;this.pendingSegs.length>0&&this.pendingSegs.d.length+30+r.length<=1870;){var o=this.pendingSegs.shift();r=r+”&“+t.FIREBASE_LONGPOLL_SEGMENT_NUM_PARAM+i+”=“o.seg
”&“+t.FIREBASE_LONGPOLL_SEGMENTS_IN_PACKET+i+”=“o.ts
”&“+t.FIREBASE_LONGPOLL_DATA_PARAM+i+”=“+o.d,i++}return n+=r,this.Ln(n,this.currentSerial),!0}return!1},e.prototype.enqueueSegment=function(e,t,n){this.pendingSegs.push({seg:e,ts:t,d:n}),this.alive&&this.Mn()},e.prototype.Ln=function(e,t){var n=this;this.outstandingRequests.add(t,1);var r=function(){n.outstandingRequests.remove(t),n.Mn()},i=setTimeout(r,Math.floor(25e3)),o=function(){clearTimeout(i),r()};this.addTag(e,o)},e.prototype.addTag=function(e,t){var n=this;l.isNodeSdk()?this.doNodeLongPoll(e,t):setTimeout(function(){try{if(!n.sendNewPolls)return;var i=n.myIFrame.doc.createElement(”script“);i.type=”text/javascript“,i.async=!0,i.src=e,i.onload=i.onreadystatechange=function(){var e=i.readyState;e&&”loaded“!==e&&”complete“!==e||(i.onload=i.onreadystatechange=null,i.parentNode&&i.parentNode.removeChild(i),t())},i.onerror=function(){r.log(”Long-poll script failed to load: “+e),n.sendNewPolls=!1,n.close()},n.myIFrame.doc.body.appendChild(i)}catch(e){}},Math.floor(1))},e}();t.FirebaseIFrameScriptHolder=c},function(e,t,n){”use strict“;(function(e){function r(e){d=e}Object.defineProperty(t,”__esModule“,{value:!0});var i=n(6),o=n(0),a=n(1),s=n(25),u=n(14),l=n(0),h=n(13),c=n(0),p=n(0),d=null;”undefined“!=typeof MozWebSocket?d=MozWebSocket:”undefined“!=typeof WebSocket&&(d=WebSocket),t.setWebSocketImpl=r;var f=function(){function t(e,n,r,i){this.connId=e,this.keepaliveTimer=null,this.frames=null,this.totalFrames=0,this.bytesSent=0,this.bytesReceived=0,this.de=a.logWrapper(this.connId),this.$=s.StatsManager.getCollection(n),this.connURL=t.Fn(n,r,i)}return t.Fn=function(e,t,n){var r={};return r=u.PROTOCOL_VERSION,!p.isNodeSdk()&&”undefined“!=typeof location&&location.href&&-1!==location.href.indexOf(u.FORGE_DOMAIN)&&(r=u.FORGE_REF),t&&(r=t),n&&(r=n),e.connectionURL(u.WEBSOCKET,r)},t.prototype.open=function(t,n){var r=this;this.onDisconnect=n,this.onMessage=t,this.de(”Websocket connecting to “+this.connURL),this.bn=!1,h.PersistentStorage.set(”previous_websocket_failure“,!0);try{if(p.isNodeSdk()){var o=l.CONSTANTS.NODE_ADMIN?”AdminNode“:”Node“,a={headers:{”User-Agent“:”Firebase/“u.PROTOCOL_VERSION
”/“i.default.SDK_VERSION
”/“e.platform
”/“+o}},s=e.env,c=0==this.connURL.indexOf(”wss://“)?s.HTTPS_PROXY||s.https_proxy:s.HTTP_PROXY||s.http_proxy;c&&(a.proxy={origin:c}),this.mySock=new d(this.connURL,[],a)}else this.mySock=new d(this.connURL)}catch(e){this.de(”Error instantiating WebSocket.“);var f=e.message||e.data;return f&&this.de(f),void this.wn()}this.mySock.onopen=function(){r.de(”Websocket connected.“),r.bn=!0},this.mySock.onclose=function(){r.de(”Websocket connection was disconnected.“),r.mySock=null,r.wn()},this.mySock.onmessage=function(e){r.handleIncomingFrame(e)},this.mySock.onerror=function(e){r.de(”WebSocket error. Closing connection.“);var t=e.message||e.data;t&&r.de(t),r.wn()}},t.prototype.start=function(){},t.forceDisallow=function(){t.On=!0},t.isAvailable=function(){var e=!1;if(”undefined“!=typeof navigator&&navigator.userAgent){var n=/Android ([0-9]{0,}.[0-9]{0,})/,r=navigator.userAgent.match(n);r&&r.length>1&&parseFloat(r)<4.4&&(e=!0)}return!e&&null!==d&&!t.On},t.previouslyFailed=function(){return h.PersistentStorage.isInMemoryStorage||!0===h.PersistentStorage.get(”previous_websocket_failure“)},t.prototype.markConnectionHealthy=function(){h.PersistentStorage.remove(”previous_websocket_failure“)},t.prototype.xn=function(e){if(this.frames.push(e),this.frames.length==this.totalFrames){var t=this.frames.join(”“);this.frames=null;var n=c.jsonEval(t);this.onMessage(n)}},t.prototype.kn=function(e){this.totalFrames=e,this.frames=[]},t.prototype.Wn=function(e){if(o.assert(null===this.frames,”We already have a frame buffer“),e.length<=6){var t=+e;if(!isNaN(t))return this.kn(t),null}return this.kn(1),e},t.prototype.handleIncomingFrame=function(e){if(null!==this.mySock){var t=e.data;if(this.bytesReceived+=t.length,this.$.incrementCounter(”bytes_received“,t.length),this.resetKeepAlive(),null!==this.frames)this.xn(t);else{var n=this.Wn(t);null!==n&&this.xn(n)}}},t.prototype.send=function(e){this.resetKeepAlive();var t=c.stringify(e);this.bytesSent+=t.length,this.$.incrementCounter(”bytes_sent“,t.length);var n=a.splitStringBySize(t,16384);n.length>1&&this.jn(n.length+”“);for(var r=0;rthis.eventType
”:“+r.stringify(this.snapshot.exportVal())},e}();t.DataEvent=i;var o=function(){function e(e,t,n){this.eventRegistration=e,this.error=t,this.path=n}return e.prototype.getPath=function(){return this.path},e.prototype.getEventType=function(){return”cancel“},e.prototype.getEventRunner=function(){return this.eventRegistration.getEventRunner(this)},e.prototype.toString=function(){return this.path+”:cancel“},e}();t.CancelEvent=o},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(1),o=n(87),a=n(4),s=n(0),u=n(23),l=n(88),h=n(89),c=n(8),p=n(46),d=n(2),f=n(47),_=n(95),y=function(){function e(e){this.Zn=e,this.er=u.ImmutableTree.Empty,this.tr=new _.WriteTree,this.nr={},this.rr={}}return e.prototype.applyUserOverwrite=function(e,t,n,r){return this.tr.addOverwrite(e,t,n,r),r?this.ir(new p.Overwrite(c.OperationSource.User,e,t)):[]},e.prototype.applyUserMerge=function(e,t,n){this.tr.addMerge(e,t,n);var r=u.ImmutableTree.fromObject(t);return this.ir(new h.Merge(c.OperationSource.User,e,r))},e.prototype.ackUserWrite=function(e,t){void 0===t&&(t=!1);var n=this.tr.getWrite(e);if(this.tr.removeWrite(e)){var r=u.ImmutableTree.Empty;return null!=n.snap?r=r.set(d.Path.Empty,!0):s.forEach(n.children,function(e,t){r=r.set(new d.Path(e),t)}),this.ir(new o.AckUserWrite(n.path,r,t))}return[]},e.prototype.applyServerOverwrite=function(e,t){return this.ir(new p.Overwrite(c.OperationSource.Server,e,t))},e.prototype.applyServerMerge=function(e,t){var n=u.ImmutableTree.fromObject(t);return this.ir(new h.Merge(c.OperationSource.Server,e,n))},e.prototype.applyListenComplete=function(e){return this.ir(new l.ListenComplete(c.OperationSource.Server,e))},e.prototype.applyTaggedQueryOverwrite=function(t,n,r){var i=this.or®;if(null!=i){var o=e.ar(i),a=o.path,s=o.queryId,u=d.Path.relativePath(a,t),l=new p.Overwrite(c.OperationSource.forServerTaggedQuery(s),u,n);return this.sr(a,l)}return[]},e.prototype.applyTaggedQueryMerge=function(t,n,r){var i=this.or®;if(i){var o=e.ar(i),a=o.path,s=o.queryId,l=d.Path.relativePath(a,t),p=u.ImmutableTree.fromObject(n),f=new h.Merge(c.OperationSource.forServerTaggedQuery(s),l,p);return this.sr(a,f)}return[]},e.prototype.applyTaggedListenComplete=function(t,n){var r=this.or(n);if®{var i=e.ar®,o=i.path,a=i.queryId,s=d.Path.relativePath(o,t),u=new l.ListenComplete(c.OperationSource.forServerTaggedQuery(a),s);return this.sr(o,u)}return[]},e.prototype.addEventRegistration=function(t,n){var i=t.path,o=null,s=!1;this.er.foreachOnPath(i,function(e,t){var n=d.Path.relativePath(e,i);o=o||t.getCompleteServerCache(n),s=s||t.hasCompleteView()});var u=this.er.get(i);u?(s=s||u.hasCompleteView(),o=o||u.getCompleteServerCache(d.Path.Empty)):(u=new f.SyncPoint,this.er=this.er.set(i,u));var l;null!=o?l=!0:(l=!1,o=a.ChildrenNode.EMPTY_NODE,this.er.subtree(i).foreachChild(function(e,t){var n=t.getCompleteServerCache(d.Path.Empty);n&&(o=o.updateImmediateChild(e,n))}));var h=u.viewExistsForQuery(t);if(!h&&!t.getQueryParams().loadsAllData()){var c=e.ur(t);r.assert(!(c in this.rr),”View does not exist, but we have a tag“);var p=e.lr();this.rr=p,this.nr=c}var _=this.tr.childWrites(i),y=u.addEventRegistration(t,n,_,o,l);if(!h&&!s){var v=u.viewForQuery(t);y=y.concat(this.hr(t,v))}return y},e.prototype.removeEventRegistration=function(t,n,r){var i=this,o=t.path,a=this.er.get(o),s=[];if(a&&(”default“===t.queryIdentifier()||a.viewExistsForQuery(t))){var u=a.removeEventRegistration(t,n,r);a.isEmpty()&&(this.er=this.er.remove(o));var l=u.removed;s=u.events;var h=-1!==l.findIndex(function(e){return e.getQueryParams().loadsAllData()}),c=this.er.findOnPath(o,function(e,t){return t.hasCompleteView()});if(h&&!c){var p=this.er.subtree(o);if(!p.isEmpty())for(var d=this.cr(p),f=0;f<d.length;++f){var _=d,y=_.getQuery(),v=this.pr(_);this.Zn.startListening(e.dr(y),this.fr(y),v.hashFn,v.onComplete)}}!c&&l.length>0&&!r&&(h?this.Zn.stopListening(e.dr(t),null):l.forEach(function(t){var n=i.rr;i.Zn.stopListening(e.dr(t),n)})),this._r(l)}return s},e.prototype.calcCompleteEventCache=function(e,t){var n=this.tr,r=this.er.findOnPath(e,function(t,n){var r=d.Path.relativePath(t,e),i=n.getCompleteServerCache®;if(i)return i});return n.calcCompleteEventCache(e,r,t,!0)},e.prototype.cr=function(e){return e.fold(function(e,t,n){if(t&&t.hasCompleteView())return;var r=[];return t&&(r=t.getQueryViews()),s.forEach(n,function(e,t){r=r.concat(t)}),r})},e.prototype._r=function(t){for(var n=0;n<t.length;++n){var r=t;if(!r.getQueryParams().loadsAllData()){var i=e.ur®,o=this.rr;delete this.rr,delete this.nr}}},e.dr=function(e){return e.getQueryParams().loadsAllData()&&!e.getQueryParams().isDefault()?e.getRef():e},e.prototype.hr=function(t,n){var i=t.path,o=this.fr(t),a=this.pr(n),u=this.Zn.startListening(e.dr(t),o,a.hashFn,a.onComplete),l=this.er.subtree(i);if(o)r.assert(!l.value.hasCompleteView(),”If we're adding a query, it shouldn't be shadowed“);else for(var h=l.fold(function(e,t,n){if(!e.isEmpty()&&t&&t.hasCompleteView())return;var r=[];return t&&(r=r.concat(t.getQueryViews().map(function(e){return e.getQuery()}))),s.forEach(n,function(e,t){r=r.concat(t)}),r}),c=0;c<h.length;++c){var p=h;this.Zn.stopListening(e.dr(p),this.fr(p))}return u},e.prototype.pr=function(e){var t=this,n=e.getQuery(),r=this.fr(n);return{hashFn:function(){return(e.getServerCache()||a.ChildrenNode.EMPTY_NODE).hash()},onComplete:function(e){if(”ok“===e)return r?t.applyTaggedListenComplete(n.path,r):t.applyListenComplete(n.path);var o=i.errorForServerCode(e,n);return t.removeEventRegistration(n,null,o)}}},e.ur=function(e){return e.path+”$“+e.queryIdentifier()},e.ar=function(e){var t=e.indexOf(”$“);return r.assert(-1!==t&&t<e.length-1,”Bad queryKey.“),{queryId:e.substr(t+1),path:new d.Path(e.substr(0,t))}},e.prototype.or=function(e){return this.nr},e.prototype.fr=function(t){var n=e.ur(t);return s.safeGet(this.rr,n)},e.lr=function(){return e.yr++},e.prototype.sr=function(e,t){var n=this.er.get(e);r.assert(n,”Missing sync point for query tag that we're tracking“);var i=this.tr.childWrites(e);return n.applyOperation(t,i,null)},e.prototype.ir=function(e){return this.vr(e,this.er,null,this.tr.childWrites(d.Path.Empty))},e.prototype.vr=function(e,t,n,r){if(e.path.isEmpty())return this.gr(e,t,n,r);var i=t.get(d.Path.Empty);null==n&&null!=i&&(n=i.getCompleteServerCache(d.Path.Empty));var o=[],a=e.path.getFront(),s=e.operationForChild(a),u=t.children.get(a);if(u&&s){var l=n?n.getImmediateChild(a):null,h=r.child(a);o=o.concat(this.vr(s,u,l,h))}return i&&(o=o.concat(i.applyOperation(e,r,n))),o},e.prototype.gr=function(e,t,n,r){var i=this,o=t.get(d.Path.Empty);null==n&&null!=o&&(n=o.getCompleteServerCache(d.Path.Empty));var a=[];return t.children.inorderTraversal(function(t,o){var s=n?n.getImmediateChild(t):null,u=r.child(t),l=e.operationForChild(t);l&&(a=a.concat(i.gr(l,o,s,u)))}),o&&(a=a.concat(o.applyOperation(e,r,n))),a},e.yr=1,e}();t.SyncTree=y},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(2),o=n(8),a=function(){function e(e,t,n){this.path=e,this.affectedTree=t,this.revert=n,this.type=o.OperationType.ACK_USER_WRITE,this.source=o.OperationSource.User}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){if(null!=this.affectedTree.value)return r.assert(this.affectedTree.children.isEmpty(),”affectedTree should not have overlapping affected paths.“),this;var n=this.affectedTree.subtree(new i.Path(t));return new e(i.Path.Empty,n,this.revert)}return r.assert(this.path.getFront()===t,”operationForChild called for unrelated child.“),new e(this.path.popFront(),this.affectedTree,this.revert)},e}();t.AckUserWrite=a},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(2),i=n(8),o=function(){function e(e,t){this.source=e,this.path=t,this.type=i.OperationType.LISTEN_COMPLETE}return e.prototype.operationForChild=function(t){return this.path.isEmpty()?new e(this.source,r.Path.Empty):new e(this.source,this.path.popFront())},e}();t.ListenComplete=o},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(8),i=n(46),o=n(2),a=n(0),s=function(){function e(e,t,n){this.source=e,this.path=t,this.children=n,this.type=r.OperationType.MERGE}return e.prototype.operationForChild=function(t){if(this.path.isEmpty()){var n=this.children.subtree(new o.Path(t));return n.isEmpty()?null:n.value?new i.Overwrite(this.source,o.Path.Empty,n.value):new e(this.source,o.Path.Empty,n)}return a.assert(this.path.getFront()===t,”Can't get a merge for a child not on the path of the operation“),new e(this.source,this.path.popFront(),this.children)},e.prototype.toString=function(){return”Operation(“this.path
”: “this.source
” merge: “this.children
”)“},e}();t.Merge=s},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(24),i=n(91),o=n(4),a=n(19),s=n(48),u=n(94),l=n(0),h=n(8),c=n(9),p=n(3),d=function(){function e(e,t){this.mr=e,this.Cr=[];var n=this.mr.getQueryParams(),l=new r.IndexedFilter(n.getIndex()),h=n.getNodeFilter();this.Er=new i.ViewProcessor(h);var c=t.getServerCache(),p=t.getEventCache(),d=l.updateFullNode(o.ChildrenNode.EMPTY_NODE,c.getNode(),null),f=h.updateFullNode(o.ChildrenNode.EMPTY_NODE,p.getNode(),null),_=new a.CacheNode(d,c.isFullyInitialized(),l.filtersNodes()),y=new a.CacheNode(f,p.isFullyInitialized(),h.filtersNodes());this.Nr=new s.ViewCache(y,_),this.Pr=new u.EventGenerator(this.mr)}return e.prototype.getQuery=function(){return this.mr},e.prototype.getServerCache=function(){return this.Nr.getServerCache().getNode()},e.prototype.getCompleteServerCache=function(e){var t=this.Nr.getCompleteServerSnap();return t&&(this.mr.getQueryParams().loadsAllData()||!e.isEmpty()&&!t.getImmediateChild(e.getFront()).isEmpty())?t.getChild(e):null},e.prototype.isEmpty=function(){return 0===this.Cr.length},e.prototype.addEventRegistration=function(e){this.Cr.push(e)},e.prototype.removeEventRegistration=function(e,t){var n=[];if(t){l.assert(null==e,”A cancel should cancel all event registrations.“);var r=this.mr.path;this.Cr.forEach(function(e){t=t;var i=e.createCancelEvent(t,r);i&&n.push(i)})}if(e){for(var i=[],o=0;o<this.Cr.length;++o){var a=this.Cr;if(a.matches(e)){if(e.hasAnyCallback()){i=i.concat(this.Cr.slice(o+1));break}}else i.push(a)}this.Cr=i}else this.Cr=[];return n},e.prototype.applyOperation=function(e,t,n){e.type===h.OperationType.MERGE&&null!==e.source.queryId&&(l.assert(this.Nr.getCompleteServerSnap(),”We should always have a full cache before handling merges“),l.assert(this.Nr.getCompleteEventSnap(),”Missing event cache, even though we have a server cache“));var r=this.Nr,i=this.Er.applyOperation(r,e,t,n);return this.Er.assertIndexed(i.viewCache),l.assert(i.viewCache.getServerCache().isFullyInitialized()||!r.getServerCache().isFullyInitialized(),”Once a server snap is complete, it should never go back“),this.Nr=i.viewCache,this.br(i.changes,i.viewCache.getEventCache().getNode(),null)},e.prototype.getInitialEvents=function(e){var t=this.Nr.getEventCache(),n=[];return t.getNode().isLeafNode()||t.getNode().forEachChild(p.PRIORITY_INDEX,function(e,t){n.push(c.Change.childAddedChange(e,t))}),t.isFullyInitialized()&&n.push(c.Change.valueChange(t.getNode())),this.br(n,t.getNode(),e)},e.prototype.br=function(e,t,n){var r=n?:this.Cr;return this.Pr.generateEventsForChanges(e,t,r)},e}();t.View=d},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(8),i=n(0),o=n(92),a=n(9),s=n(4),u=n(10),l=n(23),h=n(2),c=n(93),p=function(){function e(e,t){this.viewCache=e,this.changes=t}return e}();t.ProcessorResult=p;var d=function(){function e(e){this.Sr=e}return e.prototype.assertIndexed=function(e){i.assert(e.getEventCache().getNode().isIndexed(this.Sr.getIndex()),”Event snap not indexed“),i.assert(e.getServerCache().getNode().isIndexed(this.Sr.getIndex()),”Server snap not indexed“)},e.prototype.applyOperation=function(t,n,a,s){var u,l,h=new o.ChildChangeAccumulator;if(n.type===r.OperationType.OVERWRITE){var c=n;c.source.fromUser?u=this.Tr(t,c.path,c.snap,a,s,h):(i.assert(c.source.fromServer,”Unknown source.“),l=c.source.tagged||t.getServerCache().isFiltered()&&!c.path.isEmpty(),u=this.wr(t,c.path,c.snap,a,s,l,h))}else if(n.type===r.OperationType.MERGE){var d=n;d.source.fromUser?u=this.Ir(t,d.path,d.children,a,s,h):(i.assert(d.source.fromServer,”Unknown source.“),l=d.source.tagged||t.getServerCache().isFiltered(),u=this.Rr(t,d.path,d.children,a,s,l,h))}else if(n.type===r.OperationType.ACK_USER_WRITE){var f=n;u=f.revert?this.Or(t,f.path,a,s,h):this.Ar(t,f.path,f.affectedTree,a,s,h)}else{if(n.type!==r.OperationType.LISTEN_COMPLETE)throw i.assertionError(”Unknown operation type: “+n.type);u=this.Dr(t,n.path,a,h)}var _=h.getChanges();return e.Mr(t,u,_),new p(u,_)},e.Mr=function(e,t,n){var r=t.getEventCache();if(r.isFullyInitialized()){var i=r.getNode().isLeafNode()||r.getNode().isEmpty(),o=e.getCompleteEventSnap();(n.length>0||!e.getEventCache().isFullyInitialized()||i&&!r.getNode().equals(o)||!r.getNode().getPriority().equals(o.getPriority()))&&n.push(a.Change.valueChange(t.getCompleteEventSnap()))}},e.prototype.Lr=function(e,t,n,r,o){var a=e.getEventCache();if(null!=n.shadowingWrite(t))return e;var u=void 0,l=void 0;if(t.isEmpty())if(i.assert(e.getServerCache().isFullyInitialized(),”If change path is empty, we must have complete server data“),e.getServerCache().isFiltered()){var h=e.getCompleteServerSnap(),c=h instanceof s.ChildrenNode?h:s.ChildrenNode.EMPTY_NODE,p=n.calcCompleteEventChildren©;u=this.Sr.updateFullNode(e.getEventCache().getNode(),p,o)}else{var d=n.calcCompleteEventCache(e.getCompleteServerSnap());u=this.Sr.updateFullNode(e.getEventCache().getNode(),d,o)}else{var f=t.getFront();if(”.priority“==f){i.assert(1==t.getLength(),”Can't have a priority with additional path components“);var _=a.getNode();l=e.getServerCache().getNode();var y=n.calcEventCacheAfterServerOverwrite(t,_,l);u=null!=y?this.Sr.updatePriority(_,y):a.getNode()}else{var v=t.popFront(),g=void 0;if(a.isCompleteForChild(f)){l=e.getServerCache().getNode();var m=n.calcEventCacheAfterServerOverwrite(t,a.getNode(),l);g=null!=m?a.getNode().getImmediateChild(f).updateChild(v,m):a.getNode().getImmediateChild(f)}else g=n.calcCompleteChild(f,e.getServerCache());u=null!=g?this.Sr.updateChild(a.getNode(),f,g,v,r,o):a.getNode()}}return e.updateEventSnap(u,a.isFullyInitialized()||t.isEmpty(),this.Sr.filtersNodes())},e.prototype.wr=function(e,t,n,r,i,o,a){var s,u=e.getServerCache(),l=o?this.Sr:this.Sr.getIndexedFilter();if(t.isEmpty())s=l.updateFullNode(u.getNode(),n,null);else if(l.filtersNodes()&&!u.isFiltered()){var h=u.getNode().updateChild(t,n);s=l.updateFullNode(u.getNode(),h,null)}else{var p=t.getFront();if(!u.isCompleteForPath(t)&&t.getLength()>1)return e;var d=t.popFront(),f=u.getNode().getImmediateChild(p),_=f.updateChild(d,n);s=”.priority“==p?l.updatePriority(u.getNode(),_):l.updateChild(u.getNode(),p,_,d,c.NO_COMPLETE_CHILD_SOURCE,null)}var y=e.updateServerSnap(s,u.isFullyInitialized()||t.isEmpty(),l.filtersNodes()),v=new c.WriteTreeCompleteChildSource(r,y,i);return this.Lr(y,t,r,v,a)},e.prototype.Tr=function(e,t,n,r,i,o){var a,u,l=e.getEventCache(),h=new c.WriteTreeCompleteChildSource(r,e,i);if(t.isEmpty())u=this.Sr.updateFullNode(e.getEventCache().getNode(),n,o),a=e.updateEventSnap(u,!0,this.Sr.filtersNodes());else{var p=t.getFront();if(”.priority“===p)u=this.Sr.updatePriority(e.getEventCache().getNode(),n),a=e.updateEventSnap(u,l.isFullyInitialized(),l.isFiltered());else{var d=t.popFront(),f=l.getNode().getImmediateChild(p),_=void 0;if(d.isEmpty())_=n;else{var y=h.getCompleteChild(p);_=null!=y?”.priority“===d.getBack()&&y.getChild(d.parent()).isEmpty()?y:y.updateChild(d,n):s.ChildrenNode.EMPTY_NODE}if(f.equals(_))a=e;else{var v=this.Sr.updateChild(l.getNode(),p,_,d,h,o);a=e.updateEventSnap(v,l.isFullyInitialized(),this.Sr.filtersNodes())}}}return a},e.Fr=function(e,t){return e.getEventCache().isCompleteForChild(t)},e.prototype.Ir=function(t,n,r,i,o,a){var s=this,u=t;return r.foreach(function(r,l){var h=n.child®;e.Fr(t,h.getFront())&&(u=s.Tr(u,h,l,i,o,a))}),r.foreach(function(r,l){var h=n.child®;e.Fr(t,h.getFront())||(u=s.Tr(u,h,l,i,o,a))}),u},e.prototype.xr=function(e,t){return t.foreach(function(t,n){e=e.updateChild(t,n)}),e},e.prototype.Rr=function(e,t,n,r,i,o,a){var s=this;if(e.getServerCache().getNode().isEmpty()&&!e.getServerCache().isFullyInitialized())return e;var u,c=e;u=t.isEmpty()?n:l.ImmutableTree.Empty.setTree(t,n);var p=e.getServerCache().getNode();return u.children.inorderTraversal(function(t,n){if(p.hasChild(t)){var u=e.getServerCache().getNode().getImmediateChild(t),l=s.xr(u,n);c=s.wr(c,new h.Path(t),l,r,i,o,a)}}),u.children.inorderTraversal(function(t,n){var u=!e.getServerCache().isCompleteForChild(t)&&null==n.value;if(!p.hasChild(t)&&!u){var l=e.getServerCache().getNode().getImmediateChild(t),d=s.xr(l,n);c=s.wr(c,new h.Path(t),d,r,i,o,a)}}),c},e.prototype.Ar=function(e,t,n,r,i,o){if(null!=r.shadowingWrite(t))return e;var a=e.getServerCache().isFiltered(),s=e.getServerCache();if(null!=n.value){if(t.isEmpty()&&s.isFullyInitialized()||s.isCompleteForPath(t))return this.wr(e,t,s.getNode().getChild(t),r,i,a,o);if(t.isEmpty()){var c=l.ImmutableTree.Empty;return s.getNode().forEachChild(u.KEY_INDEX,function(e,t){c=c.set(new h.Path(e),t)}),this.Rr(e,t,c,r,i,a,o)}return e}var p=l.ImmutableTree.Empty;return n.foreach(function(e,n){var r=t.child(e);s.isCompleteForPath®&&(p=p.set(e,s.getNode().getChild®))}),this.Rr(e,t,p,r,i,a,o)},e.prototype.Dr=function(e,t,n,r){var i=e.getServerCache(),o=e.updateServerSnap(i.getNode(),i.isFullyInitialized()||t.isEmpty(),i.isFiltered());return this.Lr(o,t,n,c.NO_COMPLETE_CHILD_SOURCE,r)},e.prototype.Or=function(e,t,n,r,o){var a;if(null!=n.shadowingWrite(t))return e;var u=new c.WriteTreeCompleteChildSource(n,e,r),l=e.getEventCache().getNode(),p=void 0;if(t.isEmpty()||”.priority“===t.getFront()){var d=void 0;if(e.getServerCache().isFullyInitialized())d=n.calcCompleteEventCache(e.getCompleteServerSnap());else{var f=e.getServerCache().getNode();i.assert(f instanceof s.ChildrenNode,”serverChildren would be complete if leaf node“),d=n.calcCompleteEventChildren(f)}d=d,p=this.Sr.updateFullNode(l,d,o)}else{var _=t.getFront(),y=n.calcCompleteChild(_,e.getServerCache());null==y&&e.getServerCache().isCompleteForChild(_)&&(y=l.getImmediateChild(_)),p=null!=y?this.Sr.updateChild(l,_,y,t.popFront(),u,o):e.getEventCache().getNode().hasChild(_)?this.Sr.updateChild(l,_,s.ChildrenNode.EMPTY_NODE,t.popFront(),u,o):l,p.isEmpty()&&e.getServerCache().isFullyInitialized()&&(a=n.calcCompleteEventCache(e.getCompleteServerSnap()),a.isLeafNode()&&(p=this.Sr.updateFullNode(p,a,o)))}return a=e.getServerCache().isFullyInitialized()||null!=n.shadowingWrite(h.Path.Empty),e.updateEventSnap(p,a,this.Sr.filtersNodes())},e}();t.ViewProcessor=d},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(9),o=n(0),a=function(){function e(){this.kr={}}return e.prototype.trackChildChange=function(e){var t=e.type,n=e.childName;o.assert(t==i.Change.CHILD_ADDED||t==i.Change.CHILD_CHANGED||t==i.Change.CHILD_REMOVED,”Only child changes supported for tracking“),o.assert(”.priority“!==n,”Only non-priority child changes can be tracked.“);var a=r.safeGet(this.kr,n);if(a){var s=a.type;if(t==i.Change.CHILD_ADDED&&s==i.Change.CHILD_REMOVED)this.kr=i.Change.childChangedChange(n,e.snapshotNode,a.snapshotNode);else if(t==i.Change.CHILD_REMOVED&&s==i.Change.CHILD_ADDED)delete this.kr;else if(t==i.Change.CHILD_REMOVED&&s==i.Change.CHILD_CHANGED)this.kr=i.Change.childRemovedChange(n,a.oldSnap);else if(t==i.Change.CHILD_CHANGED&&s==i.Change.CHILD_ADDED)this.kr=i.Change.childAddedChange(n,e.snapshotNode);else{if(t!=i.Change.CHILD_CHANGED||s!=i.Change.CHILD_CHANGED)throw o.assertionError(”Illegal combination of changes: “e
” occurred after “+a);this.kr=i.Change.childChangedChange(n,e.snapshotNode,a.oldSnap)}}else this.kr=e},e.prototype.getChanges=function(){return r.getValues(this.kr)},e}();t.ChildChangeAccumulator=a},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(19),i=function(){function e(){}return e.prototype.getCompleteChild=function(e){return null},e.prototype.getChildAfterChild=function(e,t,n){return null},e}();t.Wr=i,t.NO_COMPLETE_CHILD_SOURCE=new i;var o=function(){function e(e,t,n){void 0===n&&(n=null),this.jr=e,this.Nr=t,this.Vr=n}return e.prototype.getCompleteChild=function(e){var t=this.Nr.getEventCache();if(t.isCompleteForChild(e))return t.getNode().getImmediateChild(e);var n=null!=this.Vr?new r.CacheNode(this.Vr,!0,!1):this.Nr.getServerCache();return this.jr.calcCompleteChild(e,n)},e.prototype.getChildAfterChild=function(e,t,n){var r=null!=this.Vr?this.Vr:this.Nr.getCompleteServerSnap(),i=this.jr.calcIndexedSlice(r,t,1,n,e);return 0===i.length?null:i},e}();t.WriteTreeCompleteChildSource=o},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(5),i=n(9),o=n(0),a=function(){function e(e){this.mr=e,this.me=this.mr.getQueryParams().getIndex()}return e.prototype.generateEventsForChanges=function(e,t,n){var r=this,o=[],a=;return e.forEach(function(e){e.type===i.Change.CHILD_CHANGED&&r.me.indexedValueChanged(e.oldSnap,e.snapshotNode)&&a.push(i.Change.childMovedChange(e.childName,e.snapshotNode))}),this.Qr(o,i.Change.CHILD_REMOVED,e,n,t),this.Qr(o,i.Change.CHILD_ADDED,e,n,t),this.Qr(o,i.Change.CHILD_MOVED,a,n,t),this.Qr(o,i.Change.CHILD_CHANGED,e,n,t),this.Qr(o,i.Change.VALUE,e,n,t),o},e.prototype.Qr=function(e,t,n,r,i){var o=this,a=n.filter(function(e){return e.type===t});a.sort(this.qr.bind(this)),a.forEach(function(t){var n=o.Ur(t,i);r.forEach(function®{r.respondsTo(t.type)&&e.push(r.createEvent(n,o.mr))})})},e.prototype.Ur=function(e,t){return”value“===e.type||”child_removed“===e.type?e:(e.prevName=t.getPredecessorChildName(e.childName,e.snapshotNode,this.me),e)},e.prototype.qr=function(e,t){if(null==e.childName||null==t.childName)throw o.assertionError(”Should only compare child_ events.“);var n=new r.NamedNode(e.childName,e.snapshotNode),i=new r.NamedNode(t.childName,t.snapshotNode);return this.me.compare(n,i)},e}();t.EventGenerator=a},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(0),o=n(2),a=n(96),s=n(3),u=n(4),l=function(){function e(){this.Br=a.CompoundWrite.Empty,this.Hr=[],this.Gr=-1}return e.prototype.childWrites=function(e){return new h(e,this)},e.prototype.addOverwrite=function(e,t,n,r){i.assert(n>this.Gr,”Stacking an older write on top of newer ones“),void 0===r&&(r=!0),this.Hr.push({path:e,snap:t,writeId:n,visible:r}),r&&(this.Br=this.Br.addWrite(e,t)),this.Gr=n},e.prototype.addMerge=function(e,t,n){i.assert(n>this.Gr,”Stacking an older merge on top of newer ones“),this.Hr.push({path:e,children:t,writeId:n,visible:!0}),this.Br=this.Br.addWrites(e,t),this.Gr=n},e.prototype.getWrite=function(e){for(var t=0;t<this.Hr.length;t++){var n=this.Hr;if(n.writeId===e)return n}return null},e.prototype.removeWrite=function(e){var t=this,n=this.Hr.findIndex(function(t){return t.writeId===e});i.assert(n>=0,”removeWrite called with nonexistent writeId.“);var o=this.Hr;this.Hr.splice(n,1);for(var a=o.visible,s=!1,u=this.Hr.length-1;a&&u>=0;){var l=this.Hr;l.visible&&(u>=n&&this.Kr(l,o.path)?a=!1:o.path.contains(l.path)&&(s=!0)),u–}if(a){if(s)return this.Yr(),!0;if(o.snap)this.Br=this.Br.removeWrite(o.path);else{var h=o.children;r.forEach(h,function(e){t.Br=t.Br.removeWrite(o.path.child(e))})}return!0}return!1},e.prototype.getCompleteWriteData=function(e){return this.Br.getCompleteNode(e)},e.prototype.calcCompleteEventCache=function(t,n,r,i){if(r||i){var a=this.Br.childCompoundWrite(t);if(!i&&a.isEmpty())return n;if(i||null!=n||a.hasCompleteWrite(o.Path.Empty)){var s=function(e){return(e.visible||i)&&(!r||!~r.indexOf(e.writeId))&&(e.path.contains(t)||t.contains(e.path))},l=e.Xr(this.Hr,s,t),h=n||u.ChildrenNode.EMPTY_NODE;return l.apply(h)}return null}var c=this.Br.getCompleteNode(t);if(null!=c)return c;var p=this.Br.childCompoundWrite(t);if(p.isEmpty())return n;if(null!=n||p.hasCompleteWrite(o.Path.Empty)){var h=n||u.ChildrenNode.EMPTY_NODE;return p.apply(h)}return null},e.prototype.calcCompleteEventChildren=function(e,t){var n=u.ChildrenNode.EMPTY_NODE,r=this.Br.getCompleteNode(e);if®return r.isLeafNode()||r.forEachChild(s.PRIORITY_INDEX,function(e,t){n=n.updateImmediateChild(e,t)}),n;if(t){var i=this.Br.childCompoundWrite(e);return t.forEachChild(s.PRIORITY_INDEX,function(e,t){var r=i.childCompoundWrite(new o.Path(e)).apply(t);n=n.updateImmediateChild(e,r)}),i.getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n}return this.Br.childCompoundWrite(e).getCompleteChildren().forEach(function(e){n=n.updateImmediateChild(e.name,e.node)}),n},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n,r){i.assert(n||r,”Either existingEventSnap or existingServerSnap must exist“);var o=e.child(t);if(this.Br.hasCompleteWrite(o))return null;var a=this.Br.childCompoundWrite(o);return a.isEmpty()?r.getChild(t):a.apply(r.getChild(t))},e.prototype.calcCompleteChild=function(e,t,n){var r=e.child(t),i=this.Br.getCompleteNode®;return null!=i?i:n.isCompleteForChild(t)?this.Br.childCompoundWrite®.apply(n.getNode().getImmediateChild(t)):null},e.prototype.shadowingWrite=function(e){return this.Br.getCompleteNode(e)},e.prototype.calcIndexedSlice=function(e,t,n,r,i,a){var s,u=this.Br.childCompoundWrite(e),l=u.getCompleteNode(o.Path.Empty);if(null!=l)s=l;else{if(null==t)return[];s=u.apply(t)}if(s=s.withIndex(a),s.isEmpty()||s.isLeafNode())return;for(var h=[],c=a.getCompare(),p=i?s.getReverseIteratorFrom(n,a):s.getIteratorFrom(n,a),d=p.getNext();d&&h.length<r;)0!==c(d,n)&&h.push(d),d=p.getNext();return h},e.prototype.Kr=function(e,t){return e.snap?e.path.contains(t):!!r.findKey(e.children,function(n,r){return e.path.child®.contains(t)})},e.prototype.Yr=function(){this.Br=e.Xr(this.Hr,e.zr,o.Path.Empty),this.Hr.length>0?this.Gr=this.Hr.writeId:this.Gr=-1},e.zr=function(e){return e.visible},e.Xr=function(e,t,n){for(var s=a.CompoundWrite.Empty,u=0;u<e.length;++u){var l=e;if(t(l)){var h=l.path,c=void 0;if(l.snap)n.contains(h)?(c=o.Path.relativePath(n,h),s=s.addWrite(c,l.snap)):h.contains(n)&&(c=o.Path.relativePath(h,n),s=s.addWrite(o.Path.Empty,l.snap.getChild©));else{if(!l.children)throw i.assertionError(”WriteRecord should have .snap or .children“);if(n.contains(h))c=o.Path.relativePath(n,h),s=s.addWrites(c,l.children);else if(h.contains(n))if(c=o.Path.relativePath(h,n),c.isEmpty())s=s.addWrites(o.Path.Empty,l.children);else{var p=r.safeGet(l.children,c.getFront());if(p){var d=p.getChild(c.popFront());s=s.addWrite(o.Path.Empty,d)}}}}}return s},e}();t.WriteTree=l;var h=function(){function e(e,t){this.Jr=e,this.$r=t}return e.prototype.calcCompleteEventCache=function(e,t,n){return this.$r.calcCompleteEventCache(this.Jr,e,t,n)},e.prototype.calcCompleteEventChildren=function(e){return this.$r.calcCompleteEventChildren(this.Jr,e)},e.prototype.calcEventCacheAfterServerOverwrite=function(e,t,n){return this.$r.calcEventCacheAfterServerOverwrite(this.Jr,e,t,n)},e.prototype.shadowingWrite=function(e){return this.$r.shadowingWrite(this.Jr.child(e))},e.prototype.calcIndexedSlice=function(e,t,n,r,i){return this.$r.calcIndexedSlice(this.Jr,e,t,n,r,i)},e.prototype.calcCompleteChild=function(e,t){return this.$r.calcCompleteChild(this.Jr,e,t)},e.prototype.child=function(t){return new e(this.Jr.child(t),this.$r)},e}();t.WriteTreeRef=h},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(23),i=n(2),o=n(0),a=n(5),s=n(3),u=n(0),l=function(){function e(e){this.$r=e}return e.prototype.addWrite=function(t,n){if(t.isEmpty())return new e(new r.ImmutableTree(n));var o=this.$r.findRootMostValueAndPath(t);if(null!=o){var a=o.path,s=o.value,u=i.Path.relativePath(a,t);return s=s.updateChild(u,n),new e(this.$r.set(a,s))}var l=new r.ImmutableTree(n);return new e(this.$r.setTree(t,l))},e.prototype.addWrites=function(e,t){var n=this;return o.forEach(t,function(t,r){n=n.addWrite(e.child(t),r)}),n},e.prototype.removeWrite=function(t){return t.isEmpty()?e.Empty:new e(this.$r.setTree(t,r.ImmutableTree.Empty))},e.prototype.hasCompleteWrite=function(e){return null!=this.getCompleteNode(e)},e.prototype.getCompleteNode=function(e){var t=this.$r.findRootMostValueAndPath(e);return null!=t?this.$r.get(t.path).getChild(i.Path.relativePath(t.path,e)):null},e.prototype.getCompleteChildren=function(){var e=[],t=this.$r.value;return null!=t?t.isLeafNode()||t.forEachChild(s.PRIORITY_INDEX,function(t,n){e.push(new a.NamedNode(t,n))}):this.$r.children.inorderTraversal(function(t,n){null!=n.value&&e.push(new a.NamedNode(t,n.value))}),e},e.prototype.childCompoundWrite=function(t){if(t.isEmpty())return this;var n=this.getCompleteNode(t);return new e(null!=n?new r.ImmutableTree(n):this.$r.subtree(t))},e.prototype.isEmpty=function(){return this.$r.isEmpty()},e.prototype.apply=function(t){return e.Zr(i.Path.Empty,this.$r,t)},e.Empty=new e(new r.ImmutableTree(null)),e.Zr=function(t,n,r){if(null!=n.value)return r.updateChild(t,n.value);var i=null;return n.children.inorderTraversal(function(n,o){”.priority“===n?(u.assert(null!==o.value,”Priority writes must always be leaf nodes“),i=o.value):r=e.Zr(t.child(n),o,r)}),r.getChild(t).isEmpty()||null===i||(r=r.updateChild(t.child(”.priority“),i)),r},e}();t.CompoundWrite=l},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(4),i=function(){function e(){this.ei=r.ChildrenNode.EMPTY_NODE}return e.prototype.getNode=function(e){return this.ei.getChild(e)},e.prototype.updateSnapshot=function(e,t){this.ei=this.ei.updateChild(e,t)},e}();t.SnapshotHolder=i},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(1),i=function(){function e(e){this.ti=e}return e.prototype.getToken=function(e){return this.ti.INTERNAL.getToken(e).then(null,function(e){return e&&”auth/token-not-initialized“===e.code?(r.log(”Got auth/token-not-initialized error. Treating as null token.“),null):Promise.reject(e)})},e.prototype.addTokenChangeListener=function(e){this.ti.INTERNAL.addAuthTokenListener(e)},e.prototype.removeTokenChangeListener=function(e){this.ti.INTERNAL.removeAuthTokenListener(e)},e.prototype.notifyForInvalidToken=function(){var e='Provided authentication credentials for the app named ”'this.ti.name
'“ are invalid. This usually indicates your app was not initialized correctly. ';”credential“in this.ti.options?e+='Make sure the ”credential“ property provided to initializeApp() is authorized to access the specified ”databaseURL“ and is from the correct project.':”serviceAccount“in this.ti.options?e+='Make sure the ”serviceAccount“ property provided to initializeApp() is authorized to access the specified ”databaseURL“ and is from the correct project.':e+='Make sure the ”apiKey“ and ”databaseURL“ properties provided to initializeApp() match the values provided for your app at console.firebase.google.com/.‘,r.warn(e)},e}();t.AuthTokenProvider=i},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(0),o=function(){function e(){this.ni={}}return e.prototype.incrementCounter=function(e,t){void 0===t&&(t=1),i.contains(this.ni,e)||(this.ni=0),this.ni+=t},e.prototype.get=function(){return r.deepCopy(this.ni)},e}();t.StatsCollection=o},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(1),o=n(49),a=1e4,s=3e4,u=function(){function e(e,t){this.Z=t,this.ri={},this.G=new o.StatsListener(e);var n=a+(s-a)*Math.random();i.setTimeoutNonBlocking(this.ii.bind(this),Math.floor(n))}return e.prototype.includeStat=function(e){this.ri=!0},e.prototype.ii=function(){var e=this,t=this.G.get(),n={},o=!1;r.forEach(t,function(t,i){i>0&&r.contains(e.ri,t)&&(n=i,o=!0)}),o&&this.Z.reportStats(n),i.setTimeoutNonBlocking(this.ii.bind(this),Math.floor(2*Math.random()*3e5))},e}();t.StatsReporter=u},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(1),i=function(){function e(){this.oi=[],this.ai=0}return e.prototype.queueEvents=function(e){for(var t=null,n=0;n<e.length;n++){var r=e,i=r.getPath();null===t||i.equals(t.getPath())||(this.oi.push(t),t=null),null===t&&(t=new o(i)),t.add®}t&&this.oi.push(t)},e.prototype.raiseEventsAtPath=function(e,t){this.queueEvents(t),this.si(function(t){return t.equals(e)})},e.prototype.raiseEventsForChangedPath=function(e,t){this.queueEvents(t),this.si(function(t){return t.contains(e)||e.contains(t)})},e.prototype.si=function(e){this.ai++;for(var t=!0,n=0;n<this.oi.length;n++){var r=this.oi;r&&(e(r.getPath())?(this.oi.raise(),this.oi=null):t=!1)}t&&(this.oi=[]),this.ai–},e}();t.EventQueue=i;var o=function(){function e(e){this.Oe=e,this.ui=[]}return e.prototype.add=function(e){this.ui.push(e)},e.prototype.raise=function(){for(var e=0;e<this.ui.length;e++){var t=this.ui;if(null!==t){this.ui=null;var n=t.getEventRunner();r.logger&&r.log(”event: “+t),r.exceptionGuard(n)}}},e.prototype.getPath=function(){return this.Oe},e}();t.EventList=o},function(e,t,n){”use strict“;var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e=t)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,”__esModule“,{value:!0});var i=n(51),o=n(0),a=function(e){function t(){var t,n,r=e.call(this,)||this;return”undefined“!=typeof document&&void 0!==document.addEventListener&&(void 0!==document.hidden?(n=”visibilitychange“,t=”hidden“):void 0!==document.mozHidden?(n=”mozvisibilitychange“,t=”mozHidden“):void 0!==document.msHidden?(n=”msvisibilitychange“,t=”msHidden“):void 0!==document.webkitHidden&&(n=”webkitvisibilitychange“,t=”webkitHidden“)),r.at=!0,n&&document.addEventListener(n,function(){var e=!document;e!==r.at&&(r.at=e,r.trigger(”visible“,e))},!1),r}return r(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return o.assert(”visible“===e,”Unknown event type: “+e),},t}(i.EventEmitter);t.VisibilityMonitor=a},function(e,t,n){”use strict“;var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e=t)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,”__esModule“,{value:!0});var i=n(0),o=n(51),a=n(0),s=function(e){function t(){var t=e.call(this,)||this;return t.li=!0,”undefined“==typeof window||void 0===window.addEventListener||a.isMobileCordova()||(window.addEventListener(”online“,function(){t.li||(t.li=!0,t.trigger(”online“,!0))},!1),window.addEventListener(”offline“,function(){t.li&&(t.li=!1,t.trigger(”online“,!1))},!1)),t}return r(t,e),t.getInstance=function(){return new t},t.prototype.getInitialEvent=function(e){return i.assert(”online“===e,”Unknown event type: “+e),},t.prototype.currentlyOnline=function(){return this.li},t}(o.EventEmitter);t.OnlineMonitor=s},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(53),i=n(54),o=n(1),a=function(){function e(e){this.hi(e)}return Object.defineProperty(e,”ALL_TRANSPORTS“,{get:function(){return},enumerable:!0,configurable:!0}),e.prototype.hi=function(t){var n=i.WebSocketConnection&&i.WebSocketConnection.isAvailable(),r=n&&!i.WebSocketConnection.previouslyFailed();if(t.webSocketOnly&&(n||o.warn(”wss:// URL used, but browser isn't known to support websockets. Trying anyway.“),r=!0),r)this.ci=;else{var a=this.ci=[];o.each(e.ALL_TRANSPORTS,function(e,t){t&&t.isAvailable()&&a.push(t)})}},e.prototype.initialTransport=function(){if(this.ci.length>0)return this.ci;throw Error(”No transports available“)},e.prototype.upgradeTransport=function(){return this.ci.length>1?this.ci:null},e}();t.TransportManager=a},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(1),i=function(){function e(e){this.Ut=e,this.pendingResponses=[],this.currentResponseNum=0,this.closeAfterResponse=-1,this.onClose=null}return e.prototype.closeAfter=function(e,t){this.closeAfterResponse=e,this.onClose=t,this.closeAfterResponse<this.currentResponseNum&&(this.onClose(),this.onClose=null)},e.prototype.handleResponse=function(e,t){var n=this;this.pendingResponses=t;for(var i=this;this.pendingResponses&&”break“!==function(){var e=i.pendingResponses;delete i.pendingResponses;for(var t=0;t<e.length;++t)!function(t){e&&r.exceptionGuard(function(){n.Ut(e)})}(t);if(i.currentResponseNum===i.closeAfterResponse)return i.onClose&&(i.onClose(),i.onClose=null),”break“;i.currentResponseNum++}(););},e}();t.PacketReceiver=i},function(e,t,n){”use strict“;var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e=t)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,”__esModule“,{value:!0});var i=n(0),o=n(1),a=n(0),s=n(0),u=n(0),l=n(55),h=function(e){function t(t,n,r){var i=e.call(this)||this;return i.H=t,i.ee=n,i.Ke=r,i.de=o.logWrapper(”p:rest:“),i.Je={},i}return r(t,e),t.prototype.reportStats=function(e){throw Error(”Method not implemented.“)},t.pi=function(e,t){return void 0!==t?”tag$“+t:(i.assert(e.getQueryParams().isDefault(),”should have a tag if it's not a default query.“),”“+e.path)},t.prototype.listen=function(e,n,r,i){var o=this,a=”“+e.path;this.de(”Listen called for “a
” “+e.queryIdentifier());var u=t.pi(e,r),l={};this.Je=l;var h=e.getQueryParams().toRestQueryStringParameters();this.di(a+”.json“,h,function(e,t){var n=t;if(404===e&&(n=null,e=null),null===e&&o.ee(a,n,!1,r),s.safeGet(o.Je,u)===l){var h;h=e?401==e?”permission_denied“:”rest_error:“+e:”ok“,i(h,null)}})},t.prototype.unlisten=function(e,n){var r=t.pi(e,n);delete this.Je},t.prototype.refreshAuthToken=function(e){},t.prototype.di=function(e,t,n){var r=this;void 0===t&&(t={}),t.format=”export“,this.Ke.getToken(!1).then(function(i){var s=i&&i.accessToken;s&&(t.auth=s);var l=(r.H.secure?”“:”http://“)+r.H.host+e+”?“+u.querystring(t);r.de(”Sending REST request for “+l);var h=new XMLHttpRequest;h.onreadystatechange=function(){if(n&&4===h.readyState){r.de(”REST Response for “l
” received. status:“,h.status,”response:“,h.responseText);var e=null;if(h.status>=200&&h.status<300){try{e=a.jsonEval(h.responseText)}catch(e){o.warn(”Failed to parse JSON response for “l
”: “+h.responseText)}n(null,e)}else 401!==h.status&&404!==h.status&&o.warn(”Got unsuccessful REST response for “l
” Status: “+h.status),n(h.status);n=null}},h.open(”GET“,l,!0),h.send()})},t}(l.ServerActions);t.ReadonlyRestClient=h},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(0),i=n(1),o=n(10),a=n(3),s=n(38),u=n(42),l=n(24),h=n(108),c=n(56),p=n(0),d=function(){function e(){this.fi=!1,this._i=!1,this.yi=!1,this.vi=!1,this.gi=!1,this.mi=0,this.Ci=”“,this.Ei=null,this.Ni=”“,this.Pi=null,this.bi=”“,this.me=a.PRIORITY_INDEX}return e.prototype.hasStart=function(){return this._i},e.prototype.isViewFromLeft=function(){return”“===this.Ci?this._i:this.Ci===e.Si.VIEW_FROM_LEFT},e.prototype.getIndexStartValue=function(){return r.assert(this._i,”Only valid if start has been set“),this.Ei},e.prototype.getIndexStartName=function(){return r.assert(this._i,”Only valid if start has been set“),this.yi?this.Ni:i.MIN_NAME},e.prototype.hasEnd=function(){return this.vi},e.prototype.getIndexEndValue=function(){return r.assert(this.vi,”Only valid if end has been set“),this.Pi},e.prototype.getIndexEndName=function(){return r.assert(this.vi,”Only valid if end has been set“),this.gi?this.bi:i.MAX_NAME},e.prototype.hasLimit=function(){return this.fi},e.prototype.hasAnchoredLimit=function(){return this.fi&&”“!==this.Ci},e.prototype.getLimit=function(){return r.assert(this.fi,”Only valid if limit has been set“),this.mi},e.prototype.getIndex=function(){return this.me},e.prototype.Ti=function(){var t=new e;return t.fi=this.fi,t.mi=this.mi,t._i=this._i,t.Ei=this.Ei,t.yi=this.yi,t.Ni=this.Ni,t.vi=this.vi,t.Pi=this.Pi,t.gi=this.gi,t.bi=this.bi,t.me=this.me,t.Ci=this.Ci,t},e.prototype.limit=function(e){var t=this.Ti();return t.fi=!0,t.mi=e,t.Ci=”“,t},e.prototype.limitToFirst=function(t){var n=this.Ti();return n.fi=!0,n.mi=t,n.Ci=e.Si.VIEW_FROM_LEFT,n},e.prototype.limitToLast=function(t){var n=this.Ti();return n.fi=!0,n.mi=t,n.Ci=e.Si.VIEW_FROM_RIGHT,n},e.prototype.startAt=function(e,t){var n=this.Ti();return n._i=!0,void 0===e&&(e=null),n.Ei=e,null!=t?(n.yi=!0,n.Ni=t):(n.yi=!1,n.Ni=”“),n},e.prototype.endAt=function(e,t){var n=this.Ti();return n.vi=!0,void 0===e&&(e=null),n.Pi=e,void 0!==t?(n.gi=!0,n.bi=t):(n.gi=!1,n.bi=”“),n},e.prototype.orderBy=function(e){var t=this.Ti();return t.me=e,t},e.prototype.getQueryObject=function(){var t=e.Si,n={};if(this._i&&(n=this.Ei,this.yi&&(n=this.Ni)),this.vi&&(n=this.Pi,this.gi&&(n=this.bi)),this.fi){n=this.mi;var r=this.Ci;”“===r&&(r=this.isViewFromLeft()?t.VIEW_FROM_LEFT:t.VIEW_FROM_RIGHT),n=r}return this.me!==a.PRIORITY_INDEX&&(n=”“+this.me),n},e.prototype.loadsAllData=function(){return!(this._i||this.vi||this.fi)},e.prototype.isDefault=function(){return this.loadsAllData()&&this.me==a.PRIORITY_INDEX},e.prototype.getNodeFilter=function(){return this.loadsAllData()?new l.IndexedFilter(this.getIndex()):this.hasLimit()?new h.LimitedFilter(this):new c.RangedFilter(this)},e.prototype.toRestQueryStringParameters=function(){var t=e.wi,n={};if(this.isDefault())return n;var i;return this.me===a.PRIORITY_INDEX?i=t.PRIORITY_INDEX:this.me===s.VALUE_INDEX?i=t.VALUE_INDEX:this.me===o.KEY_INDEX?i=t.KEY_INDEX:(r.assert(this.me instanceof u.PathIndex,”Unrecognized index type!“),i=”“+this.me),n=p.stringify(i),this._i&&(n=p.stringify(this.Ei),this.yi&&(n+=”,“+p.stringify(this.Ni))),this.vi&&(n=p.stringify(this.Pi),this.gi&&(n+=”,“+p.stringify(this.bi))),this.fi&&(this.isViewFromLeft()?n=this.mi:n=this.mi),n},e.Si={INDEX_START_VALUE:”sp“,INDEX_START_NAME:”sn“,INDEX_END_VALUE:”ep“,INDEX_END_NAME:”en“,LIMIT:”l“,VIEW_FROM:”vf“,VIEW_FROM_LEFT:”l“,VIEW_FROM_RIGHT:”r“,INDEX:”i“},e.wi={ORDER_BY:”orderBy“,PRIORITY_INDEX:”$priority“,VALUE_INDEX:”$value“,KEY_INDEX:”$key“,START_AT:”startAt“,END_AT:”endAt“,LIMIT_TO_FIRST:”limitToFirst“,LIMIT_TO_LAST:”limitToLast“},e.DEFAULT=new e,e}();t.QueryParams=d},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r=n(56),i=n(4),o=n(5),a=n(0),s=n(9),u=function(){function e(e){this.Ii=new r.RangedFilter(e),this.me=e.getIndex(),this.mi=e.getLimit(),this.Ri=!e.isViewFromLeft()}return e.prototype.updateChild=function(e,t,n,r,a,s){return this.Ii.matches(new o.NamedNode(t,n))||(n=i.ChildrenNode.EMPTY_NODE),e.getImmediateChild(t).equals(n)?e:e.numChildren()<this.mi?this.Ii.getIndexedFilter().updateChild(e,t,n,r,a,s):this.Oi(e,t,n,a,s)},e.prototype.updateFullNode=function(e,t,n){var r;if(t.isLeafNode()||t.isEmpty())r=i.ChildrenNode.EMPTY_NODE.withIndex(this.me);else if(2*this.mi<t.numChildren()&&t.isIndexed(this.me)){r=i.ChildrenNode.EMPTY_NODE.withIndex(this.me);var o=void 0;o=this.Ri?t.getReverseIteratorFrom(this.Ii.getEndPost(),this.me):t.getIteratorFrom(this.Ii.getStartPost(),this.me);for(var a=0;o.hasNext()&&a<this.mi;){var s=o.getNext(),u=void 0;if(!(u=this.Ri?this.me.compare(this.Ii.getStartPost(),s)<=0:this.me.compare(s,this.Ii.getEndPost())<=0))break;r=r.updateImmediateChild(s.name,s.node),a++}}else{r=t.withIndex(this.me),r=r.updatePriority(i.ChildrenNode.EMPTY_NODE);var l=void 0,h=void 0,c=void 0,o=void 0;if(this.Ri){o=r.getReverseIterator(this.me),l=this.Ii.getEndPost(),h=this.Ii.getStartPost();var p=this.me.getCompare();c=function(e,t){return p(t,e)}}else o=r.getIterator(this.me),l=this.Ii.getStartPost(),h=this.Ii.getEndPost(),c=this.me.getCompare();for(var a=0,d=!1;o.hasNext();){var s=o.getNext();!d&&c(l,s)<=0&&(d=!0);var u=d&&a<this.mi&&c(s,h)<=0;u?a++:r=r.updateImmediateChild(s.name,i.ChildrenNode.EMPTY_NODE)}}return this.Ii.getIndexedFilter().updateFullNode(e,r,n)},e.prototype.updatePriority=function(e,t){return e},e.prototype.filtersNodes=function(){return!0},e.prototype.getIndexedFilter=function(){return this.Ii.getIndexedFilter()},e.prototype.getIndex=function(){return this.me},e.prototype.Oi=function(e,t,n,r,u){var l;if(this.Ri){var h=this.me.getCompare();l=function(e,t){return h(t,e)}}else l=this.me.getCompare();var c=e;a.assert(c.numChildren()==this.mi,”“);var p=new o.NamedNode(t,n),d=this.Ri?c.getFirstChild(this.me):c.getLastChild(this.me),f=this.Ii.matches(p);if(c.hasChild(t)){for(var _=c.getImmediateChild(t),y=r.getChildAfterChild(this.me,d,this.Ri);null!=y&&(y.name==t||c.hasChild(y.name));)y=r.getChildAfterChild(this.me,y,this.Ri);var v=null==y?1:l(y,p);if(f&&!n.isEmpty()&&v>=0)return null!=u&&u.trackChildChange(s.Change.childChangedChange(t,n,_)),c.updateImmediateChild(t,n);null!=u&&u.trackChildChange(s.Change.childRemovedChange(t,_));var g=c.updateImmediateChild(t,i.ChildrenNode.EMPTY_NODE);return null!=y&&this.Ii.matches(y)?(null!=u&&u.trackChildChange(s.Change.childAddedChange(y.name,y.node)),g.updateImmediateChild(y.name,y.node)):g}return n.isEmpty()?e:f&&l(d,p)>=0?(null!=u&&(u.trackChildChange(s.Change.childRemovedChange(d.name,d.node)),u.trackChildChange(s.Change.childAddedChange(t,n))),c.updateImmediateChild(t,n).updateImmediateChild(d.name,i.ChildrenNode.EMPTY_NODE)):e},e}();t.LimitedFilter=u},function(e,t,n){”use strict“;Object.defineProperty(t,”__esModule“,{value:!0});var r,i=n(0),o=n(21),a=n(22),s=n(2),u=n(110),l=n(3),h=n(1),c=n(43),p=n(7),d=n(0),f=n(11),_=n(4),y=n(18);!function(e){e=”RUN“,e=”SENT“,e=”COMPLETED“,e=”SENT_NEEDS_ABORT“,e=”NEEDS_ABORT“}(r=t.TransactionStatus||(t.TransactionStatus={})),y.Repo.Ai=25,y.Repo.prototype.ie=function(){this.Di=new u.Tree},y.Repo.prototype.startTransaction=function(e,t,n,s){this.de(”transaction on “+e);var u=function(){},y=new o.Reference(this,e);y.on(”value“,u);var v=function(){y.off(”value“,u)},g={path:e,update:t,onComplete:n,status:null,order:h.LUIDGenerator(),applyLocally:s,retryCount:0,unwatcher:v,abortReason:null,currentWriteId:null,currentInputSnapshot:null,currentOutputSnapshotRaw:null,currentOutputSnapshotResolved:null},m=this.Mi(e);g.currentInputSnapshot=m;var C=g.update(m.val());if(void 0===C){if(g.unwatcher(),g.currentOutputSnapshotRaw=null,g.currentOutputSnapshotResolved=null,g.onComplete){var E=new a.DataSnapshot(g.currentInputSnapshot,new o.Reference(this,g.path),l.PRIORITY_INDEX);g.onComplete(null,!1,E)}}else{p.validateFirebaseData(”transaction failed: Data returned “,C,g.path),g.status=r.RUN;var N=this.Di.subTree(e),P=N.getValue()||[];P.push(g),N.setValue(P);var b=void 0;”object“==typeof C&&null!==C&&d.contains(C,”.priority“)?(b=d.safeGet(C,”.priority“),i.assert(p.isValidPriority(b),”Invalid priority returned by transaction. Priority must be a valid string, finite number, server value, or null.“)):b=(this.ue.calcCompleteEventCache(e)||_.ChildrenNode.EMPTY_NODE).getPriority().val(),b=b;var S=this.generateServerValues(),T=f.nodeFromJSON(C,b),w=c.resolveDeferredValueSnapshot(T,S);g.currentOutputSnapshotRaw=T,g.currentOutputSnapshotResolved=w,g.currentWriteId=this.pe();var I=this.ue.applyUserOverwrite(e,w,g.currentWriteId,g.applyLocally);this.K.raiseEventsForChangedPath(e,I),this.Li()}},y.Repo.prototype.Mi=function(e,t){return this.ue.calcCompleteEventCache(e,t)||_.ChildrenNode.EMPTY_NODE},y.Repo.prototype.Li=function(e){var t=this;if(void 0===e&&(e=this.Di),e||this.Fi(e),null!==e.getValue()){var n=this.xi(e);i.assert(n.length>0,”Sending zero length transaction queue“),n.every(function(e){return e.status===r.RUN})&&this.ki(e.path(),n)}else e.hasChildren()&&e.forEachChild(function(e){t.Li(e)})},y.Repo.prototype.ki=function(e,t){for(var n=this,u=t.map(function(e){return e.currentWriteId}),c=this.Mi(e,u),p=c,d=c.hash(),f=0;f<t.length;f++){var _=t;i.assert(_.status===r.RUN,”tryToSendTransactionQueue_: items in queue should all be run.“),_.status=r.SENT,_.retryCount++;var y=s.Path.relativePath(e,_.path);p=p.updateChild(y,_.currentOutputSnapshotRaw)}var v=p.val(!0),g=e;this.Z.put(”“+g,v,function(i){n.de(”transaction put response“,{path:”“+g,status:i});var s=[];if(”ok“===i){for(var u=[],c=0;cg
” failed: “+i);for(var c=0;c
/*!
* @license Firebase v4.9.0 * Build: rev-a586a7f * Terms: https://firebase.google.com/terms/ */
try{webpackJsonpFirebase(,{116:function(e,t,r){r(117)},117:function(e,t,r){“use strict”;function n(e){var t=new Uint8Array(e);return window.btoa(String.fromCharCode.apply(null,t))}function o(e){var t=function(e){return self&&“ServiceWorkerGlobalScope”in self?new A(e):new k(e)},r={Messaging:k};e.INTERNAL.registerService(“messaging”,t,r)}Object.defineProperty(t,“__esModule”,{value:!0});var i,s=r(0),a={AVAILABLE_IN_WINDOW:“only-available-in-window”,AVAILABLE_IN_SW:“only-available-in-sw”,SHOULD_BE_INHERITED:“should-be-overriden”,BAD_SENDER_ID:“bad-sender-id”,INCORRECT_GCM_SENDER_ID:“incorrect-gcm-sender-id”,PERMISSION_DEFAULT:“permission-default”,PERMISSION_BLOCKED:“permission-blocked”,UNSUPPORTED_BROWSER:“unsupported-browser”,NOTIFICATIONS_BLOCKED:“notifications-blocked”,FAILED_DEFAULT_REGISTRATION:“failed-serviceworker-registration”,SW_REGISTRATION_EXPECTED:“sw-registration-expected”,GET_SUBSCRIPTION_FAILED:“get-subscription-failed”,INVALID_SAVED_TOKEN:“invalid-saved-token”,SW_REG_REDUNDANT:“sw-reg-redundant”,TOKEN_SUBSCRIBE_FAILED:“token-subscribe-failed”,TOKEN_SUBSCRIBE_NO_TOKEN:“token-subscribe-no-token”,TOKEN_SUBSCRIBE_NO_PUSH_SET:“token-subscribe-no-push-set”,USE_SW_BEFORE_GET_TOKEN:“use-sw-before-get-token”,INVALID_DELETE_TOKEN:“invalid-delete-token”,DELETE_TOKEN_NOT_FOUND:“delete-token-not-found”,DELETE_SCOPE_NOT_FOUND:“delete-scope-not-found”,BG_HANDLER_FUNCTION_EXPECTED:“bg-handler-function-expected”,NO_WINDOW_CLIENT_TO_MSG:“no-window-client-to-msg”,UNABLE_TO_RESUBSCRIBE:“unable-to-resubscribe”,NO_FCM_TOKEN_FOR_RESUBSCRIBE:“no-fcm-token-for-resubscribe”,FAILED_TO_DELETE_TOKEN:“failed-to-delete-token”,NO_SW_IN_REG:“no-sw-in-reg”,BAD_SCOPE:“bad-scope”,BAD_VAPID_KEY:“bad-vapid-key”,BAD_SUBSCRIPTION:“bad-subscription”,BAD_TOKEN:“bad-token”,BAD_PUSH_SET:“bad-push-set”,FAILED_DELETE_VAPID_KEY:“failed-delete-vapid-key”},c=(i={},i=“This method is available in a Window context.”,i=“This method is available in a service worker context.”,i=“This method should be overriden by extended classes.”,i=“Please ensure that 'messagingSenderId' is set correctly in the options passed into firebase.initializeApp().”,i=“The required permissions were not granted and dismissed instead.”,i=“The required permissions were not granted and blocked instead.”,i=“This browser doesn't support the API's required to use the firebase SDK.”,i=“Notifications have been blocked.”,i=“We are unable to register the default service worker. {$browserErrorMessage}”,i=“A service worker registration was the expected input.”,i=“There was an error when trying to get any existing Push Subscriptions.”,i=“Unable to access details of the saved token.”,i=“The service worker being used for push was made redundant.”,i=“A problem occured while subscribing the user to FCM: {$message}”,i=“FCM returned no token when subscribing the user to push.”,i=“FCM returned an invalid response when getting an FCM token.”,i=“You must call useServiceWorker() before calling getToken() to ensure your service worker is used.”,i=“You must pass a valid token into deleteToken(), i.e. the token from getToken().”,i=“The deletion attempt for token could not be performed as the token was not found.”,i=“The deletion attempt for service worker scope could not be performed as the scope was not found.”,i=“The input to setBackgroundMessageHandler() must be a function.”,i=“An attempt was made to message a non-existant window client.”,i=“There was an error while re-subscribing the FCM token for push messaging. Will have to resubscribe the user on next visit. {$message}”,i=“Could not find an FCM token and as a result, unable to resubscribe. Will have to resubscribe the user on next visit.”,i=“Unable to delete the currently saved token.”,i=“Even though the service worker registration was successful, there was a problem accessing the service worker itself.”,i=“Please change your web app manifest's 'gcm_sender_id' value to '103953800507' to use Firebase messaging.”,i=“The service worker scope must be a string with at least one character.”,i=“The public VAPID key must be a string with at least one character.”,i=“The subscription must be a valid PushSubscription.”,i=“The FCM Token used for storage / lookup was not a valid token string.”,i=“The FCM push set used for storage / lookup was not not a valid push set string.”,i=“The VAPID key could not be deleted.”,i),u={codes:a,map:c},_=function(e){return n(e).replace(/=/g,“”).replace(/+/g,“-”).replace(///g,“_”)},d=,f={userVisibleOnly:!0,applicationServerKey:new Uint8Array(d)},h={ENDPOINT:“fcm.googleapis.com”,APPLICATION_SERVER_KEY:d,SUBSCRIPTION_OPTIONS:f},p=“fcm_token_object_Store”,l=function(){function e(){this.e=new s.ErrorFactory(“messaging”,“Messaging”,u.map),this.t=null}return e.prototype.r=function(){return this.t?this.t:(this.t=new Promise(function(t,r){var n=indexedDB.open(e.DB_NAME,1);n.onerror=function(e){r(e.target.error)},n.onsuccess=function(e){t(e.target.result)},n.onupgradeneeded=function(e){var t=e.target.result,r=t.createObjectStore(p,{keyPath:“swScope”});r.createIndex(“fcmSenderId”,“fcmSenderId”,{unique:!1}),r.createIndex(“fcmToken”,“fcmToken”,{unique:!0})}}),this.t)},e.prototype.closeDatabase=function(){var e=this;return this.t?this.t.then(function(t){t.close(),e.t=null}):Promise.resolve()},e.prototype.getTokenDetailsFromToken=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction(),i=o.objectStore(p),s=i.index(“fcmToken”),a=s.get(e);a.onerror=function(e){n(e.target.error)},a.onsuccess=function(e){r(e.target.result)}})})},e.prototype.n=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction(),i=o.objectStore(p),s=i.get(e);s.onerror=function(e){n(e.target.error)},s.onsuccess=function(e){r(e.target.result)}})})},e.prototype.o=function(e){return this.r().then(function(t){return new Promise(function(r,n){var o=t.transaction(),i=o.objectStore(p),s=[],a=i.openCursor();a.onerror=function(e){n(e.target.error)},a.onsuccess=function(t){var n=t.target.result;n?(n.value.fcmSenderId===e&&s.push(n.value),n.continue()):r(s)}})})},e.prototype.subscribeToFCM=function(e,t,r){var n=this,o=_(t.getKey(“p256dh”)),i=_(t.getKey(“auth”)),s=“authorized_entity=”e
“&endpoint=”t.endpoint
“&encryption_key=”o
“&encryption_auth=”+i;r&&(s+=“&pushSet=”+r);var a=new Headers;a.append(“Content-Type”,“application/x-www-form-urlencoded”);var c={method:“POST”,headers:a,body:s};return fetch(h.ENDPOINT+“/fcm/connect/subscribe”,c).then(function(e){return e.json()}).then(function(e){var t=e;if(t.error){var r=t.error.message;throw n.e.create(u.codes.TOKEN_SUBSCRIBE_FAILED,{message:r})}if(!t.token)throw n.e.create(u.codes.TOKEN_SUBSCRIBE_NO_TOKEN);if(!t.pushSet)throw n.e.create(u.codes.TOKEN_SUBSCRIBE_NO_PUSH_SET);return{token:t.token,pushSet:t.pushSet}})},e.prototype.i=function(e,t){return e.endpoint===t.endpoint&&_(e.getKey(“auth”))===t.auth&&_(e.getKey(“p256dh”))===t.p256dh},e.prototype.s=function(e,t,r,n,o){var i={swScope:t.scope,endpoint:r.endpoint,auth:_(r.getKey(“auth”)),p256dh:_(r.getKey(“p256dh”)),fcmToken:n,fcmPushSet:o,fcmSenderId:e};return this.r().then(function(e){return new Promise(function(t,r){var n=e.transaction(,“readwrite”),o=n.objectStore(p),s=o.put(i);s.onerror=function(e){r(e.target.error)},s.onsuccess=function(e){t()}})})},e.prototype.getSavedToken=function(e,t){var r=this;return t instanceof ServiceWorkerRegistration?“string”!=typeof e||0===e.length?Promise.reject(this.e.create(u.codes.BAD_SENDER_ID)):this.o(e).then(function®{if(0!==r.length){var n=r.findIndex(function®{return t.scope===r.swScope&&e===r.fcmSenderId});if(-1!==n)return r}}).then(function(e){if(e)return t.pushManager.getSubscription().catch(function(e){throw r.e.create(u.codes.GET_SUBSCRIPTION_FAILED)}).then(function(t){if(t&&r.i(t,e))return e.fcmToken})}):Promise.reject(this.e.create(u.codes.SW_REGISTRATION_EXPECTED))},e.prototype.createToken=function(e,t){var r=this;if(“string”!=typeof e||0===e.length)return Promise.reject(this.e.create(u.codes.BAD_SENDER_ID));if(!(t instanceof ServiceWorkerRegistration))return Promise.reject(this.e.create(u.codes.SW_REGISTRATION_EXPECTED));var n,o;return t.pushManager.getSubscription().then(function(e){return e||t.pushManager.subscribe(h.SUBSCRIPTION_OPTIONS)}).then(function(t){return n=t,r.subscribeToFCM(e,n)}).then(function(i){return o=i,r.s(e,t,n,o.token,o.pushSet)}).then(function(){return o.token})},e.prototype.deleteToken=function(e){var t=this;return“string”!=typeof e||0===e.length?Promise.reject(this.e.create(u.codes.INVALID_DELETE_TOKEN)):this.getTokenDetailsFromToken(e).then(function(e){if(!e)throw t.e.create(u.codes.DELETE_TOKEN_NOT_FOUND);return t.r().then(function®{return new Promise(function(n,o){var i=r.transaction(,“readwrite”),s=i.objectStore(p),a=s.delete(e.swScope);a.onerror=function(e){o(e.target.error)},a.onsuccess=function®{if(0===r.target.result)return void o(t.e.create(u.codes.FAILED_TO_DELETE_TOKEN));n(e)}})})})},e}(),g=l,E=“messagingSenderId”,T=function(){function e(e){var t=this;if(this.e=new s.ErrorFactory(“messaging”,“Messaging”,u.map),!e.options||“string”!=typeof e.options)throw this.e.create(u.codes.BAD_SENDER_ID);this.a=e.options,this.c=new g,this.app=e,this.INTERNAL={},this.INTERNAL.delete=function(){return t.delete}}return e.prototype.getToken=function(){var e=this,t=this.u();return“granted”!==t?“denied”===t?Promise.reject(this.e.create(u.codes.NOTIFICATIONS_BLOCKED)):Promise.resolve(null):this._().then(function(t){return e.c.getSavedToken(e.a,t).then(function®{return r||e.c.createToken(e.a,t)})})},e.prototype.deleteToken=function(e){var t=this;return this.c.deleteToken(e).then(function(){return t._().then(function(e){if(e)return e.pushManager.getSubscription()}).then(function(e){if(e)return e.unsubscribe()})})},e.prototype._=function(){throw this.e.create(u.codes.SHOULD_BE_INHERITED)},e.prototype.requestPermission=function(){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.useServiceWorker=function(e){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.onMessage=function(e,t,r){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.onTokenRefresh=function(e,t,r){throw this.e.create(u.codes.AVAILABLE_IN_WINDOW)},e.prototype.setBackgroundMessageHandler=function(e){throw this.e.create(u.codes.AVAILABLE_IN_SW)},e.prototype.delete=function(){return this.c.closeDatabase()},e.prototype.u=function(){return Notification.permission},e.prototype.getTokenManager=function(){return this.c},e}(),S=T,b={TYPE_OF_MSG:“firebase-messaging-msg-type”,DATA:“firebase-messaging-msg-data”},v={PUSH_MSG_RECEIVED:“push-msg-received”,NOTIFICATION_CLICKED:“notification-clicked”},I=function(e,t){return r={},r=e,r=t,r;var r},m={PARAMS:b,TYPES_OF_MSG:v,createNewMsg:I},y={path:“/firebase-messaging-sw.js”,scope:“/firebase-cloud-messaging-push-scope”},N=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty®&&(e=t)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create®:(n.prototype=r.prototype,new n)}}(),w=function(e){function t(t){var r=e.call(this,t)||this;return r.d=null,r.f=Object(s.createSubscribe)(function(e){r.d=e}),r.h=null,r.p=Object(s.createSubscribe)(function(e){r.h=e}),r.l(),r}return N(t,e),t.prototype.getToken=function(){var t=this;return this.g()?this.T().then(function(){return e.prototype.getToken.call(t)}):Promise.reject(this.e.create(u.codes.UNSUPPORTED_BROWSER))},t.prototype.T=function(){var e=this;if(this.S)return this.S;var t=document.querySelector(‘link');return this.S=t?fetch(t.href).then(function(e){return e.json()}).catch(function(){return Promise.resolve()}).then(function(t){if(t&&t.gcm_sender_id&&“103953800507”!==t.gcm_sender_id)throw e.e.create(u.codes.INCORRECT_GCM_SENDER_ID)}):Promise.resolve(),this.S},t.prototype.requestPermission=function(){var e=this;return“granted”===Notification.permission?Promise.resolve():new Promise(function(t,r){var n=function(n){return“granted”===n?t():r(“denied”===n?e.e.create(u.codes.PERMISSION_BLOCKED):e.e.create(u.codes.PERMISSION_DEFAULT))},o=Notification.requestPermission(function(e){o||n(e)});o&&o.then(n)})},t.prototype.useServiceWorker=function(e){if(!(e instanceof ServiceWorkerRegistration))throw this.e.create(u.codes.SW_REGISTRATION_EXPECTED);if(void 0!==this.b)throw this.e.create(u.codes.USE_SW_BEFORE_GET_TOKEN);this.b=e},t.prototype.onMessage=function(e,t,r){return this.f(e,t,r)},t.prototype.onTokenRefresh=function(e,t,r){return this.p(e,t,r)},t.prototype.v=function(e){var t=this,r=e.installing||e.waiting||e.active;return new Promise(function(n,o){if(!r)return void o(t.e.create(u.codes.NO_SW_IN_REG));if(“activated”===r.state)return void n(e);if(“redundant”===r.state)return void o(t.e.create(u.codes.SW_REG_REDUNDANT));var i=function(){if(“activated”===r.state)n(e);else{if(“redundant”!==r.state)return;o(t.e.create(u.codes.SW_REG_REDUNDANT))}r.removeEventListener(“statechange”,i)};r.addEventListener(“statechange”,i)})},t.prototype._=function(){var e=this;return this.b?this.v(this.b):(this.b=null,navigator.serviceWorker.register(y.path,{scope:y.scope}).catch(function(t){throw e.e.create(u.codes.FAILED_DEFAULT_REGISTRATION,{browserErrorMessage:t.message})}).then(function(t){return e.v(t).then(function(){return e.b=t,t.update(),t})}))},t.prototype.l=function(){var e=this;“serviceWorker”in navigator&&navigator.serviceWorker.addEventListener(“message”,function(t){if(t.data&&t.data){var r=t.data;switch(r){case m.TYPES_OF_MSG.PUSH_MSG_RECEIVED:case m.TYPES_OF_MSG.NOTIFICATION_CLICKED:var n=r;e.d.next(n)}}},!1)},t.prototype.g=function(){return“serviceWorker”in navigator&&“PushManager”in window&&“Notification”in window&&“fetch”in window&&ServiceWorkerRegistration.prototype.hasOwnProperty(“showNotification”)&&PushSubscription.prototype.hasOwnProperty(“getKey”)},t}(S),k=w,O=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty®&&(e=t)};return function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create®:(n.prototype=r.prototype,new n)}}(),D=function(e){function t(t){var r=e.call(this,t)||this;return self.addEventListener(“push”,function(e){return r.I(e)},!1),self.addEventListener(“pushsubscriptionchange”,function(e){return r.m(e)},!1),self.addEventListener(“notificationclick”,function(e){return r.y(e)},!1),r.N=null,r}return O(t,e),t.prototype.I=function(e){var t,r=this;try{t=e.data.json()}catch(e){return}var n=this.w().then(function(e){if(e){if(t.notification||r.N)return r.k(t)}else{var n=r.O(t);if(n){var o=n.title||“”;return self.registration.showNotification(o,n)}if(r.N)return r.N(t)}});e.waitUntil(n)},t.prototype.m=function(e){var t=this,r=this.getToken().then(function(e){if(!e)throw t.e.create(u.codes.NO_FCM_TOKEN_FOR_RESUBSCRIBE);var r=null,n=t.getTokenManager();return n.getTokenDetailsFromToken(e).then(function(e){if(!(r=e))throw t.e.create(u.codes.INVALID_SAVED_TOKEN);return self.registration.pushManager.subscribe(h.SUBSCRIPTION_OPTIONS)}).then(function(e){return n.subscribeToFCM(r.fcmSenderId,e,r.fcmPushSet)}).catch(function(e){return n.deleteToken(r.fcmToken).then(function(){throw t.e.create(u.codes.UNABLE_TO_RESUBSCRIBE,{message:e})})})});e.waitUntil®},t.prototype.y=function(e){var t=this;if(e.notification&&e.notification.data&&e.notification.data.FCM_MSG){e.stopImmediatePropagation(),e.notification.close();var r=e.notification.data.FCM_MSG,n=r.notification.click_action;if(n){var o=this.D(n).then(function(e){return e||self.clients.openWindow(n)}).then(function(e){if(e){r.notification,delete r.notification;var n=m.createNewMsg(m.TYPES_OF_MSG.NOTIFICATION_CLICKED,r);return t.A(e,n)}});e.waitUntil(o)}}},t.prototype.O=function(e){if(e&&“object”==typeof e.notification){var t=Object.assign({},e.notification);return t.data=(r={},r.FCM_MSG=e,r),t;var r}},t.prototype.setBackgroundMessageHandler=function(e){if(e&&“function”!=typeof e)throw this.e.create(u.codes.BG_HANDLER_FUNCTION_EXPECTED);this.N=e},t.prototype.D=function(e){var t=new URL(e).href;return self.clients.matchAll({type:“window”,includeUncontrolled:!0}).then(function(e){for(var r=null,n=0;n<e.length;n++)if(new URL(e.url).href===t){r=e;break}if®return r.focus(),r})},t.prototype.A=function(e,t){var r=this;return new Promise(function(n,o){if(!e)return o(r.e.create(u.codes.NO_WINDOW_CLIENT_TO_MSG));e.postMessage(t),n()})},t.prototype.w=function(){return self.clients.matchAll({type:“window”,includeUncontrolled:!0}).then(function(e){return e.some(function(e){return“visible”===e.visibilityState})})},t.prototype.k=function(e){var t=this;return self.clients.matchAll({type:“window”,includeUncontrolled:!0}).then(function®{var n=m.createNewMsg(m.TYPES_OF_MSG.PUSH_MSG_RECEIVED,e);return Promise.all(r.map(function(e){return t.A(e,n)}))})},t.prototype._=function(){return Promise.resolve(self.registration)},t}(S),A=D,P=r(6);t.registerMessaging=o,o(P.firebase)}},[116])}catch(e){throw Error(“Cannot instantiate firebase-messaging.js - be sure to load firebase-app.js first.”)}
/*!
* @license Firebase v4.9.0 * Build: rev-a586a7f * Terms: https://firebase.google.com/terms/ */
try{webpackJsonpFirebase(,{118:function(t,e,n){n(119)},119:function(t,e,n){“use strict”;function r(t){return“storage/”+t}function o(){return new te(ee.UNKNOWN,“An unknown error occurred, please check the error payload for server response.”)}function i(t){return new te(ee.OBJECT_NOT_FOUND,“Object '”t
“' does not exist.”)}function a(t){return new te(ee.QUOTA_EXCEEDED,“Quota for bucket '”t
“' exceeded, please view quota on firebase.google.com/pricing/.”)}function s(){return new te(ee.UNAUTHENTICATED,“User is not authenticated, please authenticate using Firebase Authentication and try again.”)}function u(t){return new te(ee.UNAUTHORIZED,“User does not have permission to access '”t
“'.”)}function c(){return new te(ee.RETRY_LIMIT_EXCEEDED,“Max retry time for operation exceeded, please try again.”)}function l(){return new te(ee.CANCELED,“User canceled the upload/download.”)}function h(t){return new te(ee.INVALID_URL,“Invalid URL '”t
“'.”)}function p(t){return new te(ee.INVALID_DEFAULT_BUCKET,“Invalid default bucket '”t
“'.”)}function f(){return new te(ee.CANNOT_SLICE_BLOB,“Cannot slice blob for upload. Please retry the upload.”)}function d(){return new te(ee.SERVER_FILE_WRONG_SIZE,“Server recorded incorrect upload file size, please retry the upload.”)}function _(){return new te(ee.NO_DOWNLOAD_URL,“The given file does not have any download URLs.”)}function v(t,e,n){return new te(ee.INVALID_ARGUMENT,“Invalid argument in `”e
“` at index ”t
“: ”+n)}function b(t,e,n,r){var o,i;return t===e?(o=t,i=1===t?“argument”:“arguments”):(o=“between ”t
“ and ”+e,i=“arguments”),new te(ee.INVALID_ARGUMENT_COUNT,“Invalid argument count in `”n
“`: Expected ”o
“ ”i
“, received ”r
“.”)}function m(){return new te(ee.APP_DELETED,“The Firebase app was deleted.”)}function g(t){return new te(ee.INVALID_ROOT_OPERATION,“The operation '”t
“' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').”)}function y(t,e){return new te(ee.INVALID_FORMAT,“String does not match format '”t
“': ”+e)}function R(t){throw new te(ee.INTERNAL_ERROR,“Internal error: ”+t)}function E(t){switch(t){case ne.RAW:case ne.BASE64:case ne.BASE64URL:case ne.DATA_URL:return;default:throw“Expected one of the event types: [”ne.RAW
“, ”ne.BASE64
“, ”ne.BASE64URL
“, ”ne.DATA_URL
“].”}}function w(t,e){switch(t){case ne.RAW:return new re(U(e));case ne.BASE64:case ne.BASE64URL:return new re(A(t,e));case ne.DATA_URL:return new re(N(e),O(e))}throw o()}function U(t){for(var e=[],n=0;n<t.length;n++){var r=t.charCodeAt(n);if(r<=127)e.push®;else if(r<=2047)e.push(192|r>>6,128|63&r);else if(55296==(64512&r)){var o=n<t.length-1&&56320==(64512&t.charCodeAt(n+1));if(o){var i=r,a=t.charCodeAt(++n);r=65536|(1023&i)<<10|1023&a,e.push(240|r>>18,128|r>>12&63,128|r>>6&63,128|63&r)}else e.push(239,191,189)}else 56320==(64512&r)?e.push(239,191,189):e.push(224|r>>12,128|r>>6&63,128|63&r)}return new Uint8Array(e)}function T(t){var e;try{e=decodeURIComponent(t)}catch(t){throw y(ne.DATA_URL,“Malformed data URL.”)}return U(e)}function A(t,e){switch(t){case ne.BASE64:var n=-1!==e.indexOf(“-”),r=-1!==e.indexOf(“_”);if(n||r){var o=n?“-”:“_”;throw y(t,“Invalid character '”o
“' found: is it base64url encoded?”)}break;case ne.BASE64URL:var i=-1!==e.indexOf(“+”),a=-1!==e.indexOf(“/”);if(i||a){var o=i?“+”:“/”;throw y(t,“Invalid character '”o
“' found: is it base64 encoded?”)}e=e.replace(/-/g,“+”).replace(/_/g,“/”)}var s;try{s=atob(e)}catch(e){throw y(t,“Invalid character found”)}for(var u=new Uint8Array(s.length),c=0;ce
“' cannot be an object.”}}function ct(t,e,n){for(var r=e.length,o=e.length,i=0;is
“rnContent-Type: application/json; charset=utf-8rnrn”c
“rn–”s
“rnContent-Type: ”u.contentType
“rnrn”,h=“rn–”s
“–”,p=de.getBlob(l,r,h);if(null===p)throw f();var d={name:u.fullPath},_=$(i),v=t.maxUploadRetryTime(),b=new e(,“POST”,Ut(t,n),v);return b.urlParams=d,b.headers=a,b.body=p.uploadData(),b.errorHandler=Tt(e),b}function Lt(t,e){var n;try{n=t.getResponseHeader(“X-Goog-Upload-Status”)}catch(t){wt(!1)}return wt(yt(e||,n)),n}function Pt(t,e,n,r,o){function i(t,e){Lt(t);var n;try{n=t.getResponseHeader(“X-Goog-Upload-URL”)}catch(t){wt(!1)}return wt(F(n)),n}var a=e.bucketOnlyServerUrl(),s=kt(e,r,o),u={name:s.fullPath},c=$(a),l={“X-Goog-Upload-Protocol”:“resumable”,“X-Goog-Upload-Command”:“start”,“X-Goog-Upload-Header-Content-Length”:r.size(),“X-Goog-Upload-Header-Content-Type”:s.contentType,“Content-Type”:“application/json; charset=utf-8”},h=st(s,n),p=t.maxUploadRetryTime(),f=new _e(c,“POST”,i,p);return f.urlParams=u,f.headers=l,f.body=h,f.errorHandler=Tt(e),f}function xt(t,e,n,r){function o(t,e){var n,o=Lt(t,);try{n=t.getResponseHeader(“X-Goog-Upload-Size-Received”)}catch(t){wt(!1)}var i=parseInt(n,10);return wt(!isNaN(i)),new ve(i,r.size(),“final”===o)}var i={“X-Goog-Upload-Command”:“query”},a=t.maxUploadRetryTime(),s=new _e(n,“POST”,o,a);return s.headers=i,s.errorHandler=Tt(e),s}function Dt(t,e,n,r,o,i,a,s){function u(t,n){var o,a=Lt(t,),s=c.current+h,u=r.size();return o=“final”===a?Ut(e,i)(t,n):null,new ve(s,u,“final”===a,o)}var c=new ve(0,0);if(a?(c.current=a.current,c.total=a.total):(c.current=0,c.total=r.size()),r.size()!==c.total)throw d();var l=c.total-c.current,h=l;o>0&&(h=Math.min(h,o));var p=c.current,_=p+h,v=h===l?“upload, finalize”:“upload”,b={“X-Goog-Upload-Command”:v,“X-Goog-Upload-Offset”:c.current},m=r.slice(p,_);if(null===m)throw f();var g=e.maxUploadRetryTime(),y=new _e(n,“POST”,u,g);return y.headers=b,y.body=m.uploadData(),y.progressCallback=s||null,y.errorHandler=Tt(t),y}function Mt(t){return function(){for(var e=[],n=0;nie.STATE_CHANGED
”].“}function i(t){try{return void c(t)}catch(t){}try{if(l(t),!(W(t.next)||W(t.error)||W(t.complete)))throw”“;return}catch(t){throw u}}function a(t){function e(e,n,o){null!==t&&ct(”on“,t,arguments);var i=new be(e,n,r);return h.K(i),function(){h.Z(i)}}return e}function s(t){if(null===t)throw u;i(t)}void 0===e&&(e=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0);var u=”Expected a function or an Object with one of `next`, `error`, `complete` properties.“,c=vt(!0).validator,l=_t(null,!0).validator;ct(”on“,,arguments);var h=this,p=;return W(e)||W(n)||W®?a(null)(e,n,r):a(p)},t.prototype.then=function(t,e){return this.D.then(t,e)},t.prototype.catch=function(t){return this.then(null,t)},t.prototype.K=function(t){this._.push(t),this.J(t)},t.prototype.Z=function(t){Et(this._,t)},t.prototype.V=function(){var t=this;this.Q(),Rt(this._).forEach(function(e){t.J(e)})},t.prototype.Q=function(){if(null!==this.y){var t=!0;switch(S(this.k)){case se.SUCCESS:Mt(this.y.bind(null,this.snapshot))();break;case se.CANCELED:case se.ERROR:Mt(this.R.bind(null,this.v))();break;default:t=!1}t&&(this.y=null,this.R=null)}},t.prototype.J=function(t){switch(S(this.k)){case se.RUNNING:case se.PAUSED:null!==t.next&&Mt(t.next.bind(t,this.snapshot))();break;case se.SUCCESS:null!==t.complete&&Mt(t.complete.bind(t))();break;case se.CANCELED:case se.ERROR:null!==t.error&&Mt(t.error.bind(t,this.v))();break;default:null!==t.error&&Mt(t.error.bind(t,this.v))()}},t.prototype.resume=function(){ct(”resume“,[],arguments);var t=this.k===ae.PAUSED||this.k===ae.PAUSING;return t&&this.P(ae.RUNNING),t},t.prototype.pause=function(){ct(”pause“,[],arguments);var t=this.k===ae.RUNNING;return t&&this.P(ae.PAUSING),t},t.prototype.cancel=function(){ct(”cancel“,[],arguments);var t=this.k===ae.RUNNING||this.k===ae.PAUSING;return t&&this.P(ae.CANCELING),t},t}(),ye=function(){function t(t,e){this.authWrapper=t,this.location=e instanceof le?e:le.makeFromUrl(e)}return t.prototype.toString=function(){return ct(”toString“,[],arguments),”gs://“this.location.bucket
”/“+this.location.path},t.prototype.newRef=function(e,n){return new t(e,n)},t.prototype.mappings=function(){return rt()},t.prototype.child=function(t){ct(”child“,,arguments);var e=Z(this.location.path,t),n=new le(this.location.bucket,e);return this.newRef(this.authWrapper,n)},Object.defineProperty(t.prototype,”parent“,{get:function(){var t=K(this.location.path);if(null===t)return null;var e=new le(this.location.bucket,t);return this.newRef(this.authWrapper,e)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,”root“,{get:function(){var t=new le(this.location.bucket,”“);return this.newRef(this.authWrapper,t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,”bucket“,{get:function(){return this.location.bucket},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,”fullPath“,{get:function(){return this.location.path},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,”name“,{get:function(){return J(this.location.path)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,”storage“,{get:function(){return this.authWrapper.service()},enumerable:!0,configurable:!0}),t.prototype.put=function(t,e){return void 0===e&&(e=null),ct(”put“,,arguments),this.Y(”put“),new ge(this,this.authWrapper,this.location,this.mappings(),new de(t),e)},t.prototype.putString=function(t,e,n){void 0===e&&(e=ne.RAW),ct(”putString“,,arguments),this.Y(”putString“);var r=w(e,t),o=L(n);return!M(o.contentType)&&M(r.contentType)&&(o.contentType=r.contentType),new ge(this,this.authWrapper,this.location,this.mappings(),new de(r.data,!0),o)},t.prototype.delete=function(){ct(”delete“,[],arguments),this.Y(”delete“);var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Ct(t.authWrapper,t.location);return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.getMetadata=function(){ct(”getMetadata“,[],arguments),this.Y(”getMetadata“);var t=this;return this.authWrapper.getAuthToken().then(function(e){var n=Nt(t.authWrapper,t.location,t.mappings());return t.authWrapper.makeRequest(n,e).getPromise()})},t.prototype.updateMetadata=function(t){ct(”updateMetadata“,,arguments),this.Y(”updateMetadata“);var e=this;return this.authWrapper.getAuthToken().then(function(n){var r=Ot(e.authWrapper,e.location,t,e.mappings());return e.authWrapper.makeRequest(r,n).getPromise()})},t.prototype.getDownloadURL=function(){return ct(”getDownloadURL“,[],arguments),this.Y(”getDownloadURL“),this.getMetadata().then(function(t){var e=t.downloadURLs;if(M(e))return e;throw _()})},t.prototype.Y=function(t){if(”“===this.location.path)throw g(t)},t}(),Re=function(){function t(t){this.D=D(t)}return t.prototype.getPromise=function(){return this.D},t.prototype.cancel=function(t){void 0===t&&(t=!1)},t}(),Ee=function(){function t(){this.$={},this.tt=$t}return t.prototype.addRequest=function(t){function e(){delete r.$}var n=this.tt;this.tt++,this.$=t;var r=this;t.getPromise().then(e,e)},t.prototype.clear=function(){I(this.$,function(t,e){e&&e.cancel(!0)}),this.$={}},t}(),we=function(){function t(e,n,r,o,i){if(this.et=null,this.nt=!1,this.rt=e,null!==this.rt){var a=this.rt.options;M(a)&&(this.et=t.ot(a))}this.it=n,this.at=r,this.st=i,this.ut=o,this.ct=Qt,this.lt=Yt,this.ht=new Ee}return t.ot=function(t){var e=t.storageBucket||null;return null==e?null:le.makeFromBucketSpec(e).bucket},t.prototype.getAuthToken=function(){return null!==this.rt&&M(this.rt.INTERNAL)&&M(this.rt.INTERNAL.getToken)?this.rt.INTERNAL.getToken().then(function(t){return null!==t?t.accessToken:null},function(t){return null}):x(null)},t.prototype.bucket=function(){if(this.nt)throw m();return this.et},t.prototype.service=function(){return this.ut},t.prototype.makeStorageReference=function(t){return this.it(this,t)},t.prototype.makeRequest=function(t,e){if(this.nt)return new Re(m());var n=this.at(t,e,this.st);return this.ht.addRequest(n),n},t.prototype.deleteApp=function(){this.nt=!0,this.rt=null,this.ht.clear()},t.prototype.maxUploadRetryTime=function(){return this.lt},t.prototype.setMaxUploadRetryTime=function(t){this.lt=t},t.prototype.maxOperationRetryTime=function(){return this.ct},t.prototype.setMaxOperationRetryTime=function(t){this.ct=t},t}(),Ue=function(){function t(t,e,n,r,o,i,a,s,u,c,l){this.pt=null,this.ft=null,this.y=null,this.R=null,this.dt=!1,this._t=!1,this.vt=t,this.bt=e,this.mt=n,this.gt=r,this.yt=o.slice(),this.Rt=i.slice(),this.Et=a,this.wt=s,this.Ut=c,this.Tt=u,this.st=l;var h=this;this.D=P(function(t,e){h.y=t,h.R=e,h.M()})}return t.prototype.M=function(){function t(t,e){function r(t){var e=t.loaded,r=t.lengthComputable?t.total:-1;null!==n.Ut&&n.Ut(e,r)}if(e)return void t(!1,new Te(!1,null,!0));var o=n.st.createXhrIo();n.pt=o,null!==n.Ut&&o.addUploadProgressListener®,o.send(n.vt,n.bt,n.gt,n.mt).then(function(e){null!==n.Ut&&e.removeUploadProgressListener®,n.pt=null,e=e;var o=e.getErrorCode()===zt.NO_ERROR,i=e.getStatus();if(!o||n.At(i)){var a=e.getErrorCode()===zt.ABORT;return void t(!1,new Te(!1,null,a))}var s=yt(n.yt,i);t(!0,new Te(s,e))})}function e(t,e){var r=n.y,i=n.R,a=e.xhr;if(e.wasSuccessCode)try{var s=n.Et(a,a.getResponseText());W(s)?r(s):r()}catch(t){i(t)}else if(null!==a){var u=o();u.setServerResponseProp(a.getResponseText()),i(n.wt?n.wt(a,u):u)}else if(e.canceled){var u=n._t?m():l();i(u)}else{var u=c();i(u)}}var n=this;this.dt?e(!1,new Te(!1,null,!0)):this.ft=Wt(t,e,this.Tt)},t.prototype.getPromise=function(){return this.D},t.prototype.cancel=function(t){this.dt=!0,this._t=t||!1,null!==this.ft&&Bt(this.ft),null!==this.pt&&this.pt.abort()},t.prototype.At=function(t){var e=t>=500&&t<600,n=,r=yt(n,t),o=yt(this.Rt,t);return e||r||o},t}(),Te=function(){function t(t,e,n){this.wasSuccessCode=t,this.xhr=e,this.canceled=!!n}return t}(),Ae=function(){function t(t,e,n){function r(t,e){return new ye(t,e)}if(this.et=null,this.U=new we(t,r,qt,this,e),this.rt=t,null!=n)this.et=le.makeFromBucketSpec(n);else{var o=this.U.bucket();null!=o&&(this.et=new le(o,”“))}this.Nt=new Ne(this)}return t.prototype.ref=function(t){function e(t){if(/^+:///.test(t))throw”Expected child path but got a URL, use refFromURL instead.“}if(ct(”ref“,,arguments),null==this.et)throw Error(”No Storage Bucket defined in Firebase Options.“);var n=new ye(this.U,this.et);return null!=t?n.child(t):n},t.prototype.refFromURL=function(t){function e(t){if(!/^+:///.test(t))throw”Expected full URL but got a child path, use ref instead.“;try{le.makeFromUrl(t)}catch(t){throw”Expected valid full URL but got an invalid one.“}}return ct(”refFromURL“,,arguments),new ye(this.U,t)},Object.defineProperty(t.prototype,”maxUploadRetryTime“,{get:function(){return this.U.maxUploadRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxUploadRetryTime=function(t){ct(”setMaxUploadRetryTime“,,arguments),this.U.setMaxUploadRetryTime(t)},Object.defineProperty(t.prototype,”maxOperationRetryTime“,{get:function(){return this.U.maxOperationRetryTime()},enumerable:!0,configurable:!0}),t.prototype.setMaxOperationRetryTime=function(t){ct(”setMaxOperationRetryTime“,,arguments),this.U.setMaxOperationRetryTime(t)},Object.defineProperty(t.prototype,”app“,{get:function(){return this.rt},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,”INTERNAL“,{get:function(){return this.Nt},enumerable:!0,configurable:!0}),t}(),Ne=function(){function t(t){this.ut=t}return t.prototype.delete=function(){return this.ut.U.deleteApp(),x(void 0)},t}();e.registerStorage=Ht;var Oe=”storage“;Ht(Xt.default)}},[118])}catch(t){throw Error(”Cannot instantiate firebase-storage.js - be sure to load firebase-app.js first.“)}
//# sourceMappingURL=firebase.js.map