reactfire 4.2.3-exp.4329c43 → 4.2.3-exp.85cb2bb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,19 +1,19 @@
1
- (function(l,W){typeof exports=="object"&&typeof module<"u"?W(exports,require("react"),require("firebase/auth"),require("firebase/database"),require("firebase/app"),require("firebase/firestore"),require("firebase/functions"),require("firebase/storage"),require("firebase/remote-config")):typeof define=="function"&&define.amd?define(["exports","react","firebase/auth","firebase/database","firebase/app","firebase/firestore","firebase/functions","firebase/storage","firebase/remote-config"],W):(l=typeof globalThis<"u"?globalThis:l||self,W(l.ReactFire={},l.React,l.auth,l.database,l.app,l.firestore,l.functions,l.storage,l.remoteConfig))})(this,function(l,W,Qt,$,Z,Ge,Ht,ze,V){"use strict";function Kt(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=Kt(W);var Se=function(e,t){return Se=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Se(e,t)};function I(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Se(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Yt(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function _e(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function a(f){try{c(r.next(f))}catch(v){u(v)}}function s(f){try{c(r.throw(f))}catch(v){u(v)}}function c(f){f.done?o(f.value):i(f.value).then(a,s)}c((r=r.apply(e,t||[])).next())})}function Je(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(c){return function(f){return s([c,f])}}function s(c){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function M(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function R(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],u;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){u={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return o}function x(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function L(e){return this instanceof L?(this.v=e,this):new L(e)}function Gt(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(h){r[h]&&(i[h]=function(y){return new Promise(function(C,p){o.push([h,y,C,p])>1||a(h,y)})})}function a(h,y){try{s(r[h](y))}catch(C){v(o[0][3],C)}}function s(h){h.value instanceof L?Promise.resolve(h.value.v).then(c,f):v(o[0][2],h)}function c(h){a("next",h)}function f(h){a("throw",h)}function v(h,y){h(y),o.shift(),o.length&&a(o[0][0],o[0][1])}}function zt(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof M=="function"?M(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(u){return new Promise(function(a,s){u=e[o](u),i(a,s,u.done,u.value)})}}function i(o,u,a,s){Promise.resolve(s).then(function(c){o({value:c,done:a})},u)}}function b(e){return typeof e=="function"}function Ce(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ee=Ce(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
1
+ (function(l,M){typeof exports=="object"&&typeof module<"u"?M(exports,require("react"),require("firebase/auth"),require("firebase/database"),require("firebase/app"),require("firebase/firestore"),require("firebase/functions"),require("firebase/storage"),require("firebase/remote-config")):typeof define=="function"&&define.amd?define(["exports","react","firebase/auth","firebase/database","firebase/app","firebase/firestore","firebase/functions","firebase/storage","firebase/remote-config"],M):(l=typeof globalThis<"u"?globalThis:l||self,M(l.ReactFire={},l.React,l.auth,l.database,l.app,l.firestore,l.functions,l.storage,l.remoteConfig))})(this,function(l,M,Zt,N,re,et,Xt,tt,H){"use strict";function en(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const h=en(M);var Ce=function(e,t){return Ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},Ce(e,t)};function x(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Ce(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function tn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Oe(e,t,n,r){function i(o){return o instanceof n?o:new n(function(u){u(o)})}return new(n||(n=Promise))(function(o,u){function a(f){try{c(r.next(f))}catch(d){u(d)}}function s(f){try{c(r.throw(f))}catch(d){u(d)}}function c(f){f.done?o(f.value):i(f.value).then(a,s)}c((r=r.apply(e,t||[])).next())})}function nt(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,u;return u={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function a(c){return function(f){return s([c,f])}}function s(c){if(r)throw new TypeError("Generator is already executing.");for(;u&&(u=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function G(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function q(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],u;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(a){u={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(u)throw u.error}}return o}function W(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function Q(e){return this instanceof Q?(this.v=e,this):new Q(e)}function nn(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r=n.apply(e,t||[]),i,o=[];return i={},u("next"),u("throw"),u("return"),i[Symbol.asyncIterator]=function(){return this},i;function u(v){r[v]&&(i[v]=function(m){return new Promise(function(_,p){o.push([v,m,_,p])>1||a(v,m)})})}function a(v,m){try{s(r[v](m))}catch(_){d(o[0][3],_)}}function s(v){v.value instanceof Q?Promise.resolve(v.value.v).then(c,f):d(o[0][2],v)}function c(v){a("next",v)}function f(v){a("throw",v)}function d(v,m){v(m),o.shift(),o.length&&a(o[0][0],o[0][1])}}function rn(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof G=="function"?G(e):e[Symbol.iterator](),n={},r("next"),r("throw"),r("return"),n[Symbol.asyncIterator]=function(){return this},n);function r(o){n[o]=e[o]&&function(u){return new Promise(function(a,s){u=e[o](u),i(a,s,u.done,u.value)})}}function i(o,u,a,s){Promise.resolve(s).then(function(c){o({value:c,done:a})},u)}}typeof SuppressedError=="function"&&SuppressedError;function g(e){return typeof e=="function"}function Ie(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Ae=Ie(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
2
2
  `+n.map(function(r,i){return i+1+") "+r.toString()}).join(`
3
- `):"",this.name="UnsubscriptionError",this.errors=n}});function B(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Q=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var a=M(u),s=a.next();!s.done;s=a.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else u.remove(this);var f=this.initialTeardown;if(b(f))try{f()}catch(p){o=p instanceof Ee?p.errors:[p]}var v=this._finalizers;if(v){this._finalizers=null;try{for(var h=M(v),y=h.next();!y.done;y=h.next()){var C=y.value;try{Xe(C)}catch(p){o=o!=null?o:[],p instanceof Ee?o=x(x([],R(o)),R(p.errors)):o.push(p)}}}catch(p){r={error:p}}finally{try{y&&!y.done&&(i=h.return)&&i.call(h)}finally{if(r)throw r.error}}}if(o)throw new Ee(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)Xe(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&B(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&B(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),Ze=Q.EMPTY;function Be(e){return e instanceof Q||e&&"closed"in e&&b(e.remove)&&b(e.add)&&b(e.unsubscribe)}function Xe(e){b(e)?e():e.unsubscribe()}var Ie={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ke={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ke.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,x([e,t],R(n))):setTimeout.apply(void 0,x([e,t],R(n)))},clearTimeout:function(e){var t=ke.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function et(e){ke.setTimeout(function(){throw e})}function Oe(){}var X=null;function ee(e){if(Ie.useDeprecatedSynchronousErrorHandling){var t=!X;if(t&&(X={errorThrown:!1,error:null}),e(),t){var n=X,r=n.errorThrown,i=n.error;if(X=null,r)throw i}}else e()}var Fe=function(e){I(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,Be(n)&&n.add(r)):r.destination=Xt,r}return t.create=function(n,r,i){return new H(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Q),Jt=Function.prototype.bind;function Ae(e,t){return Jt.call(e,t)}var Zt=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){te(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){te(r)}else te(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){te(n)}},e}(),H=function(e){I(t,e);function t(n,r,i){var o=e.call(this)||this,u;if(b(n)||!n)u={next:n!=null?n:void 0,error:r!=null?r:void 0,complete:i!=null?i:void 0};else{var a;o&&Ie.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},u={next:n.next&&Ae(n.next,a),error:n.error&&Ae(n.error,a),complete:n.complete&&Ae(n.complete,a)}):u=n}return o.destination=new Zt(u),o}return t}(Fe);function te(e){et(e)}function Bt(e){throw e}var Xt={closed:!0,next:Oe,error:Bt,complete:Oe},Pe=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function K(e){return e}function en(e){return e.length===0?K:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var g=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=nn(t)?t:new H(t,n,r);return ee(function(){var u=i,a=u.operator,s=u.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=tt(n),new n(function(i,o){var u=new H({next:function(a){try{t(a)}catch(s){o(s),u.unsubscribe()}},error:o,complete:i});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Pe]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return en(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=tt(t),new t(function(r,i){var o;n.subscribe(function(u){return o=u},function(u){return i(u)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function tt(e){var t;return(t=e!=null?e:Ie.Promise)!==null&&t!==void 0?t:Promise}function tn(e){return e&&b(e.next)&&b(e.error)&&b(e.complete)}function nn(e){return e&&e instanceof Fe||tn(e)&&Be(e)}function rn(e){return b(e==null?void 0:e.lift)}function S(e){return function(t){if(rn(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function _(e,t,n,r,i){return new on(e,t,n,r,i)}var on=function(e){I(t,e);function t(n,r,i,o,u,a){var s=e.call(this,n)||this;return s.onFinalize=u,s.shouldUnsubscribe=a,s._next=r?function(c){try{r(c)}catch(f){n.error(f)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(Fe),un=Ce(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ne=function(e){I(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new nt(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new un},t.prototype.next=function(n){var r=this;ee(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=M(r.currentObservers),a=u.next();!a.done;a=u.next()){var s=a.value;s.next(n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;ee(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;ee(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,u=i.isStopped,a=i.observers;return o||u?Ze:(this.currentObservers=null,a.push(n),new Q(function(){r.currentObservers=null,B(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,u=r.isStopped;i?n.error(o):u&&n.complete()},t.prototype.asObservable=function(){var n=new g;return n.source=this,n},t.create=function(n,r){return new nt(n,r)},t}(g),nt=function(e){I(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:Ze},t}(ne),De={now:function(){return(De.delegate||Date).now()},delegate:void 0},an=function(e){I(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=De);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,u=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;i||(o.push(n),!u&&o.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,u=i._buffer,a=u.slice(),s=0;s<a.length&&!n.closed;s+=o?1:2)n.next(a[s]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,u=n._infiniteTimeWindow,a=(u?1:2)*r;if(r<1/0&&a<o.length&&o.splice(0,o.length-a),!u){for(var s=i.now(),c=0,f=1;f<o.length&&o[f]<=s;f+=2)c=f;c&&o.splice(0,c+1)}},t}(ne),sn=function(e){I(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(Q),re={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=re.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,x([e,t],R(n))):setInterval.apply(void 0,x([e,t],R(n)))},clearInterval:function(e){var t=re.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},cn=function(e){I(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){if(r===void 0&&(r=0),this.closed)return this;this.state=n;var i=this.id,o=this.scheduler;return i!=null&&(this.id=this.recycleAsyncId(o,i,r)),this.pending=!0,this.delay=r,this.id=this.id||this.requestAsyncId(o,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),re.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;re.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(u){i=!0,o=u||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,B(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(sn),rt=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=De.now,e}(),ln=function(e){I(t,e);function t(n,r){r===void 0&&(r=rt.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i._scheduled=void 0,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(rt),Te=new ln(cn),fn=Te,$e=new g(function(e){return e.complete()});function dn(e){return e?vn(e):$e}function vn(e){return new g(function(t){return e.schedule(function(){return t.complete()})})}function it(e){return e&&b(e.schedule)}function ot(e){return e[e.length-1]}function Re(e){return it(ot(e))?e.pop():void 0}function hn(e,t){return typeof ot(e)=="number"?e.pop():t}var ut=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function at(e){return b(e==null?void 0:e.then)}function st(e){return b(e[Pe])}function ct(e){return Symbol.asyncIterator&&b(e==null?void 0:e[Symbol.asyncIterator])}function lt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function pn(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var ft=pn();function dt(e){return b(e==null?void 0:e[ft])}function vt(e){return Gt(this,arguments,function(){var n,r,i,o;return Je(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,L(n.read())];case 3:return r=u.sent(),i=r.value,o=r.done,o?[4,L(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,L(i)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function ht(e){return b(e==null?void 0:e.getReader)}function k(e){if(e instanceof g)return e;if(e!=null){if(st(e))return bn(e);if(ut(e))return mn(e);if(at(e))return yn(e);if(ct(e))return pt(e);if(dt(e))return gn(e);if(ht(e))return wn(e)}throw lt(e)}function bn(e){return new g(function(t){var n=e[Pe]();if(b(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function mn(e){return new g(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function yn(e){return new g(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,et)})}function gn(e){return new g(function(t){var n,r;try{for(var i=M(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function pt(e){return new g(function(t){Sn(e,t).catch(function(n){return t.error(n)})})}function wn(e){return pt(vt(e))}function Sn(e,t){var n,r,i,o;return _e(this,void 0,void 0,function(){var u,a;return Je(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=zt(e),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function T(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function bt(e,t){return t===void 0&&(t=0),S(function(n,r){n.subscribe(_(r,function(i){return T(r,e,function(){return r.next(i)},t)},function(){return T(r,e,function(){return r.complete()},t)},function(i){return T(r,e,function(){return r.error(i)},t)}))})}function mt(e,t){return t===void 0&&(t=0),S(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function _n(e,t){return k(e).pipe(mt(t),bt(t))}function Cn(e,t){return k(e).pipe(mt(t),bt(t))}function En(e,t){return new g(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function In(e,t){return new g(function(n){var r;return T(n,t,function(){r=e[ft](),T(n,t,function(){var i,o,u;try{i=r.next(),o=i.value,u=i.done}catch(a){n.error(a);return}u?n.complete():n.next(o)},0,!0)}),function(){return b(r==null?void 0:r.return)&&r.return()}})}function yt(e,t){if(!e)throw new Error("Iterable cannot be null");return new g(function(n){T(n,t,function(){var r=e[Symbol.asyncIterator]();T(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function kn(e,t){return yt(vt(e),t)}function On(e,t){if(e!=null){if(st(e))return _n(e,t);if(ut(e))return En(e,t);if(at(e))return Cn(e,t);if(ct(e))return yt(e,t);if(dt(e))return In(e,t);if(ht(e))return kn(e,t)}throw lt(e)}function O(e,t){return t?On(e,t):k(e)}function ie(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Re(e);return O(e,n)}var gt=Ce(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function Fn(e){return e instanceof Date&&!isNaN(e)}function E(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){r.next(e.call(t,o,i++))}))})}function An(e,t,n,r,i,o,u,a){var s=[],c=0,f=0,v=!1,h=function(){v&&!s.length&&!c&&t.complete()},y=function(p){return c<r?C(p):s.push(p)},C=function(p){o&&t.next(p),c++;var U=!1;k(n(p,f++)).subscribe(_(t,function(D){i==null||i(D),o?y(D):t.next(D)},function(){U=!0},void 0,function(){if(U)try{c--;for(var D=function(){var q=s.shift();u?T(t,u,function(){return C(q)}):C(q)};s.length&&c<r;)D();h()}catch(q){t.error(q)}}))};return e.subscribe(_(t,y,function(){v=!0,h()})),function(){a==null||a()}}function xe(e,t,n){return n===void 0&&(n=1/0),b(t)?xe(function(r,i){return E(function(o,u){return t(r,o,i,u)})(k(e(r,i)))},n):(typeof t=="number"&&(n=t),S(function(r,i){return An(r,i,e,n)}))}function wt(e){return e===void 0&&(e=1/0),xe(K,e)}function Pn(){return wt(1)}function Dn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Pn()(O(e,Re(e)))}function Tn(e,t,n){e===void 0&&(e=0),n===void 0&&(n=fn);var r=-1;return t!=null&&(it(t)?n=t:r=t),new g(function(i){var o=Fn(e)?+e-n.now():e;o<0&&(o=0);var u=0;return n.schedule(function(){i.closed||(i.next(u++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function $n(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=Re(e),r=hn(e,1/0),i=e;return i.length?i.length===1?k(i[0]):wt(r)(O(i,n)):$e}function Rn(e,t){return S(function(n,r){var i=0;n.subscribe(_(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function St(e){return S(function(t,n){var r=null,i=!1,o;r=t.subscribe(_(n,void 0,void 0,function(u){o=k(e(u,St(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function xn(e,t,n,r,i){return function(o,u){var a=n,s=t,c=0;o.subscribe(_(u,function(f){var v=c++;s=a?e(s,f,v):(a=!0,f),r&&u.next(s)},i&&function(){a&&u.next(s),u.complete()}))}}function jn(e,t){return t===void 0&&(t=Te),S(function(n,r){var i=null,o=null,u=null,a=function(){if(i){i.unsubscribe(),i=null;var c=o;o=null,r.next(c)}};function s(){var c=u+e,f=t.now();if(f<c){i=this.schedule(void 0,c-f),r.add(i);return}a()}n.subscribe(_(r,function(c){o=c,u=t.now(),i||(i=t.schedule(s,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function Un(e){return S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){r||n.next(e),n.complete()}))})}function je(e){return e<=0?function(){return $e}:S(function(t,n){var r=0;t.subscribe(_(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Vn(){return S(function(e,t){e.subscribe(_(t,Oe))})}function Mn(e){return E(function(){return e})}function _t(e,t){return t?function(n){return Dn(t.pipe(je(1),Vn()),n.pipe(_t(e)))}:xe(function(n,r){return e(n,r).pipe(je(1),Mn(n))})}function Ln(e,t){t===void 0&&(t=Te);var n=Tn(e,t);return _t(function(){return n})}function Nn(e,t){return t===void 0&&(t=K),e=e!=null?e:qn,S(function(n,r){var i,o=!0;n.subscribe(_(r,function(u){var a=t(u);(o||!e(i,a))&&(o=!1,i=a,r.next(u))}))})}function qn(e,t){return e===t}function Wn(e){return e===void 0&&(e=Qn),S(function(t,n){var r=!1;t.subscribe(_(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(e())}))})}function Qn(){return new gt}function Ct(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?Rn(function(i,o){return e(i,o,r)}):K,je(1),n?Un(t):Wn(function(){return new gt}))}}function Hn(e,t){return S(xn(e,t,arguments.length>=2,!0))}function Kn(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new ne}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,u=o===void 0?!0:o,a=e.resetOnRefCountZero,s=a===void 0?!0:a;return function(c){var f,v,h,y=0,C=!1,p=!1,U=function(){v==null||v.unsubscribe(),v=void 0},D=function(){U(),f=h=void 0,C=p=!1},q=function(){var J=f;D(),J==null||J.unsubscribe()};return S(function(J,Wt){y++,!p&&!C&&U();var ge=h=h!=null?h:n();Wt.add(function(){y--,y===0&&!p&&!C&&(v=Ue(q,s))}),ge.subscribe(Wt),!f&&y>0&&(f=new H({next:function(we){return ge.next(we)},error:function(we){p=!0,U(),v=Ue(D,i,we),ge.error(we)},complete:function(){C=!0,U(),v=Ue(D,u),ge.complete()}}),k(J).subscribe(f))})(c)}}function Ue(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new H({next:function(){i.unsubscribe(),e()}});return t.apply(void 0,x([],R(n))).subscribe(i)}}function Yn(e,t,n){var r,i,o,u,a=!1;return e&&typeof e=="object"?(r=e.bufferSize,u=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,a=o===void 0?!1:o,n=e.scheduler):u=e!=null?e:1/0,Kn({connector:function(){return new an(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Et(e,t){return S(function(n,r){var i=null,o=0,u=!1,a=function(){return u&&!i&&r.complete()};n.subscribe(_(r,function(s){i==null||i.unsubscribe();var c=0,f=o++;k(e(s,f)).subscribe(i=_(r,function(v){return r.next(t?t(s,v,f,c++):v)},function(){i=null,a()}))},function(){u=!0,a()}))})}function Gn(e,t,n){var r=b(e)||t||n?{next:e,error:t,complete:n}:e;return r?S(function(i,o){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var a=!0;i.subscribe(_(o,function(s){var c;(c=r.next)===null||c===void 0||c.call(r,s),o.next(s)},function(){var s;a=!1,(s=r.complete)===null||s===void 0||s.call(r),o.complete()},function(s){var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,s),o.error(s)},function(){var s,c;a&&((s=r.unsubscribe)===null||s===void 0||s.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):K}function Ve(e){return new g(function(t){var n=Qt.onIdTokenChanged(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:n}})}const zn="[DEFAULT]",It=d.createContext(void 0),Me=d.createContext(!1),kt="4.2.3-exp.4329c43",Jn=(e,t)=>e===t||[...Object.keys(e),...Object.keys(t)].every(n=>e[n]===t[n]);function Zn(e){const{firebaseConfig:t,appName:n,suspense:r}=e,i=d.useMemo(()=>{if(e.firebaseApp)return e.firebaseApp;const o=Z.getApps().find(u=>u.name===(n||zn));if(o){if(t&&Jn(o.options,t))return o;throw new Error(`Does not match the options already provided to the ${n||"default"} firebase app instance, give this new instance a different appName.`)}else{if(!t)throw new Error("No firebaseConfig provided");const u=d.version||"unknown";return Z.registerVersion("react",u),Z.registerVersion("reactfire",kt),Z.initializeApp(t,n)}},[e.firebaseApp,t,n]);return d.createElement(It.Provider,{value:i},d.createElement(Me.Provider,Object.assign({value:r!=null?r:!1},e)))}function Bn(){const e=d.useContext(Me);return e!=null?e:!1}function Y(e){let t=d.useContext(Me);return e!==void 0?e:t}function Le(){const e=d.useContext(It);if(!e)throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");return e}function Xn(e){return _e(this,void 0,void 0,function*(){const t=yield e();return se(Ve(t),`auth:user:${t.name}`).toPromise()})}function Ot(e){const t=Ke(),n=`auth:user:${t.name}`,r=Ve(t);return w(n,r,e)}function Ft(e,t=!1,n){if(!e)throw new Error("you must provide a user");const r=`auth:idTokenResult:${e.uid}:forceRefresh=${t}`,i=O(e.getIdTokenResult(t));return w(r,i,n)}function er(e){if((e==null?void 0:e.hasOwnProperty("requiredClaims"))&&(e==null?void 0:e.hasOwnProperty("validateCustomClaims")))throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');const t=Ke();let n=`auth:signInCheck:${t.name}::forceRefresh:${!!(e!=null&&e.forceRefresh)}`;e!=null&&e.forceRefresh&&(n=`${n}:forceRefresh:${e.forceRefresh}`),e!=null&&e.hasOwnProperty("requiredClaims")?n=`${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}`:e!=null&&e.hasOwnProperty("validateCustomClaims")&&(n=`${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);const r=Ve(t).pipe(Et(i=>{var o;return i?e&&(e.hasOwnProperty("requiredClaims")||e.hasOwnProperty("validateCustomClaims"))?O(i.getIdTokenResult((o=e==null?void 0:e.forceRefresh)!==null&&o!==void 0?o:!1)).pipe(E(u=>{let a;e.hasOwnProperty("requiredClaims")?a=tr(e.requiredClaims):a=e.validateCustomClaims;const{hasRequiredClaims:s,errors:c}=a(u.claims);return{signedIn:!0,hasRequiredClaims:s,errors:c,user:i}})):ie({signedIn:!0,hasRequiredClaims:!0,errors:{},user:i}):ie({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})}));return w(n,r,e)}function tr(e){return function(n){const r={};return Object.keys(e).forEach(i=>{e[i]!==n[i]&&(r[i]=[new ye("auth/missing-claim",`Expected "${e[i]}", but user has "${n[i]}" instead`)])}),{hasRequiredClaims:Object.keys(r).length===0,errors:r}}}function At({user:e,fallback:t,children:n,requiredClaims:r}){const{data:i}=Ft(e,!1),{claims:o}=i,u={};return Y()||console.warn("ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r&&Object.keys(r).forEach(s=>{var c;r[s]!==o[s]&&(u[s]={expected:r[s],actual:(c=o[s])===null||c===void 0?void 0:c.toString()})}),Object.keys(u).length===0?d.createElement(d.Fragment,null,n):d.createElement(d.Fragment,null,t)}function nr({fallback:e,children:t,requiredClaims:n}){const{data:r}=Ot();return Y()||console.warn("AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r?n?d.createElement(At,{user:r,fallback:e,requiredClaims:n},t):d.createElement(d.Fragment,null,t):d.createElement(d.Fragment,null,e)}/*! *****************************************************************************
4
- Copyright (c) Microsoft Corporation.
3
+ `):"",this.name="UnsubscriptionError",this.errors=n}});function ie(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var B=function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,i,o;if(!this.closed){this.closed=!0;var u=this._parentage;if(u)if(this._parentage=null,Array.isArray(u))try{for(var a=G(u),s=a.next();!s.done;s=a.next()){var c=s.value;c.remove(this)}}catch(p){t={error:p}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else u.remove(this);var f=this.initialTeardown;if(g(f))try{f()}catch(p){o=p instanceof Ae?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var v=G(d),m=v.next();!m.done;m=v.next()){var _=m.value;try{ot(_)}catch(p){o=o??[],p instanceof Ae?o=W(W([],q(o)),q(p.errors)):o.push(p)}}}catch(p){r={error:p}}finally{try{m&&!m.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}}if(o)throw new Ae(o)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)ot(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&ie(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&ie(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=function(){var t=new e;return t.closed=!0,t}(),e}(),rt=B.EMPTY;function it(e){return e instanceof B||e&&"closed"in e&&g(e.remove)&&g(e.add)&&g(e.unsubscribe)}function ot(e){g(e)?e():e.unsubscribe()}var ut={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},ke={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=ke.delegate;return i!=null&&i.setTimeout?i.setTimeout.apply(i,W([e,t],q(n))):setTimeout.apply(void 0,W([e,t],q(n)))},clearTimeout:function(e){var t=ke.delegate;return((t==null?void 0:t.clearTimeout)||clearTimeout)(e)},delegate:void 0};function at(e){ke.setTimeout(function(){throw e})}function Fe(){}function oe(e){e()}var Pe=function(e){x(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,it(n)&&n.add(r)):r.destination=sn,r}return t.create=function(n,r,i){return new z(n,r,i)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(B),on=Function.prototype.bind;function De(e,t){return on.call(e,t)}var un=function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){ue(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){ue(r)}else ue(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){ue(n)}},e}(),z=function(e){x(t,e);function t(n,r,i){var o=e.call(this)||this,u;if(g(n)||!n)u={next:n??void 0,error:r??void 0,complete:i??void 0};else{var a;o&&ut.useDeprecatedNextContext?(a=Object.create(n),a.unsubscribe=function(){return o.unsubscribe()},u={next:n.next&&De(n.next,a),error:n.error&&De(n.error,a),complete:n.complete&&De(n.complete,a)}):u=n}return o.destination=new un(u),o}return t}(Pe);function ue(e){at(e)}function an(e){throw e}var sn={closed:!0,next:Fe,error:an,complete:Fe},Te=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function J(e){return e}function cn(e){return e.length===0?J:e.length===1?e[0]:function(n){return e.reduce(function(r,i){return i(r)},n)}}var E=function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var i=this,o=fn(t)?t:new z(t,n,r);return oe(function(){var u=i,a=u.operator,s=u.source;o.add(a?a.call(o,s):s?i._subscribe(o):i._trySubscribe(o))}),o},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=st(n),new n(function(i,o){var u=new z({next:function(a){try{t(a)}catch(s){o(s),u.unsubscribe()}},error:o,complete:i});r.subscribe(u)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[Te]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return cn(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=st(t),new t(function(r,i){var o;n.subscribe(function(u){return o=u},function(u){return i(u)},function(){return r(o)})})},e.create=function(t){return new e(t)},e}();function st(e){var t;return(t=e??ut.Promise)!==null&&t!==void 0?t:Promise}function ln(e){return e&&g(e.next)&&g(e.error)&&g(e.complete)}function fn(e){return e&&e instanceof Pe||ln(e)&&it(e)}function dn(e){return g(e==null?void 0:e.lift)}function O(e){return function(t){if(dn(t))return t.lift(function(n){try{return e(n,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function I(e,t,n,r,i){return new vn(e,t,n,r,i)}var vn=function(e){x(t,e);function t(n,r,i,o,u,a){var s=e.call(this,n)||this;return s.onFinalize=u,s.shouldUnsubscribe=a,s._next=r?function(c){try{r(c)}catch(f){n.error(f)}}:e.prototype._next,s._error=o?function(c){try{o(c)}catch(f){n.error(f)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=i?function(){try{i()}catch(c){n.error(c)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&((n=this.onFinalize)===null||n===void 0||n.call(this))}},t}(Pe),hn=Ie(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),ae=function(e){x(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new ct(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new hn},t.prototype.next=function(n){var r=this;oe(function(){var i,o;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var u=G(r.currentObservers),a=u.next();!a.done;a=u.next()){var s=a.value;s.next(n)}}catch(c){i={error:c}}finally{try{a&&!a.done&&(o=u.return)&&o.call(u)}finally{if(i)throw i.error}}}})},t.prototype.error=function(n){var r=this;oe(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var i=r.observers;i.length;)i.shift().error(n)}})},t.prototype.complete=function(){var n=this;oe(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,i=this,o=i.hasError,u=i.isStopped,a=i.observers;return o||u?rt:(this.currentObservers=null,a.push(n),new B(function(){r.currentObservers=null,ie(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,i=r.hasError,o=r.thrownError,u=r.isStopped;i?n.error(o):u&&n.complete()},t.prototype.asObservable=function(){var n=new E;return n.source=this,n},t.create=function(n,r){return new ct(n,r)},t}(E),ct=function(e){x(t,e);function t(n,r){var i=e.call(this)||this;return i.destination=n,i.source=r,i}return t.prototype.next=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.next)===null||i===void 0||i.call(r,n)},t.prototype.error=function(n){var r,i;(i=(r=this.destination)===null||r===void 0?void 0:r.error)===null||i===void 0||i.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,i;return(i=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&i!==void 0?i:rt},t}(ae),xe={now:function(){return(xe.delegate||Date).now()},delegate:void 0},pn=function(e){x(t,e);function t(n,r,i){n===void 0&&(n=1/0),r===void 0&&(r=1/0),i===void 0&&(i=xe);var o=e.call(this)||this;return o._bufferSize=n,o._windowTime=r,o._timestampProvider=i,o._buffer=[],o._infiniteTimeWindow=!0,o._infiniteTimeWindow=r===1/0,o._bufferSize=Math.max(1,n),o._windowTime=Math.max(1,r),o}return t.prototype.next=function(n){var r=this,i=r.isStopped,o=r._buffer,u=r._infiniteTimeWindow,a=r._timestampProvider,s=r._windowTime;i||(o.push(n),!u&&o.push(a.now()+s)),this._trimBuffer(),e.prototype.next.call(this,n)},t.prototype._subscribe=function(n){this._throwIfClosed(),this._trimBuffer();for(var r=this._innerSubscribe(n),i=this,o=i._infiniteTimeWindow,u=i._buffer,a=u.slice(),s=0;s<a.length&&!n.closed;s+=o?1:2)n.next(a[s]);return this._checkFinalizedStatuses(n),r},t.prototype._trimBuffer=function(){var n=this,r=n._bufferSize,i=n._timestampProvider,o=n._buffer,u=n._infiniteTimeWindow,a=(u?1:2)*r;if(r<1/0&&a<o.length&&o.splice(0,o.length-a),!u){for(var s=i.now(),c=0,f=1;f<o.length&&o[f]<=s;f+=2)c=f;c&&o.splice(0,c+1)}},t}(ae),mn=function(e){x(t,e);function t(n,r){return e.call(this)||this}return t.prototype.schedule=function(n,r){return this},t}(B),se={setInterval:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=se.delegate;return i!=null&&i.setInterval?i.setInterval.apply(i,W([e,t],q(n))):setInterval.apply(void 0,W([e,t],q(n)))},clearInterval:function(e){var t=se.delegate;return((t==null?void 0:t.clearInterval)||clearInterval)(e)},delegate:void 0},bn=function(e){x(t,e);function t(n,r){var i=e.call(this,n,r)||this;return i.scheduler=n,i.work=r,i.pending=!1,i}return t.prototype.schedule=function(n,r){var i;if(r===void 0&&(r=0),this.closed)return this;this.state=n;var o=this.id,u=this.scheduler;return o!=null&&(this.id=this.recycleAsyncId(u,o,r)),this.pending=!0,this.delay=r,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(u,this.id,r),this},t.prototype.requestAsyncId=function(n,r,i){return i===void 0&&(i=0),se.setInterval(n.flush.bind(n,this),i)},t.prototype.recycleAsyncId=function(n,r,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return r;r!=null&&se.clearInterval(r)},t.prototype.execute=function(n,r){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(n,r);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(n,r){var i=!1,o;try{this.work(n)}catch(u){i=!0,o=u||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),o},t.prototype.unsubscribe=function(){if(!this.closed){var n=this,r=n.id,i=n.scheduler,o=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,ie(o,this),r!=null&&(this.id=this.recycleAsyncId(i,r,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(mn),lt=function(){function e(t,n){n===void 0&&(n=e.now),this.schedulerActionCtor=t,this.now=n}return e.prototype.schedule=function(t,n,r){return n===void 0&&(n=0),new this.schedulerActionCtor(this,t).schedule(r,n)},e.now=xe.now,e}(),yn=function(e){x(t,e);function t(n,r){r===void 0&&(r=lt.now);var i=e.call(this,n,r)||this;return i.actions=[],i._active=!1,i}return t.prototype.flush=function(n){var r=this.actions;if(this._active){r.push(n);return}var i;this._active=!0;do if(i=n.execute(n.state,n.delay))break;while(n=r.shift());if(this._active=!1,i){for(;n=r.shift();)n.unsubscribe();throw i}},t}(lt),Re=new yn(bn),gn=Re,$e=new E(function(e){return e.complete()});function Sn(e){return e?_n(e):$e}function _n(e){return new E(function(t){return e.schedule(function(){return t.complete()})})}function ft(e){return e&&g(e.schedule)}function dt(e){return e[e.length-1]}function je(e){return ft(dt(e))?e.pop():void 0}function wn(e,t){return typeof dt(e)=="number"?e.pop():t}var vt=function(e){return e&&typeof e.length=="number"&&typeof e!="function"};function ht(e){return g(e==null?void 0:e.then)}function pt(e){return g(e[Te])}function mt(e){return Symbol.asyncIterator&&g(e==null?void 0:e[Symbol.asyncIterator])}function bt(e){return new TypeError("You provided "+(e!==null&&typeof e=="object"?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}function En(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var yt=En();function gt(e){return g(e==null?void 0:e[yt])}function St(e){return nn(this,arguments,function(){var n,r,i,o;return nt(this,function(u){switch(u.label){case 0:n=e.getReader(),u.label=1;case 1:u.trys.push([1,,9,10]),u.label=2;case 2:return[4,Q(n.read())];case 3:return r=u.sent(),i=r.value,o=r.done,o?[4,Q(void 0)]:[3,5];case 4:return[2,u.sent()];case 5:return[4,Q(i)];case 6:return[4,u.sent()];case 7:return u.sent(),[3,2];case 8:return[3,10];case 9:return n.releaseLock(),[7];case 10:return[2]}})})}function _t(e){return g(e==null?void 0:e.getReader)}function F(e){if(e instanceof E)return e;if(e!=null){if(pt(e))return Cn(e);if(vt(e))return On(e);if(ht(e))return In(e);if(mt(e))return wt(e);if(gt(e))return An(e);if(_t(e))return kn(e)}throw bt(e)}function Cn(e){return new E(function(t){var n=e[Te]();if(g(n.subscribe))return n.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function On(e){return new E(function(t){for(var n=0;n<e.length&&!t.closed;n++)t.next(e[n]);t.complete()})}function In(e){return new E(function(t){e.then(function(n){t.closed||(t.next(n),t.complete())},function(n){return t.error(n)}).then(null,at)})}function An(e){return new E(function(t){var n,r;try{for(var i=G(e),o=i.next();!o.done;o=i.next()){var u=o.value;if(t.next(u),t.closed)return}}catch(a){n={error:a}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}t.complete()})}function wt(e){return new E(function(t){Fn(e,t).catch(function(n){return t.error(n)})})}function kn(e){return wt(St(e))}function Fn(e,t){var n,r,i,o;return Oe(this,void 0,void 0,function(){var u,a;return nt(this,function(s){switch(s.label){case 0:s.trys.push([0,5,6,11]),n=rn(e),s.label=1;case 1:return[4,n.next()];case 2:if(r=s.sent(),!!r.done)return[3,4];if(u=r.value,t.next(u),t.closed)return[2];s.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=s.sent(),i={error:a},[3,11];case 6:return s.trys.push([6,,9,10]),r&&!r.done&&(o=n.return)?[4,o.call(n)]:[3,8];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}})})}function V(e,t,n,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var o=t.schedule(function(){n(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function Et(e,t){return t===void 0&&(t=0),O(function(n,r){n.subscribe(I(r,function(i){return V(r,e,function(){return r.next(i)},t)},function(){return V(r,e,function(){return r.complete()},t)},function(i){return V(r,e,function(){return r.error(i)},t)}))})}function Ct(e,t){return t===void 0&&(t=0),O(function(n,r){r.add(e.schedule(function(){return n.subscribe(r)},t))})}function Pn(e,t){return F(e).pipe(Ct(t),Et(t))}function Dn(e,t){return F(e).pipe(Ct(t),Et(t))}function Tn(e,t){return new E(function(n){var r=0;return t.schedule(function(){r===e.length?n.complete():(n.next(e[r++]),n.closed||this.schedule())})})}function xn(e,t){return new E(function(n){var r;return V(n,t,function(){r=e[yt](),V(n,t,function(){var i,o,u;try{i=r.next(),o=i.value,u=i.done}catch(a){n.error(a);return}u?n.complete():n.next(o)},0,!0)}),function(){return g(r==null?void 0:r.return)&&r.return()}})}function Ot(e,t){if(!e)throw new Error("Iterable cannot be null");return new E(function(n){V(n,t,function(){var r=e[Symbol.asyncIterator]();V(n,t,function(){r.next().then(function(i){i.done?n.complete():n.next(i.value)})},0,!0)})})}function Rn(e,t){return Ot(St(e),t)}function $n(e,t){if(e!=null){if(pt(e))return Pn(e,t);if(vt(e))return Tn(e,t);if(ht(e))return Dn(e,t);if(mt(e))return Ot(e,t);if(gt(e))return xn(e,t);if(_t(e))return Rn(e,t)}throw bt(e)}function R(e,t){return t?$n(e,t):F(e)}function ce(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=je(e);return R(e,n)}var It=Ie(function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}});function jn(e){return e instanceof Date&&!isNaN(e)}function D(e,t){return O(function(n,r){var i=0;n.subscribe(I(r,function(o){r.next(e.call(t,o,i++))}))})}function Ln(e,t,n,r,i,o,u,a){var s=[],c=0,f=0,d=!1,v=function(){d&&!s.length&&!c&&t.complete()},m=function(p){return c<r?_(p):s.push(p)},_=function(p){o&&t.next(p),c++;var k=!1;F(n(p,f++)).subscribe(I(t,function(P){i==null||i(P),o?m(P):t.next(P)},function(){k=!0},void 0,function(){if(k)try{c--;for(var P=function(){var U=s.shift();u?V(t,u,function(){return _(U)}):_(U)};s.length&&c<r;)P();v()}catch(U){t.error(U)}}))};return e.subscribe(I(t,m,function(){d=!0,v()})),function(){a==null||a()}}function Le(e,t,n){return n===void 0&&(n=1/0),g(t)?Le(function(r,i){return D(function(o,u){return t(r,o,i,u)})(F(e(r,i)))},n):(typeof t=="number"&&(n=t),O(function(r,i){return Ln(r,i,e,n)}))}function At(e){return e===void 0&&(e=1/0),Le(J,e)}function Vn(){return At(1)}function Un(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Vn()(R(e,je(e)))}function Mn(e,t,n){e===void 0&&(e=0),n===void 0&&(n=gn);var r=-1;return t!=null&&(ft(t)?n=t:r=t),new E(function(i){var o=jn(e)?+e-n.now():e;o<0&&(o=0);var u=0;return n.schedule(function(){i.closed||(i.next(u++),0<=r?this.schedule(void 0,r):i.complete())},o)})}function Nn(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=je(e),r=wn(e,1/0),i=e;return i.length?i.length===1?F(i[0]):At(r)(R(i,n)):$e}function qn(e,t){return O(function(n,r){var i=0;n.subscribe(I(r,function(o){return e.call(t,o,i++)&&r.next(o)}))})}function kt(e){return O(function(t,n){var r=null,i=!1,o;r=t.subscribe(I(n,void 0,void 0,function(u){o=F(e(u,kt(e)(t))),r?(r.unsubscribe(),r=null,o.subscribe(n)):i=!0})),i&&(r.unsubscribe(),r=null,o.subscribe(n))})}function Wn(e,t,n,r,i){return function(o,u){var a=n,s=t,c=0;o.subscribe(I(u,function(f){var d=c++;s=a?e(s,f,d):(a=!0,f),r&&u.next(s)},i&&function(){a&&u.next(s),u.complete()}))}}function Kn(e,t){return t===void 0&&(t=Re),O(function(n,r){var i=null,o=null,u=null,a=function(){if(i){i.unsubscribe(),i=null;var c=o;o=null,r.next(c)}};function s(){var c=u+e,f=t.now();if(f<c){i=this.schedule(void 0,c-f),r.add(i);return}a()}n.subscribe(I(r,function(c){o=c,u=t.now(),i||(i=t.schedule(s,e),r.add(i))},function(){a(),r.complete()},void 0,function(){o=i=null}))})}function Hn(e){return O(function(t,n){var r=!1;t.subscribe(I(n,function(i){r=!0,n.next(i)},function(){r||n.next(e),n.complete()}))})}function Ve(e){return e<=0?function(){return $e}:O(function(t,n){var r=0;t.subscribe(I(n,function(i){++r<=e&&(n.next(i),e<=r&&n.complete())}))})}function Gn(){return O(function(e,t){e.subscribe(I(t,Fe))})}function Qn(e){return D(function(){return e})}function Ft(e,t){return t?function(n){return Un(t.pipe(Ve(1),Gn()),n.pipe(Ft(e)))}:Le(function(n,r){return F(e(n,r)).pipe(Ve(1),Qn(n))})}function Yn(e,t){t===void 0&&(t=Re);var n=Mn(e,t);return Ft(function(){return n})}function Bn(e,t){return t===void 0&&(t=J),e=e??zn,O(function(n,r){var i,o=!0;n.subscribe(I(r,function(u){var a=t(u);(o||!e(i,a))&&(o=!1,i=a,r.next(u))}))})}function zn(e,t){return e===t}function Jn(e){return e===void 0&&(e=Zn),O(function(t,n){var r=!1;t.subscribe(I(n,function(i){r=!0,n.next(i)},function(){return r?n.complete():n.error(e())}))})}function Zn(){return new It}function Pt(e,t){var n=arguments.length>=2;return function(r){return r.pipe(e?qn(function(i,o){return e(i,o,r)}):J,Ve(1),n?Hn(t):Jn(function(){return new It}))}}function Xn(e,t){return O(Wn(e,t,arguments.length>=2,!0))}function er(e){e===void 0&&(e={});var t=e.connector,n=t===void 0?function(){return new ae}:t,r=e.resetOnError,i=r===void 0?!0:r,o=e.resetOnComplete,u=o===void 0?!0:o,a=e.resetOnRefCountZero,s=a===void 0?!0:a;return function(c){var f,d,v,m=0,_=!1,p=!1,k=function(){d==null||d.unsubscribe(),d=void 0},P=function(){k(),f=v=void 0,_=p=!1},U=function(){var y=f;P(),y==null||y.unsubscribe()};return O(function(y,b){m++,!p&&!_&&k();var A=v=v??n();b.add(function(){m--,m===0&&!p&&!_&&(d=Ue(U,s))}),A.subscribe(b),!f&&m>0&&(f=new z({next:function(w){return A.next(w)},error:function(w){p=!0,k(),d=Ue(P,i,w),A.error(w)},complete:function(){_=!0,k(),d=Ue(P,u),A.complete()}}),F(y).subscribe(f))})(c)}}function Ue(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(t===!0){e();return}if(t!==!1){var i=new z({next:function(){i.unsubscribe(),e()}});return F(t.apply(void 0,W([],q(n)))).subscribe(i)}}function tr(e,t,n){var r,i,o,u,a=!1;return e&&typeof e=="object"?(r=e.bufferSize,u=r===void 0?1/0:r,i=e.windowTime,t=i===void 0?1/0:i,o=e.refCount,a=o===void 0?!1:o,n=e.scheduler):u=e??1/0,er({connector:function(){return new pn(u,t,n)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}function Dt(e,t){return O(function(n,r){var i=null,o=0,u=!1,a=function(){return u&&!i&&r.complete()};n.subscribe(I(r,function(s){i==null||i.unsubscribe();var c=0,f=o++;F(e(s,f)).subscribe(i=I(r,function(d){return r.next(t?t(s,d,f,c++):d)},function(){i=null,a()}))},function(){u=!0,a()}))})}function nr(e,t,n){var r=g(e)||t||n?{next:e,error:t,complete:n}:e;return r?O(function(i,o){var u;(u=r.subscribe)===null||u===void 0||u.call(r);var a=!0;i.subscribe(I(o,function(s){var c;(c=r.next)===null||c===void 0||c.call(r,s),o.next(s)},function(){var s;a=!1,(s=r.complete)===null||s===void 0||s.call(r),o.complete()},function(s){var c;a=!1,(c=r.error)===null||c===void 0||c.call(r,s),o.error(s)},function(){var s,c;a&&((s=r.unsubscribe)===null||s===void 0||s.call(r)),(c=r.finalize)===null||c===void 0||c.call(r)}))}):J}function Me(e){return new E(function(t){var n=Zt.onIdTokenChanged(e,t.next.bind(t),t.error.bind(t),t.complete.bind(t));return{unsubscribe:n}})}const rr="[DEFAULT]",Tt=h.createContext(void 0),Ne=h.createContext(!1),xt="4.2.3-exp.85cb2bb",ir=(e,t)=>e===t||[...Object.keys(e),...Object.keys(t)].every(n=>e[n]===t[n]);function or(e){const{firebaseConfig:t,appName:n,suspense:r}=e,i=h.useMemo(()=>{if(e.firebaseApp)return e.firebaseApp;const o=re.getApps().find(u=>u.name===(n||rr));if(o){if(t&&ir(o.options,t))return o;throw new Error(`Does not match the options already provided to the ${n||"default"} firebase app instance, give this new instance a different appName.`)}else{if(!t)throw new Error("No firebaseConfig provided");const u=h.version||"unknown";return re.registerVersion("react",u),re.registerVersion("reactfire",xt),re.initializeApp(t,n)}},[e.firebaseApp,t,n]);return h.createElement(Tt.Provider,{value:i},h.createElement(Ne.Provider,Object.assign({value:r??!1},e)))}function ur(){const e=h.useContext(Ne);return e??!1}function Z(e){const t=h.useContext(Ne);return e!==void 0?e:t}function qe(){const e=h.useContext(Tt);if(!e)throw new Error("Cannot call useFirebaseApp unless your component is within a FirebaseAppProvider");return e}function ar(e){return Oe(this,void 0,void 0,function*(){const t=yield e();return ve(Me(t),`auth:user:${t.name}`).toPromise()})}function Rt(e){const t=Je(),n=`auth:user:${t.name}`,r=Me(t);return C(n,r,e)}function $t(e,t=!1,n){if(!e)throw new Error("you must provide a user");const r=`auth:idTokenResult:${e.uid}:forceRefresh=${t}`,i=R(e.getIdTokenResult(t));return C(r,i,n)}function sr(e){if(e!=null&&e.hasOwnProperty("requiredClaims")&&(e!=null&&e.hasOwnProperty("validateCustomClaims")))throw new Error('Cannot have both "requiredClaims" and "validateCustomClaims". Use one or the other.');const t=Je();let n=`auth:signInCheck:${t.name}::forceRefresh:${!!(e!=null&&e.forceRefresh)}`;e!=null&&e.forceRefresh&&(n=`${n}:forceRefresh:${e.forceRefresh}`),e!=null&&e.hasOwnProperty("requiredClaims")?n=`${n}:requiredClaims:${JSON.stringify(e.requiredClaims)}`:e!=null&&e.hasOwnProperty("validateCustomClaims")&&(n=`${n}:validateCustomClaims:${JSON.stringify(e.validateCustomClaims)}`);const r=Me(t).pipe(Dt(i=>{var o;return i?e&&(e.hasOwnProperty("requiredClaims")||e.hasOwnProperty("validateCustomClaims"))?R(i.getIdTokenResult((o=e==null?void 0:e.forceRefresh)!==null&&o!==void 0?o:!1)).pipe(D(u=>{let a;e.hasOwnProperty("requiredClaims")?a=cr(e.requiredClaims):a=e.validateCustomClaims;const{hasRequiredClaims:s,errors:c}=a(u.claims);return{signedIn:!0,hasRequiredClaims:s,errors:c,user:i}})):ce({signedIn:!0,hasRequiredClaims:!0,errors:{},user:i}):ce({signedIn:!1,hasRequiredClaims:!1,errors:{},user:null})}));return C(n,r,e)}function cr(e){return function(n){const r={};return Object.keys(e).forEach(i=>{e[i]!==n[i]&&(r[i]=[new Ee("auth/missing-claim",`Expected "${e[i]}", but user has "${n[i]}" instead`)])}),{hasRequiredClaims:Object.keys(r).length===0,errors:r}}}function jt({user:e,fallback:t,children:n,requiredClaims:r}){const{data:i,status:o,error:u}=$t(e,!1);if(o==="loading")throw new Error("ClaimsCheck must be run in Suspense mode");if(o==="error")throw u;const{claims:a}=i,s={};return Z()||console.warn("ClaimsCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r&&Object.keys(r).forEach(f=>{var d;r[f]!==a[f]&&(s[f]={expected:r[f],actual:(d=a[f])===null||d===void 0?void 0:d.toString()})}),Object.keys(s).length===0?h.createElement(h.Fragment,null,n):h.createElement(h.Fragment,null,t)}function lr({fallback:e,children:t,requiredClaims:n}){const{data:r}=Rt();return Z()||console.warn("AuthCheck is deprecated and only works when ReactFire is in experimental Suspense Mode. Use useSigninCheck or set suspense={true} in FirebaseAppProvider if you want to use this component."),r?n?h.createElement(jt,{user:r,fallback:e,requiredClaims:n},t):h.createElement(h.Fragment,null,t):h.createElement(h.Fragment,null,e)}/*! *****************************************************************************
4
+ Copyright (c) Microsoft Corporation.
5
5
 
6
- Permission to use, copy, modify, and/or distribute this software for any
7
- purpose with or without fee is hereby granted.
6
+ Permission to use, copy, modify, and/or distribute this software for any
7
+ purpose with or without fee is hereby granted.
8
8
 
9
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
- PERFORMANCE OF THIS SOFTWARE.
16
- ***************************************************************************** */var oe=function(){return oe=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},oe.apply(this,arguments)};function Ne(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}/**
9
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
10
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
12
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
14
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15
+ PERFORMANCE OF THIS SOFTWARE.
16
+ ***************************************************************************** */var le=function(){return le=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},le.apply(this,arguments)};function We(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}/**
17
17
  * @license
18
18
  * Copyright 2021 Google LLC
19
19
  *
@@ -28,7 +28,7 @@
28
28
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29
29
  * See the License for the specific language governing permissions and
30
30
  * limitations under the License.
31
- */var j,m;(function(e){e.added="child_added",e.removed="child_removed",e.changed="child_changed",e.moved="child_moved",e.value="value"})(m||(m={}));var rr=Object.freeze((j={},j[m.added]=$.onChildAdded,j[m.removed]=$.onChildRemoved,j[m.changed]=$.onChildChanged,j[m.moved]=$.onChildMoved,j[m.value]=$.onValue,j));/**
31
+ */var K,S;(function(e){e.added="child_added",e.removed="child_removed",e.changed="child_changed",e.moved="child_moved",e.value="value"})(S||(S={}));var fr=Object.freeze((K={},K[S.added]=N.onChildAdded,K[S.removed]=N.onChildRemoved,K[S.changed]=N.onChildChanged,K[S.moved]=N.onChildMoved,K[S.value]=N.onValue,K));/**
32
32
  * @license
33
33
  * Copyright 2021 Google LLC
34
34
  *
@@ -43,7 +43,7 @@
43
43
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
44
44
  * See the License for the specific language governing permissions and
45
45
  * limitations under the License.
46
- */function qe(e,t){return new g(function(n){var r=rr[t](e,function(i,o){n.next({snapshot:i,prevKey:o,event:t})},n.error.bind(n));return{unsubscribe:function(){$.off(e,t,r)}}}).pipe(Ln(0))}/**
46
+ */function Ke(e,t){return new E(function(n){var r=fr[t](e,function(i,o){n.next({snapshot:i,prevKey:o,event:t})},n.error.bind(n));return{unsubscribe:function(){N.off(e,t,r)}}}).pipe(Yn(0))}/**
47
47
  * @license
48
48
  * Copyright 2021 Google LLC
49
49
  *
@@ -58,7 +58,7 @@
58
58
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
59
59
  * See the License for the specific language governing permissions and
60
60
  * limitations under the License.
61
- */function ir(e){return(e==null||e.length===0)&&(e=[m.added,m.removed,m.changed,m.moved]),e}/**
61
+ */function dr(e){return(e==null||e.length===0)&&(e=[S.added,S.removed,S.changed,S.moved]),e}/**
62
62
  * @license
63
63
  * Copyright 2021 Google LLC
64
64
  *
@@ -73,7 +73,7 @@
73
73
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
74
74
  * See the License for the specific language governing permissions and
75
75
  * limitations under the License.
76
- */function or(e){return qe(e,m.value)}function ur(e,t){return t===void 0&&(t={}),qe(e,m.value).pipe(E(function(n){return Pt(n,t)}))}function Pt(e,t){var n;t===void 0&&(t={});var r=e.snapshot.val();return!e.snapshot.exists()||typeof r!="object"?r:oe(oe({},r),t.keyField?(n={},n[t.keyField]=e.snapshot.key,n):null)}function ar(e){return O($.get(e)).pipe(E(function(t){var n=m.value;return{snapshot:t,prevKey:null,event:n}}))}function Dt(e,t){t===void 0&&(t={});var n=ir(t.events);return ar(e).pipe(Et(function(r){if(!r.snapshot.exists())return ie([]);var i=[ie(r)];return n.forEach(function(o){i.push(qe(e,o))}),$n.apply(void 0,i).pipe(Hn(lr,[]))}),Nn())}function sr(e,t){return t===void 0&&(t={}),Dt(e).pipe(E(function(n){return n.map(function(r){return Pt(r,t)})}))}function Tt(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].snapshot.key===t)return r;return-1}function cr(e,t){if(t==null)return 0;var n=Tt(e,t);return n===-1?e.length:n+1}function lr(e,t){var n=t.snapshot,r=t.prevKey,i=t.event,o=n.key,u=Tt(e,o),a=cr(e,r||void 0);switch(i){case m.value:if(t.snapshot&&t.snapshot.exists()){var s=null;t.snapshot.forEach(function(v){var h={snapshot:v,event:m.value,prevKey:s};return s=v.key,e=Ne(Ne([],e),[h]),!1})}return e;case m.added:if(u>-1){var c=e[u-1];(c&&c.snapshot.key||null)!==r&&(e=e.filter(function(v){return v.snapshot.key!==n.key}),e.splice(a,0,t))}else{if(r==null)return Ne([t],e);e=e.slice(),e.splice(a,0,t)}return e;case m.removed:return e.filter(function(v){return v.snapshot.key!==n.key});case m.changed:return e.map(function(v){return v.snapshot.key===o?t:v});case m.moved:if(u>-1){var f=e.splice(u,1)[0];return e=e.slice(),e.splice(a,0,f),e}return e;default:return e}}const We=globalThis._reactFireDatabaseCachedQueries||[];globalThis._reactFireDatabaseCachedQueries||(globalThis._reactFireDatabaseCachedQueries=We);function $t(e){const t=We.findIndex(n=>n.isEqual(e));return t>-1?t:We.push(e)-1}function fr(e,t){const n=`database:object:${e.toString()}`,r=or(e);return w(n,r,t)}function dr(e,t){const n=t?N(t):"NO_ID_FIELD",r=`database:objectVal:${e.toString()}:idField=${n}`,i=ur(e,{keyField:n});return w(r,i,t)}function vr(e,t){const n=`database:list:${$t(e)}`,r=Dt(e);return w(n,r,t)}function hr(e,t){const n=t?N(t):"NO_ID_FIELD",r=`database:listVal:${$t(e)}:idField=${n}`,i=sr(e,{keyField:n});return w(r,i,t)}/**
76
+ */function vr(e){return Ke(e,S.value)}function hr(e,t){return t===void 0&&(t={}),Ke(e,S.value).pipe(D(function(n){return Lt(n,t)}))}function Lt(e,t){var n;t===void 0&&(t={});var r=e.snapshot.val();return!e.snapshot.exists()||typeof r!="object"?r:le(le({},r),t.keyField?(n={},n[t.keyField]=e.snapshot.key,n):null)}function pr(e){return R(N.get(e)).pipe(D(function(t){var n=S.value;return{snapshot:t,prevKey:null,event:n}}))}function Vt(e,t){t===void 0&&(t={});var n=dr(t.events);return pr(e).pipe(Dt(function(r){if(!r.snapshot.exists())return ce([]);var i=[ce(r)];return n.forEach(function(o){i.push(Ke(e,o))}),Nn.apply(void 0,i).pipe(Xn(yr,[]))}),Bn())}function mr(e,t){return t===void 0&&(t={}),Vt(e).pipe(D(function(n){return n.map(function(r){return Lt(r,t)})}))}function Ut(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].snapshot.key===t)return r;return-1}function br(e,t){if(t==null)return 0;var n=Ut(e,t);return n===-1?e.length:n+1}function yr(e,t){var n=t.snapshot,r=t.prevKey,i=t.event,o=n.key,u=Ut(e,o),a=br(e,r||void 0);switch(i){case S.value:if(t.snapshot&&t.snapshot.exists()){var s=null;t.snapshot.forEach(function(d){var v={snapshot:d,event:S.value,prevKey:s};return s=d.key,e=We(We([],e),[v]),!1})}return e;case S.added:if(u>-1){var c=e[u-1];(c&&c.snapshot.key||null)!==r&&(e=e.filter(function(d){return d.snapshot.key!==n.key}),e.splice(a,0,t))}else{if(r==null)return We([t],e);e=e.slice(),e.splice(a,0,t)}return e;case S.removed:return e.filter(function(d){return d.snapshot.key!==n.key});case S.changed:return e.map(function(d){return d.snapshot.key===o?t:d});case S.moved:if(u>-1){var f=e.splice(u,1)[0];return e=e.slice(),e.splice(a,0,f),e}return e;default:return e}}const He=globalThis._reactFireDatabaseCachedQueries||[];globalThis._reactFireDatabaseCachedQueries||(globalThis._reactFireDatabaseCachedQueries=He);function Mt(e){const t=He.findIndex(n=>n.isEqual(e));return t>-1?t:He.push(e)-1}function gr(e,t){const n=`database:object:${e.toString()}`,r=vr(e);return C(n,r,t)}function Sr(e,t){const n=t?Y(t):"NO_ID_FIELD",r=`database:objectVal:${e.toString()}:idField=${n}`,i=hr(e,{keyField:n});return C(r,i,t)}function _r(e,t){const n=`database:list:${Mt(e)}`,r=Vt(e);return C(n,r,t)}function wr(e,t){const n=t?Y(t):"NO_ID_FIELD",r=`database:listVal:${Mt(e)}:idField=${n}`,i=mr(e,{keyField:n});return C(r,i,t)}/**
77
77
  * @license
78
78
  * Copyright 2018 Google LLC
79
79
  *
@@ -88,7 +88,7 @@
88
88
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
89
89
  * See the License for the specific language governing permissions and
90
90
  * limitations under the License.
91
- */var pr={includeMetadataChanges:!1};function Qe(e,t){return t===void 0&&(t=pr),new g(function(n){var r=Ge.onSnapshot(e,t,{next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return{unsubscribe:r}})}/**
91
+ */var Er={includeMetadataChanges:!1};function Ge(e,t){return t===void 0&&(t=Er),new E(function(n){var r=et.onSnapshot(e,t,{next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)});return{unsubscribe:r}})}/**
92
92
  * @license
93
93
  * Copyright 2018 Google LLC
94
94
  *
@@ -103,7 +103,23 @@
103
103
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
104
104
  * See the License for the specific language governing permissions and
105
105
  * limitations under the License.
106
- */function ue(e){return Qe(e,{includeMetadataChanges:!0})}function Rt(e,t){return t===void 0&&(t={}),ue(e).pipe(E(function(n){return xt(n,t)}))}function xt(e,t){t===void 0&&(t={});var n=e.data();return!e.exists()||typeof n!="object"||n===null||t.idField&&(n[t.idField]=e.id),n}function br(e){return Qe(e,{includeMetadataChanges:!0}).pipe(E(function(t){return t.docs}))}function mr(e,t){return t===void 0&&(t={}),br(e).pipe(E(function(n){return n.map(function(r){return xt(r,t)})}))}class yr extends ne{constructor(t,n,r){super(),this._timeoutWindow=n,this._suspenseEnabled=r,this._hasValue=!1,this._error=void 0,this._firstEmission=new Promise(i=>this._resolveFirstEmission=i),this._innerObservable=t.pipe(Gn({next:i=>{this._next(i)},error:i=>{this._error=i,this._resolveFirstEmission()}}),St(()=>dn()),Yn(1)),this._warmupSubscription=this._innerObservable.subscribe(),this._suspenseEnabled?(console.log("SuspenseSubject: Suspense is enabled"),this._timeoutHandler=setTimeout(()=>{},this._timeoutWindow)):this._timeoutHandler=setTimeout(this._reset.bind(this),this._timeoutWindow)}get hasValue(){return this._hasValue||!!this._error}get value(){if(this._error)throw this._error;if(!this.hasValue)throw Error("Can only get value if SuspenseSubject has a value");return this._value}get firstEmission(){return this._firstEmission}_next(t){this._hasValue=!0,this._value=t,this._resolveFirstEmission()}_reset(){this._warmupSubscription&&this._warmupSubscription.unsubscribe(),this._hasValue=!1,this._value=void 0,this._error=void 0,this._firstEmission=new Promise(t=>this._resolveFirstEmission=t)}_subscribe(t){return this._timeoutHandler&&clearTimeout(this._timeoutHandler),this._innerSubscriber=this._innerObservable.subscribe(t),this._innerSubscriber}get ourError(){return this._error}}const gr=3e4,ae=globalThis._reactFirePreloadedObservables||new Map;globalThis._reactFirePreloadedObservables||(globalThis._reactFirePreloadedObservables=ae);function se(e,t,n=!1){if(ae.has(t))return ae.get(t);{const r=new yr(e,gr,n);return ae.set(t,r),r}}function wr(e){return function(n,r){const i=Object.assign(Object.assign({},n),{hasEmitted:n.hasEmitted||e.hasValue,error:e.ourError,firstValuePromise:e.firstEmission});switch(e.hasValue&&(i.data=e.value),r){case"value":return i.status="success",i;case"error":return i.status="error",i;case"complete":return i.isComplete=!0,i;default:throw new Error(`invalid action "${r}"`)}}}function w(e,t,n={}){var r;if(!e)throw new Error("cannot call useObservable without an observableId");const i=Y(n.suspense),o=se(t,e,i),u=n.hasOwnProperty("initialData")||n.hasOwnProperty("startWithValue"),a=o.hasValue||u;if(i===!0&&!a)throw o.firstEmission;const s={status:a?"success":"loading",hasEmitted:a,isComplete:!1,data:o.hasValue?o.value:(r=n==null?void 0:n.initialData)!==null&&r!==void 0?r:n==null?void 0:n.startWithValue,error:o.ourError,firstValuePromise:o.firstEmission},[c,f]=d.useReducer(wr(o),s);return d.useEffect(()=>{const v=o.subscribe({next:()=>{f("value")},error:h=>{throw f("error"),h},complete:()=>{f("complete")}});return()=>v.unsubscribe()},[o]),c}const He=globalThis._reactFireFirestoreQueryCache||[];globalThis._reactFireFirestoreQueryCache||(globalThis._reactFireFirestoreQueryCache=He);function jt(e){const t=He.findIndex(n=>Ge.queryEqual(n,e));return t>-1?t:He.push(e)-1}function Sr(e){return _e(this,void 0,void 0,function*(){const t=yield e();return se(ue(t),Ut(t))})}function Ut(e){return`firestore:doc:${e.firestore.app.name}:${e.path}`}function _r(e,t){const n=Ut(e),r=ue(e);return w(n,r,t)}function Cr(e,t){const n=`firestore:docOnce:${e.firestore.app.name}:${e.path}`,r=ue(e).pipe(Ct());return w(n,r,t)}function Er(e,t){const n=t?N(t):"NO_ID_FIELD",r=`firestore:docData:${e.firestore.app.name}:${e.path}:idField=${n}`,i=Rt(e,{idField:n});return w(r,i,t)}function Ir(e,t){const n=t?N(t):"NO_ID_FIELD",r=`firestore:docDataOnce:${e.firestore.app.name}:${e.path}:idField=${n}`,i=Rt(e,{idField:n}).pipe(Ct());return w(r,i,t)}function kr(e,t){const n=`firestore:collection:${jt(e)}`,r=Qe(e);return w(n,r,t)}function Or(e,t){const n=t?N(t):"NO_ID_FIELD",r=`firestore:collectionData:${jt(e)}:idField=${n}`,i=mr(e,{idField:n});return w(r,i,t)}/**
106
+ */function fe(e){return Ge(e,{includeMetadataChanges:!0})}function Nt(e,t){return t===void 0&&(t={}),fe(e).pipe(D(function(n){return qt(n,t)}))}function qt(e,t){t===void 0&&(t={});var n=e.data();return!e.exists()||typeof n!="object"||n===null||t.idField&&(n[t.idField]=e.id),n}function Cr(e){return Ge(e,{includeMetadataChanges:!0}).pipe(D(function(t){return t.docs}))}function Or(e,t){return t===void 0&&(t={}),Cr(e).pipe(D(function(n){return n.map(function(r){return qt(r,t)})}))}var Qe={exports:{}},Ye={};/**
107
+ * @license React
108
+ * use-sync-external-store-shim.production.min.js
109
+ *
110
+ * Copyright (c) Facebook, Inc. and its affiliates.
111
+ *
112
+ * This source code is licensed under the MIT license found in the
113
+ * LICENSE file in the root directory of this source tree.
114
+ */var Wt;function Ir(){if(Wt)return Ye;Wt=1;var e=M;function t(d,v){return d===v&&(d!==0||1/d===1/v)||d!==d&&v!==v}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,u=e.useDebugValue;function a(d,v){var m=v(),_=r({inst:{value:m,getSnapshot:v}}),p=_[0].inst,k=_[1];return o(function(){p.value=m,p.getSnapshot=v,s(p)&&k({inst:p})},[d,m,v]),i(function(){return s(p)&&k({inst:p}),d(function(){s(p)&&k({inst:p})})},[d]),u(m),m}function s(d){var v=d.getSnapshot;d=d.value;try{var m=v();return!n(d,m)}catch{return!0}}function c(d,v){return v()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return Ye.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Ye}var Be={};/**
115
+ * @license React
116
+ * use-sync-external-store-shim.development.js
117
+ *
118
+ * Copyright (c) Facebook, Inc. and its affiliates.
119
+ *
120
+ * This source code is licensed under the MIT license found in the
121
+ * LICENSE file in the root directory of this source tree.
122
+ */var Kt;function Ar(){return Kt||(Kt=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=M,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var b=arguments.length,A=new Array(b>1?b-1:0),w=1;w<b;w++)A[w-1]=arguments[w];r("error",y,A)}}function r(y,b,A){{var w=t.ReactDebugCurrentFrame,te=w.getStackAddendum();te!==""&&(b+="%s",A=A.concat([te]));var ne=A.map(function(T){return String(T)});ne.unshift("Warning: "+b),Function.prototype.apply.call(console[y],console,ne)}}function i(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var o=typeof Object.is=="function"?Object.is:i,u=e.useState,a=e.useEffect,s=e.useLayoutEffect,c=e.useDebugValue,f=!1,d=!1;function v(y,b,A){f||e.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var w=b();if(!d){var te=b();o(w,te)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}var ne=u({inst:{value:w,getSnapshot:b}}),T=ne[0].inst,Xe=ne[1];return s(function(){T.value=w,T.getSnapshot=b,m(T)&&Xe({inst:T})},[y,w,b]),a(function(){m(T)&&Xe({inst:T});var Ii=function(){m(T)&&Xe({inst:T})};return y(Ii)},[y]),c(w),w}function m(y){var b=y.getSnapshot,A=y.value;try{var w=b();return!o(A,w)}catch{return!0}}function _(y,b,A){return b()}var p=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",k=!p,P=k?_:v,U=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:P;Be.useSyncExternalStore=U,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Be}process.env.NODE_ENV==="production"?Qe.exports=Ir():Qe.exports=Ar();var kr=Qe.exports;class Fr extends ae{constructor(t,n,r){super(),this._timeoutWindow=n,this._suspenseEnabled=r,this._hasValue=!1,this._error=void 0,this._isComplete=!1,this._firstEmission=new Promise(i=>this._resolveFirstEmission=i),this._immutableStatus={status:"loading",hasEmitted:!1,isComplete:!1,data:void 0,error:void 0,firstValuePromise:this._firstEmission},this._innerObservable=t.pipe(nr({next:i=>{this._next(i)},error:i=>{this._error=i,this._resolveFirstEmission(),this._updateImmutableStatus()},complete:()=>{this._isComplete=!0,this._updateImmutableStatus()}}),kt(()=>Sn()),tr(1)),this._warmupSubscription=this._innerObservable.subscribe(),this._suspenseEnabled?this._timeoutHandler=setTimeout(()=>{},this._timeoutWindow):this._timeoutHandler=setTimeout(this._reset.bind(this),this._timeoutWindow)}get hasValue(){return this._hasValue||!!this._error}get value(){if(this._error)throw this._error;if(!this.hasValue)throw Error("Can only get value if SuspenseSubject has a value");return this._value}get firstEmission(){return this._firstEmission}_updateImmutableStatus(){this._immutableStatus={status:this._error?"error":this._hasValue?"success":"loading",hasEmitted:this._hasValue,isComplete:this._isComplete,data:this._value,error:this._error,firstValuePromise:this._firstEmission}}_next(t){this._hasValue=!0,this._value=t,this._resolveFirstEmission(),this._updateImmutableStatus()}_reset(){this._warmupSubscription&&this._warmupSubscription.unsubscribe(),this._hasValue=!1,this._value=void 0,this._error=void 0,this._firstEmission=new Promise(t=>this._resolveFirstEmission=t),this._updateImmutableStatus()}_subscribe(t){return this._timeoutHandler&&clearTimeout(this._timeoutHandler),this._innerSubscriber=this._innerObservable.subscribe(t),this._innerSubscriber}get ourError(){return this._error}get immutableStatus(){return this._immutableStatus}}const Pr=3e4,de=globalThis._reactFirePreloadedObservables||new Map;globalThis._reactFirePreloadedObservables||(globalThis._reactFirePreloadedObservables=de);function ve(e,t,n=!1){if(de.has(t))return de.get(t);{const r=new Fr(e,Pr,n);return de.set(t,r),r}}function C(e,t,n={}){var r;if(!e)throw new Error("cannot call useObservable without an observableId");const i=Z(n.suspense),o=ve(t,e,i),u=n.hasOwnProperty("initialData")||n.hasOwnProperty("startWithValue"),a=o.hasValue||u;if(i===!0&&!a)throw o.firstEmission;const s=h.useCallback(d=>{const v=o.subscribe({next:()=>{d()},error:m=>{throw d(),m},complete:()=>{d()}});return()=>{v.unsubscribe()}},[o]),c=h.useCallback(()=>o.immutableStatus,[o]),f=kr.useSyncExternalStore(s,c);if(!o.hasValue&&a&&(f.data=(r=n==null?void 0:n.initialData)!==null&&r!==void 0?r:n==null?void 0:n.startWithValue,f.status="success",f.hasEmitted=!0),f.error)throw f.error;return f}const ze=globalThis._reactFireFirestoreQueryCache||[];globalThis._reactFireFirestoreQueryCache||(globalThis._reactFireFirestoreQueryCache=ze);function Ht(e){const t=ze.findIndex(n=>et.queryEqual(n,e));return t>-1?t:ze.push(e)-1}function Dr(e){return Oe(this,void 0,void 0,function*(){const t=yield e();return ve(fe(t),Gt(t))})}function Gt(e){return`firestore:doc:${e.firestore.app.name}:${e.path}`}function Tr(e,t){const n=Gt(e),r=fe(e);return C(n,r,t)}function xr(e,t){const n=`firestore:docOnce:${e.firestore.app.name}:${e.path}`,r=fe(e).pipe(Pt());return C(n,r,t)}function Rr(e,t){const n=t?Y(t):"NO_ID_FIELD",r=`firestore:docData:${e.firestore.app.name}:${e.path}:idField=${n}`,i=Nt(e,{idField:n});return C(r,i,t)}function $r(e,t){const n=t?Y(t):"NO_ID_FIELD",r=`firestore:docDataOnce:${e.firestore.app.name}:${e.path}:idField=${n}`,i=Nt(e,{idField:n}).pipe(Pt());return C(r,i,t)}function jr(e,t){const n=`firestore:collection:${Ht(e)}`,r=Ge(e);return C(n,r,t)}function Lr(e,t){const n=t?Y(t):"NO_ID_FIELD",r=`firestore:collectionData:${Ht(e)}:idField=${n}`,i=Or(e,{idField:n});return C(r,i,t)}/**
107
123
  * @license
108
124
  * Copyright 2021 Google LLC
109
125
  *
@@ -118,5 +134,5 @@
118
134
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119
135
  * See the License for the specific language governing permissions and
120
136
  * limitations under the License.
121
- */function Fr(e,t,n){var r=Ht.httpsCallable(e,t,n);return function(i){return O(r(i)).pipe(E(function(o){return o.data}))}}function Ar(e,t){const n=Lt(),r=`functions:callableResponse:${e}:${JSON.stringify(t==null?void 0:t.data)}:${JSON.stringify(t==null?void 0:t.httpsCallableOptions)}`,o=Fr(n,e,t==null?void 0:t.httpsCallableOptions)(t==null?void 0:t.data);return w(r,o,t)}function Pr({children:e,traceId:t,fallback:n}){var r;const i=((r=performance==null?void 0:performance.getEntriesByName)===null||r===void 0?void 0:r.call(performance,t,"measure"))||[],o=`_${t}Start[${i.length}]`,u=`_${t}End[${i.length}]`,a=()=>(d.useLayoutEffect(()=>{var s;return(s=performance==null?void 0:performance.mark)===null||s===void 0||s.call(performance,o),()=>{var c,f;(c=performance==null?void 0:performance.mark)===null||c===void 0||c.call(performance,u),(f=performance==null?void 0:performance.measure)===null||f===void 0||f.call(performance,t,o,u)}},[]),d.createElement(d.Fragment,null,n));return d.createElement(d.Suspense,{fallback:d.createElement(a,null)},e)}function G(e){var t=e.remoteConfig,n=e.key,r=e.getter;return new g(function(i){V.ensureInitialized(t).then(function(){var o=r.bind(t);i.next(o(t,n))})})}function Dr(e,t){var n=V.getValue;return G({remoteConfig:e,key:t,getter:n})}function Tr(e,t){var n=V.getString;return G({remoteConfig:e,key:t,getter:n})}function $r(e,t){var n=V.getNumber;return G({remoteConfig:e,key:t,getter:n})}function Rr(e,t){var n=V.getBoolean;return G({remoteConfig:e,key:t,getter:n})}function xr(e){var t=V.getAll;return G({remoteConfig:e,key:"",getter:t})}function z(e,t){const n=qt(),r=n.app.name,i=t(n,e),o=`remoteConfig:${e}:${t.name}:${r}`;return w(o,i)}function jr(e){return z(e,Dr)}function Ur(e){return z(e,Tr)}function Vr(e){return z(e,$r)}function Mr(e){return z(e,Rr)}function Lr(e){return z(e,xr)}function Nr(e){return new g(function(t){var n=function(u){return t.next(u)},r=function(u){return t.error(u)},i=function(){return t.complete()};n(e.snapshot);var o=e.on("state_changed",n);return e.then(function(u){n(u),setTimeout(function(){return i()},0)},function(u){n(e.snapshot),setTimeout(function(){return r(u)},0)}),function(){o()}}).pipe(jn(0))}function qr(e){return O(ze.getDownloadURL(e))}function Wr(e,t,n){const r=`storage:task:${t.toString()}`,i=Nr(e);return w(r,i,n)}function Vt(e,t){const n=`storage:downloadUrl:${e.toString()}`,r=qr(e);return w(n,r,t)}function Qr(e){const t=Nt();return e=Object.assign(Object.assign({},e),{storage:t}),d.createElement(Mt,Object.assign({},e))}function Mt(e){let{storage:t,storagePath:n,suspense:r,placeHolder:i}=e,o=Yt(e,["storage","storagePath","suspense","placeHolder"]);const u={suspense:Y(r)};if(!t)throw new Error("Storage was not passed to component INTERNALStorageImage. This should not be possible");const{status:a,data:s}=Vt(ze.ref(t,n),u);return a==="success"?(o.alt||o.alt===""||console.warn(`No alt prop provided for StorageImage with storagePath "${n}"`,"img elements must have an alt prop, either with meaningful text, or an empty string for decorative images"),d.createElement("img",Object.assign({src:s,alt:o.alt},o))):i!=null?i:d.createElement(d.Fragment,null,"''")}function Hr(e){let{storage:t}=e;return t?d.createElement(Mt,Object.assign({},e)):d.createElement(Qr,Object.assign({},e))}const ce=d.createContext(void 0),le=d.createContext(void 0),fe=d.createContext(void 0),de=d.createContext(void 0),ve=d.createContext(void 0),he=d.createContext(void 0),pe=d.createContext(void 0),be=d.createContext(void 0),me=d.createContext(void 0);function F(e){return function(n){var r,i;if(!n.sdk)throw new Error("no sdk provided");const o=Le().name;if(((i=(r=n==null?void 0:n.sdk)===null||r===void 0?void 0:r.app)===null||i===void 0?void 0:i.name)!==o)throw new Error("sdk was initialized with a different firebase app");return d.createElement(e.Provider,Object.assign({value:n.sdk},n))}}function A(e){const t=d.useContext(e);if(!t)throw new Error("SDK not found. useSdk must be called from within a provider");return t}function P(e,t,n,r){const i=Le();if(d.useContext(t))throw new Error(`Cannot initialize SDK ${e} because it already exists in Context`);const o=d.useMemo(()=>n(i),[i]);return w(`firebase-sdk:${e}:${i.name}`,O(o),r)}const Kr=F(ce),Yr=F(le),Gr=F(fe),zr=F(de),Jr=F(ve),Zr=F(he),Br=F(be),Xr=F(pe),ei=F(me),ti=()=>A(ce),Ke=()=>A(le),ni=()=>A(fe),ri=()=>A(de),ii=()=>A(ve),Lt=()=>A(he),oi=()=>A(be),Nt=()=>A(pe),qt=()=>A(me),ui=(e,t)=>P("appcheck",ce,e,t),ai=(e,t)=>P("auth",le,e,t),si=(e,t)=>P("analytics",fe,e,t),ci=(e,t)=>P("database",de,e,t),li=(e,t)=>P("firestore",ve,e,t),fi=(e,t)=>P("functions",he,e,t),di=(e,t)=>P("performance",be,e,t),vi=(e,t)=>P("remoteconfig",me,e,t),hi=(e,t)=>P("storage",pe,e,t);class ye extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name="ReactFireError",Object.setPrototypeOf(this,ye.prototype)}}function Ye(e,t){if(t==="idField"||t==="initialData"||t==="suspense")return e?e[t]:void 0;throw new Error(`Field "${t}" is not a valid key in ReactFireOptions`)}function pi(e){return Ye(e,"initialData")}function N(e){return Ye(e,"idField")}l.AnalyticsProvider=Gr,l.AnalyticsSdkContext=fe,l.AppCheckProvider=Kr,l.AppCheckSdkContext=ce,l.AuthCheck=nr,l.AuthProvider=Yr,l.AuthSdkContext=le,l.ClaimsCheck=At,l.DatabaseProvider=zr,l.DatabaseSdkContext=de,l.FirebaseAppProvider=Zn,l.FirestoreProvider=Jr,l.FirestoreSdkContext=ve,l.FunctionsProvider=Zr,l.FunctionsSdkContext=he,l.PerformanceProvider=Br,l.PerformanceSdkContext=be,l.ReactFireError=ye,l.RemoteConfigProvider=ei,l.RemoteConfigSdkContext=me,l.StorageImage=Hr,l.StorageProvider=Xr,l.StorageSdkContext=pe,l.SuspenseWithPerf=Pr,l.checkIdField=N,l.checkOptions=Ye,l.checkinitialData=pi,l.preloadFirestoreDoc=Sr,l.preloadObservable=se,l.preloadUser=Xn,l.useAnalytics=ni,l.useAppCheck=ti,l.useAuth=Ke,l.useCallableFunctionResponse=Ar,l.useDatabase=ri,l.useDatabaseList=vr,l.useDatabaseListData=hr,l.useDatabaseObject=fr,l.useDatabaseObjectData=dr,l.useFirebaseApp=Le,l.useFirestore=ii,l.useFirestoreCollection=kr,l.useFirestoreCollectionData=Or,l.useFirestoreDoc=_r,l.useFirestoreDocData=Er,l.useFirestoreDocDataOnce=Ir,l.useFirestoreDocOnce=Cr,l.useFunctions=Lt,l.useIdTokenResult=Ft,l.useInitAnalytics=si,l.useInitAppCheck=ui,l.useInitAuth=ai,l.useInitDatabase=ci,l.useInitFirestore=li,l.useInitFunctions=fi,l.useInitPerformance=di,l.useInitRemoteConfig=vi,l.useInitStorage=hi,l.useIsSuspenseEnabled=Bn,l.useObservable=w,l.usePerformance=oi,l.useRemoteConfig=qt,l.useRemoteConfigAll=Lr,l.useRemoteConfigBoolean=Mr,l.useRemoteConfigNumber=Vr,l.useRemoteConfigString=Ur,l.useRemoteConfigValue=jr,l.useSigninCheck=er,l.useStorage=Nt,l.useStorageDownloadURL=Vt,l.useStorageTask=Wr,l.useSuspenseEnabledFromConfigAndContext=Y,l.useUser=Ot,l.version=kt,Object.defineProperties(l,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
137
+ */function Vr(e,t,n){var r=Xt.httpsCallable(e,t,n);return function(i){return R(r(i)).pipe(D(function(o){return o.data}))}}function Ur(e,t){const n=Bt(),r=`functions:callableResponse:${e}:${JSON.stringify(t==null?void 0:t.data)}:${JSON.stringify(t==null?void 0:t.httpsCallableOptions)}`,o=Vr(n,e,t==null?void 0:t.httpsCallableOptions)(t==null?void 0:t.data);return C(r,o,t)}function Mr({children:e,traceId:t,fallback:n}){var r;const i=((r=performance==null?void 0:performance.getEntriesByName)===null||r===void 0?void 0:r.call(performance,t,"measure"))||[],o=`_${t}Start[${i.length}]`,u=`_${t}End[${i.length}]`,a=()=>(h.useLayoutEffect(()=>{var s;return(s=performance==null?void 0:performance.mark)===null||s===void 0||s.call(performance,o),()=>{var c,f;(c=performance==null?void 0:performance.mark)===null||c===void 0||c.call(performance,u),(f=performance==null?void 0:performance.measure)===null||f===void 0||f.call(performance,t,o,u)}},[]),h.createElement(h.Fragment,null,n));return h.createElement(h.Suspense,{fallback:h.createElement(a,null)},e)}function X(e){var t=e.remoteConfig,n=e.key,r=e.getter;return new E(function(i){H.ensureInitialized(t).then(function(){var o=r.bind(t);i.next(o(t,n))})})}function Nr(e,t){var n=H.getValue;return X({remoteConfig:e,key:t,getter:n})}function qr(e,t){var n=H.getString;return X({remoteConfig:e,key:t,getter:n})}function Wr(e,t){var n=H.getNumber;return X({remoteConfig:e,key:t,getter:n})}function Kr(e,t){var n=H.getBoolean;return X({remoteConfig:e,key:t,getter:n})}function Hr(e){var t=H.getAll;return X({remoteConfig:e,key:"",getter:t})}function ee(e,t){const n=Jt(),r=n.app.name,i=t(n,e),o=`remoteConfig:${e}:${t.name}:${r}`;return C(o,i)}function Gr(e){return ee(e,Nr)}function Qr(e){return ee(e,qr)}function Yr(e){return ee(e,Wr)}function Br(e){return ee(e,Kr)}function zr(e){return ee(e,Hr)}function Jr(e){return new E(function(t){var n=function(u){return t.next(u)},r=function(u){return t.error(u)},i=function(){return t.complete()};n(e.snapshot);var o=e.on("state_changed",n);return e.then(function(u){n(u),setTimeout(function(){return i()},0)},function(u){n(e.snapshot),setTimeout(function(){return r(u)},0)}),function(){o()}}).pipe(Kn(0))}function Zr(e){return R(tt.getDownloadURL(e))}function Xr(e,t,n){const r=`storage:task:${t.toString()}`,i=Jr(e);return C(r,i,n)}function Qt(e,t){const n=`storage:downloadUrl:${e.toString()}`,r=Zr(e);return C(n,r,t)}function ei(e){const t=zt();return e=Object.assign(Object.assign({},e),{storage:t}),h.createElement(Yt,Object.assign({},e))}function Yt(e){const{storage:t,storagePath:n,suspense:r,placeHolder:i}=e,o=tn(e,["storage","storagePath","suspense","placeHolder"]),u={suspense:Z(r)};if(!t)throw new Error("Storage was not passed to component INTERNALStorageImage. This should not be possible");const{status:a,data:s}=Qt(tt.ref(t,n),u);return a==="success"?(o.alt||o.alt===""||console.warn(`No alt prop provided for StorageImage with storagePath "${n}"`,"img elements must have an alt prop, either with meaningful text, or an empty string for decorative images"),h.createElement("img",Object.assign({src:s,alt:o.alt},o))):i??h.createElement(h.Fragment,null,"''")}function ti(e){const{storage:t}=e;return t?h.createElement(Yt,Object.assign({},e)):h.createElement(ei,Object.assign({},e))}const he=h.createContext(void 0),pe=h.createContext(void 0),me=h.createContext(void 0),be=h.createContext(void 0),ye=h.createContext(void 0),ge=h.createContext(void 0),Se=h.createContext(void 0),_e=h.createContext(void 0),we=h.createContext(void 0);function $(e){return function(n){var r,i;if(!n.sdk)throw new Error("no sdk provided");const o=qe().name;if(((i=(r=n==null?void 0:n.sdk)===null||r===void 0?void 0:r.app)===null||i===void 0?void 0:i.name)!==o)throw new Error("sdk was initialized with a different firebase app");return h.createElement(e.Provider,Object.assign({value:n.sdk},n))}}function j(e){const t=h.useContext(e);if(!t)throw new Error("SDK not found. useSdk must be called from within a provider");return t}function L(e,t,n,r){const i=qe();if(h.useContext(t))throw new Error(`Cannot initialize SDK ${e} because it already exists in Context`);const o=h.useMemo(()=>n(i),[i]);return C(`firebase-sdk:${e}:${i.name}`,R(o),r)}const ni=$(he),ri=$(pe),ii=$(me),oi=$(be),ui=$(ye),ai=$(ge),si=$(_e),ci=$(Se),li=$(we),fi=()=>j(he),Je=()=>j(pe),di=()=>j(me),vi=()=>j(be),hi=()=>j(ye),Bt=()=>j(ge),pi=()=>j(_e),zt=()=>j(Se),Jt=()=>j(we),mi=(e,t)=>L("appcheck",he,e,t),bi=(e,t)=>L("auth",pe,e,t),yi=(e,t)=>L("analytics",me,e,t),gi=(e,t)=>L("database",be,e,t),Si=(e,t)=>L("firestore",ye,e,t),_i=(e,t)=>L("functions",ge,e,t),wi=(e,t)=>L("performance",_e,e,t),Ei=(e,t)=>L("remoteconfig",we,e,t),Ci=(e,t)=>L("storage",Se,e,t);class Ee extends Error{constructor(t,n,r){super(n),this.code=t,this.customData=r,this.name="ReactFireError",Object.setPrototypeOf(this,Ee.prototype)}}function Ze(e,t){if(t==="idField"||t==="initialData"||t==="suspense")return e?e[t]:void 0;throw new Error(`Field "${t}" is not a valid key in ReactFireOptions`)}function Oi(e){return Ze(e,"initialData")}function Y(e){return Ze(e,"idField")}l.AnalyticsProvider=ii,l.AnalyticsSdkContext=me,l.AppCheckProvider=ni,l.AppCheckSdkContext=he,l.AuthCheck=lr,l.AuthProvider=ri,l.AuthSdkContext=pe,l.ClaimsCheck=jt,l.DatabaseProvider=oi,l.DatabaseSdkContext=be,l.FirebaseAppProvider=or,l.FirestoreProvider=ui,l.FirestoreSdkContext=ye,l.FunctionsProvider=ai,l.FunctionsSdkContext=ge,l.PerformanceProvider=si,l.PerformanceSdkContext=_e,l.ReactFireError=Ee,l.RemoteConfigProvider=li,l.RemoteConfigSdkContext=we,l.StorageImage=ti,l.StorageProvider=ci,l.StorageSdkContext=Se,l.SuspenseWithPerf=Mr,l.checkIdField=Y,l.checkOptions=Ze,l.checkinitialData=Oi,l.preloadFirestoreDoc=Dr,l.preloadObservable=ve,l.preloadUser=ar,l.useAnalytics=di,l.useAppCheck=fi,l.useAuth=Je,l.useCallableFunctionResponse=Ur,l.useDatabase=vi,l.useDatabaseList=_r,l.useDatabaseListData=wr,l.useDatabaseObject=gr,l.useDatabaseObjectData=Sr,l.useFirebaseApp=qe,l.useFirestore=hi,l.useFirestoreCollection=jr,l.useFirestoreCollectionData=Lr,l.useFirestoreDoc=Tr,l.useFirestoreDocData=Rr,l.useFirestoreDocDataOnce=$r,l.useFirestoreDocOnce=xr,l.useFunctions=Bt,l.useIdTokenResult=$t,l.useInitAnalytics=yi,l.useInitAppCheck=mi,l.useInitAuth=bi,l.useInitDatabase=gi,l.useInitFirestore=Si,l.useInitFunctions=_i,l.useInitPerformance=wi,l.useInitRemoteConfig=Ei,l.useInitStorage=Ci,l.useIsSuspenseEnabled=ur,l.useObservable=C,l.usePerformance=pi,l.useRemoteConfig=Jt,l.useRemoteConfigAll=zr,l.useRemoteConfigBoolean=Br,l.useRemoteConfigNumber=Yr,l.useRemoteConfigString=Qr,l.useRemoteConfigValue=Gr,l.useSigninCheck=sr,l.useStorage=zt,l.useStorageDownloadURL=Qt,l.useStorageTask=Xr,l.useSuspenseEnabledFromConfigAndContext=Z,l.useUser=Rt,l.version=xt,Object.defineProperty(l,Symbol.toStringTag,{value:"Module"})});
122
138
  //# sourceMappingURL=index.umd.cjs.map