!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.firebase=e()}(this,function(){"use strict";!function(t){if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(t){return t&&DataView.prototype.isPrototypeOf(t)},i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};h.prototype.append=function(t,e){t=a(t),e=u(e);var n=this.map[t];this.map[t]=n?n+","+e:e},h.prototype.delete=function(t){delete this.map[a(t)]},h.prototype.get=function(t){return t=a(t),this.has(t)?this.map[t]:null},h.prototype.has=function(t){return this.map.hasOwnProperty(a(t))},h.prototype.set=function(t,e){this.map[a(t)]=u(e)},h.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},h.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},h.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},h.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},e.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];m.prototype.clone=function(){return new m(this,{body:this._bodyInit})},y.call(m.prototype),y.call(v.prototype),v.prototype.clone=function(){return new v(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},v.error=function(){var t=new v(null,{status:0,statusText:""});return t.type="error",t};var s=[301,302,303,307,308];v.redirect=function(t,e){if(-1===s.indexOf(e))throw new RangeError("Invalid status code");return new v(null,{status:e,headers:{location:t}})},t.Headers=h,t.Request=m,t.Response=v,t.fetch=function(t,n){return new Promise(function(r,i){var o=new m(t,n),s=new XMLHttpRequest;s.onload=function(){var t,e,n={status:s.status,statusText:s.statusText,headers:(t=s.getAllResponseHeaders()||"",e=new h,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var i="response"in s?s.response:s.responseText;r(new v(i,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.open(o.method,o.url,!0),"include"===o.credentials?s.withCredentials=!0:"omit"===o.credentials&&(s.withCredentials=!1),"responseType"in s&&e.blob&&(s.responseType="blob"),o.headers.forEach(function(t,e){s.setRequestHeader(e,t)}),s.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function a(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(n[Symbol.iterator]=function(){return n}),n}function h(t){this.map={},t instanceof h?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function l(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function f(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function p(t){var e=new FileReader,n=f(e);return e.readAsArrayBuffer(t),n}function d(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&r(t))this._bodyArrayBuffer=d(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!i(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=d(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=l(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?l(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(p)}),this.text=function(){var t,e,n,r=l(this);if(r)return r;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,n=f(e),e.readAsText(t),n;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r-1?r:n),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(i)}function g(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function v(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new h(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:void 0);var t=setTimeout;function e(){}function n(t){if(!(this instanceof n))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],a(t,this)}function r(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,n._immediateFn(function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void o(e.promise,t)}i(e.promise,r)}else(1===t._state?i:o)(e.promise,t._value)})):t._deferreds.push(e)}function i(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var r=e.then;if(e instanceof n)return t._state=3,t._value=e,void s(t);if("function"==typeof r)return void a((i=r,u=e,function(){i.apply(u,arguments)}),t)}t._state=1,t._value=e,s(t)}catch(e){o(t,e)}var i,u}function o(t,e){t._state=2,t._value=e,s(t)}function s(t){2===t._state&&0===t._deferreds.length&&n._immediateFn(function(){t._handled||n._unhandledRejectionFn(t._value)});for(var e=0,i=t._deferreds.length;e0?B:q)(t)},W=Math.min,j=function(t){return t>0?W(V(t),9007199254740991):0},K=Array.isArray||function(t){return"Array"==M(t)},Q=h["__core-js_shared__"]||(h["__core-js_shared__"]={}),H=function(t){return Q[t]||(Q[t]={})},G=c(function(t){var e=H("wks"),n=h.Symbol,r="function"==typeof n;(t.exports=function(t){return e[t]||(e[t]=r&&n[t]||(r?n:A)("Symbol."+t))}).store=e}),z=G("species"),Y=function(t,e){return new(function(t){var e;return K(t)&&("function"!=typeof(e=t.constructor)||e!==Array&&!K(e.prototype)||(e=void 0),f(e)&&null===(e=e[z])&&(e=void 0)),void 0===e?Array:e}(t))(e)},X=function(t,e){var n=1==t,r=2==t,i=3==t,o=4==t,s=6==t,a=5==t||s,u=e||Y;return function(e,c,h){for(var l,f,p=U(e),d=x(p),y=R(c,h,3),m=j(d.length),g=0,v=n?u(e,m):r?u(e,0):void 0;m>g;g++)if((a||g in d)&&(f=y(l=d[g],g,p),t))if(n)v[g]=f;else if(f)switch(t){case 3:return!0;case 5:return l;case 6:return g;case 2:v.push(l)}else if(o)return!1;return s?-1:i||o?o:v}},J=G("unscopables"),$=Array.prototype;void 0==$[J]&&S($,J,{});var Z=function(t){$[J][t]=!0},tt=X(5),et=!0;"find"in[]&&Array(1).find(function(){et=!1}),P(P.P+P.F*et,"Array",{find:function(t){return tt(this,t,arguments.length>1?arguments[1]:void 0)}}),Z("find");l.Array.find;var nt=X(6),rt=!0;"findIndex"in[]&&Array(1).findIndex(function(){rt=!1}),P(P.P+P.F*rt,"Array",{findIndex:function(t){return nt(this,t,arguments.length>1?arguments[1]:void 0)}}),Z("findIndex");l.Array.findIndex;var it,ot=function(t){return x(F(t))},st=Math.max,at=Math.min,ut=H("keys"),ct=function(t){return ut[t]||(ut[t]=A(t))},ht=(it=!1,function(t,e,n){var r,i=ot(t),o=j(i.length),s=function(t,e){return(t=V(t))<0?st(t+e,0):at(t,e)}(n,o);if(it&&e!=e){for(;o>s;)if((r=i[s++])!=r)return!0}else for(;o>s;s++)if((it||s in i)&&i[s]===e)return it||s||0;return!it&&-1}),lt=ct("IE_PROTO"),ft=function(t,e){var n,r=ot(t),i=0,o=[];for(n in r)n!=lt&&C(r,n)&&o.push(n);for(;e.length>i;)C(r,n=e[i++])&&(~ht(o,n)||o.push(n));return o},pt="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),dt=Object.keys||function(t){return ft(t,pt)},yt={f:Object.getOwnPropertySymbols},mt={f:{}.propertyIsEnumerable},gt=Object.assign,vt=!gt||d(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=gt({},t)[n]||Object.keys(gt({},e)).join("")!=r})?function(t,e){for(var n=U(t),r=arguments.length,i=1,o=yt.f,s=mt.f;r>i;)for(var a,u=x(arguments[i++]),c=o?dt(u).concat(o(u)):dt(u),h=c.length,l=0;h>l;)s.call(u,a=c[l++])&&(n[a]=u[a]);return n}:gt;P(P.S+P.F,"Object",{assign:vt});l.Object.assign;var bt=G("match"),_t=function(t,e,n){if(f(r=e)&&(void 0!==(i=r[bt])?i:"RegExp"==M(r)))throw TypeError("String#"+n+" doesn't accept regex!");var r,i;return String(F(t))},wt=G("match"),Et="".startsWith;P(P.P+P.F*function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[wt]=!1,!"/./"[t](e)}catch(t){}}return!0}("startsWith"),"String",{startsWith:function(t){var e=_t(this,t,"startsWith"),n=j(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return Et?Et.call(e,r,n):e.slice(n,n+r.length)===r}});l.String.startsWith;P(P.P,"String",{repeat:function(t){var e=String(F(this)),n="",r=V(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}});l.String.repeat;var Tt=c(function(t){var e=A("meta"),n=E.f,r=0,i=Object.isExtensible||function(){return!0},o=!d(function(){return i(Object.preventExtensions({}))}),s=function(t){n(t,e,{value:{i:"O"+ ++r,w:{}}})},a=t.exports={KEY:e,NEED:!1,fastKey:function(t,n){if(!f(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!C(t,e)){if(!i(t))return"F";if(!n)return"E";s(t)}return t[e].i},getWeak:function(t,n){if(!C(t,e)){if(!i(t))return!0;if(!n)return!1;s(t)}return t[e].w},onFreeze:function(t){return o&&a.NEED&&i(t)&&!C(t,e)&&s(t),t}}}),St=(Tt.KEY,Tt.NEED,Tt.fastKey,Tt.getWeak,Tt.onFreeze,E.f),It=G("toStringTag"),Ct=function(t,e,n){t&&!C(t=n?t:t.prototype,It)&&St(t,It,{configurable:!0,value:e})},Nt={f:G},Dt=E.f,At=function(t){var e=l.Symbol||(l.Symbol=h.Symbol||{});"_"==t.charAt(0)||t in e||Dt(e,t,{value:Nt.f(t)})},kt=y?Object.defineProperties:function(t,e){p(t);for(var n,r=dt(e),i=r.length,o=0;i>o;)E.f(t,n=r[o++],e[n]);return t},Rt=h.document,Ot=Rt&&Rt.documentElement,Pt=ct("IE_PROTO"),Lt=function(){},Mt=function(){var t,e=v("iframe"),n=pt.length;for(e.style.display="none",Ot.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("